From ac877412108b771d2ef5ff1e763a49b61c95a71a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 10 Nov 2023 15:12:38 +0100 Subject: [PATCH] Fixes to editor. --- .../Squidex/wwwroot/editor/squidex-editor.js | 394 ++++++++++-------- 1 file changed, 221 insertions(+), 173 deletions(-) diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.js b/backend/src/Squidex/wwwroot/editor/squidex-editor.js index a54282425..55cc840d6 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.js +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.js @@ -1,4 +1,4 @@ -var OO=Object.defineProperty;var _O=(e,t,r)=>t in e?OO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ac=(e,t,r)=>(_O(e,typeof t!="symbol"?t+"":t,r),r);function AO(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Su=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oS={exports:{}},gh={},iS={exports:{}},we={};/** +var o_=Object.defineProperty;var i_=(e,t,r)=>t in e?o_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fe=(e,t,r)=>(i_(e,typeof t!="symbol"?t+"":t,r),r),s_=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var lg=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var ef=(e,t,r)=>(s_(e,t,"access private method"),r);function a_(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var AS={exports:{}},Ph={},RS={exports:{}},Ee={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var OO=Object.defineProperty;var _O=(e,t,r)=>t in e?OO(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yd=Symbol.for("react.element"),NO=Symbol.for("react.portal"),RO=Symbol.for("react.fragment"),PO=Symbol.for("react.strict_mode"),zO=Symbol.for("react.profiler"),LO=Symbol.for("react.provider"),IO=Symbol.for("react.context"),DO=Symbol.for("react.forward_ref"),$O=Symbol.for("react.suspense"),HO=Symbol.for("react.memo"),BO=Symbol.for("react.lazy"),Mk=Symbol.iterator;function FO(e){return e===null||typeof e!="object"?null:(e=Mk&&e[Mk]||e["@@iterator"],typeof e=="function"?e:null)}var sS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aS=Object.assign,lS={};function Wl(e,t,r){this.props=e,this.context=t,this.refs=lS,this.updater=r||sS}Wl.prototype.isReactComponent={};Wl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cS(){}cS.prototype=Wl.prototype;function rv(e,t,r){this.props=e,this.context=t,this.refs=lS,this.updater=r||sS}var nv=rv.prototype=new cS;nv.constructor=rv;aS(nv,Wl.prototype);nv.isPureReactComponent=!0;var Tk=Array.isArray,uS=Object.prototype.hasOwnProperty,ov={current:null},dS={key:!0,ref:!0,__self:!0,__source:!0};function fS(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)uS.call(t,n)&&!dS.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1t in e?OO(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var KO=S,qO=Symbol.for("react.element"),GO=Symbol.for("react.fragment"),YO=Object.prototype.hasOwnProperty,JO=KO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XO={key:!0,ref:!0,__self:!0,__source:!0};function pS(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)YO.call(t,n)&&!XO.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:qO,type:e,key:i,ref:s,props:o,_owner:JO.current}}gh.Fragment=GO;gh.jsx=pS;gh.jsxs=pS;oS.exports=gh;var O=oS.exports,s1={exports:{}};(function(e,t){var r=typeof Reflect<"u"?Reflect.construct:void 0,n=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(c){var u=new Error;n(c,"stack",{configurable:!0,get:function(){var f=u.stack;return n(this,"stack",{configurable:!0,value:f,writable:!0}),f},set:function(f){n(c,"stack",{configurable:!0,value:f,writable:!0})}})});function i(l){l!==void 0&&n(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&n(this,"name",{configurable:!0,value:c,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function l(u,d){return n(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=r!==void 0?function(){return r(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},s!==void 0&&(s(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}t=e.exports=a,t.BaseError=i})(s1,s1.exports);var hS=s1.exports,_k="ProseMirror-selectednode",sv="",Ti="\0",Ak="__state_override__",QO={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},oe=QO,Go=Symbol.for("__remirror__"),$t=(e=>(e.PlainExtension="RemirrorPlainExtension",e.NodeExtension="RemirrorNodeExtension",e.MarkExtension="RemirrorMarkExtension",e.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",e.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",e.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",e.Manager="RemirrorManager",e.Preset="RemirrorPreset",e.PresetConstructor="RemirrorPresetConstructor",e))($t||{}),De=(e=>(e[e.Critical=1e6]="Critical",e[e.Highest=1e5]="Highest",e[e.High=1e4]="High",e[e.Medium=1e3]="Medium",e[e.Default=100]="Default",e[e.Low=10]="Low",e[e.Lowest=0]="Lowest",e))(De||{}),Or=(e=>(e[e.None=0]="None",e[e.Create=1]="Create",e[e.EditorView=2]="EditorView",e[e.Runtime=3]="Runtime",e[e.Destroy=4]="Destroy",e))(Or||{}),j=(e=>(e.Undo="_|undo|_",e.Redo="_|redo|_",e.Bold="_|bold|_",e.Italic="_|italic|_",e.Underline="_|underline|_",e.Strike="_|strike|_",e.Code="_|code|_",e.Paragraph="_|paragraph|_",e.H1="_|h1|_",e.H2="_|h2|_",e.H3="_|h3|_",e.H4="_|h4|_",e.H5="_|h5|_",e.H6="_|h6|_",e.TaskList="_|task|_",e.BulletList="_|bullet|_",e.OrderedList="_|number|_",e.Quote="_|quote|_",e.Divider="_|divider|_",e.Codeblock="_|codeblock|_",e.ClearFormatting="_|clear|_",e.Superscript="_|sup|_",e.Subscript="_|sub|_",e.LeftAlignment="_|left-align|_",e.CenterAlignment="_|center-align|_",e.RightAlignment="_|right-align|_",e.JustifyAlignment="_|justify-align|_",e.InsertLink="_|link|_",e.Find="_|find|_",e.FindBackwards="_|find-backwards|_",e.FindReplace="_|find-replace|_",e.AddFootnote="_|footnote|_",e.AddComment="_|comment|_",e.ContextMenu="_|context-menu|_",e.IncreaseFontSize="_|inc-font-size|_",e.DecreaseFontSize="_|dec-font-size|_",e.IncreaseIndent="_|indent|_",e.DecreaseIndent="_|dedent|_",e.Shortcuts="_|shortcuts|_",e.Copy="_|copy|_",e.Cut="_|cut|_",e.Paste="_|paste|_",e.PastePlain="_|paste-plain|_",e.SelectAll="_|select-all|_",e.Format="_|format|_",e))(j||{}),H=(e=>(e.PROD="RMR0000",e.UNKNOWN="RMR0001",e.INVALID_COMMAND_ARGUMENTS="RMR0002",e.CUSTOM="RMR0003",e.CORE_HELPERS="RMR0004",e.MUTATION="RMR0005",e.INTERNAL="RMR0006",e.MISSING_REQUIRED_EXTENSION="RMR0007",e.MANAGER_PHASE_ERROR="RMR0008",e.INVALID_GET_EXTENSION="RMR0010",e.INVALID_MANAGER_ARGUMENTS="RMR0011",e.SCHEMA="RMR0012",e.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",e.INVALID_MANAGER_EXTENSION="RMR0014",e.DUPLICATE_COMMAND_NAMES="RMR0016",e.DUPLICATE_HELPER_NAMES="RMR0017",e.NON_CHAINABLE_COMMAND="RMR0018",e.INVALID_EXTENSION="RMR0019",e.INVALID_CONTENT="RMR0021",e.INVALID_NAME="RMR0050",e.EXTENSION="RMR0100",e.EXTENSION_SPEC="RMR0101",e.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",e.INVALID_SET_EXTENSION_OPTIONS="RMR0103",e.REACT_PROVIDER_CONTEXT="RMR0200",e.REACT_GET_ROOT_PROPS="RMR0201",e.REACT_EDITOR_VIEW="RMR0202",e.REACT_CONTROLLED="RMR0203",e.REACT_NODE_VIEW="RMR0204",e.REACT_GET_CONTEXT="RMR0205",e.REACT_COMPONENTS="RMR0206",e.REACT_HOOKS="RMR0207",e.I18N_CONTEXT="RMR0300",e))(H||{}),ZO=function(t){return e_(t)&&!t_(t)};function e_(e){return!!e&&typeof e=="object"}function t_(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||o_(e)}var r_=typeof Symbol=="function"&&Symbol.for,n_=r_?Symbol.for("react.element"):60103;function o_(e){return e.$$typeof===n_}function i_(e){return Array.isArray(e)?[]:{}}function Eu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?gl(i_(e),e,t):e}function s_(e,t,r){return e.concat(t).map(function(n){return Eu(n,r)})}function a_(e,t){if(!t.customMerge)return gl;var r=t.customMerge(e);return typeof r=="function"?r:gl}function l_(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Nk(e){return Object.keys(e).concat(l_(e))}function mS(e,t){try{return t in e}catch{return!1}}function c_(e,t){return mS(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function u_(e,t,r){var n={};return r.isMergeableObject(e)&&Nk(e).forEach(function(o){n[o]=Eu(e[o],r)}),Nk(t).forEach(function(o){c_(e,o)||(mS(e,o)&&r.isMergeableObject(t[o])?n[o]=a_(o,r)(e[o],t[o],r):n[o]=Eu(t[o],r))}),n}function gl(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||s_,r.isMergeableObject=r.isMergeableObject||ZO,r.cloneUnlessOtherwiseSpecified=Eu;var n=Array.isArray(t),o=Array.isArray(e),i=n===o;return i?n?r.arrayMerge(e,t,r):u_(e,t,r):Eu(t,r)}gl.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return gl(n,o,r)},{})};var d_=gl,f_=d_;const p_=Co(f_);var h_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r};const m_=Co(h_);/*! + */var S_=S,E_=Symbol.for("react.element"),C_=Symbol.for("react.fragment"),M_=Object.prototype.hasOwnProperty,T_=S_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O_={key:!0,ref:!0,__self:!0,__source:!0};function HS(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)M_.call(t,n)&&!O_.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:E_,type:e,key:i,ref:s,props:o,_owner:T_.current}}Ph.Fragment=C_;Ph.jsx=HS;Ph.jsxs=HS;AS.exports=Ph;var O=AS.exports,C1={exports:{}};(function(e,t){var r=typeof Reflect<"u"?Reflect.construct:void 0,n=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(c){var u=new Error;n(c,"stack",{configurable:!0,get:function(){var f=u.stack;return n(this,"stack",{configurable:!0,value:f,writable:!0}),f},set:function(f){n(c,"stack",{configurable:!0,value:f,writable:!0})}})});function i(l){l!==void 0&&n(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&n(this,"name",{configurable:!0,value:c,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function l(u,d){return n(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=r!==void 0?function(){return r(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},s!==void 0&&(s(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}t=e.exports=a,t.BaseError=i})(C1,C1.exports);var BS=C1.exports,Jk="ProseMirror-selectednode",Tv="",Li="\0",Qk="__state_override__",__={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},ie=__,ri=Symbol.for("__remirror__"),jt=(e=>(e.PlainExtension="RemirrorPlainExtension",e.NodeExtension="RemirrorNodeExtension",e.MarkExtension="RemirrorMarkExtension",e.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",e.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",e.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",e.Manager="RemirrorManager",e.Preset="RemirrorPreset",e.PresetConstructor="RemirrorPresetConstructor",e))(jt||{}),Ve=(e=>(e[e.Critical=1e6]="Critical",e[e.Highest=1e5]="Highest",e[e.High=1e4]="High",e[e.Medium=1e3]="Medium",e[e.Default=100]="Default",e[e.Low=10]="Low",e[e.Lowest=0]="Lowest",e))(Ve||{}),Pr=(e=>(e[e.None=0]="None",e[e.Create=1]="Create",e[e.EditorView=2]="EditorView",e[e.Runtime=3]="Runtime",e[e.Destroy=4]="Destroy",e))(Pr||{}),j=(e=>(e.Undo="_|undo|_",e.Redo="_|redo|_",e.Bold="_|bold|_",e.Italic="_|italic|_",e.Underline="_|underline|_",e.Strike="_|strike|_",e.Code="_|code|_",e.Paragraph="_|paragraph|_",e.H1="_|h1|_",e.H2="_|h2|_",e.H3="_|h3|_",e.H4="_|h4|_",e.H5="_|h5|_",e.H6="_|h6|_",e.TaskList="_|task|_",e.BulletList="_|bullet|_",e.OrderedList="_|number|_",e.Quote="_|quote|_",e.Divider="_|divider|_",e.Codeblock="_|codeblock|_",e.ClearFormatting="_|clear|_",e.Superscript="_|sup|_",e.Subscript="_|sub|_",e.LeftAlignment="_|left-align|_",e.CenterAlignment="_|center-align|_",e.RightAlignment="_|right-align|_",e.JustifyAlignment="_|justify-align|_",e.InsertLink="_|link|_",e.Find="_|find|_",e.FindBackwards="_|find-backwards|_",e.FindReplace="_|find-replace|_",e.AddFootnote="_|footnote|_",e.AddComment="_|comment|_",e.ContextMenu="_|context-menu|_",e.IncreaseFontSize="_|inc-font-size|_",e.DecreaseFontSize="_|dec-font-size|_",e.IncreaseIndent="_|indent|_",e.DecreaseIndent="_|dedent|_",e.Shortcuts="_|shortcuts|_",e.Copy="_|copy|_",e.Cut="_|cut|_",e.Paste="_|paste|_",e.PastePlain="_|paste-plain|_",e.SelectAll="_|select-all|_",e.Format="_|format|_",e))(j||{}),H=(e=>(e.PROD="RMR0000",e.UNKNOWN="RMR0001",e.INVALID_COMMAND_ARGUMENTS="RMR0002",e.CUSTOM="RMR0003",e.CORE_HELPERS="RMR0004",e.MUTATION="RMR0005",e.INTERNAL="RMR0006",e.MISSING_REQUIRED_EXTENSION="RMR0007",e.MANAGER_PHASE_ERROR="RMR0008",e.INVALID_GET_EXTENSION="RMR0010",e.INVALID_MANAGER_ARGUMENTS="RMR0011",e.SCHEMA="RMR0012",e.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",e.INVALID_MANAGER_EXTENSION="RMR0014",e.DUPLICATE_COMMAND_NAMES="RMR0016",e.DUPLICATE_HELPER_NAMES="RMR0017",e.NON_CHAINABLE_COMMAND="RMR0018",e.INVALID_EXTENSION="RMR0019",e.INVALID_CONTENT="RMR0021",e.INVALID_NAME="RMR0050",e.EXTENSION="RMR0100",e.EXTENSION_SPEC="RMR0101",e.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",e.INVALID_SET_EXTENSION_OPTIONS="RMR0103",e.REACT_PROVIDER_CONTEXT="RMR0200",e.REACT_GET_ROOT_PROPS="RMR0201",e.REACT_EDITOR_VIEW="RMR0202",e.REACT_CONTROLLED="RMR0203",e.REACT_NODE_VIEW="RMR0204",e.REACT_GET_CONTEXT="RMR0205",e.REACT_COMPONENTS="RMR0206",e.REACT_HOOKS="RMR0207",e.I18N_CONTEXT="RMR0300",e))(H||{}),A_=function(t){return R_(t)&&!N_(t)};function R_(e){return!!e&&typeof e=="object"}function N_(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||L_(e)}var P_=typeof Symbol=="function"&&Symbol.for,z_=P_?Symbol.for("react.element"):60103;function L_(e){return e.$$typeof===z_}function I_(e){return Array.isArray(e)?[]:{}}function zu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ml(I_(e),e,t):e}function D_(e,t,r){return e.concat(t).map(function(n){return zu(n,r)})}function $_(e,t){if(!t.customMerge)return Ml;var r=t.customMerge(e);return typeof r=="function"?r:Ml}function H_(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Zk(e){return Object.keys(e).concat(H_(e))}function FS(e,t){try{return t in e}catch{return!1}}function B_(e,t){return FS(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function F_(e,t,r){var n={};return r.isMergeableObject(e)&&Zk(e).forEach(function(o){n[o]=zu(e[o],r)}),Zk(t).forEach(function(o){B_(e,o)||(FS(e,o)&&r.isMergeableObject(t[o])?n[o]=$_(o,r)(e[o],t[o],r):n[o]=zu(t[o],r))}),n}function Ml(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||D_,r.isMergeableObject=r.isMergeableObject||A_,r.cloneUnlessOtherwiseSpecified=zu;var n=Array.isArray(t),o=Array.isArray(e),i=n===o;return i?n?r.arrayMerge(e,t,r):F_(e,t,r):zu(t,r)}Ml.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return Ml(n,o,r)},{})};var V_=Ml,j_=V_;const U_=Po(j_);var W_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r};const K_=Po(W_);/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var gS=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*! + */var VS=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var g_=gS;function Rk(e){return g_(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var v_=function(t){var r,n;return!(Rk(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,Rk(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var q_=VS;function ex(e){return q_(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var G_=function(t){var r,n;return!(ex(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,ex(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var y_=v_,b_=function(t){return y_(t)||typeof t=="function"||Array.isArray(t)};/*! + */var Y_=G_,X_=function(t){return Y_(t)||typeof t=="function"||Array.isArray(t)};/*! * object.omit * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var k_=b_,x_=function(t,r,n){if(!k_(t))return{};typeof r=="function"&&(n=r,r=[]),typeof r=="string"&&(r=[r]);for(var o=typeof n=="function",i=Object.keys(t),s={},a=0;a * * Copyright (c) 2014-2015 Jon Schlinkert, contributors. * Licensed under the MIT License - */var w_=gS,S_=function(t,r){if(!w_(t)&&typeof t!="function")return{};var n={};if(typeof r=="string")return r in t&&(n[r]=t[r]),n;for(var o=r.length,i=-1;++i{let d=l.prefixes[u]||"",f=c;return r===!1&&(n&&(f=f.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${n.join("")}]`,"g"),"")),n||(f=f.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),n&&(d=d.replace(new RegExp(`[^${n.join("")}]`,"g"),"")),u===0?d+f:!d&&!f?"":s&&!d&&o.match(/\s/)?" "+f:(d||o)+f}).filter(Boolean)}function M_(e){const t=e.matchAll(vS).next().value,r=t?t.index:0;return e.slice(0,r+1).toUpperCase()+e.slice(r+1).toLowerCase()}function bS(e,t){return yS(e,t).reduce((r,n)=>r+M_(n),"")}function Pk(e,t){return yS(e,{...t,prefix:"-"}).join("").toLowerCase()}function l1(e,t,r,n){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){a(),i=!0}typeof t!="boolean"&&(n=r,r=t,t=void 0);function c(){for(var u=arguments.length,d=new Array(u),f=0;fe?m():t!==!0&&(o=setTimeout(n?b:m,n===void 0?e-h:e))}return c.cancel=l,c}function kS(e,t,r){return r===void 0?l1(e,t,!1):l1(e,r,t!==!1)}function nt(e,t,r){const n=e[t];return xS(!yh(n),r),n}function xS(e,t){if(!e)throw new T_(t)}var T_=class extends hS.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function At(e){return Object.entries(e)}function Cu(e){return Object.keys(e)}function vh(e){return Object.values(e)}function br(e,t,r){return e.includes(t,r)}function ee(e){return Object.assign(Object.create(null),e)}function wS(e){return Object.prototype.toString.call(e)}function SS(e){return wS(e).slice(8,-1)}function bd(e,t){return r=>typeof r!==e?!1:t?t(r):!0}function lv(e){return t=>SS(t)===e}var yh=bd("undefined"),ne=bd("string"),ln=bd("number",e=>!Number.isNaN(e)),Pe=bd("function");function O_(e){return e===null}function c1(e){return e===!0||e===!1}function ss(e){if(SS(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function __(e){return e==null||/^[bns]/.test(typeof e)}function Ki(e){return O_(e)||yh(e)}function Xt(e){return!Ki(e)&&(Pe(e)||bd("object")(e))}var A_=lv("RegExp");function N_(e){return lv("Map")(e)}function R_(e){return lv("Set")(e)}function np(e){return Xt(e)&&!N_(e)&&!R_(e)&&Object.keys(e).length===0}var at=Array.isArray;function qi(e){return at(e)&&e.length===0}function zk(e){return at(e)&&e.length>0}function P_(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Kl(e,t,r=n=>!!n){t.lastIndex=0;const n=[],o=t.flags;let i;o.includes("g")||(t=new RegExp(t.source,`g${o}`));do i=t.exec(e),i&&n.push(i);while(r(i));return t.lastIndex=0,n}function op(){const e=Date.now(),t=op.last||e;return op.last=e>t?e:t+1}op.last=0;function vl(e=""){return`${e}${op().toString(36)}`}function ES(e){return av(e,t=>!yh(t))}function z_(e){if(!ss(e))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}var CS=m_;function yl(e,t=!1){const r=t?[...e].reverse():e,n=new Set(r);return t?[...n].reverse():[...n]}function MS(e){const t=[];for(const r of e){const n=at(r)?MS(r):[r];t.push(...n)}return t}function TS(){}function OS(...e){return p_.all(e,{isMergeableObject:ss})}function L_({min:e,max:t,value:r}){return rt?t:r}function I_(e){return e[e.length-1]}function Gs(e,t){return[...e].map((r,n)=>({value:r,index:n})).sort((r,n)=>t(r.value,n.value)||r.index-n.index).map(({value:r})=>r)}function D_(e,t,r){try{if(ne(t)&&t in e)return e[t];at(t)&&(t=`['${t.join("']['")}']`);let n=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,a,l,c)=>(n=n[s||a||l||c],"")),n===void 0?r:n}catch{return r}}function $_(e,t){const r=z_(t);let n=r;for(const[o,i]of e.entries()){const s=o>=e.length-1;let a=n[i];if(s){if(at(n)){const l=Number.parseInt(i.toString(),10);ln(l)&&n.splice(l,1)}else Reflect.deleteProperty(n,i);return r}if(__(a))return r;a=at(a)?[...a]:{...a},n[i]=a,n=a}return r}function H_(e){return t=>D_(t,e)}function _S(e,t,r=!1){const n=[],o=new Set,i=Pe(t)?t:H_(t),s=r?[...e].reverse():e;for(const a of s){const l=i(a);o.has(l)||(o.add(l),n.push(a))}return r?n.reverse():n}function cv(e,t){const r=at(e)?e[0]:e;return ln(t)?r<=t?Array.from({length:t+1-r},(n,o)=>o+r):Array.from({length:r+1-t},(n,o)=>-1*o+r):Array.from({length:Math.abs(r)},(n,o)=>(r<0?-1:1)*o)}function Lk(e,...t){const r=t.filter(ln);return e>=Math.min(...r)&&e<=Math.max(...r)}function AS(e){return Pe(e)?e():e}var NS="https://remirror.io/docs/errors",B_={[H.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[H.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[H.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[H.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[H.MUTATION]:"Mutation of immutable value detected.",[H.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[H.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[H.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[H.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[H.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[H.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[H.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[H.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[H.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[H.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[H.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[H.INVALID_EXTENSION]:"The provided extension is invalid.",[H.INVALID_CONTENT]:"The content provided to the editor is not supported.",[H.INVALID_NAME]:"An invalid name was used for the extension.",[H.EXTENSION]:"An error occurred within an extension. More details should be made available.",[H.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[H.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[H.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[H.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[H.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[H.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[H.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[H.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[H.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[H.REACT_COMPONENTS]:"An error occurred within a remirror component.",[H.REACT_HOOKS]:"An error occurred within a remirror hook.",[H.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function F_(e){return ne(e)&&br(vh(H),e)}function V_(e,t){const r=B_[e],n=r?`${r} + */var Z_=VS,eA=function(t,r){if(!Z_(t)&&typeof t!="function")return{};var n={};if(typeof r=="string")return r in t&&(n[r]=t[r]),n;for(var o=r.length,i=-1;++i{let d=l.prefixes[u]||"",f=c;return r===!1&&(n&&(f=f.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${n.join("")}]`,"g"),"")),n||(f=f.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),n&&(d=d.replace(new RegExp(`[^${n.join("")}]`,"g"),"")),u===0?d+f:!d&&!f?"":s&&!d&&o.match(/\s/)?" "+f:(d||o)+f}).filter(Boolean)}function nA(e){const t=e.matchAll(jS).next().value,r=t?t.index:0;return e.slice(0,r+1).toUpperCase()+e.slice(r+1).toLowerCase()}function WS(e,t){return US(e,t).reduce((r,n)=>r+nA(n),"")}function tx(e,t){return US(e,{...t,prefix:"-"}).join("").toLowerCase()}function T1(e,t,r,n){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){a(),i=!0}typeof t!="boolean"&&(n=r,r=t,t=void 0);function c(){for(var u=arguments.length,d=new Array(u),f=0;fe?m():t!==!0&&(o=setTimeout(n?b:m,n===void 0?e-h:e))}return c.cancel=l,c}function KS(e,t,r){return r===void 0?T1(e,t,!1):T1(e,r,t!==!1)}function lt(e,t,r){const n=e[t];return qS(!Lh(n),r),n}function qS(e,t){if(!e)throw new oA(t)}var oA=class extends BS.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function Lt(e){return Object.entries(e)}function Lu(e){return Object.keys(e)}function zh(e){return Object.values(e)}function Er(e,t,r){return e.includes(t,r)}function te(e){return Object.assign(Object.create(null),e)}function GS(e){return Object.prototype.toString.call(e)}function YS(e){return GS(e).slice(8,-1)}function Ad(e,t){return r=>typeof r!==e?!1:t?t(r):!0}function _v(e){return t=>YS(t)===e}var Lh=Ad("undefined"),oe=Ad("string"),hn=Ad("number",e=>!Number.isNaN(e)),Le=Ad("function");function iA(e){return e===null}function O1(e){return e===!0||e===!1}function hs(e){if(YS(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function sA(e){return e==null||/^[bns]/.test(typeof e)}function es(e){return iA(e)||Lh(e)}function rr(e){return!es(e)&&(Le(e)||Ad("object")(e))}var aA=_v("RegExp");function lA(e){return _v("Map")(e)}function cA(e){return _v("Set")(e)}function gp(e){return rr(e)&&!lA(e)&&!cA(e)&&Object.keys(e).length===0}var ft=Array.isArray;function ts(e){return ft(e)&&e.length===0}function rx(e){return ft(e)&&e.length>0}function uA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function rc(e,t,r=n=>!!n){t.lastIndex=0;const n=[],o=t.flags;let i;o.includes("g")||(t=new RegExp(t.source,`g${o}`));do i=t.exec(e),i&&n.push(i);while(r(i));return t.lastIndex=0,n}function vp(){const e=Date.now(),t=vp.last||e;return vp.last=e>t?e:t+1}vp.last=0;function Tl(e=""){return`${e}${vp().toString(36)}`}function XS(e){return Ov(e,t=>!Lh(t))}function dA(e){if(!hs(e))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}var JS=K_;function Ol(e,t=!1){const r=t?[...e].reverse():e,n=new Set(r);return t?[...n].reverse():[...n]}function QS(e){const t=[];for(const r of e){const n=ft(r)?QS(r):[r];t.push(...n)}return t}function ZS(){}function eE(...e){return U_.all(e,{isMergeableObject:hs})}function fA({min:e,max:t,value:r}){return rt?t:r}function pA(e){return e[e.length-1]}function ra(e,t){return[...e].map((r,n)=>({value:r,index:n})).sort((r,n)=>t(r.value,n.value)||r.index-n.index).map(({value:r})=>r)}function hA(e,t,r){try{if(oe(t)&&t in e)return e[t];ft(t)&&(t=`['${t.join("']['")}']`);let n=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,a,l,c)=>(n=n[s||a||l||c],"")),n===void 0?r:n}catch{return r}}function mA(e,t){const r=dA(t);let n=r;for(const[o,i]of e.entries()){const s=o>=e.length-1;let a=n[i];if(s){if(ft(n)){const l=Number.parseInt(i.toString(),10);hn(l)&&n.splice(l,1)}else Reflect.deleteProperty(n,i);return r}if(sA(a))return r;a=ft(a)?[...a]:{...a},n[i]=a,n=a}return r}function gA(e){return t=>hA(t,e)}function tE(e,t,r=!1){const n=[],o=new Set,i=Le(t)?t:gA(t),s=r?[...e].reverse():e;for(const a of s){const l=i(a);o.has(l)||(o.add(l),n.push(a))}return r?n.reverse():n}function Av(e,t){const r=ft(e)?e[0]:e;return hn(t)?r<=t?Array.from({length:t+1-r},(n,o)=>o+r):Array.from({length:r+1-t},(n,o)=>-1*o+r):Array.from({length:Math.abs(r)},(n,o)=>(r<0?-1:1)*o)}function nx(e,...t){const r=t.filter(hn);return e>=Math.min(...r)&&e<=Math.max(...r)}function rE(e){return Le(e)?e():e}var nE="https://remirror.io/docs/errors",vA={[H.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[H.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[H.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[H.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[H.MUTATION]:"Mutation of immutable value detected.",[H.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[H.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[H.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[H.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[H.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[H.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[H.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[H.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[H.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[H.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[H.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[H.INVALID_EXTENSION]:"The provided extension is invalid.",[H.INVALID_CONTENT]:"The content provided to the editor is not supported.",[H.INVALID_NAME]:"An invalid name was used for the extension.",[H.EXTENSION]:"An error occurred within an extension. More details should be made available.",[H.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[H.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[H.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[H.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[H.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[H.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[H.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[H.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[H.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[H.REACT_COMPONENTS]:"An error occurred within a remirror component.",[H.REACT_HOOKS]:"An error occurred within a remirror hook.",[H.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function yA(e){return oe(e)&&Er(zh(H),e)}function bA(e,t){const r=vA[e],n=r?`${r} `:"",o=t?`${t} -`:"";return`${n}${o}For more information visit ${NS}#${e.toLowerCase()}`}var RS=class extends hS.BaseError{constructor({code:e,message:t,disableLogging:r=!1}={}){const n=F_(e)?e:H.CUSTOM;super(V_(n,t)),this.errorCode=n,this.url=`${NS}#${n.toLowerCase()}`,r||console.error(this.message)}static create(e={}){return new RS(e)}};function te(e,t){if(!e)throw RS.create(t)}function bh(e){if(typeof e!="object"||e===null)return e;const t=Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Module"?e.default??e:e;return t&&typeof e=="object"&&"__esModule"in t&&t.__esModule&&t.default!==void 0?t.default:t}function Rs(e,t={}){return e}function Wt(e){this.content=e}Wt.prototype={constructor:Wt,find:function(e){for(var t=0;t>1}};Wt.from=function(e){if(e instanceof Wt)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new Wt(t)};function PS(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let o=e.child(n),i=t.child(n);if(o==i){r+=o.nodeSize;continue}if(!o.sameMarkup(i))return r;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)r++;return r}if(o.content.size||i.content.size){let s=PS(o.content,i.content,r+1);if(s!=null)return s}r+=o.nodeSize}}function zS(e,t,r,n){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:r,b:n};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){r-=l,n-=l;continue}if(!s.sameMarkup(a))return{a:r,b:n};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&n(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,r-u),n,o+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,o){let i="",s=!0;return this.nodesBetween(t,r,(a,l)=>{a.isText?(i+=a.text.slice(Math.max(t,l)-l,r-l),s=!n):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!n):!s&&a.isBlock&&(i+=n,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,o=this.content.slice(),i=0;for(r.isText&&r.sameMarkup(n)&&(o[o.length-1]=r.withText(r.text+n.text),i=1);it)for(let i=0,s=0;st&&((sr)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,r-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,r-s-1))),n.push(a),o+=a.nodeSize),s=l}return new R(n,o)}cutByIndex(t,r){return t==r?R.empty:t==0&&r==this.content.length?this:new R(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let o=this.content.slice(),i=this.size+r.nodeSize-n.nodeSize;return o[t]=r,new R(o,i)}addToStart(t){return new R([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new R(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,o=0;;n++){let i=this.child(n),s=o+i.nodeSize;if(s>=t)return s==t||r>0?Ud(n+1,s):Ud(n,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return R.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new R(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return R.empty;let r,n=0;for(let o=0;othis.type.rank&&(r||(r=t.slice(0,o)),r.push(this),n=!0),r&&r.push(i)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-o.type.rank),r}}Te.none=[];class sp extends Error{}class W{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=IS(this.content,t+this.openStart,r);return n&&new W(n,this.openStart,this.openEnd)}removeBetween(t,r){return new W(LS(this.content,t+this.openStart,r+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,r){if(!r)return W.empty;let n=r.openStart||0,o=r.openEnd||0;if(typeof n!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(R.fromJSON(t,r.content),n,o)}static maxOpen(t,r=!0){let n=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=t.lastChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.lastChild)o++;return new W(t,n,o)}}W.empty=new W(R.empty,0,0);function LS(e,t,r){let{index:n,offset:o}=e.findIndex(t),i=e.maybeChild(n),{index:s,offset:a}=e.findIndex(r);if(o==t||i.isText){if(a!=r&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(n,i.copy(LS(i.content,t-o-1,r-o-1)))}function IS(e,t,r,n){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return n&&!n.canReplace(o,o,r)?null:e.cut(0,t).append(r).append(e.cut(t));let a=IS(s.content,t-i-1,r);return a&&e.replaceChild(o,s.copy(a))}function j_(e,t,r){if(r.openStart>e.depth)throw new sp("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new sp("Inconsistent open depths");return DS(e,t,r,0)}function DS(e,t,r,n){let o=e.index(n),i=e.node(n);if(o==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function iu(e,t,r,n){let o=(t||e).node(r),i=0,s=t?t.index(r):o.childCount;e&&(i=e.index(r),e.depth>r?i++:e.textOffset&&(Fs(e.nodeAfter,n),i++));for(let a=i;ao&&u1(e,t,o+1),s=n.depth>o&&u1(r,n,o+1),a=[];return iu(null,e,o,a),i&&s&&t.index(o)==r.index(o)?($S(i,s),Fs(Vs(i,HS(e,t,r,n,o+1)),a)):(i&&Fs(Vs(i,ap(e,t,o+1)),a),iu(t,r,o,a),s&&Fs(Vs(s,ap(r,n,o+1)),a)),iu(n,null,o,a),new R(a)}function ap(e,t,r){let n=[];if(iu(null,e,r,n),e.depth>r){let o=u1(e,t,r+1);Fs(Vs(o,ap(e,t,r+1)),n)}return iu(t,null,r,n),new R(n)}function U_(e,t){let r=t.depth-e.openStart,o=t.node(r).copy(e.content);for(let i=r-1;i>=0;i--)o=t.node(i).copy(R.from(o));return{start:o.resolveNoCache(e.openStart+r),end:o.resolveNoCache(o.content.size-e.openEnd-r)}}class bl{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.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,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],o=t.child(r);return n?t.child(r).cut(n):o}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],o=r==0?0:this.path[r*3-1]+1;for(let i=0;i0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new Ys(this,t,n);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=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],o=0,i=r;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(n.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new bl(r,n,i)}static resolveCached(t,r){for(let o=0;ot&&this.nodesBetween(t,r,i=>(n.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()+")"),BS(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=R.empty,o=0,i=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,o,i),a=s&&s.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=o;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r 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(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let o=R.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,o,n)}};Pi.prototype.text=void 0;class lp extends Pi{constructor(t,r,n,o){if(super(t,r,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):BS(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new lp(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new lp(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function BS(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class Js{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new q_(t,r);if(n.next==null)return Js.empty;let o=FS(n);n.next&&n.err("Unexpected trailing text");let i=eA(Z_(o));return tA(i,n),i}matchType(t){for(let r=0;rc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let o=0;o{let i=o+(n.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(n.next[s].next);return i}).join(` -`)}}Js.empty=new Js(!0);class q_{constructor(t,r){this.string=t,this.nodeTypes=r,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 FS(e){let t=[];do t.push(G_(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function G_(e){let t=[];do t.push(Y_(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Y_(e){let t=Q_(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=J_(e,t);else break;return t}function Ik(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function J_(e,t){let r=Ik(e),n=r;return e.eat(",")&&(e.next!="}"?n=Ik(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function X_(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let o=[];for(let i in r){let s=r[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function Q_(e){if(e.eat("(")){let t=FS(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=X_(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Z_(e){let t=[[]];return o(i(e,0),r()),t;function r(){return t.push([])-1}function n(s,a,l){let c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=r())}else if(s.type=="star"){let l=r();return n(a,l),o(i(s.expr,l),l),[n(l)]}else if(s.type=="plus"){let l=r();return o(i(s.expr,a),l),o(i(s.expr,l),l),[n(l)]}else{if(s.type=="opt")return[n(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[n.join(",")]=new Js(n.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[i]=new KS(i,r,s));let o=r.spec.topNode||"doc";if(!n[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class rA{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class kd{constructor(t,r,n,o){this.name=t,this.rank=r,this.schema=n,this.spec=o,this.attrs=WS(o.attrs),this.excluded=null;let i=jS(this.attrs);this.instance=i?new Te(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Te(this,US(this.attrs,t))}static compile(t,r){let n=Object.create(null),o=0;return t.forEach((i,s)=>n[i]=new kd(i,o++,r,s)),n}removeFromSet(t){for(var r=0;r-1}}let nA=class{constructor(t){this.cached=Object.create(null);let r=this.spec={};for(let o in t)r[o]=t[o];r.nodes=Wt.from(t.nodes),r.marks=Wt.from(t.marks||{}),this.nodes=f1.compile(this.spec.nodes,this),this.marks=kd.compile(this.spec.marks,this);let n=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],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=Js.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?$k(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:$k(this,s.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,r=null,n,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof f1){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(r,n,o)}text(t,r){let n=this.nodes.text;return new lp(n,n.defaultAttrs,t,Te.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return Pi.fromJSON(this,t)}markFromJSON(t){return Te.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}};function $k(e,t){let r=[];for(let n=0;n-1)&&r.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}let uv=class p1{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let o=t.nodes[n.node];return o.contentMatch.matchType(o)})}parse(t,r={}){let n=new Bk(this,r,!1);return n.addAll(t,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new Bk(this,r,!0);return n.addAll(t,r.from,r.to),W.maxOpen(n.finish())}matchTag(t,r,n){for(let o=n?this.tags.indexOf(n)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(s.getAttrs){let l=s.getAttrs(r);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let r=[];function n(o){let i=o.priority==null?50:o.priority,s=0;for(;s{n(s=Fk(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{n(s=Fk(s)),s.node||s.ignore||s.mark||(s.node=o)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new p1(t,p1.schemaRules(t)))}};const qS={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},oA={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},GS={ol:!0,ul:!0},cp=1,up=2,su=4;function Hk(e,t,r){return t!=null?(t?cp:0)|(t==="full"?up:0):e&&e.whitespace=="pre"?cp|up:r&~su}class Wd{constructor(t,r,n,o,i,s,a){this.type=t,this.attrs=r,this.marks=n,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=Te.none,this.stashMarks=[],this.match=s||(a&su?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(R.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,o;return(o=n.findWrapping(t.type))?(this.match=n,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&cp)){let n=this.content[this.content.length-1],o;if(n&&n.isText&&(o=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;n.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 r=R.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(R.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,n=this.pendingMarks;rthis.addAll(t)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let r=Te.none,n=Te.none;for(let o=0;o{s.clearMark(a)&&(n=a.addToSet(n))}):r=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(r),s.consuming===!1)i=s;else break}return[r,n]}addElementByRule(t,r,n){let o,i,s;r.node?(i=this.parser.schema.nodes[r.node],i.isLeaf?this.insertNode(i.create(r.attrs))||this.leafFallback(t):o=this.enter(i,r.attrs||null,r.preserveWhitespace)):(s=this.parser.schema.marks[r.mark].create(r.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,r,n){let o=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=n==null?null:t.childNodes[n];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let r,n;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!r||r.length>s.length)&&(r=s,n=i,!s.length)||i.solid)break}if(!r)return!1;this.sync(n);for(let o=0;othis.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].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 r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let o=n.length-1;o>=0;o--)t+=n[o].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,o=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let c=r[a];if(c==""){if(a==r.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:n&&l>=i?n.node(l-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}addPendingMark(t){let r=cA(t,this.top.pendingMarks);r&&this.top.stashMarks.push(r),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,r){for(let n=this.open;n>=0;n--){let o=this.nodes[n];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==r)break}}}function iA(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&GS.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function sA(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function aA(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r,n=[];for(;r=t.exec(e);)n.push(r[1],r[2].trim());return n}function Fk(e){let t={};for(let r in e)t[r]=e[r];return t}function lA(e,t){let r=t.schema.nodes;for(let n in r){let o=r[n];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,r);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,r,n={}){let o=this.marks[t.type.name];return o&&rn.renderSpec(Gm(n),o(t,r))}static renderSpec(t,r,n=null){if(typeof r=="string")return{dom:t.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let o=r[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,a=n?t.createElementNS(n,o):t.createElement(o),l=r[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=rn.renderSpec(t,d,n);if(a.appendChild(f),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new rn(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=Vk(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return Vk(t.marks)}}function Vk(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function Gm(e){return e.document||window.document}const YS=65535,JS=Math.pow(2,16);function uA(e,t){return e+t*JS}function jk(e){return e&YS}function dA(e){return(e-(e&YS))/JS}const XS=1,QS=2,Ef=4,ZS=8;class h1{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&ZS)>0}get deletedBefore(){return(this.delInfo&(XS|Ef))>0}get deletedAfter(){return(this.delInfo&(QS|Ef))>0}get deletedAcross(){return(this.delInfo&Ef)>0}}class Zr{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&Zr.empty)return Zr.empty}recover(t){let r=0,n=jk(t);if(!this.inverted)for(let o=0;ot)break;let c=this.ranges[a+i],u=this.ranges[a+s],d=l+c;if(t<=d){let f=c?t==l?-1:t==d?1:r:r,p=l+o+(f<0?0:u);if(n)return p;let h=t==(r<0?l:d)?null:uA(a/3,t-l),m=t==l?QS:t==d?XS:Ef;return(r<0?t!=l:t!=d)&&(m|=ZS),new h1(p,m,h)}o+=u-c}return n?t+o:new h1(t+o,0,null)}touches(t,r){let n=0,o=jk(r),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;n+=this.ranges[a+s]-c}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let o=0,i=0;o=0;r--){let o=t.getMirror(r);this.appendMap(t.maps[r].invert(),o!=null&&o>r?n-o-1:void 0)}}invert(){let t=new rl;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ni&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),r.openStart,r.openEnd);return vt.fromReplace(t,this.from,this.to,i)}invert(){return new Yn(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Bo(r.pos,n.pos,this.mark)}merge(t){return t instanceof Bo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Bo(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Bo(r.from,r.to,t.markFromJSON(r.mark))}}Rt.jsonID("addMark",Bo);class Yn extends Rt{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new W(dv(r.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),r.openStart,r.openEnd);return vt.fromReplace(t,this.from,this.to,n)}invert(){return new Bo(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Yn(r.pos,n.pos,this.mark)}merge(t){return t instanceof Yn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Yn(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Yn(r.from,r.to,t.markFromJSON(r.mark))}}Rt.jsonID("removeMark",Yn);class Oi extends Rt{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return vt.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return vt.fromReplace(t,this.pos,this.pos+1,new W(R.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let o=0;on.pos?null:new yt(r.pos,n.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,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new yt(r.from,r.to,r.gapFrom,r.gapTo,W.fromJSON(t,r.slice),r.insert,!!r.structure)}}Rt.jsonID("replaceAround",yt);function m1(e,t,r){let n=e.resolve(t),o=r-t,i=n.depth;for(;o>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,o--;if(o>0){let s=n.node(i).maybeChild(n.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function fA(e,t,r,n){let o=[],i=[],s,a;e.doc.nodesBetween(t,r,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!n.isInSet(d)&&u.type.allowsMarkType(n.type)){let f=Math.max(c,t),p=Math.min(c+l.nodeSize,r),h=n.addToSet(d);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function pA(e,t,r,n){let o=[],i=0;e.doc.nodesBetween(t,r,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(n instanceof kd){let c=s.marks,u;for(;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(s.marks)&&(l=[n]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,r);for(let u=0;ue.step(new Yn(s.from,s.to,s.style)))}function hA(e,t,r,n=r.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function mA(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function ql(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let o=e.$from.node(n),i=e.$from.index(n),s=e.$to.indexAfter(n);if(nr;h--)m||n.index(h)>0?(m=!0,u=R.from(n.node(h).copy(u)),d++):l--;let f=R.empty,p=0;for(let h=i,m=!1;h>r;h--)m||o.after(h+1)=0;s--){if(n.size){let a=r[s].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=R.from(r[s].type.create(r[s].attrs,n))}let o=t.start,i=t.end;e.step(new yt(o,i,o,i,new W(n,0,0),r.length,!0))}function kA(e,t,r,n,o){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,r,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(n,o)&&xA(e.doc,e.mapping.slice(i).map(a),n)){e.clearIncompatible(e.mapping.slice(i).map(a,1),n);let l=e.mapping.slice(i),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return e.step(new yt(c,u,c+1,u-1,new W(R.from(n.create(o,null,s.marks)),0,0),1,!0)),!1}})}function xA(e,t,r){let n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}function wA(e,t,r,n,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");r||(r=i.type);let s=r.create(n,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!r.validContent(i.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new yt(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new W(R.from(s),0,0),1,!0))}function nl(e,t,r=1,n){let o=e.resolve(t),i=o.depth-r,s=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=r-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=n&&n[u+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=n&&n[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=o.indexAfter(i),l=n&&n[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function SA(e,t,r=1,n){let o=e.doc.resolve(t),i=R.empty,s=R.empty;for(let a=o.depth,l=o.depth-r,c=r-1;a>l;a--,c--){i=R.from(o.node(a).copy(i));let u=n&&n[c];s=R.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}e.step(new Dt(t,t,new W(i.append(s),r,r),!0))}function xd(e,t){let r=e.resolve(t),n=r.index();return EA(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function EA(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function CA(e,t,r){let n=new Dt(t-r,t+r,W.empty,!0);e.step(n)}function eE(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let o=n.depth-1;o>=0;o--){let i=n.index(o);if(n.node(o).canReplaceWith(i,i,r))return n.before(o+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(let o=n.depth-1;o>=0;o--){let i=n.indexAfter(o);if(n.node(o).canReplaceWith(i,i,r))return n.after(o+1);if(i=0;s--){let a=s==n.depth?0:n.pos<=(n.start(s+1)+n.end(s+1))/2?-1:1,l=n.index(s)+(a>0?1:0),c=n.node(s),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 a==0?n.pos:a<0?n.before(s+1):n.after(s+1)}return null}function pv(e,t,r=t,n=W.empty){if(t==r&&!n.size)return null;let o=e.resolve(t),i=e.resolve(r);return tE(o,i,n)?new Dt(t,r,n):new TA(o,i,n).fit()}function tE(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class TA{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=R.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=R.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(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new W(i,s,a);return t>-1?new yt(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new Dt(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,o=this.unplaced.openEnd;n1&&(o=0),i.type.spec.isolating&&o<=n){t=n;break}r=i.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let o,i=null;n?(i=Jm(this.unplaced.content,n-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(r==1&&(s?c.matchType(s.type)||(d=c.fillBefore(R.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:a,parent:i,inject:d};if(r==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=Jm(t,r);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new W(t,r+1,Math.max(n,o.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=Jm(t,r);if(o.childCount<=1&&r>0){let i=t.size-r<=r+o.size;this.unplaced=new W(Ec(t,r-1,1),r-1,i?r-1:n)}else this.unplaced=new W(Ec(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:o,wrap:i}){for(;this.depth>r;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(d=b,u.push(rE(m.mark(f.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let h=c==a.childCount;h||(p=-1),this.placed=Cc(this.placed,r,R.from(u)),this.frontier[r].match=d,h&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--n);)++o;return o}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:o}=this.frontier[r],i=r=0;a--){let{match:l,type:c}=this.frontier[a],u=Xm(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:r,fit:s,move:i?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Cc(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let o=t.node(n),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(n));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,r=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Cc(this.placed,this.depth,R.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(R.empty,!0);r.childCount&&(this.placed=Cc(this.placed,this.frontier.length,r))}}function Ec(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(Ec(e.firstChild.content,t-1,r)))}function Cc(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(Cc(e.lastChild.content,t-1,r)))}function Jm(e,t){for(let r=0;r1&&(n=n.replaceChild(0,rE(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(R.empty,!0)))),e.copy(n)}function Xm(e,t,r,n,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!r.compatibleContent(i.type))return null;let a=n.fillBefore(i.content,!0,s);return a&&!OA(r,i.content,s)?a:null}function OA(e,t,r){for(let n=r;n0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:o.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),c=[],u=n.openStart;for(let f=n.content,p=0;;p++){let h=f.firstChild;if(c.push(h),p==n.openStart)break;f=h.content}for(let f=u-1;f>=0;f--){let p=c[f],h=_A(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(a)-1)))u=f;else if(h||!p.type.isTextblock)break}for(let f=n.openStart;f>=0;f--){let p=(f+u+1)%(n.openStart+1),h=c[p];if(h)for(let m=0;m=0&&(e.replace(t,r,n),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),r=i.after(p))}}function nE(e,t,r,n,o){if(tn){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(R.empty,!0))}return e}function NA(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let o=eE(e.doc,t,n.type);o!=null&&(t=r=o)}e.replaceRange(t,r,new W(R.from(n),0,0))}function RA(e,t,r){let n=e.doc.resolve(t),o=e.doc.resolve(r),i=oE(n,o);for(let s=0;s0&&(l||n.node(a-1).canReplace(n.index(a-1),o.indexAfter(a-1))))return e.delete(n.before(a),o.after(a))}for(let s=1;s<=n.depth&&s<=o.depth;s++)if(t-n.start(s)==n.depth-s&&r>n.end(s)&&o.end(s)-r!=o.depth-s)return e.delete(n.before(s),r);e.delete(t,r)}function oE(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let o=n;o>=0;o--){let i=e.start(o);if(it.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)&&r.push(o)}return r}class ol extends Rt{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return vt.fail("No node at attribute step's position");let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let o=r.type.create(n,null,r.marks);return vt.fromReplace(t,this.pos,this.pos+1,new W(R.from(o),0,r.isLeaf?0:1))}getMap(){return Zr.empty}invert(t){return new ol(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new ol(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ol(r.pos,r.attr,r.value)}}Rt.jsonID("attr",ol);class Mu extends Rt{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return vt.ok(n)}getMap(){return Zr.empty}invert(t){return new Mu(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Mu(r.attr,r.value)}}Rt.jsonID("docAttr",Mu);let xl=class extends Error{};xl=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};xl.prototype=Object.create(Error.prototype);xl.prototype.constructor=xl;xl.prototype.name="TransformError";class PA{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new rl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new xl(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=W.empty){let o=pv(this.doc,t,r,n);return o&&this.step(o),this}replaceWith(t,r,n){return this.replace(t,r,new W(R.from(n),0,0))}delete(t,r){return this.replace(t,r,W.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return AA(this,t,r,n),this}replaceRangeWith(t,r,n){return NA(this,t,r,n),this}deleteRange(t,r){return RA(this,t,r),this}lift(t,r){return gA(this,t,r),this}join(t,r=1){return CA(this,t,r),this}wrap(t,r){return bA(this,t,r),this}setBlockType(t,r=t,n,o=null){return kA(this,t,r,n,o),this}setNodeMarkup(t,r,n=null,o){return wA(this,t,r,n,o),this}setNodeAttribute(t,r,n){return this.step(new ol(t,r,n)),this}setDocAttribute(t,r){return this.step(new Mu(t,r)),this}addNodeMark(t,r){return this.step(new Oi(t,r)),this}removeNodeMark(t,r){if(!(r instanceof Te)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new kl(t,r)),this}split(t,r=1,n){return SA(this,t,r,n),this}addMark(t,r,n){return fA(this,t,r,n),this}removeMark(t,r,n){return pA(this,t,r,n),this}clearIncompatible(t,r,n){return hA(this,t,r,n),this}}const Qm=Object.create(null);class be{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new zA(t.min(r),t.max(r))]}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 r=0;r=0;i--){let s=r<0?Pa(t.node(0),t.node(i),t.before(i+1),t.index(i),r,n):Pa(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,r,n);if(s)return s}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new vr(t.node(0))}static atStart(t){return Pa(t,t,0,0,1)||new vr(t)}static atEnd(t){return Pa(t,t,t.content.size,t.childCount,-1)||new vr(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Qm[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in Qm)throw new RangeError("Duplicate use of selection JSON ID "+t);return Qm[t]=r,r.prototype.jsonID=t,r}getBookmark(){return le.between(this.$anchor,this.$head).getBookmark()}}be.prototype.visible=!0;class zA{constructor(t,r){this.$from=t,this.$to=r}}let Wk=!1;function Kk(e){!Wk&&!e.parent.inlineContent&&(Wk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class le extends be{constructor(t,r=t){Kk(t),Kk(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return be.near(n);let o=t.resolve(r.map(this.anchor));return new le(o.parent.inlineContent?o:n,n)}replace(t,r=W.empty){if(super.replace(t,r),r==W.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof le&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new kh(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new le(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let o=t.resolve(r);return new this(o,n==r?o:t.resolve(n))}static between(t,r,n){let o=t.pos-r.pos;if((!n||o)&&(n=o>=0?1:-1),!r.parent.inlineContent){let i=be.findFrom(r,n,!0)||be.findFrom(r,-n,!0);if(i)r=i.$head;else return be.near(r,n)}return t.parent.inlineContent||(o==0?t=r:(t=(be.findFrom(t,-n,!0)||be.findFrom(t,n,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&ce.isSelectable(a))return ce.create(e,r-(o<0?a.nodeSize:0))}else{let l=Pa(e,a,r+o,o<0?a.childCount:0,o,i);if(l)return l}r+=a.nodeSize*o}return null}function qk(e,t,r){let n=e.steps.length-1;if(n{s==null&&(s=u)}),e.setSelection(be.near(e.doc.resolve(s),r))}const Gk=1,Kd=2,Yk=4;class IA extends PA{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.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Kd,this}ensureMarks(t){return Te.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&Kd)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~Kd,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Te.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let o=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let i=this.storedMarks;if(!i){let s=this.doc.resolve(r);i=n==r?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,o.text(t,i)),this.selection.empty||this.setSelection(be.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,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|=Yk,this}get scrolledIntoView(){return(this.updated&Yk)>0}}function Jk(e,t){return!t||!e?e:e.bind(t)}class Mc{constructor(t,r,n){this.name=t,this.init=Jk(r.init,n),this.apply=Jk(r.apply,n)}}const DA=[new Mc("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Mc("selection",{init(e,t){return e.selection||be.atStart(t.doc)},apply(e){return e.selection}}),new Mc("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new Mc("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Zm{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=DA.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Mc(n.key,n.spec.state,n))})}}class Ps{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,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[n],i=o.spec.state;i&&i.toJSON&&(r[n]=i.toJSON.call(o,this[o.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Zm(t.schema,t.plugins),i=new Ps(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Pi.fromJSON(t.schema,r.doc);else if(s.name=="selection")i.selection=be.fromJSON(i.doc,r.selection);else if(s.name=="storedMarks")r.storedMarks&&(i.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){i[s.name]=c.fromJSON.call(l,t,r[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function iE(e,t,r){for(let n in e){let o=e[n];o instanceof Function?o=o.bind(t):n=="handleDOMEvents"&&(o=iE(o,t,{})),r[n]=o}return r}class Mo{constructor(t){this.spec=t,this.props={},t.props&&iE(t.props,this,this.props),this.key=t.key?t.key.key:sE("plugin")}getState(t){return t[this.key]}}const eg=Object.create(null);function sE(e){return e in eg?e+"$"+ ++eg[e]:(eg[e]=0,e+"$")}class pa{constructor(t="key"){this.key=sE(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var $A=/[A-Z]/g,HA=/^ms-/,tg={};function BA(e){return"-"+e.toLowerCase()}function FA(e){if(tg.hasOwnProperty(e))return tg[e];var t=e.replace($A,BA);return tg[e]=HA.test(t)?"-"+t:t}function VA(e){return FA(e)}function jA(e,t){return VA(e)+":"+t}function UA(e){var t="";for(var r in e){var n=e[r];typeof n!="string"&&typeof n!="number"||(t&&(t+=";"),t+=jA(r,n))}return t}function WA(){return typeof document<"u"?document:null}var aE=WA;function lE(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;n.forEach(function(l){var c=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),u=[];function d(f,p,h){var m=r.push(f.slice(l[0].length,-l[1].length))-1;return u.push(m),o+m+o}r.forEach(function(f,p){for(var h,m=0;f!=h;)if(h=f,f=f.replace(c,d),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[p]=f}),u=u.reverse(),r=r.map(function(f){return u.forEach(function(p){f=f.replace(new RegExp("(\\"+o+p+"\\"+o+")","g"),l[0]+"$1"+l[1])}),f})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function a(l,c,u){for(var d=[],f,p=0;f=s.exec(l);){if(p++>1e4)throw Error("Circular references in parenthesis");d.push(l.slice(0,f.index)),d.push(a(c[f[1]],c)),l=l.slice(f.index+f[0].length)}return d.push(l),d}return i?r:a(r[0],r)}function cE(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],o;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;n!=o;){if(s++>1e4)throw Error("Circular references in "+e);o=n,n=n.replace(i,a)}return n}return e.reduce(function l(c,u){return Array.isArray(u)&&(u=u.reduce(l,"")),c+u},"");function a(l,c){if(e[c]==null)throw Error("Reference "+c+"is undefined");return e[c]}}function uE(e,t){return Array.isArray(e)?cE(e,t):lE(e,t)}uE.parse=lE;uE.stringify=cE;const KA={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},qA={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},GA={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},YA={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},JA={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},XA={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},QA={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},ZA={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var Gi=Object.freeze({__proto__:null,COPY_DESCRIPTION:qA,COPY_LABEL:KA,CUT_DESCRIPTION:YA,CUT_LABEL:GA,PASTE_DESCRIPTION:XA,PASTE_LABEL:JA,SELECT_ALL_DESCRIPTION:ZA,SELECT_ALL_LABEL:QA});const eN={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},tN={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},rN={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},nN={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},oN={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},iN={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},sN={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},aN={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},lN={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},cN={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},uN={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},dN={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},fN={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},pN={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},hN={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},mN={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},gN={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},vN={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},yN={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var Mt=Object.freeze({__proto__:null,ALT_KEY:iN,ARROW_DOWN_KEY:yN,ARROW_LEFT_KEY:mN,ARROW_RIGHT_KEY:gN,ARROW_UP_KEY:vN,BACKSPACE_KEY:aN,CAPS_LOCK_KEY:sN,COMMAND_KEY:tN,CONTROL_KEY:rN,DELETE_KEY:uN,END_KEY:hN,ENTER_KEY:nN,ESCAPE_KEY:eN,HOME_KEY:pN,PAGE_DOWN_KEY:fN,PAGE_UP_KEY:dN,SHIFT_KEY:oN,SPACE_KEY:cN,TAB_KEY:lN});const bN={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},kN={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var Xk=Object.freeze({__proto__:null,DESCRIPTION:kN,LABEL:bN});const xN={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},wN={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var Qk=Object.freeze({__proto__:null,DESCRIPTION:wN,LABEL:xN});const SN={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},EN={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var CN=Object.freeze({__proto__:null,DESCRIPTION:EN,LABEL:SN});const MN={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},TN={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var ON=Object.freeze({__proto__:null,DESCRIPTION:TN,LABEL:MN});const _N={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} +`:"";return`${n}${o}For more information visit ${nE}#${e.toLowerCase()}`}var oE=class extends BS.BaseError{constructor({code:e,message:t,disableLogging:r=!1}={}){const n=yA(e)?e:H.CUSTOM;super(bA(n,t)),this.errorCode=n,this.url=`${nE}#${n.toLowerCase()}`,r||console.error(this.message)}static create(e={}){return new oE(e)}};function re(e,t){if(!e)throw oE.create(t)}function Ih(e){if(typeof e!="object"||e===null)return e;const t=Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Module"?e.default??e:e;return t&&typeof e=="object"&&"__esModule"in t&&t.__esModule&&t.default!==void 0?t.default:t}function Bs(e,t={}){return e}function Xt(e){this.content=e}Xt.prototype={constructor:Xt,find:function(e){for(var t=0;t>1}};Xt.from=function(e){if(e instanceof Xt)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new Xt(t)};function iE(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let o=e.child(n),i=t.child(n);if(o==i){r+=o.nodeSize;continue}if(!o.sameMarkup(i))return r;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)r++;return r}if(o.content.size||i.content.size){let s=iE(o.content,i.content,r+1);if(s!=null)return s}r+=o.nodeSize}}function sE(e,t,r,n){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:r,b:n};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){r-=l,n-=l;continue}if(!s.sameMarkup(a))return{a:r,b:n};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&n(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,r-u),n,o+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,o){let i="",s=!0;return this.nodesBetween(t,r,(a,l)=>{a.isText?(i+=a.text.slice(Math.max(t,l)-l,r-l),s=!n):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!n):!s&&a.isBlock&&(i+=n,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,o=this.content.slice(),i=0;for(r.isText&&r.sameMarkup(n)&&(o[o.length-1]=r.withText(r.text+n.text),i=1);it)for(let i=0,s=0;st&&((sr)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,r-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,r-s-1))),n.push(a),o+=a.nodeSize),s=l}return new N(n,o)}cutByIndex(t,r){return t==r?N.empty:t==0&&r==this.content.length?this:new N(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let o=this.content.slice(),i=this.size+r.nodeSize-n.nodeSize;return o[t]=r,new N(o,i)}addToStart(t){return new N([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new N(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,o=0;;n++){let i=this.child(n),s=o+i.nodeSize;if(s>=t)return s==t||r>0?rf(n+1,s):rf(n,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return N.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return N.empty;let r,n=0;for(let o=0;othis.type.rank&&(r||(r=t.slice(0,o)),r.push(this),n=!0),r&&r.push(i)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-o.type.rank),r}}_e.none=[];class bp extends Error{}class W{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=lE(this.content,t+this.openStart,r);return n&&new W(n,this.openStart,this.openEnd)}removeBetween(t,r){return new W(aE(this.content,t+this.openStart,r+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,r){if(!r)return W.empty;let n=r.openStart||0,o=r.openEnd||0;if(typeof n!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(N.fromJSON(t,r.content),n,o)}static maxOpen(t,r=!0){let n=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=t.lastChild;i&&!i.isLeaf&&(r||!i.type.spec.isolating);i=i.lastChild)o++;return new W(t,n,o)}}W.empty=new W(N.empty,0,0);function aE(e,t,r){let{index:n,offset:o}=e.findIndex(t),i=e.maybeChild(n),{index:s,offset:a}=e.findIndex(r);if(o==t||i.isText){if(a!=r&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(n,i.copy(aE(i.content,t-o-1,r-o-1)))}function lE(e,t,r,n){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return n&&!n.canReplace(o,o,r)?null:e.cut(0,t).append(r).append(e.cut(t));let a=lE(s.content,t-i-1,r);return a&&e.replaceChild(o,s.copy(a))}function kA(e,t,r){if(r.openStart>e.depth)throw new bp("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new bp("Inconsistent open depths");return cE(e,t,r,0)}function cE(e,t,r,n){let o=e.index(n),i=e.node(n);if(o==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function hu(e,t,r,n){let o=(t||e).node(r),i=0,s=t?t.index(r):o.childCount;e&&(i=e.index(r),e.depth>r?i++:e.textOffset&&(Ys(e.nodeAfter,n),i++));for(let a=i;ao&&_1(e,t,o+1),s=n.depth>o&&_1(r,n,o+1),a=[];return hu(null,e,o,a),i&&s&&t.index(o)==r.index(o)?(uE(i,s),Ys(Xs(i,dE(e,t,r,n,o+1)),a)):(i&&Ys(Xs(i,kp(e,t,o+1)),a),hu(t,r,o,a),s&&Ys(Xs(s,kp(r,n,o+1)),a)),hu(n,null,o,a),new N(a)}function kp(e,t,r){let n=[];if(hu(null,e,r,n),e.depth>r){let o=_1(e,t,r+1);Ys(Xs(o,kp(e,t,r+1)),n)}return hu(t,null,r,n),new N(n)}function xA(e,t){let r=t.depth-e.openStart,o=t.node(r).copy(e.content);for(let i=r-1;i>=0;i--)o=t.node(i).copy(N.from(o));return{start:o.resolveNoCache(e.openStart+r),end:o.resolveNoCache(o.content.size-e.openEnd-r)}}class _l{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.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,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],o=t.child(r);return n?t.child(r).cut(n):o}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],o=r==0?0:this.path[r*3-1]+1;for(let i=0;i0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new na(this,t,n);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=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],o=0,i=r;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(n.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new _l(r,n,i)}static resolveCached(t,r){for(let o=0;ot&&this.nodesBetween(t,r,i=>(n.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()+")"),fE(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=N.empty,o=0,i=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,o,i),a=s&&s.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=o;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r 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(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let o=N.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,o,n)}};Fi.prototype.text=void 0;class xp extends Fi{constructor(t,r,n,o){if(super(t,r,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new xp(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new xp(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function fE(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class oa{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new EA(t,r);if(n.next==null)return oa.empty;let o=pE(n);n.next&&n.err("Unexpected trailing text");let i=RA(AA(o));return NA(i,n),i}matchType(t){for(let r=0;rc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let o=0;o{let i=o+(n.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(n.next[s].next);return i}).join(` +`)}}oa.empty=new oa(!0);class EA{constructor(t,r){this.string=t,this.nodeTypes=r,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 pE(e){let t=[];do t.push(CA(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function CA(e){let t=[];do t.push(MA(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function MA(e){let t=_A(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=TA(e,t);else break;return t}function ox(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function TA(e,t){let r=ox(e),n=r;return e.eat(",")&&(e.next!="}"?n=ox(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function OA(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let o=[];for(let i in r){let s=r[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function _A(e){if(e.eat("(")){let t=pE(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=OA(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function AA(e){let t=[[]];return o(i(e,0),r()),t;function r(){return t.push([])-1}function n(s,a,l){let c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=r())}else if(s.type=="star"){let l=r();return n(a,l),o(i(s.expr,l),l),[n(l)]}else if(s.type=="plus"){let l=r();return o(i(s.expr,a),l),o(i(s.expr,l),l),[n(l)]}else{if(s.type=="opt")return[n(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[n.join(",")]=new oa(n.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[i]=new yE(i,r,s));let o=r.spec.topNode||"doc";if(!n[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class PA{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Rd{constructor(t,r,n,o){this.name=t,this.rank=r,this.schema=n,this.spec=o,this.attrs=vE(o.attrs),this.excluded=null;let i=mE(this.attrs);this.instance=i?new _e(this,i):null}create(t=null){return!t&&this.instance?this.instance:new _e(this,gE(this.attrs,t))}static compile(t,r){let n=Object.create(null),o=0;return t.forEach((i,s)=>n[i]=new Rd(i,o++,r,s)),n}removeFromSet(t){for(var r=0;r-1}}let zA=class{constructor(t){this.cached=Object.create(null);let r=this.spec={};for(let o in t)r[o]=t[o];r.nodes=Xt.from(t.nodes),r.marks=Xt.from(t.marks||{}),this.nodes=R1.compile(this.spec.nodes,this),this.marks=Rd.compile(this.spec.marks,this);let n=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],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=oa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?sx(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:sx(this,s.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,r=null,n,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof R1){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(r,n,o)}text(t,r){let n=this.nodes.text;return new xp(n,n.defaultAttrs,t,_e.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return Fi.fromJSON(this,t)}markFromJSON(t){return _e.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}};function sx(e,t){let r=[];for(let n=0;n-1)&&r.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}let Rv=class N1{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let o=t.nodes[n.node];return o.contentMatch.matchType(o)})}parse(t,r={}){let n=new lx(this,r,!1);return n.addAll(t,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new lx(this,r,!0);return n.addAll(t,r.from,r.to),W.maxOpen(n.finish())}matchTag(t,r,n){for(let o=n?this.tags.indexOf(n)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(s.getAttrs){let l=s.getAttrs(r);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let r=[];function n(o){let i=o.priority==null?50:o.priority,s=0;for(;s{n(s=cx(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{n(s=cx(s)),s.node||s.ignore||s.mark||(s.node=o)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new N1(t,N1.schemaRules(t)))}};const bE={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},LA={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},kE={ol:!0,ul:!0},wp=1,Sp=2,mu=4;function ax(e,t,r){return t!=null?(t?wp:0)|(t==="full"?Sp:0):e&&e.whitespace=="pre"?wp|Sp:r&~mu}class nf{constructor(t,r,n,o,i,s,a){this.type=t,this.attrs=r,this.marks=n,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=_e.none,this.stashMarks=[],this.match=s||(a&mu?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(N.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,o;return(o=n.findWrapping(t.type))?(this.match=n,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&wp)){let n=this.content[this.content.length-1],o;if(n&&n.isText&&(o=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;n.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 r=N.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,n=this.pendingMarks;rthis.addAll(t)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` +`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let r=_e.none,n=_e.none;for(let o=0;o{s.clearMark(a)&&(n=a.addToSet(n))}):r=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(r),s.consuming===!1)i=s;else break}return[r,n]}addElementByRule(t,r,n){let o,i,s;r.node?(i=this.parser.schema.nodes[r.node],i.isLeaf?this.insertNode(i.create(r.attrs))||this.leafFallback(t):o=this.enter(i,r.attrs||null,r.preserveWhitespace)):(s=this.parser.schema.marks[r.mark].create(r.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,r,n){let o=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=n==null?null:t.childNodes[n];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let r,n;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!r||r.length>s.length)&&(r=s,n=i,!s.length)||i.solid)break}if(!r)return!1;this.sync(n);for(let o=0;othis.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].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 r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let o=n.length-1;o>=0;o--)t+=n[o].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,o=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let c=r[a];if(c==""){if(a==r.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:n&&l>=i?n.node(l-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}addPendingMark(t){let r=BA(t,this.top.pendingMarks);r&&this.top.stashMarks.push(r),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,r){for(let n=this.open;n>=0;n--){let o=this.nodes[n];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==r)break}}}function IA(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&kE.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function DA(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function $A(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r,n=[];for(;r=t.exec(e);)n.push(r[1],r[2].trim());return n}function cx(e){let t={};for(let r in e)t[r]=e[r];return t}function HA(e,t){let r=t.schema.nodes;for(let n in r){let o=r[n];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,r);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,r,n={}){let o=this.marks[t.type.name];return o&&cn.renderSpec(pg(n),o(t,r))}static renderSpec(t,r,n=null){if(typeof r=="string")return{dom:t.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let o=r[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,a=n?t.createElementNS(n,o):t.createElement(o),l=r[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=cn.renderSpec(t,d,n);if(a.appendChild(f),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new cn(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=ux(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return ux(t.marks)}}function ux(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function pg(e){return e.document||window.document}const xE=65535,wE=Math.pow(2,16);function FA(e,t){return e+t*wE}function dx(e){return e&xE}function VA(e){return(e-(e&xE))/wE}const SE=1,EE=2,Df=4,CE=8;class P1{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&CE)>0}get deletedBefore(){return(this.delInfo&(SE|Df))>0}get deletedAfter(){return(this.delInfo&(EE|Df))>0}get deletedAcross(){return(this.delInfo&Df)>0}}class sn{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&sn.empty)return sn.empty}recover(t){let r=0,n=dx(t);if(!this.inverted)for(let o=0;ot)break;let c=this.ranges[a+i],u=this.ranges[a+s],d=l+c;if(t<=d){let f=c?t==l?-1:t==d?1:r:r,p=l+o+(f<0?0:u);if(n)return p;let h=t==(r<0?l:d)?null:FA(a/3,t-l),m=t==l?EE:t==d?SE:Df;return(r<0?t!=l:t!=d)&&(m|=CE),new P1(p,m,h)}o+=u-c}return n?t+o:new P1(t+o,0,null)}touches(t,r){let n=0,o=dx(r),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;n+=this.ranges[a+s]-c}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let o=0,i=0;o=0;r--){let o=t.getMirror(r);this.appendMap(t.maps[r].invert(),o!=null&&o>r?n-o-1:void 0)}}invert(){let t=new fl;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ni&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),r.openStart,r.openEnd);return wt.fromReplace(t,this.from,this.to,i)}invert(){return new to(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Go(r.pos,n.pos,this.mark)}merge(t){return t instanceof Go&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Go(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Go(r.from,r.to,t.markFromJSON(r.mark))}}Dt.jsonID("addMark",Go);class to extends Dt{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new W(Nv(r.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),r.openStart,r.openEnd);return wt.fromReplace(t,this.from,this.to,n)}invert(){return new Go(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new to(r.pos,n.pos,this.mark)}merge(t){return t instanceof to&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new to(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new to(r.from,r.to,t.markFromJSON(r.mark))}}Dt.jsonID("removeMark",to);class Ii extends Dt{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return wt.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return wt.fromReplace(t,this.pos,this.pos+1,new W(N.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let o=0;on.pos?null:new St(r.pos,n.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,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new St(r.from,r.to,r.gapFrom,r.gapTo,W.fromJSON(t,r.slice),r.insert,!!r.structure)}}Dt.jsonID("replaceAround",St);function z1(e,t,r){let n=e.resolve(t),o=r-t,i=n.depth;for(;o>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,o--;if(o>0){let s=n.node(i).maybeChild(n.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function jA(e,t,r,n){let o=[],i=[],s,a;e.doc.nodesBetween(t,r,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!n.isInSet(d)&&u.type.allowsMarkType(n.type)){let f=Math.max(c,t),p=Math.min(c+l.nodeSize,r),h=n.addToSet(d);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function UA(e,t,r,n){let o=[],i=0;e.doc.nodesBetween(t,r,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(n instanceof Rd){let c=s.marks,u;for(;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(s.marks)&&(l=[n]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,r);for(let u=0;ue.step(new to(s.from,s.to,s.style)))}function WA(e,t,r,n=r.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function KA(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function nc(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let o=e.$from.node(n),i=e.$from.index(n),s=e.$to.indexAfter(n);if(nr;h--)m||n.index(h)>0?(m=!0,u=N.from(n.node(h).copy(u)),d++):l--;let f=N.empty,p=0;for(let h=i,m=!1;h>r;h--)m||o.after(h+1)=0;s--){if(n.size){let a=r[s].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=N.from(r[s].type.create(r[s].attrs,n))}let o=t.start,i=t.end;e.step(new St(o,i,o,i,new W(n,0,0),r.length,!0))}function JA(e,t,r,n,o){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,r,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(n,o)&&QA(e.doc,e.mapping.slice(i).map(a),n)){e.clearIncompatible(e.mapping.slice(i).map(a,1),n);let l=e.mapping.slice(i),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return e.step(new St(c,u,c+1,u-1,new W(N.from(n.create(o,null,s.marks)),0,0),1,!0)),!1}})}function QA(e,t,r){let n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}function ZA(e,t,r,n,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");r||(r=i.type);let s=r.create(n,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!r.validContent(i.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new St(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new W(N.from(s),0,0),1,!0))}function pl(e,t,r=1,n){let o=e.resolve(t),i=o.depth-r,s=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=r-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=n&&n[u+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=n&&n[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=o.indexAfter(i),l=n&&n[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function eR(e,t,r=1,n){let o=e.doc.resolve(t),i=N.empty,s=N.empty;for(let a=o.depth,l=o.depth-r,c=r-1;a>l;a--,c--){i=N.from(o.node(a).copy(i));let u=n&&n[c];s=N.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}e.step(new Vt(t,t,new W(i.append(s),r,r),!0))}function Nd(e,t){let r=e.resolve(t),n=r.index();return tR(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function tR(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function rR(e,t,r){let n=new Vt(t-r,t+r,W.empty,!0);e.step(n)}function ME(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let o=n.depth-1;o>=0;o--){let i=n.index(o);if(n.node(o).canReplaceWith(i,i,r))return n.before(o+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(let o=n.depth-1;o>=0;o--){let i=n.indexAfter(o);if(n.node(o).canReplaceWith(i,i,r))return n.after(o+1);if(i=0;s--){let a=s==n.depth?0:n.pos<=(n.start(s+1)+n.end(s+1))/2?-1:1,l=n.index(s)+(a>0?1:0),c=n.node(s),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 a==0?n.pos:a<0?n.before(s+1):n.after(s+1)}return null}function zv(e,t,r=t,n=W.empty){if(t==r&&!n.size)return null;let o=e.resolve(t),i=e.resolve(r);return TE(o,i,n)?new Vt(t,r,n):new oR(o,i,n).fit()}function TE(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class oR{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=N.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=N.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(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new W(i,s,a);return t>-1?new St(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new Vt(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,o=this.unplaced.openEnd;n1&&(o=0),i.type.spec.isolating&&o<=n){t=n;break}r=i.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let o,i=null;n?(i=mg(this.unplaced.content,n-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(r==1&&(s?c.matchType(s.type)||(d=c.fillBefore(N.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:a,parent:i,inject:d};if(r==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=mg(t,r);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new W(t,r+1,Math.max(n,o.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,o=mg(t,r);if(o.childCount<=1&&r>0){let i=t.size-r<=r+o.size;this.unplaced=new W(Pc(t,r-1,1),r-1,i?r-1:n)}else this.unplaced=new W(Pc(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:o,wrap:i}){for(;this.depth>r;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(d=b,u.push(OE(m.mark(f.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let h=c==a.childCount;h||(p=-1),this.placed=zc(this.placed,r,N.from(u)),this.frontier[r].match=d,h&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--n);)++o;return o}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:o}=this.frontier[r],i=r=0;a--){let{match:l,type:c}=this.frontier[a],u=gg(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:r,fit:s,move:i?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=zc(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let o=t.node(n),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(n));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,r=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=zc(this.placed,this.depth,N.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(N.empty,!0);r.childCount&&(this.placed=zc(this.placed,this.frontier.length,r))}}function Pc(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(Pc(e.firstChild.content,t-1,r)))}function zc(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(zc(e.lastChild.content,t-1,r)))}function mg(e,t){for(let r=0;r1&&(n=n.replaceChild(0,OE(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(N.empty,!0)))),e.copy(n)}function gg(e,t,r,n,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!r.compatibleContent(i.type))return null;let a=n.fillBefore(i.content,!0,s);return a&&!iR(r,i.content,s)?a:null}function iR(e,t,r){for(let n=r;n0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:o.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),c=[],u=n.openStart;for(let f=n.content,p=0;;p++){let h=f.firstChild;if(c.push(h),p==n.openStart)break;f=h.content}for(let f=u-1;f>=0;f--){let p=c[f],h=sR(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(a)-1)))u=f;else if(h||!p.type.isTextblock)break}for(let f=n.openStart;f>=0;f--){let p=(f+u+1)%(n.openStart+1),h=c[p];if(h)for(let m=0;m=0&&(e.replace(t,r,n),!(e.steps.length>d));f--){let p=s[f];p<0||(t=o.before(p),r=i.after(p))}}function _E(e,t,r,n,o){if(tn){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(N.empty,!0))}return e}function lR(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let o=ME(e.doc,t,n.type);o!=null&&(t=r=o)}e.replaceRange(t,r,new W(N.from(n),0,0))}function cR(e,t,r){let n=e.doc.resolve(t),o=e.doc.resolve(r),i=AE(n,o);for(let s=0;s0&&(l||n.node(a-1).canReplace(n.index(a-1),o.indexAfter(a-1))))return e.delete(n.before(a),o.after(a))}for(let s=1;s<=n.depth&&s<=o.depth;s++)if(t-n.start(s)==n.depth-s&&r>n.end(s)&&o.end(s)-r!=o.depth-s)return e.delete(n.before(s),r);e.delete(t,r)}function AE(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let o=n;o>=0;o--){let i=e.start(o);if(it.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)&&r.push(o)}return r}class hl extends Dt{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return wt.fail("No node at attribute step's position");let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let o=r.type.create(n,null,r.marks);return wt.fromReplace(t,this.pos,this.pos+1,new W(N.from(o),0,r.isLeaf?0:1))}getMap(){return sn.empty}invert(t){return new hl(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new hl(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new hl(r.pos,r.attr,r.value)}}Dt.jsonID("attr",hl);class Iu extends Dt{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return wt.ok(n)}getMap(){return sn.empty}invert(t){return new Iu(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Iu(r.attr,r.value)}}Dt.jsonID("docAttr",Iu);let Rl=class extends Error{};Rl=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};Rl.prototype=Object.create(Error.prototype);Rl.prototype.constructor=Rl;Rl.prototype.name="TransformError";class uR{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new fl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new Rl(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=W.empty){let o=zv(this.doc,t,r,n);return o&&this.step(o),this}replaceWith(t,r,n){return this.replace(t,r,new W(N.from(n),0,0))}delete(t,r){return this.replace(t,r,W.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return aR(this,t,r,n),this}replaceRangeWith(t,r,n){return lR(this,t,r,n),this}deleteRange(t,r){return cR(this,t,r),this}lift(t,r){return qA(this,t,r),this}join(t,r=1){return rR(this,t,r),this}wrap(t,r){return XA(this,t,r),this}setBlockType(t,r=t,n,o=null){return JA(this,t,r,n,o),this}setNodeMarkup(t,r,n=null,o){return ZA(this,t,r,n,o),this}setNodeAttribute(t,r,n){return this.step(new hl(t,r,n)),this}setDocAttribute(t,r){return this.step(new Iu(t,r)),this}addNodeMark(t,r){return this.step(new Ii(t,r)),this}removeNodeMark(t,r){if(!(r instanceof _e)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new Al(t,r)),this}split(t,r=1,n){return eR(this,t,r,n),this}addMark(t,r,n){return jA(this,t,r,n),this}removeMark(t,r,n){return UA(this,t,r,n),this}clearIncompatible(t,r,n){return WA(this,t,r,n),this}}const vg=Object.create(null);class xe{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new dR(t.min(r),t.max(r))]}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 r=0;r=0;i--){let s=r<0?ja(t.node(0),t.node(i),t.before(i+1),t.index(i),r,n):ja(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,r,n);if(s)return s}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new wr(t.node(0))}static atStart(t){return ja(t,t,0,0,1)||new wr(t)}static atEnd(t){return ja(t,t,t.content.size,t.childCount,-1)||new wr(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=vg[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in vg)throw new RangeError("Duplicate use of selection JSON ID "+t);return vg[t]=r,r.prototype.jsonID=t,r}getBookmark(){return ue.between(this.$anchor,this.$head).getBookmark()}}xe.prototype.visible=!0;class dR{constructor(t,r){this.$from=t,this.$to=r}}let px=!1;function hx(e){!px&&!e.parent.inlineContent&&(px=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ue extends xe{constructor(t,r=t){hx(t),hx(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return xe.near(n);let o=t.resolve(r.map(this.anchor));return new ue(o.parent.inlineContent?o:n,n)}replace(t,r=W.empty){if(super.replace(t,r),r==W.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof ue&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Dh(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ue(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let o=t.resolve(r);return new this(o,n==r?o:t.resolve(n))}static between(t,r,n){let o=t.pos-r.pos;if((!n||o)&&(n=o>=0?1:-1),!r.parent.inlineContent){let i=xe.findFrom(r,n,!0)||xe.findFrom(r,-n,!0);if(i)r=i.$head;else return xe.near(r,n)}return t.parent.inlineContent||(o==0?t=r:(t=(xe.findFrom(t,-n,!0)||xe.findFrom(t,n,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&de.isSelectable(a))return de.create(e,r-(o<0?a.nodeSize:0))}else{let l=ja(e,a,r+o,o<0?a.childCount:0,o,i);if(l)return l}r+=a.nodeSize*o}return null}function mx(e,t,r){let n=e.steps.length-1;if(n{s==null&&(s=u)}),e.setSelection(xe.near(e.doc.resolve(s),r))}const gx=1,of=2,vx=4;class pR extends uR{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.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=of,this}ensureMarks(t){return _e.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&of)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~of,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||_e.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let o=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let i=this.storedMarks;if(!i){let s=this.doc.resolve(r);i=n==r?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,o.text(t,i)),this.selection.empty||this.setSelection(xe.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,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|=vx,this}get scrolledIntoView(){return(this.updated&vx)>0}}function yx(e,t){return!t||!e?e:e.bind(t)}class Lc{constructor(t,r,n){this.name=t,this.init=yx(r.init,n),this.apply=yx(r.apply,n)}}const hR=[new Lc("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Lc("selection",{init(e,t){return e.selection||xe.atStart(t.doc)},apply(e){return e.selection}}),new Lc("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new Lc("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class yg{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=hR.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Lc(n.key,n.spec.state,n))})}}class Fs{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,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[n],i=o.spec.state;i&&i.toJSON&&(r[n]=i.toJSON.call(o,this[o.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new yg(t.schema,t.plugins),i=new Fs(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Fi.fromJSON(t.schema,r.doc);else if(s.name=="selection")i.selection=xe.fromJSON(i.doc,r.selection);else if(s.name=="storedMarks")r.storedMarks&&(i.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){i[s.name]=c.fromJSON.call(l,t,r[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function RE(e,t,r){for(let n in e){let o=e[n];o instanceof Function?o=o.bind(t):n=="handleDOMEvents"&&(o=RE(o,t,{})),r[n]=o}return r}class zo{constructor(t){this.spec=t,this.props={},t.props&&RE(t.props,this,this.props),this.key=t.key?t.key.key:NE("plugin")}getState(t){return t[this.key]}}const bg=Object.create(null);function NE(e){return e in bg?e+"$"+ ++bg[e]:(bg[e]=0,e+"$")}class wa{constructor(t="key"){this.key=NE(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var mR=/[A-Z]/g,gR=/^ms-/,kg={};function vR(e){return"-"+e.toLowerCase()}function yR(e){if(kg.hasOwnProperty(e))return kg[e];var t=e.replace(mR,vR);return kg[e]=gR.test(t)?"-"+t:t}function bR(e){return yR(e)}function kR(e,t){return bR(e)+":"+t}function xR(e){var t="";for(var r in e){var n=e[r];typeof n!="string"&&typeof n!="number"||(t&&(t+=";"),t+=kR(r,n))}return t}function wR(){return typeof document<"u"?document:null}var PE=wR;function zE(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;n.forEach(function(l){var c=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),u=[];function d(f,p,h){var m=r.push(f.slice(l[0].length,-l[1].length))-1;return u.push(m),o+m+o}r.forEach(function(f,p){for(var h,m=0;f!=h;)if(h=f,f=f.replace(c,d),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[p]=f}),u=u.reverse(),r=r.map(function(f){return u.forEach(function(p){f=f.replace(new RegExp("(\\"+o+p+"\\"+o+")","g"),l[0]+"$1"+l[1])}),f})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function a(l,c,u){for(var d=[],f,p=0;f=s.exec(l);){if(p++>1e4)throw Error("Circular references in parenthesis");d.push(l.slice(0,f.index)),d.push(a(c[f[1]],c)),l=l.slice(f.index+f[0].length)}return d.push(l),d}return i?r:a(r[0],r)}function LE(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],o;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;n!=o;){if(s++>1e4)throw Error("Circular references in "+e);o=n,n=n.replace(i,a)}return n}return e.reduce(function l(c,u){return Array.isArray(u)&&(u=u.reduce(l,"")),c+u},"");function a(l,c){if(e[c]==null)throw Error("Reference "+c+"is undefined");return e[c]}}function IE(e,t){return Array.isArray(e)?LE(e,t):zE(e,t)}IE.parse=zE;IE.stringify=LE;const SR={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},ER={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},CR={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},MR={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},TR={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},OR={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},_R={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},AR={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var rs=Object.freeze({__proto__:null,COPY_DESCRIPTION:ER,COPY_LABEL:SR,CUT_DESCRIPTION:MR,CUT_LABEL:CR,PASTE_DESCRIPTION:OR,PASTE_LABEL:TR,SELECT_ALL_DESCRIPTION:AR,SELECT_ALL_LABEL:_R});const RR={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},NR={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},PR={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},zR={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},LR={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},IR={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},DR={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},$R={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},HR={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},BR={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},FR={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},VR={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},jR={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},UR={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},WR={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},KR={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},qR={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},GR={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},YR={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var Rt=Object.freeze({__proto__:null,ALT_KEY:IR,ARROW_DOWN_KEY:YR,ARROW_LEFT_KEY:KR,ARROW_RIGHT_KEY:qR,ARROW_UP_KEY:GR,BACKSPACE_KEY:$R,CAPS_LOCK_KEY:DR,COMMAND_KEY:NR,CONTROL_KEY:PR,DELETE_KEY:FR,END_KEY:WR,ENTER_KEY:zR,ESCAPE_KEY:RR,HOME_KEY:UR,PAGE_DOWN_KEY:jR,PAGE_UP_KEY:VR,SHIFT_KEY:LR,SPACE_KEY:BR,TAB_KEY:HR});const XR={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},JR={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var bx=Object.freeze({__proto__:null,DESCRIPTION:JR,LABEL:XR});const QR={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},ZR={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var kx=Object.freeze({__proto__:null,DESCRIPTION:ZR,LABEL:QR});const eN={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},tN={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var rN=Object.freeze({__proto__:null,DESCRIPTION:tN,LABEL:eN});const nN={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},oN={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var iN=Object.freeze({__proto__:null,DESCRIPTION:oN,LABEL:nN});const sN={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} 2 {Heading 2} 3 {Heading 3} 4 {Heading 4} 5 {Heading 5} 6 {Heading 6} -other {Heading}}`,comment:"Label for heading command with support for levels."};var AN=Object.freeze({__proto__:null,LABEL:_N});const NN={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},RN={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},PN={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},zN={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var dp=Object.freeze({__proto__:null,REDO_DESCRIPTION:zN,REDO_LABEL:PN,UNDO_DESCRIPTION:RN,UNDO_LABEL:NN});const LN={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},IN={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var Zk=Object.freeze({__proto__:null,DESCRIPTION:IN,LABEL:LN});const DN={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},$N={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var ex=Object.freeze({__proto__:null,DESCRIPTION:$N,LABEL:DN});const HN={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},BN={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},FN={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var mv=Object.freeze({__proto__:null,BULLET_LIST_LABEL:BN,ORDERED_LIST_LABEL:HN,TASK_LIST_LABEL:FN});const VN={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},jN={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},UN={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},WN={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var fp=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:WN,CONVERT_LABEL:UN,INSERT_DESCRIPTION:jN,INSERT_LABEL:VN});const KN={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},qN={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var tx=Object.freeze({__proto__:null,DESCRIPTION:qN,LABEL:KN});const GN={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},YN={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var rx=Object.freeze({__proto__:null,DESCRIPTION:YN,LABEL:GN});class ha{constructor(t,r){this.match=t,this.match=t,this.handler=typeof r=="string"?JN(r):r}}function JN(e){return function(t,r,n,o){let i=e;if(r[1]){let s=r[0].lastIndexOf(r[1]);i+=r[0].slice(s+r[1].length),n+=s;let a=n-o;a>0&&(i=r[0].slice(s-a,s)+i,n=o)}return t.tr.insertText(i,n,o)}}const XN=500;function QN({rules:e}){let t=new Mo({state:{init(){return null},apply(r,n){let o=r.getMeta(this);return o||(r.selectionSet||r.docChanged?null:n)}},props:{handleTextInput(r,n,o,i){return nx(r,n,o,i,e,t)},handleDOMEvents:{compositionend:r=>{setTimeout(()=>{let{$cursor:n}=r.state.selection;n&&nx(r,n.pos,n.pos,"",e,t)})}}},isInputRules:!0});return t}function nx(e,t,r,n,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-XN),a.parentOffset,null,"")+n;for(let c=0;c{let r=e.plugins;for(let n=0;n=0;l--)s.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to);t(s)}return!0}}return!1};function xh(e,t,r=null,n){return new ha(e,(o,i,s,a)=>{let l=r instanceof Function?r(i):r,c=o.tr.delete(s,a),u=c.doc.resolve(s),d=u.blockRange(),f=d&&fv(d,t,l);if(!f)return null;c.wrap(d,f);let p=c.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&xd(c.doc,s-1)&&(!n||n(i,p))&&c.join(s-1),c})}function eR(e,t,r=null){return new ha(e,(n,o,i,s)=>{let a=n.doc.resolve(i),l=r instanceof Function?r(o):r;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?n.tr.delete(i,s).setBlockType(i,i,t,l):null})}const mr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Tu=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let ox=null;const Lo=function(e,t,r){let n=ox||(ox=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},Xs=function(e,t,r,n){return r&&(ix(e,t,r,n,-1)||ix(e,t,r,n,1))},tR=/^(img|br|input|textarea|hr)$/i;function ix(e,t,r,n,o){for(;;){if(e==r&&t==n)return!0;if(t==(o<0?0:po(e))){let i=e.parentNode;if(!i||i.nodeType!=1||gv(e)||tR.test(e.nodeName)||e.contentEditable=="false")return!1;t=mr(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?po(e):0}else return!1}}function po(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function rR(e,t,r){for(let n=t==0,o=t==po(e);n||o;){if(e==r)return!0;let i=mr(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,o=o&&i==po(e)}}function gv(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const wh=function(e){return e.focusNode&&Xs(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Ns(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function nR(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function oR(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:n.offset}}catch{}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:n.startOffset}}}const xo=typeof navigator<"u"?navigator:null,sx=typeof document<"u"?document:null,as=xo&&xo.userAgent||"",g1=/Edge\/(\d+)/.exec(as),dE=/MSIE \d/.exec(as),v1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(as),Pr=!!(dE||v1||g1),zi=dE?document.documentMode:v1?+v1[1]:g1?+g1[1]:0,Zn=!Pr&&/gecko\/(\d+)/i.test(as);Zn&&+(/Firefox\/(\d+)/.exec(as)||[0,0])[1];const y1=!Pr&&/Chrome\/(\d+)/.exec(as),cr=!!y1,iR=y1?+y1[1]:0,kr=!Pr&&!!xo&&/Apple Computer/.test(xo.vendor),wl=kr&&(/Mobile\/\w+/.test(as)||!!xo&&xo.maxTouchPoints>2),yn=wl||(xo?/Mac/.test(xo.platform):!1),sR=xo?/Win/.test(xo.platform):!1,Wn=/Android \d/.test(as),wd=!!sx&&"webkitFontSmoothing"in sx.documentElement.style,aR=wd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function lR(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _o(e,t){return typeof e=="number"?e:e[t]}function cR(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function ax(e,t,r){let n=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=r||e.dom;s;s=Tu(s)){if(s.nodeType!=1)continue;let a=s,l=a==i.body,c=l?lR(i):cR(a),u=0,d=0;if(t.topc.bottom-_o(n,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+_o(o,"top")-c.top:t.bottom-c.bottom+_o(o,"bottom")),t.leftc.right-_o(n,"right")&&(u=t.right-c.right+_o(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let h=a.scrollLeft-f,m=a.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function uR(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,o;for(let i=(t.left+t.right)/2,s=r+1;s=r-20){n=a,o=l.top;break}}return{refDOM:n,refTop:o,stack:fE(e.dom)}}function fE(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=Tu(n));return t}function dR({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;pE(r,n==0?0:n-t)}function pE(e,t){for(let r=0;r=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=u,c={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!r&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!r&&l&&(r=l,o=c,n=0),r&&r.nodeType==3?pR(r,o):!r||n&&r.nodeType==1?{node:e,offset:i}:hE(r,o)}function pR(e,t){let r=e.nodeValue.length,n=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function vv(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function hR(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(n,o,i)}function gR(e,t,r,n){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>n.left||l.top>n.top?o=a.posBefore:(l.right-1?o:e.docView.posFromDOM(t,r,-1)}function mE(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&o++}let c;wd&&o&&n.nodeType==1&&(c=n.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||n.nodeType!=1||n.childNodes[o-1].nodeName!="BR")&&(a=gR(e,n,o,t))}a==null&&(a=mR(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function lx(e){return e.top=0&&o==n.nodeValue.length?(l--,u=1):r<0?l--:c++,lc(hi(Lo(n,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(r<0||o==po(n))){let l=n.childNodes[o-1];if(l.nodeType==1)return rg(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(r<0||o==po(n))){let l=n.childNodes[o-1],c=l.nodeType==3?Lo(l,po(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return lc(hi(c,1),!1)}if(i==null&&o=0)}function lc(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function rg(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function vE(e,t,r){let n=e.state,o=e.root.activeElement;n!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),o!=e.dom&&o&&o.focus()}}function bR(e,t,r){let n=t.selection,o=r=="up"?n.$from:n.$to;return vE(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=gE(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Lo(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(r=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const kR=/[\u0590-\u08ac]/;function xR(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let o=n.parentOffset,i=!o,s=o==n.parent.content.size,a=e.domSelection();return!kR.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?i:s:vE(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",r,"character");let p=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),b})}let cx=null,ux=null,dx=!1;function wR(e,t,r){return cx==t&&ux==r?dx:(cx=t,ux=r,dx=r=="up"||r=="down"?bR(e,t,r):xR(e,t,r))}const En=0,fx=1,zs=2,wo=3;class Sd{constructor(t,r,n,o){this.parent=t,this.children=r,this.dom=n,this.contentDOM=o,this.dirty=En,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rmr(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(r==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&r==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!r||i.node))if(n&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))n=!1;else return i}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||s instanceof bE){o=t-i;break}i=a}if(o)return this.children[n].domFromPos(o-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof yE&&i.side>=0;n--);if(r<=0){let i,s=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,s=!1);return i&&r&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?mr(i.dom)+1:0}}else{let i,s=!0;for(;i=n=u&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,u);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=mr(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(c>r||a==this.children.length-1)){r=c;for(let u=a+1;up&&sr){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,o=0;o=n:tn){let a=n+i.border,l=s-i.border;if(t>=a&&r<=l){this.dirty=t==n||r==s?zs:fx,t==a&&r==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=wo:i.markDirty(t-a,r-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?zs:wo}n=s}this.dirty=zs}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?zs:fx;r.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!r.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=r,this.widget=r,i=this}matchesWidget(t){return this.dirty==En&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(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 SR extends Sd{constructor(t,r,n,o){super(t,[],r,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Qs extends Sd{constructor(t,r,n,o){super(t,[],n,o),this.mark=r}static create(t,r,n,o){let i=o.nodeViews[r.type.name],s=i&&i(r,o,n);return(!s||!s.dom)&&(s=rn.renderSpec(document,r.type.spec.toDOM(r,n))),new Qs(t,r,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&wo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=wo&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=En){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(i=x1(i,0,t,n));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},n,o),u=c&&c.dom,d=c&&c.contentDOM;if(r.isText){if(!u)u=document.createTextNode(r.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=rn.renderSpec(document,r.type.spec.toDOM(r)));!d&&!r.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),r.type.spec.draggable&&(u.draggable=!0));let f=u;return u=wE(u,n,r),c?l=new ER(t,r,n,o,u,d||null,f,c,i,s+1):r.isText?new Sh(t,r,n,o,u,f,i):new Li(t,r,n,o,u,d||null,f,i,s+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 r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>R.empty)}return t}matchesNode(t,r,n){return this.dirty==En&&t.eq(this.node)&&k1(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,o=r,i=t.composing?this.localCompositionInfo(t,r):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new MR(this,s&&s.node,t);_R(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?Te.none:this.node.child(u).marks,n,t),l.placeWidget(c,t,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,n,t);let p;l.findNodeMatch(c,u,d,f)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,p,t)||l.updateNextNode(c,u,d,t,f,o)||l.addNode(c,u,d,t,o),o+=c.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==zs)&&(s&&this.protectLocalComposition(t,s),kE(this.contentDOM,this.children,t),wl&&AR(this.dom))}localCompositionInfo(t,r){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof le)||nr+this.node.content.size)return null;let i=t.domSelectionRange(),s=NR(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=RR(this.node.content,a,n-r,o-r);return l<0?null:{node:s,pos:l,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:o}){if(this.getDesc(r))return;let i=r;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 s=new SR(this,i,r,o);t.input.compositionNodes.push(s),this.children=x1(this.children,n,n+o.length,t,s)}update(t,r,n,o){return this.dirty==wo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,o),!0)}updateInner(t,r,n,o){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=En}updateOuterDeco(t){if(k1(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=xE(this.dom,this.nodeDOM,b1(this.outerDeco,this.node,r),b1(t,this.node,r)),this.dom!=n&&(n.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 px(e,t,r,n,o){wE(n,t,e);let i=new Li(void 0,e,t,r,n,n,n,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Sh extends Li{constructor(t,r,n,o,i,s,a){super(t,r,n,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,o){return this.dirty==wo||this.dirty!=En&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=En||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=En,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let o=this.node.cut(t,r),i=document.createTextNode(o.text);return new Sh(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=wo)}get domAtom(){return!1}}class bE extends Sd{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==En&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class ER extends Li{constructor(t,r,n,o,i,s,a,l,c,u){super(t,r,n,o,i,s,a,c,u),this.spec=l}update(t,r,n,o){if(this.dirty==wo)return!1;if(this.spec.update){let i=this.spec.update(t,r,n);return i&&this.updateInner(t,r,n,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,o){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,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 kE(e,t,r){let n=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Qs.create(this.top,t[i],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,r,n,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,r,n))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let c=r.children[n-1];if(c instanceof Qs)r=c,n=c.children.length;else{a=c,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function OR(e,t){return e.type.side-t.type.side}function _R(e,t,r,n){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;ci;)a.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):a.slice();n(f,m,t.forChild(i,f),p),i=h}}function AR(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 NR(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=po(e)}else if(e.nodeType==1&&t=r){if(i>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let c=a=0&&c+t.length+a>=r)return a+c;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function x1(e,t,r,n,o){let i=[];for(let s=0,a=0;s=r||u<=t?i.push(l):(cr&&i.push(l.slice(r-c,l.size,n)))}return i}function yv(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let o=e.docView.nearestDesc(r.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(s<0)return null;let a=n.resolve(s),l,c;if(wh(r)){for(l=a;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&ce.isSelectable(u)&&o.parent&&!(u.isInline&&rR(r.focusNode,r.focusOffset,o.dom))){let d=o.posBefore;c=new ce(s==d?a:n.resolve(d))}}else{let u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null;l=n.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(r.anchorNode!=n||r.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!SE(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function zR(e){let t=e.domSelection(),r=document.createRange(),n=e.cursorWrapper.dom,o=n.nodeName=="IMG";o?r.setEnd(n.parentNode,mr(n)+1):r.setEnd(n,0),r.collapse(!1),t.removeAllRanges(),t.addRange(r),!o&&!e.state.selection.visible&&Pr&&zi<=11&&(n.disabled=!0,n.disabled=!1)}function EE(e,t){if(t instanceof ce){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(yx(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else yx(e)}function yx(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function bv(e,t,r,n){return e.someProp("createSelectionBetween",o=>o(e,t,r))||le.between(t,r,n)}function bx(e){return e.editable&&!e.hasFocus()?!1:CE(e)}function CE(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 LR(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return Xs(t.node,t.offset,r.anchorNode,r.anchorOffset)}function w1(e,t){let{$anchor:r,$head:n}=e.selection,o=t>0?r.max(n):r.min(n),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&be.findFrom(i,t)}function ki(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function kx(e,t,r){let n=e.state.selection;if(n instanceof le)if(r.indexOf("s")>-1){let{$head:o}=n,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return ki(e,new le(n.$anchor,s))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=w1(e.state,t);return o&&o instanceof ce?ki(e,o):!1}else if(!(yn&&r.indexOf("m")>-1)){let o=n.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?ce.isSelectable(i)?ki(e,new ce(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):wd?ki(e,new le(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ce&&n.node.isInline)return ki(e,new le(t>0?n.$to:n.$from));{let o=w1(e.state,t);return o?ki(e,o):!1}}}function pp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function lu(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function wa(e,t){return t<0?IR(e):DR(e)}function IR(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o,i,s=!1;for(Zn&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(lu(a,-1))o=r,i=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(ME(r))break;{let a=r.previousSibling;for(;a&&lu(a,-1);)o=r.parentNode,i=mr(a),a=a.previousSibling;if(a)r=a,n=pp(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}s?S1(e,r,n):o&&S1(e,o,i)}function DR(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o=pp(r),i,s;for(;;)if(n{e.state==o&&Ko(e)},50)}function xx(e,t){let r=e.state.doc.resolve(t);if(!(cr||sR)&&r.parent.inlineContent){let o=e.coordsAtPos(t);if(t>r.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function wx(e,t,r){let n=e.state.selection;if(n instanceof le&&!n.empty||r.indexOf("s")>-1||yn&&r.indexOf("m")>-1)return!1;let{$from:o,$to:i}=n;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=w1(e.state,t);if(s&&s instanceof ce)return ki(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=n instanceof vr?be.near(s,t):be.findFrom(s,t);return a?ki(e,a):!1}return!1}function Sx(e,t){if(!(e.state.selection instanceof le))return!0;let{$head:r,$anchor:n,empty:o}=e.state.selection;if(!r.sameParent(n))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(r.pos-i.nodeSize,r.pos):s.delete(r.pos,r.pos+i.nodeSize),e.dispatch(s),!0}return!1}function Ex(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function BR(e){if(!kr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;Ex(e,n,"true"),setTimeout(()=>Ex(e,n,"false"),20)}return!1}function FR(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function VR(e,t){let r=t.keyCode,n=FR(t);if(r==8||yn&&r==72&&n=="c")return Sx(e,-1)||wa(e,-1);if(r==46&&!t.shiftKey||yn&&r==68&&n=="c")return Sx(e,1)||wa(e,1);if(r==13||r==27)return!0;if(r==37||yn&&r==66&&n=="c"){let o=r==37?xx(e,e.state.selection.from)=="ltr"?-1:1:-1;return kx(e,o,n)||wa(e,o)}else if(r==39||yn&&r==70&&n=="c"){let o=r==39?xx(e,e.state.selection.from)=="ltr"?1:-1:1;return kx(e,o,n)||wa(e,o)}else{if(r==38||yn&&r==80&&n=="c")return wx(e,-1,n)||wa(e,-1);if(r==40||yn&&r==78&&n=="c")return BR(e)||wx(e,1,n)||wa(e,1);if(n==(yn?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function TE(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let r=[],{content:n,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&n.childCount==1&&n.firstChild.childCount==1;){o--,i--;let p=n.firstChild;r.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),n=p.content}let s=e.someProp("clipboardSerializer")||rn.fromSchema(e.state.schema),a=PE(),l=a.createElement("div");l.appendChild(s.serializeFragment(n,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=RE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let h=a.createElement(u[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(r)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` +other {Heading}}`,comment:"Label for heading command with support for levels."};var aN=Object.freeze({__proto__:null,LABEL:sN});const lN={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},cN={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},uN={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},dN={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var Ep=Object.freeze({__proto__:null,REDO_DESCRIPTION:dN,REDO_LABEL:uN,UNDO_DESCRIPTION:cN,UNDO_LABEL:lN});const fN={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},pN={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var xx=Object.freeze({__proto__:null,DESCRIPTION:pN,LABEL:fN});const hN={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},mN={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var wx=Object.freeze({__proto__:null,DESCRIPTION:mN,LABEL:hN});const gN={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},vN={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},yN={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var Iv=Object.freeze({__proto__:null,BULLET_LIST_LABEL:vN,ORDERED_LIST_LABEL:gN,TASK_LIST_LABEL:yN});const bN={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},kN={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},xN={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},wN={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var Cp=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:wN,CONVERT_LABEL:xN,INSERT_DESCRIPTION:kN,INSERT_LABEL:bN});const SN={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},EN={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var Sx=Object.freeze({__proto__:null,DESCRIPTION:EN,LABEL:SN});const CN={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},MN={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var Ex=Object.freeze({__proto__:null,DESCRIPTION:MN,LABEL:CN});class Sa{constructor(t,r){this.match=t,this.match=t,this.handler=typeof r=="string"?TN(r):r}}function TN(e){return function(t,r,n,o){let i=e;if(r[1]){let s=r[0].lastIndexOf(r[1]);i+=r[0].slice(s+r[1].length),n+=s;let a=n-o;a>0&&(i=r[0].slice(s-a,s)+i,n=o)}return t.tr.insertText(i,n,o)}}const ON=500;function _N({rules:e}){let t=new zo({state:{init(){return null},apply(r,n){let o=r.getMeta(this);return o||(r.selectionSet||r.docChanged?null:n)}},props:{handleTextInput(r,n,o,i){return Cx(r,n,o,i,e,t)},handleDOMEvents:{compositionend:r=>{setTimeout(()=>{let{$cursor:n}=r.state.selection;n&&Cx(r,n.pos,n.pos,"",e,t)})}}},isInputRules:!0});return t}function Cx(e,t,r,n,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-ON),a.parentOffset,null,"")+n;for(let c=0;c{let r=e.plugins;for(let n=0;n=0;l--)s.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to);t(s)}return!0}}return!1};function $h(e,t,r=null,n){return new Sa(e,(o,i,s,a)=>{let l=r instanceof Function?r(i):r,c=o.tr.delete(s,a),u=c.doc.resolve(s),d=u.blockRange(),f=d&&Pv(d,t,l);if(!f)return null;c.wrap(d,f);let p=c.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&Nd(c.doc,s-1)&&(!n||n(i,p))&&c.join(s-1),c})}function RN(e,t,r=null){return new Sa(e,(n,o,i,s)=>{let a=n.doc.resolve(i),l=r instanceof Function?r(o):r;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?n.tr.delete(i,s).setBlockType(i,i,t,l):null})}const kr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Du=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Mx=null;const jo=function(e,t,r){let n=Mx||(Mx=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},ia=function(e,t,r,n){return r&&(Tx(e,t,r,n,-1)||Tx(e,t,r,n,1))},NN=/^(img|br|input|textarea|hr)$/i;function Tx(e,t,r,n,o){for(;;){if(e==r&&t==n)return!0;if(t==(o<0?0:bo(e))){let i=e.parentNode;if(!i||i.nodeType!=1||Dv(e)||NN.test(e.nodeName)||e.contentEditable=="false")return!1;t=kr(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?bo(e):0}else return!1}}function bo(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function PN(e,t,r){for(let n=t==0,o=t==bo(e);n||o;){if(e==r)return!0;let i=kr(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,o=o&&i==bo(e)}}function Dv(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Hh=function(e){return e.focusNode&&ia(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Hs(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function zN(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function LN(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:n.offset}}catch{}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:n.startOffset}}}const _o=typeof navigator<"u"?navigator:null,Ox=typeof document<"u"?document:null,ms=_o&&_o.userAgent||"",L1=/Edge\/(\d+)/.exec(ms),DE=/MSIE \d/.exec(ms),I1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ms),$r=!!(DE||I1||L1),Vi=DE?document.documentMode:I1?+I1[1]:L1?+L1[1]:0,io=!$r&&/gecko\/(\d+)/i.test(ms);io&&+(/Firefox\/(\d+)/.exec(ms)||[0,0])[1];const D1=!$r&&/Chrome\/(\d+)/.exec(ms),hr=!!D1,IN=D1?+D1[1]:0,Cr=!$r&&!!_o&&/Apple Computer/.test(_o.vendor),Nl=Cr&&(/Mobile\/\w+/.test(ms)||!!_o&&_o.maxTouchPoints>2),En=Nl||(_o?/Mac/.test(_o.platform):!1),DN=_o?/Win/.test(_o.platform):!1,Jn=/Android \d/.test(ms),Pd=!!Ox&&"webkitFontSmoothing"in Ox.documentElement.style,$N=Pd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function HN(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Do(e,t){return typeof e=="number"?e:e[t]}function BN(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function _x(e,t,r){let n=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=r||e.dom;s;s=Du(s)){if(s.nodeType!=1)continue;let a=s,l=a==i.body,c=l?HN(i):BN(a),u=0,d=0;if(t.topc.bottom-Do(n,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+Do(o,"top")-c.top:t.bottom-c.bottom+Do(o,"bottom")),t.leftc.right-Do(n,"right")&&(u=t.right-c.right+Do(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let h=a.scrollLeft-f,m=a.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function FN(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,o;for(let i=(t.left+t.right)/2,s=r+1;s=r-20){n=a,o=l.top;break}}return{refDOM:n,refTop:o,stack:$E(e.dom)}}function $E(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=Du(n));return t}function VN({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;HE(r,n==0?0:n-t)}function HE(e,t){for(let r=0;r=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=u,c={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!r&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=d+1)}}return!r&&l&&(r=l,o=c,n=0),r&&r.nodeType==3?UN(r,o):!r||n&&r.nodeType==1?{node:e,offset:i}:BE(r,o)}function UN(e,t){let r=e.nodeValue.length,n=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function $v(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function WN(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(n,o,i)}function qN(e,t,r,n){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>n.left||l.top>n.top?o=a.posBefore:(l.right-1?o:e.docView.posFromDOM(t,r,-1)}function FE(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&o++}let c;Pd&&o&&n.nodeType==1&&(c=n.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||n.nodeType!=1||n.childNodes[o-1].nodeName!="BR")&&(a=qN(e,n,o,t))}a==null&&(a=KN(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Ax(e){return e.top=0&&o==n.nodeValue.length?(l--,u=1):r<0?l--:c++,vc(wi(jo(n,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(r<0||o==bo(n))){let l=n.childNodes[o-1];if(l.nodeType==1)return xg(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(r<0||o==bo(n))){let l=n.childNodes[o-1],c=l.nodeType==3?jo(l,bo(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return vc(wi(c,1),!1)}if(i==null&&o=0)}function vc(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function xg(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function jE(e,t,r){let n=e.state,o=e.root.activeElement;n!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),o!=e.dom&&o&&o.focus()}}function XN(e,t,r){let n=t.selection,o=r=="up"?n.$from:n.$to;return jE(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=VE(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=jo(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(r=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const JN=/[\u0590-\u08ac]/;function QN(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let o=n.parentOffset,i=!o,s=o==n.parent.content.size,a=e.domSelection();return!JN.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?i:s:jE(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",r,"character");let p=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),b})}let Rx=null,Nx=null,Px=!1;function ZN(e,t,r){return Rx==t&&Nx==r?Px:(Rx=t,Nx=r,Px=r=="up"||r=="down"?XN(e,t,r):QN(e,t,r))}const An=0,zx=1,Vs=2,Ao=3;class zd{constructor(t,r,n,o){this.parent=t,this.children=r,this.dom=n,this.contentDOM=o,this.dirty=An,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rkr(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(r==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&r==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!r||i.node))if(n&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))n=!1;else return i}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||s instanceof WE){o=t-i;break}i=a}if(o)return this.children[n].domFromPos(o-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof UE&&i.side>=0;n--);if(r<=0){let i,s=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,s=!1);return i&&r&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?kr(i.dom)+1:0}}else{let i,s=!0;for(;i=n=u&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,u);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=kr(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(c>r||a==this.children.length-1)){r=c;for(let u=a+1;up&&sr){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,o=0;o=n:tn){let a=n+i.border,l=s-i.border;if(t>=a&&r<=l){this.dirty=t==n||r==s?Vs:zx,t==a&&r==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ao:i.markDirty(t-a,r-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Vs:Ao}n=s}this.dirty=Vs}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?Vs:zx;r.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!r.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=r,this.widget=r,i=this}matchesWidget(t){return this.dirty==An&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(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 eP extends zd{constructor(t,r,n,o){super(t,[],r,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class sa extends zd{constructor(t,r,n,o){super(t,[],n,o),this.mark=r}static create(t,r,n,o){let i=o.nodeViews[r.type.name],s=i&&i(r,o,n);return(!s||!s.dom)&&(s=cn.renderSpec(document,r.type.spec.toDOM(r,n))),new sa(t,r,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ao||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ao&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=An){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(i=B1(i,0,t,n));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},n,o),u=c&&c.dom,d=c&&c.contentDOM;if(r.isText){if(!u)u=document.createTextNode(r.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=cn.renderSpec(document,r.type.spec.toDOM(r)));!d&&!r.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),r.type.spec.draggable&&(u.draggable=!0));let f=u;return u=GE(u,n,r),c?l=new tP(t,r,n,o,u,d||null,f,c,i,s+1):r.isText?new Bh(t,r,n,o,u,f,i):new ji(t,r,n,o,u,d||null,f,i,s+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 r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,r,n){return this.dirty==An&&t.eq(this.node)&&H1(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,o=r,i=t.composing?this.localCompositionInfo(t,r):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new nP(this,s&&s.node,t);sP(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?_e.none:this.node.child(u).marks,n,t),l.placeWidget(c,t,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,n,t);let p;l.findNodeMatch(c,u,d,f)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,p,t)||l.updateNextNode(c,u,d,t,f,o)||l.addNode(c,u,d,t,o),o+=c.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Vs)&&(s&&this.protectLocalComposition(t,s),KE(this.contentDOM,this.children,t),Nl&&aP(this.dom))}localCompositionInfo(t,r){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof ue)||nr+this.node.content.size)return null;let i=t.domSelectionRange(),s=lP(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=cP(this.node.content,a,n-r,o-r);return l<0?null:{node:s,pos:l,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:o}){if(this.getDesc(r))return;let i=r;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 s=new eP(this,i,r,o);t.input.compositionNodes.push(s),this.children=B1(this.children,n,n+o.length,t,s)}update(t,r,n,o){return this.dirty==Ao||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,o),!0)}updateInner(t,r,n,o){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=An}updateOuterDeco(t){if(H1(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=qE(this.dom,this.nodeDOM,$1(this.outerDeco,this.node,r),$1(t,this.node,r)),this.dom!=n&&(n.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 Lx(e,t,r,n,o){GE(n,t,e);let i=new ji(void 0,e,t,r,n,n,n,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Bh extends ji{constructor(t,r,n,o,i,s,a){super(t,r,n,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,o){return this.dirty==Ao||this.dirty!=An&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=An||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=An,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let o=this.node.cut(t,r),i=document.createTextNode(o.text);return new Bh(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Ao)}get domAtom(){return!1}}class WE extends zd{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==An&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class tP extends ji{constructor(t,r,n,o,i,s,a,l,c,u){super(t,r,n,o,i,s,a,c,u),this.spec=l}update(t,r,n,o){if(this.dirty==Ao)return!1;if(this.spec.update){let i=this.spec.update(t,r,n);return i&&this.updateInner(t,r,n,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,o){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,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 KE(e,t,r){let n=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=sa.create(this.top,t[i],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,r,n,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,r,n))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let c=r.children[n-1];if(c instanceof sa)r=c,n=c.children.length;else{a=c,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function iP(e,t){return e.type.side-t.type.side}function sP(e,t,r,n){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;ci;)a.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let b=h;s!b.inline):a.slice();n(f,m,t.forChild(i,f),p),i=h}}function aP(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 lP(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=bo(e)}else if(e.nodeType==1&&t=r){if(i>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let c=a=0&&c+t.length+a>=r)return a+c;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function B1(e,t,r,n,o){let i=[];for(let s=0,a=0;s=r||u<=t?i.push(l):(cr&&i.push(l.slice(r-c,l.size,n)))}return i}function Hv(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let o=e.docView.nearestDesc(r.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(s<0)return null;let a=n.resolve(s),l,c;if(Hh(r)){for(l=a;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&de.isSelectable(u)&&o.parent&&!(u.isInline&&PN(r.focusNode,r.focusOffset,o.dom))){let d=o.posBefore;c=new de(s==d?a:n.resolve(d))}}else{let u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null;l=n.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(r.anchorNode!=n||r.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!YE(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function dP(e){let t=e.domSelection(),r=document.createRange(),n=e.cursorWrapper.dom,o=n.nodeName=="IMG";o?r.setEnd(n.parentNode,kr(n)+1):r.setEnd(n,0),r.collapse(!1),t.removeAllRanges(),t.addRange(r),!o&&!e.state.selection.visible&&$r&&Vi<=11&&(n.disabled=!0,n.disabled=!1)}function XE(e,t){if(t instanceof de){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(Bx(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else Bx(e)}function Bx(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Bv(e,t,r,n){return e.someProp("createSelectionBetween",o=>o(e,t,r))||ue.between(t,r,n)}function Fx(e){return e.editable&&!e.hasFocus()?!1:JE(e)}function JE(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 fP(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return ia(t.node,t.offset,r.anchorNode,r.anchorOffset)}function F1(e,t){let{$anchor:r,$head:n}=e.selection,o=t>0?r.max(n):r.min(n),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&xe.findFrom(i,t)}function Oi(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Vx(e,t,r){let n=e.state.selection;if(n instanceof ue)if(r.indexOf("s")>-1){let{$head:o}=n,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Oi(e,new ue(n.$anchor,s))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=F1(e.state,t);return o&&o instanceof de?Oi(e,o):!1}else if(!(En&&r.indexOf("m")>-1)){let o=n.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?de.isSelectable(i)?Oi(e,new de(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Pd?Oi(e,new ue(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof de&&n.node.isInline)return Oi(e,new ue(t>0?n.$to:n.$from));{let o=F1(e.state,t);return o?Oi(e,o):!1}}}function Mp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function vu(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Na(e,t){return t<0?pP(e):hP(e)}function pP(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o,i,s=!1;for(io&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(vu(a,-1))o=r,i=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(QE(r))break;{let a=r.previousSibling;for(;a&&vu(a,-1);)o=r.parentNode,i=kr(a),a=a.previousSibling;if(a)r=a,n=Mp(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}s?V1(e,r,n):o&&V1(e,o,i)}function hP(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o=Mp(r),i,s;for(;;)if(n{e.state==o&&ei(e)},50)}function jx(e,t){let r=e.state.doc.resolve(t);if(!(hr||DN)&&r.parent.inlineContent){let o=e.coordsAtPos(t);if(t>r.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function Ux(e,t,r){let n=e.state.selection;if(n instanceof ue&&!n.empty||r.indexOf("s")>-1||En&&r.indexOf("m")>-1)return!1;let{$from:o,$to:i}=n;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=F1(e.state,t);if(s&&s instanceof de)return Oi(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=n instanceof wr?xe.near(s,t):xe.findFrom(s,t);return a?Oi(e,a):!1}return!1}function Wx(e,t){if(!(e.state.selection instanceof ue))return!0;let{$head:r,$anchor:n,empty:o}=e.state.selection;if(!r.sameParent(n))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(r.pos-i.nodeSize,r.pos):s.delete(r.pos,r.pos+i.nodeSize),e.dispatch(s),!0}return!1}function Kx(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function vP(e){if(!Cr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;Kx(e,n,"true"),setTimeout(()=>Kx(e,n,"false"),20)}return!1}function yP(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function bP(e,t){let r=t.keyCode,n=yP(t);if(r==8||En&&r==72&&n=="c")return Wx(e,-1)||Na(e,-1);if(r==46&&!t.shiftKey||En&&r==68&&n=="c")return Wx(e,1)||Na(e,1);if(r==13||r==27)return!0;if(r==37||En&&r==66&&n=="c"){let o=r==37?jx(e,e.state.selection.from)=="ltr"?-1:1:-1;return Vx(e,o,n)||Na(e,o)}else if(r==39||En&&r==70&&n=="c"){let o=r==39?jx(e,e.state.selection.from)=="ltr"?1:-1:1;return Vx(e,o,n)||Na(e,o)}else{if(r==38||En&&r==80&&n=="c")return Ux(e,-1,n)||Na(e,-1);if(r==40||En&&r==78&&n=="c")return vP(e)||Ux(e,1,n)||Na(e,1);if(n==(En?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function ZE(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let r=[],{content:n,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&n.childCount==1&&n.firstChild.childCount==1;){o--,i--;let p=n.firstChild;r.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),n=p.content}let s=e.someProp("clipboardSerializer")||cn.fromSchema(e.state.schema),a=i5(),l=a.createElement("div");l.appendChild(s.serializeFragment(n,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=o5[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let h=a.createElement(u[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(r)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:l,text:f}}function OE(e,t,r,n,o){let i=o.parent.type.spec.code,s,a;if(!r&&!t)return null;let l=t&&(n||i||!r);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,i||n,e)}),i)return t?new W(R.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0):W.empty;let d=e.someProp("clipboardTextParser",f=>f(t,o,n,e));if(d)a=d;else{let f=o.marks(),{schema:p}=e.state,h=rn.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{r=d(r,e)}),s=WR(r),wd&&KR(s);let c=s&&s.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=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||uv.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!jR.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)a=qR(Cx(a,+u[1],+u[2]),u[4]);else if(a=W.maxOpen(UR(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d{a=d(a,e)}),a}const jR=/^(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 UR(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let o=t.node(r).contentMatchAt(t.index(r)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&i.length&&AE(l,i,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=NE(s[s.length-1],i.length));let u=_E(a,l);s.push(u),o=o.matchType(u.type),i=l}}),s)return R.from(s)}return e}function _E(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,R.from(e));return e}function AE(e,t,r,n,o){if(o1&&(i=0),o=r&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(R.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function Cx(e,t,r){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=PE().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),o;if((o=n&&RE[n[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),r.innerHTML=e,o)for(let i=0;i=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;o=R.from(l.create(n[a+1],o)),i++,s++}return new W(o,i,s)}const xr={},wr={},GR={touchstart:!0,touchmove:!0};class YR{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.lastAndroidDelete=0,this.composing=!1,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 JR(e){for(let t in xr){let r=xr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{QR(e,n)&&!kv(e,n)&&(e.editable||!(n.type in wr))&&r(e,n)},GR[t]?{passive:!0}:void 0)}kr&&e.dom.addEventListener("input",()=>null),C1(e)}function _i(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function XR(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 C1(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>kv(e,n))})}function kv(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function QR(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function ZR(e,t){!kv(e,t)&&xr[t.type]&&(e.editable||!(t.type in wr))&&xr[t.type](e,t)}wr.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!LE(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Wn&&cr&&r.keyCode==13)))if(r.keyCode!=229&&e.domObserver.forceFlush(),wl&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",o=>o(e,Ns(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||VR(e,r)?r.preventDefault():_i(e,"key")};wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wr.keypress=(e,t)=>{let r=t;if(LE(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||yn&&r.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof le)||!n.$from.sameParent(n.$to)){let o=String.fromCharCode(r.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,n.$from.pos,n.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),r.preventDefault()}};function Eh(e){return{left:e.clientX,top:e.clientY}}function eP(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function xv(e,t,r,n,o){if(n==-1)return!1;let i=e.state.doc.resolve(n);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,r,i.nodeAfter,i.before(s),o,!0):a(e,r,i.node(s),i.before(s),o,!1)))return!0;return!1}function il(e,t,r){e.focused||e.focus();let n=e.state.tr.setSelection(t);r=="pointer"&&n.setMeta("pointer",!0),e.dispatch(n)}function tP(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&ce.isSelectable(n)?(il(e,new ce(r),"pointer"),!0):!1}function rP(e,t){if(t==-1)return!1;let r=e.state.selection,n,o;r instanceof ce&&(n=r.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(ce.isSelectable(a)){n&&r.$from.depth>0&&s>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?o=i.before(r.$from.depth):o=i.before(s);break}}return o!=null?(il(e,ce.create(e.state.doc,o),"pointer"),!0):!1}function nP(e,t,r,n,o){return xv(e,"handleClickOn",t,r,n)||e.someProp("handleClick",i=>i(e,t,n))||(o?rP(e,r):tP(e,r))}function oP(e,t,r,n){return xv(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",o=>o(e,t,n))}function iP(e,t,r,n){return xv(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",o=>o(e,t,n))||sP(e,r,n)}function sP(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?(il(e,le.create(n,0,n.content.size),"pointer"),!0):!1;let o=n.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)il(e,le.create(n,a+1,a+1+s.content.size),"pointer");else if(ce.isSelectable(s))il(e,ce.create(n,a),"pointer");else continue;return!0}}function wv(e){return hp(e)}const zE=yn?"metaKey":"ctrlKey";xr.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=wv(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&eP(r,e.input.lastClick)&&!r[zE]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:r.clientX,y:r.clientY,type:i};let s=e.posAtCoords(Eh(r));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new aP(e,s,r,!!n)):(i=="doubleClick"?oP:iP)(e,s.pos,s.inside,r)?r.preventDefault():_i(e,"pointer"))};class aP{constructor(t,r,n,o){this.view=t,this.pos=r,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[zE],this.allowDefault=n.shiftKey;let i,s;if(r.inside>-1)i=t.state.doc.nodeAt(r.inside),s=r.inside;else{let u=t.state.doc.resolve(r.pos);i=u.parent,s=u.depth?u.before():0}const a=o?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof ce&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Zn&&!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)),_i(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(()=>Ko(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(Eh(t))),this.updateAllowDefault(t),this.allowDefault||!r?_i(this.view,"pointer"):nP(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||kr&&this.mightDrag&&!this.mightDrag.node.isAtom||cr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(il(this.view,be.near(this.view.state.doc.resolve(r.pos)),"pointer"),t.preventDefault()):_i(this.view,"pointer")}move(t){this.updateAllowDefault(t),_i(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)}}xr.touchstart=e=>{e.input.lastTouch=Date.now(),wv(e),_i(e,"pointer")};xr.touchmove=e=>{e.input.lastTouch=Date.now(),_i(e,"pointer")};xr.contextmenu=e=>wv(e);function LE(e,t){return e.composing?!0:kr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const lP=Wn?5e3:-1;wr.compositionstart=wr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),hp(e,!0),e.markCursor=null;else if(hp(e),Zn&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let o=n.focusNode,i=n.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}IE(e,lP)};wr.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.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,IE(e,20))};function IE(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>hp(e),t))}function DE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=cP());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function cP(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function hp(e,t=!1){if(!(Wn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),DE(e),t||e.docView&&e.docView.dirty){let r=yv(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):e.updateState(e.state),!0}return!1}}function uP(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const Sl=Pr&&zi<15||wl&&aR<604;xr.copy=wr.cut=(e,t)=>{let r=t,n=e.state.selection,o=r.type=="cut";if(n.empty)return;let i=Sl?null:r.clipboardData,s=n.content(),{dom:a,text:l}=TE(e,s);i?(r.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):uP(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function dP(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function fP(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Ou(e,n.value,null,o,t):Ou(e,n.textContent,n.innerHTML,o,t)},50)}function Ou(e,t,r,n,o){let i=OE(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||W.empty)))return!0;if(!i)return!1;let s=dP(i),a=s?e.state.tr.replaceSelectionWith(s,n):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}wr.paste=(e,t)=>{let r=t;if(e.composing&&!Wn)return;let n=Sl?null:r.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&Ou(e,n.getData("text/plain"),n.getData("text/html"),o,r)?r.preventDefault():fP(e,r)};class pP{constructor(t,r){this.slice=t,this.move=r}}const $E=yn?"altKey":"ctrlKey";xr.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Eh(r));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof ce?o.to-1:o.to))){if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(ce.create(e.state.doc,n.mightDrag.pos)));else if(r.target&&r.target.nodeType==1){let c=e.docView.nearestDesc(r.target,!0);c&&c.node.type.spec.draggable&&c!=e.docView&&e.dispatch(e.state.tr.setSelection(ce.create(e.state.doc,c.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:l}=TE(e,s);r.dataTransfer.clearData(),r.dataTransfer.setData(Sl?"Text":"text/html",a.innerHTML),r.dataTransfer.effectAllowed="copyMove",Sl||r.dataTransfer.setData("text/plain",l),e.dragging=new pP(s,!r[$E])};xr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wr.dragover=wr.dragenter=(e,t)=>t.preventDefault();wr.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let o=e.posAtCoords(Eh(r));if(!o)return;let i=e.state.doc.resolve(o.pos),s=n&&n.slice;s?e.someProp("transformPasted",h=>{s=h(s,e)}):s=OE(e,r.dataTransfer.getData(Sl?"Text":"text/plain"),Sl?null:r.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&!r[$E]);if(e.someProp("handleDrop",h=>h(e,r,s||W.empty,a))){r.preventDefault();return}if(!s)return;r.preventDefault();let l=s?MA(e.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let p=c.doc.resolve(u);if(d&&ce.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new ce(p));else{let h=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,v,g)=>h=g),c.setSelection(bv(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};xr.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())&&Ko(e)},20))};xr.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};xr.beforeinput=(e,t)=>{if(cr&&Wn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Ns(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 wr)xr[e]=wr[e];function _u(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class mp{constructor(t,r){this.toDOM=t,this.spec=r||js,this.side=this.spec.side||0}map(t,r,n,o){let{pos:i,deleted:s}=t.mapResult(r.from+o,this.side<0?-1:1);return s?null:new qe(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof mp&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&_u(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ii{constructor(t,r){this.attrs=t,this.spec=r||js}map(t,r,n,o){let i=t.map(r.from+o,this.spec.inclusiveStart?-1:1)-n,s=t.map(r.to+o,this.spec.inclusiveEnd?1:-1)-n;return i>=s?null:new qe(i,s,this)}valid(t,r){return r.from=t&&(!i||i(a.spec))&&n.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,r-a,n,o+a,i)}}map(t,r,n){return this==sr||t.maps.length==0?this:this.mapInner(t,r,0,0,n||js)}mapInner(t,r,n,o,i){let s;for(let a=0;a{let c=l+n,u;if(u=BE(r,a,c)){for(o||(o=this.children.slice());ia&&d.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let i=t+1,s=i+r.content.size;for(let a=0;ai&&l.type instanceof Ii){let c=Math.max(i,l.from)-i,u=Math.min(s,l.to)-i;co.map(t,r,js));return Ei.from(n)}forChild(t,r){if(r.isLeaf)return Ee.empty;let n=[];for(let o=0;or instanceof Ee)?t:t.reduce((r,n)=>r.concat(n instanceof Ee?n:n.members),[]))}}}function hP(e,t,r,n,o,i,s){let a=e.slice();for(let c=0,u=i;c{let b=m-h-(p-f);for(let v=0;vg+u-d)continue;let y=a[v]+u-d;p>=y?a[v+1]=f<=y?-2:-1:h>=o&&b&&(a[v]+=b,a[v+1]+=b)}d+=b}),u=r.maps[c].map(u,-1)}let l=!1;for(let c=0;c=n.content.size){l=!0;continue}let f=r.map(e[c+1]+i,-1),p=f-o,{index:h,offset:m}=n.content.findIndex(d),b=n.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let v=a[c+2].mapInner(r,b,u+1,e[c]+i+1,s);v!=sr?(a[c]=d,a[c+1]=p,a[c+2]=v):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=mP(a,e,t,r,o,i,s),u=gp(c,n,0,s);t=u.local;for(let d=0;dr&&s.to{let c=BE(e,a,l+r);if(c){i=!0;let u=gp(c,a,r+l+1,n);u!=sr&&o.push(l,l+a.nodeSize,u)}});let s=HE(i?FE(e):e,-r).sort(Us);for(let a=0;a0;)t++;e.splice(t,0,r)}function og(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=sr&&t.push(n)}),e.cursorWrapper&&t.push(Ee.create(e.state.doc,[e.cursorWrapper.deco])),Ei.from(t)}const gP={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},vP=Pr&&zi<=11;class yP{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 bP{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new yP,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),vP&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,gP)),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 r=0;rthis.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(bx(this.view)){if(this.suppressingSelectionUpdates)return Ko(this.view);if(Pr&&zi<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Xs(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 r=new Set,n;for(let i=t.focusNode;i;i=Tu(i))r.add(i);for(let i=t.anchorNode;i;i=Tu(i))if(r.has(i)){n=i;break}let o=n&&this.view.docView.nearestDesc(n);if(o&&o.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))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 r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&bx(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u1){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),kP(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Ko(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;uo;b--){let v=n.childNodes[b-1],g=v.pmViewDesc;if(v.nodeName=="BR"&&!g){i=b;break}if(!g||g.size)break}let d=e.state.doc,f=e.someProp("domParser")||uv.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(n,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:SP,context:p});if(c&&c[0].pos!=null){let b=c[0].pos,v=c[1]&&c[1].pos;v==null&&(v=b),h={anchor:b+s,head:v+s}}return{doc:m,sel:h,from:s,to:a}}function SP(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(kr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||kr&&/^(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 EP=/^(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 CP(e,t,r,n,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let C=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,T=yv(e,C);if(T&&!e.state.selection.eq(T)){if(cr&&Wn&&e.input.lastKeyCode===13&&Date.now()-100z(e,Ns(13,"Enter"))))return;let N=e.state.tr.setSelection(T);C=="pointer"?N.setMeta("pointer",!0):C=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),e.dispatch(N)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(r);t=s.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,c=wP(e,t,r),u=e.state.doc,d=u.slice(c.from,c.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Wn)&&o.some(C=>C.nodeType==1&&!EP.test(C.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",C=>C(e,Ns(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(n&&l instanceof le&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=Ax(e,e.state.doc,c.sel);if(C&&!C.eq(e.state.selection)){let T=e.state.tr.setSelection(C);i&&T.setMeta("composition",i),e.dispatch(T)}}return}if(cr&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let C=h.endB-h.start;c.sel={anchor:c.sel.anchor+C,head:c.sel.anchor+C}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Pr&&zi<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=c.doc.resolveNoCache(h.start-c.from),b=c.doc.resolveNoCache(h.endB-c.from),v=u.resolve(h.start),g=m.sameParent(b)&&m.parent.inlineContent&&v.end()>=h.endA,y;if((wl&&e.input.lastIOSEnter>Date.now()-225&&(!g||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!g&&m.posC(e,Ns(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&TP(u,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",C=>C(e,Ns(8,"Backspace")))){Wn&&cr&&e.domObserver.suppressSelectionUpdates();return}cr&&Wn&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),Wn&&!g&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,b=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(C){return C(e,Ns(13,"Enter"))})},20));let k=h.start,x=h.endA,w,E,M;if(g){if(m.pos==b.pos)Pr&&zi<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ko(e),20)),w=e.state.tr.delete(k,x),E=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&(M=MP(m.parent.content.cut(m.parentOffset,b.parentOffset),v.parent.content.cut(v.parentOffset,h.endA-v.start()))))w=e.state.tr,M.type=="add"?w.addMark(k,x,M.mark):w.removeMark(k,x,M.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",T=>T(e,k,x,C)))return;w=e.state.tr.insertText(C,k,x)}}if(w||(w=e.state.tr.replace(k,x,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let C=Ax(e,w.doc,c.sel);C&&!(cr&&Wn&&e.composing&&C.empty&&(h.start!=h.endB||e.input.lastAndroidDeletet.content.size?null:bv(e,t.resolve(r.anchor),t.resolve(r.head))}function MP(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,o=r,i=n,s,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ur||ig(s,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,o++,t=!1;if(r){let i=e.node(n).maybeChild(e.indexAfter(n));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function OP(e,t,r,n,o){let i=e.findDiffStart(t,r);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a=a?i-n:0;i-=l,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class _P{constructor(t,r){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 YR,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(Lx),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=Px(this),Rx(this),this.nodeViews=zx(this),this.docView=px(this.state.doc,Nx(this),og(this),this.dom,this),this.domObserver=new bP(this,(n,o,i,s)=>CP(this,n,o,i,s)),this.domObserver.start(),JR(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 r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&C1(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Lx),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){let n=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(DE(this),i=!0),this.state=t;let s=n.plugins!=t.plugins||this._props.plugins!=r.plugins;if(s||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=zx(this);NP(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(s||r.handleDOMEvents!=this._props.handleDOMEvents)&&C1(this),this.editable=Px(this),Rx(this);let a=og(this),l=Nx(this),c=n.plugins!=t.plugins&&!n.doc.eq(t.doc)?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(n.selection))&&(i=!0);let d=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&uR(this);if(i){this.domObserver.stop();let f=u&&(Pr||cr)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&AP(n.selection,t.selection);if(u){let p=cr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=px(t.doc,l,a,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&LR(this))?Ko(this,f):(EE(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&dR(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof ce){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&ax(this,r.getBoundingClientRect(),t)}else ax(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 r=0;rr.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return vR(this,t)}coordsAtPos(t,r=1){return gE(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let o=this.docView.posFromDOM(t,r,n);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,r){return wR(this,r||this.state,t)}pasteHTML(t,r){return Ou(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return Ou(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(XR(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],og(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return ZR(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return kr&&this.root.nodeType===11&&nR(this.dom.ownerDocument)==this.dom?xP(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Nx(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[qe.node(0,e.state.doc.content.size,t)]}function Rx(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:qe.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Px(e){return!e.someProp("editable",t=>t(e.state)===!1)}function AP(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function zx(e){let t=Object.create(null);function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=n[o])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function NP(e,t){let r=0,n=0;for(let o in e){if(e[o]!=t[o])return!0;r++}for(let o in t)n++;return r!=n}function Lx(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 RP=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const PP=Co(RP);var VE=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ge=(e,t,r)=>(VE(e,t,"read from private field"),r?r.call(e):t.get(e)),Ao=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ke=(e,t,r,n)=>(VE(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function zP(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function LP(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function IP(e){return!!(!e.prev&&e.next)}function DP(e){return!!(e.prev&&!e.next)}function $P(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function HP(e){return e==="invalid-exit-split"}var BP=["jump-backward-exit","jump-forward-exit"],FP=["jump-backward-change","jump-forward-change"];function VP(e){var t,r;return br(BP,(t=e.exit)==null?void 0:t.exitReason)||br(FP,(r=e.change)==null?void 0:r.changeReason)}function Ix(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function Dx(e){return Xt(e)&&e instanceof le}function Ar(e){const{match:t,changeReason:r,exitReason:n}=e;return{...t,changeReason:r,exitReason:n}}function jP(e,t){const{invalidPrefixCharacters:r,validPrefixCharacters:n}=t;return r?!new RegExp(T1(r)).test(e):new RegExp(T1(n)).test(e)}function UP(e){const{text:t,regexp:r,$pos:n,suggester:o}=e,i=n.start();let s;return Kl(t,r).forEach(a=>{const l=a.input.slice(Math.max(0,a.index-1),a.index);if(jP(l,o)){const c=a.index+i,u=a[0],d=a[1];if(!ne(u)||!ne(d))return;const f=c+u.length,p=Math.min(f,n.pos),h=p-c;c=n.pos&&(s={range:{from:c,to:f,cursor:p},match:a,query:{partial:u.slice(d.length,h),full:u.slice(d.length)},text:{partial:u.slice(0,h),full:u},textAfter:n.doc.textBetween(f,n.end(),Ti,Ti),textBefore:n.doc.textBetween(i,c,Ti,Ti),suggester:o})}}),s}function jE(e){const{$pos:t,suggester:r}=e,{char:n,name:o,startOfLine:i,supportedCharacters:s,matchOffset:a,multiline:l,caseInsensitive:c,unicode:u}=r,d=ZP({char:n,matchOffset:a,startOfLine:i,supportedCharacters:s,multiline:l,caseInsensitive:c,unicode:u}),f=t.doc.textBetween(t.before(),t.end(),Ti,Ti);return UP({suggester:r,text:f,regexp:d,$pos:t,char:n,name:o})}function UE(e){const{state:t,match:r}=e;try{return jE({$pos:t.doc.resolve(r.range.cursor),suggester:r.suggester})}catch{return}}function WE(e){const{prev:t,next:r,state:n}=e;return!r&&t.range.from>=n.doc.nodeSize?{exit:Ar({match:t,exitReason:"delete"})}:!r||!t.query.partial?{exit:Ar({match:t,exitReason:"invalid-exit-split"})}:t.range.to===r.range.cursor?{exit:Ar({match:r,exitReason:"exit-end"})}:t.query.partial?{exit:Ar({match:r,exitReason:"exit-split"})}:{}}function WP(e){const{prev:t,next:r,state:n}=e,o=ee(),i=UE({state:n,match:t}),{exit:s}=i&&i.query.full!==t.query.full?WE({prev:t,next:i,state:n}):o;return t.range.from=t.range.to)?{exit:Ar({match:t,exitReason:"selection-outside"})}:n.pos>t.range.to?{exit:Ar({match:t,exitReason:"move-end"})}:n.pos<=t.range.from?{exit:Ar({match:t,exitReason:"move-start"})}:{}}function qP(e){const{prev:t,next:r,state:n,$pos:o}=e,i=ee();if(!t&&!r)return i;const s={prev:t,next:r};return $P(s)?WP({prev:s.prev,next:s.next,state:n}):IP(s)?{change:Ar({match:s.next,changeReason:"start"})}:DP(s)?KP({$pos:o,match:s.prev,state:n}):zP(s)?{change:Ar({match:s.next,changeReason:"change-character"})}:LP(s)?{change:Ar({match:s.next,changeReason:n.selection.empty?"move":"selection-inside"})}:i}function $x(e,t){for(let r=e.depth;r>0;r--){const n=e.node(r);if(t.includes(n.type.name))return!0}return!1}function M1(e,t){const{$from:r,$to:n}=e;return KE(e,t)?!0:cv(r.pos,n.pos).some(o=>GP(r.doc.resolve(o),t))}function KE(e,t){const{$from:r,$to:n}=e,o=new Set((r.marksAcross(n)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function GP(e,t){const r=new Set(e.marks().map(n=>n.type.name));return t.some(n=>r.has(n))}function YP(e,t){const{$cursor:r}=t,{validMarks:n,validNodes:o,invalidMarks:i,invalidNodes:s}=e;return!n&&!o&&qi(i)&&qi(s)?!0:!(n&&!KE(t,n)||o&&!$x(r,o)||!n&&M1(t,i)||!o&&$x(r,s))}function Hx(e){const{suggesters:t,$pos:r,selectionEmpty:n}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!n))try{const i=jE({suggester:o,$pos:r});if(!i)continue;const s={$from:r.doc.resolve(i.range.from),$to:r.doc.resolve(i.range.to),$cursor:r};if(YP(o,s)&&o.isValidPosition(s,i))return i}catch{}}function T1(e){return A_(e)?e.source:e}function JP(e){return e?"^":""}function XP(e,t){return`(?:${T1(e)}){${t},}`}function QP(e){return ne(e)?new RegExp(PP(e)):e}function ZP(e){const{char:t,matchOffset:r,startOfLine:n,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:a=!1,unicode:l=!1}=e,c=`g${a?"m":""}${s?"i":""}${l?"u":""}`;let u=QP(t).source;return i&&(u=`(${u})`),new RegExp(`${JP(n)}${u}${XP(o,r)}`,c)}var e6={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},qE="__ignore_prosemirror_suggest_update__",Cf,Tc,zt,mi,La,so,Ot,gi,Ia,GE=class{constructor(e){Ao(this,Cf,!1),Ao(this,Tc,!1),Ao(this,zt,void 0),Ao(this,mi,void 0),Ao(this,La,void 0),Ao(this,so,ee()),Ao(this,Ot,Ee.empty),Ao(this,gi,!1),Ao(this,Ia,!1),this.setMarkRemoved=()=>{Ke(this,gi,!0)},this.findNextTextSelection=r=>{const n=r.$from.doc,o=Math.min(n.nodeSize-2,r.to+1),i=n.resolve(o),s=be.findFrom(i,1,!0);if(Dx(s))return s},this.ignoreNextExit=()=>{Ke(this,Tc,!0)},this.addIgnored=({from:r,name:n,specific:o=!1})=>{const i=ge(this,zt).find(u=>u.name===n);if(!i)throw new Error(`No suggester exists for the name provided: ${n}`);const s=ne(i.char)?i.char.length:1,a=r+s,l=i.ignoredClassName?{class:i.ignoredClassName}:{},c=qe.inline(r,a,{nodeName:i.ignoredTag,...l},{name:n,specific:o,char:i.char});Ke(this,Ot,ge(this,Ot).add(this.view.state.doc,[c]))},this.removeIgnored=({from:r,name:n})=>{const o=ge(this,zt).find(a=>a.name===n);if(!o)throw new Error(`No suggester exists for the name provided: ${n}`);const i=ne(o.char)?o.char.length:1,s=ge(this,Ot).find(r,r+i)[0];!s||s.spec.name!==n||Ke(this,Ot,ge(this,Ot).remove([s]))},this.clearIgnored=r=>{if(!r){Ke(this,Ot,Ee.empty);return}const o=ge(this,Ot).find().filter(({spec:i})=>i.name===r);Ke(this,Ot,ge(this,Ot).remove(o))},this.findMatchAtPosition=(r,n)=>{const o=n?ge(this,zt).filter(i=>i.name===n):ge(this,zt);return Hx({suggesters:o,$pos:r,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{Ke(this,Ia,!0)};const t=Bx();Ke(this,zt,e.map(t)),Ke(this,zt,Gs(ge(this,zt),(r,n)=>n.priority-r.priority))}static create(e){return new GE(e)}get decorationSet(){return ge(this,Ot)}get removed(){return ge(this,gi)}get match(){return ge(this,mi)?ge(this,mi):ge(this,La)&&ge(this,so).exit?ge(this,La):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:r}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:r,...e}}shouldRunExit(){return ge(this,Tc)?(Ke(this,Tc,!1),!1):!0}updateWithNextSelection(e){var t,r,n;const o=this.findNextTextSelection(e.selection);if(o)for(const i of ge(this,zt)){const s=(t=ge(this,so).change)==null?void 0:t.suggester.name,a=(r=ge(this,so).exit)==null?void 0:r.suggester.name;(n=i.checkNextValidSelection)==null||n.call(i,o.$from,e,{change:s,exit:a})}}changeHandler(e,t){const{change:r,exit:n}=ge(this,so),o=this.match;if(!r&&!n||!Ix(o))return;const i=t===(n==null?void 0:n.suggester.appendTransaction)&&this.shouldRunExit(),s=t===(r==null?void 0:r.suggester.appendTransaction);if(!(!i&&!s)){if(r&&n&&VP({change:r,exit:n})){const a=this.createProps(n),l=this.createProps(r),c=n.range.from{const a=ne(s.char)?s.char.length:1;return i-o!==a});Ke(this,Ot,t.remove(n))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return ge(this,Ot).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){Ke(this,so,ee()),Ke(this,mi,void 0),Ke(this,gi,!1),Ke(this,Ia,!1)}updateReasons(e){const{$pos:t,state:r}=e,n=ge(this,Cf),o=ge(this,zt),i=r.selection.empty,s=Dx(r.selection)?Hx({suggesters:o,$pos:t,docChanged:n,selectionEmpty:i}):void 0;Ke(this,mi,s&&this.shouldIgnoreMatch(s)?void 0:s),Ke(this,so,qP({next:ge(this,mi),prev:ge(this,La),state:r,$pos:t}))}addSuggester(e){const t=ge(this,zt).find(n=>n.name===e.name),r=Bx();if(t)Ke(this,zt,ge(this,zt).map(n=>n===t?r(e):n));else{const n=[...ge(this,zt),r(e)];Ke(this,zt,Gs(n,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=ne(e)?e:e.name;Ke(this,zt,ge(this,zt).filter(r=>r.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:r}=ge(this,so);if(ge(this,Ia)&&(Ke(this,Ia,!1),!(t!=null&&t.suggester.appendTransaction)&&!(r!=null&&r.suggester.appendTransaction)))return this;const{tr:n,state:o}=e,i=n.docChanged||n.selectionSet;return n.getMeta(qE)||!i&&!ge(this,gi)?this:(Ke(this,Cf,n.docChanged),this.mapIgnoredDecorations(n),t&&this.resetState(),Ke(this,La,ge(this,mi)),this.updateReasons({$pos:n.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!Ix(t))return ge(this,Ot);const{disableDecorations:r}=t.suggester;if(Pe(r)?r(e,t):r)return ge(this,Ot);const{range:o,suggester:i}=t,{name:s,suggestTag:a,suggestClassName:l}=i,{from:c,to:u}=o;return this.shouldIgnoreMatch(t)?ge(this,Ot):ge(this,Ot).add(e.doc,[qe.inline(c,u,{nodeName:a,class:s?`${l} suggest-${s}`:l},{name:s})])}},t6=GE;Cf=new WeakMap;Tc=new WeakMap;zt=new WeakMap;mi=new WeakMap;La=new WeakMap;so=new WeakMap;Ot=new WeakMap;gi=new WeakMap;Ia=new WeakMap;function Bx(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const r={...e6,...t};return e.add(t.name),r}}var YE=new pa("suggest");function Cv(e){return YE.getState(e)}function Fx(e,t){return Cv(e).addSuggester(t)}function Vx(e){e.setMeta(qE,!0)}function r6(e,t){return Cv(e).removeSuggester(t)}function n6(...e){const t=t6.create(e);return new Mo({key:YE,view:r=>(t.init(r),{update:n=>t.changeHandler(n.state.tr,!1)}),state:{init:()=>t,apply:(r,n,o,i)=>t.apply({tr:r,state:i})},appendTransaction:(r,n,o)=>{const i=o.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:r=>t.createDecorations(r)}})}function Mv(e,t){const r=Object.getPrototypeOf(t);let n=e.selection,o=e.doc,i=e.storedMarks;const s=ee();for(const[a,l]of Object.entries(t))s[a]={value:l};return Object.create(r,{...s,storedMarks:{get(){return i}},selection:{get(){return n}},doc:{get(){return o}},tr:{get(){return n=e.selection,o=e.doc,i=e.storedMarks,e}}})}function cu(e){return({state:t,dispatch:r,view:n,tr:o})=>e(Mv(o,t),r,n)}function jx(e){return t=>{var r;return te(t.dispatch===void 0||t.dispatch===((r=t.view)==null?void 0:r.dispatch),{code:H.NON_CHAINABLE_COMMAND}),e(t)}}function o6(...e){return({state:t,dispatch:r,view:n,tr:o,...i})=>{for(const s of e)if(s({state:t,dispatch:r,view:n,tr:o,...i}))return!0;return!1}}var en={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return en.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return en.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return en.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return en.isNode?process.platform==="darwin":en.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function ao(e,t){var r;const n=P6(e);return((r=n==null?void 0:n.getComputedStyle(e))==null?void 0:r.getPropertyValue(t))??""}function ir(e,t){return Object.assign(e.style,t)}function vp(e){return Xt(e)&&ln(e.nodeType)&&ne(e.nodeName)}function mt(e){return vp(e)&&e.nodeType===1}function i6(e){return vp(e)&&e.nodeType===3}function Ch(e){const{types:t,node:r}=e;if(!r)return!1;const n=o=>o===r.type||o===r.type.name;return at(t)?t.some(n):n(t)}function s6(e,t){const{tr:r}=t;return e.forEach(n=>{n.steps.forEach(o=>{r.step(o)})}),r}function a6({pos:e,tr:t}){const r=t.doc.nodeAt(e);return r&&t.delete(e,e+r.nodeSize),t}function l6({pos:e,tr:t,content:r}){const n=t.doc.nodeAt(e);return n&&t.replaceWith(e,e+n.nodeSize,r),t}function Ed(e){const{predicate:t,selection:r}=e,n=QE(r)?r.selection.$from:_v(r)?r.$from:r;for(let o=n.depth;o>0;o--){const i=n.node(o),s=o>0?n.before(o):0,a=n.start(o),l=s+i.nodeSize;if(t(i,s))return{pos:s,depth:o,node:i,start:a,end:l}}}function c6(e){const{depth:t}=e,r=t>0?e.before(t):0,n=e.node(t),o=e.start(t),i=r+n.nodeSize;return{pos:r,start:o,node:n,end:i,depth:t}}function u6(e){const t=Ed({predicate:()=>!0,selection:e});return te(t,{message:"No parent node found for the selection provided."}),t}function Yi(e){const{types:t,selection:r}=e;return Ed({predicate:n=>Ch({types:t,node:n}),selection:r})}function d6(e){const{types:t,selection:r}=e;if(!(!Md(r)||!Ch({types:t,node:r.node})))return{pos:r.$from.pos,depth:r.$from.depth,start:r.$from.start(),end:r.$from.pos+r.node.nodeSize,node:r.node}}function Tv(e){return _v(e)?e.empty:e.selection.empty}function f6(e){return e.docChanged||e.selectionSet}function JE(e){return!!Au(e)}function Au(e){const{state:t,type:r,attrs:n}=e,{selection:o,doc:i}=t,s=ne(r)?i.type.schema.nodes[r]:r;te(s,{code:H.SCHEMA,message:`No node exists for ${r}`});const a=d6({selection:o,types:r})??Ed({predicate:l=>l.type===s,selection:o});return!n||np(n)||!a||a.node.hasMarkup(s,{...a.node.attrs,...n})?a:void 0}function yp(...e){return t=>{if(!zk(e))return!1;const[r,...n]=e;let o=!1;const i=(...l)=>()=>{if(!zk(l))return!1;o=!0;const[,...c]=l;return yp(...l)({...t,next:i(...c)})},s=i(...n),a=r({...t,next:s});return o||a?a:s()}}function p6(e,t){const r=new Map,n=ee();for(const o of e)for(const[i,s]of At(o)){const l=[...r.get(i)??[],s],c=yp(...l);r.set(i,l),n[i]=t(c)}return n}function h6(e){return p6(e,t=>(r,n,o)=>t({state:r,dispatch:n,view:o,tr:r.tr,next:()=>!1}))}function Ov(e,t){const r=e.attrs??{};return Object.entries(t).every(([n,o])=>r[n]===o)}function m6(e){return e5(e,[Bo,yt,Dt,Yn])}function Gl(e){return Xt(e)}function Yl(e,t){return at(t)?br(t,e[Go]):t===e[Go]}function g6(e){return Xt(e)&&e instanceof f1}function v6(e,t){return ne(e)?nt(t.nodes,e):e}function XE(e){return Xt(e)&&e instanceof kd}function y6(e,t){return ne(e)?nt(t.marks,e):e}function Cd(e){return Xt(e)&&e instanceof Pi}function b6(e){return Xt(e)&&e instanceof R}function k6(e){return Xt(e)&&e instanceof Te}function QE(e){return Xt(e)&&e instanceof Ps}function ls(e){return Xt(e)&&e instanceof le}function x6(e){return Xt(e)&&e instanceof vr}function _v(e){return Xt(e)&&e instanceof be}function w6(e){return Xt(e)&&e instanceof bl}function Ux(e){const{trState:t,from:r,to:n,type:o,attrs:i={}}=e,{doc:s}=t,a=y6(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(r,n,a);let l=!1;return n>r&&s.nodesBetween(r,n,c=>l?!1:(l=(c.marks??[]).some(d=>d.type!==a?!1:Ov(d,i)),!l)),l}function Md(e){return Xt(e)&&e instanceof ce}function bp(e){const{trState:t,type:r,attrs:n={},from:o,to:i}=e,{selection:s,doc:a,storedMarks:l}=t,c=ne(r)?a.type.schema.marks[r]:r;if(te(c,{code:H.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==r?!1:Ov(d,n??{})):Ux({...e,from:s.from,to:s.to})}function Av(e,t={}){const r=S6(e.type.schema);if(!r)return!1;const{ignoreAttributes:n,ignoreDocAttributes:o}=t;return n?ZE(r,e):o?r.content.eq(e.content):r.eq(e)}function ZE(e,t){if(e===t)return!0;const r=e.type===t.type&&Te.sameSet(e.marks,t.marks);function n(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const o=[],i=[];e.content.forEach(s=>o.push(s)),t.content.forEach(s=>i.push(s));for(const[s,a]of o.entries()){const l=i[s];if(!l||!ZE(a,l))return!1}return!0}return r&&n()}function S6(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function Mh(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;te(!1,{code:H.SCHEMA,message:"No default block node found for the provided schema."})}function E6(e){return e.type===Mh(e.type.schema)}function Th(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function Yo(e,t,r){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const o=ne(t)?t:t.name,i=n.node.marks.find(({type:d})=>d.name===o);let s=e.index(),a=e.start()+n.offset,l=s+1,c=a+n.node.nodeSize;if(!i)return r&&c0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,a-=e.parent.child(s).nodeSize;for(;l{t=f(t,i||n,e)}),i)return t?new W(N.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):W.empty;let d=e.someProp("clipboardTextParser",f=>f(t,o,n,e));if(d)a=d;else{let f=o.marks(),{schema:p}=e.state,h=cn.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{r=d(r,e)}),s=wP(r),Pd&&SP(s);let c=s&&s.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=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Rv.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!kP.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)a=EP(qx(a,+u[1],+u[2]),u[4]);else if(a=W.maxOpen(xP(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d{a=d(a,e)}),a}const kP=/^(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 xP(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let o=t.node(r).contentMatchAt(t.index(r)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&i.length&&r5(l,i,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=n5(s[s.length-1],i.length));let u=t5(a,l);s.push(u),o=o.matchType(u.type),i=l}}),s)return N.from(s)}return e}function t5(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,N.from(e));return e}function r5(e,t,r,n,o){if(o1&&(i=0),o=r&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function qx(e,t,r){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=i5().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),o;if((o=n&&o5[n[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),r.innerHTML=e,o)for(let i=0;i=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;o=N.from(l.create(n[a+1],o)),i++,s++}return new W(o,i,s)}const Mr={},Tr={},CP={touchstart:!0,touchmove:!0};class MP{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.lastAndroidDelete=0,this.composing=!1,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 TP(e){for(let t in Mr){let r=Mr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{_P(e,n)&&!Fv(e,n)&&(e.editable||!(n.type in Tr))&&r(e,n)},CP[t]?{passive:!0}:void 0)}Cr&&e.dom.addEventListener("input",()=>null),U1(e)}function Di(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function OP(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 U1(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>Fv(e,n))})}function Fv(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function _P(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function AP(e,t){!Fv(e,t)&&Mr[t.type]&&(e.editable||!(t.type in Tr))&&Mr[t.type](e,t)}Tr.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!a5(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Jn&&hr&&r.keyCode==13)))if(r.keyCode!=229&&e.domObserver.forceFlush(),Nl&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",o=>o(e,Hs(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||bP(e,r)?r.preventDefault():Di(e,"key")};Tr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Tr.keypress=(e,t)=>{let r=t;if(a5(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||En&&r.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof ue)||!n.$from.sameParent(n.$to)){let o=String.fromCharCode(r.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,n.$from.pos,n.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),r.preventDefault()}};function Fh(e){return{left:e.clientX,top:e.clientY}}function RP(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function Vv(e,t,r,n,o){if(n==-1)return!1;let i=e.state.doc.resolve(n);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,r,i.nodeAfter,i.before(s),o,!0):a(e,r,i.node(s),i.before(s),o,!1)))return!0;return!1}function ml(e,t,r){e.focused||e.focus();let n=e.state.tr.setSelection(t);r=="pointer"&&n.setMeta("pointer",!0),e.dispatch(n)}function NP(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&de.isSelectable(n)?(ml(e,new de(r),"pointer"),!0):!1}function PP(e,t){if(t==-1)return!1;let r=e.state.selection,n,o;r instanceof de&&(n=r.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(de.isSelectable(a)){n&&r.$from.depth>0&&s>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?o=i.before(r.$from.depth):o=i.before(s);break}}return o!=null?(ml(e,de.create(e.state.doc,o),"pointer"),!0):!1}function zP(e,t,r,n,o){return Vv(e,"handleClickOn",t,r,n)||e.someProp("handleClick",i=>i(e,t,n))||(o?PP(e,r):NP(e,r))}function LP(e,t,r,n){return Vv(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",o=>o(e,t,n))}function IP(e,t,r,n){return Vv(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",o=>o(e,t,n))||DP(e,r,n)}function DP(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?(ml(e,ue.create(n,0,n.content.size),"pointer"),!0):!1;let o=n.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)ml(e,ue.create(n,a+1,a+1+s.content.size),"pointer");else if(de.isSelectable(s))ml(e,de.create(n,a),"pointer");else continue;return!0}}function jv(e){return Tp(e)}const s5=En?"metaKey":"ctrlKey";Mr.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=jv(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&RP(r,e.input.lastClick)&&!r[s5]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:r.clientX,y:r.clientY,type:i};let s=e.posAtCoords(Fh(r));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new $P(e,s,r,!!n)):(i=="doubleClick"?LP:IP)(e,s.pos,s.inside,r)?r.preventDefault():Di(e,"pointer"))};class $P{constructor(t,r,n,o){this.view=t,this.pos=r,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[s5],this.allowDefault=n.shiftKey;let i,s;if(r.inside>-1)i=t.state.doc.nodeAt(r.inside),s=r.inside;else{let u=t.state.doc.resolve(r.pos);i=u.parent,s=u.depth?u.before():0}const a=o?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof de&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&io&&!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)),Di(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(()=>ei(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(Fh(t))),this.updateAllowDefault(t),this.allowDefault||!r?Di(this.view,"pointer"):zP(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Cr&&this.mightDrag&&!this.mightDrag.node.isAtom||hr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(ml(this.view,xe.near(this.view.state.doc.resolve(r.pos)),"pointer"),t.preventDefault()):Di(this.view,"pointer")}move(t){this.updateAllowDefault(t),Di(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)}}Mr.touchstart=e=>{e.input.lastTouch=Date.now(),jv(e),Di(e,"pointer")};Mr.touchmove=e=>{e.input.lastTouch=Date.now(),Di(e,"pointer")};Mr.contextmenu=e=>jv(e);function a5(e,t){return e.composing?!0:Cr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const HP=Jn?5e3:-1;Tr.compositionstart=Tr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),Tp(e,!0),e.markCursor=null;else if(Tp(e),io&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let o=n.focusNode,i=n.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}l5(e,HP)};Tr.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.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,l5(e,20))};function l5(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Tp(e),t))}function c5(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=BP());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function BP(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Tp(e,t=!1){if(!(Jn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),c5(e),t||e.docView&&e.docView.dirty){let r=Hv(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):e.updateState(e.state),!0}return!1}}function FP(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const Pl=$r&&Vi<15||Nl&&$N<604;Mr.copy=Tr.cut=(e,t)=>{let r=t,n=e.state.selection,o=r.type=="cut";if(n.empty)return;let i=Pl?null:r.clipboardData,s=n.content(),{dom:a,text:l}=ZE(e,s);i?(r.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):FP(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function VP(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function jP(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?$u(e,n.value,null,o,t):$u(e,n.textContent,n.innerHTML,o,t)},50)}function $u(e,t,r,n,o){let i=e5(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||W.empty)))return!0;if(!i)return!1;let s=VP(i),a=s?e.state.tr.replaceSelectionWith(s,n):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Tr.paste=(e,t)=>{let r=t;if(e.composing&&!Jn)return;let n=Pl?null:r.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&$u(e,n.getData("text/plain"),n.getData("text/html"),o,r)?r.preventDefault():jP(e,r)};class UP{constructor(t,r){this.slice=t,this.move=r}}const u5=En?"altKey":"ctrlKey";Mr.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Fh(r));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof de?o.to-1:o.to))){if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(de.create(e.state.doc,n.mightDrag.pos)));else if(r.target&&r.target.nodeType==1){let c=e.docView.nearestDesc(r.target,!0);c&&c.node.type.spec.draggable&&c!=e.docView&&e.dispatch(e.state.tr.setSelection(de.create(e.state.doc,c.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:l}=ZE(e,s);r.dataTransfer.clearData(),r.dataTransfer.setData(Pl?"Text":"text/html",a.innerHTML),r.dataTransfer.effectAllowed="copyMove",Pl||r.dataTransfer.setData("text/plain",l),e.dragging=new UP(s,!r[u5])};Mr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Tr.dragover=Tr.dragenter=(e,t)=>t.preventDefault();Tr.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let o=e.posAtCoords(Fh(r));if(!o)return;let i=e.state.doc.resolve(o.pos),s=n&&n.slice;s?e.someProp("transformPasted",h=>{s=h(s,e)}):s=e5(e,r.dataTransfer.getData(Pl?"Text":"text/plain"),Pl?null:r.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&!r[u5]);if(e.someProp("handleDrop",h=>h(e,r,s||W.empty,a))){r.preventDefault();return}if(!s)return;r.preventDefault();let l=s?nR(e.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let p=c.doc.resolve(u);if(d&&de.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new de(p));else{let h=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,v,g)=>h=g),c.setSelection(Bv(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Mr.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())&&ei(e)},20))};Mr.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Mr.beforeinput=(e,t)=>{if(hr&&Jn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Hs(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 Tr)Mr[e]=Tr[e];function Hu(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class Op{constructor(t,r){this.toDOM=t,this.spec=r||Js,this.side=this.spec.side||0}map(t,r,n,o){let{pos:i,deleted:s}=t.mapResult(r.from+o,this.side<0?-1:1);return s?null:new Qe(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Op&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Hu(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ui{constructor(t,r){this.attrs=t,this.spec=r||Js}map(t,r,n,o){let i=t.map(r.from+o,this.spec.inclusiveStart?-1:1)-n,s=t.map(r.to+o,this.spec.inclusiveEnd?1:-1)-n;return i>=s?null:new Qe(i,s,this)}valid(t,r){return r.from=t&&(!i||i(a.spec))&&n.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,r-a,n,o+a,i)}}map(t,r,n){return this==dr||t.maps.length==0?this:this.mapInner(t,r,0,0,n||Js)}mapInner(t,r,n,o,i){let s;for(let a=0;a{let c=l+n,u;if(u=f5(r,a,c)){for(o||(o=this.children.slice());ia&&d.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let i=t+1,s=i+r.content.size;for(let a=0;ai&&l.type instanceof Ui){let c=Math.max(i,l.from)-i,u=Math.min(s,l.to)-i;co.map(t,r,Js));return Ni.from(n)}forChild(t,r){if(r.isLeaf)return Me.empty;let n=[];for(let o=0;or instanceof Me)?t:t.reduce((r,n)=>r.concat(n instanceof Me?n:n.members),[]))}}}function WP(e,t,r,n,o,i,s){let a=e.slice();for(let c=0,u=i;c{let b=m-h-(p-f);for(let v=0;vg+u-d)continue;let y=a[v]+u-d;p>=y?a[v+1]=f<=y?-2:-1:h>=o&&b&&(a[v]+=b,a[v+1]+=b)}d+=b}),u=r.maps[c].map(u,-1)}let l=!1;for(let c=0;c=n.content.size){l=!0;continue}let f=r.map(e[c+1]+i,-1),p=f-o,{index:h,offset:m}=n.content.findIndex(d),b=n.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let v=a[c+2].mapInner(r,b,u+1,e[c]+i+1,s);v!=dr?(a[c]=d,a[c+1]=p,a[c+2]=v):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=KP(a,e,t,r,o,i,s),u=_p(c,n,0,s);t=u.local;for(let d=0;dr&&s.to{let c=f5(e,a,l+r);if(c){i=!0;let u=_p(c,a,r+l+1,n);u!=dr&&o.push(l,l+a.nodeSize,u)}});let s=d5(i?p5(e):e,-r).sort(Qs);for(let a=0;a0;)t++;e.splice(t,0,r)}function Sg(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=dr&&t.push(n)}),e.cursorWrapper&&t.push(Me.create(e.state.doc,[e.cursorWrapper.deco])),Ni.from(t)}const qP={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},GP=$r&&Vi<=11;class YP{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 XP{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new YP,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),GP&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,qP)),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 r=0;rthis.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(Fx(this.view)){if(this.suppressingSelectionUpdates)return ei(this.view);if($r&&Vi<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&ia(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 r=new Set,n;for(let i=t.focusNode;i;i=Du(i))r.add(i);for(let i=t.anchorNode;i;i=Du(i))if(r.has(i)){n=i;break}let o=n&&this.view.docView.nearestDesc(n);if(o&&o.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))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 r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Fx(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u1){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),JP(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||ei(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;uo;b--){let v=n.childNodes[b-1],g=v.pmViewDesc;if(v.nodeName=="BR"&&!g){i=b;break}if(!g||g.size)break}let d=e.state.doc,f=e.someProp("domParser")||Rv.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(n,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:e6,context:p});if(c&&c[0].pos!=null){let b=c[0].pos,v=c[1]&&c[1].pos;v==null&&(v=b),h={anchor:b+s,head:v+s}}return{doc:m,sel:h,from:s,to:a}}function e6(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Cr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Cr&&/^(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 t6=/^(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 r6(e,t,r,n,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let C=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,T=Hv(e,C);if(T&&!e.state.selection.eq(T)){if(hr&&Jn&&e.input.lastKeyCode===13&&Date.now()-100z(e,Hs(13,"Enter"))))return;let R=e.state.tr.setSelection(T);C=="pointer"?R.setMeta("pointer",!0):C=="key"&&R.scrollIntoView(),i&&R.setMeta("composition",i),e.dispatch(R)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(r);t=s.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,c=ZP(e,t,r),u=e.state.doc,d=u.slice(c.from,c.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Jn)&&o.some(C=>C.nodeType==1&&!t6.test(C.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",C=>C(e,Hs(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(n&&l instanceof ue&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=Qx(e,e.state.doc,c.sel);if(C&&!C.eq(e.state.selection)){let T=e.state.tr.setSelection(C);i&&T.setMeta("composition",i),e.dispatch(T)}}return}if(hr&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let C=h.endB-h.start;c.sel={anchor:c.sel.anchor+C,head:c.sel.anchor+C}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?h.start=e.state.selection.from:h.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),$r&&Vi<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=c.doc.resolveNoCache(h.start-c.from),b=c.doc.resolveNoCache(h.endB-c.from),v=u.resolve(h.start),g=m.sameParent(b)&&m.parent.inlineContent&&v.end()>=h.endA,y;if((Nl&&e.input.lastIOSEnter>Date.now()-225&&(!g||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!g&&m.posC(e,Hs(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&o6(u,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",C=>C(e,Hs(8,"Backspace")))){Jn&&hr&&e.domObserver.suppressSelectionUpdates();return}hr&&Jn&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),Jn&&!g&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,b=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(C){return C(e,Hs(13,"Enter"))})},20));let k=h.start,x=h.endA,w,E,M;if(g){if(m.pos==b.pos)$r&&Vi<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ei(e),20)),w=e.state.tr.delete(k,x),E=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&(M=n6(m.parent.content.cut(m.parentOffset,b.parentOffset),v.parent.content.cut(v.parentOffset,h.endA-v.start()))))w=e.state.tr,M.type=="add"?w.addMark(k,x,M.mark):w.removeMark(k,x,M.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",T=>T(e,k,x,C)))return;w=e.state.tr.insertText(C,k,x)}}if(w||(w=e.state.tr.replace(k,x,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let C=Qx(e,w.doc,c.sel);C&&!(hr&&Jn&&e.composing&&C.empty&&(h.start!=h.endB||e.input.lastAndroidDeletet.content.size?null:Bv(e,t.resolve(r.anchor),t.resolve(r.head))}function n6(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,o=r,i=n,s,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ur||Eg(s,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,o++,t=!1;if(r){let i=e.node(n).maybeChild(e.indexAfter(n));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function i6(e,t,r,n,o){let i=e.findDiffStart(t,r);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a=a?i-n:0;i-=l,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class s6{constructor(t,r){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 MP,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(n2),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=t2(this),e2(this),this.nodeViews=r2(this),this.docView=Lx(this.state.doc,Zx(this),Sg(this),this.dom,this),this.domObserver=new XP(this,(n,o,i,s)=>r6(this,n,o,i,s)),this.domObserver.start(),TP(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 r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&U1(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(n2),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){let n=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(c5(this),i=!0),this.state=t;let s=n.plugins!=t.plugins||this._props.plugins!=r.plugins;if(s||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=r2(this);l6(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(s||r.handleDOMEvents!=this._props.handleDOMEvents)&&U1(this),this.editable=t2(this),e2(this);let a=Sg(this),l=Zx(this),c=n.plugins!=t.plugins&&!n.doc.eq(t.doc)?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(n.selection))&&(i=!0);let d=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&FN(this);if(i){this.domObserver.stop();let f=u&&($r||hr)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&a6(n.selection,t.selection);if(u){let p=hr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Lx(t.doc,l,a,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&fP(this))?ei(this,f):(XE(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&VN(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof de){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&_x(this,r.getBoundingClientRect(),t)}else _x(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 r=0;rr.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return GN(this,t)}coordsAtPos(t,r=1){return VE(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let o=this.docView.posFromDOM(t,r,n);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,r){return ZN(this,r||this.state,t)}pasteHTML(t,r){return $u(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return $u(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(OP(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return AP(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Cr&&this.root.nodeType===11&&zN(this.dom.ownerDocument)==this.dom?QP(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Zx(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[Qe.node(0,e.state.doc.content.size,t)]}function e2(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:Qe.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function t2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function a6(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function r2(e){let t=Object.create(null);function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=n[o])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function l6(e,t){let r=0,n=0;for(let o in e){if(e[o]!=t[o])return!0;r++}for(let o in t)n++;return r!=n}function n2(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 c6=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const u6=Po(c6);var h5=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ye=(e,t,r)=>(h5(e,t,"read from private field"),r?r.call(e):t.get(e)),$o=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Je=(e,t,r,n)=>(h5(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function d6(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function f6(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function p6(e){return!!(!e.prev&&e.next)}function h6(e){return!!(e.prev&&!e.next)}function m6(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function g6(e){return e==="invalid-exit-split"}var v6=["jump-backward-exit","jump-forward-exit"],y6=["jump-backward-change","jump-forward-change"];function b6(e){var t,r;return Er(v6,(t=e.exit)==null?void 0:t.exitReason)||Er(y6,(r=e.change)==null?void 0:r.changeReason)}function o2(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function i2(e){return rr(e)&&e instanceof ue}function Lr(e){const{match:t,changeReason:r,exitReason:n}=e;return{...t,changeReason:r,exitReason:n}}function k6(e,t){const{invalidPrefixCharacters:r,validPrefixCharacters:n}=t;return r?!new RegExp(K1(r)).test(e):new RegExp(K1(n)).test(e)}function x6(e){const{text:t,regexp:r,$pos:n,suggester:o}=e,i=n.start();let s;return rc(t,r).forEach(a=>{const l=a.input.slice(Math.max(0,a.index-1),a.index);if(k6(l,o)){const c=a.index+i,u=a[0],d=a[1];if(!oe(u)||!oe(d))return;const f=c+u.length,p=Math.min(f,n.pos),h=p-c;c=n.pos&&(s={range:{from:c,to:f,cursor:p},match:a,query:{partial:u.slice(d.length,h),full:u.slice(d.length)},text:{partial:u.slice(0,h),full:u},textAfter:n.doc.textBetween(f,n.end(),Li,Li),textBefore:n.doc.textBetween(i,c,Li,Li),suggester:o})}}),s}function m5(e){const{$pos:t,suggester:r}=e,{char:n,name:o,startOfLine:i,supportedCharacters:s,matchOffset:a,multiline:l,caseInsensitive:c,unicode:u}=r,d=A6({char:n,matchOffset:a,startOfLine:i,supportedCharacters:s,multiline:l,caseInsensitive:c,unicode:u}),f=t.doc.textBetween(t.before(),t.end(),Li,Li);return x6({suggester:r,text:f,regexp:d,$pos:t,char:n,name:o})}function g5(e){const{state:t,match:r}=e;try{return m5({$pos:t.doc.resolve(r.range.cursor),suggester:r.suggester})}catch{return}}function v5(e){const{prev:t,next:r,state:n}=e;return!r&&t.range.from>=n.doc.nodeSize?{exit:Lr({match:t,exitReason:"delete"})}:!r||!t.query.partial?{exit:Lr({match:t,exitReason:"invalid-exit-split"})}:t.range.to===r.range.cursor?{exit:Lr({match:r,exitReason:"exit-end"})}:t.query.partial?{exit:Lr({match:r,exitReason:"exit-split"})}:{}}function w6(e){const{prev:t,next:r,state:n}=e,o=te(),i=g5({state:n,match:t}),{exit:s}=i&&i.query.full!==t.query.full?v5({prev:t,next:i,state:n}):o;return t.range.from=t.range.to)?{exit:Lr({match:t,exitReason:"selection-outside"})}:n.pos>t.range.to?{exit:Lr({match:t,exitReason:"move-end"})}:n.pos<=t.range.from?{exit:Lr({match:t,exitReason:"move-start"})}:{}}function E6(e){const{prev:t,next:r,state:n,$pos:o}=e,i=te();if(!t&&!r)return i;const s={prev:t,next:r};return m6(s)?w6({prev:s.prev,next:s.next,state:n}):p6(s)?{change:Lr({match:s.next,changeReason:"start"})}:h6(s)?S6({$pos:o,match:s.prev,state:n}):d6(s)?{change:Lr({match:s.next,changeReason:"change-character"})}:f6(s)?{change:Lr({match:s.next,changeReason:n.selection.empty?"move":"selection-inside"})}:i}function s2(e,t){for(let r=e.depth;r>0;r--){const n=e.node(r);if(t.includes(n.type.name))return!0}return!1}function W1(e,t){const{$from:r,$to:n}=e;return y5(e,t)?!0:Av(r.pos,n.pos).some(o=>C6(r.doc.resolve(o),t))}function y5(e,t){const{$from:r,$to:n}=e,o=new Set((r.marksAcross(n)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function C6(e,t){const r=new Set(e.marks().map(n=>n.type.name));return t.some(n=>r.has(n))}function M6(e,t){const{$cursor:r}=t,{validMarks:n,validNodes:o,invalidMarks:i,invalidNodes:s}=e;return!n&&!o&&ts(i)&&ts(s)?!0:!(n&&!y5(t,n)||o&&!s2(r,o)||!n&&W1(t,i)||!o&&s2(r,s))}function a2(e){const{suggesters:t,$pos:r,selectionEmpty:n}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!n))try{const i=m5({suggester:o,$pos:r});if(!i)continue;const s={$from:r.doc.resolve(i.range.from),$to:r.doc.resolve(i.range.to),$cursor:r};if(M6(o,s)&&o.isValidPosition(s,i))return i}catch{}}function K1(e){return aA(e)?e.source:e}function T6(e){return e?"^":""}function O6(e,t){return`(?:${K1(e)}){${t},}`}function _6(e){return oe(e)?new RegExp(u6(e)):e}function A6(e){const{char:t,matchOffset:r,startOfLine:n,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:a=!1,unicode:l=!1}=e,c=`g${a?"m":""}${s?"i":""}${l?"u":""}`;let u=_6(t).source;return i&&(u=`(${u})`),new RegExp(`${T6(n)}${u}${O6(o,r)}`,c)}var R6={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},b5="__ignore_prosemirror_suggest_update__",$f,Ic,Ht,Si,Wa,po,Pt,Ei,Ka,k5=class{constructor(e){$o(this,$f,!1),$o(this,Ic,!1),$o(this,Ht,void 0),$o(this,Si,void 0),$o(this,Wa,void 0),$o(this,po,te()),$o(this,Pt,Me.empty),$o(this,Ei,!1),$o(this,Ka,!1),this.setMarkRemoved=()=>{Je(this,Ei,!0)},this.findNextTextSelection=r=>{const n=r.$from.doc,o=Math.min(n.nodeSize-2,r.to+1),i=n.resolve(o),s=xe.findFrom(i,1,!0);if(i2(s))return s},this.ignoreNextExit=()=>{Je(this,Ic,!0)},this.addIgnored=({from:r,name:n,specific:o=!1})=>{const i=ye(this,Ht).find(u=>u.name===n);if(!i)throw new Error(`No suggester exists for the name provided: ${n}`);const s=oe(i.char)?i.char.length:1,a=r+s,l=i.ignoredClassName?{class:i.ignoredClassName}:{},c=Qe.inline(r,a,{nodeName:i.ignoredTag,...l},{name:n,specific:o,char:i.char});Je(this,Pt,ye(this,Pt).add(this.view.state.doc,[c]))},this.removeIgnored=({from:r,name:n})=>{const o=ye(this,Ht).find(a=>a.name===n);if(!o)throw new Error(`No suggester exists for the name provided: ${n}`);const i=oe(o.char)?o.char.length:1,s=ye(this,Pt).find(r,r+i)[0];!s||s.spec.name!==n||Je(this,Pt,ye(this,Pt).remove([s]))},this.clearIgnored=r=>{if(!r){Je(this,Pt,Me.empty);return}const o=ye(this,Pt).find().filter(({spec:i})=>i.name===r);Je(this,Pt,ye(this,Pt).remove(o))},this.findMatchAtPosition=(r,n)=>{const o=n?ye(this,Ht).filter(i=>i.name===n):ye(this,Ht);return a2({suggesters:o,$pos:r,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{Je(this,Ka,!0)};const t=l2();Je(this,Ht,e.map(t)),Je(this,Ht,ra(ye(this,Ht),(r,n)=>n.priority-r.priority))}static create(e){return new k5(e)}get decorationSet(){return ye(this,Pt)}get removed(){return ye(this,Ei)}get match(){return ye(this,Si)?ye(this,Si):ye(this,Wa)&&ye(this,po).exit?ye(this,Wa):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:r}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:r,...e}}shouldRunExit(){return ye(this,Ic)?(Je(this,Ic,!1),!1):!0}updateWithNextSelection(e){var t,r,n;const o=this.findNextTextSelection(e.selection);if(o)for(const i of ye(this,Ht)){const s=(t=ye(this,po).change)==null?void 0:t.suggester.name,a=(r=ye(this,po).exit)==null?void 0:r.suggester.name;(n=i.checkNextValidSelection)==null||n.call(i,o.$from,e,{change:s,exit:a})}}changeHandler(e,t){const{change:r,exit:n}=ye(this,po),o=this.match;if(!r&&!n||!o2(o))return;const i=t===(n==null?void 0:n.suggester.appendTransaction)&&this.shouldRunExit(),s=t===(r==null?void 0:r.suggester.appendTransaction);if(!(!i&&!s)){if(r&&n&&b6({change:r,exit:n})){const a=this.createProps(n),l=this.createProps(r),c=n.range.from{const a=oe(s.char)?s.char.length:1;return i-o!==a});Je(this,Pt,t.remove(n))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return ye(this,Pt).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){Je(this,po,te()),Je(this,Si,void 0),Je(this,Ei,!1),Je(this,Ka,!1)}updateReasons(e){const{$pos:t,state:r}=e,n=ye(this,$f),o=ye(this,Ht),i=r.selection.empty,s=i2(r.selection)?a2({suggesters:o,$pos:t,docChanged:n,selectionEmpty:i}):void 0;Je(this,Si,s&&this.shouldIgnoreMatch(s)?void 0:s),Je(this,po,E6({next:ye(this,Si),prev:ye(this,Wa),state:r,$pos:t}))}addSuggester(e){const t=ye(this,Ht).find(n=>n.name===e.name),r=l2();if(t)Je(this,Ht,ye(this,Ht).map(n=>n===t?r(e):n));else{const n=[...ye(this,Ht),r(e)];Je(this,Ht,ra(n,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=oe(e)?e:e.name;Je(this,Ht,ye(this,Ht).filter(r=>r.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:r}=ye(this,po);if(ye(this,Ka)&&(Je(this,Ka,!1),!(t!=null&&t.suggester.appendTransaction)&&!(r!=null&&r.suggester.appendTransaction)))return this;const{tr:n,state:o}=e,i=n.docChanged||n.selectionSet;return n.getMeta(b5)||!i&&!ye(this,Ei)?this:(Je(this,$f,n.docChanged),this.mapIgnoredDecorations(n),t&&this.resetState(),Je(this,Wa,ye(this,Si)),this.updateReasons({$pos:n.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!o2(t))return ye(this,Pt);const{disableDecorations:r}=t.suggester;if(Le(r)?r(e,t):r)return ye(this,Pt);const{range:o,suggester:i}=t,{name:s,suggestTag:a,suggestClassName:l}=i,{from:c,to:u}=o;return this.shouldIgnoreMatch(t)?ye(this,Pt):ye(this,Pt).add(e.doc,[Qe.inline(c,u,{nodeName:a,class:s?`${l} suggest-${s}`:l},{name:s})])}},N6=k5;$f=new WeakMap;Ic=new WeakMap;Ht=new WeakMap;Si=new WeakMap;Wa=new WeakMap;po=new WeakMap;Pt=new WeakMap;Ei=new WeakMap;Ka=new WeakMap;function l2(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const r={...R6,...t};return e.add(t.name),r}}var x5=new wa("suggest");function Kv(e){return x5.getState(e)}function c2(e,t){return Kv(e).addSuggester(t)}function u2(e){e.setMeta(b5,!0)}function P6(e,t){return Kv(e).removeSuggester(t)}function z6(...e){const t=N6.create(e);return new zo({key:x5,view:r=>(t.init(r),{update:n=>t.changeHandler(n.state.tr,!1)}),state:{init:()=>t,apply:(r,n,o,i)=>t.apply({tr:r,state:i})},appendTransaction:(r,n,o)=>{const i=o.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:r=>t.createDecorations(r)}})}function qv(e,t){const r=Object.getPrototypeOf(t);let n=e.selection,o=e.doc,i=e.storedMarks;const s=te();for(const[a,l]of Object.entries(t))s[a]={value:l};return Object.create(r,{...s,storedMarks:{get(){return i}},selection:{get(){return n}},doc:{get(){return o}},tr:{get(){return n=e.selection,o=e.doc,i=e.storedMarks,e}}})}function yu(e){return({state:t,dispatch:r,view:n,tr:o})=>e(qv(o,t),r,n)}function d2(e){return t=>{var r;return re(t.dispatch===void 0||t.dispatch===((r=t.view)==null?void 0:r.dispatch),{code:H.NON_CHAINABLE_COMMAND}),e(t)}}function L6(...e){return({state:t,dispatch:r,view:n,tr:o,...i})=>{for(const s of e)if(s({state:t,dispatch:r,view:n,tr:o,...i}))return!0;return!1}}var an={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return an.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return an.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return an.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return an.isNode?process.platform==="darwin":an.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function ho(e,t){var r;const n=uz(e);return((r=n==null?void 0:n.getComputedStyle(e))==null?void 0:r.getPropertyValue(t))??""}function ur(e,t){return Object.assign(e.style,t)}function Ap(e){return rr(e)&&hn(e.nodeType)&&oe(e.nodeName)}function kt(e){return Ap(e)&&e.nodeType===1}function I6(e){return Ap(e)&&e.nodeType===3}function Vh(e){const{types:t,node:r}=e;if(!r)return!1;const n=o=>o===r.type||o===r.type.name;return ft(t)?t.some(n):n(t)}function D6(e,t){const{tr:r}=t;return e.forEach(n=>{n.steps.forEach(o=>{r.step(o)})}),r}function $6({pos:e,tr:t}){const r=t.doc.nodeAt(e);return r&&t.delete(e,e+r.nodeSize),t}function H6({pos:e,tr:t,content:r}){const n=t.doc.nodeAt(e);return n&&t.replaceWith(e,e+n.nodeSize,r),t}function Ld(e){const{predicate:t,selection:r}=e,n=E5(r)?r.selection.$from:Xv(r)?r.$from:r;for(let o=n.depth;o>0;o--){const i=n.node(o),s=o>0?n.before(o):0,a=n.start(o),l=s+i.nodeSize;if(t(i,s))return{pos:s,depth:o,node:i,start:a,end:l}}}function B6(e){const{depth:t}=e,r=t>0?e.before(t):0,n=e.node(t),o=e.start(t),i=r+n.nodeSize;return{pos:r,start:o,node:n,end:i,depth:t}}function F6(e){const t=Ld({predicate:()=>!0,selection:e});return re(t,{message:"No parent node found for the selection provided."}),t}function ns(e){const{types:t,selection:r}=e;return Ld({predicate:n=>Vh({types:t,node:n}),selection:r})}function V6(e){const{types:t,selection:r}=e;if(!(!Dd(r)||!Vh({types:t,node:r.node})))return{pos:r.$from.pos,depth:r.$from.depth,start:r.$from.start(),end:r.$from.pos+r.node.nodeSize,node:r.node}}function Gv(e){return Xv(e)?e.empty:e.selection.empty}function j6(e){return e.docChanged||e.selectionSet}function w5(e){return!!Bu(e)}function Bu(e){const{state:t,type:r,attrs:n}=e,{selection:o,doc:i}=t,s=oe(r)?i.type.schema.nodes[r]:r;re(s,{code:H.SCHEMA,message:`No node exists for ${r}`});const a=V6({selection:o,types:r})??Ld({predicate:l=>l.type===s,selection:o});return!n||gp(n)||!a||a.node.hasMarkup(s,{...a.node.attrs,...n})?a:void 0}function Rp(...e){return t=>{if(!rx(e))return!1;const[r,...n]=e;let o=!1;const i=(...l)=>()=>{if(!rx(l))return!1;o=!0;const[,...c]=l;return Rp(...l)({...t,next:i(...c)})},s=i(...n),a=r({...t,next:s});return o||a?a:s()}}function U6(e,t){const r=new Map,n=te();for(const o of e)for(const[i,s]of Lt(o)){const l=[...r.get(i)??[],s],c=Rp(...l);r.set(i,l),n[i]=t(c)}return n}function W6(e){return U6(e,t=>(r,n,o)=>t({state:r,dispatch:n,view:o,tr:r.tr,next:()=>!1}))}function Yv(e,t){const r=e.attrs??{};return Object.entries(t).every(([n,o])=>r[n]===o)}function K6(e){return M5(e,[Go,St,Vt,to])}function oc(e){return rr(e)}function ic(e,t){return ft(t)?Er(t,e[ri]):t===e[ri]}function q6(e){return rr(e)&&e instanceof R1}function G6(e,t){return oe(e)?lt(t.nodes,e):e}function S5(e){return rr(e)&&e instanceof Rd}function Y6(e,t){return oe(e)?lt(t.marks,e):e}function Id(e){return rr(e)&&e instanceof Fi}function X6(e){return rr(e)&&e instanceof N}function J6(e){return rr(e)&&e instanceof _e}function E5(e){return rr(e)&&e instanceof Fs}function gs(e){return rr(e)&&e instanceof ue}function Q6(e){return rr(e)&&e instanceof wr}function Xv(e){return rr(e)&&e instanceof xe}function Z6(e){return rr(e)&&e instanceof _l}function f2(e){const{trState:t,from:r,to:n,type:o,attrs:i={}}=e,{doc:s}=t,a=Y6(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(r,n,a);let l=!1;return n>r&&s.nodesBetween(r,n,c=>l?!1:(l=(c.marks??[]).some(d=>d.type!==a?!1:Yv(d,i)),!l)),l}function Dd(e){return rr(e)&&e instanceof de}function Np(e){const{trState:t,type:r,attrs:n={},from:o,to:i}=e,{selection:s,doc:a,storedMarks:l}=t,c=oe(r)?a.type.schema.marks[r]:r;if(re(c,{code:H.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==r?!1:Yv(d,n??{})):f2({...e,from:s.from,to:s.to})}function Jv(e,t={}){const r=ez(e.type.schema);if(!r)return!1;const{ignoreAttributes:n,ignoreDocAttributes:o}=t;return n?C5(r,e):o?r.content.eq(e.content):r.eq(e)}function C5(e,t){if(e===t)return!0;const r=e.type===t.type&&_e.sameSet(e.marks,t.marks);function n(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const o=[],i=[];e.content.forEach(s=>o.push(s)),t.content.forEach(s=>i.push(s));for(const[s,a]of o.entries()){const l=i[s];if(!l||!C5(a,l))return!1}return!0}return r&&n()}function ez(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function jh(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;re(!1,{code:H.SCHEMA,message:"No default block node found for the provided schema."})}function tz(e){return e.type===jh(e.type.schema)}function Uh(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function ni(e,t,r){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const o=oe(t)?t:t.name,i=n.node.marks.find(({type:d})=>d.name===o);let s=e.index(),a=e.start()+n.offset,l=s+1,c=a+n.node.nodeSize;if(!i)return r&&c0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,a-=e.parent.child(s).nodeSize;for(;le instanceof r)}function C6(e){return _S(e,({from:r,to:n,prevFrom:o,prevTo:i})=>`${r}_${n}_${o}_${i}`).filter((r,n,o)=>!o.some((i,s)=>n===s?!1:r.prevFrom>=i.prevFrom&&r.prevTo<=i.prevTo&&r.from>=i.from&&r.to<=i.to))}function t5(e,t=[]){const r=[],{steps:n,mapping:o}=e,i=o.invert();n.forEach((a,l)=>{if(!e5(a,t))return;const c=[],u=a.getMap(),d=o.slice(l);if(u.ranges.length===0&&m6(a)){const{from:f,to:p}=a;c.push({from:f,to:p})}else u.forEach((f,p)=>{c.push({from:f,to:p})});c.forEach(f=>{const p=d.map(f.from,-1),h=d.map(f.to);r.push({from:p,to:h,prevFrom:i.map(p,-1),prevTo:i.map(h)})})});const s=Gs(r,(a,l)=>a.from-l.from);return C6(s)}function M6(e,t){const r=[],n=t5(e,t);for(const o of n)try{const i=e.doc.resolve(o.from),s=e.doc.resolve(o.to),a=i.blockRange(s);a&&r.push(a)}catch{}return r}function T6(e){var t;return((t=e.content.firstChild)==null?void 0:t.textContent)??""}function O6(e,t){if(!ls(e.selection))return;let{from:r,to:n}=e.selection;const o=(s,a)=>T6(le.between(e.doc.resolve(s),e.doc.resolve(a)).content());for(let s=o(r-1,r);s&&!t.test(s);r--,s=o(r-1,r));for(let s=o(n,n+1);s&&!t.test(s);n++,s=o(n,n+1));if(r===n)return;const i=e.doc.textBetween(r,n,sv,` +`);return{from:a,to:c,text:u,mark:i}}function M5(e,t){return t.length===0||t.some(r=>e instanceof r)}function rz(e){return tE(e,({from:r,to:n,prevFrom:o,prevTo:i})=>`${r}_${n}_${o}_${i}`).filter((r,n,o)=>!o.some((i,s)=>n===s?!1:r.prevFrom>=i.prevFrom&&r.prevTo<=i.prevTo&&r.from>=i.from&&r.to<=i.to))}function T5(e,t=[]){const r=[],{steps:n,mapping:o}=e,i=o.invert();n.forEach((a,l)=>{if(!M5(a,t))return;const c=[],u=a.getMap(),d=o.slice(l);if(u.ranges.length===0&&K6(a)){const{from:f,to:p}=a;c.push({from:f,to:p})}else u.forEach((f,p)=>{c.push({from:f,to:p})});c.forEach(f=>{const p=d.map(f.from,-1),h=d.map(f.to);r.push({from:p,to:h,prevFrom:i.map(p,-1),prevTo:i.map(h)})})});const s=ra(r,(a,l)=>a.from-l.from);return rz(s)}function nz(e,t){const r=[],n=T5(e,t);for(const o of n)try{const i=e.doc.resolve(o.from),s=e.doc.resolve(o.to),a=i.blockRange(s);a&&r.push(a)}catch{}return r}function oz(e){var t;return((t=e.content.firstChild)==null?void 0:t.textContent)??""}function iz(e,t){if(!gs(e.selection))return;let{from:r,to:n}=e.selection;const o=(s,a)=>oz(ue.between(e.doc.resolve(s),e.doc.resolve(a)).content());for(let s=o(r-1,r);s&&!t.test(s);r--,s=o(r-1,r));for(let s=o(n,n+1);s&&!t.test(s);n++,s=o(n,n+1));if(r===n)return;const i=e.doc.textBetween(r,n,Tv,` -`);return{from:r,to:n,text:i}}function r5(e){return O6(e,/\W/)}function sl(e,t=0){const r=at(e)?e[t]:e;return xS(ne(r),`No match string found for match ${e}`),r??""}function _6(e){return ls(e)?e.$cursor:void 0}function A6(e,t){return Cd(e)?t?e.type===t.nodes.doc:e.type.name==="doc":!1}function N6(e){return Xt(e)&&ln(e.anchor)&&ln(e.head)}function Tn(e,t){const r=t.nodeSize-2,n=0;let o;const i=l=>L_({min:n,max:r,value:l});if(_v(e))return e;if(e==="all")return new vr(t);if(e==="start"?o=n:e==="end"?o=r:w6(e)?o=e.pos:o=e,ln(o))return o=i(o),le.near(t.resolve(o));if(N6(o)){const l=i(o.anchor),c=i(o.head);return le.between(t.resolve(l),t.resolve(c))}const s=i(o.from),a=i(o.to);return le.between(t.resolve(s),t.resolve(a))}var R6=3;function n5(e){const{content:t,schema:r,document:n,stringHandler:o,onError:i,attempts:s=0}=e,a=i&&s<=R6||s===0;if(te(a,{code:H.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),ne(t))return te(o,{code:H.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:n,content:t,schema:r});if(QE(t))return t.doc;if(Cd(t))return t;try{return r.nodeFromJSON(t)}catch(l){const c=B6({schema:r,error:l,json:t}),u=i==null?void 0:i(c);return te(u,{code:H.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(c.invalidContent,null,2)}`}),n5({...e,content:u,attempts:s+1})}}function Oh(){const e=aE();if(e)return e;throw new Error(`Unable to retrieve the document from the global scope. +`);return{from:r,to:n,text:i}}function O5(e){return iz(e,/\W/)}function gl(e,t=0){const r=ft(e)?e[t]:e;return qS(oe(r),`No match string found for match ${e}`),r??""}function sz(e){return gs(e)?e.$cursor:void 0}function az(e,t){return Id(e)?t?e.type===t.nodes.doc:e.type.name==="doc":!1}function lz(e){return rr(e)&&hn(e.anchor)&&hn(e.head)}function Pn(e,t){const r=t.nodeSize-2,n=0;let o;const i=l=>fA({min:n,max:r,value:l});if(Xv(e))return e;if(e==="all")return new wr(t);if(e==="start"?o=n:e==="end"?o=r:Z6(e)?o=e.pos:o=e,hn(o))return o=i(o),ue.near(t.resolve(o));if(lz(o)){const l=i(o.anchor),c=i(o.head);return ue.between(t.resolve(l),t.resolve(c))}const s=i(o.from),a=i(o.to);return ue.between(t.resolve(s),t.resolve(a))}var cz=3;function _5(e){const{content:t,schema:r,document:n,stringHandler:o,onError:i,attempts:s=0}=e,a=i&&s<=cz||s===0;if(re(a,{code:H.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),oe(t))return re(o,{code:H.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:n,content:t,schema:r});if(E5(t))return t.doc;if(Id(t))return t;try{return r.nodeFromJSON(t)}catch(l){const c=vz({schema:r,error:l,json:t}),u=i==null?void 0:i(c);return re(u,{code:H.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(c.invalidContent,null,2)}`}),_5({...e,content:u,attempts:s+1})}}function Wh(){const e=PE();if(e)return e;throw new Error(`Unable to retrieve the document from the global scope. It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work. If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string). If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). -If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function o5(e){var t;return(e==null?void 0:e.defaultView)??(typeof window<"u"?window:void 0)??((t=aE())==null?void 0:t.defaultView)}function P6(e){return o5(e==null?void 0:e.ownerDocument)}function z6(e){const t=o5(e)??Oh().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function L6(e,t=Oh()){const r=A6(e,e.type.schema)?e.content:R.from(e);return rn.fromSchema(e.type.schema).serializeFragment(r,{document:t})}function I6(e,t){return new(z6(t)).DOMParser().parseFromString(`${e}`,"text/html").body}function D6(e,t=Oh()){const r=t.createElement("div");return r.append(L6(e,t)),r.innerHTML}function O1(e){const{content:t,schema:r,document:n,fragment:o=!1,...i}=e,s=I6(t,n),a=uv.fromSchema(r);return o?a.parseSlice(s,{...Wx,...i}).content:a.parse(s,{...Wx,...i})}var Wx={preserveWhitespace:!1};function _h(e,t){const r=Cu(t.defaults());return av({...e},r)}function $6(e,t){let r="";t&&(r=`${t.trim()}`);const n=UA(e);if(!n)return r;const o=(r.endsWith(";")," ");return`${r}${o}${n}`}var H6={remove(e,t){let r=e;for(const n of t)n.invalidParentNode||(r=$_(n.path,r));return r}};function B6({json:e,schema:t,...r}){const n=new Set(Cu(t.marks)),o=new Set(Cu(t.nodes)),i=i5({json:e,path:[],validNodes:o,validMarks:n});return{json:e,invalidContent:i,transformers:H6,...r}}function i5(e){const{json:t,validMarks:r,validNodes:n,path:o=[]}=e,i={validMarks:r,validNodes:n},s=[],{type:a,marks:l,content:c}=t;let{invalidParentMark:u=!1,invalidParentNode:d=!1}=e;if(l){const f=[];for(const[p,h]of l.entries()){const m=ne(h)?h:h.type;r.has(m)||(f.unshift({name:m,path:[...o,"marks",`${p}`],type:"mark",invalidParentMark:u,invalidParentNode:d}),u=!0)}s.push(...f)}if(n.has(a)||(s.push({name:a,type:"node",path:o,invalidParentMark:u,invalidParentNode:d}),d=!0),c){const f=[];for(const[p,h]of c.entries())f.unshift(...i5({...i,json:h,path:[...o,"content",`${p}`],invalidParentMark:u,invalidParentNode:d}));s.unshift(...f)}return s}function F6(e){return!!(ls(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function _1(e){return!!(ls(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function Kx(e){const t=be.atStart(e.$anchor.doc);return!!(_1(e)&&t.anchor===e.anchor)}function V6(e){return({dispatch:t,tr:r})=>{const{type:n,attrs:o=ee(),appendText:i,range:s}=e,a=s?le.between(r.doc.resolve(s.from),r.doc.resolve(s.to)):r.selection,{$from:l,from:c,to:u}=a;let d=l.depth===0?r.doc.type.allowsMarkType(n):!1;return r.doc.nodesBetween(c,u,f=>{if(d)return!1;if(f.inlineContent&&f.type.allowsMarkType(n)){d=!0;return}}),d?(t==null||t(r.addMark(c,u,n.create(o))&&i?r.insertText(i):r),!0):!1}}function j6({tr:e,dispatch:t}){const{$from:r,$to:n}=e.selection,o=r.blockRange(n),i=o&&ql(o);return!ln(i)||!o?!1:(t==null||t(e.lift(o,i).scrollIntoView()),!0)}function s5(e,t={},r){return function(n){const{tr:o,dispatch:i,state:s}=n,a=ne(e)?nt(s.schema.nodes,e):e,{from:l,to:c}=Tn(r??o.selection,o.doc),u=o.doc.resolve(l),d=o.doc.resolve(c),f=u.blockRange(d),p=f&&fv(f,a,t);return!p||!f?!1:(i==null||i(o.wrap(f,p).scrollIntoView()),!0)}}function a5(e,t={},r){return n=>{const{tr:o,state:i}=n,s=ne(e)?nt(i.schema.nodes,e):e;return Au({state:o,type:s,attrs:t})?j6(n):s5(e,t,r)(n)}}function Nu(e,t,r,n=!0){return function(o){const{tr:i,dispatch:s,state:a}=o,l=ne(e)?nt(a.schema.nodes,e):e,{from:c,to:u}=Tn(r??i.selection,i.doc);let d=!1,f;return i.doc.nodesBetween(c,u,(p,h)=>{if(d)return!1;if(!p.isTextblock||p.hasMarkup(l,t))return;if(p.type===l){d=!0,f=p.attrs;return}const m=i.doc.resolve(h),b=m.index();d=m.parent.canReplaceWith(b,b+1,l),d&&(f=m.parent.attrs)}),d?(s==null||s(i.setBlockType(c,u,l,{...n?f:{},...t}).scrollIntoView()),!0):!1}}function Nv(e){return t=>{const{tr:r,state:n}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,a=Au({state:r,type:o,attrs:i}),l=e.toggleType??Mh(n.schema);if(a)return Nu(l,{...s?a.node.attrs:{},...i})(t);const c=Au({state:r,type:l,attrs:i});return Nu(o,{...s?c==null?void 0:c.node.attrs:{},...i})(t)}}function U6(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(nt(t,2),10)>=e:!1}function W6(e,t){let{head:r,empty:n,anchor:o}=e;for(const i of t.steps)r=i.getMap().map(r);n?t.setSelection(le.near(t.doc.resolve(r))):t.setSelection(le.between(t.doc.resolve(o),t.doc.resolve(r)))}function K6(e){const{attrs:t={},appendText:r="",content:n="",keepSelection:o=!1,range:i}=e;return({state:s,tr:a,dispatch:l})=>{var c;const u=s.schema,d=Tn(e.selection??i??a.selection,a.doc),f=d.$from.index(),{from:p,to:h,$from:m}=d,b=ne(e.type)?u.nodes[e.type]??u.marks[e.type]:e.type;if(te(ne(e.type)?b:!0,{code:H.SCHEMA,message:`Schema contains no marks or nodes with name ${b}`}),g6(b)){if(!m.parent.canReplaceWith(f,f,b))return!1;a.replaceWith(p,h,b.create(t,n?u.text(n):void 0))}else te(n,{message:"`replaceText` cannot be called without content when using a mark type"}),a.replaceWith(p,h,u.text(n,XE(b)?[b.create(t)]:void 0));return r&&a.insertText(r),o&&W6(s.selection,a),l&&(U6(60)&&((c=document.getSelection())==null||c.empty()),l(a)),!0}}function l5(e,t){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const{marks:n,nodeSize:o}=r.node;if(n[0])return n[0].type;const s=e.start()+r.offset+o;return l5(e.doc.resolve(s+1))}function c5(e){return({dispatch:t,tr:r,state:n})=>{const{type:o,expand:i=!0,range:s}=e,a=Tn(e.selection??s??r.selection,r.doc);let{from:l,to:c,$from:u,$to:d}=a;const f=ne(o)?n.schema.marks[o]:o;f!==null&&te(f,{code:H.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const p=f??l5(u);if(!p)return!1;const h=Yo(u,p,d);return i&&h&&(l=Math.max(0,Math.min(l,h.from)),c=Math.min(Math.max(c,h.to),r.doc.nodeSize-2)),t==null||t(r.removeMark(l,ln(c)?c:l,XE(f)?f:void 0)),!0}}function q6(e){const t=["command","cmd","meta"];return en.isMac&&t.push("mod"),t.includes(e)}function G6(e){const t=["control","ctrl"];return en.isMac||t.push("mod"),t.includes(e)}function Y6(e){const t=[];for(let r of e.split("-")){if(r=r.toLowerCase(),q6(r)){t.push({type:"modifier",symbol:"⌘",key:"command",i18n:Mt.COMMAND_KEY});continue}if(G6(r)){t.push({type:"modifier",symbol:"⌃",key:"control",i18n:Mt.CONTROL_KEY});continue}switch(r){case"shift":t.push({type:"modifier",symbol:"⇧",key:r,i18n:Mt.SHIFT_KEY});continue;case"alt":t.push({type:"modifier",symbol:"⌥",key:r,i18n:Mt.ALT_KEY});continue;case` -`:case"\r":case"enter":t.push({type:"named",symbol:"↵",key:r,i18n:Mt.ENTER_KEY});continue;case"backspace":t.push({type:"named",symbol:"⌫",key:r,i18n:Mt.BACKSPACE_KEY});continue;case"delete":t.push({type:"named",symbol:"⌦",key:r,i18n:Mt.DELETE_KEY});continue;case"escape":t.push({type:"named",symbol:"␛",key:r,i18n:Mt.ESCAPE_KEY});continue;case"tab":t.push({type:"named",symbol:"⇥",key:r,i18n:Mt.TAB_KEY});continue;case"capslock":t.push({type:"named",symbol:"⇪",key:r,i18n:Mt.CAPS_LOCK_KEY});continue;case"space":t.push({type:"named",symbol:"␣",key:r,i18n:Mt.SPACE_KEY});continue;case"pageup":t.push({type:"named",symbol:"⤒",key:r,i18n:Mt.PAGE_UP_KEY});continue;case"pagedown":t.push({type:"named",symbol:"⤓",key:r,i18n:Mt.PAGE_DOWN_KEY});continue;case"home":t.push({type:"named",key:r,i18n:Mt.HOME_KEY});continue;case"end":t.push({type:"named",key:r,i18n:Mt.END_KEY});continue;case"arrowleft":t.push({type:"named",symbol:"←",key:r,i18n:Mt.ARROW_LEFT_KEY});continue;case"arrowright":t.push({type:"named",symbol:"→",key:r,i18n:Mt.ARROW_RIGHT_KEY});continue;case"arrowup":t.push({type:"named",symbol:"→",key:r,i18n:Mt.ARROW_UP_KEY});continue;case"arrowdown":t.push({type:"named",symbol:"↓",key:r,i18n:Mt.ARROW_DOWN_KEY});continue;default:t.push({type:"char",key:r});continue}}return t}function J6(e){const{node:t,predicate:r,descend:n=!0,action:o}=e;te(Cd(t),{code:H.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),te(Pe(r),{code:H.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((s,a)=>{const l={node:s,pos:a};return r(l)&&(i.push(l),o==null||o(l)),n}),i}function X6(e){const{type:t,...r}=e;return J6({...r,predicate:n=>n.node.type===t})}function Q6(e,t={}){const{descend:r=!1,predicate:n,StepTypes:o}=t,i=M6(e,o),s=[];for(const a of i){const{start:l,end:c}=a;e.doc.nodesBetween(l,c,(u,d)=>(((n==null?void 0:n(u,d,a))??!0)&&s.push({node:u,pos:d}),r))}return s}function Ru(e){const{regexp:t,type:r,getAttributes:n,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:a,invalidMarks:l}=e;let c;const u=new ha(t,(d,f,p,h)=>{const{tr:m,schema:b}=d;c||(c=ne(r)?b.marks[r]:r,te(c,{code:H.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}));let v=f[1],g=f[0];const y=d5({captureGroup:v,fullMatch:g,end:h,start:p,rule:u,state:d,ignoreWhitespace:o,invalidMarks:l,shouldSkip:a,updateCaptured:s});if(!y)return null;({start:p,end:h,captureGroup:v,fullMatch:g}=y);const k=Pe(n)?n(f):n;let x=h,w=[];if(v){const E=g.search(/\S/),M=p+g.indexOf(v),C=M+v.length;w=m.storedMarks??[],Cp&&m.delete(p+E,M),x=p+E+v.length}return m.addMark(p,x,c.create(k)),m.setStoredMarks(w),i==null||i({tr:m,match:f,start:p,end:h}),m});return u}function u5(e){const{regexp:t,type:r,getAttributes:n,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:a,invalidMarks:l}=e,c=new ha(t,(u,d,f,p)=>{const h=Pe(n)?n(d):n,{tr:m,schema:b}=u,v=ne(r)?b.nodes[r]:r;let g=d[1],y=d[0];const k=d5({captureGroup:g,fullMatch:y,end:p,start:f,rule:c,state:u,ignoreWhitespace:s,invalidMarks:l,shouldSkip:i,updateCaptured:a});if(!k)return null;({start:f,end:p,captureGroup:g,fullMatch:y}=k),te(v,{code:H.SCHEMA,message:`No node exists for ${r} in the schema.`});const x=v.createAndFill(h);return x&&(m.replaceRangeWith(v.isBlock?m.doc.resolve(f).before():f,p,x),o==null||o({tr:m,match:[y,g??""],start:f,end:p})),m});return c}function d5({captureGroup:e,fullMatch:t,end:r,start:n,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:a,state:l,invalidMarks:c}){var u;if(t==null)return null;const d=(a==null?void 0:a({captureGroup:e,fullMatch:t,start:n,end:r}))??{};e=d.captureGroup??e,t=d.fullMatch??t,n=d.start??n,r=d.end??r;const f=l.doc.resolve(n),p=l.doc.resolve(r);return c&&M1({$from:f,$to:p},c)||o.invalidMarks&&M1({$from:f,$to:p},o.invalidMarks)||i&&(e==null?void 0:e.trim())===""||s!=null&&s({state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})||(u=o.shouldSkip)!=null&&u.call(o,{state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})?null:{captureGroup:e,end:r,fullMatch:t,start:n}}var Z6=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),r={},n=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,l]=a.split("_");r[l]=a}else n.push(a)})});const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(r[i]);return o.push(...n),o.join(" ")},ez=Z6;const f5=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function tz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const p5=(e,t,r)=>{let n=tz(e,r);if(!n)return!1;let o=h5(n);if(!o){let s=n.blockRange(),a=s&&ql(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&v5(e,o,t))return!0;if(n.parent.content.size==0&&(El(i,"end")||ce.isSelectable(i))){let s=pv(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;i=h5(n)}let s=i&&i.nodeBefore;return!s||!ce.isSelectable(s)?!1:(t&&t(e.tr.setSelection(ce.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function h5(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 nz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=nz(e,r);if(!n)return!1;let o=m5(n);if(!o)return!1;let i=o.nodeAfter;if(v5(e,o,t))return!0;if(n.parent.content.size==0&&(El(i,"start")||ce.isSelectable(i))){let s=pv(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function Rv(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let o=r.node(-1),i=r.indexAfter(-1),s=Rv(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(be.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},az=(e,t)=>{let r=e.selection,{$from:n,$to:o}=r;if(r instanceof vr||n.parent.inlineContent||o.parent.inlineContent)return!1;let i=Rv(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!n.parentOffset&&o.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(nl(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),o=n&&ql(n);return o==null?!1:(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)};function cz(e){return(t,r)=>{let{$from:n,$to:o}=t.selection;if(t.selection instanceof ce&&t.selection.node.isBlock)return!n.parentOffset||!nl(t.doc,n.pos)?!1:(r&&r(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(r){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof le||t.selection instanceof vr)&&s.deleteSelection();let a=n.depth==0?null:Rv(n.node(-1).contentMatchAt(n.indexAfter(-1))),l=e&&e(o.parent,i),c=l?[l]:i&&a?[{type:a}]:void 0,u=nl(s.doc,s.mapping.map(n.pos),1,c);if(!c&&!u&&nl(s.doc,s.mapping.map(n.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=a)){let d=s.mapping.map(n.before()),f=s.doc.resolve(d);a&&n.node(-1).canReplaceWith(f.index(),f.index()+1,a)&&s.setNodeMarkup(s.mapping.map(n.before()),a)}r(s.scrollIntoView())}return!0}}const uz=cz(),dz=(e,t)=>{let{$from:r,to:n}=e.selection,o,i=r.sharedDepth(n);return i==0?!1:(o=r.before(i),t&&t(e.tr.setSelection(ce.create(e.doc,o))),!0)},fz=(e,t)=>(t&&t(e.tr.setSelection(new vr(e.doc))),!0);function pz(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i=t.index();return!n||!o||!n.type.compatibleContent(o.type)?!1:!n.content.size&&t.parent.canReplace(i-1,i)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||xd(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function v5(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i,s;if(n.type.spec.isolating||o.type.spec.isolating)return!1;if(pz(e,t,r))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=n.contentMatchAt(n.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(r){let d=t.pos+o.nodeSize,f=R.empty;for(let m=i.length-1;m>=0;m--)f=R.from(i[m].create(null,f));f=R.from(n.copy(f));let p=e.tr.step(new yt(t.pos-1,d,t.pos,d,new W(f,1,0),i.length,!0)),h=d+2*i.length;xd(p.doc,h)&&p.join(h),r(p.scrollIntoView())}return!0}let l=be.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&ql(c);if(u!=null&&u>=t.depth)return r&&r(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&El(o,"start",!0)&&El(n,"end")){let d=n,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let p=o,h=1;for(;!p.isTextblock;p=p.firstChild)h++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(r){let m=R.empty;for(let v=f.length-1;v>=0;v--)m=R.from(f[v].copy(m));let b=e.tr.step(new yt(t.pos-f.length,t.pos+o.nodeSize,t.pos+h,t.pos+o.nodeSize-h,new W(m,f.length,0),0,!0));r(b.scrollIntoView())}return!0}}return!1}function y5(e){return function(t,r){let n=t.selection,o=e<0?n.$from:n.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(r&&r(t.tr.setSelection(le.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const hz=y5(-1),mz=y5(1);function gz(e,t,r){for(let n=0;n{if(s)return!1;s=a.inlineContent&&a.type.allowsMarkType(r)}),s)return!0}return!1}function vz(e,t=null){return function(r,n){let{empty:o,$cursor:i,ranges:s}=r.selection;if(o&&!i||!gz(r.doc,s,e))return!1;if(n)if(i)e.isInSet(r.storedMarks||i.marks())?n(r.tr.removeStoredMark(e)):n(r.tr.addStoredMark(e.create(t)));else{let a=!1,l=r.tr;for(let c=0;!a&&c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},bz=typeof navigator<"u"&&/Mac/.test(navigator.platform),kz=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Gt=0;Gt<10;Gt++)Ji[48+Gt]=Ji[96+Gt]=String(Gt);for(var Gt=1;Gt<=24;Gt++)Ji[Gt+111]="F"+Gt;for(var Gt=65;Gt<=90;Gt++)Ji[Gt]=String.fromCharCode(Gt+32),kp[Gt]=String.fromCharCode(Gt);for(var lg in Ji)kp.hasOwnProperty(lg)||(kp[lg]=Ji[lg]);function xz(e){var t=bz&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||kz&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?kp:Ji)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const wz=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Sz(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,o,i,s;for(let a=0;a127)&&(i=Ji[n.keyCode])&&i!=o){let a=t[cg(i,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}function Cz(e){const t=Gs(e,(i,s)=>(s.priority??De.Low)-(i.priority??De.Low)),r=[],n=[];for(const i of t)Rz(i)?r.push(i):n.push(i);let o;return new Mo({key:Mz,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,a,l;const c=o.state.selection.$from,u=c.node().type.name,d=new Set(c.marks().map(f=>f.type.name));for(const f of r){if((s=f.ignoredNodes)!=null&&s.includes(u)||(a=f.ignoredMarks)!=null&&a.some(g=>d.has(g)))continue;const p=((l=i.content.firstChild)==null?void 0:l.textContent)??"",h=!o.state.selection.empty&&i.content.childCount===1&&p,m=Kl(p,f.regexp)[0];if(h&&m&&f.type==="mark"&&f.replaceSelection){const{from:g,to:y}=o.state.selection,k=o.state.doc.slice(g,y),x=k.content.textBetween(0,k.content.size);if(typeof f.replaceSelection!="boolean"?f.replaceSelection(x):f.replaceSelection){const w=[],{getAttributes:E,markType:M}=f,C=Pe(E)?E(m,!0):E,T=M.create(C);return k.content.forEach(N=>{if(N.isText){const z=T.addToSet(N.marks);w.push(N.mark(z))}}),W.maxOpen(R.fromArray(w))}}const{nodes:b,transformed:v}=Az(i.content,f,o.state.schema);v&&(i=f.type==="node"&&f.nodeType.isBlock?new W(R.fromArray(b),0,0):new W(R.fromArray(b),i.openStart,i.openEnd))}return Iz(i)},handleDOMEvents:{paste:(i,s)=>{var a,l;const c=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{clipboardData:u}=c;if(!u)return!1;const d=[...u.items].map(p=>p.getAsFile()).filter(p=>!!p);if(d.length===0)return!1;const{selection:f}=i.state;for(const{fileHandler:p,regexp:h}of n){const m=h?d.filter(b=>h.test(b.type)):d;if(m.length!==0&&p({event:c,files:m,selection:f,view:i,type:"paste"}))return c.preventDefault(),!0}return!1},drop:(i,s)=>{var a,l,c;const u=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{dataTransfer:d,clientX:f,clientY:p}=u;if(!d)return!1;const h=Lz(u);if(h.length===0)return!1;const m=((c=i.posAtCoords({left:f,top:p}))==null?void 0:c.pos)??i.state.selection.anchor;for(const{fileHandler:b,regexp:v}of n){const g=v?h.filter(y=>v.test(y.type)):h;if(g.length!==0&&b({event:u,files:g,pos:m,view:i,type:"drop"}))return u.preventDefault(),!0}return!1}}}})}var Mz=new pa("pasteRule");function ug(e,t){return function r(n){const{fragment:o,rule:i,nodes:s}=n,{regexp:a,ignoreWhitespace:l,ignoredMarks:c,ignoredNodes:u}=i;let d=!1;return o.forEach(f=>{if(u!=null&&u.includes(f.type.name)||Pz(f)){s.push(f);return}if(!f.isText){const m=r({fragment:f.content,rule:i,nodes:[]});d||(d=m.transformed);const b=R.fromArray(m.nodes);f.type.validContent(b)?s.push(f.copy(b)):s.push(...m.nodes);return}if(f.marks.some(m=>zz(m)||(c==null?void 0:c.includes(m.type.name)))){s.push(f);return}const p=f.text??"";let h=0;for(const m of Kl(p,a)){const b=m[1],v=m[0];if(l&&(b==null?void 0:b.trim())===""||!v)return;const g=m.index,y=g+v.length;g>h&&s.push(f.cut(h,g));let k=f.cut(g,y);if(v&&b){const x=v.search(/\S/),w=g+v.indexOf(b),E=w+b.length;x&&s.push(f.cut(g,g+x)),k=f.cut(w,E)}e({nodes:s,rule:i,textNode:k,match:m,schema:t}),d=!0,h=y}p&&h0?[...n.files]:(r=n.items)!=null&&r.length?[...n.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function Iz(e){const t=W.maxOpen(e.content);return t.openStart({events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}});var Dz=Object.defineProperty,$z=Object.getOwnPropertyDescriptor,Z=(e,t,r,n)=>{for(var o=n>1?void 0:n?$z(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Dz(t,r,o),o},k5=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},q=(e,t,r)=>(k5(e,t,"read from private field"),r?r.call(e):t.get(e)),kt=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Lt=(e,t,r,n)=>(k5(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function Hz(e,t){return e===t}function Gx(e){const{previousOptions:t,update:r,equals:n=Hz}=e,o=Rs({...t,...r}),i=ee(),s=Cu(t);for(const l of s){const c=t[l],u=o[l];if(n(c,u)){i[l]={changed:!1};continue}i[l]={changed:!0,previousValue:c,value:u}}const a=l=>{const c=ee();for(const u of l){const d=i[u];d!=null&&d.changed&&(c[u]=d.value)}return c};return{changes:Rs(i),options:o,pickChanged:a}}var Bz={[H.DUPLICATE_HELPER_NAMES]:"helper method",[H.DUPLICATE_COMMAND_NAMES]:"command method"};function x5(e){const{name:t,set:r,code:n}=e,o=Bz[n];te(!r.has(t),{code:n,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),r.add(t)}function Pu(...e){return yl(ez(...e).split(" ")).join(" ")}var Yx="__IGNORE__",Fz="__ALL__",Jl=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=ee(),this.populateMappedHandlers(),this._options=this._initialOptions=OS(e,this.constructor.defaultOptions,t??ee(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const e=[],{customHandlerKeys:t,handlerKeys:r,staticKeys:n}=this.constructor;for(const o of Cu(this._options))n.includes(o)||r.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){}setOptions(e){var t;const r=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:n,options:o,pickChanged:i}=Gx({previousOptions:r,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:n,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:r,options:n,pickChanged:o}=Gx({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(n),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:n,changes:r,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return av(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(const e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){const e=ee();for(const t of this.constructor.handlerKeys)e[t]=(...r)=>{var n;const{handlerKeyOptions:o}=this.constructor,i=(n=o[t])==null?void 0:n.reducer;let s=i==null?void 0:i.getDefault(...r);for(const[,a]of this._mappedHandlers[t]){const l=a(...r);if(s=i?i.accumulator(s,l,...r):l,Vz(o,s,t))return s}return s};return e}addHandler(e,t,r=De.Default){return this._mappedHandlers[e].push([r,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,n])=>n!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=Gs(this._mappedHandlers[e],([t],[r])=>r-t)}addCustomHandler(e,t){var r;return((r=this.onAddCustomHandler)==null?void 0:r.call(this,{[e]:t}))??TS}};Jl.defaultOptions={};Jl.staticKeys=[];Jl.handlerKeys=[];Jl.handlerKeyOptions={};Jl.customHandlerKeys=[];function Vz(e,t,r){const{[Fz]:n}=e,o=e[r];return!n&&!o?!1:!!(o&&o.earlyReturnValue!==Yx&&(Pe(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||n&&n.earlyReturnValue!==Yx&&(Pe(n.earlyReturnValue)?n.earlyReturnValue(t)===!0:t===n.earlyReturnValue))}var Rh=class extends Jl{constructor(...e){super(jz,...e),this["~E"]={},this._extensions=_S(this.createExtensions(),t=>t.constructor),this.extensionMap=new Map;for(const t of this._extensions)this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${bS(this.name)}Extension`}get store(){return te(this._store,{code:H.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Rs(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(r=>t.constructor===e?t:r))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return te(t,{code:H.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};Rh.defaultPriority=De.Default;var je=class extends Rh{static get[Go](){return $t.PlainExtensionConstructor}get[Go](){return $t.PlainExtension}},cs=class extends Rh{static get[Go](){return $t.MarkExtensionConstructor}get[Go](){return $t.MarkExtension}get type(){return nt(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};cs.disableExtraAttributes=!1;var Qt=class extends Rh{static get[Go](){return $t.NodeExtensionConstructor}get[Go](){return $t.NodeExtension}get type(){return nt(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};Qt.disableExtraAttributes=!1;var jz={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function w5(e){return Gl(e)&&Yl(e,[$t.PlainExtension,$t.MarkExtension,$t.NodeExtension])}function Uz(e){return Gl(e)&&Yl(e,[$t.PlainExtensionConstructor,$t.MarkExtensionConstructor,$t.NodeExtensionConstructor])}function S5(e){return Gl(e)&&Yl(e,$t.PlainExtension)}function Td(e){return Gl(e)&&Yl(e,$t.NodeExtension)}function Ph(e){return Gl(e)&&Yl(e,$t.MarkExtension)}function me(e){return t=>{const{defaultOptions:r,customHandlerKeys:n,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:a,...l}=e,c=t;r&&(c.defaultOptions=r),s&&(c.defaultPriority=s),a&&(c.handlerKeyOptions=a),c.staticKeys=i??[],c.handlerKeys=o??[],c.customHandlerKeys=n??[];for(const[u,d]of Object.entries(l))c[u]||(c[u]=d);return c}}var Wz=class extends je{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=ee(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,r;if(this.attributeObject=ee(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const n of this.store.extensions){if((t=n.options.exclude)!=null&&t.attributes)continue;const o=(r=n.createAttributes)==null?void 0:r.call(n),i={...o,class:Pu(...n.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const n of this.attributeList)this.attributeObject={...this.attributeObject,...n,class:Pu(this.attributeObject.class,n.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function Ue(e={}){return(t,r,n)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[r]=e}}function G(e={}){return(t,r,n)=>{(t.decoratedCommands??(t.decoratedCommands={}))[r]=e}}function Et(e){return(t,r,n)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[r]=e}}var Kz=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let r=!0;const{view:n,tr:o,dispatch:i}=t;if(!n)return!1;for(const a of this.validateHandlers)if(!a({...t,dispatch:()=>{}})){r=!1;break}return!i||!r?r:(this.promiseCreator(t).then(a=>{this.runHandlers(this.successHandlers,{value:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}).catch(a=>{this.runHandlers(this.failureHandlers,{error:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}),i(o),!0)}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var r;for(const n of e)if(!n({...t,dispatch:()=>{}}))break;(r=t.dispatch)==null||r.call(t,t.tr)}};function Xi(e){const{type:t,attrs:r,range:n,selection:o}=e;return i=>{const{dispatch:s,tr:a,state:l}=i,c=ne(t)?l.schema.marks[t]:t;if(te(c,{code:H.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),n||o){const{from:u,to:d}=Tn(o??n??a.selection,a.doc);return bp({trState:a,type:t,...n})?s==null||s(a.removeMark(u,d,c)):s==null||s(a.addMark(u,d,c.create(r))),!0}return cu(vz(c,r))(i)}}function qz(e,t,r){for(const{$from:n,$to:o}of r){let i=n.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(n.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(e)}),i)return!0}return!1}function Gz(e,t,r){return({tr:n,dispatch:o,state:i})=>{const s=Tn(r??n.selection,n.doc),a=_6(s),l=ne(e)?i.schema.marks[e]:e;if(te(l,{code:H.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),s.empty&&!a||!qz(l,n.doc,s.ranges))return!1;if(!o)return!0;if(a)return n.removeStoredMark(l),t&&n.addStoredMark(l.create(t)),o(n),!0;let c=!1;for(const{$from:u,$to:d}of s.ranges){if(c)break;c=n.doc.rangeHasMark(u.pos,d.pos,l)}for(const{$from:u,$to:d}of s.ranges)c&&n.removeMark(u.pos,d.pos,l),t&&n.addMark(u.pos,d.pos,l.create(t));return o(n),!0}}function Yz(e,t={}){return({tr:r,dispatch:n,state:o})=>{const i=o.schema,s=r.selection,{from:a=s.from,to:l=a??s.to,marks:c={}}=t;if(!n)return!0;r.insertText(e,a,l);const u=nt(r.steps,r.steps.length-1).getMap().map(l);for(const[d,f]of At(c))r.addMark(a,u,nt(i.marks,d).create(f));return n(r),!0}}var ke=class extends je{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:r}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:yl([...r,...t])}),e}}get name(){return"commands"}get transaction(){const e=this.store.getState();this._transaction||(this._transaction=e.tr);const t=this._transaction.before.eq(e.doc),r=!qi(this._transaction.steps);if(!t){const n=e.tr;if(r)for(const o of this._transaction.steps)n.step(o);this._transaction=n}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:r,helpers:n}=this.store,o=ee(),i=new Set;let s=ee();const a=c=>{var u;const d=ee(),f=()=>c??this.transaction;let p=[];const h=()=>p;for(const[b,v]of Object.entries(o))(u=s[b])!=null&&u.disableChaining||(d[b]=this.chainedFactory({chain:d,command:v.original,getTr:f,getChain:h}));const m=b=>{te(b===f(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(b={})=>{const v=p;p=[];for(const g of v)if(!g(m)&&b.exitEarly)return;e.dispatch(f())},d.tr=()=>{const b=p;p=[];for(const v of b)v(m);return f()},d.enabled=()=>{for(const b of p)if(!b())return!1;return!0},d.new=b=>a(b),d};for(const c of r){const u=((t=c.createCommands)==null?void 0:t.call(c))??{},d=c.decoratedCommands??{},f={};s={...s,decoratedCommands:d};for(const[p,h]of Object.entries(d)){const m=ne(h.shortcut)&&h.shortcut.startsWith("_|")?{shortcut:n.getNamedShortcut(h.shortcut,c.options)}:void 0;this.updateDecorated(p,{...h,name:c.name,...m}),u[p]=c[p].bind(c),h.active&&(f[p]=()=>{var b;return((b=h.active)==null?void 0:b.call(h,c.options,this.store))??!1})}np(u)||this.addCommands({active:f,names:i,commands:o,extensionCommands:u})}const l=a();for(const[c,u]of Object.entries(l))a[c]=u;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",a),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",a)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return ne(e)?Yz(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(r,n,o)=>this.insertText(r,{...t,...n})(o)}).generateCommand()}selectText(e,t={}){return({tr:r,dispatch:n})=>{const o=Tn(e,r.doc);return r.selection.anchor===o.anchor&&r.selection.head===o.head&&!t.forceUpdate?!1:(n==null||n(r.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:r}=t,n=Yo(r.selection.$from,e);return n?this.store.commands.selectText.original({from:n.from,to:n.to})(t):!1}}delete(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=e??t.selection;return r==null||r(t.delete(n,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:r})=>(r&&(e==null||e(),r(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:r})=>(r==null||r(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:r,dispatch:n})=>(n==null||n(r.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return r=>{const{tr:n,dispatch:o}=r,i=this.store.manager.createState({content:e,selection:t});return i?(o==null||o(n.replaceRangeWith(0,n.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:r}=e,n=this.store.manager.createEmptyDoc();return n?this.setContent(n)(e):(r==null||r(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t==null||t(e.setSelection(le.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>ls(t.selection)?(e==null||e(t.insertText(` -`)),!0):!1}insertNode(e,t={}){return({dispatch:r,tr:n,state:o})=>{var i;const{attrs:s,range:a,selection:l,replaceEmptyParentBlock:c=!1}=t,{from:u,to:d,$from:f}=Tn(l??a??n.selection,n.doc);if(Cd(e)||b6(e)){const v=f.before(f.depth);return r==null||r(c&&u===d&&Th(f.parent)?n.replaceWith(v,v+f.parent.nodeSize,e):n.replaceWith(u,d,e)),!0}const p=ne(e)?o.schema.nodes[e]:e;te(p,{code:H.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const h=(i=t.marks)==null?void 0:i.map(v=>{if(v instanceof Te)return v;const g=ne(v)?o.schema.marks[v]:v;return te(g,{code:H.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),g.create()}),m=p.createAndFill(s,ne(t.content)?o.schema.text(t.content):t.content,h);if(!m)return!1;const b=u!==d;return r==null||r(b?n.replaceRangeWith(u,d,m):n.insert(u,m)),!0}}focus(e){return t=>{const{dispatch:r,tr:n}=t,{view:o}=this.store;if(e===!1||o.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){const{from:i=0,to:s=i}=n.selection;e={from:i,to:s}}return r&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:r}=this.store;return r.hasFocus()?(requestAnimationFrame(()=>{r.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,r,n=!0){return Nu(e,t,r,n)}toggleWrappingNode(e,t,r){return a5(e,t,r)}toggleBlockNodeItem(e){return Nv(e)}wrapInNode(e,t,r){return s5(e,t,r)}applyMark(e,t,r){return Gz(e,t,r)}toggleMark(e){return Xi(e)}removeMark(e){return c5(e)}setMeta(e,t){return({tr:r})=>(r.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)!=null&&e.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,r)=>this.insertNode(O1({content:e,schema:r.state.schema}),{selection:t})(r)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return K6(e)}getAllCommandOptions(){const e={};for(const[t,r]of this.decorated)np(r)||(e[t]=r);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}const r=this.decorated.get(e)??{name:""};this.decorated.set(e,{...r,...t})}handleIosFocus(){en.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...Jz,...t}}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addCommands(e){const{extensionCommands:t,commands:r,names:n,active:o}=e;for(const[i,s]of At(t))x5({name:i,set:n,code:H.DUPLICATE_COMMAND_NAMES}),te(!Xz.has(i),{code:H.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),r[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:r=!0,command:n}=e,{view:o}=this.store,{state:i}=o;let s;return r&&(s=o.dispatch),n(...t)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const r=this.unchainedFactory({command:e});return r.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),r.isEnabled=r.enabled,r.original=e,r.active=t,r}chainedFactory(e){return(...t)=>{const{chain:r,command:n,getTr:o,getChain:i}=e,s=i(),{view:a}=this.store,{state:l}=a;return s.push(c=>n(...t)({state:l,dispatch:c,view:a,tr:o()})),r}}};Z([G()],ke.prototype,"customDispatch",1);Z([G()],ke.prototype,"insertText",1);Z([G()],ke.prototype,"selectText",1);Z([G()],ke.prototype,"selectMark",1);Z([G()],ke.prototype,"delete",1);Z([G()],ke.prototype,"emptyUpdate",1);Z([G()],ke.prototype,"forceUpdate",1);Z([G()],ke.prototype,"updateNodeAttributes",1);Z([G()],ke.prototype,"setContent",1);Z([G()],ke.prototype,"resetContent",1);Z([G()],ke.prototype,"emptySelection",1);Z([G()],ke.prototype,"insertNewLine",1);Z([G()],ke.prototype,"insertNode",1);Z([G()],ke.prototype,"focus",1);Z([G()],ke.prototype,"blur",1);Z([G()],ke.prototype,"setBlockNodeType",1);Z([G()],ke.prototype,"toggleWrappingNode",1);Z([G()],ke.prototype,"toggleBlockNodeItem",1);Z([G()],ke.prototype,"wrapInNode",1);Z([G()],ke.prototype,"applyMark",1);Z([G()],ke.prototype,"toggleMark",1);Z([G()],ke.prototype,"removeMark",1);Z([G()],ke.prototype,"setMeta",1);Z([G({description:({t:e})=>e(Gi.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(Gi.SELECT_ALL_LABEL),shortcut:j.SelectAll})],ke.prototype,"selectAll",1);Z([G({description:({t:e})=>e(Gi.COPY_DESCRIPTION),label:({t:e})=>e(Gi.COPY_LABEL),shortcut:j.Copy,icon:"fileCopyLine"})],ke.prototype,"copy",1);Z([G({description:({t:e})=>e(Gi.PASTE_DESCRIPTION),label:({t:e})=>e(Gi.PASTE_LABEL),shortcut:j.Paste,icon:"clipboardLine"})],ke.prototype,"paste",1);Z([G({description:({t:e})=>e(Gi.CUT_DESCRIPTION),label:({t:e})=>e(Gi.CUT_LABEL),shortcut:j.Cut,icon:"scissorsFill"})],ke.prototype,"cut",1);Z([G()],ke.prototype,"replaceText",1);Z([Ue()],ke.prototype,"getAllCommandOptions",1);Z([Ue()],ke.prototype,"getCommandOptions",1);Z([Ue()],ke.prototype,"getCommandProp",1);ke=Z([me({defaultPriority:De.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],ke);var Jz={forcedUpdates:[]},Xz=new Set(["run","chain","original","raw","enabled","tr","new"]),eo=class extends je{constructor(){super(...arguments),this.placeholders=Ee.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=vl(),{promise:r,placeholder:n,onFailure:o,onSuccess:i}=e;return new Kz(r).validate(s=>this.addPlaceholder(t,n)(s)).success(s=>{const{state:a,tr:l,dispatch:c,view:u,value:d}=s,f=this.store.helpers.findPlaceholder(t);if(!f){const p=new Error("The placeholder has been removed");return(o==null?void 0:o({error:p,state:a,tr:l,dispatch:c,view:u}))??!1}return this.removePlaceholder(t)({state:a,tr:l,view:u,dispatch:()=>{}}),i(d,f,{state:a,tr:l,dispatch:c,view:u})}).failure(s=>(this.removePlaceholder(t)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,r,n,o,i,s;const{added:a,clearTrackers:l,removed:c,updated:u}=this.getMeta(e);if(l){this.placeholders=Ee.empty;for(const[,d]of this.placeholderWidgets)(r=(t=d.spec).onDestroy)==null||r.call(t,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:d=>{var f,p;const h=this.placeholderWidgets.get(d.id);h&&((p=(f=h.spec).onDestroy)==null||p.call(f,this.store.view,h.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(n=d.spec).onUpdate)==null||o.call(n,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of a){if(d.type==="inline"){this.addInlinePlaceholder(d,e);continue}if(d.type==="node"){this.addNodePlaceholder(d,e);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,e);continue}}for(const{id:d,data:f}of u){const p=this.placeholderWidgets.get(d);if(!p)continue;const h=qe.widget(p.from,p.spec.element,{...p.spec,data:f});this.placeholders=this.placeholders.remove([p]).add(e.doc,[h]),this.placeholderWidgets.set(d,h)}for(const d of c){const f=this.placeholders.find(void 0,void 0,h=>h.id===d&&h.__type===Sa),p=this.placeholderWidgets.get(d);p&&((s=(i=p.spec).onDestroy)==null||s.call(i,this.store.view,p.spec.element)),this.placeholders=this.placeholders.remove(f),this.placeholderWidgets.delete(d)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const r of this.store.extensions){if(!r.createDecorations)continue;const n=r.createDecorations(e).find();t=t.add(e.doc,n)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(Jx,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(Jx,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t==null||t(e),!0)}addPlaceholder(e,t,r){return({dispatch:n,tr:o})=>this.addPlaceholderTransaction(e,t,o,!n)?(n==null||n(r?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:r,tr:n})=>this.updatePlaceholderTransaction({id:e,data:t,tr:n,checkOnly:!r})?(r==null||r(n),!0):!1}removePlaceholder(e){return({dispatch:t,tr:r})=>this.removePlaceholderTransaction({id:e,tr:r,checkOnly:!t})?(t==null||t(r),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t==null||t(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){const e=new Map,t=this.placeholders.find(void 0,void 0,r=>r.__type===Sa);for(const r of t)e.set(r.spec.id,{from:r.from,to:r.to});return e}createDecorations(e){var t,r,n;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(n=(r=this.store.helpers).isInteracting)!=null&&n.call(r)?Ee.empty:Zz(e,Ee.empty,{class:ne(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:r,createElement:n,onDestroy:o,onUpdate:i,className:s,nodeName:a,id:l,type:c}=e,u=(n==null?void 0:n(this.store.view,r))??document.createElement(a);u.classList.add(s);const d=qe.widget(r,u,{id:l,__type:Sa,type:c,element:u,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(l,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){const{from:r=t.selection.from,to:n=t.selection.to,className:o,nodeName:i,id:s,type:a}=e;let l;if(r===n){const c=document.createElement(i);c.classList.add(o),l=qe.widget(r,c,{id:s,type:a,__type:Sa,widget:c})}else l=qe.inline(r,n,{nodeName:i,class:o},{id:s,__type:Sa});this.placeholders=this.placeholders.add(t.doc,[l])}addNodePlaceholder(e,t){const{pos:r,className:n,nodeName:o,id:i}=e,s=ln(r)?t.doc.resolve(r):t.selection.$from,a=ln(r)?s.nodeAfter?{pos:r,end:s.nodeAfter.nodeSize}:void 0:c6(s);if(!a)return;const l=qe.node(a.pos,a.end,{nodeName:o,class:n},{id:i,__type:Sa});this.placeholders=this.placeholders.add(t.doc,[l])}withRequiredBase(e,t){const{placeholderNodeName:r,placeholderClassName:n}=this.options,{nodeName:o=r,className:i,...s}=t,a=(i?[n,i]:[n]).join(" ");return{nodeName:o,className:a,...s,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...Qz,...t}}setMeta(e,t){const r=this.getMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addPlaceholderTransaction(e,t,r,n=!1){if(this.findPlaceholder(e))return!1;if(n)return!0;const{added:i}=this.getMeta(r);return this.setMeta(r,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{updated:s}=this.getMeta(r);return this.setMeta(r,{updated:yl([...s,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{removed:i}=this.getMeta(r);return this.setMeta(r,{removed:yl([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:r=!1}=e;return this.getPluginState()===Ee.empty?!1:(r||this.setMeta(t,{clearTrackers:!0}),!0)}};Z([G()],eo.prototype,"updateDecorations",1);Z([G()],eo.prototype,"addPlaceholder",1);Z([G()],eo.prototype,"updatePlaceholder",1);Z([G()],eo.prototype,"removePlaceholder",1);Z([G()],eo.prototype,"clearPlaceholders",1);Z([Ue()],eo.prototype,"findPlaceholder",1);Z([Ue()],eo.prototype,"findAllPlaceholders",1);eo=Z([me({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,r)=>e.add(r.doc,t.find()),getDefault:()=>Ee.empty}}},defaultPriority:De.Low})],eo);var Qz={added:[],updated:[],clearTrackers:!1,removed:[]},Sa="placeholderDecoration",Jx="persistentSelectionFocus";function Zz(e,t,r){const{selection:n,doc:o}=e;if(n.empty)return t;const{from:i,to:s}=n,a=Md(n)?qe.node(i,s,r):qe.inline(i,s,r);return t.add(o,[a])}var A1=class extends je{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:r,tr:n}=e;t||(r??[n]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(e)}};A1=Z([me({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:De.Lowest})],A1);var On=class extends je{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",O1);const t=ee(),r=ee(),n=ee(),o=new Set;for(const i of this.store.extensions){Td(i)&&(r[i.name]=a=>JE({state:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{var l;return(l=Au({state:this.store.getState(),type:i.type,attrs:a}))==null?void 0:l.node.attrs}),Ph(i)&&(r[i.name]=a=>bp({trState:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{const l=Yo(this.store.getState().selection.$from,i.type);if(!l||!a)return l==null?void 0:l.mark.attrs;if(Ov(l.mark,a))return l.mark.attrs});const s=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const a of Object.keys(i.decoratedHelpers??{}))s[a]=i[a].bind(i);if(!np(s))for(const[a,l]of At(s))x5({name:a,set:o,code:H.DUPLICATE_HELPER_NAMES}),t[a]=l}this.store.setStoreKey("attrs",n),this.store.setStoreKey("active",r),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",n),this.store.setExtensionStore("active",r),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return Tv(e)}isViewEditable(e=this.store.getState()){var t,r;return((r=(t=this.store.view.props).editable)==null?void 0:r.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return r=>{const{state:n}=r,o=O1({content:e,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(r)}}getText({lineBreakDivider:e=` +If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function A5(e){var t;return(e==null?void 0:e.defaultView)??(typeof window<"u"?window:void 0)??((t=PE())==null?void 0:t.defaultView)}function uz(e){return A5(e==null?void 0:e.ownerDocument)}function dz(e){const t=A5(e)??Wh().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function fz(e,t=Wh()){const r=az(e,e.type.schema)?e.content:N.from(e);return cn.fromSchema(e.type.schema).serializeFragment(r,{document:t})}function pz(e,t){return new(dz(t)).DOMParser().parseFromString(`${e}`,"text/html").body}function hz(e,t=Wh()){const r=t.createElement("div");return r.append(fz(e,t)),r.innerHTML}function q1(e){const{content:t,schema:r,document:n,fragment:o=!1,...i}=e,s=pz(t,n),a=Rv.fromSchema(r);return o?a.parseSlice(s,{...p2,...i}).content:a.parse(s,{...p2,...i})}var p2={preserveWhitespace:!1};function Kh(e,t){const r=Lu(t.defaults());return Ov({...e},r)}function mz(e,t){let r="";t&&(r=`${t.trim()}`);const n=xR(e);if(!n)return r;const o=(r.endsWith(";")," ");return`${r}${o}${n}`}var gz={remove(e,t){let r=e;for(const n of t)n.invalidParentNode||(r=mA(n.path,r));return r}};function vz({json:e,schema:t,...r}){const n=new Set(Lu(t.marks)),o=new Set(Lu(t.nodes)),i=R5({json:e,path:[],validNodes:o,validMarks:n});return{json:e,invalidContent:i,transformers:gz,...r}}function R5(e){const{json:t,validMarks:r,validNodes:n,path:o=[]}=e,i={validMarks:r,validNodes:n},s=[],{type:a,marks:l,content:c}=t;let{invalidParentMark:u=!1,invalidParentNode:d=!1}=e;if(l){const f=[];for(const[p,h]of l.entries()){const m=oe(h)?h:h.type;r.has(m)||(f.unshift({name:m,path:[...o,"marks",`${p}`],type:"mark",invalidParentMark:u,invalidParentNode:d}),u=!0)}s.push(...f)}if(n.has(a)||(s.push({name:a,type:"node",path:o,invalidParentMark:u,invalidParentNode:d}),d=!0),c){const f=[];for(const[p,h]of c.entries())f.unshift(...R5({...i,json:h,path:[...o,"content",`${p}`],invalidParentMark:u,invalidParentNode:d}));s.unshift(...f)}return s}function yz(e){return!!(gs(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function G1(e){return!!(gs(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function h2(e){const t=xe.atStart(e.$anchor.doc);return!!(G1(e)&&t.anchor===e.anchor)}function bz(e){return({dispatch:t,tr:r})=>{const{type:n,attrs:o=te(),appendText:i,range:s}=e,a=s?ue.between(r.doc.resolve(s.from),r.doc.resolve(s.to)):r.selection,{$from:l,from:c,to:u}=a;let d=l.depth===0?r.doc.type.allowsMarkType(n):!1;return r.doc.nodesBetween(c,u,f=>{if(d)return!1;if(f.inlineContent&&f.type.allowsMarkType(n)){d=!0;return}}),d?(t==null||t(r.addMark(c,u,n.create(o))&&i?r.insertText(i):r),!0):!1}}function kz({tr:e,dispatch:t}){const{$from:r,$to:n}=e.selection,o=r.blockRange(n),i=o&&nc(o);return!hn(i)||!o?!1:(t==null||t(e.lift(o,i).scrollIntoView()),!0)}function N5(e,t={},r){return function(n){const{tr:o,dispatch:i,state:s}=n,a=oe(e)?lt(s.schema.nodes,e):e,{from:l,to:c}=Pn(r??o.selection,o.doc),u=o.doc.resolve(l),d=o.doc.resolve(c),f=u.blockRange(d),p=f&&Pv(f,a,t);return!p||!f?!1:(i==null||i(o.wrap(f,p).scrollIntoView()),!0)}}function P5(e,t={},r){return n=>{const{tr:o,state:i}=n,s=oe(e)?lt(i.schema.nodes,e):e;return Bu({state:o,type:s,attrs:t})?kz(n):N5(e,t,r)(n)}}function Fu(e,t,r,n=!0){return function(o){const{tr:i,dispatch:s,state:a}=o,l=oe(e)?lt(a.schema.nodes,e):e,{from:c,to:u}=Pn(r??i.selection,i.doc);let d=!1,f;return i.doc.nodesBetween(c,u,(p,h)=>{if(d)return!1;if(!p.isTextblock||p.hasMarkup(l,t))return;if(p.type===l){d=!0,f=p.attrs;return}const m=i.doc.resolve(h),b=m.index();d=m.parent.canReplaceWith(b,b+1,l),d&&(f=m.parent.attrs)}),d?(s==null||s(i.setBlockType(c,u,l,{...n?f:{},...t}).scrollIntoView()),!0):!1}}function Qv(e){return t=>{const{tr:r,state:n}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,a=Bu({state:r,type:o,attrs:i}),l=e.toggleType??jh(n.schema);if(a)return Fu(l,{...s?a.node.attrs:{},...i})(t);const c=Bu({state:r,type:l,attrs:i});return Fu(o,{...s?c==null?void 0:c.node.attrs:{},...i})(t)}}function xz(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(lt(t,2),10)>=e:!1}function wz(e,t){let{head:r,empty:n,anchor:o}=e;for(const i of t.steps)r=i.getMap().map(r);n?t.setSelection(ue.near(t.doc.resolve(r))):t.setSelection(ue.between(t.doc.resolve(o),t.doc.resolve(r)))}function Sz(e){const{attrs:t={},appendText:r="",content:n="",keepSelection:o=!1,range:i}=e;return({state:s,tr:a,dispatch:l})=>{var c;const u=s.schema,d=Pn(e.selection??i??a.selection,a.doc),f=d.$from.index(),{from:p,to:h,$from:m}=d,b=oe(e.type)?u.nodes[e.type]??u.marks[e.type]:e.type;if(re(oe(e.type)?b:!0,{code:H.SCHEMA,message:`Schema contains no marks or nodes with name ${b}`}),q6(b)){if(!m.parent.canReplaceWith(f,f,b))return!1;a.replaceWith(p,h,b.create(t,n?u.text(n):void 0))}else re(n,{message:"`replaceText` cannot be called without content when using a mark type"}),a.replaceWith(p,h,u.text(n,S5(b)?[b.create(t)]:void 0));return r&&a.insertText(r),o&&wz(s.selection,a),l&&(xz(60)&&((c=document.getSelection())==null||c.empty()),l(a)),!0}}function z5(e,t){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const{marks:n,nodeSize:o}=r.node;if(n[0])return n[0].type;const s=e.start()+r.offset+o;return z5(e.doc.resolve(s+1))}function L5(e){return({dispatch:t,tr:r,state:n})=>{const{type:o,expand:i=!0,range:s}=e,a=Pn(e.selection??s??r.selection,r.doc);let{from:l,to:c,$from:u,$to:d}=a;const f=oe(o)?n.schema.marks[o]:o;f!==null&&re(f,{code:H.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const p=f??z5(u);if(!p)return!1;const h=ni(u,p,d);return i&&h&&(l=Math.max(0,Math.min(l,h.from)),c=Math.min(Math.max(c,h.to),r.doc.nodeSize-2)),t==null||t(r.removeMark(l,hn(c)?c:l,S5(f)?f:void 0)),!0}}function Ez(e){const t=["command","cmd","meta"];return an.isMac&&t.push("mod"),t.includes(e)}function Cz(e){const t=["control","ctrl"];return an.isMac||t.push("mod"),t.includes(e)}function Mz(e){const t=[];for(let r of e.split("-")){if(r=r.toLowerCase(),Ez(r)){t.push({type:"modifier",symbol:"⌘",key:"command",i18n:Rt.COMMAND_KEY});continue}if(Cz(r)){t.push({type:"modifier",symbol:"⌃",key:"control",i18n:Rt.CONTROL_KEY});continue}switch(r){case"shift":t.push({type:"modifier",symbol:"⇧",key:r,i18n:Rt.SHIFT_KEY});continue;case"alt":t.push({type:"modifier",symbol:"⌥",key:r,i18n:Rt.ALT_KEY});continue;case` +`:case"\r":case"enter":t.push({type:"named",symbol:"↵",key:r,i18n:Rt.ENTER_KEY});continue;case"backspace":t.push({type:"named",symbol:"⌫",key:r,i18n:Rt.BACKSPACE_KEY});continue;case"delete":t.push({type:"named",symbol:"⌦",key:r,i18n:Rt.DELETE_KEY});continue;case"escape":t.push({type:"named",symbol:"␛",key:r,i18n:Rt.ESCAPE_KEY});continue;case"tab":t.push({type:"named",symbol:"⇥",key:r,i18n:Rt.TAB_KEY});continue;case"capslock":t.push({type:"named",symbol:"⇪",key:r,i18n:Rt.CAPS_LOCK_KEY});continue;case"space":t.push({type:"named",symbol:"␣",key:r,i18n:Rt.SPACE_KEY});continue;case"pageup":t.push({type:"named",symbol:"⤒",key:r,i18n:Rt.PAGE_UP_KEY});continue;case"pagedown":t.push({type:"named",symbol:"⤓",key:r,i18n:Rt.PAGE_DOWN_KEY});continue;case"home":t.push({type:"named",key:r,i18n:Rt.HOME_KEY});continue;case"end":t.push({type:"named",key:r,i18n:Rt.END_KEY});continue;case"arrowleft":t.push({type:"named",symbol:"←",key:r,i18n:Rt.ARROW_LEFT_KEY});continue;case"arrowright":t.push({type:"named",symbol:"→",key:r,i18n:Rt.ARROW_RIGHT_KEY});continue;case"arrowup":t.push({type:"named",symbol:"→",key:r,i18n:Rt.ARROW_UP_KEY});continue;case"arrowdown":t.push({type:"named",symbol:"↓",key:r,i18n:Rt.ARROW_DOWN_KEY});continue;default:t.push({type:"char",key:r});continue}}return t}function Tz(e){const{node:t,predicate:r,descend:n=!0,action:o}=e;re(Id(t),{code:H.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),re(Le(r),{code:H.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((s,a)=>{const l={node:s,pos:a};return r(l)&&(i.push(l),o==null||o(l)),n}),i}function Oz(e){const{type:t,...r}=e;return Tz({...r,predicate:n=>n.node.type===t})}function _z(e,t={}){const{descend:r=!1,predicate:n,StepTypes:o}=t,i=nz(e,o),s=[];for(const a of i){const{start:l,end:c}=a;e.doc.nodesBetween(l,c,(u,d)=>(((n==null?void 0:n(u,d,a))??!0)&&s.push({node:u,pos:d}),r))}return s}function Vu(e){const{regexp:t,type:r,getAttributes:n,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:a,invalidMarks:l}=e;let c;const u=new Sa(t,(d,f,p,h)=>{const{tr:m,schema:b}=d;c||(c=oe(r)?b.marks[r]:r,re(c,{code:H.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}));let v=f[1],g=f[0];const y=D5({captureGroup:v,fullMatch:g,end:h,start:p,rule:u,state:d,ignoreWhitespace:o,invalidMarks:l,shouldSkip:a,updateCaptured:s});if(!y)return null;({start:p,end:h,captureGroup:v,fullMatch:g}=y);const k=Le(n)?n(f):n;let x=h,w=[];if(v){const E=g.search(/\S/),M=p+g.indexOf(v),C=M+v.length;w=m.storedMarks??[],Cp&&m.delete(p+E,M),x=p+E+v.length}return m.addMark(p,x,c.create(k)),m.setStoredMarks(w),i==null||i({tr:m,match:f,start:p,end:h}),m});return u}function I5(e){const{regexp:t,type:r,getAttributes:n,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:a,invalidMarks:l}=e,c=new Sa(t,(u,d,f,p)=>{const h=Le(n)?n(d):n,{tr:m,schema:b}=u,v=oe(r)?b.nodes[r]:r;let g=d[1],y=d[0];const k=D5({captureGroup:g,fullMatch:y,end:p,start:f,rule:c,state:u,ignoreWhitespace:s,invalidMarks:l,shouldSkip:i,updateCaptured:a});if(!k)return null;({start:f,end:p,captureGroup:g,fullMatch:y}=k),re(v,{code:H.SCHEMA,message:`No node exists for ${r} in the schema.`});const x=v.createAndFill(h);return x&&(m.replaceRangeWith(v.isBlock?m.doc.resolve(f).before():f,p,x),o==null||o({tr:m,match:[y,g??""],start:f,end:p})),m});return c}function D5({captureGroup:e,fullMatch:t,end:r,start:n,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:a,state:l,invalidMarks:c}){var u;if(t==null)return null;const d=(a==null?void 0:a({captureGroup:e,fullMatch:t,start:n,end:r}))??{};e=d.captureGroup??e,t=d.fullMatch??t,n=d.start??n,r=d.end??r;const f=l.doc.resolve(n),p=l.doc.resolve(r);return c&&W1({$from:f,$to:p},c)||o.invalidMarks&&W1({$from:f,$to:p},o.invalidMarks)||i&&(e==null?void 0:e.trim())===""||s!=null&&s({state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})||(u=o.shouldSkip)!=null&&u.call(o,{state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"})?null:{captureGroup:e,end:r,fullMatch:t,start:n}}var Az=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),r={},n=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,l]=a.split("_");r[l]=a}else n.push(a)})});const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(r[i]);return o.push(...n),o.join(" ")},Rz=Az;const $5=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Nz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const H5=(e,t,r)=>{let n=Nz(e,r);if(!n)return!1;let o=B5(n);if(!o){let s=n.blockRange(),a=s&&nc(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&j5(e,o,t))return!0;if(n.parent.content.size==0&&(zl(i,"end")||de.isSelectable(i))){let s=zv(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;i=B5(n)}let s=i&&i.nodeBefore;return!s||!de.isSelectable(s)?!1:(t&&t(e.tr.setSelection(de.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function B5(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 zz(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=zz(e,r);if(!n)return!1;let o=F5(n);if(!o)return!1;let i=o.nodeAfter;if(j5(e,o,t))return!0;if(n.parent.content.size==0&&(zl(i,"start")||de.isSelectable(i))){let s=zv(e.doc,n.before(),n.after(),W.empty);if(s&&s.slice.size{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function Zv(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let o=r.node(-1),i=r.indexAfter(-1),s=Zv(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(xe.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},$z=(e,t)=>{let r=e.selection,{$from:n,$to:o}=r;if(r instanceof wr||n.parent.inlineContent||o.parent.inlineContent)return!1;let i=Zv(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!n.parentOffset&&o.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(pl(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),o=n&&nc(n);return o==null?!1:(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)};function Bz(e){return(t,r)=>{let{$from:n,$to:o}=t.selection;if(t.selection instanceof de&&t.selection.node.isBlock)return!n.parentOffset||!pl(t.doc,n.pos)?!1:(r&&r(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(r){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof ue||t.selection instanceof wr)&&s.deleteSelection();let a=n.depth==0?null:Zv(n.node(-1).contentMatchAt(n.indexAfter(-1))),l=e&&e(o.parent,i),c=l?[l]:i&&a?[{type:a}]:void 0,u=pl(s.doc,s.mapping.map(n.pos),1,c);if(!c&&!u&&pl(s.doc,s.mapping.map(n.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=a)){let d=s.mapping.map(n.before()),f=s.doc.resolve(d);a&&n.node(-1).canReplaceWith(f.index(),f.index()+1,a)&&s.setNodeMarkup(s.mapping.map(n.before()),a)}r(s.scrollIntoView())}return!0}}const Fz=Bz(),Vz=(e,t)=>{let{$from:r,to:n}=e.selection,o,i=r.sharedDepth(n);return i==0?!1:(o=r.before(i),t&&t(e.tr.setSelection(de.create(e.doc,o))),!0)},jz=(e,t)=>(t&&t(e.tr.setSelection(new wr(e.doc))),!0);function Uz(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i=t.index();return!n||!o||!n.type.compatibleContent(o.type)?!1:!n.content.size&&t.parent.canReplace(i-1,i)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||Nd(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function j5(e,t,r){let n=t.nodeBefore,o=t.nodeAfter,i,s;if(n.type.spec.isolating||o.type.spec.isolating)return!1;if(Uz(e,t,r))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=n.contentMatchAt(n.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(r){let d=t.pos+o.nodeSize,f=N.empty;for(let m=i.length-1;m>=0;m--)f=N.from(i[m].create(null,f));f=N.from(n.copy(f));let p=e.tr.step(new St(t.pos-1,d,t.pos,d,new W(f,1,0),i.length,!0)),h=d+2*i.length;Nd(p.doc,h)&&p.join(h),r(p.scrollIntoView())}return!0}let l=xe.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&nc(c);if(u!=null&&u>=t.depth)return r&&r(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&zl(o,"start",!0)&&zl(n,"end")){let d=n,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let p=o,h=1;for(;!p.isTextblock;p=p.firstChild)h++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(r){let m=N.empty;for(let v=f.length-1;v>=0;v--)m=N.from(f[v].copy(m));let b=e.tr.step(new St(t.pos-f.length,t.pos+o.nodeSize,t.pos+h,t.pos+o.nodeSize-h,new W(m,f.length,0),0,!0));r(b.scrollIntoView())}return!0}}return!1}function U5(e){return function(t,r){let n=t.selection,o=e<0?n.$from:n.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(r&&r(t.tr.setSelection(ue.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const Wz=U5(-1),Kz=U5(1);function qz(e,t,r){for(let n=0;n{if(s)return!1;s=a.inlineContent&&a.type.allowsMarkType(r)}),s)return!0}return!1}function Gz(e,t=null){return function(r,n){let{empty:o,$cursor:i,ranges:s}=r.selection;if(o&&!i||!qz(r.doc,s,e))return!1;if(n)if(i)e.isInSet(r.storedMarks||i.marks())?n(r.tr.removeStoredMark(e)):n(r.tr.addStoredMark(e.create(t)));else{let a=!1,l=r.tr;for(let c=0;!a&&c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Xz=typeof navigator<"u"&&/Mac/.test(navigator.platform),Jz=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Zt=0;Zt<10;Zt++)is[48+Zt]=is[96+Zt]=String(Zt);for(var Zt=1;Zt<=24;Zt++)is[Zt+111]="F"+Zt;for(var Zt=65;Zt<=90;Zt++)is[Zt]=String.fromCharCode(Zt+32),Pp[Zt]=String.fromCharCode(Zt);for(var Tg in is)Pp.hasOwnProperty(Tg)||(Pp[Tg]=is[Tg]);function Qz(e){var t=Xz&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Jz&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?Pp:is)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const Zz=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function eL(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,o,i,s;for(let a=0;a127)&&(i=is[n.keyCode])&&i!=o){let a=t[Og(i,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}function rL(e){const t=ra(e,(i,s)=>(s.priority??Ve.Low)-(i.priority??Ve.Low)),r=[],n=[];for(const i of t)cL(i)?r.push(i):n.push(i);let o;return new zo({key:nL,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,a,l;const c=o.state.selection.$from,u=c.node().type.name,d=new Set(c.marks().map(f=>f.type.name));for(const f of r){if((s=f.ignoredNodes)!=null&&s.includes(u)||(a=f.ignoredMarks)!=null&&a.some(g=>d.has(g)))continue;const p=((l=i.content.firstChild)==null?void 0:l.textContent)??"",h=!o.state.selection.empty&&i.content.childCount===1&&p,m=rc(p,f.regexp)[0];if(h&&m&&f.type==="mark"&&f.replaceSelection){const{from:g,to:y}=o.state.selection,k=o.state.doc.slice(g,y),x=k.content.textBetween(0,k.content.size);if(typeof f.replaceSelection!="boolean"?f.replaceSelection(x):f.replaceSelection){const w=[],{getAttributes:E,markType:M}=f,C=Le(E)?E(m,!0):E,T=M.create(C);return k.content.forEach(R=>{if(R.isText){const z=T.addToSet(R.marks);w.push(R.mark(z))}}),W.maxOpen(N.fromArray(w))}}const{nodes:b,transformed:v}=aL(i.content,f,o.state.schema);v&&(i=f.type==="node"&&f.nodeType.isBlock?new W(N.fromArray(b),0,0):new W(N.fromArray(b),i.openStart,i.openEnd))}return pL(i)},handleDOMEvents:{paste:(i,s)=>{var a,l;const c=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{clipboardData:u}=c;if(!u)return!1;const d=[...u.items].map(p=>p.getAsFile()).filter(p=>!!p);if(d.length===0)return!1;const{selection:f}=i.state;for(const{fileHandler:p,regexp:h}of n){const m=h?d.filter(b=>h.test(b.type)):d;if(m.length!==0&&p({event:c,files:m,selection:f,view:i,type:"paste"}))return c.preventDefault(),!0}return!1},drop:(i,s)=>{var a,l,c;const u=s;if(!((l=(a=i.props).editable)!=null&&l.call(a,i.state)))return!1;const{dataTransfer:d,clientX:f,clientY:p}=u;if(!d)return!1;const h=fL(u);if(h.length===0)return!1;const m=((c=i.posAtCoords({left:f,top:p}))==null?void 0:c.pos)??i.state.selection.anchor;for(const{fileHandler:b,regexp:v}of n){const g=v?h.filter(y=>v.test(y.type)):h;if(g.length!==0&&b({event:u,files:g,pos:m,view:i,type:"drop"}))return u.preventDefault(),!0}return!1}}}})}var nL=new wa("pasteRule");function _g(e,t){return function r(n){const{fragment:o,rule:i,nodes:s}=n,{regexp:a,ignoreWhitespace:l,ignoredMarks:c,ignoredNodes:u}=i;let d=!1;return o.forEach(f=>{if(u!=null&&u.includes(f.type.name)||uL(f)){s.push(f);return}if(!f.isText){const m=r({fragment:f.content,rule:i,nodes:[]});d||(d=m.transformed);const b=N.fromArray(m.nodes);f.type.validContent(b)?s.push(f.copy(b)):s.push(...m.nodes);return}if(f.marks.some(m=>dL(m)||(c==null?void 0:c.includes(m.type.name)))){s.push(f);return}const p=f.text??"";let h=0;for(const m of rc(p,a)){const b=m[1],v=m[0];if(l&&(b==null?void 0:b.trim())===""||!v)return;const g=m.index,y=g+v.length;g>h&&s.push(f.cut(h,g));let k=f.cut(g,y);if(v&&b){const x=v.search(/\S/),w=g+v.indexOf(b),E=w+b.length;x&&s.push(f.cut(g,g+x)),k=f.cut(w,E)}e({nodes:s,rule:i,textNode:k,match:m,schema:t}),d=!0,h=y}p&&h0?[...n.files]:(r=n.items)!=null&&r.length?[...n.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function pL(e){const t=W.maxOpen(e.content);return t.openStart({events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}});var hL=Object.defineProperty,mL=Object.getOwnPropertyDescriptor,ee=(e,t,r,n)=>{for(var o=n>1?void 0:n?mL(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hL(t,r,o),o},K5=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},q=(e,t,r)=>(K5(e,t,"read from private field"),r?r.call(e):t.get(e)),Ct=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Bt=(e,t,r,n)=>(K5(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function gL(e,t){return e===t}function g2(e){const{previousOptions:t,update:r,equals:n=gL}=e,o=Bs({...t,...r}),i=te(),s=Lu(t);for(const l of s){const c=t[l],u=o[l];if(n(c,u)){i[l]={changed:!1};continue}i[l]={changed:!0,previousValue:c,value:u}}const a=l=>{const c=te();for(const u of l){const d=i[u];d!=null&&d.changed&&(c[u]=d.value)}return c};return{changes:Bs(i),options:o,pickChanged:a}}var vL={[H.DUPLICATE_HELPER_NAMES]:"helper method",[H.DUPLICATE_COMMAND_NAMES]:"command method"};function q5(e){const{name:t,set:r,code:n}=e,o=vL[n];re(!r.has(t),{code:n,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),r.add(t)}function ju(...e){return Ol(Rz(...e).split(" ")).join(" ")}var v2="__IGNORE__",yL="__ALL__",sc=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=te(),this.populateMappedHandlers(),this._options=this._initialOptions=eE(e,this.constructor.defaultOptions,t??te(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const e=[],{customHandlerKeys:t,handlerKeys:r,staticKeys:n}=this.constructor;for(const o of Lu(this._options))n.includes(o)||r.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){}setOptions(e){var t;const r=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:n,options:o,pickChanged:i}=g2({previousOptions:r,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:n,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:r,options:n,pickChanged:o}=g2({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(n),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:n,changes:r,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return Ov(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(const e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){const e=te();for(const t of this.constructor.handlerKeys)e[t]=(...r)=>{var n;const{handlerKeyOptions:o}=this.constructor,i=(n=o[t])==null?void 0:n.reducer;let s=i==null?void 0:i.getDefault(...r);for(const[,a]of this._mappedHandlers[t]){const l=a(...r);if(s=i?i.accumulator(s,l,...r):l,bL(o,s,t))return s}return s};return e}addHandler(e,t,r=Ve.Default){return this._mappedHandlers[e].push([r,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,n])=>n!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=ra(this._mappedHandlers[e],([t],[r])=>r-t)}addCustomHandler(e,t){var r;return((r=this.onAddCustomHandler)==null?void 0:r.call(this,{[e]:t}))??ZS}};sc.defaultOptions={};sc.staticKeys=[];sc.handlerKeys=[];sc.handlerKeyOptions={};sc.customHandlerKeys=[];function bL(e,t,r){const{[yL]:n}=e,o=e[r];return!n&&!o?!1:!!(o&&o.earlyReturnValue!==v2&&(Le(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||n&&n.earlyReturnValue!==v2&&(Le(n.earlyReturnValue)?n.earlyReturnValue(t)===!0:t===n.earlyReturnValue))}var Yh=class extends sc{constructor(...e){super(kL,...e),this["~E"]={},this._extensions=tE(this.createExtensions(),t=>t.constructor),this.extensionMap=new Map;for(const t of this._extensions)this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${WS(this.name)}Extension`}get store(){return re(this._store,{code:H.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Bs(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(r=>t.constructor===e?t:r))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return re(t,{code:H.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};Yh.defaultPriority=Ve.Default;var Ge=class extends Yh{static get[ri](){return jt.PlainExtensionConstructor}get[ri](){return jt.PlainExtension}},vs=class extends Yh{static get[ri](){return jt.MarkExtensionConstructor}get[ri](){return jt.MarkExtension}get type(){return lt(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};vs.disableExtraAttributes=!1;var nr=class extends Yh{static get[ri](){return jt.NodeExtensionConstructor}get[ri](){return jt.NodeExtension}get type(){return lt(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};nr.disableExtraAttributes=!1;var kL={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function G5(e){return oc(e)&&ic(e,[jt.PlainExtension,jt.MarkExtension,jt.NodeExtension])}function xL(e){return oc(e)&&ic(e,[jt.PlainExtensionConstructor,jt.MarkExtensionConstructor,jt.NodeExtensionConstructor])}function Y5(e){return oc(e)&&ic(e,jt.PlainExtension)}function $d(e){return oc(e)&&ic(e,jt.NodeExtension)}function Xh(e){return oc(e)&&ic(e,jt.MarkExtension)}function ve(e){return t=>{const{defaultOptions:r,customHandlerKeys:n,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:a,...l}=e,c=t;r&&(c.defaultOptions=r),s&&(c.defaultPriority=s),a&&(c.handlerKeyOptions=a),c.staticKeys=i??[],c.handlerKeys=o??[],c.customHandlerKeys=n??[];for(const[u,d]of Object.entries(l))c[u]||(c[u]=d);return c}}var wL=class extends Ge{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=te(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,r;if(this.attributeObject=te(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const n of this.store.extensions){if((t=n.options.exclude)!=null&&t.attributes)continue;const o=(r=n.createAttributes)==null?void 0:r.call(n),i={...o,class:ju(...n.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const n of this.attributeList)this.attributeObject={...this.attributeObject,...n,class:ju(this.attributeObject.class,n.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function Ye(e={}){return(t,r,n)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[r]=e}}function Y(e={}){return(t,r,n)=>{(t.decoratedCommands??(t.decoratedCommands={}))[r]=e}}function _t(e){return(t,r,n)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[r]=e}}var SL=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let r=!0;const{view:n,tr:o,dispatch:i}=t;if(!n)return!1;for(const a of this.validateHandlers)if(!a({...t,dispatch:()=>{}})){r=!1;break}return!i||!r?r:(this.promiseCreator(t).then(a=>{this.runHandlers(this.successHandlers,{value:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}).catch(a=>{this.runHandlers(this.failureHandlers,{error:a,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}),i(o),!0)}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var r;for(const n of e)if(!n({...t,dispatch:()=>{}}))break;(r=t.dispatch)==null||r.call(t,t.tr)}};function ss(e){const{type:t,attrs:r,range:n,selection:o}=e;return i=>{const{dispatch:s,tr:a,state:l}=i,c=oe(t)?l.schema.marks[t]:t;if(re(c,{code:H.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),n||o){const{from:u,to:d}=Pn(o??n??a.selection,a.doc);return Np({trState:a,type:t,...n})?s==null||s(a.removeMark(u,d,c)):s==null||s(a.addMark(u,d,c.create(r))),!0}return yu(Gz(c,r))(i)}}function EL(e,t,r){for(const{$from:n,$to:o}of r){let i=n.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(n.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(e)}),i)return!0}return!1}function CL(e,t,r){return({tr:n,dispatch:o,state:i})=>{const s=Pn(r??n.selection,n.doc),a=sz(s),l=oe(e)?i.schema.marks[e]:e;if(re(l,{code:H.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),s.empty&&!a||!EL(l,n.doc,s.ranges))return!1;if(!o)return!0;if(a)return n.removeStoredMark(l),t&&n.addStoredMark(l.create(t)),o(n),!0;let c=!1;for(const{$from:u,$to:d}of s.ranges){if(c)break;c=n.doc.rangeHasMark(u.pos,d.pos,l)}for(const{$from:u,$to:d}of s.ranges)c&&n.removeMark(u.pos,d.pos,l),t&&n.addMark(u.pos,d.pos,l.create(t));return o(n),!0}}function ML(e,t={}){return({tr:r,dispatch:n,state:o})=>{const i=o.schema,s=r.selection,{from:a=s.from,to:l=a??s.to,marks:c={}}=t;if(!n)return!0;r.insertText(e,a,l);const u=lt(r.steps,r.steps.length-1).getMap().map(l);for(const[d,f]of Lt(c))r.addMark(a,u,lt(i.marks,d).create(f));return n(r),!0}}var we=class extends Ge{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:r}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:Ol([...r,...t])}),e}}get name(){return"commands"}get transaction(){const e=this.store.getState();this._transaction||(this._transaction=e.tr);const t=this._transaction.before.eq(e.doc),r=!ts(this._transaction.steps);if(!t){const n=e.tr;if(r)for(const o of this._transaction.steps)n.step(o);this._transaction=n}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:r,helpers:n}=this.store,o=te(),i=new Set;let s=te();const a=c=>{var u;const d=te(),f=()=>c??this.transaction;let p=[];const h=()=>p;for(const[b,v]of Object.entries(o))(u=s[b])!=null&&u.disableChaining||(d[b]=this.chainedFactory({chain:d,command:v.original,getTr:f,getChain:h}));const m=b=>{re(b===f(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return d.run=(b={})=>{const v=p;p=[];for(const g of v)if(!g(m)&&b.exitEarly)return;e.dispatch(f())},d.tr=()=>{const b=p;p=[];for(const v of b)v(m);return f()},d.enabled=()=>{for(const b of p)if(!b())return!1;return!0},d.new=b=>a(b),d};for(const c of r){const u=((t=c.createCommands)==null?void 0:t.call(c))??{},d=c.decoratedCommands??{},f={};s={...s,decoratedCommands:d};for(const[p,h]of Object.entries(d)){const m=oe(h.shortcut)&&h.shortcut.startsWith("_|")?{shortcut:n.getNamedShortcut(h.shortcut,c.options)}:void 0;this.updateDecorated(p,{...h,name:c.name,...m}),u[p]=c[p].bind(c),h.active&&(f[p]=()=>{var b;return((b=h.active)==null?void 0:b.call(h,c.options,this.store))??!1})}gp(u)||this.addCommands({active:f,names:i,commands:o,extensionCommands:u})}const l=a();for(const[c,u]of Object.entries(l))a[c]=u;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",a),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",a)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return oe(e)?ML(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(r,n,o)=>this.insertText(r,{...t,...n})(o)}).generateCommand()}selectText(e,t={}){return({tr:r,dispatch:n})=>{const o=Pn(e,r.doc);return r.selection.anchor===o.anchor&&r.selection.head===o.head&&!t.forceUpdate?!1:(n==null||n(r.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:r}=t,n=ni(r.selection.$from,e);return n?this.store.commands.selectText.original({from:n.from,to:n.to})(t):!1}}delete(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=e??t.selection;return r==null||r(t.delete(n,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:r})=>(r&&(e==null||e(),r(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:r})=>(r==null||r(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:r,dispatch:n})=>(n==null||n(r.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return r=>{const{tr:n,dispatch:o}=r,i=this.store.manager.createState({content:e,selection:t});return i?(o==null||o(n.replaceRangeWith(0,n.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:r}=e,n=this.store.manager.createEmptyDoc();return n?this.setContent(n)(e):(r==null||r(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t==null||t(e.setSelection(ue.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>gs(t.selection)?(e==null||e(t.insertText(` +`)),!0):!1}insertNode(e,t={}){return({dispatch:r,tr:n,state:o})=>{var i;const{attrs:s,range:a,selection:l,replaceEmptyParentBlock:c=!1}=t,{from:u,to:d,$from:f}=Pn(l??a??n.selection,n.doc);if(Id(e)||X6(e)){const v=f.before(f.depth);return r==null||r(c&&u===d&&Uh(f.parent)?n.replaceWith(v,v+f.parent.nodeSize,e):n.replaceWith(u,d,e)),!0}const p=oe(e)?o.schema.nodes[e]:e;re(p,{code:H.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const h=(i=t.marks)==null?void 0:i.map(v=>{if(v instanceof _e)return v;const g=oe(v)?o.schema.marks[v]:v;return re(g,{code:H.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),g.create()}),m=p.createAndFill(s,oe(t.content)?o.schema.text(t.content):t.content,h);if(!m)return!1;const b=u!==d;return r==null||r(b?n.replaceRangeWith(u,d,m):n.insert(u,m)),!0}}focus(e){return t=>{const{dispatch:r,tr:n}=t,{view:o}=this.store;if(e===!1||o.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){const{from:i=0,to:s=i}=n.selection;e={from:i,to:s}}return r&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:r}=this.store;return r.hasFocus()?(requestAnimationFrame(()=>{r.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,r,n=!0){return Fu(e,t,r,n)}toggleWrappingNode(e,t,r){return P5(e,t,r)}toggleBlockNodeItem(e){return Qv(e)}wrapInNode(e,t,r){return N5(e,t,r)}applyMark(e,t,r){return CL(e,t,r)}toggleMark(e){return ss(e)}removeMark(e){return L5(e)}setMeta(e,t){return({tr:r})=>(r.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)!=null&&e.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,r)=>this.insertNode(q1({content:e,schema:r.state.schema}),{selection:t})(r)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return Sz(e)}getAllCommandOptions(){const e={};for(const[t,r]of this.decorated)gp(r)||(e[t]=r);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}const r=this.decorated.get(e)??{name:""};this.decorated.set(e,{...r,...t})}handleIosFocus(){an.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...TL,...t}}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addCommands(e){const{extensionCommands:t,commands:r,names:n,active:o}=e;for(const[i,s]of Lt(t))q5({name:i,set:n,code:H.DUPLICATE_COMMAND_NAMES}),re(!OL.has(i),{code:H.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),r[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:r=!0,command:n}=e,{view:o}=this.store,{state:i}=o;let s;return r&&(s=o.dispatch),n(...t)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const r=this.unchainedFactory({command:e});return r.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),r.isEnabled=r.enabled,r.original=e,r.active=t,r}chainedFactory(e){return(...t)=>{const{chain:r,command:n,getTr:o,getChain:i}=e,s=i(),{view:a}=this.store,{state:l}=a;return s.push(c=>n(...t)({state:l,dispatch:c,view:a,tr:o()})),r}}};ee([Y()],we.prototype,"customDispatch",1);ee([Y()],we.prototype,"insertText",1);ee([Y()],we.prototype,"selectText",1);ee([Y()],we.prototype,"selectMark",1);ee([Y()],we.prototype,"delete",1);ee([Y()],we.prototype,"emptyUpdate",1);ee([Y()],we.prototype,"forceUpdate",1);ee([Y()],we.prototype,"updateNodeAttributes",1);ee([Y()],we.prototype,"setContent",1);ee([Y()],we.prototype,"resetContent",1);ee([Y()],we.prototype,"emptySelection",1);ee([Y()],we.prototype,"insertNewLine",1);ee([Y()],we.prototype,"insertNode",1);ee([Y()],we.prototype,"focus",1);ee([Y()],we.prototype,"blur",1);ee([Y()],we.prototype,"setBlockNodeType",1);ee([Y()],we.prototype,"toggleWrappingNode",1);ee([Y()],we.prototype,"toggleBlockNodeItem",1);ee([Y()],we.prototype,"wrapInNode",1);ee([Y()],we.prototype,"applyMark",1);ee([Y()],we.prototype,"toggleMark",1);ee([Y()],we.prototype,"removeMark",1);ee([Y()],we.prototype,"setMeta",1);ee([Y({description:({t:e})=>e(rs.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(rs.SELECT_ALL_LABEL),shortcut:j.SelectAll})],we.prototype,"selectAll",1);ee([Y({description:({t:e})=>e(rs.COPY_DESCRIPTION),label:({t:e})=>e(rs.COPY_LABEL),shortcut:j.Copy,icon:"fileCopyLine"})],we.prototype,"copy",1);ee([Y({description:({t:e})=>e(rs.PASTE_DESCRIPTION),label:({t:e})=>e(rs.PASTE_LABEL),shortcut:j.Paste,icon:"clipboardLine"})],we.prototype,"paste",1);ee([Y({description:({t:e})=>e(rs.CUT_DESCRIPTION),label:({t:e})=>e(rs.CUT_LABEL),shortcut:j.Cut,icon:"scissorsFill"})],we.prototype,"cut",1);ee([Y()],we.prototype,"replaceText",1);ee([Ye()],we.prototype,"getAllCommandOptions",1);ee([Ye()],we.prototype,"getCommandOptions",1);ee([Ye()],we.prototype,"getCommandProp",1);we=ee([ve({defaultPriority:Ve.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],we);var TL={forcedUpdates:[]},OL=new Set(["run","chain","original","raw","enabled","tr","new"]),so=class extends Ge{constructor(){super(...arguments),this.placeholders=Me.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=Tl(),{promise:r,placeholder:n,onFailure:o,onSuccess:i}=e;return new SL(r).validate(s=>this.addPlaceholder(t,n)(s)).success(s=>{const{state:a,tr:l,dispatch:c,view:u,value:d}=s,f=this.store.helpers.findPlaceholder(t);if(!f){const p=new Error("The placeholder has been removed");return(o==null?void 0:o({error:p,state:a,tr:l,dispatch:c,view:u}))??!1}return this.removePlaceholder(t)({state:a,tr:l,view:u,dispatch:()=>{}}),i(d,f,{state:a,tr:l,dispatch:c,view:u})}).failure(s=>(this.removePlaceholder(t)({...s,dispatch:()=>{}}),(o==null?void 0:o(s))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,r,n,o,i,s;const{added:a,clearTrackers:l,removed:c,updated:u}=this.getMeta(e);if(l){this.placeholders=Me.empty;for(const[,d]of this.placeholderWidgets)(r=(t=d.spec).onDestroy)==null||r.call(t,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:d=>{var f,p;const h=this.placeholderWidgets.get(d.id);h&&((p=(f=h.spec).onDestroy)==null||p.call(f,this.store.view,h.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(n=d.spec).onUpdate)==null||o.call(n,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of a){if(d.type==="inline"){this.addInlinePlaceholder(d,e);continue}if(d.type==="node"){this.addNodePlaceholder(d,e);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,e);continue}}for(const{id:d,data:f}of u){const p=this.placeholderWidgets.get(d);if(!p)continue;const h=Qe.widget(p.from,p.spec.element,{...p.spec,data:f});this.placeholders=this.placeholders.remove([p]).add(e.doc,[h]),this.placeholderWidgets.set(d,h)}for(const d of c){const f=this.placeholders.find(void 0,void 0,h=>h.id===d&&h.__type===Pa),p=this.placeholderWidgets.get(d);p&&((s=(i=p.spec).onDestroy)==null||s.call(i,this.store.view,p.spec.element)),this.placeholders=this.placeholders.remove(f),this.placeholderWidgets.delete(d)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const r of this.store.extensions){if(!r.createDecorations)continue;const n=r.createDecorations(e).find();t=t.add(e.doc,n)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(y2,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(y2,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t==null||t(e),!0)}addPlaceholder(e,t,r){return({dispatch:n,tr:o})=>this.addPlaceholderTransaction(e,t,o,!n)?(n==null||n(r?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:r,tr:n})=>this.updatePlaceholderTransaction({id:e,data:t,tr:n,checkOnly:!r})?(r==null||r(n),!0):!1}removePlaceholder(e){return({dispatch:t,tr:r})=>this.removePlaceholderTransaction({id:e,tr:r,checkOnly:!t})?(t==null||t(r),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t==null||t(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){const e=new Map,t=this.placeholders.find(void 0,void 0,r=>r.__type===Pa);for(const r of t)e.set(r.spec.id,{from:r.from,to:r.to});return e}createDecorations(e){var t,r,n;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(n=(r=this.store.helpers).isInteracting)!=null&&n.call(r)?Me.empty:AL(e,Me.empty,{class:oe(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:r,createElement:n,onDestroy:o,onUpdate:i,className:s,nodeName:a,id:l,type:c}=e,u=(n==null?void 0:n(this.store.view,r))??document.createElement(a);u.classList.add(s);const d=Qe.widget(r,u,{id:l,__type:Pa,type:c,element:u,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(l,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){const{from:r=t.selection.from,to:n=t.selection.to,className:o,nodeName:i,id:s,type:a}=e;let l;if(r===n){const c=document.createElement(i);c.classList.add(o),l=Qe.widget(r,c,{id:s,type:a,__type:Pa,widget:c})}else l=Qe.inline(r,n,{nodeName:i,class:o},{id:s,__type:Pa});this.placeholders=this.placeholders.add(t.doc,[l])}addNodePlaceholder(e,t){const{pos:r,className:n,nodeName:o,id:i}=e,s=hn(r)?t.doc.resolve(r):t.selection.$from,a=hn(r)?s.nodeAfter?{pos:r,end:s.nodeAfter.nodeSize}:void 0:B6(s);if(!a)return;const l=Qe.node(a.pos,a.end,{nodeName:o,class:n},{id:i,__type:Pa});this.placeholders=this.placeholders.add(t.doc,[l])}withRequiredBase(e,t){const{placeholderNodeName:r,placeholderClassName:n}=this.options,{nodeName:o=r,className:i,...s}=t,a=(i?[n,i]:[n]).join(" ");return{nodeName:o,className:a,...s,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{..._L,...t}}setMeta(e,t){const r=this.getMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addPlaceholderTransaction(e,t,r,n=!1){if(this.findPlaceholder(e))return!1;if(n)return!0;const{added:i}=this.getMeta(r);return this.setMeta(r,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{updated:s}=this.getMeta(r);return this.setMeta(r,{updated:Ol([...s,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:r,checkOnly:n=!1}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;const{removed:i}=this.getMeta(r);return this.setMeta(r,{removed:Ol([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:r=!1}=e;return this.getPluginState()===Me.empty?!1:(r||this.setMeta(t,{clearTrackers:!0}),!0)}};ee([Y()],so.prototype,"updateDecorations",1);ee([Y()],so.prototype,"addPlaceholder",1);ee([Y()],so.prototype,"updatePlaceholder",1);ee([Y()],so.prototype,"removePlaceholder",1);ee([Y()],so.prototype,"clearPlaceholders",1);ee([Ye()],so.prototype,"findPlaceholder",1);ee([Ye()],so.prototype,"findAllPlaceholders",1);so=ee([ve({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,r)=>e.add(r.doc,t.find()),getDefault:()=>Me.empty}}},defaultPriority:Ve.Low})],so);var _L={added:[],updated:[],clearTrackers:!1,removed:[]},Pa="placeholderDecoration",y2="persistentSelectionFocus";function AL(e,t,r){const{selection:n,doc:o}=e;if(n.empty)return t;const{from:i,to:s}=n,a=Dd(n)?Qe.node(i,s,r):Qe.inline(i,s,r);return t.add(o,[a])}var Y1=class extends Ge{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:r,tr:n}=e;t||(r??[n]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(e)}};Y1=ee([ve({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:Ve.Lowest})],Y1);var zn=class extends Ge{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",q1);const t=te(),r=te(),n=te(),o=new Set;for(const i of this.store.extensions){$d(i)&&(r[i.name]=a=>w5({state:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{var l;return(l=Bu({state:this.store.getState(),type:i.type,attrs:a}))==null?void 0:l.node.attrs}),Xh(i)&&(r[i.name]=a=>Np({trState:this.store.getState(),type:i.type,attrs:a}),n[i.name]=a=>{const l=ni(this.store.getState().selection.$from,i.type);if(!l||!a)return l==null?void 0:l.mark.attrs;if(Yv(l.mark,a))return l.mark.attrs});const s=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const a of Object.keys(i.decoratedHelpers??{}))s[a]=i[a].bind(i);if(!gp(s))for(const[a,l]of Lt(s))q5({name:a,set:o,code:H.DUPLICATE_HELPER_NAMES}),t[a]=l}this.store.setStoreKey("attrs",n),this.store.setStoreKey("active",r),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",n),this.store.setExtensionStore("active",r),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return Gv(e)}isViewEditable(e=this.store.getState()){var t,r;return((r=(t=this.store.view.props).editable)==null?void 0:r.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return r=>{const{state:n}=r,o=q1({content:e,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(r)}}getText({lineBreakDivider:e=` -`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,Ti)}getTextBetween(e,t,r=this.store.getState().doc){return r.textBetween(e,t,` +`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,Li)}getTextBetween(e,t,r=this.store.getState().doc){return r.textBetween(e,t,` -`,Ti)}getHTML(e=this.store.getState()){return D6(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`
${e.content}
`;return this.store.stringHandlers.html({...e,content:t})}};Z([Ue()],On.prototype,"isSelectionEmpty",1);Z([Ue()],On.prototype,"isViewEditable",1);Z([Ue()],On.prototype,"getStateJSON",1);Z([Ue()],On.prototype,"getJSON",1);Z([Ue()],On.prototype,"getRemirrorJSON",1);Z([G()],On.prototype,"insertHtml",1);Z([Ue()],On.prototype,"getText",1);Z([Ue()],On.prototype,"getTextBetween",1);Z([Ue()],On.prototype,"getHTML",1);On=Z([me({})],On);var N1=class extends je{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const r=[],n=this.store.markTags[oe.ExcludeInputRules];for(const o of this.store.extensions)if(!((e=this.store.managerSettings.exclude)!=null&&e.inputRules||!o.createInputRules||(t=o.options.exclude)!=null&&t.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=n,r.push(i);return QN({rules:r})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};N1=Z([me({defaultPriority:De.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],N1);var qn=class extends je{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,r;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(r=(t=this.store).rebuildKeymap)==null||r.call(t),()=>{var n,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(n=this.store).rebuildKeymap)==null||o.call(n)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return ne(e)?n8[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new Mo({props:{handleKeyDown:(t,r)=>{var n;return(n=this.keydownHandler)==null?void 0:n.call(this,t,r)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=Pv(e)}generateKeymapBindings(){var e;const t=[],r=this.shortcutMap,n=this.store.getExtension(ke),o=a=>l=>Mf({shortcut:l,map:r,store:this.store,options:a.options});for(const a of this.store.extensions){const l=a.decoratedKeybindings??{};if(!((e=a.options.exclude)!=null&&e.keymap)){a.createKeymap&&t.push(t8(a.createKeymap(o(a)),r));for(const[c,u]of At(l)){if(u.isActive&&!u.isActive(a.options,this.store))continue;const d=a[c].bind(a),f=Mf({shortcut:u.shortcut,map:r,options:a.options,store:this.store}),p=Pe(u.priority)?u.priority(a.options,this.store):u.priority??De.Low,h=ee();for(const m of f)h[m]=d;t.push([p,h]),u.command&&n.updateDecorated(u.command,{shortcut:f})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return h6(i)}arrowRightShortcut(e){const t=this.store.markTags[oe.PreventExits],r=this.store.nodeTags[oe.PreventExits];return this.exitMarkForwards(t,r)(e)}arrowLeftShortcut(e){const t=this.store.markTags[oe.PreventExits],r=this.store.nodeTags[oe.PreventExits];return yp(this.exitNodeBackwards(r),this.exitMarkBackwards(t,r))(e)}backspace(e){const t=this.store.markTags[oe.PreventExits],r=this.store.nodeTags[oe.PreventExits];return yp(this.exitNodeBackwards(r,!0),this.exitMarkBackwards(t,r,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:r}=this.options,n=ee();if(!r)for(const[o,i]of At(ag))n[o]=cu(i);return t&&ag.Backspace&&(n.Backspace=cu(Ah(ZN,ag.Backspace))),e&&(n.Escape=cu(dz)),[De.Low,n]}getNamedShortcut(e,t={}){return e.startsWith("_|")?Mf({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,r;const{changes:n}=e;(n.excludeBaseKeymap.changed||n.selectParentNodeOnEscape.changed||n.undoInputRuleOnBackspace.changed)&&((r=(t=this.store).rebuildKeymap)==null||r.call(t))}sortKeymaps(e){return Gs(e.map(t=>at(t)?t:[De.Default,t]),(t,r)=>r[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return r=>{const{tr:n,dispatch:o}=r;if(!F6(n.selection)||Yi({selection:n.selection,types:t}))return!1;const a=n.selection.$from.marks().filter(l=>!e.includes(l.type.name));if(qi(a))return!1;if(!o)return!0;for(const l of a)n.removeStoredMark(l);return o(n.insertText(" ",n.selection.from)),!0}}exitNodeBackwards(e,t=!1){return r=>{const{tr:n}=r;if(!(t?Kx:_1)(n.selection))return!1;const i=n.selection.$anchor.node();return!Th(i)||E6(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(r)}}exitMarkBackwards(e,t,r=!1){return n=>{const{tr:o,dispatch:i}=n;if(!(r?Kx:_1)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(Yi({selection:o.selection,types:t}))return!1;const l=[...o.storedMarks??[],...o.selection.$from.marks()].filter(c=>!e.includes(c.type.name));if(qi(l))return!1;if(!i)return!0;for(const c of l)o.removeStoredMark(c);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};Z([Et({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],qn.prototype,"arrowRightShortcut",1);Z([Et({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],qn.prototype,"arrowLeftShortcut",1);Z([Et({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],qn.prototype,"backspace",1);Z([Ue()],qn.prototype,"getNamedShortcut",1);qn=Z([me({defaultPriority:De.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],qn);function e8(e){return br(vh(j),e)}function Mf({shortcut:e,map:t,options:r,store:n}){return ne(e)?[R1(e,t)]:at(e)?e.map(o=>R1(o,t)):(e=e(r,n),Mf({shortcut:e,map:t,options:r,store:n}))}function R1(e,t){return e8(e)?t[e]:e}function t8(e,t){const r={};let n,o;at(e)?[o,n]=e:n=e;for(const[i,s]of At(n))r[R1(i,t)]=s;return yh(o)?r:[o,r]}var E5={[j.Copy]:"Mod-c",[j.Cut]:"Mod-x",[j.Paste]:"Mod-v",[j.PastePlain]:"Mod-Shift-v",[j.SelectAll]:"Mod-a",[j.Undo]:"Mod-z",[j.Redo]:en.isMac?"Shift-Mod-z":"Mod-y",[j.Bold]:"Mod-b",[j.Italic]:"Mod-i",[j.Underline]:"Mod-u",[j.Strike]:"Mod-d",[j.Code]:"Mod-`",[j.Paragraph]:"Mod-Shift-0",[j.H1]:"Mod-Shift-1",[j.H2]:"Mod-Shift-2",[j.H3]:"Mod-Shift-3",[j.H4]:"Mod-Shift-4",[j.H5]:"Mod-Shift-5",[j.H6]:"Mod-Shift-6",[j.TaskList]:"Mod-Shift-7",[j.BulletList]:"Mod-Shift-8",[j.OrderedList]:"Mod-Shift-9",[j.Quote]:"Mod->",[j.Divider]:"Mod-Shift-|",[j.Codeblock]:"Mod-Shift-~",[j.ClearFormatting]:"Mod-Shift-C",[j.Superscript]:"Mod-.",[j.Subscript]:"Mod-,",[j.LeftAlignment]:"Mod-Shift-L",[j.CenterAlignment]:"Mod-Shift-E",[j.RightAlignment]:"Mod-Shift-R",[j.JustifyAlignment]:"Mod-Shift-J",[j.InsertLink]:"Mod-k",[j.Find]:"Mod-f",[j.FindBackwards]:"Mod-Shift-f",[j.FindReplace]:"Mod-Shift-H",[j.AddFootnote]:"Mod-Alt-f",[j.AddComment]:"Mod-Alt-m",[j.ContextMenu]:"Mod-Shift-\\",[j.IncreaseFontSize]:"Mod-Shift-.",[j.DecreaseFontSize]:"Mod-Shift-,",[j.IncreaseIndent]:"Tab",[j.DecreaseIndent]:"Shift-Tab",[j.Shortcuts]:"Mod-/",[j.Format]:en.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},r8={...E5,[j.Strike]:"Mod-Shift-S",[j.Code]:"Mod-Shift-M",[j.Paragraph]:"Mod-Alt-0",[j.H1]:"Mod-Alt-1",[j.H2]:"Mod-Alt-2",[j.H3]:"Mod-Alt-3",[j.H4]:"Mod-Alt-4",[j.H5]:"Mod-Alt-5",[j.H6]:"Mod-Alt-6",[j.OrderedList]:"Mod-Alt-7",[j.BulletList]:"Mod-Alt-8",[j.Quote]:"Mod-Alt-9",[j.ClearFormatting]:"Mod-\\",[j.IncreaseIndent]:"Mod-[",[j.DecreaseIndent]:"Mod-]"},n8={default:E5,googleDoc:r8},o8=class extends je{get name(){return"nodeViews"}createPlugin(){const e=[],t=ee();for(const r of this.store.extensions){if(!r.createNodeViews)continue;const n=r.createNodeViews();e.unshift(Pe(n)?{[r.name]:n}:n)}e.unshift(this.store.managerSettings.nodeViews??{});for(const r of e)Object.assign(t,r);return{props:{nodeViews:t}}}},i8=class extends je{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!n.createPasteRules||(t=n.options.exclude)!=null&&t.pasteRules)continue;const o=n.createPasteRules(),i=at(o)?o:[o];r.push(...i)}return Cz(r)}},xp=class extends je{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=ee(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return te(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:r,extensions:n}=this.store;this.updateExtensionStore();const{plugins:o=[]}=r;this.updatePlugins(o,this.managerPlugins);for(const i of n)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr,o={previousState:t,tr:n,transactions:e,state:r};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),n.docChanged||n.steps.length>0||n.selectionSet||n.storedMarksSet?n:void 0},state:{init:(e,t)=>{for(const r of this.initStateHandlers)r(t)},apply:(e,t,r,n)=>{const o={previousState:r,state:n,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,r;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(r=e.options.exclude)!=null&&r.plugins)){if(e.createPlugin){const o=new pa(e.name);this.pluginKeys[e.name]=o;const i=this.getPluginStateCreator(o);e.pluginKey=o,e.getPluginState=i,this.stateGetters.set(e.name,i),this.stateGetters.set(e.constructor,i);const s={...e.createPlugin(),key:o},a=new Mo(s);this.updatePlugins([a],e.plugin?[e.plugin]:void 0),e.plugin=a}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||qi(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(n=>!t.includes(n)),...e];return}const r=new Map;for(const[n,o]of e.entries())r.set(nt(t,n),o);this.plugins=this.plugins.map(n=>t.includes(n)?r.get(n):n)}updateExtensionStore(){const{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){const t=w5(e)?e:Uz(e)?this.store.manager.getExtension(e):this.store.extensions.find(r=>r.name===e);te(t,{code:H.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){te(this.store.phase>=Or.EditorView,{code:H.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:e,updateState:t}=this.store,r=e.state.reconfigure({plugins:this.plugins});t(r)}};xp=Z([me({defaultPriority:De.Highest,handlerKeys:["applyState","appendTransaction"]})],xp);var P1=class extends je{constructor(){super(...arguments),this.dynamicAttributes={marks:ee(),nodes:ee()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:r,nodeNames:n,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:a,markOverride:l}=e,c=h=>!!(h&&t[oe.Block].includes(h));if(e.schema){const{nodes:h,marks:m}=p8(e.schema);this.addSchema(e.schema,h,m);return}const u=c(i)?{doc:ee(),[i]:ee()}:ee(),d=ee(),f=s8({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:n,markNames:r,tags:t});for(const h of o){f[h.name]={...f[h.name],...h.options.extraAttributes};const m=s===!0||h.options.disableExtraAttributes===!0||h.constructor.disableExtraAttributes===!0;if(Td(h)){const{spec:b,dynamic:v}=Xx({createExtensionSpec:(g,y)=>h.createNodeSpec(g,y),extraAttributes:nt(f,h.name),override:{...a,...h.options.nodeOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags});h.spec=b,u[h.name]=b,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[h.name]=v)}if(Ph(h)){const{spec:b,dynamic:v}=Xx({createExtensionSpec:(g,y)=>h.createMarkSpec(g,y),extraAttributes:nt(f,h.name),override:{...l,...h.options.markOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags??[]});h.spec=b,d[h.name]=b,Object.keys(v).length>0&&(this.dynamicAttributes.marks[h.name]=v)}}const p=new nA({nodes:u,marks:d,topNode:"doc"});this.addSchema(p,u,d)}createPlugin(){return{appendTransaction:(e,t,r)=>{const{tr:n}=r;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(n.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,n),this.checkAndUpdateDynamicMarks(i,s,n),!0)),n.steps.length>0?n:null)}}}addSchema(e,t,r){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",r),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",Mh(e).name);for(const n of Object.values(e.nodes))if(n.name!=="doc"&&(n.isBlock||n.isTextblock))break}checkAndUpdateDynamicNodes(e,t,r){for(const[n,o]of At(this.dynamicAttributes.nodes))if(e.type.name===n)for(const[i,s]of At(o)){if(!Ki(e.attrs[i]))continue;const a={...e.attrs,[i]:s(e)};r.setNodeMarkup(t,void 0,a),Vx(r)}}checkAndUpdateDynamicMarks(e,t,r){for(const[n,o]of At(this.dynamicAttributes.marks)){const i=nt(this.store.schema.marks,n),s=e.marks.find(a=>a.type.name===n);if(s)for(const[a,l]of At(o)){if(!Ki(s.attrs[a]))continue;const c=Yo(r.doc.resolve(t),i);if(!c)continue;const{from:u,to:d}=c,f=i.create({...s.attrs,[a]:l(s)});r.removeMark(u,d,i).addMark(u,d,f),Vx(r)}}}gatherExtraAttributes(e){const t=[];for(const r of e)r.createSchemaAttributes&&t.push(...r.createSchemaAttributes());return t}};P1=Z([me({defaultPriority:De.Highest})],P1);function s8(e){const{settings:t,gatheredSchemaAttributes:r,nodeNames:n,markNames:o,tags:i}=e,s=ee();if(t.disableExtraAttributes)return s;const a=[...r,...t.extraAttributes??[]];for(const l of a??[]){const c=l8({identifiers:l.identifiers,nodeNames:n,markNames:o,tags:i});for(const u of c){const d=s[u]??{};s[u]={...d,...l.attributes}}}return s}function a8(e){return ss(e)&&at(e.tags)}function l8(e){const{identifiers:t,nodeNames:r,markNames:n,tags:o}=e;if(t==="nodes")return r;if(t==="marks")return n;if(t==="all")return[...r,...n];if(at(t))return t;te(a8(t),{code:H.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:a="any",excludeNames:l,excludeTags:c,type:u}=t,d=new Set,f=u==="mark"?n:u==="node"?r:[...n,...r],p=m=>f.includes(m)&&!(l!=null&&l.includes(m));for(const m of s)p(m)&&d.add(m);const h=new Map;for(const m of i)if(!(c!=null&&c.includes(m)))for(const b of o[m]){if(!p(b))continue;if(a==="any"){d.add(b);continue}const v=h.get(b)??new Set;v.add(m),h.set(b,v)}for(const[m,b]of h)b.size===i.length&&d.add(m);return[...d]}function Xx(e){var t;const{createExtensionSpec:r,extraAttributes:n,ignoreExtraAttributes:o,name:i,tags:s,override:a}=e,l=ee();function c(b,v){l[b]=v}let u=!1;function d(){u=!0}const f=c8(n,o,d,c),p=u8(n,o),h=d8(n,o),m=r({defaults:f,parse:p,dom:h},a);return te(o||u,{code:H.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),m.group=[...((t=m.group)==null?void 0:t.split(" "))??[],...s].join(" ")||void 0,{spec:m,dynamic:l}}function zv(e){return ne(e)||Pe(e)?{default:e}:(te(e,{message:`${wS(e)} is not supported`,code:H.EXTENSION_EXTRA_ATTRIBUTES}),e)}function c8(e,t,r,n){return()=>{r();const o=ee();if(t)return o;for(const[i,s]of At(e)){let l=zv(s).default;Pe(l)&&(n(i,l),l=null),o[i]=l===void 0?{}:{default:l}}return o}}function u8(e,t){return r=>{const n=ee();if(t)return n;for(const[o,i]of At(e)){const{parseDOM:s,...a}=zv(i);if(mt(r)){if(Ki(s)){n[o]=r.getAttribute(o)??a.default;continue}if(Pe(s)){n[o]=s(r)??a.default;continue}n[o]=r.getAttribute(s)??a.default}}return n}}function d8(e,t){return r=>{const n=ee();if(t)return n;function o(i,s){if(i){if(ne(i)){n[s]=i;return}if(at(i)){const[a,l]=i;n[a]=l??r.attrs[s];return}for(const[a,l]of At(i))n[a]=l}}for(const[i,s]of At(e)){const{toDOM:a,parseDOM:l}=zv(s);if(Ki(a)){const c=ne(l)?l:i;n[c]=r.attrs[i];continue}if(Pe(a)){o(a(r.attrs,f8(r)),i);continue}o(a,i)}return n}}function f8(e){return Cd(e)?{node:e}:k6(e)?{mark:e}:{}}function p8(e){const t=ee(),r=ee();for(const[n,o]of Object.entries(e.nodes))t[n]=o.spec;for(const[n,o]of Object.entries(e.marks))r[n]=o.spec;return{nodes:t,marks:r}}var Cl=class extends je{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return Fx(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>Fx(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>r6(this.store.getState(),e))}createExternalPlugins(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!n.createSuggesters||(t=n.options.exclude)!=null&&t.suggesters)continue;const o=n.createSuggesters(),i=at(o)?o:[o];r.push(...i)}return[n6(...r)]}getSuggestState(e){return Cv(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}}isSuggesterActive(e){var t;return br(at(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};Z([Ue()],Cl.prototype,"getSuggestState",1);Z([Ue()],Cl.prototype,"getSuggestMethods",1);Z([Ue()],Cl.prototype,"isSuggesterActive",1);Cl=Z([me({customHandlerKeys:["suggester"]})],Cl);var z1=class extends je{constructor(){super(...arguments),this.allTags=ee(),this.plainTags=ee(),this.markTags=ee(),this.nodeTags=ee()}get name(){return"tags"}onCreate(){this.resetTags();for(const e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const e=ee(),t=ee(),r=ee(),n=ee();for(const o of vh(oe))e[o]=[],t[o]=[],r[o]=[],n[o]=[];this.allTags=e,this.plainTags=t,this.markTags=r,this.nodeTags=n}updateTagForExtension(e){var t,r;const n=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((r=this.store.managerSettings.extraTags)==null?void 0:r[e.name])??[]]);for(const o of n)te(h8(o),{code:H.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(e.name),S5(e)&&this.plainTags[o].push(e.name),Ph(e)&&this.markTags[o].push(e.name),Td(e)&&this.nodeTags[o].push(e.name);e.tags=[...n]}};z1=Z([me({defaultPriority:De.Highest})],z1);function h8(e){return br(vh(oe),e)}var m8=new pa("remirrorFilePlaceholderPlugin");function g8(){const e=new Mo({key:m8,state:{init(){return{set:Ee.empty,payloads:new Map}},apply(t,{set:r,payloads:n}){r=r.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=qe.widget(o.pos,i,{id:o.id});r=r.add(t.doc,[s]),n.set(o.id,o.payload)}else o.type===1&&(r=r.remove(r.find(void 0,void 0,i=>i.id===o.id)),n.delete(o.id));return{set:r,payloads:n}}},props:{decorations(t){var r;return((r=e.getState(t))==null?void 0:r.set)??null}}});return e}var v8=class extends je{get name(){return"upload"}createExternalPlugins(){return[g8()]}};function y8(e={}){e={...{exitMarksOnArrowPress:qn.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:qn.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:qn.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:qn.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:eo.defaultOptions.persistentSelectionClass},...e};const r=a1(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),n=a1(e,["persistentSelectionClass"]);return[new z1,new P1,new Wz,new xp,new N1,new i8,new o8,new Cl,new ke,new On,new qn(r),new A1,new v8,new eo(n)]}var Qx=class extends je{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){const t=e.decoratedCommands??{},r=e.createCommands;for(const n of Object.keys(t)){const o=e[n];e[n]=(...i)=>s=>{var a;const l=o(...i)(s);return s.dispatch&&l&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((a=s.view)==null?void 0:a.dispatch),name:n,extension:e.name,decorated:!0}),l}}r&&(e.createCommands=()=>{const n=r();for(const[o,i]of Object.entries(n))n[o]=(...s)=>a=>{var l;const c=i(...s)(a);return a.dispatch&&c&&this.setCommandMeta(a.tr,{type:"command",chain:a.dispatch!==((l=a.view)==null?void 0:l.dispatch),name:o,extension:e.name,decorated:!1}),c};return n})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...r,t])}};Qx=Z([me({defaultOptions:{capture:en.isDevelopment},staticKeys:["capture"],defaultPriority:De.Highest})],Qx);var Tf,Oc,Of,Da,vi,_f,Af,b8=class{constructor(e){kt(this,Tf,vl()),kt(this,Oc,void 0),kt(this,Of,void 0),kt(this,Da,!0),kt(this,vi,Nh()),kt(this,_f,void 0),kt(this,Af,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,a;te(!this.manager.destroyed,{code:H.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((a=(s=this.props).onDispatchTransaction)==null?void 0:a.call(s,i,this.getState()))??i;const l=this.getState(),{state:c,transactions:u}=l.applyTransaction(i);Lt(this,Of,l),this.updateState({state:c,tr:i,transactions:u});const d=this.manager.store.getForcedUpdates(i);qi(d)||this.updateViewProps(...d)},this.onChange=(i=ee())=>{var s,a;const l=this.eventListenerProps(i);q(this,Da)&&Lt(this,Da,!1),(a=(s=this.props).onChange)==null||a.call(s,l)},this.onBlur=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onBlur)==null||a.call(s,l,i),q(this,vi).emit("blur",l,i)},this.onFocus=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onFocus)==null||a.call(s,l,i),q(this,vi).emit("focus",l,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:a}=this.manager.createState({content:i}),l=this.getState(),{state:c}=this.getState().applyTransaction(l.tr.replaceRangeWith(0,l.doc.nodeSize-2,a));if(s)return this.updateState({state:c,triggerChange:s});this.view.updateState(c)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:t,initialEditorState:r,element:n}=e;if(Lt(this,Oc,t),Lt(this,Af,r),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(r,n);this.manager.addView(o)}get addHandler(){return q(this,_f)??Lt(this,_f,q(this,vi).on.bind(q(this,vi)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return q(this,Da)}get props(){return q(this,Oc).call(this)}get previousState(){return this.previousStateOverride??q(this,Of)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return q(this,Tf)}get initialEditorState(){return q(this,Af)}updateListener(e){const{state:t,tr:r}=e;return q(this,vi).emit("updated",this.eventListenerProps({state:t,tr:r}))}update(e){const{getProps:t}=e;return Lt(this,Oc,t),this}updateViewProps(...e){const t=a1(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:r,autoFocus:n,classNames:o=[],label:i,editable:s}=this.props,a=(t=this.manager.store)==null?void 0:t.attributes,l=Pe(r)?r(this.eventListenerProps()):r;let c={};(n||ln(n))&&(c=e?{autoFocus:!0}:{autofocus:"true"});const u=yl(Pu(e&&"Prosemirror","remirror-editor",a==null?void 0:a.class,...o).split(" ")).join(" "),d={role:"textbox",...c,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...a,class:u};return ES({...d,...l})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){q(this,vi).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=ee()){const{state:t,tr:r,transactions:n}=e;return{tr:r,transactions:n,internalUpdate:!r,view:this.view,firstRender:q(this,Da),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:q(this,Tf),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Tf=new WeakMap;Oc=new WeakMap;Of=new WeakMap;Da=new WeakMap;vi=new WeakMap;_f=new WeakMap;Af=new WeakMap;function k8(e,t){const r=[],n=new WeakMap,o=[],i=new WeakMap;let s=[];const a={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:t};for(const d of e)C5(a,{extension:d});s=Gs(s,(d,f)=>f.priority-d.priority);const l=new WeakSet,c=new Set;for(const d of s){const f=d.constructor,p=d.name,h=i.get(f);te(h,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:H.INTERNAL}),!(l.has(f)||c.has(p))&&(l.add(f),c.add(p),r.push(d),n.set(f,d),h.forEach(m=>m==null?void 0:m.replaceChildExtension(f,d)))}const u=[];for(const d of r)x8({extension:d,found:l,missing:u});return te(qi(u),{code:H.MISSING_REQUIRED_EXTENSION,message:u.map(({Constructor:d,extension:f})=>`The extension '${f.name}' requires '${d.name} in order to run correctly.`).join(` -`)}),{extensions:r,extensionMap:n}}function C5(e,t){var r;const{gatheredExtensions:n,duplicateMap:o,parentExtensions:i,settings:s}=e,{extension:a,parentExtension:l}=t;let{names:c=[]}=t;te(w5(a),{code:H.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${a} was provided to the [[\`RemirrorManager\`]].`});const u=a.extensions;if(a.setPriority((r=s.priority)==null?void 0:r[a.name]),n.push(a),w8({duplicateMap:o,extension:a,parentExtension:l}),u.length!==0){if(c.includes(a.name)){`${c.join(" > ")}${a.name}`;return}c=[...c,a.name],i.push(a);for(const d of u)C5(e,{names:c,extension:d,parentExtension:a})}}function x8(e){const{extension:t,found:r,missing:n}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])r.has(o)||n.push({Constructor:o,extension:t})}function w8(e){const{duplicateMap:t,extension:r,parentExtension:n}=e,o=r.constructor,i=t.get(o),s=n?[n]:[];t.set(o,i?[...i,...s]:s)}function S8(e){var t,r,n,o;const{extension:i,nodeNames:s,markNames:a,plainNames:l,store:c,handlers:u}=e;i.setStore(c);const d=(t=i.onCreate)==null?void 0:t.bind(i),f=(r=i.onView)==null?void 0:r.bind(i),p=(n=i.onStateUpdate)==null?void 0:n.bind(i),h=(o=i.onDestroy)==null?void 0:o.bind(i);d&&u.create.push(d),f&&u.view.push(f),p&&u.update.push(p),h&&u.destroy.push(h),Ph(i)&&a.push(i.name),Td(i)&&i.name!=="doc"&&s.push(i.name),S5(i)&&l.push(i.name)}var yi,_c,Bn,Ro,Ac,Yr,ys,Nc,bs,Rc,ks,Fn,Pc,Nf=class{constructor(e,t={}){kt(this,yi,void 0),kt(this,_c,ee()),kt(this,Bn,ee()),kt(this,Ro,void 0),kt(this,Ac,void 0),kt(this,Yr,Or.None),kt(this,ys,void 0),kt(this,Nc,!0),kt(this,bs,{create:[],view:[],update:[],destroy:[]}),kt(this,Rc,[]),kt(this,ks,Nh()),kt(this,Fn,void 0),kt(this,Pc,void 0),this.getState=()=>{var o;return q(this,Yr)>=Or.EditorView?this.view.state:(te(q(this,Fn),{code:H.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=q(this,Fn))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:r,extensionMap:n}=k8(e,t);Lt(this,ys,t),Lt(this,Ro,Rs(r)),Lt(this,Ac,n),Lt(this,yi,this.createExtensionStore()),Lt(this,Yr,Or.Create),this.setupLifecycleHandlers();for(const o of q(this,bs).create){const i=o();i&&q(this,Rc).push(i)}}static create(e,t={}){return new Nf([...AS(e),...y8(t.builtin)],t)}get[Go](){return $t.Manager}get destroyed(){return q(this,Yr)===Or.Destroy}get mounted(){return q(this,Yr)>=Or.EditorView&&q(this,Yr)q(this,Ro),enumerable:t},phase:{get:()=>q(this,Yr),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>Rs(q(this,ys)),enumerable:t},getState:{value:this.getState,enumerable:t},updateState:{value:this.updateState,enumerable:t},isMounted:{value:()=>this.mounted,enumerable:t},getExtension:{value:this.getExtension.bind(this),enumerable:t},manager:{get:()=>this,enumerable:t},document:{get:()=>this.document,enumerable:t},stringHandlers:{get:()=>q(this,_c),enumerable:t},currentState:{get:()=>r??(r=this.getState()),set:o=>{r=o},enumerable:t},previousState:{get:()=>n,set:o=>{n=o},enumerable:t}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(q(this,Yr)>=Or.EditorView)return this;Lt(this,Nc,!0),Lt(this,Yr,Or.EditorView),q(this,Bn).view=e;for(const t of q(this,bs).view){const r=t(e);r&&q(this,Rc).push(r)}return this}attachFramework(e,t){var r;q(this,Fn)!==e&&(q(this,Fn)&&(q(this,Fn).destroy(),(r=q(this,Pc))==null||r.call(this)),Lt(this,Fn,e),Lt(this,Pc,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return te(t,{code:H.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:r="end"}=this.settings,{content:n=this.createEmptyDoc(),selection:o=r,stringHandler:i=this.settings.stringHandler}=e,{schema:s,plugins:a}=this.store,l=n5({stringHandler:ne(i)?this.stringHandlers[i]:i,document:this.document,content:n,onError:t,schema:s,selection:o});return Ps.create({schema:s,doc:l,plugins:a,selection:Tn(o,l)})}addHandler(e,t){return q(this,ks).on(e,t)}onStateUpdate(e){const t=q(this,Nc);q(this,yi).currentState=e.state,q(this,yi).previousState=e.previousState,t&&(Lt(this,Yr,Or.Runtime),Lt(this,Nc,!1));const r={...e,firstUpdate:t};for(const n of q(this,bs).update)n(r);q(this,ks).emit("stateUpdate",r)}getExtension(e){const t=q(this,Ac).get(e);return te(t,{code:H.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!q(this,Ac).get(e)}clone(){const e=q(this,Ro).map(r=>r.clone(r.options)),t=Nf.create(()=>e,q(this,ys));return q(this,ks).emit("clone",t),t}recreate(e=[],t={}){const r=q(this,Ro).map(o=>o.clone(o.initialOptions)),n=Nf.create(()=>[...r,...e],t);return q(this,ks).emit("recreate",n),n}destroy(){var e,t,r,n,o,i;Lt(this,Yr,Or.Destroy);for(const s of((e=this.view)==null?void 0:e.state.plugins)??[])(r=(t=s.getState(this.view.state))==null?void 0:t.destroy)==null||r.call(t);(n=q(this,Fn))==null||n.destroy(),(o=q(this,Pc))==null||o.call(this);for(const s of q(this,Rc))s();for(const s of q(this,bs).destroy)s();(i=this.view)==null||i.destroy(),q(this,ks).emit("destroy")}includes(e){const t=[],r=[];for(const n of q(this,Ro))t.push(n.name,n.constructorName),r.push(n.constructor);return e.every(n=>ne(n)?br(t,n):br(r,n))}},E8=Nf;yi=new WeakMap;_c=new WeakMap;Bn=new WeakMap;Ro=new WeakMap;Ac=new WeakMap;Yr=new WeakMap;ys=new WeakMap;Nc=new WeakMap;bs=new WeakMap;Rc=new WeakMap;ks=new WeakMap;Fn=new WeakMap;Pc=new WeakMap;function C8(e,t){return!Gl(e)||!Yl(e,$t.Manager)?!1:t?e.includes(t):!0}var M8=Object.defineProperty,T8=Object.getOwnPropertyDescriptor,Od=(e,t,r,n)=>{for(var o=n>1?void 0:n?T8(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&M8(t,r,o),o},M5=/\S+/g;function T5(e){return e.type.isTextblock?1:e.type.isText?e.textBetween(0,e.nodeSize).length:0}function O8({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;const s=T5(o);return r+s>t?(n=i+1+(t-r),!1):(r+=s,!0)}),n}function _8({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),a=Kl(s,M5);if(r+a.length>t){const l=t-r,c=a[l];return n=i+((c==null?void 0:c.index)??0),!1}return r+=a.length,!0}),n}var Qi=class extends je{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(e=this.store.getState()){let t=0;return e.doc.nodesBetween(0,e.doc.nodeSize-2,r=>(t+=T5(r),!0)),Math.max(t-1,0)}getWordCount(e=this.store.getState()){const t=this.store.helpers.getText({lineBreakDivider:" ",state:e});return Kl(t,M5).length}isCountValid(e=this.store.getState()){const{maximumStrategy:t,maximum:r}=this.options;return r<1?!0:t==="CHARACTERS"?this.store.helpers.getCharacterCount(e)<=r:this.store.helpers.getWordCount(e)<=r}createDecorationSet(e){const{maximum:t=-1,maximumStrategy:r,maximumExceededClassName:n}=this.options,s=(r==="CHARACTERS"?O8:_8)(e,t);return Ee.create(e.doc,[qe.inline(s,e.doc.nodeSize-2,{class:n})])}createExternalPlugins(){const{maximum:e}=this.options,t=new Mo({state:{init:(r,n)=>this.isCountValid(n)?{decorationSet:Ee.empty}:{decorationSet:this.createDecorationSet(n)},apply:(r,n,o,i)=>!r.docChanged||e<1?n:this.isCountValid(i)?{decorationSet:Ee.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(r){var n;return((n=t.getState(r))==null?void 0:n.decorationSet)??null}}});return[t]}};Od([Ue()],Qi.prototype,"getCountMaximum",1);Od([Ue()],Qi.prototype,"getCharacterCount",1);Od([Ue()],Qi.prototype,"getWordCount",1);Od([Ue()],Qi.prototype,"isCountValid",1);Qi=Od([me({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Qi);var O5={exports:{}},dn={},_5={exports:{}},A5={};/** +`,Li)}getHTML(e=this.store.getState()){return hz(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`
${e.content}
`;return this.store.stringHandlers.html({...e,content:t})}};ee([Ye()],zn.prototype,"isSelectionEmpty",1);ee([Ye()],zn.prototype,"isViewEditable",1);ee([Ye()],zn.prototype,"getStateJSON",1);ee([Ye()],zn.prototype,"getJSON",1);ee([Ye()],zn.prototype,"getRemirrorJSON",1);ee([Y()],zn.prototype,"insertHtml",1);ee([Ye()],zn.prototype,"getText",1);ee([Ye()],zn.prototype,"getTextBetween",1);ee([Ye()],zn.prototype,"getHTML",1);zn=ee([ve({})],zn);var X1=class extends Ge{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const r=[],n=this.store.markTags[ie.ExcludeInputRules];for(const o of this.store.extensions)if(!((e=this.store.managerSettings.exclude)!=null&&e.inputRules||!o.createInputRules||(t=o.options.exclude)!=null&&t.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=n,r.push(i);return _N({rules:r})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};X1=ee([ve({defaultPriority:Ve.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],X1);var Zn=class extends Ge{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,r;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(r=(t=this.store).rebuildKeymap)==null||r.call(t),()=>{var n,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(n=this.store).rebuildKeymap)==null||o.call(n)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return oe(e)?zL[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new zo({props:{handleKeyDown:(t,r)=>{var n;return(n=this.keydownHandler)==null?void 0:n.call(this,t,r)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=ey(e)}generateKeymapBindings(){var e;const t=[],r=this.shortcutMap,n=this.store.getExtension(we),o=a=>l=>Hf({shortcut:l,map:r,store:this.store,options:a.options});for(const a of this.store.extensions){const l=a.decoratedKeybindings??{};if(!((e=a.options.exclude)!=null&&e.keymap)){a.createKeymap&&t.push(NL(a.createKeymap(o(a)),r));for(const[c,u]of Lt(l)){if(u.isActive&&!u.isActive(a.options,this.store))continue;const d=a[c].bind(a),f=Hf({shortcut:u.shortcut,map:r,options:a.options,store:this.store}),p=Le(u.priority)?u.priority(a.options,this.store):u.priority??Ve.Low,h=te();for(const m of f)h[m]=d;t.push([p,h]),u.command&&n.updateDecorated(u.command,{shortcut:f})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return W6(i)}arrowRightShortcut(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return this.exitMarkForwards(t,r)(e)}arrowLeftShortcut(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return Rp(this.exitNodeBackwards(r),this.exitMarkBackwards(t,r))(e)}backspace(e){const t=this.store.markTags[ie.PreventExits],r=this.store.nodeTags[ie.PreventExits];return Rp(this.exitNodeBackwards(r,!0),this.exitMarkBackwards(t,r,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:r}=this.options,n=te();if(!r)for(const[o,i]of Lt(Mg))n[o]=yu(i);return t&&Mg.Backspace&&(n.Backspace=yu(qh(AN,Mg.Backspace))),e&&(n.Escape=yu(Vz)),[Ve.Low,n]}getNamedShortcut(e,t={}){return e.startsWith("_|")?Hf({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,r;const{changes:n}=e;(n.excludeBaseKeymap.changed||n.selectParentNodeOnEscape.changed||n.undoInputRuleOnBackspace.changed)&&((r=(t=this.store).rebuildKeymap)==null||r.call(t))}sortKeymaps(e){return ra(e.map(t=>ft(t)?t:[Ve.Default,t]),(t,r)=>r[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return r=>{const{tr:n,dispatch:o}=r;if(!yz(n.selection)||ns({selection:n.selection,types:t}))return!1;const a=n.selection.$from.marks().filter(l=>!e.includes(l.type.name));if(ts(a))return!1;if(!o)return!0;for(const l of a)n.removeStoredMark(l);return o(n.insertText(" ",n.selection.from)),!0}}exitNodeBackwards(e,t=!1){return r=>{const{tr:n}=r;if(!(t?h2:G1)(n.selection))return!1;const i=n.selection.$anchor.node();return!Uh(i)||tz(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(r)}}exitMarkBackwards(e,t,r=!1){return n=>{const{tr:o,dispatch:i}=n;if(!(r?h2:G1)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(ns({selection:o.selection,types:t}))return!1;const l=[...o.storedMarks??[],...o.selection.$from.marks()].filter(c=>!e.includes(c.type.name));if(ts(l))return!1;if(!i)return!0;for(const c of l)o.removeStoredMark(c);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};ee([_t({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],Zn.prototype,"arrowRightShortcut",1);ee([_t({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],Zn.prototype,"arrowLeftShortcut",1);ee([_t({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],Zn.prototype,"backspace",1);ee([Ye()],Zn.prototype,"getNamedShortcut",1);Zn=ee([ve({defaultPriority:Ve.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],Zn);function RL(e){return Er(zh(j),e)}function Hf({shortcut:e,map:t,options:r,store:n}){return oe(e)?[J1(e,t)]:ft(e)?e.map(o=>J1(o,t)):(e=e(r,n),Hf({shortcut:e,map:t,options:r,store:n}))}function J1(e,t){return RL(e)?t[e]:e}function NL(e,t){const r={};let n,o;ft(e)?[o,n]=e:n=e;for(const[i,s]of Lt(n))r[J1(i,t)]=s;return Lh(o)?r:[o,r]}var X5={[j.Copy]:"Mod-c",[j.Cut]:"Mod-x",[j.Paste]:"Mod-v",[j.PastePlain]:"Mod-Shift-v",[j.SelectAll]:"Mod-a",[j.Undo]:"Mod-z",[j.Redo]:an.isMac?"Shift-Mod-z":"Mod-y",[j.Bold]:"Mod-b",[j.Italic]:"Mod-i",[j.Underline]:"Mod-u",[j.Strike]:"Mod-d",[j.Code]:"Mod-`",[j.Paragraph]:"Mod-Shift-0",[j.H1]:"Mod-Shift-1",[j.H2]:"Mod-Shift-2",[j.H3]:"Mod-Shift-3",[j.H4]:"Mod-Shift-4",[j.H5]:"Mod-Shift-5",[j.H6]:"Mod-Shift-6",[j.TaskList]:"Mod-Shift-7",[j.BulletList]:"Mod-Shift-8",[j.OrderedList]:"Mod-Shift-9",[j.Quote]:"Mod->",[j.Divider]:"Mod-Shift-|",[j.Codeblock]:"Mod-Shift-~",[j.ClearFormatting]:"Mod-Shift-C",[j.Superscript]:"Mod-.",[j.Subscript]:"Mod-,",[j.LeftAlignment]:"Mod-Shift-L",[j.CenterAlignment]:"Mod-Shift-E",[j.RightAlignment]:"Mod-Shift-R",[j.JustifyAlignment]:"Mod-Shift-J",[j.InsertLink]:"Mod-k",[j.Find]:"Mod-f",[j.FindBackwards]:"Mod-Shift-f",[j.FindReplace]:"Mod-Shift-H",[j.AddFootnote]:"Mod-Alt-f",[j.AddComment]:"Mod-Alt-m",[j.ContextMenu]:"Mod-Shift-\\",[j.IncreaseFontSize]:"Mod-Shift-.",[j.DecreaseFontSize]:"Mod-Shift-,",[j.IncreaseIndent]:"Tab",[j.DecreaseIndent]:"Shift-Tab",[j.Shortcuts]:"Mod-/",[j.Format]:an.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},PL={...X5,[j.Strike]:"Mod-Shift-S",[j.Code]:"Mod-Shift-M",[j.Paragraph]:"Mod-Alt-0",[j.H1]:"Mod-Alt-1",[j.H2]:"Mod-Alt-2",[j.H3]:"Mod-Alt-3",[j.H4]:"Mod-Alt-4",[j.H5]:"Mod-Alt-5",[j.H6]:"Mod-Alt-6",[j.OrderedList]:"Mod-Alt-7",[j.BulletList]:"Mod-Alt-8",[j.Quote]:"Mod-Alt-9",[j.ClearFormatting]:"Mod-\\",[j.IncreaseIndent]:"Mod-[",[j.DecreaseIndent]:"Mod-]"},zL={default:X5,googleDoc:PL},LL=class extends Ge{get name(){return"nodeViews"}createPlugin(){const e=[],t=te();for(const r of this.store.extensions){if(!r.createNodeViews)continue;const n=r.createNodeViews();e.unshift(Le(n)?{[r.name]:n}:n)}e.unshift(this.store.managerSettings.nodeViews??{});for(const r of e)Object.assign(t,r);return{props:{nodeViews:t}}}},IL=class extends Ge{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!n.createPasteRules||(t=n.options.exclude)!=null&&t.pasteRules)continue;const o=n.createPasteRules(),i=ft(o)?o:[o];r.push(...i)}return rL(r)}},zp=class extends Ge{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=te(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return re(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:r,extensions:n}=this.store;this.updateExtensionStore();const{plugins:o=[]}=r;this.updatePlugins(o,this.managerPlugins);for(const i of n)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr,o={previousState:t,tr:n,transactions:e,state:r};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),n.docChanged||n.steps.length>0||n.selectionSet||n.storedMarksSet?n:void 0},state:{init:(e,t)=>{for(const r of this.initStateHandlers)r(t)},apply:(e,t,r,n)=>{const o={previousState:r,state:n,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,r;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(r=e.options.exclude)!=null&&r.plugins)){if(e.createPlugin){const o=new wa(e.name);this.pluginKeys[e.name]=o;const i=this.getPluginStateCreator(o);e.pluginKey=o,e.getPluginState=i,this.stateGetters.set(e.name,i),this.stateGetters.set(e.constructor,i);const s={...e.createPlugin(),key:o},a=new zo(s);this.updatePlugins([a],e.plugin?[e.plugin]:void 0),e.plugin=a}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||ts(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(n=>!t.includes(n)),...e];return}const r=new Map;for(const[n,o]of e.entries())r.set(lt(t,n),o);this.plugins=this.plugins.map(n=>t.includes(n)?r.get(n):n)}updateExtensionStore(){const{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){const t=G5(e)?e:xL(e)?this.store.manager.getExtension(e):this.store.extensions.find(r=>r.name===e);re(t,{code:H.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){re(this.store.phase>=Pr.EditorView,{code:H.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:e,updateState:t}=this.store,r=e.state.reconfigure({plugins:this.plugins});t(r)}};zp=ee([ve({defaultPriority:Ve.Highest,handlerKeys:["applyState","appendTransaction"]})],zp);var Q1=class extends Ge{constructor(){super(...arguments),this.dynamicAttributes={marks:te(),nodes:te()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:r,nodeNames:n,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:a,markOverride:l}=e,c=h=>!!(h&&t[ie.Block].includes(h));if(e.schema){const{nodes:h,marks:m}=UL(e.schema);this.addSchema(e.schema,h,m);return}const u=c(i)?{doc:te(),[i]:te()}:te(),d=te(),f=DL({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:n,markNames:r,tags:t});for(const h of o){f[h.name]={...f[h.name],...h.options.extraAttributes};const m=s===!0||h.options.disableExtraAttributes===!0||h.constructor.disableExtraAttributes===!0;if($d(h)){const{spec:b,dynamic:v}=b2({createExtensionSpec:(g,y)=>h.createNodeSpec(g,y),extraAttributes:lt(f,h.name),override:{...a,...h.options.nodeOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags});h.spec=b,u[h.name]=b,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[h.name]=v)}if(Xh(h)){const{spec:b,dynamic:v}=b2({createExtensionSpec:(g,y)=>h.createMarkSpec(g,y),extraAttributes:lt(f,h.name),override:{...l,...h.options.markOverride},ignoreExtraAttributes:m,name:h.constructorName,tags:h.tags??[]});h.spec=b,d[h.name]=b,Object.keys(v).length>0&&(this.dynamicAttributes.marks[h.name]=v)}}const p=new zA({nodes:u,marks:d,topNode:"doc"});this.addSchema(p,u,d)}createPlugin(){return{appendTransaction:(e,t,r)=>{const{tr:n}=r;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(n.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,n),this.checkAndUpdateDynamicMarks(i,s,n),!0)),n.steps.length>0?n:null)}}}addSchema(e,t,r){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",r),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",jh(e).name);for(const n of Object.values(e.nodes))if(n.name!=="doc"&&(n.isBlock||n.isTextblock))break}checkAndUpdateDynamicNodes(e,t,r){for(const[n,o]of Lt(this.dynamicAttributes.nodes))if(e.type.name===n)for(const[i,s]of Lt(o)){if(!es(e.attrs[i]))continue;const a={...e.attrs,[i]:s(e)};r.setNodeMarkup(t,void 0,a),u2(r)}}checkAndUpdateDynamicMarks(e,t,r){for(const[n,o]of Lt(this.dynamicAttributes.marks)){const i=lt(this.store.schema.marks,n),s=e.marks.find(a=>a.type.name===n);if(s)for(const[a,l]of Lt(o)){if(!es(s.attrs[a]))continue;const c=ni(r.doc.resolve(t),i);if(!c)continue;const{from:u,to:d}=c,f=i.create({...s.attrs,[a]:l(s)});r.removeMark(u,d,i).addMark(u,d,f),u2(r)}}}gatherExtraAttributes(e){const t=[];for(const r of e)r.createSchemaAttributes&&t.push(...r.createSchemaAttributes());return t}};Q1=ee([ve({defaultPriority:Ve.Highest})],Q1);function DL(e){const{settings:t,gatheredSchemaAttributes:r,nodeNames:n,markNames:o,tags:i}=e,s=te();if(t.disableExtraAttributes)return s;const a=[...r,...t.extraAttributes??[]];for(const l of a??[]){const c=HL({identifiers:l.identifiers,nodeNames:n,markNames:o,tags:i});for(const u of c){const d=s[u]??{};s[u]={...d,...l.attributes}}}return s}function $L(e){return hs(e)&&ft(e.tags)}function HL(e){const{identifiers:t,nodeNames:r,markNames:n,tags:o}=e;if(t==="nodes")return r;if(t==="marks")return n;if(t==="all")return[...r,...n];if(ft(t))return t;re($L(t),{code:H.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:a="any",excludeNames:l,excludeTags:c,type:u}=t,d=new Set,f=u==="mark"?n:u==="node"?r:[...n,...r],p=m=>f.includes(m)&&!(l!=null&&l.includes(m));for(const m of s)p(m)&&d.add(m);const h=new Map;for(const m of i)if(!(c!=null&&c.includes(m)))for(const b of o[m]){if(!p(b))continue;if(a==="any"){d.add(b);continue}const v=h.get(b)??new Set;v.add(m),h.set(b,v)}for(const[m,b]of h)b.size===i.length&&d.add(m);return[...d]}function b2(e){var t;const{createExtensionSpec:r,extraAttributes:n,ignoreExtraAttributes:o,name:i,tags:s,override:a}=e,l=te();function c(b,v){l[b]=v}let u=!1;function d(){u=!0}const f=BL(n,o,d,c),p=FL(n,o),h=VL(n,o),m=r({defaults:f,parse:p,dom:h},a);return re(o||u,{code:H.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),m.group=[...((t=m.group)==null?void 0:t.split(" "))??[],...s].join(" ")||void 0,{spec:m,dynamic:l}}function ty(e){return oe(e)||Le(e)?{default:e}:(re(e,{message:`${GS(e)} is not supported`,code:H.EXTENSION_EXTRA_ATTRIBUTES}),e)}function BL(e,t,r,n){return()=>{r();const o=te();if(t)return o;for(const[i,s]of Lt(e)){let l=ty(s).default;Le(l)&&(n(i,l),l=null),o[i]=l===void 0?{}:{default:l}}return o}}function FL(e,t){return r=>{const n=te();if(t)return n;for(const[o,i]of Lt(e)){const{parseDOM:s,...a}=ty(i);if(kt(r)){if(es(s)){n[o]=r.getAttribute(o)??a.default;continue}if(Le(s)){n[o]=s(r)??a.default;continue}n[o]=r.getAttribute(s)??a.default}}return n}}function VL(e,t){return r=>{const n=te();if(t)return n;function o(i,s){if(i){if(oe(i)){n[s]=i;return}if(ft(i)){const[a,l]=i;n[a]=l??r.attrs[s];return}for(const[a,l]of Lt(i))n[a]=l}}for(const[i,s]of Lt(e)){const{toDOM:a,parseDOM:l}=ty(s);if(es(a)){const c=oe(l)?l:i;n[c]=r.attrs[i];continue}if(Le(a)){o(a(r.attrs,jL(r)),i);continue}o(a,i)}return n}}function jL(e){return Id(e)?{node:e}:J6(e)?{mark:e}:{}}function UL(e){const t=te(),r=te();for(const[n,o]of Object.entries(e.nodes))t[n]=o.spec;for(const[n,o]of Object.entries(e.marks))r[n]=o.spec;return{nodes:t,marks:r}}var Ll=class extends Ge{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return c2(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>c2(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>P6(this.store.getState(),e))}createExternalPlugins(){var e,t;const r=[];for(const n of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!n.createSuggesters||(t=n.options.exclude)!=null&&t.suggesters)continue;const o=n.createSuggesters(),i=ft(o)?o:[o];r.push(...i)}return[z6(...r)]}getSuggestState(e){return Kv(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}}isSuggesterActive(e){var t;return Er(ft(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};ee([Ye()],Ll.prototype,"getSuggestState",1);ee([Ye()],Ll.prototype,"getSuggestMethods",1);ee([Ye()],Ll.prototype,"isSuggesterActive",1);Ll=ee([ve({customHandlerKeys:["suggester"]})],Ll);var Z1=class extends Ge{constructor(){super(...arguments),this.allTags=te(),this.plainTags=te(),this.markTags=te(),this.nodeTags=te()}get name(){return"tags"}onCreate(){this.resetTags();for(const e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const e=te(),t=te(),r=te(),n=te();for(const o of zh(ie))e[o]=[],t[o]=[],r[o]=[],n[o]=[];this.allTags=e,this.plainTags=t,this.markTags=r,this.nodeTags=n}updateTagForExtension(e){var t,r;const n=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((r=this.store.managerSettings.extraTags)==null?void 0:r[e.name])??[]]);for(const o of n)re(WL(o),{code:H.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(e.name),Y5(e)&&this.plainTags[o].push(e.name),Xh(e)&&this.markTags[o].push(e.name),$d(e)&&this.nodeTags[o].push(e.name);e.tags=[...n]}};Z1=ee([ve({defaultPriority:Ve.Highest})],Z1);function WL(e){return Er(zh(ie),e)}var KL=new wa("remirrorFilePlaceholderPlugin");function qL(){const e=new zo({key:KL,state:{init(){return{set:Me.empty,payloads:new Map}},apply(t,{set:r,payloads:n}){r=r.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=Qe.widget(o.pos,i,{id:o.id});r=r.add(t.doc,[s]),n.set(o.id,o.payload)}else o.type===1&&(r=r.remove(r.find(void 0,void 0,i=>i.id===o.id)),n.delete(o.id));return{set:r,payloads:n}}},props:{decorations(t){var r;return((r=e.getState(t))==null?void 0:r.set)??null}}});return e}var GL=class extends Ge{get name(){return"upload"}createExternalPlugins(){return[qL()]}};function YL(e={}){e={...{exitMarksOnArrowPress:Zn.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:Zn.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:Zn.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:Zn.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:so.defaultOptions.persistentSelectionClass},...e};const r=M1(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),n=M1(e,["persistentSelectionClass"]);return[new Z1,new Q1,new wL,new zp,new X1,new IL,new LL,new Ll,new we,new zn,new Zn(r),new Y1,new GL,new so(n)]}var k2=class extends Ge{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){const t=e.decoratedCommands??{},r=e.createCommands;for(const n of Object.keys(t)){const o=e[n];e[n]=(...i)=>s=>{var a;const l=o(...i)(s);return s.dispatch&&l&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((a=s.view)==null?void 0:a.dispatch),name:n,extension:e.name,decorated:!0}),l}}r&&(e.createCommands=()=>{const n=r();for(const[o,i]of Object.entries(n))n[o]=(...s)=>a=>{var l;const c=i(...s)(a);return a.dispatch&&c&&this.setCommandMeta(a.tr,{type:"command",chain:a.dispatch!==((l=a.view)==null?void 0:l.dispatch),name:o,extension:e.name,decorated:!1}),c};return n})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const r=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...r,t])}};k2=ee([ve({defaultOptions:{capture:an.isDevelopment},staticKeys:["capture"],defaultPriority:Ve.Highest})],k2);var Bf,Dc,Ff,qa,Ci,Vf,jf,XL=class{constructor(e){Ct(this,Bf,Tl()),Ct(this,Dc,void 0),Ct(this,Ff,void 0),Ct(this,qa,!0),Ct(this,Ci,Gh()),Ct(this,Vf,void 0),Ct(this,jf,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,a;re(!this.manager.destroyed,{code:H.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((a=(s=this.props).onDispatchTransaction)==null?void 0:a.call(s,i,this.getState()))??i;const l=this.getState(),{state:c,transactions:u}=l.applyTransaction(i);Bt(this,Ff,l),this.updateState({state:c,tr:i,transactions:u});const d=this.manager.store.getForcedUpdates(i);ts(d)||this.updateViewProps(...d)},this.onChange=(i=te())=>{var s,a;const l=this.eventListenerProps(i);q(this,qa)&&Bt(this,qa,!1),(a=(s=this.props).onChange)==null||a.call(s,l)},this.onBlur=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onBlur)==null||a.call(s,l,i),q(this,Ci).emit("blur",l,i)},this.onFocus=i=>{var s,a;const l=this.eventListenerProps();(a=(s=this.props).onFocus)==null||a.call(s,l,i),q(this,Ci).emit("focus",l,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:a}=this.manager.createState({content:i}),l=this.getState(),{state:c}=this.getState().applyTransaction(l.tr.replaceRangeWith(0,l.doc.nodeSize-2,a));if(s)return this.updateState({state:c,triggerChange:s});this.view.updateState(c)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,s)=>this.manager.createState({content:i,selection:s}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:t,initialEditorState:r,element:n}=e;if(Bt(this,Dc,t),Bt(this,jf,r),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(r,n);this.manager.addView(o)}get addHandler(){return q(this,Vf)??Bt(this,Vf,q(this,Ci).on.bind(q(this,Ci)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return q(this,qa)}get props(){return q(this,Dc).call(this)}get previousState(){return this.previousStateOverride??q(this,Ff)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return q(this,Bf)}get initialEditorState(){return q(this,jf)}updateListener(e){const{state:t,tr:r}=e;return q(this,Ci).emit("updated",this.eventListenerProps({state:t,tr:r}))}update(e){const{getProps:t}=e;return Bt(this,Dc,t),this}updateViewProps(...e){const t=M1(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:r,autoFocus:n,classNames:o=[],label:i,editable:s}=this.props,a=(t=this.manager.store)==null?void 0:t.attributes,l=Le(r)?r(this.eventListenerProps()):r;let c={};(n||hn(n))&&(c=e?{autoFocus:!0}:{autofocus:"true"});const u=Ol(ju(e&&"Prosemirror","remirror-editor",a==null?void 0:a.class,...o).split(" ")).join(" "),d={role:"textbox",...c,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...a,class:u};return XS({...d,...l})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){q(this,Ci).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=te()){const{state:t,tr:r,transactions:n}=e;return{tr:r,transactions:n,internalUpdate:!r,view:this.view,firstRender:q(this,qa),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:q(this,Bf),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Bf=new WeakMap;Dc=new WeakMap;Ff=new WeakMap;qa=new WeakMap;Ci=new WeakMap;Vf=new WeakMap;jf=new WeakMap;function JL(e,t){const r=[],n=new WeakMap,o=[],i=new WeakMap;let s=[];const a={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:t};for(const d of e)J5(a,{extension:d});s=ra(s,(d,f)=>f.priority-d.priority);const l=new WeakSet,c=new Set;for(const d of s){const f=d.constructor,p=d.name,h=i.get(f);re(h,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:H.INTERNAL}),!(l.has(f)||c.has(p))&&(l.add(f),c.add(p),r.push(d),n.set(f,d),h.forEach(m=>m==null?void 0:m.replaceChildExtension(f,d)))}const u=[];for(const d of r)QL({extension:d,found:l,missing:u});return re(ts(u),{code:H.MISSING_REQUIRED_EXTENSION,message:u.map(({Constructor:d,extension:f})=>`The extension '${f.name}' requires '${d.name} in order to run correctly.`).join(` +`)}),{extensions:r,extensionMap:n}}function J5(e,t){var r;const{gatheredExtensions:n,duplicateMap:o,parentExtensions:i,settings:s}=e,{extension:a,parentExtension:l}=t;let{names:c=[]}=t;re(G5(a),{code:H.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${a} was provided to the [[\`RemirrorManager\`]].`});const u=a.extensions;if(a.setPriority((r=s.priority)==null?void 0:r[a.name]),n.push(a),ZL({duplicateMap:o,extension:a,parentExtension:l}),u.length!==0){if(c.includes(a.name)){`${c.join(" > ")}${a.name}`;return}c=[...c,a.name],i.push(a);for(const d of u)J5(e,{names:c,extension:d,parentExtension:a})}}function QL(e){const{extension:t,found:r,missing:n}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])r.has(o)||n.push({Constructor:o,extension:t})}function ZL(e){const{duplicateMap:t,extension:r,parentExtension:n}=e,o=r.constructor,i=t.get(o),s=n?[n]:[];t.set(o,i?[...i,...s]:s)}function e8(e){var t,r,n,o;const{extension:i,nodeNames:s,markNames:a,plainNames:l,store:c,handlers:u}=e;i.setStore(c);const d=(t=i.onCreate)==null?void 0:t.bind(i),f=(r=i.onView)==null?void 0:r.bind(i),p=(n=i.onStateUpdate)==null?void 0:n.bind(i),h=(o=i.onDestroy)==null?void 0:o.bind(i);d&&u.create.push(d),f&&u.view.push(f),p&&u.update.push(p),h&&u.destroy.push(h),Xh(i)&&a.push(i.name),$d(i)&&i.name!=="doc"&&s.push(i.name),Y5(i)&&l.push(i.name)}var Mi,$c,Kn,Bo,Hc,en,Ms,Bc,Ts,Fc,Os,qn,Vc,Uf=class{constructor(e,t={}){Ct(this,Mi,void 0),Ct(this,$c,te()),Ct(this,Kn,te()),Ct(this,Bo,void 0),Ct(this,Hc,void 0),Ct(this,en,Pr.None),Ct(this,Ms,void 0),Ct(this,Bc,!0),Ct(this,Ts,{create:[],view:[],update:[],destroy:[]}),Ct(this,Fc,[]),Ct(this,Os,Gh()),Ct(this,qn,void 0),Ct(this,Vc,void 0),this.getState=()=>{var o;return q(this,en)>=Pr.EditorView?this.view.state:(re(q(this,qn),{code:H.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=q(this,qn))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:r,extensionMap:n}=JL(e,t);Bt(this,Ms,t),Bt(this,Bo,Bs(r)),Bt(this,Hc,n),Bt(this,Mi,this.createExtensionStore()),Bt(this,en,Pr.Create),this.setupLifecycleHandlers();for(const o of q(this,Ts).create){const i=o();i&&q(this,Fc).push(i)}}static create(e,t={}){return new Uf([...rE(e),...YL(t.builtin)],t)}get[ri](){return jt.Manager}get destroyed(){return q(this,en)===Pr.Destroy}get mounted(){return q(this,en)>=Pr.EditorView&&q(this,en)q(this,Bo),enumerable:t},phase:{get:()=>q(this,en),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>Bs(q(this,Ms)),enumerable:t},getState:{value:this.getState,enumerable:t},updateState:{value:this.updateState,enumerable:t},isMounted:{value:()=>this.mounted,enumerable:t},getExtension:{value:this.getExtension.bind(this),enumerable:t},manager:{get:()=>this,enumerable:t},document:{get:()=>this.document,enumerable:t},stringHandlers:{get:()=>q(this,$c),enumerable:t},currentState:{get:()=>r??(r=this.getState()),set:o=>{r=o},enumerable:t},previousState:{get:()=>n,set:o=>{n=o},enumerable:t}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(q(this,en)>=Pr.EditorView)return this;Bt(this,Bc,!0),Bt(this,en,Pr.EditorView),q(this,Kn).view=e;for(const t of q(this,Ts).view){const r=t(e);r&&q(this,Fc).push(r)}return this}attachFramework(e,t){var r;q(this,qn)!==e&&(q(this,qn)&&(q(this,qn).destroy(),(r=q(this,Vc))==null||r.call(this)),Bt(this,qn,e),Bt(this,Vc,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return re(t,{code:H.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:r="end"}=this.settings,{content:n=this.createEmptyDoc(),selection:o=r,stringHandler:i=this.settings.stringHandler}=e,{schema:s,plugins:a}=this.store,l=_5({stringHandler:oe(i)?this.stringHandlers[i]:i,document:this.document,content:n,onError:t,schema:s,selection:o});return Fs.create({schema:s,doc:l,plugins:a,selection:Pn(o,l)})}addHandler(e,t){return q(this,Os).on(e,t)}onStateUpdate(e){const t=q(this,Bc);q(this,Mi).currentState=e.state,q(this,Mi).previousState=e.previousState,t&&(Bt(this,en,Pr.Runtime),Bt(this,Bc,!1));const r={...e,firstUpdate:t};for(const n of q(this,Ts).update)n(r);q(this,Os).emit("stateUpdate",r)}getExtension(e){const t=q(this,Hc).get(e);return re(t,{code:H.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!q(this,Hc).get(e)}clone(){const e=q(this,Bo).map(r=>r.clone(r.options)),t=Uf.create(()=>e,q(this,Ms));return q(this,Os).emit("clone",t),t}recreate(e=[],t={}){const r=q(this,Bo).map(o=>o.clone(o.initialOptions)),n=Uf.create(()=>[...r,...e],t);return q(this,Os).emit("recreate",n),n}destroy(){var e,t,r,n,o,i;Bt(this,en,Pr.Destroy);for(const s of((e=this.view)==null?void 0:e.state.plugins)??[])(r=(t=s.getState(this.view.state))==null?void 0:t.destroy)==null||r.call(t);(n=q(this,qn))==null||n.destroy(),(o=q(this,Vc))==null||o.call(this);for(const s of q(this,Fc))s();for(const s of q(this,Ts).destroy)s();(i=this.view)==null||i.destroy(),q(this,Os).emit("destroy")}includes(e){const t=[],r=[];for(const n of q(this,Bo))t.push(n.name,n.constructorName),r.push(n.constructor);return e.every(n=>oe(n)?Er(t,n):Er(r,n))}},t8=Uf;Mi=new WeakMap;$c=new WeakMap;Kn=new WeakMap;Bo=new WeakMap;Hc=new WeakMap;en=new WeakMap;Ms=new WeakMap;Bc=new WeakMap;Ts=new WeakMap;Fc=new WeakMap;Os=new WeakMap;qn=new WeakMap;Vc=new WeakMap;function r8(e,t){return!oc(e)||!ic(e,jt.Manager)?!1:t?e.includes(t):!0}var n8=Object.defineProperty,o8=Object.getOwnPropertyDescriptor,Hd=(e,t,r,n)=>{for(var o=n>1?void 0:n?o8(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n8(t,r,o),o},Q5=/\S+/g;function Z5(e){return e.type.isTextblock?1:e.type.isText?e.textBetween(0,e.nodeSize).length:0}function i8({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;const s=Z5(o);return r+s>t?(n=i+1+(t-r),!1):(r+=s,!0)}),n}function s8({doc:e},t){let r=0,n=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(n>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),a=rc(s,Q5);if(r+a.length>t){const l=t-r,c=a[l];return n=i+((c==null?void 0:c.index)??0),!1}return r+=a.length,!0}),n}var as=class extends Ge{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(e=this.store.getState()){let t=0;return e.doc.nodesBetween(0,e.doc.nodeSize-2,r=>(t+=Z5(r),!0)),Math.max(t-1,0)}getWordCount(e=this.store.getState()){const t=this.store.helpers.getText({lineBreakDivider:" ",state:e});return rc(t,Q5).length}isCountValid(e=this.store.getState()){const{maximumStrategy:t,maximum:r}=this.options;return r<1?!0:t==="CHARACTERS"?this.store.helpers.getCharacterCount(e)<=r:this.store.helpers.getWordCount(e)<=r}createDecorationSet(e){const{maximum:t=-1,maximumStrategy:r,maximumExceededClassName:n}=this.options,s=(r==="CHARACTERS"?i8:s8)(e,t);return Me.create(e.doc,[Qe.inline(s,e.doc.nodeSize-2,{class:n})])}createExternalPlugins(){const{maximum:e}=this.options,t=new zo({state:{init:(r,n)=>this.isCountValid(n)?{decorationSet:Me.empty}:{decorationSet:this.createDecorationSet(n)},apply:(r,n,o,i)=>!r.docChanged||e<1?n:this.isCountValid(i)?{decorationSet:Me.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(r){var n;return((n=t.getState(r))==null?void 0:n.decorationSet)??null}}});return[t]}};Hd([Ye()],as.prototype,"getCountMaximum",1);Hd([Ye()],as.prototype,"getCharacterCount",1);Hd([Ye()],as.prototype,"getWordCount",1);Hd([Ye()],as.prototype,"isCountValid",1);as=Hd([ve({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],as);var eC={exports:{}},vn={},tC={exports:{}},rC={};/** * @license React * scheduler.production.min.js * @@ -80,7 +80,7 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(A,P){var B=A.length;A.push(P);e:for(;0>>1,J=A[Y];if(0>>1;Y<_e;){var ie=2*(Y+1)-1,ue=A[ie],de=ie+1,he=A[de];if(0>o(ue,B))deo(he,ue)?(A[Y]=he,A[de]=B,Y=de):(A[Y]=ue,A[ie]=B,Y=ie);else if(deo(he,B))A[Y]=he,A[de]=B,Y=de;else break e}}return P}function o(A,P){var B=A.sortIndex-P.sortIndex;return B!==0?B:A.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var P=r(c);P!==null;){if(P.callback===null)n(c);else if(P.startTime<=A)n(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(c)}}function k(A){if(m=!1,y(A),!h)if(r(l)!==null)h=!0,L(x);else{var P=r(c);P!==null&&K(k,P.startTime-A)}}function x(A,P){h=!1,m&&(m=!1,v(M),M=-1),p=!0;var B=f;try{for(y(P),d=r(l);d!==null&&(!(d.expirationTime>P)||A&&!N());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,f=d.priorityLevel;var J=Y(d.expirationTime<=P);P=e.unstable_now(),typeof J=="function"?d.callback=J:d===r(l)&&n(l),y(P)}else n(l);d=r(l)}if(d!==null)var _e=!0;else{var ie=r(c);ie!==null&&K(k,ie.startTime-P),_e=!1}return _e}finally{d=null,f=B,p=!1}}var w=!1,E=null,M=-1,C=5,T=-1;function N(){return!(e.unstable_now()-TA||125Y?(A.sortIndex=B,t(c,A),r(l)===null&&A===r(c)&&(m?(v(M),M=-1):m=!0,K(k,B-Y))):(A.sortIndex=J,t(l,A),h||p||(h=!0,L(x))),A},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(A){var P=f;return function(){var B=f;f=P;try{return A.apply(this,arguments)}finally{f=B}}}})(A5);_5.exports=A5;var A8=_5.exports;/** + */(function(e){function t(A,P){var B=A.length;A.push(P);e:for(;0>>1,J=A[X];if(0>>1;Xo(fe,B))peo(ge,fe)?(A[X]=ge,A[pe]=B,X=pe):(A[X]=fe,A[ae]=B,X=ae);else if(peo(ge,B))A[X]=ge,A[pe]=B,X=pe;else break e}}return P}function o(A,P){var B=A.sortIndex-P.sortIndex;return B!==0?B:A.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var P=r(c);P!==null;){if(P.callback===null)n(c);else if(P.startTime<=A)n(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(c)}}function k(A){if(m=!1,y(A),!h)if(r(l)!==null)h=!0,L(x);else{var P=r(c);P!==null&&K(k,P.startTime-A)}}function x(A,P){h=!1,m&&(m=!1,v(M),M=-1),p=!0;var B=f;try{for(y(P),d=r(l);d!==null&&(!(d.expirationTime>P)||A&&!R());){var X=d.callback;if(typeof X=="function"){d.callback=null,f=d.priorityLevel;var J=X(d.expirationTime<=P);P=e.unstable_now(),typeof J=="function"?d.callback=J:d===r(l)&&n(l),y(P)}else n(l);d=r(l)}if(d!==null)var Re=!0;else{var ae=r(c);ae!==null&&K(k,ae.startTime-P),Re=!1}return Re}finally{d=null,f=B,p=!1}}var w=!1,E=null,M=-1,C=5,T=-1;function R(){return!(e.unstable_now()-TA||125X?(A.sortIndex=B,t(c,A),r(l)===null&&A===r(c)&&(m?(v(M),M=-1):m=!0,K(k,B-X))):(A.sortIndex=J,t(l,A),h||p||(h=!0,L(x))),A},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(A){var P=f;return function(){var B=f;f=P;try{return A.apply(this,arguments)}finally{f=B}}}})(rC);tC.exports=rC;var a8=tC.exports;/** * @license React * react-dom.production.min.js * @@ -88,16 +88,16 @@ If you are using Node.js, you can install JSDOM and Remirror will try to use it * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var N5=S,cn=A8;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L1=Object.prototype.hasOwnProperty,N8=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Zx={},e2={};function R8(e){return L1.call(e2,e)?!0:L1.call(Zx,e)?!1:N8.test(e)?e2[e]=!0:(Zx[e]=!0,!1)}function P8(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z8(e,t,r,n){if(t===null||typeof t>"u"||P8(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Er(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Jt[e]=new Er(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Jt[t]=new Er(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Jt[e]=new Er(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Jt[e]=new Er(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Jt[e]=new Er(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Jt[e]=new Er(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Jt[e]=new Er(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Jt[e]=new Er(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Jt[e]=new Er(e,5,!1,e.toLowerCase(),null,!1,!1)});var Lv=/[\-:]([a-z])/g;function Iv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Lv,Iv);Jt[t]=new Er(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Lv,Iv);Jt[t]=new Er(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Lv,Iv);Jt[t]=new Er(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Jt[e]=new Er(e,1,!1,e.toLowerCase(),null,!1,!1)});Jt.xlinkHref=new Er("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Jt[e]=new Er(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dv(e,t,r,n){var o=Jt.hasOwnProperty(t)?Jt[t]:null;(o!==null?o.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e0=Object.prototype.hasOwnProperty,l8=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x2={},w2={};function c8(e){return e0.call(w2,e)?!0:e0.call(x2,e)?!1:l8.test(e)?w2[e]=!0:(x2[e]=!0,!1)}function u8(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function d8(e,t,r,n){if(t===null||typeof t>"u"||u8(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _r(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var tr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){tr[e]=new _r(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];tr[t]=new _r(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){tr[e]=new _r(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){tr[e]=new _r(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){tr[e]=new _r(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){tr[e]=new _r(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){tr[e]=new _r(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){tr[e]=new _r(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){tr[e]=new _r(e,5,!1,e.toLowerCase(),null,!1,!1)});var ry=/[\-:]([a-z])/g;function ny(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ry,ny);tr[t]=new _r(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ry,ny);tr[t]=new _r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ry,ny);tr[t]=new _r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){tr[e]=new _r(e,1,!1,e.toLowerCase(),null,!1,!1)});tr.xlinkHref=new _r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){tr[e]=new _r(e,1,!1,e.toLowerCase(),null,!0,!0)});function oy(e,t,r,n){var o=tr.hasOwnProperty(t)?tr[t]:null;(o!==null?o.type!==0:n||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{fg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?zc(e):""}function L8(e){switch(e.tag){case 5:return zc(e.type);case 16:return zc("Lazy");case 13:return zc("Suspense");case 19:return zc("SuspenseList");case 0:case 2:case 15:return e=pg(e.type,!1),e;case 11:return e=pg(e.type.render,!1),e;case 1:return e=pg(e.type,!0),e;default:return""}}function H1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wa:return"Fragment";case Ua:return"Portal";case I1:return"Profiler";case $v:return"StrictMode";case D1:return"Suspense";case $1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case z5:return(e.displayName||"Context")+".Consumer";case P5:return(e._context.displayName||"Context")+".Provider";case Hv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bv:return t=e.displayName||null,t!==null?t:H1(e.type)||"Memo";case xi:t=e._payload,e=e._init;try{return H1(e(t))}catch{}}return null}function I8(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H1(t);case 8:return t===$v?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Zi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function I5(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D8(e){var t=I5(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gd(e){e._valueTracker||(e._valueTracker=D8(e))}function D5(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=I5(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function wp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function B1(e,t){var r=t.checked;return lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function r2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Zi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $5(e,t){t=t.checked,t!=null&&Dv(e,"checked",t,!1)}function F1(e,t){$5(e,t);var r=Zi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?V1(e,t.type,r):t.hasOwnProperty("defaultValue")&&V1(e,t.type,Zi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function n2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function V1(e,t,r){(t!=="number"||wp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Lc=Array.isArray;function al(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Yd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var uu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$8=["Webkit","ms","Moz","O"];Object.keys(uu).forEach(function(e){$8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uu[t]=uu[e]})});function V5(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||uu.hasOwnProperty(e)&&uu[e]?(""+t).trim():t+"px"}function j5(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=V5(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var H8=lt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function W1(e,t){if(t){if(H8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function K1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q1=null;function Fv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var G1=null,ll=null,cl=null;function s2(e){if(e=Nd(e)){if(typeof G1!="function")throw Error($(280));var t=e.stateNode;t&&(t=$h(t),G1(e.stateNode,e.type,t))}}function U5(e){ll?cl?cl.push(e):cl=[e]:ll=e}function W5(){if(ll){var e=ll,t=cl;if(cl=ll=null,s2(e),t)for(e=0;e>>=0,e===0?32:31-(J8(e)/X8|0)|0}var Jd=64,Xd=4194304;function Ic(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Ic(a):(i&=s,i!==0&&(n=Ic(i)))}else s=r&~o,s!==0?n=Ic(s):i!==0&&(n=Ic(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function _d(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jn(t),e[t]=r}function tL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=fu),m2=String.fromCharCode(32),g2=!1;function dC(e,t){switch(e){case"keyup":return _L.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function NL(e,t){switch(e){case"compositionend":return fC(t);case"keypress":return t.which!==32?null:(g2=!0,m2);case"textInput":return e=t.data,e===m2&&g2?null:e;default:return null}}function RL(e,t){if(Ka)return e==="compositionend"||!Yv&&dC(e,t)?(e=cC(),Pf=Kv=Ai=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=k2(r)}}function gC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vC(){for(var e=window,t=wp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=wp(e.document)}return t}function Jv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function FL(e){var t=vC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&gC(r.ownerDocument.documentElement,r)){if(n!==null&&Jv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=x2(r,i);var s=x2(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,qa=null,e0=null,hu=null,t0=!1;function w2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;t0||qa==null||qa!==wp(n)||(n=qa,"selectionStart"in n&&Jv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),hu&&Fu(hu,n)||(hu=n,n=_p(e0,"onSelect"),0Ja||(e.current=a0[Ja],a0[Ja]=null,Ja--)}function Ge(e,t){Ja++,a0[Ja]=e.current,e.current=t}var es={},ur=ds(es),zr=ds(!1),Zs=es;function Tl(e,t){var r=e.type.contextTypes;if(!r)return es;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Lr(e){return e=e.childContextTypes,e!=null}function Np(){Ze(zr),Ze(ur)}function _2(e,t,r){if(ur.current!==es)throw Error($(168));Ge(ur,t),Ge(zr,r)}function MC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error($(108,I8(e)||"Unknown",o));return lt({},r,n)}function Rp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||es,Zs=ur.current,Ge(ur,e),Ge(zr,zr.current),!0}function A2(e,t,r){var n=e.stateNode;if(!n)throw Error($(169));r?(e=MC(e,t,Zs),n.__reactInternalMemoizedMergedChildContext=e,Ze(zr),Ze(ur),Ge(ur,e)):Ze(zr),Ge(zr,r)}var $o=null,Hh=!1,Tg=!1;function TC(e){$o===null?$o=[e]:$o.push(e)}function ZL(e){Hh=!0,TC(e)}function fs(){if(!Tg&&$o!==null){Tg=!0;var e=0,t=$e;try{var r=$o;for($e=1;e>=s,o-=s,Fo=1<<32-Jn(t)+o|r<M?(C=E,E=null):C=E.sibling;var T=f(v,E,y[M],k);if(T===null){E===null&&(E=C);break}e&&E&&T.alternate===null&&t(v,E),g=i(T,g,M),w===null?x=T:w.sibling=T,w=T,E=C}if(M===y.length)return r(v,E),rt&&xs(v,M),x;if(E===null){for(;MM?(C=E,E=null):C=E.sibling;var N=f(v,E,T.value,k);if(N===null){E===null&&(E=C);break}e&&E&&N.alternate===null&&t(v,E),g=i(N,g,M),w===null?x=N:w.sibling=N,w=N,E=C}if(T.done)return r(v,E),rt&&xs(v,M),x;if(E===null){for(;!T.done;M++,T=y.next())T=d(v,T.value,k),T!==null&&(g=i(T,g,M),w===null?x=T:w.sibling=T,w=T);return rt&&xs(v,M),x}for(E=n(v,E);!T.done;M++,T=y.next())T=p(E,v,M,T.value,k),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?M:T.key),g=i(T,g,M),w===null?x=T:w.sibling=T,w=T);return e&&E.forEach(function(z){return t(v,z)}),rt&&xs(v,M),x}function b(v,g,y,k){if(typeof y=="object"&&y!==null&&y.type===Wa&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case qd:e:{for(var x=y.key,w=g;w!==null;){if(w.key===x){if(x=y.type,x===Wa){if(w.tag===7){r(v,w.sibling),g=o(w,y.props.children),g.return=v,v=g;break e}}else if(w.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===xi&&D2(x)===w.type){r(v,w.sibling),g=o(w,y.props),g.ref=hc(v,w,y),g.return=v,v=g;break e}r(v,w);break}else t(v,w);w=w.sibling}y.type===Wa?(g=Ks(y.props.children,v.mode,k,y.key),g.return=v,v=g):(k=Ff(y.type,y.key,y.props,null,v.mode,k),k.ref=hc(v,g,y),k.return=v,v=k)}return s(v);case Ua:e:{for(w=y.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(v,g.sibling),g=o(g,y.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=Lg(y,v.mode,k),g.return=v,v=g}return s(v);case xi:return w=y._init,b(v,g,w(y._payload),k)}if(Lc(y))return h(v,g,y,k);if(cc(y))return m(v,g,y,k);of(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(v,g.sibling),g=o(g,y),g.return=v,v=g):(r(v,g),g=zg(y,v.mode,k),g.return=v,v=g),s(v)):r(v,g)}return b}var _l=LC(!0),IC=LC(!1),Rd={},vo=ds(Rd),Wu=ds(Rd),Ku=ds(Rd);function $s(e){if(e===Rd)throw Error($(174));return e}function iy(e,t){switch(Ge(Ku,t),Ge(Wu,e),Ge(vo,Rd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:U1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=U1(t,e)}Ze(vo),Ge(vo,t)}function Al(){Ze(vo),Ze(Wu),Ze(Ku)}function DC(e){$s(Ku.current);var t=$s(vo.current),r=U1(t,e.type);t!==r&&(Ge(Wu,e),Ge(vo,r))}function sy(e){Wu.current===e&&(Ze(vo),Ze(Wu))}var it=ds(0);function $p(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Og=[];function ay(){for(var e=0;er?r:4,e(!0);var n=_g.transition;_g.transition={};try{e(!1),t()}finally{$e=r,_g.transition=n}}function ZC(){return An().memoizedState}function nI(e,t,r){var n=ji(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},eM(e))tM(t,r);else if(r=NC(e,t,r,n),r!==null){var o=yr();Xn(r,e,n,o),rM(r,t,n)}}function oI(e,t,r){var n=ji(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(eM(e))tM(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,to(a,s)){var l=t.interleaved;l===null?(o.next=o,ny(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=NC(e,t,o,n),r!==null&&(o=yr(),Xn(r,e,n,o),rM(r,t,n))}}function eM(e){var t=e.alternate;return e===st||t!==null&&t===st}function tM(e,t){mu=Hp=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function rM(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,jv(e,r)}}var Bp={readContext:_n,useCallback:rr,useContext:rr,useEffect:rr,useImperativeHandle:rr,useInsertionEffect:rr,useLayoutEffect:rr,useMemo:rr,useReducer:rr,useRef:rr,useState:rr,useDebugValue:rr,useDeferredValue:rr,useTransition:rr,useMutableSource:rr,useSyncExternalStore:rr,useId:rr,unstable_isNewReconciler:!1},iI={readContext:_n,useCallback:function(e,t){return lo().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:H2,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Df(4194308,4,GC.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Df(4194308,4,e,t)},useInsertionEffect:function(e,t){return Df(4,2,e,t)},useMemo:function(e,t){var r=lo();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=lo();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=nI.bind(null,st,e),[n.memoizedState,e]},useRef:function(e){var t=lo();return e={current:e},t.memoizedState=e},useState:$2,useDebugValue:fy,useDeferredValue:function(e){return lo().memoizedState=e},useTransition:function(){var e=$2(!1),t=e[0];return e=rI.bind(null,e[1]),lo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=st,o=lo();if(rt){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),Ht===null)throw Error($(349));ta&30||BC(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,H2(VC.bind(null,n,i,e),[e]),n.flags|=2048,Yu(9,FC.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=lo(),t=Ht.identifierPrefix;if(rt){var r=Vo,n=Fo;r=(n&~(1<<32-Jn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=qu++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Rg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?jc(e):""}function f8(e){switch(e.tag){case 5:return jc(e.type);case 16:return jc("Lazy");case 13:return jc("Suspense");case 19:return jc("SuspenseList");case 0:case 2:case 15:return e=Ng(e.type,!1),e;case 11:return e=Ng(e.type.render,!1),e;case 1:return e=Ng(e.type,!0),e;default:return""}}function o0(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case tl:return"Fragment";case el:return"Portal";case t0:return"Profiler";case iy:return"StrictMode";case r0:return"Suspense";case n0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sC:return(e.displayName||"Context")+".Consumer";case iC:return(e._context.displayName||"Context")+".Provider";case sy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ay:return t=e.displayName||null,t!==null?t:o0(e.type)||"Memo";case _i:t=e._payload,e=e._init;try{return o0(e(t))}catch{}}return null}function p8(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o0(t);case 8:return t===iy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ls(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h8(e){var t=lC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function af(e){e._valueTracker||(e._valueTracker=h8(e))}function cC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Lp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function i0(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function E2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ls(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uC(e,t){t=t.checked,t!=null&&oy(e,"checked",t,!1)}function s0(e,t){uC(e,t);var r=ls(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?a0(e,t.type,r):t.hasOwnProperty("defaultValue")&&a0(e,t.type,ls(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function C2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function a0(e,t,r){(t!=="number"||Lp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Uc=Array.isArray;function vl(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=lf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var bu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},m8=["Webkit","ms","Moz","O"];Object.keys(bu).forEach(function(e){m8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bu[t]=bu[e]})});function hC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||bu.hasOwnProperty(e)&&bu[e]?(""+t).trim():t+"px"}function mC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=hC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var g8=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function u0(e,t){if(t){if(g8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function d0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var f0=null;function ly(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p0=null,yl=null,bl=null;function O2(e){if(e=Vd(e)){if(typeof p0!="function")throw Error($(280));var t=e.stateNode;t&&(t=tm(t),p0(e.stateNode,e.type,t))}}function gC(e){yl?bl?bl.push(e):bl=[e]:yl=e}function vC(){if(yl){var e=yl,t=bl;if(bl=yl=null,O2(e),t)for(e=0;e>>=0,e===0?32:31-(T8(e)/O8|0)|0}var cf=64,uf=4194304;function Wc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Wc(a):(i&=s,i!==0&&(n=Wc(i)))}else s=r&~o,s!==0?n=Wc(s):i!==0&&(n=Wc(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Bd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ro(t),e[t]=r}function N8(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=xu),D2=String.fromCharCode(32),$2=!1;function DC(e,t){switch(e){case"keyup":return sI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $C(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rl=!1;function lI(e,t){switch(e){case"compositionend":return $C(t);case"keypress":return t.which!==32?null:($2=!0,D2);case"textInput":return e=t.data,e===D2&&$2?null:e;default:return null}}function cI(e,t){if(rl)return e==="compositionend"||!gy&&DC(e,t)?(e=LC(),Kf=py=$i=null,rl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=V2(r)}}function VC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jC(){for(var e=window,t=Lp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Lp(e.document)}return t}function vy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yI(e){var t=jC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&VC(r.ownerDocument.documentElement,r)){if(n!==null&&vy(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=j2(r,i);var s=j2(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,nl=null,b0=null,Su=null,k0=!1;function U2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;k0||nl==null||nl!==Lp(n)||(n=nl,"selectionStart"in n&&vy(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Su&&Ju(Su,n)||(Su=n,n=Vp(b0,"onSelect"),0sl||(e.current=M0[sl],M0[sl]=null,sl--)}function Ze(e,t){sl++,M0[sl]=e.current,e.current=t}var cs={},mr=bs(cs),Hr=bs(!1),aa=cs;function Dl(e,t){var r=e.type.contextTypes;if(!r)return cs;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Br(e){return e=e.childContextTypes,e!=null}function Up(){ot(Hr),ot(mr)}function J2(e,t,r){if(mr.current!==cs)throw Error($(168));Ze(mr,t),Ze(Hr,r)}function QC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error($(108,p8(e)||"Unknown",o));return pt({},r,n)}function Wp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cs,aa=mr.current,Ze(mr,e),Ze(Hr,Hr.current),!0}function Q2(e,t,r){var n=e.stateNode;if(!n)throw Error($(169));r?(e=QC(e,t,aa),n.__reactInternalMemoizedMergedChildContext=e,ot(Hr),ot(mr),Ze(mr,e)):ot(Hr),Ze(Hr,r)}var Ko=null,rm=!1,Kg=!1;function ZC(e){Ko===null?Ko=[e]:Ko.push(e)}function AI(e){rm=!0,ZC(e)}function ks(){if(!Kg&&Ko!==null){Kg=!0;var e=0,t=je;try{var r=Ko;for(je=1;e>=s,o-=s,Yo=1<<32-ro(t)+o|r<M?(C=E,E=null):C=E.sibling;var T=f(v,E,y[M],k);if(T===null){E===null&&(E=C);break}e&&E&&T.alternate===null&&t(v,E),g=i(T,g,M),w===null?x=T:w.sibling=T,w=T,E=C}if(M===y.length)return r(v,E),at&&_s(v,M),x;if(E===null){for(;MM?(C=E,E=null):C=E.sibling;var R=f(v,E,T.value,k);if(R===null){E===null&&(E=C);break}e&&E&&R.alternate===null&&t(v,E),g=i(R,g,M),w===null?x=R:w.sibling=R,w=R,E=C}if(T.done)return r(v,E),at&&_s(v,M),x;if(E===null){for(;!T.done;M++,T=y.next())T=d(v,T.value,k),T!==null&&(g=i(T,g,M),w===null?x=T:w.sibling=T,w=T);return at&&_s(v,M),x}for(E=n(v,E);!T.done;M++,T=y.next())T=p(E,v,M,T.value,k),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?M:T.key),g=i(T,g,M),w===null?x=T:w.sibling=T,w=T);return e&&E.forEach(function(z){return t(v,z)}),at&&_s(v,M),x}function b(v,g,y,k){if(typeof y=="object"&&y!==null&&y.type===tl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case sf:e:{for(var x=y.key,w=g;w!==null;){if(w.key===x){if(x=y.type,x===tl){if(w.tag===7){r(v,w.sibling),g=o(w,y.props.children),g.return=v,v=g;break e}}else if(w.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===_i&&iw(x)===w.type){r(v,w.sibling),g=o(w,y.props),g.ref=Sc(v,w,y),g.return=v,v=g;break e}r(v,w);break}else t(v,w);w=w.sibling}y.type===tl?(g=ea(y.props.children,v.mode,k,y.key),g.return=v,v=g):(k=ep(y.type,y.key,y.props,null,v.mode,k),k.ref=Sc(v,g,y),k.return=v,v=k)}return s(v);case el:e:{for(w=y.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(v,g.sibling),g=o(g,y.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=e1(y,v.mode,k),g.return=v,v=g}return s(v);case _i:return w=y._init,b(v,g,w(y._payload),k)}if(Uc(y))return h(v,g,y,k);if(yc(y))return m(v,g,y,k);vf(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(v,g.sibling),g=o(g,y),g.return=v,v=g):(r(v,g),g=Zg(y,v.mode,k),g.return=v,v=g),s(v)):r(v,g)}return b}var Hl=aM(!0),lM=aM(!1),jd={},Co=bs(jd),td=bs(jd),rd=bs(jd);function Ks(e){if(e===jd)throw Error($(174));return e}function My(e,t){switch(Ze(rd,t),Ze(td,e),Ze(Co,jd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c0(t,e)}ot(Co),Ze(Co,t)}function Bl(){ot(Co),ot(td),ot(rd)}function cM(e){Ks(rd.current);var t=Ks(Co.current),r=c0(t,e.type);t!==r&&(Ze(td,e),Ze(Co,r))}function Ty(e){td.current===e&&(ot(Co),ot(td))}var ut=bs(0);function Jp(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var qg=[];function Oy(){for(var e=0;er?r:4,e(!0);var n=Gg.transition;Gg.transition={};try{e(!1),t()}finally{je=r,Gg.transition=n}}function CM(){return In().memoizedState}function zI(e,t,r){var n=Ji(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},MM(e))TM(t,r);else if(r=nM(e,t,r,n),r!==null){var o=Sr();no(r,e,n,o),OM(r,t,n)}}function LI(e,t,r){var n=Ji(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(MM(e))TM(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,ao(a,s)){var l=t.interleaved;l===null?(o.next=o,Ey(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=nM(e,t,o,n),r!==null&&(o=Sr(),no(r,e,n,o),OM(r,t,n))}}function MM(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function TM(e,t){Eu=Qp=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function OM(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,uy(e,r)}}var Zp={readContext:Ln,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},II={readContext:Ln,useCallback:function(e,t){return mo().memoizedState=[e,t===void 0?null:t],e},useContext:Ln,useEffect:aw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xf(4194308,4,kM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xf(4,2,e,t)},useMemo:function(e,t){var r=mo();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=mo();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=zI.bind(null,dt,e),[n.memoizedState,e]},useRef:function(e){var t=mo();return e={current:e},t.memoizedState=e},useState:sw,useDebugValue:Py,useDeferredValue:function(e){return mo().memoizedState=e},useTransition:function(){var e=sw(!1),t=e[0];return e=PI.bind(null,e[1]),mo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=dt,o=mo();if(at){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),Ut===null)throw Error($(349));ca&30||fM(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,aw(hM.bind(null,n,i,e),[e]),n.flags|=2048,id(9,pM.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=mo(),t=Ut.identifierPrefix;if(at){var r=Xo,n=Yo;r=(n&~(1<<32-ro(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=nd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[ho]=t,e[Uu]=n,dM(e,t,!1,!1),t.stateNode=e;e:{switch(s=K1(r,n),r){case"dialog":Qe("cancel",e),Qe("close",e),o=n;break;case"iframe":case"object":case"embed":Qe("load",e),o=n;break;case"video":case"audio":for(o=0;oRl&&(t.flags|=128,n=!0,mc(i,!1),t.lanes=4194304)}else{if(!n)if(e=$p(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),mc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!rt)return nr(t),null}else 2*gt()-i.renderingStartTime>Rl&&r!==1073741824&&(t.flags|=128,n=!0,mc(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=gt(),t.sibling=null,r=it.current,Ge(it,n?r&1|2:r&1),t):(nr(t),null);case 22:case 23:return yy(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Xr&1073741824&&(nr(t),t.subtreeFlags&6&&(t.flags|=8192)):nr(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function pI(e,t){switch(Qv(t),t.tag){case 1:return Lr(t.type)&&Np(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Al(),Ze(zr),Ze(ur),ay(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sy(t),null;case 13:if(Ze(it),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Ol()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(it),null;case 4:return Al(),null;case 10:return ry(t.type._context),null;case 22:case 23:return yy(),null;case 24:return null;default:return null}}var af=!1,lr=!1,hI=typeof WeakSet=="function"?WeakSet:Set,X=null;function el(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pt(e,t,n)}else r.current=null}function b0(e,t,r){try{r()}catch(n){pt(e,t,n)}}var G2=!1;function mI(e,t){if(r0=Tp,e=vC(),Jv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===o&&(a=s),f===i&&++u===n&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(n0={focusedElem:e,selectionRange:r},Tp=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:jn(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(k){pt(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return h=G2,G2=!1,h}function gu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&b0(t,r,i)}o=o.next}while(o!==n)}}function Vh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function k0(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function hM(e){var t=e.alternate;t!==null&&(e.alternate=null,hM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ho],delete t[Uu],delete t[s0],delete t[XL],delete t[QL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mM(e){return e.tag===5||e.tag===3||e.tag===4}function Y2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mM(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function x0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ap));else if(n!==4&&(e=e.child,e!==null))for(x0(e,t,r),e=e.sibling;e!==null;)x0(e,t,r),e=e.sibling}function w0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(w0(e,t,r),e=e.sibling;e!==null;)w0(e,t,r),e=e.sibling}var Kt=null,Un=!1;function ui(e,t,r){for(r=r.child;r!==null;)gM(e,t,r),r=r.sibling}function gM(e,t,r){if(go&&typeof go.onCommitFiberUnmount=="function")try{go.onCommitFiberUnmount(zh,r)}catch{}switch(r.tag){case 5:lr||el(r,t);case 6:var n=Kt,o=Un;Kt=null,ui(e,t,r),Kt=n,Un=o,Kt!==null&&(Un?(e=Kt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Kt.removeChild(r.stateNode));break;case 18:Kt!==null&&(Un?(e=Kt,r=r.stateNode,e.nodeType===8?Mg(e.parentNode,r):e.nodeType===1&&Mg(e,r),Hu(e)):Mg(Kt,r.stateNode));break;case 4:n=Kt,o=Un,Kt=r.stateNode.containerInfo,Un=!0,ui(e,t,r),Kt=n,Un=o;break;case 0:case 11:case 14:case 15:if(!lr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&b0(r,t,s),o=o.next}while(o!==n)}ui(e,t,r);break;case 1:if(!lr&&(el(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){pt(r,t,a)}ui(e,t,r);break;case 21:ui(e,t,r);break;case 22:r.mode&1?(lr=(n=lr)||r.memoizedState!==null,ui(e,t,r),lr=n):ui(e,t,r);break;default:ui(e,t,r)}}function J2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new hI),t.forEach(function(n){var o=EI.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Hn(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=s),n&=~i}if(n=o,n=gt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vI(n/1960))-n,10e?16:e,Ni===null)var n=!1;else{if(e=Ni,Ni=null,jp=0,Oe&6)throw Error($(331));var o=Oe;for(Oe|=4,X=e.current;X!==null;){var i=X,s=i.child;if(X.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lgt()-gy?Ws(e,0):my|=r),Ir(e,t)}function EM(e,t){t===0&&(e.mode&1?(t=Xd,Xd<<=1,!(Xd&130023424)&&(Xd=4194304)):t=1);var r=yr();e=Qo(e,t),e!==null&&(_d(e,t,r),Ir(e,r))}function SI(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),EM(e,r)}function EI(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(t),EM(e,r)}var CM;CM=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||zr.current)Nr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Nr=!1,dI(e,t,r);Nr=!!(e.flags&131072)}else Nr=!1,rt&&t.flags&1048576&&OC(t,zp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$f(e,t),e=t.pendingProps;var o=Tl(t,ur.current);dl(t,r),o=cy(null,t,n,e,o,r);var i=uy();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lr(n)?(i=!0,Rp(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,oy(t),o.updater=Bh,t.stateNode=o,o._reactInternals=t,f0(t,n,e,r),t=m0(null,t,n,!0,i,r)):(t.tag=0,rt&&i&&Xv(t),hr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($f(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=MI(n),e=jn(n,e),o){case 0:t=h0(null,t,n,e,r);break e;case 1:t=W2(null,t,n,e,r);break e;case 11:t=j2(null,t,n,e,r);break e;case 14:t=U2(null,t,n,jn(n.type,e),r);break e}throw Error($(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:jn(n,o),h0(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:jn(n,o),W2(e,t,n,o,r);case 3:e:{if(lM(t),e===null)throw Error($(387));n=t.pendingProps,i=t.memoizedState,o=i.element,RC(e,t),Dp(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Nl(Error($(423)),t),t=K2(e,t,n,r,o);break e}else if(n!==o){o=Nl(Error($(424)),t),t=K2(e,t,n,r,o);break e}else for(nn=Bi(t.stateNode.containerInfo.firstChild),on=t,rt=!0,Kn=null,r=IC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ol(),n===o){t=Zo(e,t,r);break e}hr(e,t,n,r)}t=t.child}return t;case 5:return DC(t),e===null&&c0(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,o0(n,o)?s=null:i!==null&&o0(n,i)&&(t.flags|=32),aM(e,t),hr(e,t,s,r),t.child;case 6:return e===null&&c0(t),null;case 13:return cM(e,t,r);case 4:return iy(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_l(t,null,n,r):hr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:jn(n,o),j2(e,t,n,o,r);case 7:return hr(e,t,t.pendingProps,r),t.child;case 8:return hr(e,t,t.pendingProps.children,r),t.child;case 12:return hr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ge(Lp,n._currentValue),n._currentValue=s,i!==null)if(to(i.value,s)){if(i.children===o.children&&!zr.current){t=Zo(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=qo(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),u0(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error($(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),u0(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}hr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,dl(t,r),o=_n(o),n=n(o),t.flags|=1,hr(e,t,n,r),t.child;case 14:return n=t.type,o=jn(n,t.pendingProps),o=jn(n.type,o),U2(e,t,n,o,r);case 15:return iM(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:jn(n,o),$f(e,t),t.tag=1,Lr(n)?(e=!0,Rp(t)):e=!1,dl(t,r),zC(t,n,o),f0(t,n,o,r),m0(null,t,n,!0,e,r);case 19:return uM(e,t,r);case 22:return sM(e,t,r)}throw Error($(156,t.tag))};function MM(e,t){return Q5(e,t)}function CI(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(e,t,r,n){return new CI(e,t,r,n)}function ky(e){return e=e.prototype,!(!e||!e.isReactComponent)}function MI(e){if(typeof e=="function")return ky(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hv)return 11;if(e===Bv)return 14}return 2}function Ui(e,t){var r=e.alternate;return r===null?(r=Sn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ff(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")ky(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wa:return Ks(r.children,o,i,t);case $v:s=8,o|=8;break;case I1:return e=Sn(12,r,t,o|2),e.elementType=I1,e.lanes=i,e;case D1:return e=Sn(13,r,t,o),e.elementType=D1,e.lanes=i,e;case $1:return e=Sn(19,r,t,o),e.elementType=$1,e.lanes=i,e;case L5:return Uh(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P5:s=10;break e;case z5:s=9;break e;case Hv:s=11;break e;case Bv:s=14;break e;case xi:s=16,n=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Sn(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Ks(e,t,r,n){return e=Sn(7,e,n,t),e.lanes=r,e}function Uh(e,t,r,n){return e=Sn(22,e,n,t),e.elementType=L5,e.lanes=r,e.stateNode={isHidden:!1},e}function zg(e,t,r){return e=Sn(6,e,null,t),e.lanes=r,e}function Lg(e,t,r){return t=Sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TI(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mg(0),this.expirationTimes=mg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mg(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xy(e,t,r,n,o,i,s,a,l){return e=new TI(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Sn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},oy(i),e}function OI(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AM)}catch(e){console.error(e)}}AM(),O5.exports=dn;var Yh=O5.exports;const uf=Co(Yh);var PI=Object.defineProperty,zI=Object.getOwnPropertyDescriptor,LI=(e,t,r,n)=>{for(var o=n>1?void 0:n?zI(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&PI(t,r,o),o},NM=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},re=(e,t,r)=>(NM(e,t,"read from private field"),r?r.call(e):t.get(e)),Jr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Gr=(e,t,r,n)=>(NM(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$c,II=class{constructor(){this.portals=new Map,Jr(this,$c,Nh()),this.on=e=>re(this,$c).on("update",e),this.once=e=>{const t=re(this,$c).on("update",r=>{t(),e(r)});return t}}update(){re(this,$c).emit("update",this.portals)}render({Component:e,container:t}){const r=this.portals.get(t);this.portals.set(t,{Component:e,key:(r==null?void 0:r.key)??vl()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:vl()})}remove(e){this.portals.delete(e),this.update()}};$c=new WeakMap;var DI=e=>{const{portals:t}=e;return I.createElement(I.Fragment,null,t.map(([r,{Component:n,key:o}])=>Yh.createPortal(I.createElement(n,null),r,o)))};function $I(e){const[t,r]=S.useState(()=>Array.from(e.portals.entries()));return S.useEffect(()=>e.on(n=>{r(Array.from(n.entries()))}),[e]),S.useMemo(()=>t,[t])}var ot,Hc,Ss,Bc,Vf,Fc,$a,Vc,jf,Po,pr,T0,RM=class{constructor({getPosition:e,node:t,portalContainer:r,view:n,ReactComponent:o,options:i}){Jr(this,ot,void 0),Jr(this,Hc,[]),Jr(this,Ss,void 0),Jr(this,Bc,void 0),Jr(this,Vf,void 0),Jr(this,Fc,void 0),Jr(this,$a,void 0),Jr(this,Vc,!1),Jr(this,jf,void 0),Jr(this,Po,void 0),Jr(this,pr,void 0),Jr(this,T0,l=>{l&&(te(re(this,Po),{code:H.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${re(this,ot).type.name}' which doesn't support content.`}),l.append(re(this,Po)))}),this.Component=()=>{const l=re(this,Vf);return te(l,{code:H.REACT_NODE_VIEW,message:`The custom react node view provided for ${re(this,ot).type.name} doesn't have a valid ReactComponent`}),I.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:re(this,Ss),getPosition:re(this,Fc),node:re(this,ot),forwardRef:re(this,T0),decorations:re(this,Hc)})},this.updateAttributes=l=>{if(!re(this,Ss).editable)return;const c=re(this,Fc).call(this);if(c==null)return;const u=re(this,Ss).state.tr.setNodeMarkup(c,void 0,{...re(this,ot).attrs,...l});re(this,Ss).dispatch(u)},te(Pe(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Gr(this,ot,t),Gr(this,Ss,n),Gr(this,Bc,r),Gr(this,Vf,o),Gr(this,Fc,e),Gr(this,$a,i),Gr(this,pr,this.createDom());const{contentDOM:s,wrapper:a}=this.createContentDom()??{};Gr(this,jf,s??void 0),Gr(this,Po,a),re(this,Po)&&re(this,pr).append(re(this,Po)),this.setDomAttributes(re(this,ot),re(this,pr)),this.Component.displayName=bS(`${re(this,ot).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:r,options:n}=e;return(o,i,s)=>new RM({options:n,node:o,view:i,getPosition:s,portalContainer:t,ReactComponent:r})}get selected(){return re(this,Vc)}get contentDOM(){return re(this,jf)}get dom(){return re(this,pr)}renderComponent(){re(this,Bc).render({Component:this.Component,container:re(this,pr)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=re(this,$a),r=re(this,ot).isInline?document.createElement(t):document.createElement(e);return r.classList.add(`${Pk(re(this,ot).type.name)}-node-view-wrapper`),r}createContentDom(){var e,t;if(re(this,ot).isLeaf)return;const r=(t=(e=re(this,ot).type.spec).toDOM)==null?void 0:t.call(e,re(this,ot));if(!r)return;const{contentDOM:n,dom:o}=rn.renderSpec(document,r);let i;if(mt(o))return i=o,o===n&&(i=document.createElement("span"),i.classList.add(`${Pk(re(this,ot).type.name)}-node-view-content-wrapper`),i.append(n)),mt(n),{wrapper:i,contentDOM:n}}update(e,t){return Ch({types:re(this,ot).type,node:e})?(re(this,ot)===e&&re(this,Hc)===t||(re(this,ot).sameMarkup(e)||this.setDomAttributes(e,re(this,pr)),Gr(this,ot,e),Gr(this,Hc,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:r}=re(this,ot).type.spec;let n=e.attrs;if(r){const o=r(e);if(ne(o)||HI(o))return;ss(o[1])&&(n=o[1])}for(const[o,i]of At(n))t.setAttribute(o,i)}selectNode(){Gr(this,Vc,!0),re(this,pr)&&re(this,pr).classList.add(_k),this.renderComponent()}deselectNode(){Gr(this,Vc,!1),re(this,pr)&&re(this,pr).classList.remove(_k),this.renderComponent()}destroy(){re(this,Bc).remove(re(this,pr))}ignoreMutation(e){return e.type==="selection"?!re(this,ot).type.spec.selectable:re(this,Po)?!re(this,Po).contains(e.target):!0}stopEvent(e){var t;if(!re(this,pr))return!1;if(Pe(re(this,$a).stopEvent))return re(this,$a).stopEvent({event:e});const r=e.target;if(!(re(this,pr).contains(r)&&!((t=this.contentDOM)!=null&&t.contains(r))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const s=!!re(this,ot).type.spec.draggable,a=ce.isSelectable(re(this,ot)),l=e.type==="copy",c=e.type==="paste",u=e.type==="cut",d=e.type==="mousedown",f=e.type.startsWith("drag");return!s&&a&&f&&e.preventDefault(),!(f||o||l||c||u||d&&a)}},ow=RM;ot=new WeakMap;Hc=new WeakMap;Ss=new WeakMap;Bc=new WeakMap;Vf=new WeakMap;Fc=new WeakMap;$a=new WeakMap;Vc=new WeakMap;jf=new WeakMap;Po=new WeakMap;pr=new WeakMap;T0=new WeakMap;function HI(e){return vp(e)||ss(e)&&vp(e.dom)}var Xu=class extends je{constructor(){super(...arguments),this.portalContainer=new II}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=ee(),t=this.store.managerSettings.nodeViewComponents??{};for(const n of this.store.extensions)!n.ReactComponent||!Td(n)||n.reactComponentEnvironment==="ssr"||(e[n.name]=ow.create({options:this.options,ReactComponent:n.ReactComponent,portalContainer:this.portalContainer}));const r=At({...this.options.nodeViewComponents,...t});for(const[n,o]of r)e[n]=ow.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};Xu=LI([me({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],Xu);function BI(e){const t=S.createContext(null),r=FI(t);return[o=>{const i=e(o);return I.createElement(t.Provider,{value:i},o.children)},r,t]}function FI(e){return(t,r)=>{const n=S.useContext(e),o=VI(n);if(!n)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return n;if(typeof t!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=t(n);if(!o||!r)return i;const s=t(o);return r(s,i)?s:i}}function VI(e){const t=S.useRef();return jI(()=>{t.current=e}),t.current}var jI=typeof document<"u"?S.useLayoutEffect:S.useEffect;function UI(e,t){return BI(r=>{const n=S.useRef(null),o=S.useRef(),i=t==null?void 0:t(r),[s,a]=S.useState(()=>e({get:iw(n),set:sw(o),previousContext:void 0,props:r,state:i})),l=[...Object.values(r),i];return S.useEffect(()=>{l.length!==0&&a(c=>e({get:iw(n),set:sw(o),previousContext:c,props:r,state:i}))},l),n.current=s,o.current=a,s})}function iw(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function sw(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(r=>({...r,...typeof t=="function"?t(r):t}))}}var PM={},zM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])})(zM);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=zM;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function r(p){return!p.match(/[^a-f0-9]/i)?parseInt(p,16):NaN}function n(p,h,m){const b=r(p);if(Number.isNaN(b)||m!==void 0&&m!==p.length)throw new SyntaxError(t.errorMessages.get(h));return b}function o(p){const h=n(p,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(h)}function i(p,h){const m=n(p,t.ErrorType.MalformedUnicode,4);if(h!==void 0){const b=n(h,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,b)}return String.fromCharCode(m)}function s(p){return p.charAt(0)==="{"&&p.charAt(p.length-1)==="}"}function a(p){if(!s(p))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const h=p.slice(1,-1),m=n(h,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(b){throw b instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):b}}function l(p,h=!1){if(h)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const m=parseInt(p,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",` -`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(p){return c.get(p)||p}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function f(p,h=!1){return p.replace(d,function(m,b,v,g,y,k,x,w,E){if(b!==void 0)return"\\";if(v!==void 0)return o(v);if(g!==void 0)return a(g);if(y!==void 0)return i(y,k);if(x!==void 0)return i(x);if(w==="0")return"\0";if(w!==void 0)return l(w,!h);if(E!==void 0)return u(E);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=f,e.default=f})(PM);const WI=Co(PM),jo=e=>typeof e=="string",KI=e=>typeof e=="function",aw=new Map;function Cy(e){return[...Array.isArray(e)?e:[e],"en"]}function LM(e,t,r){const n=Cy(e);return Kp(()=>qp("date",n,r),()=>new Intl.DateTimeFormat(n,r)).format(jo(t)?new Date(t):t)}function O0(e,t,r){const n=Cy(e);return Kp(()=>qp("number",n,r),()=>new Intl.NumberFormat(n,r)).format(t)}function lw(e,t,r,{offset:n=0,...o}){const i=Cy(e),s=t?Kp(()=>qp("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Kp(()=>qp("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[r]??o[s.select(r-n)]??o.other}function Kp(e,t){const r=e();let n=aw.get(r);return n||(n=t(),aw.set(r,n)),n}function qp(e,t,r){const n=t.join("-");return`${e}-${n}-${JSON.stringify(r)}`}const IM=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,qI=(e,t,r={})=>{t=t||e;const n=i=>jo(i)?r[i]||{style:i}:i,o=(i,s)=>{const a=Object.keys(r).length?n("number"):{},l=O0(t,i,a);return s.replace("#",l)};return{plural:(i,s)=>{const{offset:a=0}=s,l=lw(t,!1,i,s);return o(i-a,l)},selectordinal:(i,s)=>{const{offset:a=0}=s,l=lw(t,!0,i,s);return o(i-a,l)},select:(i,s)=>s[i]??s.other,number:(i,s)=>O0(t,i,n(s)),date:(i,s)=>LM(t,i,n(s)),undefined:i=>i}};function GI(e,t,r){return(n,o={})=>{const i=qI(t,r,o),s=l=>Array.isArray(l)?l.reduce((c,u)=>{if(jo(u))return c+u;const[d,f,p]=u;let h={};p!=null&&!jo(p)?Object.keys(p).forEach(b=>{h[b]=s(p[b])}):h=p;const m=i[f](n[d],h);return m==null?c:c+m},""):l,a=s(e);return jo(a)&&IM.test(a)?WI(a.trim()):jo(a)?a.trim():a}}var YI=Object.defineProperty,JI=(e,t,r)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XI=(e,t,r)=>(JI(e,typeof t!="symbol"?t+"":t,r),r);class QI{constructor(){XI(this,"_events",{})}on(t,r){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(r),()=>this.removeListener(t,r)}removeListener(t,r){if(!this._hasEvent(t))return;const n=this._events[t].indexOf(r);~n&&this._events[t].splice(n,1)}emit(t,...r){this._hasEvent(t)&&this._events[t].map(n=>n.apply(this,r))}_hasEvent(t){return Array.isArray(this._events[t])}}var ZI=Object.defineProperty,e9=(e,t,r)=>t in e?ZI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ca=(e,t,r)=>(e9(e,typeof t!="symbol"?t+"":t,r),r);class t9 extends QI{constructor(t){super(),Ca(this,"_locale"),Ca(this,"_locales"),Ca(this,"_localeData"),Ca(this,"_messages"),Ca(this,"_missing"),Ca(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,r){this._localeData[t]==null?this._localeData[t]=r:Object.assign(this._localeData[t],r)}loadLocaleData(t,r){r!=null?this._loadLocaleData(t,r):Object.keys(t).forEach(n=>this._loadLocaleData(n,t[n])),this.emit("change")}_load(t,r){this._messages[t]==null?this._messages[t]=r:Object.assign(this._messages[t],r)}load(t,r){r!=null?this._load(t,r):Object.keys(t).forEach(n=>this._load(n,t[n])),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:n}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=n,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r={},{message:n,formats:o}={}){jo(t)||(r=t.values||r,n=t.message,t=t.id);const i=!this.messages[t],s=this._missing;if(s&&i)return KI(s)?s(this._locale,t):s;i&&this.emit("missing",{id:t,locale:this._locale});let a=this.messages[t]||n||t;return jo(a)&&IM.test(a)?JSON.parse(`"${a}"`):jo(a)?a:GI(a,this._locale,this._locales)(r,o)}date(t,r){return LM(this._locales||this._locale,t,r)}number(t,r){return O0(this._locales||this._locale,t,r)}}function r9(e={}){return new t9(e)}const Jh=r9();function U(e,t){return t?"other":e==1?"one":"other"}function oi(e,t){return t?"other":e==0||e==1?"one":"other"}function Vr(e,t){var r=String(e).split("."),n=!r[1];return t?"other":e==1&&n?"one":"other"}function ze(e,t){return"other"}function ps(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const n9=ze,o9=U,i9=oi;function s9(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const a9=U;function l9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function c9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function u9(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const d9=U,f9=Vr;function p9(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-1),i=n.slice(-2),s=n.slice(-3);return t?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":n==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function h9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":n&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const m9=U,g9=U,v9=U,y9=oi,b9=ze;function k9(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const x9=ze;function w9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2),s=n&&r[0].slice(-6);return t?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&n&&s==0?"many":"other"}const S9=U;function E9(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function C9(e,t){var r=String(e).split("."),n=!r[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&n?"one":"other"}const M9=U;function T9(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const O9=U,_9=U,A9=U;function N9(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function R9(e,t){return t?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other"}function P9(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e;return t?"other":e==1||!o&&(n==0||n==1)?"one":"other"}const z9=Vr;function L9(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}const I9=U,D9=ze,$9=U,H9=U;function B9(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":e==1&&n?"one":"other"}const F9=U,V9=U,j9=Vr,U9=U;function W9(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function K9(e,t){return t?"other":e>=0&&e<2?"one":"other"}const q9=Vr;function G9(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Y9=U;function J9(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const X9=U,Q9=Vr;function Z9(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":n&&e>=3&&e<=6?"few":n&&e>=7&&e<=10?"many":"other"}function eD(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":n&&e>=3&&e<=10||n&&e>=13&&e<=19?"few":"other"}const tD=Vr,rD=U;function nD(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const oD=oi;function iD(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const sD=U,aD=U;function lD(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}function cD(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}function uD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function dD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}function fD(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function pD(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const hD=Vr,mD=ze,gD=ze,vD=ze,yD=Vr;function bD(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e,i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11||!o?"one":"other"}function kD(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const xD=ps;function wD(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}const SD=ze,ED=ze,CD=U,MD=Vr,TD=U,OD=ze,_D=ze;function AD(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-2);return t?n==1?"one":n==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function ND(e,t){return t?"other":e>=0&&e<2?"one":"other"}const RD=U,PD=U,zD=ze,LD=ze;function ID(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||n&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const DD=U,$D=U,HD=ze;function BD(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const FD=ze,VD=U,jD=U;function UD(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const WD=U;function KD(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2),i=n&&r[0].slice(-3),s=n&&r[0].slice(-5),a=n&&r[0].slice(-6);return t?n&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":e==5||o==5?"many":"other":e==0?"zero":e==1?"one":o==2||o==22||o==42||o==62||o==82||n&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||e!=0&&a==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":e!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const qD=U;function GD(e,t){var r=String(e).split("."),n=r[0];return t?"other":e==0?"zero":(n==0||n==1)&&e!=0?"one":"other"}const YD=U,JD=U,XD=ze,QD=oi;function ZD(e,t){return t&&e==1?"one":"other"}function e7(e,t){var r=String(e).split("."),n=r[1]||"",o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":n!=0?"many":"other"}function t7(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const r7=U,n7=oi,o7=U;function i7(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?s==1&&a!=11?"one":s==2&&a!=12?"two":(s==7||s==8)&&a!=17&&a!=18?"many":"other":i&&s==1&&a!=11||l==1&&c!=11?"one":"other"}const s7=U,a7=U;function l7(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}function c7(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function u7(e,t){return t&&e==1?"one":"other"}function d7(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const f7=ze,p7=U,h7=ps,m7=U,g7=U;function v7(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?n&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const y7=Vr,b7=U,k7=U,x7=U,w7=ze,S7=U,E7=oi,C7=U,M7=U,T7=U;function O7(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==5||n&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const _7=U,A7=ze,N7=oi,R7=U;function P7(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&n!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function z7(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const L7=U;function I7(e,t){var r=String(e).split("."),n=r[0];return t?"other":n==0||n==1?"one":"other"}const D7=Vr,$7=U;function H7(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}const B7=U,F7=ze;function V7(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const j7=U,U7=ze,W7=U;function K7(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}function q7(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const G7=U,Y7=U,J7=ps,X7=U,Q7=ze,Z7=ze;function e$(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function t$(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e>=0&&e<=1?"one":n&&e>=2&&e<=10?"few":"other"}function r$(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"";return t?"other":e==0||e==1||n==0&&o==1?"one":"other"}function n$(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function o$(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const i$=ps,s$=ps,a$=ps,l$=ps,c$=ps,u$=U,d$=U;function f$(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function p$(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const h$=U,m$=U,g$=U,v$=ze;function y$(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?(i==1||i==2)&&s!=11&&s!=12?"one":"other":e==1&&n?"one":"other"}const b$=Vr,k$=U,x$=U,w$=U,S$=U,E$=ze,C$=oi,M$=U;function T$(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function O$(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const _$=U,A$=ze,N$=U,R$=U;function P$(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e==0||e==1||n&&e>=11&&e<=99?"one":"other"}const z$=U;function L$(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-1),c=n.slice(-2);return t?s==3&&a!=13?"few":"other":o&&l==1&&c!=11?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&l==0||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"}const I$=Vr,D$=U,$$=U;function H$(e,t){return t&&e==1?"one":"other"}const B$=U,F$=U,V$=oi,j$=U,U$=ze,W$=U,K$=U,q$=Vr,G$=ze,Y$=ze,J$=ze;function X$(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const Q$=Object.freeze(Object.defineProperty({__proto__:null,_in:n9,af:o9,ak:i9,am:s9,an:a9,ar:l9,ars:c9,as:u9,asa:d9,ast:f9,az:p9,be:h9,bem:m9,bez:g9,bg:v9,bho:y9,bm:b9,bn:k9,bo:x9,br:w9,brx:S9,bs:E9,ca:C9,ce:M9,ceb:T9,cgg:O9,chr:_9,ckb:A9,cs:N9,cy:R9,da:P9,de:z9,dsb:L9,dv:I9,dz:D9,ee:$9,el:H9,en:B9,eo:F9,es:V9,et:j9,eu:U9,fa:W9,ff:K9,fi:q9,fil:G9,fo:Y9,fr:J9,fur:X9,fy:Q9,ga:Z9,gd:eD,gl:tD,gsw:rD,gu:nD,guw:oD,gv:iD,ha:sD,haw:aD,he:lD,hi:cD,hr:uD,hsb:dD,hu:fD,hy:pD,ia:hD,id:mD,ig:gD,ii:vD,io:yD,is:bD,it:kD,iu:xD,iw:wD,ja:SD,jbo:ED,jgo:CD,ji:MD,jmc:TD,jv:OD,jw:_D,ka:AD,kab:ND,kaj:RD,kcg:PD,kde:zD,kea:LD,kk:ID,kkj:DD,kl:$D,km:HD,kn:BD,ko:FD,ks:VD,ksb:jD,ksh:UD,ku:WD,kw:KD,ky:qD,lag:GD,lb:YD,lg:JD,lkt:XD,ln:QD,lo:ZD,lt:e7,lv:t7,mas:r7,mg:n7,mgo:o7,mk:i7,ml:s7,mn:a7,mo:l7,mr:c7,ms:u7,mt:d7,my:f7,nah:p7,naq:h7,nb:m7,nd:g7,ne:v7,nl:y7,nn:b7,nnh:k7,no:x7,nqo:w7,nr:S7,nso:E7,ny:C7,nyn:M7,om:T7,or:O7,os:_7,osa:A7,pa:N7,pap:R7,pl:P7,prg:z7,ps:L7,pt:I7,pt_PT:D7,rm:$7,ro:H7,rof:B7,root:F7,ru:V7,rwk:j7,sah:U7,saq:W7,sc:K7,scn:q7,sd:G7,sdh:Y7,se:J7,seh:X7,ses:Q7,sg:Z7,sh:e$,shi:t$,si:r$,sk:n$,sl:o$,sma:i$,smi:s$,smj:a$,smn:l$,sms:c$,sn:u$,so:d$,sq:f$,sr:p$,ss:h$,ssy:m$,st:g$,su:v$,sv:y$,sw:b$,syr:k$,ta:x$,te:w$,teo:S$,th:E$,ti:C$,tig:M$,tk:T$,tl:O$,tn:_$,to:A$,tr:N$,ts:R$,tzm:P$,ug:z$,uk:L$,ur:I$,uz:D$,ve:$$,vi:H$,vo:B$,vun:F$,wa:V$,wae:j$,wo:U$,xh:W$,xog:K$,yi:q$,yo:G$,yue:Y$,zh:J$,zu:X$},Symbol.toStringTag,{value:"Module"}));var Z$=Object.defineProperty,eH=Object.getOwnPropertyDescriptor,tH=Object.getOwnPropertyNames,rH=Object.prototype.hasOwnProperty,cw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tH(t))!rH.call(e,o)&&o!==r&&Z$(e,o,{get:()=>t[o],enumerable:!(n=eH(t,o))||n.enumerable});return e},nH=(e,t,r)=>(cw(e,t,"default"),r&&cw(r,t,"default")),oH=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),DM={};nH(DM,Q$);Jh.loadLocaleData("en",{plurals:DM.en});Jh.load("en",oH);Jh.activate("en");var iH=Object.defineProperty,sH=Object.getOwnPropertyDescriptor,My=(e,t,r,n)=>{for(var o=n>1?void 0:n?sH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&iH(t,r,o),o},Pl=class extends Qt{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:r,content:n}=this.options,o=ee();if(ss(r))for(const[i,s]of At(r))o[i]={default:s};else for(const i of r)o[i]={default:null};return{attrs:o,content:n,...t}}setDocAttributes(e){return({tr:t,dispatch:r})=>{if(r){for(const[n,o]of Object.entries(e))t.step(new Qu(n,o));r(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return Av(e.doc,t)}};My([G()],Pl.prototype,"setDocAttributes",1);My([Ue()],Pl.prototype,"isDefaultDocNode",1);Pl=My([me({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:De.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Pl);var $M="SetDocAttribute",HM="RevertSetDocAttribute",Qu=class extends Rt{constructor(e,t,r=$M){super(),this.stepType=r,this.key=e,this.value=t}static fromJSON(e,t){return new Qu(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return vt.ok(e.type.create(t,e.content,e.marks))}invert(){return new Qu(this.key,this.previous,HM)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{Rt.jsonID($M,Qu),Rt.jsonID(HM,Qu)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var aH=Object.defineProperty,lH=Object.getOwnPropertyDescriptor,BM=(e,t,r,n)=>{for(var o=n>1?void 0:n?lH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aH(t,r,o),o};function cH(e,t,r,n){const o=e.docView.posFromDOM(t,r,n);return o===null||o<0?null:o}function uH(e,t){const r=t.target;if(r){const n=cH(e,r,0);if(n!==null){const o=e.state.doc.resolve(n),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:n,inside:s}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var Gp=class extends je{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,r)=>{const n=r,o=uH(t,n);if(!o)return!1;const i=[],s=[],{inside:a,pos:l}=o;if(a===-1)return!1;const c=t.state.doc.resolve(l),u=c.depth+1;for(const d of cv(u,1))i.push({node:d>c.depth&&c.nodeAfter?c.nodeAfter:c.node(d),pos:c.before(d)});for(const{type:d}of c.marksAcross(c)??[]){const f=Yo(c,d);f&&s.push(f)}return e(n,{view:t,nodes:i,marks:s,getMark:d=>{const f=ne(d)?t.state.schema.marks[d]:d;return te(f,{code:H.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(p=>p.mark.type===f)},getNode:d=>{var f;const p=ne(d)?t.state.schema.nodes[d]:d;te(p,{code:H.EXTENSION,message:"The node being checked does not exist"});const h=i.find(({node:m})=>m.type===p);if(h)return{...h,isRoot:!!((f=i[0])!=null&&f.node.eq(h.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const r of this.store.extensions){if(!r.createEventHandlers||(t=r.options.exclude)!=null&&t.clickHandler)continue;const n=r.createEventHandlers();for(const[o,i]of At(n))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(r,n,o,i,s,a,l,c)=>{const u=this.store.currentState,{schema:d,doc:f}=u,p=f.resolve(i),h=e.has(l),m=dH({$pos:p,handled:h,view:o,state:u});let b=!1;h||(b=r(l,m)||b);const v={...m,pos:i,direct:c,nodeWithPosition:{node:s,pos:a},getNode:g=>{const y=ne(g)?d.nodes[g]:g;return te(y,{code:H.EXTENSION,message:"The node being checked does not exist"}),y===s.type?{node:s,pos:a}:void 0}};return e.set(l,!0),n(l,v)||b};return{props:{handleKeyPress:(r,n)=>this.options.keypress(n)||!1,handleKeyDown:(r,n)=>this.options.keydown(n)||!1,handleTextInput:(r,n,o,i)=>this.options.textInput({from:n,to:o,text:i})||!1,handleClickOn:(r,n,o,i,s,a)=>t(this.options.clickMark,this.options.click,r,n,o,i,s,a),handleDoubleClickOn:(r,n,o,i,s,a)=>t(this.options.doubleClickMark,this.options.doubleClick,r,n,o,i,s,a),handleTripleClickOn:(r,n,o,i,s,a)=>t(this.options.tripleClickMark,this.options.tripleClick,r,n,o,i,s,a),handleDOMEvents:{focus:(r,n)=>this.options.focus(n)||!1,blur:(r,n)=>this.options.blur(n)||!1,mousedown:(r,n)=>(this.startMouseover(),this.options.mousedown(n)||!1),mouseup:(r,n)=>(this.endMouseover(),this.options.mouseup(n)||!1),mouseleave:(r,n)=>(this.mouseover=!1,this.options.mouseleave(n)||!1),mouseenter:(r,n)=>(this.mouseover=!0,this.options.mouseenter(n)||!1),keyup:(r,n)=>this.options.keyup(n)||!1,mouseout:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!1};return this.options.hover(r,o)||!1}),mouseover:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!0};return this.options.hover(r,o)||!1}),contextmenu:this.createMouseEventHandler((r,n)=>this.options.contextmenu(r,n)||!1),scroll:(r,n)=>this.options.scroll(n)||!1,copy:(r,n)=>this.options.copy(n)||!1,cut:(r,n)=>this.options.cut(n)||!1,paste:(r,n)=>this.options.paste(n)||!1}},view:r=>{let n=r.editable;const o=this.options;return{update(i){const s=i.editable;s!==n&&(o.editable(s),n=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};BM([Ue()],Gp.prototype,"isInteracting",1);Gp=BM([me({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:De.High})],Gp);function dH(e){const{handled:t,view:r,$pos:n,state:o}=e,i={getMark:TS,markRanges:[],view:r,state:o};if(t)return i;for(const{type:s}of n.marksAcross(n)??[]){const a=Yo(n,s);a&&i.markRanges.push(a)}return i.getMark=s=>{const a=ne(s)?o.schema.marks[s]:s;return te(a,{code:H.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(l=>l.mark.type===a)},i}class ht extends be{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return ht.valid(n)?new ht(n):be.near(n)}content(){return W.empty}eq(t){return t instanceof ht&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ht(t.resolve(r.pos))}getBookmark(){return new Ty(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!fH(t)||!pH(t))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let o=r.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,r,n=!1){e:for(;;){if(!n&&ht.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(r>0?t.indexAfter(s)0){i=a.child(r>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=r;let l=t.doc.resolve(o);if(ht.valid(l))return l}for(;;){let s=r>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!ce.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*r),n=!1;continue e}break}i=s,o+=r;let a=t.doc.resolve(o);if(ht.valid(a))return a}return null}}}ht.prototype.visible=!1;ht.findFrom=ht.findGapCursorFrom;be.jsonID("gapcursor",ht);class Ty{constructor(t){this.pos=t}map(t){return new Ty(t.map(this.pos))}resolve(t){let r=t.resolve(this.pos);return ht.valid(r)?new ht(r):be.near(r)}}function fH(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r-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 pH(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r);;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 hH(){return new Mo({props:{decorations:yH,createSelectionBetween(e,t,r){return t.pos==r.pos&&ht.valid(r)?new ht(r):null},handleClick:gH,handleKeyDown:mH,handleDOMEvents:{beforeinput:vH}}})}const mH=Pv({ArrowLeft:df("horiz",-1),ArrowRight:df("horiz",1),ArrowUp:df("vert",-1),ArrowDown:df("vert",1)});function df(e,t){const r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(n,o,i){let s=n.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof le){if(!i.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(t>0?a.after():a.before())}let c=ht.findGapCursorFrom(a,t,l);return c?(o&&o(n.tr.setSelection(new ht(c))),!0):!1}}function gH(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!ht.valid(n))return!1;let o=e.posAtCoords({left:r.clientX,top:r.clientY});return o&&o.inside>-1&&ce.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new ht(n))),!0)}function vH(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof ht))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=R.empty;for(let s=n.length-1;s>=0;s--)o=R.from(n[s].createAndFill(null,o));let i=e.state.tr.replace(r.pos,r.pos,new W(o,0,0));return i.setSelection(le.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function yH(e){if(!(e.selection instanceof ht))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ee.create(e.doc,[qe.widget(e.selection.head,t,{key:"gapcursor"})])}var bH=Object.defineProperty,kH=Object.getOwnPropertyDescriptor,xH=(e,t,r,n)=>{for(var o=n>1?void 0:n?kH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&bH(t,r,o),o},_0=class extends je{get name(){return"gapCursor"}createExternalPlugins(){return[hH()]}};_0=xH([me({})],_0);var Yp=200,Bt=function(){};Bt.prototype.append=function(t){return t.length?(t=Bt.from(t),!this.length&&t||t.length=r?Bt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Bt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Bt.prototype.forEach=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(t,r,n,0):this.forEachInvertedInner(t,r,n,0)};Bt.prototype.map=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},r,n),o};Bt.from=function(t){return t instanceof Bt?t:t&&t.length?new FM(t):Bt.empty};var FM=function(e){function t(n){e.call(this),this.values=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={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,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=Yp)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=Yp)return new t(o.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(Bt);Bt.empty=new FM([]);var wH=function(e){function t(r,n){e.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.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(n){return na&&this.right.forEachInner(n,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(n,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(n,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(n-i,o-i):this.left.slice(n,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(n){var o=this.right.leafAppend(n);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(n){var o=this.left.leafPrepend(n);if(o)return new t(o,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(Bt);const SH=500;class Gn{constructor(t,r){this.items=t,this.eventCount=r}popEvent(t,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let o,i;r&&(o=this.remapping(n,this.items.length),i=o.maps.length);let s=t.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(n,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new co(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],c.push(new co(h,void 0,void 0,c.length+u.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new Gn(this.items.slice(0,n).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,r,n,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;uCH&&(a=EH(a,c),s-=c),new Gn(a.append(i),s)}remapping(t,r){let n=new rl;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?n.maps.length-o.mirrorOffset:void 0;n.appendMap(o.map,s)},t,r),n}addMaps(t){return this.eventCount==0?this:new Gn(this.items.append(t.map(r=>new co(r))),this.eventCount)}rebased(t,r){if(!this.eventCount)return this;let n=[],o=Math.max(0,this.items.length-r),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=r;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(l+1,p));b&&a++,n.push(new co(h,m,b))}else n.push(new co(h))},o);let c=[];for(let f=r;fSH&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach(r=>{r.step||t++}),t}compress(t=this.items.length){let r=this.remapping(0,t),n=r.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(r.slice(n)),c=l&&l.getMap();if(n--,c&&r.appendMap(c,n),l){let u=s.selection&&s.selection.map(r.slice(n));u&&i++;let d=new co(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&n--},this.items.length,0),new Gn(Bt.from(o.reverse()),i)}}Gn.empty=new Gn(Bt.empty,0);function EH(e,t){let r;return e.forEach((n,o)=>{if(n.selection&&t--==0)return r=o,!1}),e.slice(r)}class co{constructor(t,r,n,o){this.map=t,this.step=r,this.selection=n,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let r=t.step.merge(this.step);if(r)return new co(r.getMap().invert(),r,this.selection)}}}class Si{constructor(t,r,n,o,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=o,this.prevComposition=i}}const CH=20;function MH(e,t,r,n){let o=r.getMeta(yo),i;if(o)return o.historyState;r.getMeta(OH)&&(e=new Si(e.done,e.undone,null,0,-1));let s=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(s&&s.getMeta(yo))return s.getMeta(yo).redo?new Si(e.done.addTransform(r,void 0,n,Uf(t)),e.undone,uw(r.mapping.maps[r.steps.length-1]),e.prevTime,e.prevComposition):new Si(e.done,e.undone.addTransform(r,void 0,n,Uf(t)),null,e.prevTime,e.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(r.time||0)-n.newGroupDelay||!TH(r,e.prevRanges)),c=s?Ig(e.prevRanges,r.mapping):uw(r.mapping.maps[r.steps.length-1]);return new Si(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,Uf(t)),Gn.empty,c,r.time,a??e.prevComposition)}else return(i=r.getMeta("rebased"))?new Si(e.done.rebased(r,i),e.undone.rebased(r,i),Ig(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new Si(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),Ig(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function TH(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((n,o)=>{for(let i=0;i=t[i]&&(r=!0)}),r}function uw(e){let t=[];return e.forEach((r,n,o,i)=>t.push(o,i)),t}function Ig(e,t){if(!e)return null;let r=[];for(let n=0;n{let r=yo.getState(e);return!r||r.done.eventCount==0?!1:(t&&VM(r,e,t,!1),!0)},jc=(e,t)=>{let r=yo.getState(e);return!r||r.undone.eventCount==0?!1:(t&&VM(r,e,t,!0),!0)};function A0(e){let t=yo.getState(e);return t?t.done.eventCount:0}function AH(e){let t=yo.getState(e);return t?t.undone.eventCount:0}var NH=Object.defineProperty,RH=Object.getOwnPropertyDescriptor,va=(e,t,r,n)=>{for(var o=n>1?void 0:n?RH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&NH(t,r,o),o},So=class extends je{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:r,dispatch:n,view:o})=>{const{getState:i,getDispatch:s}=this.options,a=Pe(i)?i():r,l=Pe(s)&&n?s():n,c=e(a,l,o);return t==null||t(c),c}}get name(){return"history"}createKeymap(){return{"Mod-y":en.isMac?()=>!1:this.wrapMethod(jc,this.options.onRedo),"Mod-z":this.wrapMethod(Wf,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(jc,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(Wf,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(jc,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[_H({depth:e,newGroupDelay:t})]}undo(){return jx(this.wrapMethod(Wf,this.options.onUndo))}redo(){return jx(this.wrapMethod(jc,this.options.onRedo))}undoDepth(e=this.store.getState()){return A0(e)}redoDepth(e=this.store.getState()){return AH(e)}};va([Et({shortcut:j.Undo,command:"undo"})],So.prototype,"undoShortcut",1);va([Et({shortcut:j.Redo,command:"redo"})],So.prototype,"redoShortcut",1);va([G({disableChaining:!0,description:({t:e})=>e(dp.UNDO_DESCRIPTION),label:({t:e})=>e(dp.UNDO_LABEL),icon:"arrowGoBackFill"})],So.prototype,"undo",1);va([G({disableChaining:!0,description:({t:e})=>e(dp.REDO_DESCRIPTION),label:({t:e})=>e(dp.REDO_LABEL),icon:"arrowGoForwardFill"})],So.prototype,"redo",1);va([Ue()],So.prototype,"undoDepth",1);va([Ue()],So.prototype,"redoDepth",1);So=va([me({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],So);var PH=Object.defineProperty,zH=Object.getOwnPropertyDescriptor,Xh=(e,t,r,n)=>{for(var o=n>1?void 0:n?zH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&PH(t,r,o),o},LH={icon:"paragraph",label:({t:e})=>e(fp.INSERT_LABEL),description:({t:e})=>e(fp.INSERT_DESCRIPTION)},IH={icon:"paragraph",label:({t:e})=>e(fp.CONVERT_LABEL),description:({t:e})=>e(fp.CONVERT_DESCRIPTION)},oa=class extends Qt{get name(){return"paragraph"}createTags(){return[oe.LastNodeCompatible,oe.TextBlock,oe.Block,oe.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:r=>({...e.parse(r)})},...t.parseDOM??[]],toDOM:r=>["p",e.dom(r),0]}}convertParagraph(e={}){const{attrs:t,selection:r,preserveAttrs:n}=e;return this.store.commands.setBlockNodeType.original(this.type,t,r,n)}insertParagraph(e,t={}){const{selection:r,attrs:n}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:r,attrs:n})}shortcut(e){return this.convertParagraph()(e)}};Xh([G(IH)],oa.prototype,"convertParagraph",1);Xh([G(LH)],oa.prototype,"insertParagraph",1);Xh([Et({shortcut:j.Paragraph,command:"convertParagraph"})],oa.prototype,"shortcut",1);oa=Xh([me({defaultPriority:De.Medium})],oa);function Uo(e,t,r){return Math.min(Math.max(e,r),t)}class DH extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Uc=DH;function Oy(e){if(typeof e!="string")throw new Uc(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=WH.test(e)?BH(e):e;const r=FH.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(a=>parseInt(Zu(a,2),16)),parseInt(Zu(s[3]||"f",2),16)/255]}const n=VH.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const o=jH.exec(t);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const i=UH.exec(t);if(i){const[s,a,l,c]=Array.from(i).slice(1).map(parseFloat);if(Uo(0,100,a)!==a)throw new Uc(e);if(Uo(0,100,l)!==l)throw new Uc(e);return[...KH(s,a,l),Number.isNaN(c)?1:c]}throw new Uc(e)}function $H(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const fw=e=>parseInt(e.replace(/_/g,""),36),HH="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=fw(t.substring(0,3)),n=fw(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e},{});function BH(e){const t=e.toLowerCase().trim(),r=HH[$H(t)];if(!r)throw new Uc(e);return`#${r}`}const Zu=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),FH=new RegExp(`^#${Zu("([a-f0-9])",3)}([a-f0-9])?$`,"i"),VH=new RegExp(`^#${Zu("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),jH=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Zu(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),UH=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,WH=/^[a-z]+$/i,pw=e=>Math.round(e*255),KH=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(pw);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),s=i*(1-Math.abs(o%2-1));let a=0,l=0,c=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,c=s):o>=3&&o<4?(l=s,c=i):o>=4&&o<5?(a=s,c=i):o>=5&&o<6&&(a=i,c=s);const u=n-i/2,d=a+u,f=l+u,p=c+u;return[d,f,p].map(pw)};function qH(e){const[t,r,n,o]=Oy(e).map((d,f)=>f===3?d:d/255),i=Math.max(t,r,n),s=Math.min(t,r,n),a=(i+s)/2;if(i===s)return[0,0,a,o];const l=i-s,c=a>.5?l/(2-i-s):l/(i+s);return[60*(t===i?(r-n)/l+(r.179}function pl(e){return XH(e)?"#000":"#fff"}const QH="remirror-editor-wrapper",ZH="remirror-button-active",eB="remirror-button",tB="remirror-composite",rB="remirror-dialog",nB="remirror-dialog-backdrop",oB="remirror-form",iB="remirror-form-message",sB="remirror-form-label",aB="remirror-form-group",lB="remirror-group",cB="remirror-input",uB="remirror-menu",dB="remirror-menu-pane",fB="remirror-menu-pane-active",pB="remirror-menu-dropdown-label",hB="remirror-menu-pane-icon",mB="remirror-menu-pane-label",gB="remirror-menu-pane-shortcut",vB="remirror-menu-button-left",yB="remirror-menu-button-right",bB="remirror-menu-button-nested-left",kB="remirror-menu-button-nested-right",xB="remirror-menu-button",wB="remirror-menu-bar",SB="remirror-flex-column",EB="remirror-flex-row",CB="remirror-menu-item",MB="remirror-menu-item-row",TB="remirror-menu-item-column",OB="remirror-menu-item-checkbox",_B="remirror-menu-item-radio",AB="remirror-menu-group",NB="remirror-floating-popover",RB="remirror-popover",PB="remirror-animated-popover",zB="remirror-role",LB="remirror-separator",IB="remirror-tab",DB="remirror-tab-list",$B="remirror-tabbable",HB="remirror-toolbar",BB="remirror-tooltip",FB="remirror-table-size-editor",VB="remirror-table-size-editor-body",jB="remirror-table-size-editor-cell",UB="remirror-table-size-editor-cell-selected",WB="remirror-table-size-editor-footer",KB="remirror-color-picker",qB="remirror-color-picker-cell",GB="remirror-color-picker-cell-selected";var YB=Object.freeze({__proto__:null,ANIMATED_POPOVER:PB,BUTTON:eB,BUTTON_ACTIVE:ZH,COLOR_PICKER:KB,COLOR_PICKER_CELL:qB,COLOR_PICKER_CELL_SELECTED:GB,COMPOSITE:tB,DIALOG:rB,DIALOG_BACKDROP:nB,EDITOR_WRAPPER:QH,FLEX_COLUMN:SB,FLEX_ROW:EB,FLOATING_POPOVER:NB,FORM:oB,FORM_GROUP:aB,FORM_LABEL:sB,FORM_MESSAGE:iB,GROUP:lB,INPUT:cB,MENU:uB,MENU_BAR:wB,MENU_BUTTON:xB,MENU_BUTTON_LEFT:vB,MENU_BUTTON_NESTED_LEFT:bB,MENU_BUTTON_NESTED_RIGHT:kB,MENU_BUTTON_RIGHT:yB,MENU_DROPDOWN_LABEL:pB,MENU_GROUP:AB,MENU_ITEM:CB,MENU_ITEM_CHECKBOX:OB,MENU_ITEM_COLUMN:TB,MENU_ITEM_RADIO:_B,MENU_ITEM_ROW:MB,MENU_PANE:dB,MENU_PANE_ACTIVE:fB,MENU_PANE_ICON:hB,MENU_PANE_LABEL:mB,MENU_PANE_SHORTCUT:gB,POPOVER:RB,ROLE:zB,SEPARATOR:LB,TAB:IB,TABBABLE:$B,TABLE_SIZE_EDITOR:FB,TABLE_SIZE_EDITOR_BODY:VB,TABLE_SIZE_EDITOR_CELL:jB,TABLE_SIZE_EDITOR_CELL_SELECTED:UB,TABLE_SIZE_EDITOR_FOOTER:WB,TAB_LIST:DB,TOOLBAR:HB,TOOLTIP:BB});const JB="remirror-wrap",XB="remirror-language-select-positioner",QB="remirror-language-select-width",ZB="remirror-a11y-dark",eF="remirror-atom-dark",tF="remirror-base16-ateliersulphurpool-light",rF="remirror-cb",nF="remirror-darcula",oF="remirror-dracula",iF="remirror-duotone-dark",sF="remirror-duotone-earth",aF="remirror-duotone-forest",lF="remirror-duotone-light",cF="remirror-duotone-sea",uF="remirror-duotone-space",dF="remirror-gh-colors",fF="remirror-hopscotch",pF="remirror-pojoaque",hF="remirror-vs",mF="remirror-xonokai";var gF=Object.freeze({__proto__:null,A11Y_DARK:ZB,ATOM_DARK:eF,BASE16_ATELIERSULPHURPOOL_LIGHT:tF,CB:rF,DARCULA:nF,DRACULA:oF,DUOTONE_DARK:iF,DUOTONE_EARTH:sF,DUOTONE_FOREST:aF,DUOTONE_LIGHT:lF,DUOTONE_SEA:cF,DUOTONE_SPACE:uF,GH_COLORS:dF,HOPSCOTCH:fF,LANGUAGE_SELECT_POSITIONER:XB,LANGUAGE_SELECT_WIDTH:QB,POJOAQUE:pF,VS:hF,WRAP:JB,XONOKAI:mF});const vF="remirror-image-loader";var yF=Object.freeze({__proto__:null,IMAGE_LOADER:vF});const bF="remirror-list-item-with-custom-mark",kF="remirror-ul-list-content",xF="remirror-editor",wF="remirror-list-item-marker-container",SF="remirror-list-item-checkbox",EF="remirror-collapsible-list-item-closed",CF="remirror-collapsible-list-item-button",MF="remirror-list-spine";var ts=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:CF,COLLAPSIBLE_LIST_ITEM_CLOSED:EF,EDITOR:xF,LIST_ITEM_CHECKBOX:SF,LIST_ITEM_MARKER_CONTAINER:wF,LIST_ITEM_WITH_CUSTOM_MARKER:bF,LIST_SPINE:MF,UL_LIST_CONTENT:kF});const TF="remirror-is-empty";var OF=Object.freeze({__proto__:null,IS_EMPTY:TF});const _F="remirror-editor",AF="remirror-positioner",NF="remirror-positioner-widget";var RF=Object.freeze({__proto__:null,EDITOR:_F,POSITIONER:AF,POSITIONER_WIDGET:NF});const PF="remirror-theme";function zF(e={}){const t=[],r={};function n(o,i){if(typeof i=="string"||typeof i=="number"){t.push(`${hw(o)}: ${i};`),r[hw(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,a]of Object.entries(i))n([...o,s],a)}for(const[o,i]of Object.entries(e))n([o],i);return{css:t.join(` -`),styles:r}}function LF(e){return e.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function hw(e){return`--rmr-${e.map(LF).join("-")}`}const Vn={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Wo="#000000",_y="#ffffff",IF="#252103",Ay=Jp(Wo,.75),Qh="#7963d2",Ny="#bcd263",DF="#fff",$F="#fff",Ry=Vn.gray[1],mw="rgba(10,31,68,0.08)",gw="rgba(10,31,68,0.10)",vw="rgba(10,31,68,0.12)",HF=Kf(Jp(Wo,.1),.13),Py={background:_y,border:Ay,foreground:Wo,muted:Ry,primary:Qh,secondary:Ny,primaryText:DF,secondaryText:$F,text:IF,faded:HF},BF={...Py,background:Qr(_y,.15),border:Qr(Ay,.15),foreground:Qr(Wo,.15),muted:Qr(Ry,.15),primary:Qr(Qh,.15),secondary:Qr(Ny,.15),get text(){return pl(this.background)},get primaryText(){return pl(this.primary)},get secondaryText(){return pl(this.secondary)}},FF={...Py,background:Qr(_y,.075),border:Qr(Ay,.075),foreground:Qr(Wo,.075),muted:Qr(Ry,.075),primary:Qr(Qh,.075),secondary:Qr(Ny,.075),get text(){return pl(this.background)},get primaryText(){return pl(this.primary)},get secondaryText(){return pl(this.secondary)}},gs={color:{...Py,active:BF,hover:FF,shadow1:mw,shadow2:gw,shadow3:vw,backdrop:Jp(Wo,.1),outline:Jp(Qh,.6),table:{default:{border:Kf(Wo,.8),cell:Kf(Wo,.4),controller:Vn.gray[3]},selected:{border:Vn.blue[7],cell:Vn.blue[1],controller:Vn.blue[5]},preselect:{border:Vn.blue[7],cell:Kf(Wo,.4),controller:Vn.blue[5]},predelete:{border:Vn.red[7],cell:Vn.red[1],controller:Vn.red[5]},mark:"#91919196"}},hue:Vn,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${mw}`,2:`0 1px 1px ${gw}`,3:`0 1px 1px ${vw}`}};var VF=Object.defineProperty,jF=Object.getOwnPropertyDescriptor,zy=(e,t,r,n)=>{for(var o=n>1?void 0:n?jF(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&VF(t,r,o),o},jM=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Tt=(e,t,r)=>(jM(e,t,"read from private field"),r?r.call(e):t.get(e)),No=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},di=(e,t,r,n)=>(jM(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Wc,Kc,Ha,qc,qf,Gc,Yc,Jc,Xc,Gf=class{constructor(e){No(this,Wc,Nh()),No(this,Kc,[]),No(this,Ha,new Map),No(this,qc,[]),No(this,qf,!1),No(this,Gc,void 0),No(this,Yc,void 0),No(this,Jc,void 0),No(this,Xc,void 0),this.addListener=(t,r)=>Tt(this,Wc).on(t,r),di(this,Gc,e),di(this,Yc,e.getActive),di(this,Xc,e.getPosition),di(this,Jc,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new Gf(e)}static fromPositioner(e,t){return Gf.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:Tt(this,Yc),getPosition:Tt(this,Xc),hasChanged:this.hasChanged,events:this.events,getID:Tt(this,Jc)}}onActiveChanged(e){this.recentUpdate=e;const t=Tt(this,Yc).call(this,e);di(this,Kc,t),di(this,Ha,new Map),di(this,qf,!1),di(this,qc,[]);const r=[];for(const[n,o]of t.entries()){const i=this.getID(o,n);Tt(this,qc).push(i),r.push({setElement:s=>this.addProps({...e,data:o,element:s},n),id:i,data:o})}Tt(this,Wc).emit("update",r)}getID(e,t){var r;return((r=Tt(this,Jc))==null?void 0:r.call(this,e,t))??t.toString()}addProps(e,t){if(Tt(this,qf)||(Tt(this,Ha).set(t,e),Tt(this,Ha).sizee;return this.clone(r=>({getActive:n=>r.getActive(n).filter(t)}))}},Qn=Gf;Wc=new WeakMap;Kc=new WeakMap;Ha=new WeakMap;qc=new WeakMap;qf=new WeakMap;Gc=new WeakMap;Yc=new WeakMap;Jc=new WeakMap;Xc=new WeakMap;Qn.EMPTY=[];function UF(e,t=qM){const{key:r}=(e==null?void 0:e.getMeta(KM))??{};return r===t}function UM(e){const{tr:t,state:r,previousState:n}=e;return!n||t&&UF(t)?!0:t?f6(t):!r.doc.eq(n.doc)||!r.selection.eq(n.selection)}function WM(e,t,r={}){const n=t.getBoundingClientRect(),{accountForPadding:o=!1}=r;let i=0,s=0,a=0,l=0;if(mt(t)&&o){const u=Number.parseFloat(ao(t,"padding-left").replace("px","")),d=Number.parseFloat(ao(t,"padding-right").replace("px","")),f=Number.parseFloat(ao(t,"padding-top").replace("px","")),p=Number.parseFloat(ao(t,"padding-bottom").replace("px","")),h=Number.parseFloat(ao(t,"border-left").replace("px","")),m=Number.parseFloat(ao(t,"border-right").replace("px","")),b=Number.parseFloat(ao(t,"border-top").replace("px","")),v=Number.parseFloat(ao(t,"border-bottom").replace("px","")),g=t.offsetWidth-t.clientWidth,y=t.offsetHeight-t.clientHeight;i+=u+h+(t.dir==="rtl"?g:0),s+=d+m+(t.dir==="rtl"?0:g),a+=f+b,l+=p+v+y}const c=new DOMRect(n.left+i,n.top+a,n.width-s,n.height-l);for(const[u,d]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(Lk(u,c.top,c.bottom)&&Lk(d,c.left,c.right))return!0;return!1}var WF="remirror-positioner-widget",KM="positionerUpdate",qM="__all_positioners__",GM={y:-999999,x:-999999,width:0,height:0},yw={...GM,left:-999999,top:-999999,bottom:-999999,right:-999999},Ly={...GM,rect:{...yw,toJSON:()=>yw},visible:!1},YM=Qn.create({hasChanged:UM,getActive(e){const{state:t}=e;if(!Tv(t)||t.selection.$anchor.depth>2)return Qn.EMPTY;const r=Ed({predicate:n=>n.type.isBlock,selection:t});return r?[r]:Qn.EMPTY},getPosition(e){const{view:t,data:r}=e,n=t.nodeDOM(r.pos);if(!mt(n))return Ly;const o=n.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,a=o.width,l=t.dom.scrollLeft+o.left-i.left,c=t.dom.scrollTop+o.top-i.top,u=WM(o,t.dom);return{y:c,x:l,height:s,width:a,rect:o,visible:u}}}),Iy=YM.clone(({getActive:e})=>({getActive:t=>{const[r]=e(t);return r&&Th(r.node)&&r.node.type===Mh(t.state.schema)?[r]:Qn.EMPTY}})),KF=Iy.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),qF=Iy.clone(({getPosition:e})=>({getPosition:t=>{const{width:r,x:n,y:o,height:i}=e(t);return{...e(t),width:1,x:r+n,rect:new DOMRect(r+n,o,1,i)}}}));function Dy(e){return Qn.create({hasChanged:UM,getActive:t=>{const{state:r,view:n}=t;if(!e(r)||!ls(r.selection))return Qn.EMPTY;try{const{head:o,anchor:i}=r.selection;return[{from:n.coordsAtPos(i),to:n.coordsAtPos(o)}]}catch{return Qn.EMPTY}},getPosition(t){const{element:r,data:n,view:o}=t,{from:i,to:s}=n,a=r.offsetParent??o.dom,l=a.getBoundingClientRect(),c=Math.abs(s.bottom-i.top),u=c>i.bottom-i.top,d=Math.min(i.left,s.left),f=Math.min(i.top,s.top),p=a.scrollLeft+(u?s.left-l.left:d-l.left),h=a.scrollTop+f-l.top,m=u?1:Math.abs(i.left-s.right),b=new DOMRect(u?s.left:d,f,m,c),v=WM(b,o.dom);return{rect:b,y:h,x:p,height:c,width:m,visible:v}}})}var JM=Dy(e=>!e.selection.empty),GF=Dy(e=>e.selection.empty),YF=Dy(()=>!0),JF=JM.clone(()=>({getActive:e=>{const{state:t,view:r}=e;if(!t.selection.empty)return Qn.EMPTY;const n=r5(t);if(!n)return Qn.EMPTY;try{return[{from:r.coordsAtPos(n.from),to:r.coordsAtPos(n.to)}]}catch{return Qn.EMPTY}}})),XF={selection:JM,cursor:GF,always:YF,block:YM,emptyBlock:Iy,emptyBlockStart:KF,emptyBlockEnd:qF,nearestWord:JF},zl=class extends je{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:RF.EDITOR}}init(){this.onScroll=kS(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return Ee.empty;const t=qe.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return Ee.create(e.doc,[t])}forceUpdatePositioners(e=qM){return({tr:t,dispatch:r})=>(r==null||r(t.setMeta(KM,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=WF,e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){const r=this.store.getState(),n=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:n,state:r,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};zy([G()],zl.prototype,"forceUpdatePositioners",1);zy([Ue()],zl.prototype,"getPositionerWidget",1);zl=zy([me({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],zl);function N0(e){return ne(e)?XF[e].clone():Pe(e)?e().clone():e.clone()}var QF=Object.defineProperty,ZF=Object.getOwnPropertyDescriptor,eV=(e,t,r,n)=>{for(var o=n>1?void 0:n?ZF(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&QF(t,r,o),o},R0=class extends Qt{get name(){return"text"}createTags(){return[oe.InlineNode]}createNodeSpec(){return{}}};R0=eV([me({disableExtraAttributes:!0,defaultPriority:De.Medium})],R0);var tV={...Pl.defaultOptions,...oa.defaultOptions,...So.defaultOptions,excludeExtensions:[]};function rV(e={}){e={...tV,...e};const{content:t,depth:r,getDispatch:n,getState:o,newGroupDelay:i,excludeExtensions:s}=e,a={};for(const c of s??[])a[c]=!0;const l=[];if(!a.history){const c=new So({depth:r,getDispatch:n,getState:o,newGroupDelay:i});l.push(c)}return a.doc||l.push(new Pl({content:t})),a.text||l.push(new R0),a.paragraph||l.push(new oa),a.positioner||l.push(new zl),a.gapCursor||l.push(new _0),a.events||l.push(new Gp),l}var nV=Object.defineProperty,oV=Object.getOwnPropertyDescriptor,iV=(e,t,r,n)=>{for(var o=n>1?void 0:n?oV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&nV(t,r,o),o},ia=class extends je{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Av(t.doc,{ignoreAttributes:!0})}),apply:(e,t,r,n)=>sV({pluginState:t,tr:e,extension:this,state:n})},props:{decorations:e=>aV({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=Or.EditorView&&this.store.updateAttributes()}};ia=iV([me({defaultOptions:{emptyNodeClass:OF.IS_EMPTY,placeholder:""}})],ia);function sV(e){const{pluginState:t,extension:r,tr:n,state:o}=e;return n.docChanged?{...r.options,empty:Av(o.doc)}:t}function aV(e){const{extension:t,state:r}=e,{empty:n}=t.pluginKey.getState(r),{emptyNodeClass:o,placeholder:i}=t.options;if(!n)return null;const s=[];return r.doc.descendants((a,l)=>{const c=qe.node(l,l+a.nodeSize,{class:o,"data-placeholder":i});s.push(c)}),Ee.create(r.doc,s)}var lV=Object.defineProperty,cV=Object.getOwnPropertyDescriptor,uV=(e,t,r,n)=>{for(var o=n>1?void 0:n?cV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&lV(t,r,o),o},dV={...ia.defaultOptions,...Xu.defaultOptions},fV=[...ia.staticKeys,...Xu.staticKeys],ed=class extends je{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(ia).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new ia({emptyNodeClass:e,placeholder:t,priority:De.Low}),new Xu({defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};ed=uV([me({defaultOptions:dV,staticKeys:fV})],ed);var XM={};Object.defineProperty(XM,"__esModule",{value:!0});function pV(){for(var e=[],t=0;t{if(!t.has(e))throw TypeError("Cannot "+r)},$g=(e,t,r)=>(QM(e,t,"read from private field"),r?r.call(e):t.get(e)),hV=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},mV=(e,t,r,n)=>(QM(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function gV(){const[,e]=S.useState(ee());return S.useCallback(()=>{e(ee())},[])}var ZM=S.createContext(null);function ii(e){const t=S.useContext(ZM),r=S.useRef(gV());te(t,{code:H.REACT_PROVIDER_CONTEXT});const{addHandler:n}=t;return S.useEffect(()=>{let o=e;if(o){if(ss(o)){const{autoUpdate:i}=o;o=i?()=>r.current():void 0}if(Pe(o))return n("updated",o)}},[n,e]),t}function jr(e=!0){return ii({autoUpdate:e}).active}function vV(e=!1){return ii(e?{autoUpdate:!0}:void 0).attrs}function Zl(){return ii().chain.new()}function Zt(){return ii().commands}function $y(){return ii({autoUpdate:!0}).getState().selection}function Pd(e,t=void 0,r){const{getExtension:n}=ii(),o=S.useMemo(()=>n(e),[e,n]);let i;if(Pe(t)?i=r?[o,...r]:[o,t]:i=t?[o,...Object.values(t)]:[],S.useEffect(()=>{Pe(t)||!t||o.setOptions(t)},i),S.useEffect(()=>{if(Pe(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function yV(e,t,r){const n=S.useCallback(({addHandler:o})=>o(t,r),[r,t]);return Pd(e,n)}function Zh(e=!1){return ii(e?{autoUpdate:!0}:void 0).helpers}var[bV,kV]=UI(({props:e})=>{const t=e.locale??"en",r=e.i18n??Jh,n=e.supportedLocales??[t],o=r._.bind(r);return{locale:t,i18n:r,supportedLocales:n,t:o}});function ww(e,t={}){const{core:r,react:n,...o}=t;return C8(e)?e:E8.create(()=>[...AS(e),new ed(n),...rV(r)],o)}function xV(e,t={}){const r=S.useRef(e),n=S.useRef(t),[o,i]=S.useState(()=>ww(e,t));return r.current=e,n.current=t,S.useEffect(()=>o.addHandler("destroy",()=>{i(()=>ww(r.current,n.current))}),[o]),o}var wV=typeof gr=="object"&&gr.__esModule&&gr.default?gr.default:gr,Ba,SV=class extends b8{constructor(e){if(super(e),hV(this,Ba,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,r)=>{this.rootPropsConfig.called=!0;const{refKey:n="ref",ref:o,...i}=t??ee();return{[n]:wV(o,this.onRef),key:this.uid,...i,children:r}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,te(this.rootPropsConfig.count<=1,{code:H.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),mV(this,Ba,t),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(ia).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new _P(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:r=!0,tr:n,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;te(i,{code:H.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),te(r,{code:H.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:n,transactions:o});return}!n&&!o&&(e=e.apply(e.tr.setMeta(Ak,{}))),this.view.updateState(e),r&&(o==null?void 0:o.length)!==0&&this.onChange({state:e,tr:n,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:n,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(Ak,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition==="start"?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){te($g(this,Ba),{code:H.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom($g(this,Ba),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&$g(this,Ba)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Ba=new WeakMap;var e3=typeof document<"u"?S.useLayoutEffect:S.useEffect;function EV(e){const t=S.useRef();return e3(()=>{t.current=e}),t.current}function CV(e){const{manager:t,state:r}=e,{placeholder:n,editable:o}=e;S.useRef(!0).current&&!Ki(n)&&t.getExtension(ed).setOptions({placeholder:n}),S.useEffect(()=>{n!=null&&t.getExtension(ed).setOptions({placeholder:n})},[n,t]);const[s]=S.useState(()=>{if(r)return r;const l=t.createEmptyDoc(),[c,u]=at(e.initialContent)?e.initialContent:[e.initialContent??l];return t.createState({content:c,selection:u})}),a=MV({initialEditorState:s,getProps:()=>e});return S.useEffect(()=>()=>{a.destroy()},[a]),S.useEffect(()=>{a.onUpdate()},[o,a]),TV(a),a.frameworkOutput}function MV(e){const t=S.useRef(e);t.current=e;const r=S.useMemo(()=>new SV(t.current),[]);return r.update(e),r}function TV(e){const{state:t}=e.props,r=S.useRef(!!t),n=EV(t);e3(()=>{const o=t?r.current===!0:r.current===!1;te(o,{code:H.REACT_CONTROLLED,message:r.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===n)&&e.updateControlledState(t,n??void 0)},[t,n,e])}function OV(e={}){const{content:t,document:r,selection:n,extensions:o,...i}=e,s=xV(o??(()=>[]),i),[a,l]=S.useState(()=>s.createState({selection:n,content:t??s.createEmptyDoc()})),c=S.useCallback(({state:d})=>{l(d)},[]),u=S.useCallback(()=>s.output,[s]);return S.useMemo(()=>({state:a,setState:l,manager:s,onChange:c,getContext:u}),[u,s,c,a])}var Sw={doc:!1,selection:!1,storedMark:!1};function _V(){const[e,t]=S.useState(Sw);return yV(xp,"applyState",S.useCallback(({tr:r})=>{const n={...Sw};r.docChanged&&(n.doc=!0),r.selectionSet&&(n.selection=!0),r.storedMarksSet&&(n.storedMark=!0),t(n)},[])),e}var P0=()=>I.createElement("div",{className:YB.EDITOR_WRAPPER,...ii().getRootProps()}),AV=e=>(e.hook(),null);function NV(e){const{children:t,autoRender:r,i18n:n,locale:o,supportedLocales:i,hooks:s=[],...a}=e,l=CV(a),c=$I(l.portalContainer),u=r==="start"||r===!0||!t&&Ki(r),d=r==="end";return I.createElement(bV,{i18n:n,locale:o,supportedLocales:i},I.createElement(ZM.Provider,{value:l},I.createElement(DI,{portals:c}),s.map((f,p)=>I.createElement(AV,{hook:f,key:p})),u&&I.createElement(P0,null),t,d&&I.createElement(P0,null)))}const RV={black:"#000",white:"#fff"},td=RV,PV={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ma=PV,zV={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ta=zV,LV={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Oa=LV,IV={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},_a=IV,DV={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Aa=DV,$V={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},vc=$V,HV={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},BV=HV;function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=t3(e[r])}),t}function sn(e,t,r={clone:!0}){const n=r.clone?_({},e):e;return Ho(e)&&Ho(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Ho(t[o])&&o in e&&Ho(e[o])?n[o]=sn(e[o],t[o],r):r.clone?n[o]=Ho(t[o])?t3(t[o]):t[o]:n[o]=t[o])}),n}function Ll(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[ko]=t,e[ed]=n,DM(e,t,!1,!1),t.stateNode=e;e:{switch(s=d0(r,n),r){case"dialog":nt("cancel",e),nt("close",e),o=n;break;case"iframe":case"object":case"embed":nt("load",e),o=n;break;case"video":case"audio":for(o=0;oVl&&(t.flags|=128,n=!0,Ec(i,!1),t.lanes=4194304)}else{if(!n)if(e=Jp(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ec(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!at)return lr(t),null}else 2*xt()-i.renderingStartTime>Vl&&r!==1073741824&&(t.flags|=128,n=!0,Ec(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xt(),t.sibling=null,r=ut.current,Ze(ut,n?r&1|2:r&1),t):(lr(t),null);case 22:case 23:return Hy(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?rn&1073741824&&(lr(t),t.subtreeFlags&6&&(t.flags|=8192)):lr(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function UI(e,t){switch(by(t),t.tag){case 1:return Br(t.type)&&Up(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bl(),ot(Hr),ot(mr),Oy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ty(t),null;case 13:if(ot(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));$l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ot(ut),null;case 4:return Bl(),null;case 10:return Sy(t.type._context),null;case 22:case 23:return Hy(),null;case 24:return null;default:return null}}var bf=!1,pr=!1,WI=typeof WeakSet=="function"?WeakSet:Set,Q=null;function ul(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){yt(e,t,n)}else r.current=null}function $0(e,t,r){try{r()}catch(n){yt(e,t,n)}}var gw=!1;function KI(e,t){if(x0=Bp,e=jC(),vy(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===o&&(a=s),f===i&&++u===n&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(w0={focusedElem:e,selectionRange:r},Bp=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Yn(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(k){yt(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=gw,gw=!1,h}function Cu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&$0(t,r,i)}o=o.next}while(o!==n)}}function im(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function H0(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function BM(e){var t=e.alternate;t!==null&&(e.alternate=null,BM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ko],delete t[ed],delete t[C0],delete t[OI],delete t[_I])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function FM(e){return e.tag===5||e.tag===3||e.tag===4}function vw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FM(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function B0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=jp));else if(n!==4&&(e=e.child,e!==null))for(B0(e,t,r),e=e.sibling;e!==null;)B0(e,t,r),e=e.sibling}function F0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(F0(e,t,r),e=e.sibling;e!==null;)F0(e,t,r),e=e.sibling}var Jt=null,Xn=!1;function yi(e,t,r){for(r=r.child;r!==null;)VM(e,t,r),r=r.sibling}function VM(e,t,r){if(Eo&&typeof Eo.onCommitFiberUnmount=="function")try{Eo.onCommitFiberUnmount(Jh,r)}catch{}switch(r.tag){case 5:pr||ul(r,t);case 6:var n=Jt,o=Xn;Jt=null,yi(e,t,r),Jt=n,Xn=o,Jt!==null&&(Xn?(e=Jt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Jt.removeChild(r.stateNode));break;case 18:Jt!==null&&(Xn?(e=Jt,r=r.stateNode,e.nodeType===8?Wg(e.parentNode,r):e.nodeType===1&&Wg(e,r),Yu(e)):Wg(Jt,r.stateNode));break;case 4:n=Jt,o=Xn,Jt=r.stateNode.containerInfo,Xn=!0,yi(e,t,r),Jt=n,Xn=o;break;case 0:case 11:case 14:case 15:if(!pr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&$0(r,t,s),o=o.next}while(o!==n)}yi(e,t,r);break;case 1:if(!pr&&(ul(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){yt(r,t,a)}yi(e,t,r);break;case 21:yi(e,t,r);break;case 22:r.mode&1?(pr=(n=pr)||r.memoizedState!==null,yi(e,t,r),pr=n):yi(e,t,r);break;default:yi(e,t,r)}}function yw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new WI),t.forEach(function(n){var o=t9.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Wn(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=s),n&=~i}if(n=o,n=xt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*GI(n/1960))-n,10e?16:e,Hi===null)var n=!1;else{if(e=Hi,Hi=null,rh=0,Ae&6)throw Error($(331));var o=Ae;for(Ae|=4,Q=e.current;Q!==null;){var i=Q,s=i.child;if(Q.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lxt()-Dy?Zs(e,0):Iy|=r),Fr(e,t)}function XM(e,t){t===0&&(e.mode&1?(t=uf,uf<<=1,!(uf&130023424)&&(uf=4194304)):t=1);var r=Sr();e=si(e,t),e!==null&&(Bd(e,t,r),Fr(e,r))}function e9(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),XM(e,r)}function t9(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(t),XM(e,r)}var JM;JM=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Hr.current)Ir=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ir=!1,VI(e,t,r);Ir=!!(e.flags&131072)}else Ir=!1,at&&t.flags&1048576&&eM(t,qp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Jf(e,t),e=t.pendingProps;var o=Dl(t,mr.current);xl(t,r),o=Ay(null,t,n,e,o,r);var i=Ry();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Br(n)?(i=!0,Wp(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Cy(t),o.updater=nm,t.stateNode=o,o._reactInternals=t,R0(t,n,e,r),t=z0(null,t,n,!0,i,r)):(t.tag=0,at&&i&&yy(t),br(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Jf(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=n9(n),e=Yn(n,e),o){case 0:t=P0(null,t,n,e,r);break e;case 1:t=pw(null,t,n,e,r);break e;case 11:t=dw(null,t,n,e,r);break e;case 14:t=fw(null,t,n,Yn(n.type,e),r);break e}throw Error($(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Yn(n,o),P0(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Yn(n,o),pw(e,t,n,o,r);case 3:e:{if(zM(t),e===null)throw Error($(387));n=t.pendingProps,i=t.memoizedState,o=i.element,oM(e,t),Xp(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Fl(Error($(423)),t),t=hw(e,t,n,r,o);break e}else if(n!==o){o=Fl(Error($(424)),t),t=hw(e,t,n,r,o);break e}else for(un=Gi(t.stateNode.containerInfo.firstChild),dn=t,at=!0,Qn=null,r=lM(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($l(),n===o){t=ai(e,t,r);break e}br(e,t,n,r)}t=t.child}return t;case 5:return cM(t),e===null&&O0(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,S0(n,o)?s=null:i!==null&&S0(n,i)&&(t.flags|=32),PM(e,t),br(e,t,s,r),t.child;case 6:return e===null&&O0(t),null;case 13:return LM(e,t,r);case 4:return My(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Hl(t,null,n,r):br(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Yn(n,o),dw(e,t,n,o,r);case 7:return br(e,t,t.pendingProps,r),t.child;case 8:return br(e,t,t.pendingProps.children,r),t.child;case 12:return br(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ze(Gp,n._currentValue),n._currentValue=s,i!==null)if(ao(i.value,s)){if(i.children===o.children&&!Hr.current){t=ai(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ti(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),_0(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error($(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),_0(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}br(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,xl(t,r),o=Ln(o),n=n(o),t.flags|=1,br(e,t,n,r),t.child;case 14:return n=t.type,o=Yn(n,t.pendingProps),o=Yn(n.type,o),fw(e,t,n,o,r);case 15:return RM(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Yn(n,o),Jf(e,t),t.tag=1,Br(n)?(e=!0,Wp(t)):e=!1,xl(t,r),sM(t,n,o),R0(t,n,o,r),z0(null,t,n,!0,e,r);case 19:return IM(e,t,r);case 22:return NM(e,t,r)}throw Error($(156,t.tag))};function QM(e,t){return EC(e,t)}function r9(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,r,n){return new r9(e,t,r,n)}function Fy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function n9(e){if(typeof e=="function")return Fy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sy)return 11;if(e===ay)return 14}return 2}function Qi(e,t){var r=e.alternate;return r===null?(r=_n(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ep(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")Fy(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case tl:return ea(r.children,o,i,t);case iy:s=8,o|=8;break;case t0:return e=_n(12,r,t,o|2),e.elementType=t0,e.lanes=i,e;case r0:return e=_n(13,r,t,o),e.elementType=r0,e.lanes=i,e;case n0:return e=_n(19,r,t,o),e.elementType=n0,e.lanes=i,e;case aC:return am(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iC:s=10;break e;case sC:s=9;break e;case sy:s=11;break e;case ay:s=14;break e;case _i:s=16,n=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=_n(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function ea(e,t,r,n){return e=_n(7,e,n,t),e.lanes=r,e}function am(e,t,r,n){return e=_n(22,e,n,t),e.elementType=aC,e.lanes=r,e.stateNode={isHidden:!1},e}function Zg(e,t,r){return e=_n(6,e,null,t),e.lanes=r,e}function e1(e,t,r){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o9(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zg(0),this.expirationTimes=zg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zg(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vy(e,t,r,n,o,i,s,a,l){return e=new o9(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=_n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cy(i),e}function i9(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r3)}catch(e){console.error(e)}}r3(),eC.exports=vn;var fm=eC.exports;const wf=Po(fm);var u9=Object.defineProperty,d9=Object.getOwnPropertyDescriptor,f9=(e,t,r,n)=>{for(var o=n>1?void 0:n?d9(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&u9(t,r,o),o},n3=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ne=(e,t,r)=>(n3(e,t,"read from private field"),r?r.call(e):t.get(e)),tn=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Zr=(e,t,r,n)=>(n3(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),qc,p9=class{constructor(){this.portals=new Map,tn(this,qc,Gh()),this.on=e=>ne(this,qc).on("update",e),this.once=e=>{const t=ne(this,qc).on("update",r=>{t(),e(r)});return t}}update(){ne(this,qc).emit("update",this.portals)}render({Component:e,container:t}){const r=this.portals.get(t);this.portals.set(t,{Component:e,key:(r==null?void 0:r.key)??Tl()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:Tl()})}remove(e){this.portals.delete(e),this.update()}};qc=new WeakMap;var h9=e=>{const{portals:t}=e;return I.createElement(I.Fragment,null,t.map(([r,{Component:n,key:o}])=>fm.createPortal(I.createElement(n,null),r,o)))};function m9(e){const[t,r]=S.useState(()=>Array.from(e.portals.entries()));return S.useEffect(()=>e.on(n=>{r(Array.from(n.entries()))}),[e]),S.useMemo(()=>t,[t])}var ct,Gc,Rs,Yc,tp,Xc,Ga,Jc,rp,Fo,yr,K0,o3=class{constructor({getPosition:e,node:t,portalContainer:r,view:n,ReactComponent:o,options:i}){tn(this,ct,void 0),tn(this,Gc,[]),tn(this,Rs,void 0),tn(this,Yc,void 0),tn(this,tp,void 0),tn(this,Xc,void 0),tn(this,Ga,void 0),tn(this,Jc,!1),tn(this,rp,void 0),tn(this,Fo,void 0),tn(this,yr,void 0),tn(this,K0,l=>{l&&(re(ne(this,Fo),{code:H.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${ne(this,ct).type.name}' which doesn't support content.`}),l.append(ne(this,Fo)))}),this.Component=()=>{const l=ne(this,tp);return re(l,{code:H.REACT_NODE_VIEW,message:`The custom react node view provided for ${ne(this,ct).type.name} doesn't have a valid ReactComponent`}),I.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:ne(this,Rs),getPosition:ne(this,Xc),node:ne(this,ct),forwardRef:ne(this,K0),decorations:ne(this,Gc)})},this.updateAttributes=l=>{if(!ne(this,Rs).editable)return;const c=ne(this,Xc).call(this);if(c==null)return;const u=ne(this,Rs).state.tr.setNodeMarkup(c,void 0,{...ne(this,ct).attrs,...l});ne(this,Rs).dispatch(u)},re(Le(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Zr(this,ct,t),Zr(this,Rs,n),Zr(this,Yc,r),Zr(this,tp,o),Zr(this,Xc,e),Zr(this,Ga,i),Zr(this,yr,this.createDom());const{contentDOM:s,wrapper:a}=this.createContentDom()??{};Zr(this,rp,s??void 0),Zr(this,Fo,a),ne(this,Fo)&&ne(this,yr).append(ne(this,Fo)),this.setDomAttributes(ne(this,ct),ne(this,yr)),this.Component.displayName=WS(`${ne(this,ct).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:r,options:n}=e;return(o,i,s)=>new o3({options:n,node:o,view:i,getPosition:s,portalContainer:t,ReactComponent:r})}get selected(){return ne(this,Jc)}get contentDOM(){return ne(this,rp)}get dom(){return ne(this,yr)}renderComponent(){ne(this,Yc).render({Component:this.Component,container:ne(this,yr)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=ne(this,Ga),r=ne(this,ct).isInline?document.createElement(t):document.createElement(e);return r.classList.add(`${tx(ne(this,ct).type.name)}-node-view-wrapper`),r}createContentDom(){var e,t;if(ne(this,ct).isLeaf)return;const r=(t=(e=ne(this,ct).type.spec).toDOM)==null?void 0:t.call(e,ne(this,ct));if(!r)return;const{contentDOM:n,dom:o}=cn.renderSpec(document,r);let i;if(kt(o))return i=o,o===n&&(i=document.createElement("span"),i.classList.add(`${tx(ne(this,ct).type.name)}-node-view-content-wrapper`),i.append(n)),kt(n),{wrapper:i,contentDOM:n}}update(e,t){return Vh({types:ne(this,ct).type,node:e})?(ne(this,ct)===e&&ne(this,Gc)===t||(ne(this,ct).sameMarkup(e)||this.setDomAttributes(e,ne(this,yr)),Zr(this,ct,e),Zr(this,Gc,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:r}=ne(this,ct).type.spec;let n=e.attrs;if(r){const o=r(e);if(oe(o)||g9(o))return;hs(o[1])&&(n=o[1])}for(const[o,i]of Lt(n))t.setAttribute(o,i)}selectNode(){Zr(this,Jc,!0),ne(this,yr)&&ne(this,yr).classList.add(Jk),this.renderComponent()}deselectNode(){Zr(this,Jc,!1),ne(this,yr)&&ne(this,yr).classList.remove(Jk),this.renderComponent()}destroy(){ne(this,Yc).remove(ne(this,yr))}ignoreMutation(e){return e.type==="selection"?!ne(this,ct).type.spec.selectable:ne(this,Fo)?!ne(this,Fo).contains(e.target):!0}stopEvent(e){var t;if(!ne(this,yr))return!1;if(Le(ne(this,Ga).stopEvent))return ne(this,Ga).stopEvent({event:e});const r=e.target;if(!(ne(this,yr).contains(r)&&!((t=this.contentDOM)!=null&&t.contains(r))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const s=!!ne(this,ct).type.spec.draggable,a=de.isSelectable(ne(this,ct)),l=e.type==="copy",c=e.type==="paste",u=e.type==="cut",d=e.type==="mousedown",f=e.type.startsWith("drag");return!s&&a&&f&&e.preventDefault(),!(f||o||l||c||u||d&&a)}},Mw=o3;ct=new WeakMap;Gc=new WeakMap;Rs=new WeakMap;Yc=new WeakMap;tp=new WeakMap;Xc=new WeakMap;Ga=new WeakMap;Jc=new WeakMap;rp=new WeakMap;Fo=new WeakMap;yr=new WeakMap;K0=new WeakMap;function g9(e){return Ap(e)||hs(e)&&Ap(e.dom)}var ad=class extends Ge{constructor(){super(...arguments),this.portalContainer=new p9}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=te(),t=this.store.managerSettings.nodeViewComponents??{};for(const n of this.store.extensions)!n.ReactComponent||!$d(n)||n.reactComponentEnvironment==="ssr"||(e[n.name]=Mw.create({options:this.options,ReactComponent:n.ReactComponent,portalContainer:this.portalContainer}));const r=Lt({...this.options.nodeViewComponents,...t});for(const[n,o]of r)e[n]=Mw.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};ad=f9([ve({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ad);function v9(e){const t=S.createContext(null),r=y9(t);return[o=>{const i=e(o);return I.createElement(t.Provider,{value:i},o.children)},r,t]}function y9(e){return(t,r)=>{const n=S.useContext(e),o=b9(n);if(!n)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return n;if(typeof t!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=t(n);if(!o||!r)return i;const s=t(o);return r(s,i)?s:i}}function b9(e){const t=S.useRef();return k9(()=>{t.current=e}),t.current}var k9=typeof document<"u"?S.useLayoutEffect:S.useEffect;function x9(e,t){return v9(r=>{const n=S.useRef(null),o=S.useRef(),i=t==null?void 0:t(r),[s,a]=S.useState(()=>e({get:Tw(n),set:Ow(o),previousContext:void 0,props:r,state:i})),l=[...Object.values(r),i];return S.useEffect(()=>{l.length!==0&&a(c=>e({get:Tw(n),set:Ow(o),previousContext:c,props:r,state:i}))},l),n.current=s,o.current=a,s})}function Tw(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function Ow(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(r=>({...r,...typeof t=="function"?t(r):t}))}}var i3={},s3={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])})(s3);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=s3;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function r(p){return!p.match(/[^a-f0-9]/i)?parseInt(p,16):NaN}function n(p,h,m){const b=r(p);if(Number.isNaN(b)||m!==void 0&&m!==p.length)throw new SyntaxError(t.errorMessages.get(h));return b}function o(p){const h=n(p,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(h)}function i(p,h){const m=n(p,t.ErrorType.MalformedUnicode,4);if(h!==void 0){const b=n(h,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,b)}return String.fromCharCode(m)}function s(p){return p.charAt(0)==="{"&&p.charAt(p.length-1)==="}"}function a(p){if(!s(p))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const h=p.slice(1,-1),m=n(h,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(b){throw b instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):b}}function l(p,h=!1){if(h)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const m=parseInt(p,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",` +`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(p){return c.get(p)||p}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function f(p,h=!1){return p.replace(d,function(m,b,v,g,y,k,x,w,E){if(b!==void 0)return"\\";if(v!==void 0)return o(v);if(g!==void 0)return a(g);if(y!==void 0)return i(y,k);if(x!==void 0)return i(x);if(w==="0")return"\0";if(w!==void 0)return l(w,!h);if(E!==void 0)return u(E);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=f,e.default=f})(i3);const w9=Po(i3),Jo=e=>typeof e=="string",S9=e=>typeof e=="function",_w=new Map;function Ky(e){return[...Array.isArray(e)?e:[e],"en"]}function a3(e,t,r){const n=Ky(e);return ih(()=>sh("date",n,r),()=>new Intl.DateTimeFormat(n,r)).format(Jo(t)?new Date(t):t)}function q0(e,t,r){const n=Ky(e);return ih(()=>sh("number",n,r),()=>new Intl.NumberFormat(n,r)).format(t)}function Aw(e,t,r,{offset:n=0,...o}){const i=Ky(e),s=t?ih(()=>sh("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):ih(()=>sh("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[r]??o[s.select(r-n)]??o.other}function ih(e,t){const r=e();let n=_w.get(r);return n||(n=t(),_w.set(r,n)),n}function sh(e,t,r){const n=t.join("-");return`${e}-${n}-${JSON.stringify(r)}`}const l3=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,E9=(e,t,r={})=>{t=t||e;const n=i=>Jo(i)?r[i]||{style:i}:i,o=(i,s)=>{const a=Object.keys(r).length?n("number"):{},l=q0(t,i,a);return s.replace("#",l)};return{plural:(i,s)=>{const{offset:a=0}=s,l=Aw(t,!1,i,s);return o(i-a,l)},selectordinal:(i,s)=>{const{offset:a=0}=s,l=Aw(t,!0,i,s);return o(i-a,l)},select:(i,s)=>s[i]??s.other,number:(i,s)=>q0(t,i,n(s)),date:(i,s)=>a3(t,i,n(s)),undefined:i=>i}};function C9(e,t,r){return(n,o={})=>{const i=E9(t,r,o),s=l=>Array.isArray(l)?l.reduce((c,u)=>{if(Jo(u))return c+u;const[d,f,p]=u;let h={};p!=null&&!Jo(p)?Object.keys(p).forEach(b=>{h[b]=s(p[b])}):h=p;const m=i[f](n[d],h);return m==null?c:c+m},""):l,a=s(e);return Jo(a)&&l3.test(a)?w9(a.trim()):Jo(a)?a.trim():a}}var M9=Object.defineProperty,T9=(e,t,r)=>t in e?M9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O9=(e,t,r)=>(T9(e,typeof t!="symbol"?t+"":t,r),r);class _9{constructor(){O9(this,"_events",{})}on(t,r){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(r),()=>this.removeListener(t,r)}removeListener(t,r){if(!this._hasEvent(t))return;const n=this._events[t].indexOf(r);~n&&this._events[t].splice(n,1)}emit(t,...r){this._hasEvent(t)&&this._events[t].map(n=>n.apply(this,r))}_hasEvent(t){return Array.isArray(this._events[t])}}var A9=Object.defineProperty,R9=(e,t,r)=>t in e?A9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,La=(e,t,r)=>(R9(e,typeof t!="symbol"?t+"":t,r),r);class N9 extends _9{constructor(t){super(),La(this,"_locale"),La(this,"_locales"),La(this,"_localeData"),La(this,"_messages"),La(this,"_missing"),La(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,r){this._localeData[t]==null?this._localeData[t]=r:Object.assign(this._localeData[t],r)}loadLocaleData(t,r){r!=null?this._loadLocaleData(t,r):Object.keys(t).forEach(n=>this._loadLocaleData(n,t[n])),this.emit("change")}_load(t,r){this._messages[t]==null?this._messages[t]=r:Object.assign(this._messages[t],r)}load(t,r){r!=null?this._load(t,r):Object.keys(t).forEach(n=>this._load(n,t[n])),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:n}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=n,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r={},{message:n,formats:o}={}){Jo(t)||(r=t.values||r,n=t.message,t=t.id);const i=!this.messages[t],s=this._missing;if(s&&i)return S9(s)?s(this._locale,t):s;i&&this.emit("missing",{id:t,locale:this._locale});let a=this.messages[t]||n||t;return Jo(a)&&l3.test(a)?JSON.parse(`"${a}"`):Jo(a)?a:C9(a,this._locale,this._locales)(r,o)}date(t,r){return a3(this._locales||this._locale,t,r)}number(t,r){return q0(this._locales||this._locale,t,r)}}function P9(e={}){return new N9(e)}const pm=P9();function U(e,t){return t?"other":e==1?"one":"other"}function fi(e,t){return t?"other":e==0||e==1?"one":"other"}function qr(e,t){var r=String(e).split("."),n=!r[1];return t?"other":e==1&&n?"one":"other"}function $e(e,t){return"other"}function xs(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const z9=$e,L9=U,I9=fi;function D9(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const $9=U;function H9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function B9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function F9(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const V9=U,j9=qr;function U9(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-1),i=n.slice(-2),s=n.slice(-3);return t?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||s==100||s==200||s==300||s==400||s==500||s==600||s==700||s==800||s==900?"few":n==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function W9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":n&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const K9=U,q9=U,G9=U,Y9=fi,X9=$e;function J9(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const Q9=$e;function Z9(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2),s=n&&r[0].slice(-6);return t?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&n&&s==0?"many":"other"}const eD=U;function tD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function rD(e,t){var r=String(e).split("."),n=!r[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&n?"one":"other"}const nD=U;function oD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const iD=U,sD=U,aD=U;function lD(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function cD(e,t){return t?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other"}function uD(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e;return t?"other":e==1||!o&&(n==0||n==1)?"one":"other"}const dD=qr;function fD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}const pD=U,hD=$e,mD=U,gD=U;function vD(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":e==1&&n?"one":"other"}const yD=U,bD=U,kD=qr,xD=U;function wD(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function SD(e,t){return t?"other":e>=0&&e<2?"one":"other"}const ED=qr;function CD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const MD=U;function TD(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const OD=U,_D=qr;function AD(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":n&&e>=3&&e<=6?"few":n&&e>=7&&e<=10?"many":"other"}function RD(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":n&&e>=3&&e<=10||n&&e>=13&&e<=19?"few":"other"}const ND=qr,PD=U;function zD(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const LD=fi;function ID(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(s==0||s==20||s==40||s==60||s==80)?"few":o?"other":"many"}const DD=U,$D=U;function HD(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}function BD(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}function FD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function VD(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&s==1||a==1?"one":i&&s==2||a==2?"two":i&&(s==3||s==4)||a==3||a==4?"few":"other"}function jD(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function UD(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const WD=qr,KD=$e,qD=$e,GD=$e,YD=qr;function XD(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e,i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11||!o?"one":"other"}function JD(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const QD=xs;function ZD(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":e==1&&o?"one":n==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}const e$=$e,t$=$e,r$=U,n$=qr,o$=U,i$=$e,s$=$e;function a$(e,t){var r=String(e).split("."),n=r[0],o=n.slice(-2);return t?n==1?"one":n==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function l$(e,t){return t?"other":e>=0&&e<2?"one":"other"}const c$=U,u$=U,d$=$e,f$=$e;function p$(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||n&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const h$=U,m$=U,g$=$e;function v$(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const y$=$e,b$=U,k$=U;function x$(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const w$=U;function S$(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2),i=n&&r[0].slice(-3),s=n&&r[0].slice(-5),a=n&&r[0].slice(-6);return t?n&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":e==5||o==5?"many":"other":e==0?"zero":e==1?"one":o==2||o==22||o==42||o==62||o==82||n&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||e!=0&&a==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":e!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const E$=U;function C$(e,t){var r=String(e).split("."),n=r[0];return t?"other":e==0?"zero":(n==0||n==1)&&e!=0?"one":"other"}const M$=U,T$=U,O$=$e,_$=fi;function A$(e,t){return t&&e==1?"one":"other"}function R$(e,t){var r=String(e).split("."),n=r[1]||"",o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":n!=0?"many":"other"}function N$(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const P$=U,z$=fi,L$=U;function I$(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?s==1&&a!=11?"one":s==2&&a!=12?"two":(s==7||s==8)&&a!=17&&a!=18?"many":"other":i&&s==1&&a!=11||l==1&&c!=11?"one":"other"}const D$=U,$$=U;function H$(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}function B$(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function F$(e,t){return t&&e==1?"one":"other"}function V$(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const j$=$e,U$=U,W$=xs,K$=U,q$=U;function G$(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?n&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const Y$=qr,X$=U,J$=U,Q$=U,Z$=$e,e7=U,t7=fi,r7=U,n7=U,o7=U;function i7(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?e==1||e==5||n&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const s7=U,a7=$e,l7=fi,c7=U;function u7(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&n!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function d7(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&s==0||a>=11&&a<=19||o==2&&l>=11&&l<=19?"zero":s==1&&a!=11||o==2&&c==1&&l!=11||o!=2&&c==1?"one":"other"}const f7=U;function p7(e,t){var r=String(e).split("."),n=r[0];return t?"other":n==0||n==1?"one":"other"}const h7=qr,m7=U;function g7(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-2);return t?e==1?"one":"other":e==1&&n?"one":!n||e==0||i>=2&&i<=19?"few":"other"}const v7=U,y7=$e;function b7(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&i==1&&s!=11?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"}const k7=U,x7=$e,w7=U;function S7(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}function E7(e,t){var r=String(e).split("."),n=!r[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"}const C7=U,M7=U,T7=xs,O7=U,_7=$e,A7=$e;function R7(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function N7(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e>=0&&e<=1?"one":n&&e>=2&&e<=10?"few":"other"}function P7(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"";return t?"other":e==0||e==1||n==0&&o==1?"one":"other"}function z7(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":e==1&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"}function L7(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const I7=xs,D7=xs,$7=xs,H7=xs,B7=xs,F7=U,V7=U;function j7(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function U7(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&s==1&&a!=11||l==1&&c!=11?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const W7=U,K7=U,q7=U,G7=$e;function Y7(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?(i==1||i==2)&&s!=11&&s!=12?"one":"other":e==1&&n?"one":"other"}const X7=qr,J7=U,Q7=U,Z7=U,eH=U,tH=$e,rH=fi,nH=U;function oH(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function iH(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&s!=4&&s!=6&&s!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const sH=U,aH=$e,lH=U,cH=U;function uH(e,t){var r=String(e).split("."),n=Number(r[0])==e;return t?"other":e==0||e==1||n&&e>=11&&e<=99?"one":"other"}const dH=U;function fH(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-1),c=n.slice(-2);return t?s==3&&a!=13?"few":"other":o&&l==1&&c!=11?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&l==0||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"}const pH=qr,hH=U,mH=U;function gH(e,t){return t&&e==1?"one":"other"}const vH=U,yH=U,bH=fi,kH=U,xH=$e,wH=U,SH=U,EH=qr,CH=$e,MH=$e,TH=$e;function OH(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const _H=Object.freeze(Object.defineProperty({__proto__:null,_in:z9,af:L9,ak:I9,am:D9,an:$9,ar:H9,ars:B9,as:F9,asa:V9,ast:j9,az:U9,be:W9,bem:K9,bez:q9,bg:G9,bho:Y9,bm:X9,bn:J9,bo:Q9,br:Z9,brx:eD,bs:tD,ca:rD,ce:nD,ceb:oD,cgg:iD,chr:sD,ckb:aD,cs:lD,cy:cD,da:uD,de:dD,dsb:fD,dv:pD,dz:hD,ee:mD,el:gD,en:vD,eo:yD,es:bD,et:kD,eu:xD,fa:wD,ff:SD,fi:ED,fil:CD,fo:MD,fr:TD,fur:OD,fy:_D,ga:AD,gd:RD,gl:ND,gsw:PD,gu:zD,guw:LD,gv:ID,ha:DD,haw:$D,he:HD,hi:BD,hr:FD,hsb:VD,hu:jD,hy:UD,ia:WD,id:KD,ig:qD,ii:GD,io:YD,is:XD,it:JD,iu:QD,iw:ZD,ja:e$,jbo:t$,jgo:r$,ji:n$,jmc:o$,jv:i$,jw:s$,ka:a$,kab:l$,kaj:c$,kcg:u$,kde:d$,kea:f$,kk:p$,kkj:h$,kl:m$,km:g$,kn:v$,ko:y$,ks:b$,ksb:k$,ksh:x$,ku:w$,kw:S$,ky:E$,lag:C$,lb:M$,lg:T$,lkt:O$,ln:_$,lo:A$,lt:R$,lv:N$,mas:P$,mg:z$,mgo:L$,mk:I$,ml:D$,mn:$$,mo:H$,mr:B$,ms:F$,mt:V$,my:j$,nah:U$,naq:W$,nb:K$,nd:q$,ne:G$,nl:Y$,nn:X$,nnh:J$,no:Q$,nqo:Z$,nr:e7,nso:t7,ny:r7,nyn:n7,om:o7,or:i7,os:s7,osa:a7,pa:l7,pap:c7,pl:u7,prg:d7,ps:f7,pt:p7,pt_PT:h7,rm:m7,ro:g7,rof:v7,root:y7,ru:b7,rwk:k7,sah:x7,saq:w7,sc:S7,scn:E7,sd:C7,sdh:M7,se:T7,seh:O7,ses:_7,sg:A7,sh:R7,shi:N7,si:P7,sk:z7,sl:L7,sma:I7,smi:D7,smj:$7,smn:H7,sms:B7,sn:F7,so:V7,sq:j7,sr:U7,ss:W7,ssy:K7,st:q7,su:G7,sv:Y7,sw:X7,syr:J7,ta:Q7,te:Z7,teo:eH,th:tH,ti:rH,tig:nH,tk:oH,tl:iH,tn:sH,to:aH,tr:lH,ts:cH,tzm:uH,ug:dH,uk:fH,ur:pH,uz:hH,ve:mH,vi:gH,vo:vH,vun:yH,wa:bH,wae:kH,wo:xH,xh:wH,xog:SH,yi:EH,yo:CH,yue:MH,zh:TH,zu:OH},Symbol.toStringTag,{value:"Module"}));var AH=Object.defineProperty,RH=Object.getOwnPropertyDescriptor,NH=Object.getOwnPropertyNames,PH=Object.prototype.hasOwnProperty,Rw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of NH(t))!PH.call(e,o)&&o!==r&&AH(e,o,{get:()=>t[o],enumerable:!(n=RH(t,o))||n.enumerable});return e},zH=(e,t,r)=>(Rw(e,t,"default"),r&&Rw(r,t,"default")),LH=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),c3={};zH(c3,_H);pm.loadLocaleData("en",{plurals:c3.en});pm.load("en",LH);pm.activate("en");var IH=Object.defineProperty,DH=Object.getOwnPropertyDescriptor,qy=(e,t,r,n)=>{for(var o=n>1?void 0:n?DH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&IH(t,r,o),o},jl=class extends nr{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:r,content:n}=this.options,o=te();if(hs(r))for(const[i,s]of Lt(r))o[i]={default:s};else for(const i of r)o[i]={default:null};return{attrs:o,content:n,...t}}setDocAttributes(e){return({tr:t,dispatch:r})=>{if(r){for(const[n,o]of Object.entries(e))t.step(new ld(n,o));r(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return Jv(e.doc,t)}};qy([Y()],jl.prototype,"setDocAttributes",1);qy([Ye()],jl.prototype,"isDefaultDocNode",1);jl=qy([ve({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:Ve.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],jl);var u3="SetDocAttribute",d3="RevertSetDocAttribute",ld=class extends Dt{constructor(e,t,r=u3){super(),this.stepType=r,this.key=e,this.value=t}static fromJSON(e,t){return new ld(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return wt.ok(e.type.create(t,e.content,e.marks))}invert(){return new ld(this.key,this.previous,d3)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{Dt.jsonID(u3,ld),Dt.jsonID(d3,ld)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var $H=Object.defineProperty,HH=Object.getOwnPropertyDescriptor,f3=(e,t,r,n)=>{for(var o=n>1?void 0:n?HH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$H(t,r,o),o};function BH(e,t,r,n){const o=e.docView.posFromDOM(t,r,n);return o===null||o<0?null:o}function FH(e,t){const r=t.target;if(r){const n=BH(e,r,0);if(n!==null){const o=e.state.doc.resolve(n),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:n,inside:s}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var ah=class extends Ge{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,r)=>{const n=r,o=FH(t,n);if(!o)return!1;const i=[],s=[],{inside:a,pos:l}=o;if(a===-1)return!1;const c=t.state.doc.resolve(l),u=c.depth+1;for(const d of Av(u,1))i.push({node:d>c.depth&&c.nodeAfter?c.nodeAfter:c.node(d),pos:c.before(d)});for(const{type:d}of c.marksAcross(c)??[]){const f=ni(c,d);f&&s.push(f)}return e(n,{view:t,nodes:i,marks:s,getMark:d=>{const f=oe(d)?t.state.schema.marks[d]:d;return re(f,{code:H.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(p=>p.mark.type===f)},getNode:d=>{var f;const p=oe(d)?t.state.schema.nodes[d]:d;re(p,{code:H.EXTENSION,message:"The node being checked does not exist"});const h=i.find(({node:m})=>m.type===p);if(h)return{...h,isRoot:!!((f=i[0])!=null&&f.node.eq(h.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const r of this.store.extensions){if(!r.createEventHandlers||(t=r.options.exclude)!=null&&t.clickHandler)continue;const n=r.createEventHandlers();for(const[o,i]of Lt(n))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(r,n,o,i,s,a,l,c)=>{const u=this.store.currentState,{schema:d,doc:f}=u,p=f.resolve(i),h=e.has(l),m=VH({$pos:p,handled:h,view:o,state:u});let b=!1;h||(b=r(l,m)||b);const v={...m,pos:i,direct:c,nodeWithPosition:{node:s,pos:a},getNode:g=>{const y=oe(g)?d.nodes[g]:g;return re(y,{code:H.EXTENSION,message:"The node being checked does not exist"}),y===s.type?{node:s,pos:a}:void 0}};return e.set(l,!0),n(l,v)||b};return{props:{handleKeyPress:(r,n)=>this.options.keypress(n)||!1,handleKeyDown:(r,n)=>this.options.keydown(n)||!1,handleTextInput:(r,n,o,i)=>this.options.textInput({from:n,to:o,text:i})||!1,handleClickOn:(r,n,o,i,s,a)=>t(this.options.clickMark,this.options.click,r,n,o,i,s,a),handleDoubleClickOn:(r,n,o,i,s,a)=>t(this.options.doubleClickMark,this.options.doubleClick,r,n,o,i,s,a),handleTripleClickOn:(r,n,o,i,s,a)=>t(this.options.tripleClickMark,this.options.tripleClick,r,n,o,i,s,a),handleDOMEvents:{focus:(r,n)=>this.options.focus(n)||!1,blur:(r,n)=>this.options.blur(n)||!1,mousedown:(r,n)=>(this.startMouseover(),this.options.mousedown(n)||!1),mouseup:(r,n)=>(this.endMouseover(),this.options.mouseup(n)||!1),mouseleave:(r,n)=>(this.mouseover=!1,this.options.mouseleave(n)||!1),mouseenter:(r,n)=>(this.mouseover=!0,this.options.mouseenter(n)||!1),keyup:(r,n)=>this.options.keyup(n)||!1,mouseout:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!1};return this.options.hover(r,o)||!1}),mouseover:this.createMouseEventHandler((r,n)=>{const o={...n,hovering:!0};return this.options.hover(r,o)||!1}),contextmenu:this.createMouseEventHandler((r,n)=>this.options.contextmenu(r,n)||!1),scroll:(r,n)=>this.options.scroll(n)||!1,copy:(r,n)=>this.options.copy(n)||!1,cut:(r,n)=>this.options.cut(n)||!1,paste:(r,n)=>this.options.paste(n)||!1}},view:r=>{let n=r.editable;const o=this.options;return{update(i){const s=i.editable;s!==n&&(o.editable(s),n=s)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};f3([Ye()],ah.prototype,"isInteracting",1);ah=f3([ve({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:Ve.High})],ah);function VH(e){const{handled:t,view:r,$pos:n,state:o}=e,i={getMark:ZS,markRanges:[],view:r,state:o};if(t)return i;for(const{type:s}of n.marksAcross(n)??[]){const a=ni(n,s);a&&i.markRanges.push(a)}return i.getMark=s=>{const a=oe(s)?o.schema.marks[s]:s;return re(a,{code:H.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(l=>l.mark.type===a)},i}class bt extends xe{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return bt.valid(n)?new bt(n):xe.near(n)}content(){return W.empty}eq(t){return t instanceof bt&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new bt(t.resolve(r.pos))}getBookmark(){return new Gy(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!jH(t)||!UH(t))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let o=r.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,r,n=!1){e:for(;;){if(!n&&bt.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(r>0?t.indexAfter(s)0){i=a.child(r>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=r;let l=t.doc.resolve(o);if(bt.valid(l))return l}for(;;){let s=r>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!de.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*r),n=!1;continue e}break}i=s,o+=r;let a=t.doc.resolve(o);if(bt.valid(a))return a}return null}}}bt.prototype.visible=!1;bt.findFrom=bt.findGapCursorFrom;xe.jsonID("gapcursor",bt);class Gy{constructor(t){this.pos=t}map(t){return new Gy(t.map(this.pos))}resolve(t){let r=t.resolve(this.pos);return bt.valid(r)?new bt(r):xe.near(r)}}function jH(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r-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 UH(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r);;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 WH(){return new zo({props:{decorations:YH,createSelectionBetween(e,t,r){return t.pos==r.pos&&bt.valid(r)?new bt(r):null},handleClick:qH,handleKeyDown:KH,handleDOMEvents:{beforeinput:GH}}})}const KH=ey({ArrowLeft:Sf("horiz",-1),ArrowRight:Sf("horiz",1),ArrowUp:Sf("vert",-1),ArrowDown:Sf("vert",1)});function Sf(e,t){const r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(n,o,i){let s=n.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof ue){if(!i.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(t>0?a.after():a.before())}let c=bt.findGapCursorFrom(a,t,l);return c?(o&&o(n.tr.setSelection(new bt(c))),!0):!1}}function qH(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!bt.valid(n))return!1;let o=e.posAtCoords({left:r.clientX,top:r.clientY});return o&&o.inside>-1&&de.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new bt(n))),!0)}function GH(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof bt))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=N.empty;for(let s=n.length-1;s>=0;s--)o=N.from(n[s].createAndFill(null,o));let i=e.state.tr.replace(r.pos,r.pos,new W(o,0,0));return i.setSelection(ue.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function YH(e){if(!(e.selection instanceof bt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Me.create(e.doc,[Qe.widget(e.selection.head,t,{key:"gapcursor"})])}var XH=Object.defineProperty,JH=Object.getOwnPropertyDescriptor,QH=(e,t,r,n)=>{for(var o=n>1?void 0:n?JH(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&XH(t,r,o),o},G0=class extends Ge{get name(){return"gapCursor"}createExternalPlugins(){return[WH()]}};G0=QH([ve({})],G0);var lh=200,Wt=function(){};Wt.prototype.append=function(t){return t.length?(t=Wt.from(t),!this.length&&t||t.length=r?Wt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Wt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Wt.prototype.forEach=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(t,r,n,0):this.forEachInvertedInner(t,r,n,0)};Wt.prototype.map=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},r,n),o};Wt.from=function(t){return t instanceof Wt?t:t&&t.length?new p3(t):Wt.empty};var p3=function(e){function t(n){e.call(this),this.values=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={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,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=lh)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=lh)return new t(o.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(Wt);Wt.empty=new p3([]);var ZH=function(e){function t(r,n){e.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.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(n){return na&&this.right.forEachInner(n,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(n,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(n,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(n-i,o-i):this.left.slice(n,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(n){var o=this.right.leafAppend(n);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(n){var o=this.left.leafPrepend(n);if(o)return new t(o,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(Wt);const eB=500;class eo{constructor(t,r){this.items=t,this.eventCount=r}popEvent(t,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let o,i;r&&(o=this.remapping(n,this.items.length),i=o.maps.length);let s=t.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(n,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new go(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],c.push(new go(h,void 0,void 0,c.length+u.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new eo(this.items.slice(0,n).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,r,n,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;urB&&(a=tB(a,c),s-=c),new eo(a.append(i),s)}remapping(t,r){let n=new fl;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?n.maps.length-o.mirrorOffset:void 0;n.appendMap(o.map,s)},t,r),n}addMaps(t){return this.eventCount==0?this:new eo(this.items.append(t.map(r=>new go(r))),this.eventCount)}rebased(t,r){if(!this.eventCount)return this;let n=[],o=Math.max(0,this.items.length-r),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=r;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(i.slice(l+1,p));b&&a++,n.push(new go(h,m,b))}else n.push(new go(h))},o);let c=[];for(let f=r;feB&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach(r=>{r.step||t++}),t}compress(t=this.items.length){let r=this.remapping(0,t),n=r.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(r.slice(n)),c=l&&l.getMap();if(n--,c&&r.appendMap(c,n),l){let u=s.selection&&s.selection.map(r.slice(n));u&&i++;let d=new go(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&n--},this.items.length,0),new eo(Wt.from(o.reverse()),i)}}eo.empty=new eo(Wt.empty,0);function tB(e,t){let r;return e.forEach((n,o)=>{if(n.selection&&t--==0)return r=o,!1}),e.slice(r)}class go{constructor(t,r,n,o){this.map=t,this.step=r,this.selection=n,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let r=t.step.merge(this.step);if(r)return new go(r.getMap().invert(),r,this.selection)}}}class Ri{constructor(t,r,n,o,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=o,this.prevComposition=i}}const rB=20;function nB(e,t,r,n){let o=r.getMeta(Mo),i;if(o)return o.historyState;r.getMeta(iB)&&(e=new Ri(e.done,e.undone,null,0,-1));let s=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(s&&s.getMeta(Mo))return s.getMeta(Mo).redo?new Ri(e.done.addTransform(r,void 0,n,np(t)),e.undone,Nw(r.mapping.maps[r.steps.length-1]),e.prevTime,e.prevComposition):new Ri(e.done,e.undone.addTransform(r,void 0,n,np(t)),null,e.prevTime,e.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(r.time||0)-n.newGroupDelay||!oB(r,e.prevRanges)),c=s?t1(e.prevRanges,r.mapping):Nw(r.mapping.maps[r.steps.length-1]);return new Ri(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,np(t)),eo.empty,c,r.time,a??e.prevComposition)}else return(i=r.getMeta("rebased"))?new Ri(e.done.rebased(r,i),e.undone.rebased(r,i),t1(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new Ri(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),t1(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function oB(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((n,o)=>{for(let i=0;i=t[i]&&(r=!0)}),r}function Nw(e){let t=[];return e.forEach((r,n,o,i)=>t.push(o,i)),t}function t1(e,t){if(!e)return null;let r=[];for(let n=0;n{let r=Mo.getState(e);return!r||r.done.eventCount==0?!1:(t&&h3(r,e,t,!1),!0)},Qc=(e,t)=>{let r=Mo.getState(e);return!r||r.undone.eventCount==0?!1:(t&&h3(r,e,t,!0),!0)};function Y0(e){let t=Mo.getState(e);return t?t.done.eventCount:0}function aB(e){let t=Mo.getState(e);return t?t.undone.eventCount:0}var lB=Object.defineProperty,cB=Object.getOwnPropertyDescriptor,Ma=(e,t,r,n)=>{for(var o=n>1?void 0:n?cB(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&lB(t,r,o),o},Ro=class extends Ge{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:r,dispatch:n,view:o})=>{const{getState:i,getDispatch:s}=this.options,a=Le(i)?i():r,l=Le(s)&&n?s():n,c=e(a,l,o);return t==null||t(c),c}}get name(){return"history"}createKeymap(){return{"Mod-y":an.isMac?()=>!1:this.wrapMethod(Qc,this.options.onRedo),"Mod-z":this.wrapMethod(op,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(Qc,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(op,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(Qc,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[sB({depth:e,newGroupDelay:t})]}undo(){return d2(this.wrapMethod(op,this.options.onUndo))}redo(){return d2(this.wrapMethod(Qc,this.options.onRedo))}undoDepth(e=this.store.getState()){return Y0(e)}redoDepth(e=this.store.getState()){return aB(e)}};Ma([_t({shortcut:j.Undo,command:"undo"})],Ro.prototype,"undoShortcut",1);Ma([_t({shortcut:j.Redo,command:"redo"})],Ro.prototype,"redoShortcut",1);Ma([Y({disableChaining:!0,description:({t:e})=>e(Ep.UNDO_DESCRIPTION),label:({t:e})=>e(Ep.UNDO_LABEL),icon:"arrowGoBackFill"})],Ro.prototype,"undo",1);Ma([Y({disableChaining:!0,description:({t:e})=>e(Ep.REDO_DESCRIPTION),label:({t:e})=>e(Ep.REDO_LABEL),icon:"arrowGoForwardFill"})],Ro.prototype,"redo",1);Ma([Ye()],Ro.prototype,"undoDepth",1);Ma([Ye()],Ro.prototype,"redoDepth",1);Ro=Ma([ve({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],Ro);var uB=Object.defineProperty,dB=Object.getOwnPropertyDescriptor,hm=(e,t,r,n)=>{for(var o=n>1?void 0:n?dB(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uB(t,r,o),o},fB={icon:"paragraph",label:({t:e})=>e(Cp.INSERT_LABEL),description:({t:e})=>e(Cp.INSERT_DESCRIPTION)},pB={icon:"paragraph",label:({t:e})=>e(Cp.CONVERT_LABEL),description:({t:e})=>e(Cp.CONVERT_DESCRIPTION)},fa=class extends nr{get name(){return"paragraph"}createTags(){return[ie.LastNodeCompatible,ie.TextBlock,ie.Block,ie.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:r=>({...e.parse(r)})},...t.parseDOM??[]],toDOM:r=>["p",e.dom(r),0]}}convertParagraph(e={}){const{attrs:t,selection:r,preserveAttrs:n}=e;return this.store.commands.setBlockNodeType.original(this.type,t,r,n)}insertParagraph(e,t={}){const{selection:r,attrs:n}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:r,attrs:n})}shortcut(e){return this.convertParagraph()(e)}};hm([Y(pB)],fa.prototype,"convertParagraph",1);hm([Y(fB)],fa.prototype,"insertParagraph",1);hm([_t({shortcut:j.Paragraph,command:"convertParagraph"})],fa.prototype,"shortcut",1);fa=hm([ve({defaultPriority:Ve.Medium})],fa);function Qo(e,t,r){return Math.min(Math.max(e,r),t)}class hB extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Zc=hB;function Yy(e){if(typeof e!="string")throw new Zc(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=wB.test(e)?vB(e):e;const r=yB.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(a=>parseInt(cd(a,2),16)),parseInt(cd(s[3]||"f",2),16)/255]}const n=bB.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const o=kB.exec(t);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const i=xB.exec(t);if(i){const[s,a,l,c]=Array.from(i).slice(1).map(parseFloat);if(Qo(0,100,a)!==a)throw new Zc(e);if(Qo(0,100,l)!==l)throw new Zc(e);return[...SB(s,a,l),Number.isNaN(c)?1:c]}throw new Zc(e)}function mB(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const zw=e=>parseInt(e.replace(/_/g,""),36),gB="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=zw(t.substring(0,3)),n=zw(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e},{});function vB(e){const t=e.toLowerCase().trim(),r=gB[mB(t)];if(!r)throw new Zc(e);return`#${r}`}const cd=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),yB=new RegExp(`^#${cd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),bB=new RegExp(`^#${cd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),kB=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${cd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),xB=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,wB=/^[a-z]+$/i,Lw=e=>Math.round(e*255),SB=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(Lw);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),s=i*(1-Math.abs(o%2-1));let a=0,l=0,c=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,c=s):o>=3&&o<4?(l=s,c=i):o>=4&&o<5?(a=s,c=i):o>=5&&o<6&&(a=i,c=s);const u=n-i/2,d=a+u,f=l+u,p=c+u;return[d,f,p].map(Lw)};function EB(e){const[t,r,n,o]=Yy(e).map((d,f)=>f===3?d:d/255),i=Math.max(t,r,n),s=Math.min(t,r,n),a=(i+s)/2;if(i===s)return[0,0,a,o];const l=i-s,c=a>.5?l/(2-i-s):l/(i+s);return[60*(t===i?(r-n)/l+(r.179}function Sl(e){return OB(e)?"#000":"#fff"}const _B="remirror-editor-wrapper",AB="remirror-button-active",RB="remirror-button",NB="remirror-composite",PB="remirror-dialog",zB="remirror-dialog-backdrop",LB="remirror-form",IB="remirror-form-message",DB="remirror-form-label",$B="remirror-form-group",HB="remirror-group",BB="remirror-input",FB="remirror-menu",VB="remirror-menu-pane",jB="remirror-menu-pane-active",UB="remirror-menu-dropdown-label",WB="remirror-menu-pane-icon",KB="remirror-menu-pane-label",qB="remirror-menu-pane-shortcut",GB="remirror-menu-button-left",YB="remirror-menu-button-right",XB="remirror-menu-button-nested-left",JB="remirror-menu-button-nested-right",QB="remirror-menu-button",ZB="remirror-menu-bar",eF="remirror-flex-column",tF="remirror-flex-row",rF="remirror-menu-item",nF="remirror-menu-item-row",oF="remirror-menu-item-column",iF="remirror-menu-item-checkbox",sF="remirror-menu-item-radio",aF="remirror-menu-group",lF="remirror-floating-popover",cF="remirror-popover",uF="remirror-animated-popover",dF="remirror-role",fF="remirror-separator",pF="remirror-tab",hF="remirror-tab-list",mF="remirror-tabbable",gF="remirror-toolbar",vF="remirror-tooltip",yF="remirror-table-size-editor",bF="remirror-table-size-editor-body",kF="remirror-table-size-editor-cell",xF="remirror-table-size-editor-cell-selected",wF="remirror-table-size-editor-footer",SF="remirror-color-picker",EF="remirror-color-picker-cell",CF="remirror-color-picker-cell-selected";var MF=Object.freeze({__proto__:null,ANIMATED_POPOVER:uF,BUTTON:RB,BUTTON_ACTIVE:AB,COLOR_PICKER:SF,COLOR_PICKER_CELL:EF,COLOR_PICKER_CELL_SELECTED:CF,COMPOSITE:NB,DIALOG:PB,DIALOG_BACKDROP:zB,EDITOR_WRAPPER:_B,FLEX_COLUMN:eF,FLEX_ROW:tF,FLOATING_POPOVER:lF,FORM:LB,FORM_GROUP:$B,FORM_LABEL:DB,FORM_MESSAGE:IB,GROUP:HB,INPUT:BB,MENU:FB,MENU_BAR:ZB,MENU_BUTTON:QB,MENU_BUTTON_LEFT:GB,MENU_BUTTON_NESTED_LEFT:XB,MENU_BUTTON_NESTED_RIGHT:JB,MENU_BUTTON_RIGHT:YB,MENU_DROPDOWN_LABEL:UB,MENU_GROUP:aF,MENU_ITEM:rF,MENU_ITEM_CHECKBOX:iF,MENU_ITEM_COLUMN:oF,MENU_ITEM_RADIO:sF,MENU_ITEM_ROW:nF,MENU_PANE:VB,MENU_PANE_ACTIVE:jB,MENU_PANE_ICON:WB,MENU_PANE_LABEL:KB,MENU_PANE_SHORTCUT:qB,POPOVER:cF,ROLE:dF,SEPARATOR:fF,TAB:pF,TABBABLE:mF,TABLE_SIZE_EDITOR:yF,TABLE_SIZE_EDITOR_BODY:bF,TABLE_SIZE_EDITOR_CELL:kF,TABLE_SIZE_EDITOR_CELL_SELECTED:xF,TABLE_SIZE_EDITOR_FOOTER:wF,TAB_LIST:hF,TOOLBAR:gF,TOOLTIP:vF});const TF="remirror-wrap",OF="remirror-language-select-positioner",_F="remirror-language-select-width",AF="remirror-a11y-dark",RF="remirror-atom-dark",NF="remirror-base16-ateliersulphurpool-light",PF="remirror-cb",zF="remirror-darcula",LF="remirror-dracula",IF="remirror-duotone-dark",DF="remirror-duotone-earth",$F="remirror-duotone-forest",HF="remirror-duotone-light",BF="remirror-duotone-sea",FF="remirror-duotone-space",VF="remirror-gh-colors",jF="remirror-hopscotch",UF="remirror-pojoaque",WF="remirror-vs",KF="remirror-xonokai";var qF=Object.freeze({__proto__:null,A11Y_DARK:AF,ATOM_DARK:RF,BASE16_ATELIERSULPHURPOOL_LIGHT:NF,CB:PF,DARCULA:zF,DRACULA:LF,DUOTONE_DARK:IF,DUOTONE_EARTH:DF,DUOTONE_FOREST:$F,DUOTONE_LIGHT:HF,DUOTONE_SEA:BF,DUOTONE_SPACE:FF,GH_COLORS:VF,HOPSCOTCH:jF,LANGUAGE_SELECT_POSITIONER:OF,LANGUAGE_SELECT_WIDTH:_F,POJOAQUE:UF,VS:WF,WRAP:TF,XONOKAI:KF});const GF="remirror-image-loader";var YF=Object.freeze({__proto__:null,IMAGE_LOADER:GF});const XF="remirror-list-item-with-custom-mark",JF="remirror-ul-list-content",QF="remirror-editor",ZF="remirror-list-item-marker-container",eV="remirror-list-item-checkbox",tV="remirror-collapsible-list-item-closed",rV="remirror-collapsible-list-item-button",nV="remirror-list-spine";var us=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:rV,COLLAPSIBLE_LIST_ITEM_CLOSED:tV,EDITOR:QF,LIST_ITEM_CHECKBOX:eV,LIST_ITEM_MARKER_CONTAINER:ZF,LIST_ITEM_WITH_CUSTOM_MARKER:XF,LIST_SPINE:nV,UL_LIST_CONTENT:JF});const oV="remirror-is-empty";var iV=Object.freeze({__proto__:null,IS_EMPTY:oV});const sV="remirror-editor",aV="remirror-positioner",lV="remirror-positioner-widget";var cV=Object.freeze({__proto__:null,EDITOR:sV,POSITIONER:aV,POSITIONER_WIDGET:lV});const uV="remirror-theme";function dV(e={}){const t=[],r={};function n(o,i){if(typeof i=="string"||typeof i=="number"){t.push(`${Iw(o)}: ${i};`),r[Iw(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,a]of Object.entries(i))n([...o,s],a)}for(const[o,i]of Object.entries(e))n([o],i);return{css:t.join(` +`),styles:r}}function fV(e){return e.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Iw(e){return`--rmr-${e.map(fV).join("-")}`}const Gn={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Zo="#000000",Xy="#ffffff",pV="#252103",Jy=ch(Zo,.75),mm="#7963d2",Qy="#bcd263",hV="#fff",mV="#fff",Zy=Gn.gray[1],Dw="rgba(10,31,68,0.08)",$w="rgba(10,31,68,0.10)",Hw="rgba(10,31,68,0.12)",gV=ip(ch(Zo,.1),.13),eb={background:Xy,border:Jy,foreground:Zo,muted:Zy,primary:mm,secondary:Qy,primaryText:hV,secondaryText:mV,text:pV,faded:gV},vV={...eb,background:on(Xy,.15),border:on(Jy,.15),foreground:on(Zo,.15),muted:on(Zy,.15),primary:on(mm,.15),secondary:on(Qy,.15),get text(){return Sl(this.background)},get primaryText(){return Sl(this.primary)},get secondaryText(){return Sl(this.secondary)}},yV={...eb,background:on(Xy,.075),border:on(Jy,.075),foreground:on(Zo,.075),muted:on(Zy,.075),primary:on(mm,.075),secondary:on(Qy,.075),get text(){return Sl(this.background)},get primaryText(){return Sl(this.primary)},get secondaryText(){return Sl(this.secondary)}},Es={color:{...eb,active:vV,hover:yV,shadow1:Dw,shadow2:$w,shadow3:Hw,backdrop:ch(Zo,.1),outline:ch(mm,.6),table:{default:{border:ip(Zo,.8),cell:ip(Zo,.4),controller:Gn.gray[3]},selected:{border:Gn.blue[7],cell:Gn.blue[1],controller:Gn.blue[5]},preselect:{border:Gn.blue[7],cell:ip(Zo,.4),controller:Gn.blue[5]},predelete:{border:Gn.red[7],cell:Gn.red[1],controller:Gn.red[5]},mark:"#91919196"}},hue:Gn,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"},fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${Dw}`,2:`0 1px 1px ${$w}`,3:`0 1px 1px ${Hw}`}};var bV=Object.defineProperty,kV=Object.getOwnPropertyDescriptor,tb=(e,t,r,n)=>{for(var o=n>1?void 0:n?kV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&bV(t,r,o),o},m3=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Nt=(e,t,r)=>(m3(e,t,"read from private field"),r?r.call(e):t.get(e)),Ho=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},bi=(e,t,r,n)=>(m3(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),eu,tu,Ya,ru,sp,nu,ou,iu,su,ap=class{constructor(e){Ho(this,eu,Gh()),Ho(this,tu,[]),Ho(this,Ya,new Map),Ho(this,ru,[]),Ho(this,sp,!1),Ho(this,nu,void 0),Ho(this,ou,void 0),Ho(this,iu,void 0),Ho(this,su,void 0),this.addListener=(t,r)=>Nt(this,eu).on(t,r),bi(this,nu,e),bi(this,ou,e.getActive),bi(this,su,e.getPosition),bi(this,iu,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new ap(e)}static fromPositioner(e,t){return ap.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:Nt(this,ou),getPosition:Nt(this,su),hasChanged:this.hasChanged,events:this.events,getID:Nt(this,iu)}}onActiveChanged(e){this.recentUpdate=e;const t=Nt(this,ou).call(this,e);bi(this,tu,t),bi(this,Ya,new Map),bi(this,sp,!1),bi(this,ru,[]);const r=[];for(const[n,o]of t.entries()){const i=this.getID(o,n);Nt(this,ru).push(i),r.push({setElement:s=>this.addProps({...e,data:o,element:s},n),id:i,data:o})}Nt(this,eu).emit("update",r)}getID(e,t){var r;return((r=Nt(this,iu))==null?void 0:r.call(this,e,t))??t.toString()}addProps(e,t){if(Nt(this,sp)||(Nt(this,Ya).set(t,e),Nt(this,Ya).sizee;return this.clone(r=>({getActive:n=>r.getActive(n).filter(t)}))}},oo=ap;eu=new WeakMap;tu=new WeakMap;Ya=new WeakMap;ru=new WeakMap;sp=new WeakMap;nu=new WeakMap;ou=new WeakMap;iu=new WeakMap;su=new WeakMap;oo.EMPTY=[];function xV(e,t=b3){const{key:r}=(e==null?void 0:e.getMeta(y3))??{};return r===t}function g3(e){const{tr:t,state:r,previousState:n}=e;return!n||t&&xV(t)?!0:t?j6(t):!r.doc.eq(n.doc)||!r.selection.eq(n.selection)}function v3(e,t,r={}){const n=t.getBoundingClientRect(),{accountForPadding:o=!1}=r;let i=0,s=0,a=0,l=0;if(kt(t)&&o){const u=Number.parseFloat(ho(t,"padding-left").replace("px","")),d=Number.parseFloat(ho(t,"padding-right").replace("px","")),f=Number.parseFloat(ho(t,"padding-top").replace("px","")),p=Number.parseFloat(ho(t,"padding-bottom").replace("px","")),h=Number.parseFloat(ho(t,"border-left").replace("px","")),m=Number.parseFloat(ho(t,"border-right").replace("px","")),b=Number.parseFloat(ho(t,"border-top").replace("px","")),v=Number.parseFloat(ho(t,"border-bottom").replace("px","")),g=t.offsetWidth-t.clientWidth,y=t.offsetHeight-t.clientHeight;i+=u+h+(t.dir==="rtl"?g:0),s+=d+m+(t.dir==="rtl"?0:g),a+=f+b,l+=p+v+y}const c=new DOMRect(n.left+i,n.top+a,n.width-s,n.height-l);for(const[u,d]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(nx(u,c.top,c.bottom)&&nx(d,c.left,c.right))return!0;return!1}var wV="remirror-positioner-widget",y3="positionerUpdate",b3="__all_positioners__",k3={y:-999999,x:-999999,width:0,height:0},Bw={...k3,left:-999999,top:-999999,bottom:-999999,right:-999999},rb={...k3,rect:{...Bw,toJSON:()=>Bw},visible:!1},x3=oo.create({hasChanged:g3,getActive(e){const{state:t}=e;if(!Gv(t)||t.selection.$anchor.depth>2)return oo.EMPTY;const r=Ld({predicate:n=>n.type.isBlock,selection:t});return r?[r]:oo.EMPTY},getPosition(e){const{view:t,data:r}=e,n=t.nodeDOM(r.pos);if(!kt(n))return rb;const o=n.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,a=o.width,l=t.dom.scrollLeft+o.left-i.left,c=t.dom.scrollTop+o.top-i.top,u=v3(o,t.dom);return{y:c,x:l,height:s,width:a,rect:o,visible:u}}}),nb=x3.clone(({getActive:e})=>({getActive:t=>{const[r]=e(t);return r&&Uh(r.node)&&r.node.type===jh(t.state.schema)?[r]:oo.EMPTY}})),SV=nb.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),EV=nb.clone(({getPosition:e})=>({getPosition:t=>{const{width:r,x:n,y:o,height:i}=e(t);return{...e(t),width:1,x:r+n,rect:new DOMRect(r+n,o,1,i)}}}));function ob(e){return oo.create({hasChanged:g3,getActive:t=>{const{state:r,view:n}=t;if(!e(r)||!gs(r.selection))return oo.EMPTY;try{const{head:o,anchor:i}=r.selection;return[{from:n.coordsAtPos(i),to:n.coordsAtPos(o)}]}catch{return oo.EMPTY}},getPosition(t){const{element:r,data:n,view:o}=t,{from:i,to:s}=n,a=r.offsetParent??o.dom,l=a.getBoundingClientRect(),c=Math.abs(s.bottom-i.top),u=c>i.bottom-i.top,d=Math.min(i.left,s.left),f=Math.min(i.top,s.top),p=a.scrollLeft+(u?s.left-l.left:d-l.left),h=a.scrollTop+f-l.top,m=u?1:Math.abs(i.left-s.right),b=new DOMRect(u?s.left:d,f,m,c),v=v3(b,o.dom);return{rect:b,y:h,x:p,height:c,width:m,visible:v}}})}var w3=ob(e=>!e.selection.empty),CV=ob(e=>e.selection.empty),MV=ob(()=>!0),TV=w3.clone(()=>({getActive:e=>{const{state:t,view:r}=e;if(!t.selection.empty)return oo.EMPTY;const n=O5(t);if(!n)return oo.EMPTY;try{return[{from:r.coordsAtPos(n.from),to:r.coordsAtPos(n.to)}]}catch{return oo.EMPTY}}})),OV={selection:w3,cursor:CV,always:MV,block:x3,emptyBlock:nb,emptyBlockStart:SV,emptyBlockEnd:EV,nearestWord:TV},Ul=class extends Ge{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:cV.EDITOR}}init(){this.onScroll=KS(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return Me.empty;const t=Qe.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return Me.create(e.doc,[t])}forceUpdatePositioners(e=b3){return({tr:t,dispatch:r})=>(r==null||r(t.setMeta(y3,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=wV,e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){const r=this.store.getState(),n=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:n,state:r,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};tb([Y()],Ul.prototype,"forceUpdatePositioners",1);tb([Ye()],Ul.prototype,"getPositionerWidget",1);Ul=tb([ve({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Ul);function X0(e){return oe(e)?OV[e].clone():Le(e)?e().clone():e.clone()}var _V=Object.defineProperty,AV=Object.getOwnPropertyDescriptor,RV=(e,t,r,n)=>{for(var o=n>1?void 0:n?AV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_V(t,r,o),o},J0=class extends nr{get name(){return"text"}createTags(){return[ie.InlineNode]}createNodeSpec(){return{}}};J0=RV([ve({disableExtraAttributes:!0,defaultPriority:Ve.Medium})],J0);var NV={...jl.defaultOptions,...fa.defaultOptions,...Ro.defaultOptions,excludeExtensions:[]};function PV(e={}){e={...NV,...e};const{content:t,depth:r,getDispatch:n,getState:o,newGroupDelay:i,excludeExtensions:s}=e,a={};for(const c of s??[])a[c]=!0;const l=[];if(!a.history){const c=new Ro({depth:r,getDispatch:n,getState:o,newGroupDelay:i});l.push(c)}return a.doc||l.push(new jl({content:t})),a.text||l.push(new J0),a.paragraph||l.push(new fa),a.positioner||l.push(new Ul),a.gapCursor||l.push(new G0),a.events||l.push(new ah),l}var zV=Object.defineProperty,LV=Object.getOwnPropertyDescriptor,IV=(e,t,r,n)=>{for(var o=n>1?void 0:n?LV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zV(t,r,o),o},pa=class extends Ge{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Jv(t.doc,{ignoreAttributes:!0})}),apply:(e,t,r,n)=>DV({pluginState:t,tr:e,extension:this,state:n})},props:{decorations:e=>$V({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=Pr.EditorView&&this.store.updateAttributes()}};pa=IV([ve({defaultOptions:{emptyNodeClass:iV.IS_EMPTY,placeholder:""}})],pa);function DV(e){const{pluginState:t,extension:r,tr:n,state:o}=e;return n.docChanged?{...r.options,empty:Jv(o.doc)}:t}function $V(e){const{extension:t,state:r}=e,{empty:n}=t.pluginKey.getState(r),{emptyNodeClass:o,placeholder:i}=t.options;if(!n)return null;const s=[];return r.doc.descendants((a,l)=>{const c=Qe.node(l,l+a.nodeSize,{class:o,"data-placeholder":i});s.push(c)}),Me.create(r.doc,s)}var HV=Object.defineProperty,BV=Object.getOwnPropertyDescriptor,FV=(e,t,r,n)=>{for(var o=n>1?void 0:n?BV(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&HV(t,r,o),o},VV={...pa.defaultOptions,...ad.defaultOptions},jV=[...pa.staticKeys,...ad.staticKeys],ud=class extends Ge{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(pa).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new pa({emptyNodeClass:e,placeholder:t,priority:Ve.Low}),new ad({defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};ud=FV([ve({defaultOptions:VV,staticKeys:jV})],ud);var S3={};Object.defineProperty(S3,"__esModule",{value:!0});function UV(){for(var e=[],t=0;t{if(!t.has(e))throw TypeError("Cannot "+r)},n1=(e,t,r)=>(E3(e,t,"read from private field"),r?r.call(e):t.get(e)),WV=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},KV=(e,t,r,n)=>(E3(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function qV(){const[,e]=S.useState(te());return S.useCallback(()=>{e(te())},[])}var C3=S.createContext(null);function pi(e){const t=S.useContext(C3),r=S.useRef(qV());re(t,{code:H.REACT_PROVIDER_CONTEXT});const{addHandler:n}=t;return S.useEffect(()=>{let o=e;if(o){if(hs(o)){const{autoUpdate:i}=o;o=i?()=>r.current():void 0}if(Le(o))return n("updated",o)}},[n,e]),t}function Gr(e=!0){return pi({autoUpdate:e}).active}function GV(e=!1){return pi(e?{autoUpdate:!0}:void 0).attrs}function cc(){return pi().chain.new()}function or(){return pi().commands}function ib(){return pi({autoUpdate:!0}).getState().selection}function Ud(e,t=void 0,r){const{getExtension:n}=pi(),o=S.useMemo(()=>n(e),[e,n]);let i;if(Le(t)?i=r?[o,...r]:[o,t]:i=t?[o,...Object.values(t)]:[],S.useEffect(()=>{Le(t)||!t||o.setOptions(t)},i),S.useEffect(()=>{if(Le(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function YV(e,t,r){const n=S.useCallback(({addHandler:o})=>o(t,r),[r,t]);return Ud(e,n)}function gm(e=!1){return pi(e?{autoUpdate:!0}:void 0).helpers}var[XV,JV]=x9(({props:e})=>{const t=e.locale??"en",r=e.i18n??pm,n=e.supportedLocales??[t],o=r._.bind(r);return{locale:t,i18n:r,supportedLocales:n,t:o}});function Uw(e,t={}){const{core:r,react:n,...o}=t;return r8(e)?e:t8.create(()=>[...rE(e),new ud(n),...PV(r)],o)}function QV(e,t={}){const r=S.useRef(e),n=S.useRef(t),[o,i]=S.useState(()=>Uw(e,t));return r.current=e,n.current=t,S.useEffect(()=>o.addHandler("destroy",()=>{i(()=>Uw(r.current,n.current))}),[o]),o}var ZV=typeof xr=="object"&&xr.__esModule&&xr.default?xr.default:xr,Xa,ej=class extends XL{constructor(e){if(super(e),WV(this,Xa,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,r)=>{this.rootPropsConfig.called=!0;const{refKey:n="ref",ref:o,...i}=t??te();return{[n]:ZV(o,this.onRef),key:this.uid,...i,children:r}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,re(this.rootPropsConfig.count<=1,{code:H.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),KV(this,Xa,t),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(pa).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new s6(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:r=!0,tr:n,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;re(i,{code:H.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),re(r,{code:H.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:n,transactions:o});return}!n&&!o&&(e=e.apply(e.tr.setMeta(Qk,{}))),this.view.updateState(e),r&&(o==null?void 0:o.length)!==0&&this.onChange({state:e,tr:n,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:n,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(Qk,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition==="start"?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){re(n1(this,Xa),{code:H.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(n1(this,Xa),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&n1(this,Xa)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Xa=new WeakMap;var M3=typeof document<"u"?S.useLayoutEffect:S.useEffect;function tj(e){const t=S.useRef();return M3(()=>{t.current=e}),t.current}function rj(e){const{manager:t,state:r}=e,{placeholder:n,editable:o}=e;S.useRef(!0).current&&!es(n)&&t.getExtension(ud).setOptions({placeholder:n}),S.useEffect(()=>{n!=null&&t.getExtension(ud).setOptions({placeholder:n})},[n,t]);const[s]=S.useState(()=>{if(r)return r;const l=t.createEmptyDoc(),[c,u]=ft(e.initialContent)?e.initialContent:[e.initialContent??l];return t.createState({content:c,selection:u})}),a=nj({initialEditorState:s,getProps:()=>e});return S.useEffect(()=>()=>{a.destroy()},[a]),S.useEffect(()=>{a.onUpdate()},[o,a]),oj(a),a.frameworkOutput}function nj(e){const t=S.useRef(e);t.current=e;const r=S.useMemo(()=>new ej(t.current),[]);return r.update(e),r}function oj(e){const{state:t}=e.props,r=S.useRef(!!t),n=tj(t);M3(()=>{const o=t?r.current===!0:r.current===!1;re(o,{code:H.REACT_CONTROLLED,message:r.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===n)&&e.updateControlledState(t,n??void 0)},[t,n,e])}function ij(e={}){const{content:t,document:r,selection:n,extensions:o,...i}=e,s=QV(o??(()=>[]),i),[a,l]=S.useState(()=>s.createState({selection:n,content:t??s.createEmptyDoc()})),c=S.useCallback(({state:d})=>{l(d)},[]),u=S.useCallback(()=>s.output,[s]);return S.useMemo(()=>({state:a,setState:l,manager:s,onChange:c,getContext:u}),[u,s,c,a])}var Ww={doc:!1,selection:!1,storedMark:!1};function sj(){const[e,t]=S.useState(Ww);return YV(zp,"applyState",S.useCallback(({tr:r})=>{const n={...Ww};r.docChanged&&(n.doc=!0),r.selectionSet&&(n.selection=!0),r.storedMarksSet&&(n.storedMark=!0),t(n)},[])),e}var Q0=()=>I.createElement("div",{className:MF.EDITOR_WRAPPER,...pi().getRootProps()}),aj=e=>(e.hook(),null);function lj(e){const{children:t,autoRender:r,i18n:n,locale:o,supportedLocales:i,hooks:s=[],...a}=e,l=rj(a),c=m9(l.portalContainer),u=r==="start"||r===!0||!t&&es(r),d=r==="end";return I.createElement(XV,{i18n:n,locale:o,supportedLocales:i},I.createElement(C3.Provider,{value:l},I.createElement(h9,{portals:c}),s.map((f,p)=>I.createElement(aj,{hook:f,key:p})),u&&I.createElement(Q0,null),t,d&&I.createElement(Q0,null)))}const cj={black:"#000",white:"#fff"},dd=cj,uj={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ia=uj,dj={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Da=dj,fj={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},$a=fj,pj={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ha=pj,hj={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ba=hj,mj={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Mc=mj,gj={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},vj=gj;function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=T3(e[r])}),t}function fn(e,t,r={clone:!0}){const n=r.clone?_({},e):e;return qo(e)&&qo(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(qo(t[o])&&o in e&&qo(e[o])?n[o]=fn(e[o],t[o],r):r.clone?n[o]=qo(t[o])?T3(t[o]):t[o]:n[o]=t[o])}),n}function Wl(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rr==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function jV(e,t=166){let r;function n(...o){const i=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(i,t)}return n.clear=()=>{clearTimeout(r)},n}function Dr(e){return e&&e.ownerDocument||document}function rd(e){return Dr(e).defaultView||window}function z0(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const UV=typeof window<"u"?S.useLayoutEffect:S.useEffect,sa=UV;let Cw=0;function WV(e){const[t,r]=S.useState(e),n=e||t;return S.useEffect(()=>{t==null&&(Cw+=1,r(`mui-${Cw}`))},[t]),n}const Mw=i1["useId".toString()];function KV(e){if(Mw!==void 0){const t=Mw();return e??t}return WV(e)}function qV({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=S.useRef(e!==void 0),[i,s]=S.useState(t),a=o?e:i,l=S.useCallback(c=>{o||s(c)},[]);return[a,l]}function Hs(e){const t=S.useRef(e);return sa(()=>{t.current=e}),S.useCallback((...r)=>(0,t.current)(...r),[])}function Br(...e){return S.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{z0(r,t)})},e)}let um=!0,L0=!1,Tw;const GV={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function YV(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&GV[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function JV(e){e.metaKey||e.altKey||e.ctrlKey||(um=!0)}function Hg(){um=!1}function XV(){this.visibilityState==="hidden"&&L0&&(um=!0)}function QV(e){e.addEventListener("keydown",JV,!0),e.addEventListener("mousedown",Hg,!0),e.addEventListener("pointerdown",Hg,!0),e.addEventListener("touchstart",Hg,!0),e.addEventListener("visibilitychange",XV,!0)}function ZV(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return um||YV(t)}function n3(){const e=S.useCallback(o=>{o!=null&&QV(o.ownerDocument)},[]),t=S.useRef(!1);function r(){return t.current?(L0=!0,window.clearTimeout(Tw),Tw=window.setTimeout(()=>{L0=!1},100),t.current=!1,!0):!1}function n(o){return ZV(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function o3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const ej=e=>{const t=S.useRef({});return S.useEffect(()=>{t.current=e}),t.current},i3=ej;function s3(e,t){const r=_({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=_({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=_({},i),Object.keys(o).forEach(s=>{r[n][s]=s3(o[s],i[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function er(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((i,s)=>{if(s){const a=t(s);a!==""&&i.push(a),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}const Ow=e=>e,tj=()=>{let e=Ow;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ow}}},rj=tj(),a3=rj,nj={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ft(e,t,r="Mui"){const n=nj[t];return n?`${r}-${n}`:`${a3.generate(e)}-${t}`}function Vt(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Ft(e,o,r)}),n}const Il="$$material";function ve(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}function l3(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var oj=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ij=l3(function(e){return oj.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function sj(e){if(e.sheet)return e.sheet;for(var t=0;t0?qt(ec,--Fr):0,Dl--,xt===10&&(Dl=1,fm--),xt}function an(){return xt=Fr2||od(xt)>3?"":" "}function bj(e,t){for(;--t&&an()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return zd(e,Yf()+(t<6&&bo()==32&&an()==32))}function D0(e){for(;an();)switch(xt){case e:return Fr;case 34:case 39:e!==34&&e!==39&&D0(xt);break;case 40:e===41&&D0(e);break;case 92:an();break}return Fr}function kj(e,t){for(;an()&&e+xt!==47+10;)if(e+xt===42+42&&bo()===47)break;return"/*"+zd(t,Fr-1)+"*"+dm(e===47?e:an())}function xj(e){for(;!od(bo());)an();return zd(e,Fr)}function wj(e){return h3(Xf("",null,null,null,[""],e=p3(e),0,[0],e))}function Xf(e,t,r,n,o,i,s,a,l){for(var c=0,u=0,d=s,f=0,p=0,h=0,m=1,b=1,v=1,g=0,y="",k=o,x=i,w=n,E=y;b;)switch(h=g,g=an()){case 40:if(h!=108&&qt(E,d-1)==58){I0(E+=Ne(Jf(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=Jf(g);break;case 9:case 10:case 13:case 32:E+=yj(h);break;case 92:E+=bj(Yf()-1,7);continue;case 47:switch(bo()){case 42:case 47:ff(Sj(kj(an(),Yf()),t,r),l);break;default:E+="/"}break;case 123*m:a[c++]=uo(E)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+u:v==-1&&(E=Ne(E,/\f/g,"")),p>0&&uo(E)-d&&ff(p>32?Aw(E+";",n,r,d-1):Aw(Ne(E," ","")+";",n,r,d-2),l);break;case 59:E+=";";default:if(ff(w=_w(E,t,r,c,u,o,a,y,k=[],x=[],d),i),g===123)if(u===0)Xf(E,t,w,w,k,i,d,a,x);else switch(f===99&&qt(E,3)===110?100:f){case 100:case 108:case 109:case 115:Xf(e,w,w,n&&ff(_w(e,w,w,0,0,o,a,y,o,k=[],d),x),o,x,d,a,n?k:x);break;default:Xf(E,w,w,w,[""],x,0,a,x)}}c=u=p=0,m=v=1,y=E="",d=s;break;case 58:d=1+uo(E),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&vj()==125)continue}switch(E+=dm(g),g*m){case 38:v=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(uo(E)-1)*v,v=1;break;case 64:bo()===45&&(E+=Jf(an())),f=bo(),u=d=uo(y=E+=xj(Yf())),g++;break;case 45:h===45&&uo(E)==2&&(m=0)}}return i}function _w(e,t,r,n,o,i,s,a,l,c,u){for(var d=o-1,f=o===0?i:[""],p=jy(f),h=0,m=0,b=0;h0?f[v]+" "+g:Ne(g,/&\f/g,f[v])))&&(l[b++]=y);return pm(e,t,r,o===0?Fy:a,l,c,u)}function Sj(e,t,r){return pm(e,t,r,c3,dm(gj()),nd(e,2,-2),0)}function Aw(e,t,r,n){return pm(e,t,r,Vy,nd(e,0,n),nd(e,n+1,-1),n)}function hl(e,t){for(var r="",n=jy(e),o=0;o6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return Ne(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+Xp+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~I0(e,"stretch")?m3(Ne(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,uo(e)-3-(~I0(e,"!important")&&10))){case 107:return Ne(e,":",":"+Ae)+e;case 101:return Ne(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(qt(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+or+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return Ae+e+or+Ne(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+or+Ne(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+or+Ne(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+or+e+e}return e}var Rj=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Vy:t.return=m3(t.value,t.length);break;case u3:return hl([yc(t,{value:Ne(t.value,"@","@"+Ae)})],o);case Fy:if(t.length)return mj(t.props,function(i){switch(hj(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return hl([yc(t,{props:[Ne(i,/:(read-\w+)/,":"+Xp+"$1")]})],o);case"::placeholder":return hl([yc(t,{props:[Ne(i,/:(plac\w+)/,":"+Ae+"input-$1")]}),yc(t,{props:[Ne(i,/:(plac\w+)/,":"+Xp+"$1")]}),yc(t,{props:[Ne(i,/:(plac\w+)/,or+"input-$1")]})],o)}return""})}},Pj=[Rj],zj=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var b=m.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Pj,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var b=m.getAttribute("data-emotion").split(" "),v=1;vr==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function kj(e,t=166){let r;function n(...o){const i=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(i,t)}return n.clear=()=>{clearTimeout(r)},n}function Vr(e){return e&&e.ownerDocument||document}function fd(e){return Vr(e).defaultView||window}function Z0(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const xj=typeof window<"u"?S.useLayoutEffect:S.useEffect,ha=xj;let qw=0;function wj(e){const[t,r]=S.useState(e),n=e||t;return S.useEffect(()=>{t==null&&(qw+=1,r(`mui-${qw}`))},[t]),n}const Gw=E1["useId".toString()];function Sj(e){if(Gw!==void 0){const t=Gw();return e??t}return wj(e)}function Ej({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=S.useRef(e!==void 0),[i,s]=S.useState(t),a=o?e:i,l=S.useCallback(c=>{o||s(c)},[]);return[a,l]}function qs(e){const t=S.useRef(e);return ha(()=>{t.current=e}),S.useCallback((...r)=>(0,t.current)(...r),[])}function Wr(...e){return S.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Z0(r,t)})},e)}let Tm=!0,ev=!1,Yw;const Cj={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Mj(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&Cj[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Tj(e){e.metaKey||e.altKey||e.ctrlKey||(Tm=!0)}function o1(){Tm=!1}function Oj(){this.visibilityState==="hidden"&&ev&&(Tm=!0)}function _j(e){e.addEventListener("keydown",Tj,!0),e.addEventListener("mousedown",o1,!0),e.addEventListener("pointerdown",o1,!0),e.addEventListener("touchstart",o1,!0),e.addEventListener("visibilitychange",Oj,!0)}function Aj(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Tm||Mj(t)}function _3(){const e=S.useCallback(o=>{o!=null&&_j(o.ownerDocument)},[]),t=S.useRef(!1);function r(){return t.current?(ev=!0,window.clearTimeout(Yw),Yw=window.setTimeout(()=>{ev=!1},100),t.current=!1,!0):!1}function n(o){return Aj(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function A3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Rj=e=>{const t=S.useRef({});return S.useEffect(()=>{t.current=e}),t.current},R3=Rj;function N3(e,t){const r=_({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=_({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=_({},i),Object.keys(o).forEach(s=>{r[n][s]=N3(o[s],i[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function ir(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((i,s)=>{if(s){const a=t(s);a!==""&&i.push(a),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}const Xw=e=>e,Nj=()=>{let e=Xw;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Xw}}},Pj=Nj(),P3=Pj,zj={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Kt(e,t,r="Mui"){const n=zj[t];return n?`${r}-${n}`:`${P3.generate(e)}-${t}`}function qt(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Kt(e,o,r)}),n}const Kl="$$material";function be(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}function z3(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Lj=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ij=z3(function(e){return Lj.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Dj(e){if(e.sheet)return e.sheet;for(var t=0;t0?Qt(uc,--Kr):0,ql--,Mt===10&&(ql=1,_m--),Mt}function pn(){return Mt=Kr<$3?Qt(uc,Kr++):0,ql++,Mt===10&&(ql=1,_m++),Mt}function To(){return Qt(uc,Kr)}function lp(){return Kr}function Wd(e,t){return pd(uc,e,t)}function hd(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 H3(e){return _m=ql=1,$3=vo(uc=e),Kr=0,[]}function B3(e){return uc="",e}function cp(e){return D3(Wd(Kr-1,rv(e===91?e+2:e===40?e+1:e)))}function Yj(e){for(;(Mt=To())&&Mt<33;)pn();return hd(e)>2||hd(Mt)>3?"":" "}function Xj(e,t){for(;--t&&pn()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Wd(e,lp()+(t<6&&To()==32&&pn()==32))}function rv(e){for(;pn();)switch(Mt){case e:return Kr;case 34:case 39:e!==34&&e!==39&&rv(Mt);break;case 40:e===41&&rv(e);break;case 92:pn();break}return Kr}function Jj(e,t){for(;pn()&&e+Mt!==47+10;)if(e+Mt===42+42&&To()===47)break;return"/*"+Wd(t,Kr-1)+"*"+Om(e===47?e:pn())}function Qj(e){for(;!hd(To());)pn();return Wd(e,Kr)}function Zj(e){return B3(up("",null,null,null,[""],e=H3(e),0,[0],e))}function up(e,t,r,n,o,i,s,a,l){for(var c=0,u=0,d=s,f=0,p=0,h=0,m=1,b=1,v=1,g=0,y="",k=o,x=i,w=n,E=y;b;)switch(h=g,g=pn()){case 40:if(h!=108&&Qt(E,d-1)==58){tv(E+=Pe(cp(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=cp(g);break;case 9:case 10:case 13:case 32:E+=Yj(h);break;case 92:E+=Xj(lp()-1,7);continue;case 47:switch(To()){case 42:case 47:Ef(eU(Jj(pn(),lp()),t,r),l);break;default:E+="/"}break;case 123*m:a[c++]=vo(E)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+u:v==-1&&(E=Pe(E,/\f/g,"")),p>0&&vo(E)-d&&Ef(p>32?Qw(E+";",n,r,d-1):Qw(Pe(E," ","")+";",n,r,d-2),l);break;case 59:E+=";";default:if(Ef(w=Jw(E,t,r,c,u,o,a,y,k=[],x=[],d),i),g===123)if(u===0)up(E,t,w,w,k,i,d,a,x);else switch(f===99&&Qt(E,3)===110?100:f){case 100:case 108:case 109:case 115:up(e,w,w,n&&Ef(Jw(e,w,w,0,0,o,a,y,o,k=[],d),x),o,x,d,a,n?k:x);break;default:up(E,w,w,w,[""],x,0,a,x)}}c=u=p=0,m=v=1,y=E="",d=s;break;case 58:d=1+vo(E),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&Gj()==125)continue}switch(E+=Om(g),g*m){case 38:v=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(vo(E)-1)*v,v=1;break;case 64:To()===45&&(E+=cp(pn())),f=To(),u=d=vo(y=E+=Qj(lp())),g++;break;case 45:h===45&&vo(E)==2&&(m=0)}}return i}function Jw(e,t,r,n,o,i,s,a,l,c,u){for(var d=o-1,f=o===0?i:[""],p=ub(f),h=0,m=0,b=0;h0?f[v]+" "+g:Pe(g,/&\f/g,f[v])))&&(l[b++]=y);return Am(e,t,r,o===0?lb:a,l,c,u)}function eU(e,t,r){return Am(e,t,r,L3,Om(qj()),pd(e,2,-2),0)}function Qw(e,t,r,n){return Am(e,t,r,cb,pd(e,0,n),pd(e,n+1,-1),n)}function El(e,t){for(var r="",n=ub(e),o=0;o6)switch(Qt(e,t+1)){case 109:if(Qt(e,t+4)!==45)break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+uh+(Qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tv(e,"stretch")?F3(Pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qt(e,t+1)!==115)break;case 6444:switch(Qt(e,vo(e)-3-(~tv(e,"!important")&&10))){case 107:return Pe(e,":",":"+Ne)+e;case 101:return Pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ne+(Qt(e,14)===45?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+cr+"$2box$3")+e}break;case 5936:switch(Qt(e,t+11)){case 114:return Ne+e+cr+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+cr+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+cr+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ne+e+cr+e+e}return e}var cU=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case cb:t.return=F3(t.value,t.length);break;case I3:return El([Tc(t,{value:Pe(t.value,"@","@"+Ne)})],o);case lb:if(t.length)return Kj(t.props,function(i){switch(Wj(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Tc(t,{props:[Pe(i,/:(read-\w+)/,":"+uh+"$1")]})],o);case"::placeholder":return El([Tc(t,{props:[Pe(i,/:(plac\w+)/,":"+Ne+"input-$1")]}),Tc(t,{props:[Pe(i,/:(plac\w+)/,":"+uh+"$1")]}),Tc(t,{props:[Pe(i,/:(plac\w+)/,cr+"input-$1")]})],o)}return""})}},uU=[cU],dU=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var b=m.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||uU,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var b=m.getAttribute("data-emotion").split(" "),v=1;v=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var qj={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Gj=/[A-Z]|^ms/g,Yj=/_EMO_([^_]+?)_([^]*?)_EMO_/g,x3=function(t){return t.charCodeAt(1)===45},Rw=function(t){return t!=null&&typeof t!="boolean"},Bg=l3(function(e){return x3(e)?e:e.replace(Gj,"-$&").toLowerCase()}),Pw=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Yj,function(n,o,i){return fo={name:o,styles:i,next:fo},o})}return qj[t]!==1&&!x3(t)&&typeof r=="number"&&r!==0?r+"px":r};function id(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return fo={name:r.name,styles:r.styles,next:fo},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)fo={name:n.name,styles:n.styles,next:fo},n=n.next;var o=r.styles+";";return o}return Jj(e,t,r)}case"function":{if(e!==void 0){var i=fo,s=r(e);return fo=i,id(e,t,s)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function Jj(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o96?tU:rU},Iw=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},nU=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return k3(r,n,o),Zj(function(){return Wj(r,n,o)}),null},oU=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,s;r!==void 0&&(i=r.label,s=r.target);var a=Iw(t,r,n),l=a||Lw(o),c=!l("as");return function(){var u=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;p=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var EU={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},CU=/[A-Z]|^ms/g,MU=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q3=function(t){return t.charCodeAt(1)===45},e4=function(t){return t!=null&&typeof t!="boolean"},i1=z3(function(e){return q3(e)?e:e.replace(CU,"-$&").toLowerCase()}),t4=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(MU,function(n,o,i){return yo={name:o,styles:i,next:yo},o})}return EU[t]!==1&&!q3(t)&&typeof r=="number"&&r!==0?r+"px":r};function md(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return yo={name:r.name,styles:r.styles,next:yo},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)yo={name:n.name,styles:n.styles,next:yo},n=n.next;var o=r.styles+";";return o}return TU(e,t,r)}case"function":{if(e!==void 0){var i=yo,s=r(e);return yo=i,md(e,t,s)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function TU(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o96?NU:PU},o4=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},zU=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return K3(r,n,o),AU(function(){return wU(r,n,o)}),null},LU=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,s;r!==void 0&&(i=r.label,s=r.target);var a=o4(t,r,n),l=a||n4(o),c=!l("as");return function(){var u=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;p{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},aU=["values","unit","step"],lU=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>_({},r,{[n.key]:n.val}),{})};function cU(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=ve(e,aU),i=lU(t),s=Object.keys(i);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-n/100}${r})`}function c(f,p){const h=s.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:p)-n/100}${r})`}function u(f){return s.indexOf(f)+1`@media (min-width:${Yy[e]}px)`};function ro(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||Dw;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const i=n.breakpoints||Dw;return Object.keys(t).reduce((s,a)=>{if(Object.keys(i.values||Yy).indexOf(a)!==-1){const l=i.up(a);s[l]=r(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return r(t)}function C3(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const i=e.up(o);return n[i]={},n},{}))||{}}function M3(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function fU(e,...t){const r=C3(e),n=[r,...t].reduce((o,i)=>sn(o,i),{});return M3(Object.keys(r),n)}function pU(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,i)=>{i{e[o]!=null&&(r[o]=!0)}),r}function Fg({values:e,breakpoints:t,base:r}){const n=r||pU(e,t),o=Object.keys(n);if(o.length===0)return e;let i;return o.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[i],i=a):s[a]=e,s),{})}function Em(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Zp(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Em(e,r)||n,t&&(o=t(o,n,e)),o}function Le(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=Em(l,n)||{};return ro(s,a,d=>{let f=Zp(c,o,d);return d===f&&typeof d=="string"&&(f=Zp(c,o,`${t}${d==="default"?"":Be(d)}`,d)),r===!1?f:{[r]:f}})};return i.propTypes={},i.filterProps=[t],i}function hU(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const mU={m:"margin",p:"padding"},gU={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$w={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vU=hU(e=>{if(e.length>2)if($w[e])e=$w[e];else return[e];const[t,r]=e.split(""),n=mU[t],o=gU[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),Jy=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Xy=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Jy,...Xy];function Ld(e,t,r,n){var o;const i=(o=Em(e,t,!1))!=null?o:r;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function Qy(e){return Ld(e,"spacing",8)}function aa(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function yU(e,t){return r=>e.reduce((n,o)=>(n[o]=aa(t,r),n),{})}function bU(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=vU(r),i=yU(o,n),s=e[r];return ro(e,s,i)}function T3(e,t){const r=Qy(e.theme);return Object.keys(e).map(n=>bU(e,t,n,r)).reduce(bu,{})}function dt(e){return T3(e,Jy)}dt.propTypes={};dt.filterProps=Jy;function ft(e){return T3(e,Xy)}ft.propTypes={};ft.filterProps=Xy;function kU(e=8){if(e.mui)return e;const t=Qy({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function Cm(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?bu(o,t[i](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function mo(e){return typeof e!="number"?e:`${e}px solid`}const xU=Le({prop:"border",themeKey:"borders",transform:mo}),wU=Le({prop:"borderTop",themeKey:"borders",transform:mo}),SU=Le({prop:"borderRight",themeKey:"borders",transform:mo}),EU=Le({prop:"borderBottom",themeKey:"borders",transform:mo}),CU=Le({prop:"borderLeft",themeKey:"borders",transform:mo}),MU=Le({prop:"borderColor",themeKey:"palette"}),TU=Le({prop:"borderTopColor",themeKey:"palette"}),OU=Le({prop:"borderRightColor",themeKey:"palette"}),_U=Le({prop:"borderBottomColor",themeKey:"palette"}),AU=Le({prop:"borderLeftColor",themeKey:"palette"}),Mm=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ld(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:aa(t,n)});return ro(e,e.borderRadius,r)}return null};Mm.propTypes={};Mm.filterProps=["borderRadius"];Cm(xU,wU,SU,EU,CU,MU,TU,OU,_U,AU,Mm);const Tm=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ld(e.theme,"spacing",8),r=n=>({gap:aa(t,n)});return ro(e,e.gap,r)}return null};Tm.propTypes={};Tm.filterProps=["gap"];const Om=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ld(e.theme,"spacing",8),r=n=>({columnGap:aa(t,n)});return ro(e,e.columnGap,r)}return null};Om.propTypes={};Om.filterProps=["columnGap"];const _m=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ld(e.theme,"spacing",8),r=n=>({rowGap:aa(t,n)});return ro(e,e.rowGap,r)}return null};_m.propTypes={};_m.filterProps=["rowGap"];const NU=Le({prop:"gridColumn"}),RU=Le({prop:"gridRow"}),PU=Le({prop:"gridAutoFlow"}),zU=Le({prop:"gridAutoColumns"}),LU=Le({prop:"gridAutoRows"}),IU=Le({prop:"gridTemplateColumns"}),DU=Le({prop:"gridTemplateRows"}),$U=Le({prop:"gridTemplateAreas"}),HU=Le({prop:"gridArea"});Cm(Tm,Om,_m,NU,RU,PU,zU,LU,IU,DU,$U,HU);function ml(e,t){return t==="grey"?t:e}const BU=Le({prop:"color",themeKey:"palette",transform:ml}),FU=Le({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ml}),VU=Le({prop:"backgroundColor",themeKey:"palette",transform:ml});Cm(BU,FU,VU);function tn(e){return e<=1&&e!==0?`${e*100}%`:e}const jU=Le({prop:"width",transform:tn}),Zy=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const i=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||Yy[r];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:tn(r)}};return ro(e,e.maxWidth,t)}return null};Zy.filterProps=["maxWidth"];const UU=Le({prop:"minWidth",transform:tn}),WU=Le({prop:"height",transform:tn}),KU=Le({prop:"maxHeight",transform:tn}),qU=Le({prop:"minHeight",transform:tn});Le({prop:"size",cssProperty:"width",transform:tn});Le({prop:"size",cssProperty:"height",transform:tn});const GU=Le({prop:"boxSizing"});Cm(jU,Zy,UU,WU,KU,qU,GU);const YU={border:{themeKey:"borders",transform:mo},borderTop:{themeKey:"borders",transform:mo},borderRight:{themeKey:"borders",transform:mo},borderBottom:{themeKey:"borders",transform:mo},borderLeft:{themeKey:"borders",transform:mo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Mm},color:{themeKey:"palette",transform:ml},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ml},backgroundColor:{themeKey:"palette",transform:ml},p:{style:ft},pt:{style:ft},pr:{style:ft},pb:{style:ft},pl:{style:ft},px:{style:ft},py:{style:ft},padding:{style:ft},paddingTop:{style:ft},paddingRight:{style:ft},paddingBottom:{style:ft},paddingLeft:{style:ft},paddingX:{style:ft},paddingY:{style:ft},paddingInline:{style:ft},paddingInlineStart:{style:ft},paddingInlineEnd:{style:ft},paddingBlock:{style:ft},paddingBlockStart:{style:ft},paddingBlockEnd:{style:ft},m:{style:dt},mt:{style:dt},mr:{style:dt},mb:{style:dt},ml:{style:dt},mx:{style:dt},my:{style:dt},margin:{style:dt},marginTop:{style:dt},marginRight:{style:dt},marginBottom:{style:dt},marginLeft:{style:dt},marginX:{style:dt},marginY:{style:dt},marginInline:{style:dt},marginInlineStart:{style:dt},marginInlineEnd:{style:dt},marginBlock:{style:dt},marginBlockStart:{style:dt},marginBlockEnd:{style:dt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Tm},rowGap:{style:_m},columnGap:{style:Om},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:tn},maxWidth:{style:Zy},minWidth:{transform:tn},height:{transform:tn},maxHeight:{transform:tn},minHeight:{transform:tn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Am=YU;function JU(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function XU(e,t){return typeof e=="function"?e(t):e}function QU(){function e(r,n,o,i){const s={[r]:n,theme:o},a=i[r];if(!a)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const f=Em(o,c)||{};return d?d(s):ro(s,n,h=>{let m=Zp(f,u,h);return h===m&&typeof h=="string"&&(m=Zp(f,u,`${r}${h==="default"?"":Be(h)}`,h)),l===!1?m:{[l]:m}})}function t(r){var n;const{sx:o,theme:i={}}=r||{};if(!o)return null;const s=(n=i.unstable_sxConfig)!=null?n:Am;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=C3(i.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const h=XU(c[p],i);if(h!=null)if(typeof h=="object")if(s[p])f=bu(f,e(p,h,i,s));else{const m=ro({theme:i},h,b=>({[p]:b}));JU(m,h)?f[p]=t({sx:h,theme:i}):f=bu(f,m)}else f=bu(f,e(p,h,i,s))}),M3(d,f)}return Array.isArray(o)?o.map(a):a(o)}return t}const O3=QU();O3.filterProps=["sx"];const Nm=O3,ZU=["breakpoints","palette","spacing","shape"];function Rm(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=ve(e,ZU),a=cU(r),l=kU(o);let c=sn({breakpoints:a,direction:"ltr",components:{},palette:_({mode:"light"},n),spacing:l,shape:_({},dU,i)},s);return c=t.reduce((u,d)=>sn(u,d),c),c.unstable_sxConfig=_({},Am,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Nm({sx:d,theme:this})},c}function eW(e){return Object.keys(e).length===0}function eb(e=null){const t=S.useContext(qy);return!t||eW(t)?e:t}const tW=Rm();function tb(e=tW){return eb(e)}const rW=["sx"],nW=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Am;return Object.keys(e).forEach(i=>{o[i]?n.systemProps[i]=e[i]:n.otherProps[i]=e[i]}),n};function rb(e){const{sx:t}=e,r=ve(e,rW),{systemProps:n,otherProps:o}=nW(r);let i;return Array.isArray(t)?i=[n,...t]:typeof t=="function"?i=(...s)=>{const a=t(...s);return Ho(a)?_({},n,a):n}:i=_({},n,t),_({},o,{sx:i})}function _3(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ta!=="theme"&&a!=="sx"&&a!=="as"})(Nm);return S.forwardRef(function(l,c){const u=tb(r),d=rb(l),{className:f,component:p="div"}=d,h=ve(d,oW);return O.jsx(i,_({as:p,ref:c,className:Ce(f,o?o(n):n),theme:t&&u[t]||u},h))})}const sW=["variant"];function Hw(e){return e.length===0}function A3(e){const{variant:t}=e,r=ve(e,sW);let n=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=Hw(n)?e[o]:Be(e[o]):n+=`${Hw(n)?o:Be(o)}${Be(e[o].toString())}`}),n}const aW=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function lW(e){return Object.keys(e).length===0}function cW(e){return typeof e=="string"&&e.charCodeAt(0)>96}const uW=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,eh=e=>{const t={};return e&&e.forEach(r=>{const n=A3(r.props);t[n]=r.style}),t},dW=(e,t)=>{let r=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants),eh(r)},th=(e,t,r)=>{const{ownerState:n={}}=e,o=[];return r&&r.forEach(i=>{let s=!0;Object.keys(i.props).forEach(a=>{n[a]!==i.props[a]&&e[a]!==i.props[a]&&(s=!1)}),s&&o.push(t[A3(i.props)])}),o},fW=(e,t,r,n)=>{var o;const i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return th(e,t,i)};function Qf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const pW=Rm(),hW=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Zf({defaultTheme:e,theme:t,themeId:r}){return lW(t)?e:t[r]||t}function mW(e){return e?(t,r)=>r[e]:null}const Bw=({styledArg:e,props:t,defaultTheme:r,themeId:n})=>{const o=e(_({},t,{theme:Zf(_({},t,{defaultTheme:r,themeId:n}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=th(t,eh(i),i);return[o,...s]}return o};function N3(e={}){const{themeId:t,defaultTheme:r=pW,rootShouldForwardProp:n=Qf,slotShouldForwardProp:o=Qf}=e,i=s=>Nm(_({},s,{theme:Zf(_({},s,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{sU(s,k=>k.filter(x=>!(x!=null&&x.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=mW(hW(c))}=a,p=ve(a,aW),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,m=d||!1;let b,v=Qf;c==="Root"||c==="root"?v=n:c?v=o:cW(s)&&(v=void 0);const g=E3(s,_({shouldForwardProp:v,label:b},p)),y=(k,...x)=>{const w=x?x.map(T=>{if(typeof T=="function"&&T.__emotion_real!==T)return N=>Bw({styledArg:T,props:N,defaultTheme:r,themeId:t});if(Ho(T)){let N=T,z;return T&&T.variants&&(z=T.variants,delete N.variants,N=D=>{let F=T;return th(D,eh(z),z).forEach(L=>{F=sn(F,L)}),F}),N}return T}):[];let E=k;if(Ho(k)){let T;k&&k.variants&&(T=k.variants,delete E.variants,E=N=>{let z=k;return th(N,eh(T),T).forEach(F=>{z=sn(z,F)}),z})}else typeof k=="function"&&k.__emotion_real!==k&&(E=T=>Bw({styledArg:k,props:T,defaultTheme:r,themeId:t}));l&&f&&w.push(T=>{const N=Zf(_({},T,{defaultTheme:r,themeId:t})),z=uW(l,N);if(z){const D={};return Object.entries(z).forEach(([F,V])=>{D[F]=typeof V=="function"?V(_({},T,{theme:N})):V}),f(T,D)}return null}),l&&!h&&w.push(T=>{const N=Zf(_({},T,{defaultTheme:r,themeId:t}));return fW(T,dW(l,N),N,l)}),m||w.push(i);const M=w.length-x.length;if(Array.isArray(k)&&M>0){const T=new Array(M).fill("");E=[...k,...T],E.raw=[...k.raw,...T]}const C=g(E,...w);return s.muiName&&(C.muiName=s.muiName),C};return g.withConfig&&(y.withConfig=g.withConfig),y}}const gW=N3(),vW=gW;function yW(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:s3(t.components[r].defaultProps,n)}function R3({props:e,name:t,defaultTheme:r,themeId:n}){let o=tb(r);return n&&(o=o[n]||o),yW({theme:o,name:t,props:e})}function nb(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function bW(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function la(e){if(e.type)return e;if(e.charAt(0)==="#")return la(bW(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Ll(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Ll(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}function Pm(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function kW(e){e=la(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),s=(c,u=(c+r/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Pm({type:a,values:l})}function Fw(e){e=la(e);let t=e.type==="hsl"||e.type==="hsla"?la(kW(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function xW(e,t){const r=Fw(e),n=Fw(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Rr(e,t){return e=la(e),t=nb(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Pm(e)}function wW(e,t){if(e=la(e),t=nb(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Pm(e)}function SW(e,t){if(e=la(e),t=nb(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Pm(e)}const EW=S.createContext(null),P3=EW;function z3(){return S.useContext(P3)}const CW=typeof Symbol=="function"&&Symbol.for,MW=CW?Symbol.for("mui.nested"):"__THEME_NESTED__";function TW(e,t){return typeof t=="function"?t(e):_({},e,t)}function OW(e){const{children:t,theme:r}=e,n=z3(),o=S.useMemo(()=>{const i=n===null?r:TW(n,r);return i!=null&&(i[MW]=n!==null),i},[r,n]);return O.jsx(P3.Provider,{value:o,children:t})}const Vw={};function jw(e,t,r,n=!1){return S.useMemo(()=>{const o=e&&t[e]||t;if(typeof r=="function"){const i=r(o),s=e?_({},t,{[e]:i}):i;return n?()=>s:s}return e?_({},t,{[e]:r}):_({},t,r)},[e,t,r,n])}function _W(e){const{children:t,theme:r,themeId:n}=e,o=eb(Vw),i=z3()||Vw,s=jw(n,o,r),a=jw(n,i,r,!0);return O.jsx(OW,{theme:a,children:O.jsx(qy.Provider,{value:s,children:t})})}const AW=["component","direction","spacing","divider","children","className","useFlexGap"],NW=Rm(),RW=vW("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function PW(e){return R3({props:e,name:"MuiStack",defaultTheme:NW})}function zW(e,t){const r=S.Children.toArray(e).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],IW=({ownerState:e,theme:t})=>{let r=_({display:"flex",flexDirection:"column"},ro({theme:t},Fg({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n})));if(e.spacing){const n=Qy(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=Fg({values:e.direction,base:o}),s=Fg({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),r=sn(r,ro({theme:t},s,(l,c)=>e.useFlexGap?{gap:aa(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${LW(c?i[c]:e.direction)}`]:aa(n,l)}}))}return r=fU(t.breakpoints,r),r};function DW(e={}){const{createStyledComponent:t=RW,useThemeProps:r=PW,componentName:n="MuiStack"}=e,o=()=>er({root:["root"]},l=>Ft(n,l),{}),i=t(IW);return S.forwardRef(function(l,c){const u=r(l),d=rb(u),{component:f="div",direction:p="column",spacing:h=0,divider:m,children:b,className:v,useFlexGap:g=!1}=d,y=ve(d,AW),k={direction:p,spacing:h,useFlexGap:g},x=o();return O.jsx(i,_({as:f,ownerState:k,ref:c,className:Ce(x.root,v)},y,{children:m?zW(b,m):b}))})}function $W(e,t){return _({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const HW=["mode","contrastThreshold","tonalOffset"],Uw={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:td.white,default:td.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Vg={text:{primary:td.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:td.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Ww(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=SW(e.main,o):t==="dark"&&(e.dark=wW(e.main,i)))}function BW(e="light"){return e==="dark"?{main:Oa[200],light:Oa[50],dark:Oa[400]}:{main:Oa[700],light:Oa[400],dark:Oa[800]}}function FW(e="light"){return e==="dark"?{main:Ta[200],light:Ta[50],dark:Ta[400]}:{main:Ta[500],light:Ta[300],dark:Ta[700]}}function VW(e="light"){return e==="dark"?{main:Ma[500],light:Ma[300],dark:Ma[700]}:{main:Ma[700],light:Ma[400],dark:Ma[800]}}function jW(e="light"){return e==="dark"?{main:_a[400],light:_a[300],dark:_a[700]}:{main:_a[700],light:_a[500],dark:_a[900]}}function UW(e="light"){return e==="dark"?{main:Aa[400],light:Aa[300],dark:Aa[700]}:{main:Aa[800],light:Aa[500],dark:Aa[900]}}function WW(e="light"){return e==="dark"?{main:vc[400],light:vc[300],dark:vc[700]}:{main:"#ed6c02",light:vc[500],dark:vc[900]}}function KW(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=ve(e,HW),i=e.primary||BW(t),s=e.secondary||FW(t),a=e.error||VW(t),l=e.info||jW(t),c=e.success||UW(t),u=e.warning||WW(t);function d(m){return xW(m,Vg.text.primary)>=r?Vg.text.primary:Uw.text.primary}const f=({color:m,name:b,mainShade:v=500,lightShade:g=300,darkShade:y=700})=>{if(m=_({},m),!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(Ll(11,b?` (${b})`:"",v));if(typeof m.main!="string")throw new Error(Ll(12,b?` (${b})`:"",JSON.stringify(m.main)));return Ww(m,"light",g,n),Ww(m,"dark",y,n),m.contrastText||(m.contrastText=d(m.main)),m},p={dark:Vg,light:Uw};return sn(_({common:_({},td),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:BV,contrastThreshold:r,getContrastText:d,augmentColor:f,tonalOffset:n},p[t]),o)}const qW=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function GW(e){return Math.round(e*1e5)/1e5}const Kw={textTransform:"uppercase"},qw='"Roboto", "Helvetica", "Arial", sans-serif';function YW(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=qw,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=r,f=ve(r,qW),p=o/14,h=d||(v=>`${v/c*p}rem`),m=(v,g,y,k,x)=>_({fontFamily:n,fontWeight:v,fontSize:h(g),lineHeight:y},n===qw?{letterSpacing:`${GW(k/g)}em`}:{},x,u),b={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,Kw),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,Kw),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return sn(_({htmlFontSize:c,pxToRem:h,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},b),f,{clone:!1})}const JW=.2,XW=.14,QW=.12;function tt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${JW})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${XW})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${QW})`].join(",")}const ZW=["none",tt(0,2,1,-1,0,1,1,0,0,1,3,0),tt(0,3,1,-2,0,2,2,0,0,1,5,0),tt(0,3,3,-2,0,3,4,0,0,1,8,0),tt(0,2,4,-1,0,4,5,0,0,1,10,0),tt(0,3,5,-1,0,5,8,0,0,1,14,0),tt(0,3,5,-1,0,6,10,0,0,1,18,0),tt(0,4,5,-2,0,7,10,1,0,2,16,1),tt(0,5,5,-3,0,8,10,1,0,3,14,2),tt(0,5,6,-3,0,9,12,1,0,3,16,2),tt(0,6,6,-3,0,10,14,1,0,4,18,3),tt(0,6,7,-4,0,11,15,1,0,4,20,3),tt(0,7,8,-4,0,12,17,2,0,5,22,4),tt(0,7,8,-4,0,13,19,2,0,5,24,4),tt(0,7,9,-4,0,14,21,2,0,5,26,4),tt(0,8,9,-5,0,15,22,2,0,6,28,5),tt(0,8,10,-5,0,16,24,2,0,6,30,5),tt(0,8,11,-5,0,17,26,2,0,6,32,5),tt(0,9,11,-5,0,18,28,2,0,7,34,6),tt(0,9,12,-6,0,19,29,2,0,7,36,6),tt(0,10,13,-6,0,20,31,3,0,8,38,7),tt(0,10,13,-6,0,21,33,3,0,8,40,7),tt(0,10,14,-6,0,22,35,3,0,8,42,7),tt(0,11,14,-7,0,23,36,3,0,9,44,8),tt(0,11,15,-7,0,24,38,3,0,9,46,8)],eK=ZW,tK=["duration","easing","delay"],rK={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},nK={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Gw(e){return`${Math.round(e)}ms`}function oK(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function iK(e){const t=_({},rK,e.easing),r=_({},nK,e.duration);return _({getAutoHeightDuration:oK,create:(o=["all"],i={})=>{const{duration:s=r.standard,easing:a=t.easeInOut,delay:l=0}=i;return ve(i,tK),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:Gw(s)} ${a} ${typeof l=="string"?l:Gw(l)}`).join(",")}},e,{easing:t,duration:r})}const sK={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},aK=sK,lK=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function ob(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:i={}}=e,s=ve(e,lK);if(e.vars)throw new Error(Ll(18));const a=KW(n),l=Rm(e);let c=sn(l,{mixins:$W(l.breakpoints,r),palette:a,shadows:eK.slice(),typography:YW(a,i),transitions:iK(o),zIndex:_({},aK)});return c=sn(c,s),c=t.reduce((u,d)=>sn(u,d),c),c.unstable_sxConfig=_({},Am,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Nm({sx:d,theme:this})},c}const cK=ob(),ib=cK;function zm(){const e=tb(ib);return e[Il]||e}function Ut({props:e,name:t}){return R3({props:e,name:t,defaultTheme:ib,themeId:Il})}const sb=e=>Qf(e)&&e!=="classes",uK=N3({themeId:Il,defaultTheme:ib,rootShouldForwardProp:sb}),Ye=uK,dK=["theme"];function fK(e){let{theme:t}=e,r=ve(e,dK);const n=t[Il];return O.jsx(_W,_({},r,{themeId:n?Il:void 0,theme:n||t}))}const pK=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},Yw=pK;function $0(e,t){return $0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$0(e,t)}function L3(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$0(e,t)}const Jw={disabled:!1},rh=I.createContext(null);var hK=function(t){return t.scrollTop},Qc="unmounted",Es="exited",Cs="entering",Fa="entered",H0="exiting",si=function(e){L3(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var s=o,a=s&&!s.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?a?(l=Es,i.appearStatus=Cs):l=Fa:n.unmountOnExit||n.mountOnEnter?l=Qc:l=Es,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Qc?{status:Es}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Cs&&s!==Fa&&(i=Cs):(s===Cs||s===Fa)&&(i=H0)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Cs){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:uf.findDOMNode(this);s&&hK(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Es&&this.setState({status:Qc})},r.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[uf.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!o&&!s||Jw.disabled){this.safeSetState({status:Fa},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Cs},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Fa},function(){i.props.onEntered(c,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:uf.findDOMNode(this);if(!i||Jw.disabled){this.safeSetState({status:Es},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:H0},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Es},function(){o.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:uf.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Qc)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=ve(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return I.createElement(rh.Provider,{value:null},typeof s=="function"?s(o,a):I.cloneElement(I.Children.only(s),a))},t}(I.Component);si.contextType=rh;si.propTypes={};function Na(){}si.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Na,onEntering:Na,onEntered:Na,onExit:Na,onExiting:Na,onExited:Na};si.UNMOUNTED=Qc;si.EXITED=Es;si.ENTERING=Cs;si.ENTERED=Fa;si.EXITING=H0;const I3=si;function mK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ab(e,t){var r=function(i){return t&&S.isValidElement(i)?t(i):i},n=Object.create(null);return e&&S.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function gK(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var s,a={};for(var l in t){if(n[l])for(s=0;se.scrollTop;function nh(e,t){var r,n;const{timeout:o,easing:i,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(n=s.transitionTimingFunction)!=null?n:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function wK(e){return Ft("MuiPaper",e)}Vt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const SK=["className","component","elevation","square","variant"],EK=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return er(i,wK,o)},CK=Ye("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return _({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&_({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Rr("#fff",Yw(t.elevation))}, ${Rr("#fff",Yw(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),MK=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=n,c=ve(n,SK),u=_({},n,{component:i,elevation:s,square:a,variant:l}),d=EK(u);return O.jsx(CK,_({as:i,ownerState:u,className:Ce(d.root,o),ref:r},c))}),TK=MK;function OK(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:c}=e,[u,d]=S.useState(!1),f=Ce(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),p={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},h=Ce(r.child,u&&r.childLeaving,n&&r.childPulsate);return!a&&!u&&d(!0),S.useEffect(()=>{if(!a&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,a,c]),O.jsx("span",{className:f,style:p,children:O.jsx("span",{className:h})})}const _K=Vt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bn=_K,AK=["center","classes","className"];let Lm=e=>e,Xw,Qw,Zw,e4;const B0=550,NK=80,RK=Gy(Xw||(Xw=Lm` + */function X3(e,t){return dh(e,t)}const DU=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},$U=["values","unit","step"],HU=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>_({},r,{[n.key]:n.val}),{})};function BU(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=be(e,$U),i=HU(t),s=Object.keys(i);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-n/100}${r})`}function c(f,p){const h=s.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:p)-n/100}${r})`}function u(f){return s.indexOf(f)+1`@media (min-width:${gb[e]}px)`};function lo(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||i4;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const i=n.breakpoints||i4;return Object.keys(t).reduce((s,a)=>{if(Object.keys(i.values||gb).indexOf(a)!==-1){const l=i.up(a);s[l]=r(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return r(t)}function J3(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const i=e.up(o);return n[i]={},n},{}))||{}}function Q3(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function jU(e,...t){const r=J3(e),n=[r,...t].reduce((o,i)=>fn(o,i),{});return Q3(Object.keys(r),n)}function UU(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,i)=>{i{e[o]!=null&&(r[o]=!0)}),r}function s1({values:e,breakpoints:t,base:r}){const n=r||UU(e,t),o=Object.keys(n);if(o.length===0)return e;let i;return o.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[i],i=a):s[a]=e,s),{})}function Fm(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function fh(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Fm(e,r)||n,t&&(o=t(o,n,e)),o}function He(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=Fm(l,n)||{};return lo(s,a,d=>{let f=fh(c,o,d);return d===f&&typeof d=="string"&&(f=fh(c,o,`${t}${d==="default"?"":We(d)}`,d)),r===!1?f:{[r]:f}})};return i.propTypes={},i.filterProps=[t],i}function WU(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const KU={m:"margin",p:"padding"},qU={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s4={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},GU=WU(e=>{if(e.length>2)if(s4[e])e=s4[e];else return[e];const[t,r]=e.split(""),n=KU[t],o=qU[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),vb=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],yb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...vb,...yb];function Kd(e,t,r,n){var o;const i=(o=Fm(e,t,!1))!=null?o:r;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function bb(e){return Kd(e,"spacing",8)}function ma(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function YU(e,t){return r=>e.reduce((n,o)=>(n[o]=ma(t,r),n),{})}function XU(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=GU(r),i=YU(o,n),s=e[r];return lo(e,s,i)}function Z3(e,t){const r=bb(e.theme);return Object.keys(e).map(n=>XU(e,t,n,r)).reduce(Ou,{})}function gt(e){return Z3(e,vb)}gt.propTypes={};gt.filterProps=vb;function vt(e){return Z3(e,yb)}vt.propTypes={};vt.filterProps=yb;function JU(e=8){if(e.mui)return e;const t=bb({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function Vm(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?Ou(o,t[i](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function xo(e){return typeof e!="number"?e:`${e}px solid`}const QU=He({prop:"border",themeKey:"borders",transform:xo}),ZU=He({prop:"borderTop",themeKey:"borders",transform:xo}),eW=He({prop:"borderRight",themeKey:"borders",transform:xo}),tW=He({prop:"borderBottom",themeKey:"borders",transform:xo}),rW=He({prop:"borderLeft",themeKey:"borders",transform:xo}),nW=He({prop:"borderColor",themeKey:"palette"}),oW=He({prop:"borderTopColor",themeKey:"palette"}),iW=He({prop:"borderRightColor",themeKey:"palette"}),sW=He({prop:"borderBottomColor",themeKey:"palette"}),aW=He({prop:"borderLeftColor",themeKey:"palette"}),jm=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Kd(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:ma(t,n)});return lo(e,e.borderRadius,r)}return null};jm.propTypes={};jm.filterProps=["borderRadius"];Vm(QU,ZU,eW,tW,rW,nW,oW,iW,sW,aW,jm);const Um=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Kd(e.theme,"spacing",8),r=n=>({gap:ma(t,n)});return lo(e,e.gap,r)}return null};Um.propTypes={};Um.filterProps=["gap"];const Wm=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Kd(e.theme,"spacing",8),r=n=>({columnGap:ma(t,n)});return lo(e,e.columnGap,r)}return null};Wm.propTypes={};Wm.filterProps=["columnGap"];const Km=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Kd(e.theme,"spacing",8),r=n=>({rowGap:ma(t,n)});return lo(e,e.rowGap,r)}return null};Km.propTypes={};Km.filterProps=["rowGap"];const lW=He({prop:"gridColumn"}),cW=He({prop:"gridRow"}),uW=He({prop:"gridAutoFlow"}),dW=He({prop:"gridAutoColumns"}),fW=He({prop:"gridAutoRows"}),pW=He({prop:"gridTemplateColumns"}),hW=He({prop:"gridTemplateRows"}),mW=He({prop:"gridTemplateAreas"}),gW=He({prop:"gridArea"});Vm(Um,Wm,Km,lW,cW,uW,dW,fW,pW,hW,mW,gW);function Cl(e,t){return t==="grey"?t:e}const vW=He({prop:"color",themeKey:"palette",transform:Cl}),yW=He({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Cl}),bW=He({prop:"backgroundColor",themeKey:"palette",transform:Cl});Vm(vW,yW,bW);function ln(e){return e<=1&&e!==0?`${e*100}%`:e}const kW=He({prop:"width",transform:ln}),kb=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const i=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||gb[r];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:ln(r)}};return lo(e,e.maxWidth,t)}return null};kb.filterProps=["maxWidth"];const xW=He({prop:"minWidth",transform:ln}),wW=He({prop:"height",transform:ln}),SW=He({prop:"maxHeight",transform:ln}),EW=He({prop:"minHeight",transform:ln});He({prop:"size",cssProperty:"width",transform:ln});He({prop:"size",cssProperty:"height",transform:ln});const CW=He({prop:"boxSizing"});Vm(kW,kb,xW,wW,SW,EW,CW);const MW={border:{themeKey:"borders",transform:xo},borderTop:{themeKey:"borders",transform:xo},borderRight:{themeKey:"borders",transform:xo},borderBottom:{themeKey:"borders",transform:xo},borderLeft:{themeKey:"borders",transform:xo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jm},color:{themeKey:"palette",transform:Cl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Cl},backgroundColor:{themeKey:"palette",transform:Cl},p:{style:vt},pt:{style:vt},pr:{style:vt},pb:{style:vt},pl:{style:vt},px:{style:vt},py:{style:vt},padding:{style:vt},paddingTop:{style:vt},paddingRight:{style:vt},paddingBottom:{style:vt},paddingLeft:{style:vt},paddingX:{style:vt},paddingY:{style:vt},paddingInline:{style:vt},paddingInlineStart:{style:vt},paddingInlineEnd:{style:vt},paddingBlock:{style:vt},paddingBlockStart:{style:vt},paddingBlockEnd:{style:vt},m:{style:gt},mt:{style:gt},mr:{style:gt},mb:{style:gt},ml:{style:gt},mx:{style:gt},my:{style:gt},margin:{style:gt},marginTop:{style:gt},marginRight:{style:gt},marginBottom:{style:gt},marginLeft:{style:gt},marginX:{style:gt},marginY:{style:gt},marginInline:{style:gt},marginInlineStart:{style:gt},marginInlineEnd:{style:gt},marginBlock:{style:gt},marginBlockStart:{style:gt},marginBlockEnd:{style:gt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Um},rowGap:{style:Km},columnGap:{style:Wm},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ln},maxWidth:{style:kb},minWidth:{transform:ln},height:{transform:ln},maxHeight:{transform:ln},minHeight:{transform:ln},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},qm=MW;function TW(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function OW(e,t){return typeof e=="function"?e(t):e}function _W(){function e(r,n,o,i){const s={[r]:n,theme:o},a=i[r];if(!a)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const f=Fm(o,c)||{};return d?d(s):lo(s,n,h=>{let m=fh(f,u,h);return h===m&&typeof h=="string"&&(m=fh(f,u,`${r}${h==="default"?"":We(h)}`,h)),l===!1?m:{[l]:m}})}function t(r){var n;const{sx:o,theme:i={}}=r||{};if(!o)return null;const s=(n=i.unstable_sxConfig)!=null?n:qm;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=J3(i.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const h=OW(c[p],i);if(h!=null)if(typeof h=="object")if(s[p])f=Ou(f,e(p,h,i,s));else{const m=lo({theme:i},h,b=>({[p]:b}));TW(m,h)?f[p]=t({sx:h,theme:i}):f=Ou(f,m)}else f=Ou(f,e(p,h,i,s))}),Q3(d,f)}return Array.isArray(o)?o.map(a):a(o)}return t}const eT=_W();eT.filterProps=["sx"];const Gm=eT,AW=["breakpoints","palette","spacing","shape"];function Ym(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,s=be(e,AW),a=BU(r),l=JU(o);let c=fn({breakpoints:a,direction:"ltr",components:{},palette:_({mode:"light"},n),spacing:l,shape:_({},VU,i)},s);return c=t.reduce((u,d)=>fn(u,d),c),c.unstable_sxConfig=_({},qm,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Gm({sx:d,theme:this})},c}function RW(e){return Object.keys(e).length===0}function xb(e=null){const t=S.useContext(hb);return!t||RW(t)?e:t}const NW=Ym();function wb(e=NW){return xb(e)}const PW=["sx"],zW=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:qm;return Object.keys(e).forEach(i=>{o[i]?n.systemProps[i]=e[i]:n.otherProps[i]=e[i]}),n};function Sb(e){const{sx:t}=e,r=be(e,PW),{systemProps:n,otherProps:o}=zW(r);let i;return Array.isArray(t)?i=[n,...t]:typeof t=="function"?i=(...s)=>{const a=t(...s);return qo(a)?_({},n,a):n}:i=_({},n,t),_({},o,{sx:i})}function tT(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ta!=="theme"&&a!=="sx"&&a!=="as"})(Gm);return S.forwardRef(function(l,c){const u=wb(r),d=Sb(l),{className:f,component:p="div"}=d,h=be(d,LW);return O.jsx(i,_({as:p,ref:c,className:Te(f,o?o(n):n),theme:t&&u[t]||u},h))})}const DW=["variant"];function a4(e){return e.length===0}function rT(e){const{variant:t}=e,r=be(e,DW);let n=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=a4(n)?e[o]:We(e[o]):n+=`${a4(n)?o:We(o)}${We(e[o].toString())}`}),n}const $W=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function HW(e){return Object.keys(e).length===0}function BW(e){return typeof e=="string"&&e.charCodeAt(0)>96}const FW=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,ph=e=>{const t={};return e&&e.forEach(r=>{const n=rT(r.props);t[n]=r.style}),t},VW=(e,t)=>{let r=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants),ph(r)},hh=(e,t,r)=>{const{ownerState:n={}}=e,o=[];return r&&r.forEach(i=>{let s=!0;Object.keys(i.props).forEach(a=>{n[a]!==i.props[a]&&e[a]!==i.props[a]&&(s=!1)}),s&&o.push(t[rT(i.props)])}),o},jW=(e,t,r,n)=>{var o;const i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return hh(e,t,i)};function dp(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const UW=Ym(),WW=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function fp({defaultTheme:e,theme:t,themeId:r}){return HW(t)?e:t[r]||t}function KW(e){return e?(t,r)=>r[e]:null}const l4=({styledArg:e,props:t,defaultTheme:r,themeId:n})=>{const o=e(_({},t,{theme:fp(_({},t,{defaultTheme:r,themeId:n}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=hh(t,ph(i),i);return[o,...s]}return o};function nT(e={}){const{themeId:t,defaultTheme:r=UW,rootShouldForwardProp:n=dp,slotShouldForwardProp:o=dp}=e,i=s=>Gm(_({},s,{theme:fp(_({},s,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{DU(s,k=>k.filter(x=>!(x!=null&&x.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=KW(WW(c))}=a,p=be(a,$W),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,m=d||!1;let b,v=dp;c==="Root"||c==="root"?v=n:c?v=o:BW(s)&&(v=void 0);const g=X3(s,_({shouldForwardProp:v,label:b},p)),y=(k,...x)=>{const w=x?x.map(T=>{if(typeof T=="function"&&T.__emotion_real!==T)return R=>l4({styledArg:T,props:R,defaultTheme:r,themeId:t});if(qo(T)){let R=T,z;return T&&T.variants&&(z=T.variants,delete R.variants,R=D=>{let F=T;return hh(D,ph(z),z).forEach(L=>{F=fn(F,L)}),F}),R}return T}):[];let E=k;if(qo(k)){let T;k&&k.variants&&(T=k.variants,delete E.variants,E=R=>{let z=k;return hh(R,ph(T),T).forEach(F=>{z=fn(z,F)}),z})}else typeof k=="function"&&k.__emotion_real!==k&&(E=T=>l4({styledArg:k,props:T,defaultTheme:r,themeId:t}));l&&f&&w.push(T=>{const R=fp(_({},T,{defaultTheme:r,themeId:t})),z=FW(l,R);if(z){const D={};return Object.entries(z).forEach(([F,V])=>{D[F]=typeof V=="function"?V(_({},T,{theme:R})):V}),f(T,D)}return null}),l&&!h&&w.push(T=>{const R=fp(_({},T,{defaultTheme:r,themeId:t}));return jW(T,VW(l,R),R,l)}),m||w.push(i);const M=w.length-x.length;if(Array.isArray(k)&&M>0){const T=new Array(M).fill("");E=[...k,...T],E.raw=[...k.raw,...T]}const C=g(E,...w);return s.muiName&&(C.muiName=s.muiName),C};return g.withConfig&&(y.withConfig=g.withConfig),y}}const qW=nT(),GW=qW;function YW(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:N3(t.components[r].defaultProps,n)}function oT({props:e,name:t,defaultTheme:r,themeId:n}){let o=wb(r);return n&&(o=o[n]||o),YW({theme:o,name:t,props:e})}function Eb(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function XW(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function ga(e){if(e.type)return e;if(e.charAt(0)==="#")return ga(XW(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Wl(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Wl(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}function Xm(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function JW(e){e=ga(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),s=(c,u=(c+r/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Xm({type:a,values:l})}function c4(e){e=ga(e);let t=e.type==="hsl"||e.type==="hsla"?ga(JW(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function QW(e,t){const r=c4(e),n=c4(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Dr(e,t){return e=ga(e),t=Eb(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Xm(e)}function ZW(e,t){if(e=ga(e),t=Eb(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Xm(e)}function eK(e,t){if(e=ga(e),t=Eb(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Xm(e)}const tK=S.createContext(null),iT=tK;function sT(){return S.useContext(iT)}const rK=typeof Symbol=="function"&&Symbol.for,nK=rK?Symbol.for("mui.nested"):"__THEME_NESTED__";function oK(e,t){return typeof t=="function"?t(e):_({},e,t)}function iK(e){const{children:t,theme:r}=e,n=sT(),o=S.useMemo(()=>{const i=n===null?r:oK(n,r);return i!=null&&(i[nK]=n!==null),i},[r,n]);return O.jsx(iT.Provider,{value:o,children:t})}const u4={};function d4(e,t,r,n=!1){return S.useMemo(()=>{const o=e&&t[e]||t;if(typeof r=="function"){const i=r(o),s=e?_({},t,{[e]:i}):i;return n?()=>s:s}return e?_({},t,{[e]:r}):_({},t,r)},[e,t,r,n])}function sK(e){const{children:t,theme:r,themeId:n}=e,o=xb(u4),i=sT()||u4,s=d4(n,o,r),a=d4(n,i,r,!0);return O.jsx(iK,{theme:a,children:O.jsx(hb.Provider,{value:s,children:t})})}const aK=["component","direction","spacing","divider","children","className","useFlexGap"],lK=Ym(),cK=GW("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function uK(e){return oT({props:e,name:"MuiStack",defaultTheme:lK})}function dK(e,t){const r=S.Children.toArray(e).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],pK=({ownerState:e,theme:t})=>{let r=_({display:"flex",flexDirection:"column"},lo({theme:t},s1({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n})));if(e.spacing){const n=bb(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=s1({values:e.direction,base:o}),s=s1({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),r=fn(r,lo({theme:t},s,(l,c)=>e.useFlexGap?{gap:ma(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${fK(c?i[c]:e.direction)}`]:ma(n,l)}}))}return r=jU(t.breakpoints,r),r};function hK(e={}){const{createStyledComponent:t=cK,useThemeProps:r=uK,componentName:n="MuiStack"}=e,o=()=>ir({root:["root"]},l=>Kt(n,l),{}),i=t(pK);return S.forwardRef(function(l,c){const u=r(l),d=Sb(u),{component:f="div",direction:p="column",spacing:h=0,divider:m,children:b,className:v,useFlexGap:g=!1}=d,y=be(d,aK),k={direction:p,spacing:h,useFlexGap:g},x=o();return O.jsx(i,_({as:f,ownerState:k,ref:c,className:Te(x.root,v)},y,{children:m?dK(b,m):b}))})}function mK(e,t){return _({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const gK=["mode","contrastThreshold","tonalOffset"],f4={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:dd.white,default:dd.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},a1={text:{primary:dd.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:dd.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function p4(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=eK(e.main,o):t==="dark"&&(e.dark=ZW(e.main,i)))}function vK(e="light"){return e==="dark"?{main:$a[200],light:$a[50],dark:$a[400]}:{main:$a[700],light:$a[400],dark:$a[800]}}function yK(e="light"){return e==="dark"?{main:Da[200],light:Da[50],dark:Da[400]}:{main:Da[500],light:Da[300],dark:Da[700]}}function bK(e="light"){return e==="dark"?{main:Ia[500],light:Ia[300],dark:Ia[700]}:{main:Ia[700],light:Ia[400],dark:Ia[800]}}function kK(e="light"){return e==="dark"?{main:Ha[400],light:Ha[300],dark:Ha[700]}:{main:Ha[700],light:Ha[500],dark:Ha[900]}}function xK(e="light"){return e==="dark"?{main:Ba[400],light:Ba[300],dark:Ba[700]}:{main:Ba[800],light:Ba[500],dark:Ba[900]}}function wK(e="light"){return e==="dark"?{main:Mc[400],light:Mc[300],dark:Mc[700]}:{main:"#ed6c02",light:Mc[500],dark:Mc[900]}}function SK(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=be(e,gK),i=e.primary||vK(t),s=e.secondary||yK(t),a=e.error||bK(t),l=e.info||kK(t),c=e.success||xK(t),u=e.warning||wK(t);function d(m){return QW(m,a1.text.primary)>=r?a1.text.primary:f4.text.primary}const f=({color:m,name:b,mainShade:v=500,lightShade:g=300,darkShade:y=700})=>{if(m=_({},m),!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(Wl(11,b?` (${b})`:"",v));if(typeof m.main!="string")throw new Error(Wl(12,b?` (${b})`:"",JSON.stringify(m.main)));return p4(m,"light",g,n),p4(m,"dark",y,n),m.contrastText||(m.contrastText=d(m.main)),m},p={dark:a1,light:f4};return fn(_({common:_({},dd),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:vj,contrastThreshold:r,getContrastText:d,augmentColor:f,tonalOffset:n},p[t]),o)}const EK=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function CK(e){return Math.round(e*1e5)/1e5}const h4={textTransform:"uppercase"},m4='"Roboto", "Helvetica", "Arial", sans-serif';function MK(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=m4,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=r,f=be(r,EK),p=o/14,h=d||(v=>`${v/c*p}rem`),m=(v,g,y,k,x)=>_({fontFamily:n,fontWeight:v,fontSize:h(g),lineHeight:y},n===m4?{letterSpacing:`${CK(k/g)}em`}:{},x,u),b={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,h4),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,h4),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return fn(_({htmlFontSize:c,pxToRem:h,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},b),f,{clone:!1})}const TK=.2,OK=.14,_K=.12;function st(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${TK})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${OK})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${_K})`].join(",")}const AK=["none",st(0,2,1,-1,0,1,1,0,0,1,3,0),st(0,3,1,-2,0,2,2,0,0,1,5,0),st(0,3,3,-2,0,3,4,0,0,1,8,0),st(0,2,4,-1,0,4,5,0,0,1,10,0),st(0,3,5,-1,0,5,8,0,0,1,14,0),st(0,3,5,-1,0,6,10,0,0,1,18,0),st(0,4,5,-2,0,7,10,1,0,2,16,1),st(0,5,5,-3,0,8,10,1,0,3,14,2),st(0,5,6,-3,0,9,12,1,0,3,16,2),st(0,6,6,-3,0,10,14,1,0,4,18,3),st(0,6,7,-4,0,11,15,1,0,4,20,3),st(0,7,8,-4,0,12,17,2,0,5,22,4),st(0,7,8,-4,0,13,19,2,0,5,24,4),st(0,7,9,-4,0,14,21,2,0,5,26,4),st(0,8,9,-5,0,15,22,2,0,6,28,5),st(0,8,10,-5,0,16,24,2,0,6,30,5),st(0,8,11,-5,0,17,26,2,0,6,32,5),st(0,9,11,-5,0,18,28,2,0,7,34,6),st(0,9,12,-6,0,19,29,2,0,7,36,6),st(0,10,13,-6,0,20,31,3,0,8,38,7),st(0,10,13,-6,0,21,33,3,0,8,40,7),st(0,10,14,-6,0,22,35,3,0,8,42,7),st(0,11,14,-7,0,23,36,3,0,9,44,8),st(0,11,15,-7,0,24,38,3,0,9,46,8)],RK=AK,NK=["duration","easing","delay"],PK={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zK={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function g4(e){return`${Math.round(e)}ms`}function LK(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function IK(e){const t=_({},PK,e.easing),r=_({},zK,e.duration);return _({getAutoHeightDuration:LK,create:(o=["all"],i={})=>{const{duration:s=r.standard,easing:a=t.easeInOut,delay:l=0}=i;return be(i,NK),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:g4(s)} ${a} ${typeof l=="string"?l:g4(l)}`).join(",")}},e,{easing:t,duration:r})}const DK={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},$K=DK,HK=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Cb(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:i={}}=e,s=be(e,HK);if(e.vars)throw new Error(Wl(18));const a=SK(n),l=Ym(e);let c=fn(l,{mixins:mK(l.breakpoints,r),palette:a,shadows:RK.slice(),typography:MK(a,i),transitions:IK(o),zIndex:_({},$K)});return c=fn(c,s),c=t.reduce((u,d)=>fn(u,d),c),c.unstable_sxConfig=_({},qm,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Gm({sx:d,theme:this})},c}const BK=Cb(),Mb=BK;function Jm(){const e=wb(Mb);return e[Kl]||e}function Yt({props:e,name:t}){return oT({props:e,name:t,defaultTheme:Mb,themeId:Kl})}const Tb=e=>dp(e)&&e!=="classes",FK=nT({themeId:Kl,defaultTheme:Mb,rootShouldForwardProp:Tb}),et=FK,VK=["theme"];function jK(e){let{theme:t}=e,r=be(e,VK);const n=t[Kl];return O.jsx(sK,_({},r,{themeId:n?Kl:void 0,theme:n||t}))}const UK=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},v4=UK;function nv(e,t){return nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},nv(e,t)}function aT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nv(e,t)}const y4={disabled:!1},mh=I.createContext(null);var WK=function(t){return t.scrollTop},au="unmounted",Ns="exited",Ps="entering",Ja="entered",ov="exiting",hi=function(e){aT(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var s=o,a=s&&!s.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?a?(l=Ns,i.appearStatus=Ps):l=Ja:n.unmountOnExit||n.mountOnEnter?l=au:l=Ns,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===au?{status:Ns}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Ps&&s!==Ja&&(i=Ps):(s===Ps||s===Ja)&&(i=ov)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ps){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:wf.findDOMNode(this);s&&WK(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ns&&this.setState({status:au})},r.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[wf.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!o&&!s||y4.disabled){this.safeSetState({status:Ja},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ps},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Ja},function(){i.props.onEntered(c,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:wf.findDOMNode(this);if(!i||y4.disabled){this.safeSetState({status:Ns},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ov},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ns},function(){o.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:wf.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===au)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=be(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return I.createElement(mh.Provider,{value:null},typeof s=="function"?s(o,a):I.cloneElement(I.Children.only(s),a))},t}(I.Component);hi.contextType=mh;hi.propTypes={};function Fa(){}hi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fa,onEntering:Fa,onEntered:Fa,onExit:Fa,onExiting:Fa,onExited:Fa};hi.UNMOUNTED=au;hi.EXITED=Ns;hi.ENTERING=Ps;hi.ENTERED=Ja;hi.EXITING=ov;const lT=hi;function KK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ob(e,t){var r=function(i){return t&&S.isValidElement(i)?t(i):i},n=Object.create(null);return e&&S.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function qK(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var s,a={};for(var l in t){if(n[l])for(s=0;se.scrollTop;function gh(e,t){var r,n;const{timeout:o,easing:i,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(n=s.transitionTimingFunction)!=null?n:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function ZK(e){return Kt("MuiPaper",e)}qt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const eq=["className","component","elevation","square","variant"],tq=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return ir(i,ZK,o)},rq=et("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return _({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&_({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Dr("#fff",v4(t.elevation))}, ${Dr("#fff",v4(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),nq=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=n,c=be(n,eq),u=_({},n,{component:i,elevation:s,square:a,variant:l}),d=tq(u);return O.jsx(rq,_({as:i,ownerState:u,className:Te(d.root,o),ref:r},c))}),oq=nq;function iq(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:c}=e,[u,d]=S.useState(!1),f=Te(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),p={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},h=Te(r.child,u&&r.childLeaving,n&&r.childPulsate);return!a&&!u&&d(!0),S.useEffect(()=>{if(!a&&l!=null){const m=setTimeout(l,c);return()=>{clearTimeout(m)}}},[l,a,c]),O.jsx("span",{className:f,style:p,children:O.jsx("span",{className:h})})}const sq=qt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Cn=sq,aq=["center","classes","className"];let Qm=e=>e,b4,k4,x4,w4;const iv=550,lq=80,cq=mb(b4||(b4=Qm` 0% { transform: scale(0); opacity: 0.1; @@ -128,7 +128,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`)),PK=Gy(Qw||(Qw=Lm` +`)),uq=mb(k4||(k4=Qm` 0% { opacity: 1; } @@ -136,7 +136,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`)),zK=Gy(Zw||(Zw=Lm` +`)),dq=mb(x4||(x4=Qm` 0% { transform: scale(1); } @@ -148,7 +148,7 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`)),LK=Ye("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),IK=Ye(OK,{name:"MuiTouchRipple",slot:"Ripple"})(e4||(e4=Lm` +`)),fq=et("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),pq=et(iq,{name:"MuiTouchRipple",slot:"Ripple"})(w4||(w4=Qm` opacity: 0; position: absolute; @@ -191,7 +191,7 @@ Error generating stack: `+i.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),bn.rippleVisible,RK,B0,({theme:e})=>e.transitions.easing.easeInOut,bn.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,bn.child,bn.childLeaving,PK,B0,({theme:e})=>e.transitions.easing.easeInOut,bn.childPulsate,zK,({theme:e})=>e.transitions.easing.easeInOut),DK=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=n,a=ve(n,AK),[l,c]=S.useState([]),u=S.useRef(0),d=S.useRef(null);S.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=S.useRef(!1),p=S.useRef(0),h=S.useRef(null),m=S.useRef(null);S.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const b=S.useCallback(k=>{const{pulsate:x,rippleX:w,rippleY:E,rippleSize:M,cb:C}=k;c(T=>[...T,O.jsx(IK,{classes:{ripple:Ce(i.ripple,bn.ripple),rippleVisible:Ce(i.rippleVisible,bn.rippleVisible),ripplePulsate:Ce(i.ripplePulsate,bn.ripplePulsate),child:Ce(i.child,bn.child),childLeaving:Ce(i.childLeaving,bn.childLeaving),childPulsate:Ce(i.childPulsate,bn.childPulsate)},timeout:B0,pulsate:x,rippleX:w,rippleY:E,rippleSize:M},u.current)]),u.current+=1,d.current=C},[i]),v=S.useCallback((k={},x={},w=()=>{})=>{const{pulsate:E=!1,center:M=o||x.pulsate,fakeElement:C=!1}=x;if((k==null?void 0:k.type)==="mousedown"&&f.current){f.current=!1;return}(k==null?void 0:k.type)==="touchstart"&&(f.current=!0);const T=C?null:m.current,N=T?T.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,F;if(M||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)z=Math.round(N.width/2),D=Math.round(N.height/2);else{const{clientX:V,clientY:L}=k.touches&&k.touches.length>0?k.touches[0]:k;z=Math.round(V-N.left),D=Math.round(L-N.top)}if(M)F=Math.sqrt((2*N.width**2+N.height**2)/3),F%2===0&&(F+=1);else{const V=Math.max(Math.abs((T?T.clientWidth:0)-z),z)*2+2,L=Math.max(Math.abs((T?T.clientHeight:0)-D),D)*2+2;F=Math.sqrt(V**2+L**2)}k!=null&&k.touches?h.current===null&&(h.current=()=>{b({pulsate:E,rippleX:z,rippleY:D,rippleSize:F,cb:w})},p.current=setTimeout(()=>{h.current&&(h.current(),h.current=null)},NK)):b({pulsate:E,rippleX:z,rippleY:D,rippleSize:F,cb:w})},[o,b]),g=S.useCallback(()=>{v({},{pulsate:!0})},[v]),y=S.useCallback((k,x)=>{if(clearTimeout(p.current),(k==null?void 0:k.type)==="touchend"&&h.current){h.current(),h.current=null,p.current=setTimeout(()=>{y(k,x)});return}h.current=null,c(w=>w.length>0?w.slice(1):w),d.current=x},[]);return S.useImperativeHandle(r,()=>({pulsate:g,start:v,stop:y}),[g,v,y]),O.jsx(LK,_({className:Ce(bn.root,i.root,s),ref:m},a,{children:O.jsx(xK,{component:null,exit:!0,children:l})}))}),$K=DK;function HK(e){return Ft("MuiButtonBase",e)}const BK=Vt("MuiButtonBase",["root","disabled","focusVisible"]),FK=BK,VK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],jK=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,s=er({root:["root",t&&"disabled",r&&"focusVisible"]},HK,o);return r&&n&&(s.root+=` ${n}`),s},UK=Ye("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),WK=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:b,onDragLeave:v,onFocus:g,onFocusVisible:y,onKeyDown:k,onKeyUp:x,onMouseDown:w,onMouseLeave:E,onMouseUp:M,onTouchEnd:C,onTouchMove:T,onTouchStart:N,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:F,type:V}=n,L=ve(n,VK),K=S.useRef(null),A=S.useRef(null),P=Br(A,F),{isFocusVisibleRef:B,onFocus:Y,onBlur:J,ref:_e}=n3(),[ie,ue]=S.useState(!1);c&&ie&&ue(!1),S.useImperativeHandle(o,()=>({focusVisible:()=>{ue(!0),K.current.focus()}}),[]);const[de,he]=S.useState(!1);S.useEffect(()=>{he(!0)},[]);const Me=de&&!u&&!c;S.useEffect(()=>{ie&&f&&!u&&de&&A.current.pulsate()},[u,f,ie,de]);function Se(fe,gn,rc=d){return Hs(ci=>(gn&&gn(ci),!rc&&A.current&&A.current[fe](ci),!0))}const ut=Se("start",w),et=Se("stop",b),Cr=Se("stop",v),pe=Se("stop",M),Ie=Se("stop",fe=>{ie&&fe.preventDefault(),E&&E(fe)}),We=Se("start",N),In=Se("stop",C),Ur=Se("stop",T),tr=Se("stop",fe=>{J(fe),B.current===!1&&ue(!1),h&&h(fe)},!1),Oo=Hs(fe=>{K.current||(K.current=fe.currentTarget),Y(fe),B.current===!0&&(ue(!0),y&&y(fe)),g&&g(fe)}),Pt=()=>{const fe=K.current;return l&&l!=="button"&&!(fe.tagName==="A"&&fe.href)},Wr=S.useRef(!1),hn=Hs(fe=>{f&&!Wr.current&&ie&&A.current&&fe.key===" "&&(Wr.current=!0,A.current.stop(fe,()=>{A.current.start(fe)})),fe.target===fe.currentTarget&&Pt()&&fe.key===" "&&fe.preventDefault(),k&&k(fe),fe.target===fe.currentTarget&&Pt()&&fe.key==="Enter"&&!c&&(fe.preventDefault(),m&&m(fe))}),Dn=Hs(fe=>{f&&fe.key===" "&&A.current&&ie&&!fe.defaultPrevented&&(Wr.current=!1,A.current.stop(fe,()=>{A.current.pulsate(fe)})),x&&x(fe),m&&fe.target===fe.currentTarget&&Pt()&&fe.key===" "&&!fe.defaultPrevented&&m(fe)});let Je=l;Je==="button"&&(L.href||L.to)&&(Je=p);const Kr={};Je==="button"?(Kr.type=V===void 0?"button":V,Kr.disabled=c):(!L.href&&!L.to&&(Kr.role="button"),c&&(Kr["aria-disabled"]=c));const mn=Br(r,_e,K),li=_({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:z,focusVisible:ie}),ka=jK(li);return O.jsxs(UK,_({as:Je,className:Ce(ka.root,a),ownerState:li,onBlur:tr,onClick:m,onContextMenu:et,onFocus:Oo,onKeyDown:hn,onKeyUp:Dn,onMouseDown:ut,onMouseLeave:Ie,onMouseUp:pe,onDragLeave:Cr,onTouchEnd:In,onTouchMove:Ur,onTouchStart:We,ref:mn,tabIndex:c?-1:z,type:V},Kr,L,{children:[s,Me?O.jsx($K,_({ref:P,center:i},D)):null]}))}),cb=WK;function KK(e){return Ft("MuiIconButton",e)}const qK=Vt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),GK=qK,YK=["edge","children","className","color","disabled","disableFocusRipple","size"],JK=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,s={root:["root",r&&"disabled",n!=="default"&&`color${Be(n)}`,o&&`edge${Be(o)}`,`size${Be(i)}`]};return er(s,KK,t)},XK=Ye(cb,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${Be(r.color)}`],r.edge&&t[`edge${Be(r.edge)}`],t[`size${Be(r.size)}`]]}})(({theme:e,ownerState:t})=>_({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return _({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&_({color:n==null?void 0:n.main},!t.disableRipple&&{"&:hover":_({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rr(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${GK.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),QK=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=n,d=ve(n,YK),f=_({},n,{edge:o,color:a,disabled:l,disableFocusRipple:c,size:u}),p=JK(f);return O.jsx(XK,_({className:Ce(p.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:r,ownerState:f},d,{children:i}))}),ZK=QK;function eq(e){return Ft("MuiTypography",e)}Vt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const tq=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],rq=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,e.align!=="inherit"&&`align${Be(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return er(a,eq,s)},nq=Ye("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Be(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>_({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),t4={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},oq={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},iq=e=>oq[e]||e,sq=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiTypography"}),o=iq(n.color),i=rb(_({},n,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:p=t4}=i,h=ve(i,tq),m=_({},i,{align:s,color:o,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:p}),b=l||(d?"p":p[f]||t4[f])||"span",v=rq(m);return O.jsx(nq,_({as:b,ref:r,ownerState:m,className:Ce(v.root,a)},h))}),Zc=sq;function $3(e){return typeof e=="string"}function eu(e,t,r){return e===void 0||$3(e)?t:_({},t,{ownerState:_({},t.ownerState,r)})}const aq={disableDefaultClasses:!1},lq=S.createContext(aq);function cq(e){const{disableDefaultClasses:t}=S.useContext(lq);return r=>t?"":e(r)}function H3(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function uq(e,t,r){return typeof e=="function"?e(t,r):e}function r4(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function dq(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const p=Ce(o==null?void 0:o.className,n==null?void 0:n.className,i,r==null?void 0:r.className),h=_({},r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),m=_({},r,o,n);return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const s=H3(_({},o,n)),a=r4(n),l=r4(o),c=t(s),u=Ce(c==null?void 0:c.className,r==null?void 0:r.className,i,o==null?void 0:o.className,n==null?void 0:n.className),d=_({},c==null?void 0:c.style,r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),f=_({},c,r,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const fq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ei(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:i=!1}=e,s=ve(e,fq),a=i?{}:uq(n,o),{props:l,internalRef:c}=dq(_({},s,{externalSlotProps:a})),u=Br(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return eu(r,_({},l,{ref:u}),o)}function pq(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=i3({badgeContent:t,max:n});let s=r;r===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=n}=s?i:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const hq=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function mq(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function gq(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function vq(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||gq(e))}function yq(e){const t=[],r=[];return Array.from(e.querySelectorAll(hq)).forEach((n,o)=>{const i=mq(n);i===-1||!vq(n)||(i===0?t.push(n):r.push({documentOrder:o,tabIndex:i,node:n}))}),r.sort((n,o)=>n.tabIndex===o.tabIndex?n.documentOrder-o.documentOrder:n.tabIndex-o.tabIndex).map(n=>n.node).concat(t)}function bq(){return!0}function kq(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=yq,isEnabled:s=bq,open:a}=e,l=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),f=S.useRef(null),p=S.useRef(!1),h=S.useRef(null),m=Br(t.ref,h),b=S.useRef(null);S.useEffect(()=>{!a||!h.current||(p.current=!r)},[r,a]),S.useEffect(()=>{if(!a||!h.current)return;const y=Dr(h.current);return h.current.contains(y.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),S.useEffect(()=>{if(!a||!h.current)return;const y=Dr(h.current),k=E=>{b.current=E,!(n||!s()||E.key!=="Tab")&&y.activeElement===h.current&&E.shiftKey&&(l.current=!0,u.current&&u.current.focus())},x=()=>{const E=h.current;if(E===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(E.contains(y.activeElement)||n&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let M=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(M=i(h.current)),M.length>0){var C,T;const N=!!((C=b.current)!=null&&C.shiftKey&&((T=b.current)==null?void 0:T.key)==="Tab"),z=M[0],D=M[M.length-1];typeof z!="string"&&typeof D!="string"&&(N?D.focus():z.focus())}else E.focus()};y.addEventListener("focusin",x),y.addEventListener("keydown",k,!0);const w=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&x()},50);return()=>{clearInterval(w),y.removeEventListener("focusin",x),y.removeEventListener("keydown",k,!0)}},[r,n,o,s,a,i]);const v=y=>{d.current===null&&(d.current=y.relatedTarget),p.current=!0,f.current=y.target;const k=t.props.onFocus;k&&k(y)},g=y=>{d.current===null&&(d.current=y.relatedTarget),p.current=!0};return O.jsxs(S.Fragment,{children:[O.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:m,onFocus:v}),O.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:u,"data-testid":"sentinelEnd"})]})}var $r="top",Nn="bottom",Rn="right",Hr="left",ub="auto",Id=[$r,Nn,Rn,Hr],$l="start",sd="end",xq="clippingParents",B3="viewport",bc="popper",wq="reference",n4=Id.reduce(function(e,t){return e.concat([t+"-"+$l,t+"-"+sd])},[]),F3=[].concat(Id,[ub]).reduce(function(e,t){return e.concat([t,t+"-"+$l,t+"-"+sd])},[]),Sq="beforeRead",Eq="read",Cq="afterRead",Mq="beforeMain",Tq="main",Oq="afterMain",_q="beforeWrite",Aq="write",Nq="afterWrite",Rq=[Sq,Eq,Cq,Mq,Tq,Oq,_q,Aq,Nq];function Eo(e){return e?(e.nodeName||"").toLowerCase():null}function un(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ca(e){var t=un(e).Element;return e instanceof t||e instanceof Element}function Mn(e){var t=un(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function db(e){if(typeof ShadowRoot>"u")return!1;var t=un(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Pq(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!Mn(i)||!Eo(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function zq(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=s.reduce(function(l,c){return l[c]="",l},{});!Mn(o)||!Eo(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const Lq={name:"applyStyles",enabled:!0,phase:"write",fn:Pq,effect:zq,requires:["computeStyles"]};function ko(e){return e.split("-")[0]}var qs=Math.max,oh=Math.min,Hl=Math.round;function F0(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function V3(){return!/^((?!chrome|android).)*safari/i.test(F0())}function Bl(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Mn(e)&&(o=e.offsetWidth>0&&Hl(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Hl(n.height)/e.offsetHeight||1);var s=ca(e)?un(e):window,a=s.visualViewport,l=!V3()&&r,c=(n.left+(l&&a?a.offsetLeft:0))/o,u=(n.top+(l&&a?a.offsetTop:0))/i,d=n.width/o,f=n.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function fb(e){var t=Bl(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function j3(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&db(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ti(e){return un(e).getComputedStyle(e)}function Iq(e){return["table","td","th"].indexOf(Eo(e))>=0}function hs(e){return((ca(e)?e.ownerDocument:e.document)||window.document).documentElement}function Im(e){return Eo(e)==="html"?e:e.assignedSlot||e.parentNode||(db(e)?e.host:null)||hs(e)}function o4(e){return!Mn(e)||ti(e).position==="fixed"?null:e.offsetParent}function Dq(e){var t=/firefox/i.test(F0()),r=/Trident/i.test(F0());if(r&&Mn(e)){var n=ti(e);if(n.position==="fixed")return null}var o=Im(e);for(db(o)&&(o=o.host);Mn(o)&&["html","body"].indexOf(Eo(o))<0;){var i=ti(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Dd(e){for(var t=un(e),r=o4(e);r&&Iq(r)&&ti(r).position==="static";)r=o4(r);return r&&(Eo(r)==="html"||Eo(r)==="body"&&ti(r).position==="static")?t:r||Dq(e)||t}function pb(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ku(e,t,r){return qs(e,oh(t,r))}function $q(e,t,r){var n=ku(e,t,r);return n>r?r:n}function U3(){return{top:0,right:0,bottom:0,left:0}}function W3(e){return Object.assign({},U3(),e)}function K3(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Hq=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,W3(typeof t!="number"?t:K3(t,Id))};function Bq(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=ko(r.placement),l=pb(a),c=[Hr,Rn].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var d=Hq(o.padding,r),f=fb(i),p=l==="y"?$r:Hr,h=l==="y"?Nn:Rn,m=r.rects.reference[u]+r.rects.reference[l]-s[l]-r.rects.popper[u],b=s[l]-r.rects.reference[l],v=Dd(i),g=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,y=m/2-b/2,k=d[p],x=g-f[u]-d[h],w=g/2-f[u]/2+y,E=ku(k,w,x),M=l;r.modifiersData[n]=(t={},t[M]=E,t.centerOffset=E-w,t)}}function Fq(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||j3(t.elements.popper,o)&&(t.elements.arrow=o))}const Vq={name:"arrow",enabled:!0,phase:"main",fn:Bq,effect:Fq,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fl(e){return e.split("-")[1]}var jq={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uq(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Hl(r*o)/o||0,y:Hl(n*o)/o||0}}function i4(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,p=f===void 0?0:f,h=s.y,m=h===void 0?0:h,b=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=b.x,m=b.y;var v=s.hasOwnProperty("x"),g=s.hasOwnProperty("y"),y=Hr,k=$r,x=window;if(c){var w=Dd(r),E="clientHeight",M="clientWidth";if(w===un(r)&&(w=hs(r),ti(w).position!=="static"&&a==="absolute"&&(E="scrollHeight",M="scrollWidth")),w=w,o===$r||(o===Hr||o===Rn)&&i===sd){k=Nn;var C=d&&w===x&&x.visualViewport?x.visualViewport.height:w[E];m-=C-n.height,m*=l?1:-1}if(o===Hr||(o===$r||o===Nn)&&i===sd){y=Rn;var T=d&&w===x&&x.visualViewport?x.visualViewport.width:w[M];p-=T-n.width,p*=l?1:-1}}var N=Object.assign({position:a},c&&jq),z=u===!0?Uq({x:p,y:m},un(r)):{x:p,y:m};if(p=z.x,m=z.y,l){var D;return Object.assign({},N,(D={},D[k]=g?"0":"",D[y]=v?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",D))}return Object.assign({},N,(t={},t[k]=g?m+"px":"",t[y]=v?p+"px":"",t.transform="",t))}function Wq(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,a=r.roundOffsets,l=a===void 0?!0:a,c={placement:ko(t.placement),variation:Fl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,i4(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,i4(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Kq={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Wq,data:{}};var pf={passive:!0};function qq(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=un(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",r.update,pf)}),a&&l.addEventListener("resize",r.update,pf),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",r.update,pf)}),a&&l.removeEventListener("resize",r.update,pf)}}const Gq={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qq,data:{}};var Yq={left:"right",right:"left",bottom:"top",top:"bottom"};function ep(e){return e.replace(/left|right|bottom|top/g,function(t){return Yq[t]})}var Jq={start:"end",end:"start"};function s4(e){return e.replace(/start|end/g,function(t){return Jq[t]})}function hb(e){var t=un(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function mb(e){return Bl(hs(e)).left+hb(e).scrollLeft}function Xq(e,t){var r=un(e),n=hs(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=V3();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+mb(e),y:l}}function Qq(e){var t,r=hs(e),n=hb(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=qs(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=qs(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+mb(e),l=-n.scrollTop;return ti(o||r).direction==="rtl"&&(a+=qs(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function gb(e){var t=ti(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function q3(e){return["html","body","#document"].indexOf(Eo(e))>=0?e.ownerDocument.body:Mn(e)&&gb(e)?e:q3(Im(e))}function xu(e,t){var r;t===void 0&&(t=[]);var n=q3(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=un(n),s=o?[i].concat(i.visualViewport||[],gb(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(xu(Im(s)))}function V0(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zq(e,t){var r=Bl(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function a4(e,t,r){return t===B3?V0(Xq(e,r)):ca(t)?Zq(t,r):V0(Qq(hs(e)))}function eG(e){var t=xu(Im(e)),r=["absolute","fixed"].indexOf(ti(e).position)>=0,n=r&&Mn(e)?Dd(e):e;return ca(n)?t.filter(function(o){return ca(o)&&j3(o,n)&&Eo(o)!=="body"}):[]}function tG(e,t,r,n){var o=t==="clippingParents"?eG(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,c){var u=a4(e,c,n);return l.top=qs(u.top,l.top),l.right=oh(u.right,l.right),l.bottom=oh(u.bottom,l.bottom),l.left=qs(u.left,l.left),l},a4(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function G3(e){var t=e.reference,r=e.element,n=e.placement,o=n?ko(n):null,i=n?Fl(n):null,s=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,l;switch(o){case $r:l={x:s,y:t.y-r.height};break;case Nn:l={x:s,y:t.y+t.height};break;case Rn:l={x:t.x+t.width,y:a};break;case Hr:l={x:t.x-r.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?pb(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case $l:l[c]=l[c]-(t[u]/2-r[u]/2);break;case sd:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function ad(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,s=i===void 0?e.strategy:i,a=r.boundary,l=a===void 0?xq:a,c=r.rootBoundary,u=c===void 0?B3:c,d=r.elementContext,f=d===void 0?bc:d,p=r.altBoundary,h=p===void 0?!1:p,m=r.padding,b=m===void 0?0:m,v=W3(typeof b!="number"?b:K3(b,Id)),g=f===bc?wq:bc,y=e.rects.popper,k=e.elements[h?g:f],x=tG(ca(k)?k:k.contextElement||hs(e.elements.popper),l,u,s),w=Bl(e.elements.reference),E=G3({reference:w,element:y,strategy:"absolute",placement:o}),M=V0(Object.assign({},y,E)),C=f===bc?M:w,T={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},N=e.modifiersData.offset;if(f===bc&&N){var z=N[o];Object.keys(T).forEach(function(D){var F=[Rn,Nn].indexOf(D)>=0?1:-1,V=[$r,Nn].indexOf(D)>=0?"y":"x";T[D]+=z[V]*F})}return T}function rG(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?F3:l,u=Fl(n),d=u?a?n4:n4.filter(function(h){return Fl(h)===u}):Id,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=ad(e,{placement:m,boundary:o,rootBoundary:i,padding:s})[ko(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function nG(e){if(ko(e)===ub)return[];var t=ep(e);return[s4(e),t,s4(t)]}function oG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,b=t.options.placement,v=ko(b),g=v===b,y=l||(g||!h?[ep(b)]:nG(b)),k=[b].concat(y).reduce(function(ie,ue){return ie.concat(ko(ue)===ub?rG(t,{placement:ue,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):ue)},[]),x=t.rects.reference,w=t.rects.popper,E=new Map,M=!0,C=k[0],T=0;T=0,V=F?"width":"height",L=ad(t,{placement:N,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),K=F?D?Rn:Hr:D?Nn:$r;x[V]>w[V]&&(K=ep(K));var A=ep(K),P=[];if(i&&P.push(L[z]<=0),a&&P.push(L[K]<=0,L[A]<=0),P.every(function(ie){return ie})){C=N,M=!1;break}E.set(N,P)}if(M)for(var B=h?3:1,Y=function(ue){var de=k.find(function(he){var Me=E.get(he);if(Me)return Me.slice(0,ue).every(function(Se){return Se})});if(de)return C=de,"break"},J=B;J>0;J--){var _e=Y(J);if(_e==="break")break}t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}}const iG={name:"flip",enabled:!0,phase:"main",fn:oG,requiresIfExists:["offset"],data:{_skip:!1}};function l4(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function c4(e){return[$r,Rn,Nn,Hr].some(function(t){return e[t]>=0})}function sG(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=ad(t,{elementContext:"reference"}),a=ad(t,{altBoundary:!0}),l=l4(s,n),c=l4(a,o,i),u=c4(l),d=c4(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const aG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sG};function lG(e,t,r){var n=ko(e),o=[Hr,$r].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Hr,Rn].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function cG(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,s=F3.reduce(function(u,d){return u[d]=lG(d,t.rects,i),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}const uG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cG};function dG(e){var t=e.state,r=e.name;t.modifiersData[r]=G3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const fG={name:"popperOffsets",enabled:!0,phase:"read",fn:dG,data:{}};function pG(e){return e==="x"?"y":"x"}function hG(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=f===void 0?!0:f,h=r.tetherOffset,m=h===void 0?0:h,b=ad(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=ko(t.placement),g=Fl(t.placement),y=!g,k=pb(v),x=pG(k),w=t.modifiersData.popperOffsets,E=t.rects.reference,M=t.rects.popper,C=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,T=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(w){if(i){var D,F=k==="y"?$r:Hr,V=k==="y"?Nn:Rn,L=k==="y"?"height":"width",K=w[k],A=K+b[F],P=K-b[V],B=p?-M[L]/2:0,Y=g===$l?E[L]:M[L],J=g===$l?-M[L]:-E[L],_e=t.elements.arrow,ie=p&&_e?fb(_e):{width:0,height:0},ue=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:U3(),de=ue[F],he=ue[V],Me=ku(0,E[L],ie[L]),Se=y?E[L]/2-B-Me-de-T.mainAxis:Y-Me-de-T.mainAxis,ut=y?-E[L]/2+B+Me+he+T.mainAxis:J+Me+he+T.mainAxis,et=t.elements.arrow&&Dd(t.elements.arrow),Cr=et?k==="y"?et.clientTop||0:et.clientLeft||0:0,pe=(D=N==null?void 0:N[k])!=null?D:0,Ie=K+Se-pe-Cr,We=K+ut-pe,In=ku(p?oh(A,Ie):A,K,p?qs(P,We):P);w[k]=In,z[k]=In-K}if(a){var Ur,tr=k==="x"?$r:Hr,Oo=k==="x"?Nn:Rn,Pt=w[x],Wr=x==="y"?"height":"width",hn=Pt+b[tr],Dn=Pt-b[Oo],Je=[$r,Hr].indexOf(v)!==-1,Kr=(Ur=N==null?void 0:N[x])!=null?Ur:0,mn=Je?hn:Pt-E[Wr]-M[Wr]-Kr+T.altAxis,li=Je?Pt+E[Wr]+M[Wr]-Kr-T.altAxis:Dn,ka=p&&Je?$q(mn,Pt,li):ku(p?mn:hn,Pt,p?li:Dn);w[x]=ka,z[x]=ka-Pt}t.modifiersData[n]=z}}const mG={name:"preventOverflow",enabled:!0,phase:"main",fn:hG,requiresIfExists:["offset"]};function gG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vG(e){return e===un(e)||!Mn(e)?hb(e):gG(e)}function yG(e){var t=e.getBoundingClientRect(),r=Hl(t.width)/e.offsetWidth||1,n=Hl(t.height)/e.offsetHeight||1;return r!==1||n!==1}function bG(e,t,r){r===void 0&&(r=!1);var n=Mn(t),o=Mn(t)&&yG(t),i=hs(t),s=Bl(e,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Eo(t)!=="body"||gb(i))&&(a=vG(t)),Mn(t)?(l=Bl(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=mb(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function kG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=t.get(a);l&&o(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function xG(e){var t=kG(e);return Rq.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function wG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function SG(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var u4={placement:"bottom",modifiers:[],strategy:"absolute"};function d4(){for(var e=arguments.length,t=new Array(e),r=0;r{i||a(TG(o)||document.body)},[o,i]),sa(()=>{if(s&&!i)return z0(r,s),()=>{z0(r,null)}},[r,s,i]),i){if(S.isValidElement(n)){const c={ref:l};return S.cloneElement(n,c)}return O.jsx(S.Fragment,{children:n})}return O.jsx(S.Fragment,{children:s&&Yh.createPortal(n,s)})});function OG(e){return Ft("MuiPopper",e)}Vt("MuiPopper",["root"]);const _G=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],AG=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function NG(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function j0(e){return typeof e=="function"?e():e}function RG(e){return e.nodeType!==void 0}const PG=()=>er({root:["root"]},cq(OG)),zG={},LG=S.forwardRef(function(t,r){var n;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:p={},slots:h={},TransitionProps:m}=t,b=ve(t,_G),v=S.useRef(null),g=Br(v,r),y=S.useRef(null),k=Br(y,f),x=S.useRef(k);sa(()=>{x.current=k},[k]),S.useImperativeHandle(f,()=>y.current,[]);const w=NG(u,s),[E,M]=S.useState(w),[C,T]=S.useState(j0(o));S.useEffect(()=>{y.current&&y.current.forceUpdate()}),S.useEffect(()=>{o&&T(j0(o))},[o]),sa(()=>{if(!C||!c)return;const V=A=>{M(A.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:A})=>{V(A)}}];l!=null&&(L=L.concat(l)),d&&d.modifiers!=null&&(L=L.concat(d.modifiers));const K=MG(C,v.current,_({placement:w},d,{modifiers:L}));return x.current(K),()=>{K.destroy(),x.current(null)}},[C,a,l,c,d,w]);const N={placement:E};m!==null&&(N.TransitionProps=m);const z=PG(),D=(n=h.root)!=null?n:"div",F=ei({elementType:D,externalSlotProps:p.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:g},ownerState:t,className:z.root});return O.jsx(D,_({},F,{children:typeof i=="function"?i(N):i}))}),IG=S.forwardRef(function(t,r){const{anchorEl:n,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=zG,popperRef:p,style:h,transition:m=!1,slotProps:b={},slots:v={}}=t,g=ve(t,AG),[y,k]=S.useState(!0),x=()=>{k(!1)},w=()=>{k(!0)};if(!l&&!u&&(!m||y))return null;let E;if(i)E=i;else if(n){const T=j0(n);E=T&&RG(T)?Dr(T).body:Dr(null).body}const M=!u&&l&&(!m||y)?"none":void 0,C=m?{in:u,onEnter:x,onExited:w}:void 0;return O.jsx(Y3,{disablePortal:a,container:E,children:O.jsx(LG,_({anchorEl:n,direction:s,disablePortal:a,modifiers:c,ref:r,open:m?!y:u,placement:d,popperOptions:f,popperRef:p,slotProps:b,slots:v},g,{style:_({position:"fixed",top:0,left:0,display:M},h),TransitionProps:C,children:o}))})});function DG(e){const t=Dr(e);return t.body===e?rd(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function wu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function f4(e){return parseInt(rd(e).getComputedStyle(e).paddingRight,10)||0}function $G(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function p4(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,s=>{const a=i.indexOf(s)===-1,l=!$G(s);a&&l&&wu(s,o)})}function jg(e,t){let r=-1;return e.some((n,o)=>t(n)?(r=o,!0):!1),r}function HG(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(DG(n)){const s=o3(Dr(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${f4(n)+s}px`;const a=Dr(n).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${f4(l)+s}px`})}let i;if(n.parentNode instanceof DocumentFragment)i=Dr(n).body;else{const s=n.parentElement,a=rd(n);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:n}r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function BG(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class FG{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&wu(t.modalRef,!1);const o=BG(r);p4(r,t.mount,t.modalRef,o,!0);const i=jg(this.containers,s=>s.container===r);return i!==-1?(this.containers[i].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),n)}mount(t,r){const n=jg(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[n];o.restore||(o.restore=HG(o,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const o=jg(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&wu(t.modalRef,r),p4(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&wu(s.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function VG(e){return typeof e=="function"?e():e}function jG(e){return e?e.props.hasOwnProperty("in"):!1}const UG=new FG;function WG(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=UG,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=S.useRef({}),p=S.useRef(null),h=S.useRef(null),m=Br(h,d),[b,v]=S.useState(!u),g=jG(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const k=()=>Dr(p.current),x=()=>(f.current.modalRef=h.current,f.current.mount=p.current,f.current),w=()=>{o.mount(x(),{disableScrollLock:n}),h.current&&(h.current.scrollTop=0)},E=Hs(()=>{const L=VG(t)||k().body;o.add(x(),L),h.current&&w()}),M=S.useCallback(()=>o.isTopModal(x()),[o]),C=Hs(L=>{p.current=L,L&&(u&&M()?w():h.current&&wu(h.current,y))}),T=S.useCallback(()=>{o.remove(x(),y)},[y,o]);S.useEffect(()=>()=>{T()},[T]),S.useEffect(()=>{u?E():(!g||!i)&&T()},[u,T,g,i,E]);const N=L=>K=>{var A;(A=L.onKeyDown)==null||A.call(L,K),!(K.key!=="Escape"||!M())&&(r||(K.stopPropagation(),c&&c(K,"escapeKeyDown")))},z=L=>K=>{var A;(A=L.onClick)==null||A.call(L,K),K.target===K.currentTarget&&c&&c(K,"backdropClick")};return{getRootProps:(L={})=>{const K=H3(e);delete K.onTransitionEnter,delete K.onTransitionExited;const A=_({},K,L);return _({role:"presentation"},A,{onKeyDown:N(A),ref:m})},getBackdropProps:(L={})=>{const K=L;return _({"aria-hidden":!0},K,{onClick:z(K),open:u})},getTransitionProps:()=>{const L=()=>{v(!1),s&&s()},K=()=>{v(!0),a&&a(),i&&T()};return{onEnter:Ew(L,l==null?void 0:l.props.onEnter),onExited:Ew(K,l==null?void 0:l.props.onExited)}},rootRef:m,portalRef:C,isTopModal:M,exited:b,hasTransition:g}}const KG=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],qG=Ye(IG,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),GG=S.forwardRef(function(t,r){var n;const o=eb(),i=Ut({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:p,open:h,placement:m,popperOptions:b,popperRef:v,transition:g,slots:y,slotProps:k}=i,x=ve(i,KG),w=(n=y==null?void 0:y.root)!=null?n:l==null?void 0:l.Root,E=_({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:p,open:h,placement:m,popperOptions:b,popperRef:v,transition:g},x);return O.jsx(qG,_({as:a,direction:o==null?void 0:o.direction,slots:{root:w},slotProps:k??c},E,{ref:r}))}),vb=GG,YG=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],JG={entering:{opacity:1},entered:{opacity:1}},XG=S.forwardRef(function(t,r){const n=zm(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:m,style:b,timeout:v=o,TransitionComponent:g=I3}=t,y=ve(t,YG),k=S.useRef(null),x=Br(k,a.ref,r),w=F=>V=>{if(F){const L=k.current;V===void 0?F(L):F(L,V)}},E=w(f),M=w((F,V)=>{D3(F);const L=nh({style:b,timeout:v,easing:l},{mode:"enter"});F.style.webkitTransition=n.transitions.create("opacity",L),F.style.transition=n.transitions.create("opacity",L),u&&u(F,V)}),C=w(d),T=w(m),N=w(F=>{const V=nh({style:b,timeout:v,easing:l},{mode:"exit"});F.style.webkitTransition=n.transitions.create("opacity",V),F.style.transition=n.transitions.create("opacity",V),p&&p(F)}),z=w(h),D=F=>{i&&i(k.current,F)};return O.jsx(g,_({appear:s,in:c,nodeRef:k,onEnter:M,onEntered:C,onEntering:E,onExit:N,onExited:z,onExiting:T,addEndListener:D,timeout:v},y,{children:(F,V)=>S.cloneElement(a,_({style:_({opacity:0,visibility:F==="exited"&&!c?"hidden":void 0},JG[F],b,a.props.style),ref:x},V))}))}),QG=XG;function ZG(e){return Ft("MuiBackdrop",e)}Vt("MuiBackdrop",["root","invisible"]);const eY=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],tY=e=>{const{classes:t,invisible:r}=e;return er({root:["root",r&&"invisible"]},ZG,t)},rY=Ye("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>_({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),nY=S.forwardRef(function(t,r){var n,o,i;const s=Ut({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:b=QG,transitionDuration:v}=s,g=ve(s,eY),y=_({},s,{component:c,invisible:f}),k=tY(y),x=(n=h.root)!=null?n:d.root;return O.jsx(b,_({in:p,timeout:v},g,{children:O.jsx(rY,_({"aria-hidden":!0},x,{as:(o=(i=m.root)!=null?i:u.Root)!=null?o:c,className:Ce(k.root,l,x==null?void 0:x.className),ownerState:_({},y,x==null?void 0:x.ownerState),classes:k,ref:r,children:a}))}))}),oY=nY;function iY(e){return Ft("MuiBadge",e)}const sY=Vt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),fi=sY,aY=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Ug=10,Wg=4,lY=e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${Be(r.vertical)}${Be(r.horizontal)}`,`anchorOrigin${Be(r.vertical)}${Be(r.horizontal)}${Be(o)}`,`overlap${Be(o)}`,t!=="default"&&`color${Be(t)}`]};return er(a,iY,s)},cY=Ye("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),uY=Ye("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${Be(r.anchorOrigin.vertical)}${Be(r.anchorOrigin.horizontal)}${Be(r.overlap)}`],r.color!=="default"&&t[`color${Be(r.color)}`],r.invisible&&t.invisible]}})(({theme:e,ownerState:t})=>_({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:Ug*2,lineHeight:1,padding:"0 6px",height:Ug*2,borderRadius:Ug,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.variant==="dot"&&{borderRadius:Wg,height:Wg*2,minWidth:Wg*2,padding:0},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${fi.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})})),dY=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Ut({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:p={},componentsProps:h={},children:m,overlap:b="rectangular",color:v="default",invisible:g=!1,max:y=99,badgeContent:k,slots:x,slotProps:w,showZero:E=!1,variant:M="standard"}=c,C=ve(c,aY),{badgeContent:T,invisible:N,max:z,displayValue:D}=pq({max:y,invisible:g,badgeContent:k,showZero:E}),F=i3({anchorOrigin:u,color:v,overlap:b,variant:M,badgeContent:k}),V=N||T==null&&M!=="dot",{color:L=v,overlap:K=b,anchorOrigin:A=u,variant:P=M}=V?F:c,B=P!=="dot"?D:void 0,Y=_({},c,{badgeContent:T,invisible:V,max:z,displayValue:B,showZero:E,anchorOrigin:A,color:L,overlap:K,variant:P}),J=lY(Y),_e=(n=(o=x==null?void 0:x.root)!=null?o:p.Root)!=null?n:cY,ie=(i=(s=x==null?void 0:x.badge)!=null?s:p.Badge)!=null?i:uY,ue=(a=w==null?void 0:w.root)!=null?a:h.root,de=(l=w==null?void 0:w.badge)!=null?l:h.badge,he=ei({elementType:_e,externalSlotProps:ue,externalForwardedProps:C,additionalProps:{ref:r,as:f},ownerState:Y,className:Ce(ue==null?void 0:ue.className,J.root,d)}),Me=ei({elementType:ie,externalSlotProps:de,ownerState:Y,className:Ce(J.badge,de==null?void 0:de.className)});return O.jsxs(_e,_({},he,{children:[m,O.jsx(ie,_({},Me,{children:B}))]}))}),fY=dY,pY=ob(),hY=iW({themeId:Il,defaultTheme:pY,defaultClassName:"MuiBox-root",generateClassName:a3.generate}),J3=hY;function mY(e){return Ft("MuiModal",e)}Vt("MuiModal",["root","hidden","backdrop"]);const gY=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],vY=e=>{const{open:t,exited:r,classes:n}=e;return er({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},mY,n)},yY=Ye("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>_({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),bY=Ye(oY,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kY=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Ut({name:"MuiModal",props:t}),{BackdropComponent:u=bY,BackdropProps:d,className:f,closeAfterTransition:p=!1,children:h,container:m,component:b,components:v={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:k=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:E=!1,disableScrollLock:M=!1,hideBackdrop:C=!1,keepMounted:T=!1,onBackdropClick:N,open:z,slotProps:D,slots:F}=c,V=ve(c,gY),L=_({},c,{closeAfterTransition:p,disableAutoFocus:y,disableEnforceFocus:k,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:E,disableScrollLock:M,hideBackdrop:C,keepMounted:T}),{getRootProps:K,getBackdropProps:A,getTransitionProps:P,portalRef:B,isTopModal:Y,exited:J,hasTransition:_e}=WG(_({},L,{rootRef:r})),ie=_({},L,{exited:J}),ue=vY(ie),de={};if(h.props.tabIndex===void 0&&(de.tabIndex="-1"),_e){const{onEnter:pe,onExited:Ie}=P();de.onEnter=pe,de.onExited=Ie}const he=(n=(o=F==null?void 0:F.root)!=null?o:v.Root)!=null?n:yY,Me=(i=(s=F==null?void 0:F.backdrop)!=null?s:v.Backdrop)!=null?i:u,Se=(a=D==null?void 0:D.root)!=null?a:g.root,ut=(l=D==null?void 0:D.backdrop)!=null?l:g.backdrop,et=ei({elementType:he,externalSlotProps:Se,externalForwardedProps:V,getSlotProps:K,additionalProps:{ref:r,as:b},ownerState:ie,className:Ce(f,Se==null?void 0:Se.className,ue==null?void 0:ue.root,!ie.open&&ie.exited&&(ue==null?void 0:ue.hidden))}),Cr=ei({elementType:Me,externalSlotProps:ut,additionalProps:d,getSlotProps:pe=>A(_({},pe,{onClick:Ie=>{N&&N(Ie),pe!=null&&pe.onClick&&pe.onClick(Ie)}})),className:Ce(ut==null?void 0:ut.className,d==null?void 0:d.className,ue==null?void 0:ue.backdrop),ownerState:ie});return!T&&!z&&(!_e||J)?null:O.jsx(Y3,{ref:B,container:m,disablePortal:w,children:O.jsxs(he,_({},et,{children:[!C&&u?O.jsx(Me,_({},Cr)):null,O.jsx(kq,{disableEnforceFocus:k,disableAutoFocus:y,disableRestoreFocus:E,isEnabled:Y,open:z,children:S.cloneElement(h,de)})]}))})}),xY=kY,wY=Vt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),h4=wY,SY=DW({createStyledComponent:Ye("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Ut({props:e,name:"MuiStack"})}),EY=SY,CY=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function U0(e){return`scale(${e}, ${e**2})`}const MY={entering:{opacity:1,transform:U0(1)},entered:{opacity:1,transform:"none"}},Kg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),X3=S.forwardRef(function(t,r){const{addEndListener:n,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:m="auto",TransitionComponent:b=I3}=t,v=ve(t,CY),g=S.useRef(),y=S.useRef(),k=zm(),x=S.useRef(null),w=Br(x,i.ref,r),E=V=>L=>{if(V){const K=x.current;L===void 0?V(K):V(K,L)}},M=E(u),C=E((V,L)=>{D3(V);const{duration:K,delay:A,easing:P}=nh({style:h,timeout:m,easing:s},{mode:"enter"});let B;m==="auto"?(B=k.transitions.getAutoHeightDuration(V.clientHeight),y.current=B):B=K,V.style.transition=[k.transitions.create("opacity",{duration:B,delay:A}),k.transitions.create("transform",{duration:Kg?B:B*.666,delay:A,easing:P})].join(","),l&&l(V,L)}),T=E(c),N=E(p),z=E(V=>{const{duration:L,delay:K,easing:A}=nh({style:h,timeout:m,easing:s},{mode:"exit"});let P;m==="auto"?(P=k.transitions.getAutoHeightDuration(V.clientHeight),y.current=P):P=L,V.style.transition=[k.transitions.create("opacity",{duration:P,delay:K}),k.transitions.create("transform",{duration:Kg?P:P*.666,delay:Kg?K:K||P*.333,easing:A})].join(","),V.style.opacity=0,V.style.transform=U0(.75),d&&d(V)}),D=E(f),F=V=>{m==="auto"&&(g.current=setTimeout(V,y.current||0)),n&&n(x.current,V)};return S.useEffect(()=>()=>{clearTimeout(g.current)},[]),O.jsx(b,_({appear:o,in:a,nodeRef:x,onEnter:C,onEntered:T,onEntering:M,onExit:z,onExited:D,onExiting:N,addEndListener:F,timeout:m==="auto"?null:m},v,{children:(V,L)=>S.cloneElement(i,_({style:_({opacity:0,transform:U0(.75),visibility:V==="exited"&&!a?"hidden":void 0},MY[V],h,i.props.style),ref:w},L))}))});X3.muiSupportAuto=!0;const W0=X3,TY=S.createContext({}),ld=TY;function OY(e){return Ft("MuiList",e)}Vt("MuiList",["root","padding","dense","subheader"]);const _Y=["children","className","component","dense","disablePadding","subheader"],AY=e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return er({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},OY,t)},NY=Ye("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>_({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),RY=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=n,u=ve(n,_Y),d=S.useMemo(()=>({dense:a}),[a]),f=_({},n,{component:s,dense:a,disablePadding:l}),p=AY(f);return O.jsx(ld.Provider,{value:d,children:O.jsxs(NY,_({as:s,className:Ce(p.root,i),ref:r,ownerState:f},u,{children:[c,o]}))})}),PY=RY;function zY(e){return Ft("MuiListItemIcon",e)}const LY=Vt("MuiListItemIcon",["root","alignItemsFlexStart"]),m4=LY,IY=["className"],DY=e=>{const{alignItems:t,classes:r}=e;return er({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},zY,r)},$Y=Ye("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>_({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),HY=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiListItemIcon"}),{className:o}=n,i=ve(n,IY),s=S.useContext(ld),a=_({},n,{alignItems:s.alignItems}),l=DY(a);return O.jsx($Y,_({className:Ce(l.root,o),ownerState:a,ref:r},i))}),BY=HY;function FY(e){return Ft("MuiListItemText",e)}const VY=Vt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),ih=VY,jY=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],UY=e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return er({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},FY,t)},WY=Ye("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${ih.primary}`]:t.primary},{[`& .${ih.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>_({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),KY=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=n,f=ve(n,jY),{dense:p}=S.useContext(ld);let h=l??o,m=u;const b=_({},n,{disableTypography:s,inset:a,primary:!!h,secondary:!!m,dense:p}),v=UY(b);return h!=null&&h.type!==Zc&&!s&&(h=O.jsx(Zc,_({variant:p?"body2":"body1",className:v.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),m!=null&&m.type!==Zc&&!s&&(m=O.jsx(Zc,_({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:m}))),O.jsxs(WY,_({className:Ce(v.root,i),ownerState:b,ref:r},f,{children:[h,m]}))}),qY=KY,GY=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function qg(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function g4(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Q3(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function kc(e,t,r,n,o,i){let s=!1,a=o(e,t,t?r:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=n?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!Q3(a,i)||l)a=o(e,a,r);else return a.focus(),!0}return!1}const YY=S.forwardRef(function(t,r){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=ve(t,GY),p=S.useRef(null),h=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});sa(()=>{o&&p.current.focus()},[o]),S.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(y,k)=>{const x=!p.current.style.width;if(y.clientHeight{const k=p.current,x=y.key,w=Dr(k).activeElement;if(x==="ArrowDown")y.preventDefault(),kc(k,w,c,l,qg);else if(x==="ArrowUp")y.preventDefault(),kc(k,w,c,l,g4);else if(x==="Home")y.preventDefault(),kc(k,null,c,l,qg);else if(x==="End")y.preventDefault(),kc(k,null,c,l,g4);else if(x.length===1){const E=h.current,M=x.toLowerCase(),C=performance.now();E.keys.length>0&&(C-E.lastTime>500?(E.keys=[],E.repeating=!0,E.previousKeyMatched=!0):E.repeating&&M!==E.keys[0]&&(E.repeating=!1)),E.lastTime=C,E.keys.push(M);const T=w&&!E.repeating&&Q3(w,E);E.previousKeyMatched&&(T||kc(k,w,!1,l,qg,E))?y.preventDefault():E.previousKeyMatched=!1}u&&u(y)},b=Br(p,r);let v=-1;S.Children.forEach(s,(y,k)=>{if(!S.isValidElement(y)){v===k&&(v+=1,v>=s.length&&(v=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||v===-1)&&(v=k),v===k&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const g=S.Children.map(s,(y,k)=>{if(k===v){const x={};return i&&(x.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(x.tabIndex=0),S.cloneElement(y,x)}return y});return O.jsx(PY,_({role:"menu",ref:b,className:a,onKeyDown:m,tabIndex:o?0:-1},f,{children:g}))}),JY=YY;function XY(e){return Ft("MuiPopover",e)}Vt("MuiPopover",["root","paper"]);const QY=["onEntering"],ZY=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],eJ=["slotProps"];function v4(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function y4(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function b4(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Gg(e){return typeof e=="function"?e():e}const tJ=e=>{const{classes:t}=e;return er({root:["root"],paper:["paper"]},XY,t)},rJ=Ye(xY,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z3=Ye(TK,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),nJ=S.forwardRef(function(t,r){var n,o,i;const s=Ut({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:p,container:h,elevation:m=8,marginThreshold:b=16,open:v,PaperProps:g={},slots:y,slotProps:k,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=W0,transitionDuration:E="auto",TransitionProps:{onEntering:M}={},disableScrollLock:C=!1}=s,T=ve(s.TransitionProps,QY),N=ve(s,ZY),z=(n=k==null?void 0:k.paper)!=null?n:g,D=S.useRef(),F=Br(D,z.ref),V=_({},s,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:b,externalPaperSlotProps:z,transformOrigin:x,TransitionComponent:w,transitionDuration:E,TransitionProps:T}),L=tJ(V),K=S.useCallback(()=>{if(d==="anchorPosition")return u;const pe=Gg(l),We=(pe&&pe.nodeType===1?pe:Dr(D.current).body).getBoundingClientRect();return{top:We.top+v4(We,c.vertical),left:We.left+y4(We,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),A=S.useCallback(pe=>({vertical:v4(pe,x.vertical),horizontal:y4(pe,x.horizontal)}),[x.horizontal,x.vertical]),P=S.useCallback(pe=>{const Ie={width:pe.offsetWidth,height:pe.offsetHeight},We=A(Ie);if(d==="none")return{top:null,left:null,transformOrigin:b4(We)};const In=K();let Ur=In.top-We.vertical,tr=In.left-We.horizontal;const Oo=Ur+Ie.height,Pt=tr+Ie.width,Wr=rd(Gg(l)),hn=Wr.innerHeight-b,Dn=Wr.innerWidth-b;if(b!==null&&Urhn){const Je=Oo-hn;Ur-=Je,We.vertical+=Je}if(b!==null&&trDn){const Je=Pt-Dn;tr-=Je,We.horizontal+=Je}return{top:`${Math.round(Ur)}px`,left:`${Math.round(tr)}px`,transformOrigin:b4(We)}},[l,d,K,A,b]),[B,Y]=S.useState(v),J=S.useCallback(()=>{const pe=D.current;if(!pe)return;const Ie=P(pe);Ie.top!==null&&(pe.style.top=Ie.top),Ie.left!==null&&(pe.style.left=Ie.left),pe.style.transformOrigin=Ie.transformOrigin,Y(!0)},[P]);S.useEffect(()=>(C&&window.addEventListener("scroll",J),()=>window.removeEventListener("scroll",J)),[l,C,J]);const _e=(pe,Ie)=>{M&&M(pe,Ie),J()},ie=()=>{Y(!1)};S.useEffect(()=>{v&&J()}),S.useImperativeHandle(a,()=>v?{updatePosition:()=>{J()}}:null,[v,J]),S.useEffect(()=>{if(!v)return;const pe=jV(()=>{J()}),Ie=rd(l);return Ie.addEventListener("resize",pe),()=>{pe.clear(),Ie.removeEventListener("resize",pe)}},[l,v,J]);let ue=E;E==="auto"&&!w.muiSupportAuto&&(ue=void 0);const de=h||(l?Dr(Gg(l)).body:void 0),he=(o=y==null?void 0:y.root)!=null?o:rJ,Me=(i=y==null?void 0:y.paper)!=null?i:Z3,Se=ei({elementType:Me,externalSlotProps:_({},z,{style:B?z.style:_({},z.style,{opacity:0})}),additionalProps:{elevation:m,ref:F},ownerState:V,className:Ce(L.paper,z==null?void 0:z.className)}),ut=ei({elementType:he,externalSlotProps:(k==null?void 0:k.root)||{},externalForwardedProps:N,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:de,open:v},ownerState:V,className:Ce(L.root,p)}),{slotProps:et}=ut,Cr=ve(ut,eJ);return O.jsx(he,_({},Cr,!$3(he)&&{slotProps:et,disableScrollLock:C},{children:O.jsx(w,_({appear:!0,in:v,onEntering:_e,onExited:ie,timeout:ue},T,{children:O.jsx(Me,_({},Se,{children:f}))}))}))}),oJ=nJ;function iJ(e){return Ft("MuiMenu",e)}Vt("MuiMenu",["root","paper","list"]);const sJ=["onEntering"],aJ=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],lJ={vertical:"top",horizontal:"right"},cJ={vertical:"top",horizontal:"left"},uJ=e=>{const{classes:t}=e;return er({root:["root"],paper:["paper"],list:["list"]},iJ,t)},dJ=Ye(oJ,{shouldForwardProp:e=>sb(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fJ=Ye(Z3,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),pJ=Ye(JY,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),hJ=S.forwardRef(function(t,r){var n,o;const i=Ut({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:p={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:b}={},variant:v="selectedMenu",slots:g={},slotProps:y={}}=i,k=ve(i.TransitionProps,sJ),x=ve(i,aJ),w=zm(),E=w.direction==="rtl",M=_({},i,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:b,PaperProps:p,transitionDuration:m,TransitionProps:k,variant:v}),C=uJ(M),T=s&&!c&&f,N=S.useRef(null),z=(P,B)=>{N.current&&N.current.adjustStyleForScrollbar(P,w),b&&b(P,B)},D=P=>{P.key==="Tab"&&(P.preventDefault(),d&&d(P,"tabKeyDown"))};let F=-1;S.Children.map(a,(P,B)=>{S.isValidElement(P)&&(P.props.disabled||(v==="selectedMenu"&&P.props.selected||F===-1)&&(F=B))});const V=(n=g.paper)!=null?n:fJ,L=(o=y.paper)!=null?o:p,K=ei({elementType:g.root,externalSlotProps:y.root,ownerState:M,className:[C.root,l]}),A=ei({elementType:V,externalSlotProps:L,ownerState:M,className:C.paper});return O.jsx(dJ,_({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?lJ:cJ,slots:{paper:V,root:g.root},slotProps:{root:K,paper:A},open:f,ref:r,transitionDuration:m,TransitionProps:_({onEntering:z},k),ownerState:M},x,{classes:h,children:O.jsx(pJ,_({onKeyDown:D,actions:N,autoFocus:s&&(F===-1||c),autoFocusItem:T,variant:v},u,{className:Ce(C.list,u.className),children:a}))}))}),mJ=hJ;function gJ(e){return Ft("MuiMenuItem",e)}const vJ=Vt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xc=vJ,yJ=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],bJ=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},kJ=e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:s}=e,l=er({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},gJ,s);return _({},s,l)},xJ=Ye(cb,{shouldForwardProp:e=>sb(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:bJ})(({theme:e,ownerState:t})=>_({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${h4.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${h4.inset}`]:{marginLeft:52},[`& .${ih.root}`]:{marginTop:0,marginBottom:0},[`& .${ih.inset}`]:{paddingLeft:36},[`& .${m4.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&_({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${m4.root} svg`]:{fontSize:"1.25rem"}}))),wJ=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=n,p=ve(n,yJ),h=S.useContext(ld),m=S.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),b=S.useRef(null);sa(()=>{o&&b.current&&b.current.focus()},[o]);const v=_({},n,{dense:m.dense,divider:a,disableGutters:l}),g=kJ(n),y=Br(b,r);let k;return n.disabled||(k=d!==void 0?d:-1),O.jsx(ld.Provider,{value:m,children:O.jsx(xJ,_({ref:y,role:u,tabIndex:k,component:i,focusVisibleClassName:Ce(g.focusVisible,c),className:Ce(g.root,f)},p,{ownerState:v,classes:g}))})}),SJ=wJ;function EJ(e){return Ft("MuiTooltip",e)}const CJ=Vt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Ri=CJ,MJ=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function TJ(e){return Math.round(e*1e5)/1e5}const OJ=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,s={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${Be(i.split("-")[0])}`],arrow:["arrow"]};return er(s,EJ,t)},_J=Ye(vb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>_({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Ri.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ri.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ri.arrow}`]:_({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Ri.arrow}`]:_({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),AJ=Ye("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Be(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>_({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Rr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${TJ(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Ri.popper}[data-popper-placement*="left"] &`]:_({transformOrigin:"right center"},t.isRtl?_({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):_({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Ri.popper}[data-popper-placement*="right"] &`]:_({transformOrigin:"left center"},t.isRtl?_({marginRight:"14px"},t.touch&&{marginRight:"24px"}):_({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Ri.popper}[data-popper-placement*="top"] &`]:_({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Ri.popper}[data-popper-placement*="bottom"] &`]:_({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),NJ=Ye("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Rr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let hf=!1,Yg=null,wc={x:0,y:0};function mf(e,t){return r=>{t&&t(r),e(r)}}const RJ=S.forwardRef(function(t,r){var n,o,i,s,a,l,c,u,d,f,p,h,m,b,v,g,y,k,x;const w=Ut({props:t,name:"MuiTooltip"}),{arrow:E=!1,children:M,components:C={},componentsProps:T={},describeChild:N=!1,disableFocusListener:z=!1,disableHoverListener:D=!1,disableInteractive:F=!1,disableTouchListener:V=!1,enterDelay:L=100,enterNextDelay:K=0,enterTouchDelay:A=700,followCursor:P=!1,id:B,leaveDelay:Y=0,leaveTouchDelay:J=1500,onClose:_e,onOpen:ie,open:ue,placement:de="bottom",PopperComponent:he,PopperProps:Me={},slotProps:Se={},slots:ut={},title:et,TransitionComponent:Cr=W0,TransitionProps:pe}=w,Ie=ve(w,MJ),We=S.isValidElement(M)?M:O.jsx("span",{children:M}),In=zm(),Ur=In.direction==="rtl",[tr,Oo]=S.useState(),[Pt,Wr]=S.useState(null),hn=S.useRef(!1),Dn=F||P,Je=S.useRef(),Kr=S.useRef(),mn=S.useRef(),li=S.useRef(),[ka,fe]=qV({controlled:ue,default:!1,name:"Tooltip",state:"open"});let gn=ka;const rc=KV(B),ci=S.useRef(),nc=S.useCallback(()=>{ci.current!==void 0&&(document.body.style.WebkitUserSelect=ci.current,ci.current=void 0),clearTimeout(li.current)},[]);S.useEffect(()=>()=>{clearTimeout(Je.current),clearTimeout(Kr.current),clearTimeout(mn.current),nc()},[nc]);const pk=xe=>{clearTimeout(Yg),hf=!0,fe(!0),ie&&!gn&&ie(xe)},Vd=Hs(xe=>{clearTimeout(Yg),Yg=setTimeout(()=>{hf=!1},800+Y),fe(!1),_e&&gn&&_e(xe),clearTimeout(Je.current),Je.current=setTimeout(()=>{hn.current=!1},In.transitions.duration.shortest)}),Bm=xe=>{hn.current&&xe.type!=="touchstart"||(tr&&tr.removeAttribute("title"),clearTimeout(Kr.current),clearTimeout(mn.current),L||hf&&K?Kr.current=setTimeout(()=>{pk(xe)},hf?K:L):pk(xe))},hk=xe=>{clearTimeout(Kr.current),clearTimeout(mn.current),mn.current=setTimeout(()=>{Vd(xe)},Y)},{isFocusVisibleRef:mk,onBlur:gO,onFocus:vO,ref:yO}=n3(),[,gk]=S.useState(!1),vk=xe=>{gO(xe),mk.current===!1&&(gk(!1),hk(xe))},yk=xe=>{tr||Oo(xe.currentTarget),vO(xe),mk.current===!0&&(gk(!0),Bm(xe))},bk=xe=>{hn.current=!0;const qr=We.props;qr.onTouchStart&&qr.onTouchStart(xe)},kk=Bm,xk=hk,bO=xe=>{bk(xe),clearTimeout(mn.current),clearTimeout(Je.current),nc(),ci.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",li.current=setTimeout(()=>{document.body.style.WebkitUserSelect=ci.current,Bm(xe)},A)},kO=xe=>{We.props.onTouchEnd&&We.props.onTouchEnd(xe),nc(),clearTimeout(mn.current),mn.current=setTimeout(()=>{Vd(xe)},J)};S.useEffect(()=>{if(!gn)return;function xe(qr){(qr.key==="Escape"||qr.key==="Esc")&&Vd(qr)}return document.addEventListener("keydown",xe),()=>{document.removeEventListener("keydown",xe)}},[Vd,gn]);const xO=Br(We.ref,yO,Oo,r);!et&&et!==0&&(gn=!1);const Fm=S.useRef(),wO=xe=>{const qr=We.props;qr.onMouseMove&&qr.onMouseMove(xe),wc={x:xe.clientX,y:xe.clientY},Fm.current&&Fm.current.update()},oc={},Vm=typeof et=="string";N?(oc.title=!gn&&Vm&&!D?et:null,oc["aria-describedby"]=gn?rc:null):(oc["aria-label"]=Vm?et:null,oc["aria-labelledby"]=gn&&!Vm?rc:null);const $n=_({},oc,Ie,We.props,{className:Ce(Ie.className,We.props.className),onTouchStart:bk,ref:xO},P?{onMouseMove:wO}:{}),ic={};V||($n.onTouchStart=bO,$n.onTouchEnd=kO),D||($n.onMouseOver=mf(kk,$n.onMouseOver),$n.onMouseLeave=mf(xk,$n.onMouseLeave),Dn||(ic.onMouseOver=kk,ic.onMouseLeave=xk)),z||($n.onFocus=mf(yk,$n.onFocus),$n.onBlur=mf(vk,$n.onBlur),Dn||(ic.onFocus=yk,ic.onBlur=vk));const SO=S.useMemo(()=>{var xe;let qr=[{name:"arrow",enabled:!!Pt,options:{element:Pt,padding:4}}];return(xe=Me.popperOptions)!=null&&xe.modifiers&&(qr=qr.concat(Me.popperOptions.modifiers)),_({},Me.popperOptions,{modifiers:qr})},[Pt,Me]),sc=_({},w,{isRtl:Ur,arrow:E,disableInteractive:Dn,placement:de,PopperComponentProp:he,touch:hn.current}),jm=OJ(sc),wk=(n=(o=ut.popper)!=null?o:C.Popper)!=null?n:_J,Sk=(i=(s=(a=ut.transition)!=null?a:C.Transition)!=null?s:Cr)!=null?i:W0,Ek=(l=(c=ut.tooltip)!=null?c:C.Tooltip)!=null?l:AJ,Ck=(u=(d=ut.arrow)!=null?d:C.Arrow)!=null?u:NJ,EO=eu(wk,_({},Me,(f=Se.popper)!=null?f:T.popper,{className:Ce(jm.popper,Me==null?void 0:Me.className,(p=(h=Se.popper)!=null?h:T.popper)==null?void 0:p.className)}),sc),CO=eu(Sk,_({},pe,(m=Se.transition)!=null?m:T.transition),sc),MO=eu(Ek,_({},(b=Se.tooltip)!=null?b:T.tooltip,{className:Ce(jm.tooltip,(v=(g=Se.tooltip)!=null?g:T.tooltip)==null?void 0:v.className)}),sc),TO=eu(Ck,_({},(y=Se.arrow)!=null?y:T.arrow,{className:Ce(jm.arrow,(k=(x=Se.arrow)!=null?x:T.arrow)==null?void 0:k.className)}),sc);return O.jsxs(S.Fragment,{children:[S.cloneElement(We,$n),O.jsx(wk,_({as:he??vb,placement:de,anchorEl:P?{getBoundingClientRect:()=>({top:wc.y,left:wc.x,right:wc.x,bottom:wc.y,width:0,height:0})}:tr,popperRef:Fm,open:tr?gn:!1,id:rc,transition:!0},ic,EO,{popperOptions:SO,children:({TransitionProps:xe})=>O.jsx(Sk,_({timeout:In.transitions.duration.shorter},xe,CO,{children:O.jsxs(Ek,_({},MO,{children:[et,E?O.jsx(Ck,_({},TO,{ref:Wr})):null]}))}))}))]})}),eT=RJ;function PJ(e){return Ft("MuiToggleButton",e)}const zJ=Vt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),k4=zJ,LJ=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],IJ=e=>{const{classes:t,fullWidth:r,selected:n,disabled:o,size:i,color:s}=e,a={root:["root",n&&"selected",o&&"disabled",r&&"fullWidth",`size${Be(i)}`,s]};return er(a,PJ,t)},DJ=Ye(cb,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${Be(r.size)}`]]}})(({theme:e,ownerState:t})=>{let r=t.color==="standard"?e.palette.text.primary:e.palette[t.color].main,n;return e.vars&&(r=t.color==="standard"?e.vars.palette.text.primary:e.vars.palette[t.color].main,n=t.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),_({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},t.fullWidth&&{width:"100%"},{[`&.${k4.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Rr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${k4.selected}`]:{color:r,backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Rr(r,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${n} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rr(r,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Rr(r,e.palette.action.selectedOpacity)}}}},t.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},t.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),$J=S.forwardRef(function(t,r){const n=Ut({props:t,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:a=!1,disableFocusRipple:l=!1,fullWidth:c=!1,onChange:u,onClick:d,selected:f,size:p="medium",value:h}=n,m=ve(n,LJ),b=_({},n,{color:s,disabled:a,disableFocusRipple:l,fullWidth:c,size:p}),v=IJ(b),g=y=>{d&&(d(y,h),y.defaultPrevented)||u&&u(y,h)};return O.jsx(DJ,_({className:Ce(v.root,i),disabled:a,focusRipple:!l,ref:r,onClick:g,onChange:u,value:h,ownerState:b,"aria-pressed":f},m,{children:o}))}),HJ=$J;var BJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],FJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],VJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],jJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],UJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],WJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],KJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],qJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],GJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],YJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],JJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],XJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],QJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],ZJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],eX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],tX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],rX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],nX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],oX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],iX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],sX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],aX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],lX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],cX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],uX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],dX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],fX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],pX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],hX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],mX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],gX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],vX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],yX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],bX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],kX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],xX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],wX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],SX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],EX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],CX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],MX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],TX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],OX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],_X=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],AX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],NX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],RX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],PX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],zX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],LX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],IX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],DX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],$X=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],HX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],BX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],FX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],VX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],jX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],UX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],WX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],KX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],qX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],GX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],YX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],JX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],XX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],QX=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],ZX=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],eQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],tQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],rQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],nQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],oQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],iQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],sQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],aQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],lQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],cQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],uQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],dQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],fQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],pQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],hQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],mQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],gQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],vQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],yQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],bQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],kQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],xQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],wQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],SQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],EQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],CQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],MQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],TQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],OQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],_Q=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],AQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],NQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],RQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],PQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],zQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],LQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],IQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],DQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],$Q=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],HQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],BQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],FQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],VQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],jQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],UQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],WQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],KQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],qQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],GQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],YQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],JQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],XQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],QQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],ZQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],eZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],tZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],rZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],nZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],oZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],iZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],sZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],aZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],lZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],cZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],uZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],dZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],fZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],pZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],hZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],mZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],gZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],vZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],yZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],bZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],kZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],xZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],wZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],SZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const EZ=Object.freeze(Object.defineProperty({__proto__:null,ab:BJ,addFill:FJ,addLine:VJ,alertLine:jJ,alignBottom:UJ,alignCenter:WJ,alignJustify:KJ,alignLeft:qJ,alignRight:GJ,alignTop:YJ,alignVertically:JJ,appsLine:XJ,arrowDownSFill:QJ,arrowGoBackFill:ZJ,arrowGoForwardFill:eX,arrowLeftSFill:tX,arrowRightSFill:rX,arrowUpSFill:nX,asterisk:oX,attachment2:iX,bold:sX,bracesLine:aX,bringForward:lX,bringToFront:cX,chatNewLine:uX,checkboxCircleLine:dX,checkboxMultipleLine:fX,clipboardFill:pX,clipboardLine:hX,closeCircleLine:mX,closeFill:gX,closeLine:vX,codeLine:yX,codeView:bX,deleteBinFill:kX,deleteBinLine:xX,deleteColumn:wX,deleteRow:SX,doubleQuotesL:EX,doubleQuotesR:CX,download2Fill:MX,dragDropLine:TX,emphasis:_X,emphasisCn:OX,englishInput:AX,errorWarningLine:NX,externalLinkFill:RX,fileCopyLine:PX,flowChart:zX,fontColor:LX,fontSize:DX,fontSize2:IX,formatClear:$X,fullscreenExitLine:HX,fullscreenLine:BX,functions:FX,galleryUploadLine:VX,h1:jX,h2:UX,h3:WX,h4:KX,h5:qX,h6:GX,hashtag:YX,heading:JX,imageAddLine:XX,imageEditLine:QX,imageLine:ZX,indentDecrease:eQ,indentIncrease:tQ,informationLine:rQ,inputCursorMove:nQ,insertColumnLeft:oQ,insertColumnRight:iQ,insertRowBottom:sQ,insertRowTop:aQ,italic:lQ,layoutColumnLine:cQ,lineHeight:uQ,link:hQ,linkM:dQ,linkUnlink:pQ,linkUnlinkM:fQ,listCheck:gQ,listCheck2:mQ,listOrdered:vQ,listUnordered:yQ,markPenLine:bQ,markdownFill:kQ,markdownLine:xQ,mergeCellsHorizontal:wQ,mergeCellsVertical:SQ,mindMap:EQ,moreFill:CQ,nodeTree:MQ,number0:TQ,number1:OQ,number2:_Q,number3:AQ,number4:NQ,number5:RQ,number6:PQ,number7:zQ,number8:LQ,number9:IQ,omega:DQ,organizationChart:$Q,pageSeparator:HQ,paragraph:BQ,pencilFill:FQ,pencilLine:VQ,pinyinInput:jQ,questionMark:UQ,roundedCorner:WQ,scissorsFill:KQ,sendBackward:qQ,sendToBack:GQ,separator:YQ,singleQuotesL:JQ,singleQuotesR:XQ,sortAsc:QQ,sortDesc:ZQ,space:eZ,spamLine:tZ,splitCellsHorizontal:rZ,splitCellsVertical:nZ,strikethrough:iZ,strikethrough2:oZ,subscript:aZ,subscript2:sZ,subtractLine:lZ,superscript:uZ,superscript2:cZ,table2:dZ,tableLine:fZ,text:vZ,textDirectionL:pZ,textDirectionR:hZ,textSpacing:mZ,textWrap:gZ,translate:bZ,translate2:yZ,underline:kZ,upload2Fill:xZ,videoLine:wZ,wubiInput:SZ},Symbol.toStringTag,{value:"Module"}));function CZ(e,t=null){return function(r,n){let{$from:o,$to:i}=r.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let u=r.doc.resolve(s.start-2);l=new Ys(u,u,s.depth),s.endIndex=0;u--)i=R.from(r[u].type.create(r[u].attrs,i));e.step(new yt(t.start-(n?2:0),t.end,t.start,t.end,new W(i,0,0),r.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==e);return i?r?n.node(i.depth-1).type==e?OZ(t,r,e,i):_Z(t,r,i):!0:!1}}function OZ(e,t,r,n){let o=e.tr,i=n.end,s=n.$to.end(n.depth);im;h--)p-=o.child(h).nodeSize,n.delete(p-1,p+1);let i=n.doc.resolve(r.start),s=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?R.empty:R.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return n.step(new yt(d-(a?1:0),f+(l?1:0),d+1,f-1,new W((a?R.empty:R.from(o.copy(R.empty))).append(l?R.empty:R.from(o.copy(R.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}var AZ=Object.defineProperty,NZ=Object.getOwnPropertyDescriptor,zn=(e,t,r,n)=>{for(var o=n>1?void 0:n?NZ(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&AZ(t,r,o),o};function K0(e){var t;return!!((t=e.spec.group)!=null&&t.includes(oe.ListContainerNode))}function RZ(e){var t;return!!((t=e.spec.group)!=null&&t.includes(oe.ListItemNode))}function rs(e){return K0(e.type)}function Wi(e){return RZ(e.type)}function yb(e,t){return r=>{const{dispatch:n,tr:o}=r,i=Mv(o,r.state),{$from:s,$to:a}=o.selection,l=s.blockRange(a);if(!l)return!1;const c=Ed({predicate:u=>K0(u.type),selection:o.selection});if(c&&l.depth-c.depth<=1&&l.startIndex===0){if(c.node.type===e)return nT(t)(r);if(K0(c.node.type))return e.validContent(c.node.content)?(n==null||n(o.setNodeMarkup(c.pos,e)),!0):PZ(o,c,e,t)?(n==null||n(o.scrollIntoView()),!0):!1}return CZ(e)(i,n)}}function tT(e,t=["checked"]){return function({tr:r,dispatch:n,state:o}){var i,s;const a=v6(e,o.schema),{$from:l,$to:c}=r.selection;if(Md(r.selection)&&r.selection.node.isBlock||l.depth<2||!l.sameParent(c))return!1;const u=l.node(-1);if(u.type!==a)return!1;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(n){const m=l.index(-1)>0;let b=R.empty;for(let y=l.depth-(m?1:2);y>=l.depth-3;y--)b=R.from(l.node(y).copy(b));const v=((i=a.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;b=b.append(R.from(a.createAndFill(null,v)||void 0));const g=l.indexAfter(-1)!t.includes(m))),f=c.pos===l.end()?u.contentMatchAt(0).defaultType:null,p={...l.node().attrs};r.delete(l.pos,c.pos);const h=f?[{type:a,attrs:d},{type:f,attrs:p}]:[{type:a,attrs:d}];return nl(r.doc,l.pos,2)?(n&&n(r.split(l.pos,2,h).scrollIntoView()),!0):!1}}function PZ(e,t,r,n){const o=t.node,i=e.doc.resolve(t.start),s=i.node(-1),a=i.index(-1);if(!s||!s.canReplace(a,a+1,R.from(r.create())))return!1;const l=[];for(let p=0;pb;m--)h-=o.child(m).nodeSize,n.delete(h-1,h+1);const s=n.doc.resolve(r.start),a=s.nodeAfter;if(!a||n.mapping.slice(i).map(r.end)!==r.start+a.nodeSize)return!1;const l=r.startIndex===0,c=r.endIndex===o.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?R.empty:R.from(o))))return!1;const f=s.pos,p=f+a.nodeSize;return n.step(new yt(f-(l?1:0),p+(c?1:0),f+1,p-1,new W((l?R.empty:R.from(o.copy(R.empty))).append(c?R.empty:R.from(o.copy(R.empty))),l?0:1,c?0:1),l?0:1)),t(n.scrollIntoView()),!0}function rT(e,t){const r=t||e.selection.$from;let n=[],o,i,s,a;for(let c=r.depth;c>=0;c--){if(i=r.node(c),o=r.index(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&rs(s)){const u=r.before(c+1);n.push(u)}if(o=r.indexAfter(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&rs(s)){const u=r.after(c+1);n.push(u)}}n=[...new Set(n)].sort((c,u)=>u-c);let l=!1;for(const c of n)xd(e.doc,c)&&(e.join(c),l=!0);return l}function nT(e){return t=>{const{dispatch:r,tr:n}=t,o=Mv(n,t.state),i=IZ(e,n.selection);return i?(r&&LZ(o,r,i),!0):!1}}function IZ(e,t){const{$from:r,$to:n}=t;return r.blockRange(n,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===e})}function sh(e){const{$from:t,$to:r}=e;return t.blockRange(r,rs)}function DZ(e){const t=e.selection.$from,r=t.blockRange();if(!r||!Wi(r.parent)||r.startIndex!==0)return!1;const n=t.node(r.depth-2),o=t.index(r.depth),i=t.index(r.depth-1),s=t.index(r.depth-2),a=n.maybeChild(s-1),l=a==null?void 0:a.lastChild;if(o!==0||i!==0)return!1;if(a&&rs(a)&&l&&Wi(l))return Vl({listType:a.type,itemType:l.type,tr:e});if(Wi(n)){const c=n,u=t.node(r.depth-3);if(rs(u))return Vl({listType:u.type,itemType:c.type,tr:e})}return!1}function x4({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!Wi(r.parent)||r.startIndex!==0)return!1}{const t=e.state.tr;DZ(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!Wi(r.parent)||r.startIndex!==0)return!1;const n=t.index(r.depth),o=t.index(r.depth-1),i=t.index(r.depth-2),s=r.depth-2>=1&&Wi(t.node(r.depth-2));n===0&&o===0&&i<=1&&s&&TZ(r.parent.type)(e.state,e.dispatch)}return p5(e.state,e.dispatch,e),!0}function oT({node:e,mark:t,updateDOM:r,updateMark:n}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(ts.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(ts.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const a=l=>l.type!==e.type?!1:(e=l,r(e,s),n(e,t),!0);return a(e),{dom:s,contentDOM:i,update:a}}function $Z(e,t){const r=e.node(t.depth-1),n=e.node(t.depth-2);return!Wi(r)||!rs(n)?!1:{parentItem:r,parentList:n}}function HZ(e,t){const r=t.parent,n=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return oVZ(e)?(t==null||t(e.scrollIntoView()),!0):!1;function UZ(e,t,r){let n,o,i,s;const a=t.doc;if(r.startIndex>=1){n=e.child(r.startIndex-1),o=e,s=a.resolve(r.start).start(r.depth),i=s+1;for(let l=0;l=1){const c=t.node(r.depth-1),u=t.start(r.depth-1);if(o=c.child(l-1),!rs(o))return!1;s=u+1;for(let d=0;d=r.depth+2?t.end(r.depth+2):r.end-1,a=r.end;return s+1>=a?(n=e.slice(i,a),o=null):(n=e.slice(i,s),o=e.slice(s+1,a-1)),{selectedSlice:n,unselectedSlice:o}}function KZ(e){const{$from:t,$to:r}=e.selection,n=sh(e.selection);if(!n)return!1;const o=e.doc.resolve(n.start).node();if(!rs(o))return!1;const i=UZ(o,t,n);if(!i)return!1;const{previousItem:s,previousList:a,previousItemStart:l}=i,{selectedSlice:c,unselectedSlice:u}=WZ(e.doc,r,n),d=s.content.append(R.fromArray([o.copy(c.content)])).append(u?u.content:R.empty);e.deleteRange(n.start,n.end);const f=l+s.nodeSize-2,p=s.copy(d);return p.check(),e.replaceRangeWith(l-1,f+1,p),e.setSelection(a===o?le.between(e.doc.resolve(t.pos),e.doc.resolve(r.pos)):le.between(e.doc.resolve(t.pos-2),e.doc.resolve(r.pos-2))),!0}var qZ=({tr:e,dispatch:t})=>KZ(e)?(t==null||t(e.scrollIntoView()),!0):!1,iT=class extends je{get name(){return"listItemShared"}createKeymap(){const e={Tab:qZ,"Shift-Tab":jZ,Backspace:x4,"Mod-Backspace":x4};if(en.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr;return rT(n)?n:null}}}},ua=class extends Qt{get name(){return"listItem"}createTags(){return[oe.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:De.Lowest},...t.parseDOM??[]],toDOM:r=>["li",e.dom(r),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,r)=>{const n=document.createElement("div");return n.classList.add(ts.COLLAPSIBLE_LIST_ITEM_BUTTON),n.contentEditable="false",n.addEventListener("click",()=>{if(n.classList.contains("disabled"))return;const o=r(),i=ce.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),oT({mark:n,node:e,updateDOM:GZ,updateMark:YZ})}:{}}createKeymap(){return{Enter:tT(this.type)}}createExtensions(){return[new iT]}toggleListItemClosed(e){return({state:{tr:t,selection:r},dispatch:n})=>{if(!Md(r)||r.node.type.name!==this.name)return!1;const{node:o,from:i}=r;return e=c1(e)?e:!o.attrs.closed,n==null||n(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return nT(e??this.type)}};zn([G()],ua.prototype,"toggleListItemClosed",1);zn([G()],ua.prototype,"liftListItemOutOfList",1);ua=zn([me({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],ua);function GZ(e,t){e.attrs.closed?t.classList.add(ts.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(ts.COLLAPSIBLE_LIST_ITEM_CLOSED)}function YZ(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var cd=class extends Qt{get name(){return"bulletList"}createTags(){return[oe.Block,oe.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["ul",e.dom(r),0]}}createNodeViews(){return this.options.enableSpine?(e,t,r)=>{var n;const o=document.createElement("div");o.style.position="relative";const i=r(),s=t.state.doc.resolve(i+1),a=s.node(s.depth-1);if(!(((n=a==null?void 0:a.type)==null?void 0:n.name)!=="listItem")){const u=document.createElement("div");u.contentEditable="false",u.classList.add(ts.LIST_SPINE),u.addEventListener("click",d=>{const f=r(),p=t.state.doc.resolve(f+1),h=p.start(p.depth-1),m=ce.create(t.state.doc,h-1);t.dispatch(t.state.tr.setSelection(m)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(u)}const c=document.createElement("ul");return c.classList.add(ts.UL_LIST_CONTENT),o.append(c),{dom:o,contentDOM:c}}:{}}createExtensions(){return[new ua({priority:De.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return yb(this.type,nt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[xh(e,this.type),new ha(e,(t,r,n,o)=>{const i=t.tr;return i.deleteRange(n,o),Vl({listType:this.type,itemType:nt(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};zn([G({icon:"listUnordered",label:({t:e})=>e(mv.BULLET_LIST_LABEL)})],cd.prototype,"toggleBulletList",1);zn([Et({shortcut:j.BulletList,command:"toggleBulletList"})],cd.prototype,"listShortcut",1);cd=zn([me({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],cd);var ud=class extends Qt{get name(){return"orderedList"}createTags(){return[oe.Block,oe.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:r=>mt(r)?{...e.parse(r),order:+(r.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:r=>{const n=e.dom(r);return r.attrs.order===1?["ol",n,0]:["ol",{...n,start:r.attrs.order},0]}}}createExtensions(){return[new ua({priority:De.Low})]}toggleOrderedList(){return yb(this.type,nt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[xh(e,this.type,t=>({order:+nt(t,1)}),(t,r)=>r.childCount+r.attrs.order===+nt(t,1)),new ha(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!Vl({listType:this.type,itemType:nt(this.store.schema.nodes,"listItem"),tr:i}))return null;const a=+nt(r,1);if(a!==1){const l=Yi({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{order:a})}return i})]}};zn([G({icon:"listOrdered",label:({t:e})=>e(mv.ORDERED_LIST_LABEL)})],ud.prototype,"toggleOrderedList",1);zn([Et({shortcut:j.OrderedList,command:"toggleOrderedList"})],ud.prototype,"listShortcut",1);ud=zn([me({})],ud);var sT=class extends Qt{get name(){return"taskListItem"}createTags(){return[oe.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:r=>{let n=!1;return mt(r)&&r.getAttribute("data-checked")!==null&&(n=!0),{checked:n,...e.parse(r)}},priority:De.Medium},...t.parseDOM??[]],toDOM:r=>["li",{...e.dom(r),"data-task-list-item":"","data-checked":r.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,r)=>{const n=document.createElement("input");return n.type="checkbox",n.classList.add(ts.LIST_ITEM_CHECKBOX),n.contentEditable="false",n.addEventListener("click",o=>{t.editable||o.preventDefault()}),n.addEventListener("change",()=>{const o=r(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),n.checked=e.attrs.checked,oT({node:e,mark:n,updateDOM:JZ,updateMark:XZ})}}createKeymap(){return{Enter:tT(this.type)}}createExtensions(){return[new iT]}toggleCheckboxChecked(e){let t,r;return typeof e=="boolean"?t=e:e&&(t=e.checked,r=e.$pos),({tr:n,dispatch:o})=>{const i=Yi({selection:r??n.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:a}=i,l={...s.attrs,checked:t??!s.attrs.checked};return o==null||o(n.setNodeMarkup(a,void 0,l)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[xh(e,this.type,t=>({checked:["x","X"].includes(sl(t,2))})),new ha(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!Vl({listType:nt(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const a=["x","X"].includes(sl(r,2));if(a){const l=Yi({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{checked:a})}return i})]}};zn([G()],sT.prototype,"toggleCheckboxChecked",1);function JZ(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function XZ(e,t){t.checked=!!e.attrs.checked}var aT=class extends Qt{get name(){return"taskList"}createTags(){return[oe.Block,oe.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:De.Medium},...t.parseDOM??[]],toDOM:r=>["ul",{...e.dom(r),"data-task-list":""},0]}}createExtensions(){return[new sT({})]}toggleTaskList(){return yb(this.type,nt(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};zn([G({icon:"checkboxMultipleLine",label:({t:e})=>e(mv.TASK_LIST_LABEL)})],aT.prototype,"toggleTaskList",1);zn([Et({shortcut:j.TaskList,command:"toggleTaskList"})],aT.prototype,"listShortcut",1);var io,QZ=(e=document)=>io||(io=e.createElement("div"),io.setAttribute("id","a11y-status-message"),io.setAttribute("role","status"),io.setAttribute("aria-live","polite"),io.setAttribute("aria-relevant","additions text"),Object.assign(io.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(io),io);kS(500,()=>{QZ().textContent=""});function w4(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function S4(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Jg(e,t){if(e.clientHeightt||i>e&&s=t&&a>=r?i-e-n:s>t&&ar?s-t+o:0}var ZZ=function(e,t){var r=window,n=t.scrollMode,o=t.block,i=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,l=typeof s=="function"?s:function(Ie){return Ie!==s};if(!w4(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],p=e;w4(p)&&l(p);){if((p=(u=(c=p).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(p);break}p!=null&&p===document.body&&Jg(p)&&!Jg(document.documentElement)||p!=null&&Jg(p,a)&&f.push(p)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,m=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),y=g.height,k=g.width,x=g.top,w=g.right,E=g.bottom,M=g.left,C=o==="start"||o==="nearest"?x:o==="end"?E:x+y/2,T=i==="center"?M+k/2:i==="end"?w:M,N=[],z=0;z=0&&M>=0&&E<=m&&w<=h&&x>=K&&E<=P&&M>=B&&w<=A)return N;var Y=getComputedStyle(D),J=parseInt(Y.borderLeftWidth,10),_e=parseInt(Y.borderTopWidth,10),ie=parseInt(Y.borderRightWidth,10),ue=parseInt(Y.borderBottomWidth,10),de=0,he=0,Me="offsetWidth"in D?D.offsetWidth-D.clientWidth-J-ie:0,Se="offsetHeight"in D?D.offsetHeight-D.clientHeight-_e-ue:0,ut="offsetWidth"in D?D.offsetWidth===0?0:L/D.offsetWidth:0,et="offsetHeight"in D?D.offsetHeight===0?0:V/D.offsetHeight:0;if(d===D)de=o==="start"?C:o==="end"?C-m:o==="nearest"?gf(v,v+m,m,_e,ue,v+C,v+C+y,y):C-m/2,he=i==="start"?T:i==="center"?T-h/2:i==="end"?T-h:gf(b,b+h,h,J,ie,b+T,b+T+k,k),de=Math.max(0,de+v),he=Math.max(0,he+b);else{de=o==="start"?C-K-_e:o==="end"?C-P+ue+Se:o==="nearest"?gf(K,P,V,_e,ue+Se,C,C+y,y):C-(K+V/2)+Se/2,he=i==="start"?T-B-J:i==="center"?T-(B+L/2)+Me/2:i==="end"?T-A+ie+Me:gf(B,A,L,J,ie+Me,T,T+k,k);var Cr=D.scrollLeft,pe=D.scrollTop;C+=pe-(de=Math.max(0,Math.min(pe+de/et,D.scrollHeight-V/et+Se))),T+=Cr-(he=Math.max(0,Math.min(Cr+he/ut,D.scrollWidth-L/ut+Me)))}N.push({el:D,top:de,left:he})}return N};typeof gr=="object"&&gr.__esModule&&gr.default&&gr.default;bh(ZZ);var eee=typeof document<"u"?S.useLayoutEffect:S.useEffect;function tee(e){const t=S.useRef();return eee(()=>{t.current=e}),t.current}function ree(e,t){const[r,n]=S.useState([]),[o,i]=S.useState(()=>N0(e)),[s,a]=S.useState([]),l=S.useRef(e),c=tee(o);return l.current=e,Pd(zl,({addCustomHandler:u})=>{const d=N0(l.current),f=u("positioner",d);return i(d),f},t),S.useLayoutEffect(()=>{const u=o.addListener("update",f=>{const p=[];for(const{id:h,data:m,setElement:b}of f){const v=g=>{g&&b(g)};p.push({id:h,data:m,ref:v})}a(p)}),d=o.addListener("done",f=>{n(f)});return c!=null&&c.recentUpdate&&o.onActiveChanged(c==null?void 0:c.recentUpdate),()=>{u(),d()}},[o,c]),S.useMemo(()=>{const u=[];for(const[d,{ref:f,data:p,id:h}]of s.entries()){const m=r[d],{element:b,position:v={}}=m??{},g={...Ly,...ES(v)};u.push({ref:f,element:b,data:p,key:h,...g})}return u},[s,r])}function nee(e,t){const r=t==null||c1(t)?[e]:t,n=c1(t)?t:!0,o=S.useRef(vl()),s=ree(e,r)[0];return S.useMemo(()=>s&&n?{...s,active:!0}:{...Ly,ref:void 0,data:{},active:!1,key:o.current},[n,s])}function Xg(e,t){return Pe(e)?e(t):e}function oee(e){return ne(e[0])}function iee(e,t){var r;return ne(e)?e:at(e)?oee(e)?e[0]??"":((r=e.find(n=>CS(n.attrs,t))??e[0])==null?void 0:r.shortcut)??"":e.shortcut}var see={title:e=>P_(e),upper:e=>e.toLocaleUpperCase(),lower:e=>e.toLocaleLowerCase()};function aee(e,t){const{casing:r="title",namedAsSymbol:n=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=t,a=Y6(e),l=[],c=see[r];for(const u of a){if(u.type==="char"){l.push(c(u.key));continue}if(u.type==="named"){const f=n===!0||at(n)&&br(n,u.key)?u.symbol??s(u.i18n):s(u.i18n);l.push(c(f));continue}const d=o===!0||at(o)&&br(o,u.key)?u.symbol:s(u.i18n);l.push(c(d))}return l.join(i)}var lT=({commandName:e,active:t,enabled:r,attrs:n})=>{const{t:o}=kV(),{getCommandOptions:i}=Zh(),s=i(e),{description:a,label:l,icon:c,shortcut:u}=s||{},d=S.useMemo(()=>({active:t,attrs:n,enabled:r,t:o}),[t,n,r,o]),f=S.useMemo(()=>{if(u)return aee(iee(u,n??{}),{t:o,separator:""})},[u,n,o]);return S.useMemo(()=>({description:Xg(a,d),label:Xg(l,d),icon:Xg(c,d),shortcut:f}),[d,a,l,c,f])},lee={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},cT=S.createContext(lee);cT.Provider;function uT(e){return e.map((t,r)=>S.createElement(t.tag,{key:r,...t.attr},uT(t.child??[])))}var Dm=e=>{const{name:t}=e;return I.createElement(cee,{...e},uT(EZ[t]))},cee=e=>{const t=r=>{const n=e.size??r.size??"1em";let o;r.className&&(o=r.className),e.className&&(o=(o?`${o} `:"")+e.className);const{title:i,...s}=e;return I.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...r.attr,...s,className:o,style:{color:e.color??r.color,...r.style,...e.style},height:n,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&I.createElement("title",null,i),e.children)};return I.createElement(cT.Consumer,null,t)},uee=e=>ss(e)?!!e.name:!1,dee=({icon:e})=>ne(e)?I.createElement(Dm,{name:e,size:"1rem"}):e,fee=({icon:e,children:t})=>{if(!uee(e))return I.createElement(I.Fragment,null,t);const{sub:r,sup:n}=e,o=r??n,i=r!==void 0;return o===void 0?I.createElement(I.Fragment,null,t):I.createElement(fY,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},t)},ct=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onChange:i,icon:s,displayShortcut:a=!0,"aria-label":l,label:c,...u})=>{const d=S.useCallback((g,y)=>{o(),i==null||i(g,y)},[o,i]),f=S.useCallback(g=>{g.preventDefault()},[]),p=lT({commandName:e,active:t,enabled:r,attrs:n});let h=null;p.icon&&(h=ne(p.icon)?p.icon:p.icon.name);const m=l??p.label??"",b=c??m,v=a&&p.shortcut?` (${p.shortcut})`:"";return I.createElement(eT,{title:`${b}${v}`},I.createElement(J3,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},I.createElement(HJ,{"aria-label":m,selected:t,disabled:!r,onMouseDown:f,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...u,value:e,onChange:d},I.createElement(fee,{icon:p.icon},I.createElement(dee,{icon:s??h})))))},pee=({icon:e})=>ne(e)?I.createElement(Dm,{name:e,size:"1rem"}):e,dT=({label:e,"aria-label":t,icon:r,children:n,onClose:o,...i})=>{const s=S.useRef(vl()),[a,l]=S.useState(null),c=!!a,u=S.useCallback(p=>{p.preventDefault()},[]),d=S.useCallback(p=>{l(p.currentTarget)},[]),f=S.useCallback((p,h)=>{l(null),o==null||o(p,h)},[o]);return I.createElement(I.Fragment,null,I.createElement(eT,{title:e??t},I.createElement(ZK,{"aria-label":t,"aria-controls":c?s.current:void 0,"aria-haspopup":!0,"aria-expanded":c?"true":void 0,onMouseDown:u,onClick:d,size:"small",sx:p=>({border:`1px solid ${p.palette.divider}`,borderRadius:`${p.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},r&&I.createElement(pee,{icon:r}),I.createElement(Dm,{name:"arrowDownSFill",size:"1rem"}))),I.createElement(mJ,{...i,id:s.current,anchorEl:a,open:c,onClose:f},n))},hee=e=>{const{insertHorizontalRule:t}=Zt();$y();const r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=t.enabled();return I.createElement(ct,{...e,commandName:"insertHorizontalRule",enabled:n,onSelect:r})},mee=e=>{const{redo:t}=Zt(),{redoDepth:r}=Zh(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return I.createElement(ct,{...e,commandName:"redo",active:!1,enabled:o,onSelect:n})},gee=e=>{const{toggleBlockquote:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().blockquote(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleBlockquote",active:n,enabled:o,onSelect:r})},q0=e=>{const{toggleBold:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().bold(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleBold",active:n,enabled:o,onSelect:r})},vee=e=>{const{toggleBulletList:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().bulletList(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleBulletList",active:n,enabled:o,onSelect:r})},yee=({attrs:e={},...t})=>{const{toggleCodeBlock:r}=Zt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=jr().codeBlock(),i=r.enabled(e);return I.createElement(ct,{...t,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:e,onSelect:n})},G0=e=>{const{toggleCode:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().code(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleCode",active:n,enabled:o,onSelect:r})},Qg=({attrs:e,...t})=>{const{toggleHeading:r}=Zt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=jr().heading(e),i=r.enabled(e);return I.createElement(ct,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},Y0=e=>{const{toggleItalic:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().italic(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleItalic",active:n,enabled:o,onSelect:r})},bee=e=>{const{toggleOrderedList:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().orderedList(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleOrderedList",active:n,enabled:o,onSelect:r})},kee=e=>{const{toggleStrike:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().strike(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleStrike",active:n,enabled:o,onSelect:r})},J0=e=>{const{toggleUnderline:t}=Zt(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=jr().underline(),o=t.enabled();return I.createElement(ct,{...e,commandName:"toggleUnderline",active:n,enabled:o,onSelect:r})},xee=e=>{const{undo:t}=Zt(),{undoDepth:r}=Zh(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return I.createElement(ct,{...e,commandName:"undo",active:!1,enabled:o,onSelect:n})},kn=e=>I.createElement(J3,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...e}),wee=({children:e})=>I.createElement(kn,null,I.createElement(q0,null),I.createElement(Y0,null),I.createElement(J0,null),I.createElement(kee,null),I.createElement(G0,null),e),See=({icon:e})=>e?I.createElement(BY,null,ne(e)?I.createElement(Dm,{name:e,size:"1rem"}):I.createElement(I.Fragment,null,e)):null,bb=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onClick:i,icon:s,displayShortcut:a=!0,label:l,description:c,displayDescription:u=!0,...d})=>{const f=S.useCallback(g=>{o(),i==null||i(g)},[o,i]),p=S.useCallback(g=>{g.preventDefault()},[]),h=lT({commandName:e,active:t,enabled:r,attrs:n});let m=null;h.icon&&(m=ne(h.icon)?h.icon:h.icon.name);const b=l??h.label??"",v=u&&(c??h.description);return I.createElement(SJ,{selected:t,disabled:!r,onMouseDown:p,...d,onClick:f},s!==null&&I.createElement(See,{icon:s??m}),I.createElement(qY,{primary:b,secondary:v}),a&&h.shortcut&&I.createElement(Zc,{variant:"body2",color:"text.secondary",sx:{ml:2}},h.shortcut))},vf=({attrs:e,...t})=>{const{toggleHeading:r}=Zt(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=jr().heading(e),i=r.enabled(e);return I.createElement(bb,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},Eee={level:1},Cee={level:2},E4={level:3},Mee={level:4},Tee={level:5},Oee={level:6},_ee=({showAll:e=!1,children:t})=>I.createElement(kn,null,I.createElement(Qg,{attrs:Eee}),I.createElement(Qg,{attrs:Cee}),e?I.createElement(dT,{"aria-label":"More heading options"},I.createElement(vf,{attrs:E4}),I.createElement(vf,{attrs:Mee}),I.createElement(vf,{attrs:Tee}),I.createElement(vf,{attrs:Oee})):I.createElement(Qg,{attrs:E4}),t),Aee=({children:e})=>I.createElement(kn,null,I.createElement(xee,null),I.createElement(mee,null),e);typeof gr=="object"&&gr.__esModule&&gr.default&&gr.default;var fT=S.createContext({});function Nee(e={}){const t=S.useContext(fT),r=S.useMemo(()=>OS(t,e.theme??{}),[t,e.theme]),n=S.useMemo(()=>zF(r).styles,[r]),o=Pu(PF,e.className);return S.useMemo(()=>({style:n,className:o,theme:r}),[n,o,r])}var Ree=e=>{var t,r,n,o,i,s,a,l;const{children:c,as:u="div"}=e,{theme:d,style:f,className:p}=Nee({theme:e.theme??gs}),h=ob({palette:{primary:{main:((t=d.color)==null?void 0:t.primary)??gs.color.primary,dark:((n=(r=d.color)==null?void 0:r.hover)==null?void 0:n.primary)??gs.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??gs.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??gs.color.secondary,dark:((a=(s=d.color)==null?void 0:s.hover)==null?void 0:a.secondary)??gs.color.hover.secondary,contrastText:((l=d.color)==null?void 0:l.secondaryText)??gs.color.secondaryText}}});return I.createElement(fK,{theme:h},I.createElement(fT.Provider,{value:d},I.createElement(u,{style:f,className:p},c)))},pT=e=>I.createElement(EY,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...e}),Pee=[{name:"offset",options:{offset:[0,8]}}],zee=({positioner:e="selection",children:t,...r})=>{const{ref:n,x:o,y:i,width:s,height:a,active:l}=nee(()=>N0(e),[e]),[c,u]=S.useState(null),d=S.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:a}),[o,i,s,a]),f=S.useCallback(p=>{u(p),n==null||n(p)},[n]);return I.createElement(I.Fragment,null,I.createElement("div",{ref:f,style:d}),I.createElement(vb,{placement:"top",modifiers:Pee,...r,open:l,anchorEl:c},I.createElement(pT,null,t?I.createElement(I.Fragment,null,t):I.createElement(wee,null))))},Ct=bh(Qp),kb=bt` +`),Cn.rippleVisible,cq,iv,({theme:e})=>e.transitions.easing.easeInOut,Cn.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Cn.child,Cn.childLeaving,uq,iv,({theme:e})=>e.transitions.easing.easeInOut,Cn.childPulsate,dq,({theme:e})=>e.transitions.easing.easeInOut),hq=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=n,a=be(n,aq),[l,c]=S.useState([]),u=S.useRef(0),d=S.useRef(null);S.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=S.useRef(!1),p=S.useRef(0),h=S.useRef(null),m=S.useRef(null);S.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const b=S.useCallback(k=>{const{pulsate:x,rippleX:w,rippleY:E,rippleSize:M,cb:C}=k;c(T=>[...T,O.jsx(pq,{classes:{ripple:Te(i.ripple,Cn.ripple),rippleVisible:Te(i.rippleVisible,Cn.rippleVisible),ripplePulsate:Te(i.ripplePulsate,Cn.ripplePulsate),child:Te(i.child,Cn.child),childLeaving:Te(i.childLeaving,Cn.childLeaving),childPulsate:Te(i.childPulsate,Cn.childPulsate)},timeout:iv,pulsate:x,rippleX:w,rippleY:E,rippleSize:M},u.current)]),u.current+=1,d.current=C},[i]),v=S.useCallback((k={},x={},w=()=>{})=>{const{pulsate:E=!1,center:M=o||x.pulsate,fakeElement:C=!1}=x;if((k==null?void 0:k.type)==="mousedown"&&f.current){f.current=!1;return}(k==null?void 0:k.type)==="touchstart"&&(f.current=!0);const T=C?null:m.current,R=T?T.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,F;if(M||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)z=Math.round(R.width/2),D=Math.round(R.height/2);else{const{clientX:V,clientY:L}=k.touches&&k.touches.length>0?k.touches[0]:k;z=Math.round(V-R.left),D=Math.round(L-R.top)}if(M)F=Math.sqrt((2*R.width**2+R.height**2)/3),F%2===0&&(F+=1);else{const V=Math.max(Math.abs((T?T.clientWidth:0)-z),z)*2+2,L=Math.max(Math.abs((T?T.clientHeight:0)-D),D)*2+2;F=Math.sqrt(V**2+L**2)}k!=null&&k.touches?h.current===null&&(h.current=()=>{b({pulsate:E,rippleX:z,rippleY:D,rippleSize:F,cb:w})},p.current=setTimeout(()=>{h.current&&(h.current(),h.current=null)},lq)):b({pulsate:E,rippleX:z,rippleY:D,rippleSize:F,cb:w})},[o,b]),g=S.useCallback(()=>{v({},{pulsate:!0})},[v]),y=S.useCallback((k,x)=>{if(clearTimeout(p.current),(k==null?void 0:k.type)==="touchend"&&h.current){h.current(),h.current=null,p.current=setTimeout(()=>{y(k,x)});return}h.current=null,c(w=>w.length>0?w.slice(1):w),d.current=x},[]);return S.useImperativeHandle(r,()=>({pulsate:g,start:v,stop:y}),[g,v,y]),O.jsx(fq,_({className:Te(Cn.root,i.root,s),ref:m},a,{children:O.jsx(QK,{component:null,exit:!0,children:l})}))}),mq=hq;function gq(e){return Kt("MuiButtonBase",e)}const vq=qt("MuiButtonBase",["root","disabled","focusVisible"]),yq=vq,bq=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],kq=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,s=ir({root:["root",t&&"disabled",r&&"focusVisible"]},gq,o);return r&&n&&(s.root+=` ${n}`),s},xq=et("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${yq.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),wq=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:b,onDragLeave:v,onFocus:g,onFocusVisible:y,onKeyDown:k,onKeyUp:x,onMouseDown:w,onMouseLeave:E,onMouseUp:M,onTouchEnd:C,onTouchMove:T,onTouchStart:R,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:F,type:V}=n,L=be(n,bq),K=S.useRef(null),A=S.useRef(null),P=Wr(A,F),{isFocusVisibleRef:B,onFocus:X,onBlur:J,ref:Re}=_3(),[ae,fe]=S.useState(!1);c&&ae&&fe(!1),S.useImperativeHandle(o,()=>({focusVisible:()=>{fe(!0),K.current.focus()}}),[]);const[pe,ge]=S.useState(!1);S.useEffect(()=>{ge(!0)},[]);const Oe=pe&&!u&&!c;S.useEffect(()=>{ae&&f&&!u&&pe&&A.current.pulsate()},[u,f,ae,pe]);function Ce(he,wn,fc=d){return qs(vi=>(wn&&wn(vi),!fc&&A.current&&A.current[he](vi),!0))}const mt=Ce("start",w),it=Ce("stop",b),Ar=Ce("stop",v),me=Ce("stop",M),Be=Ce("stop",he=>{ae&&he.preventDefault(),E&&E(he)}),Xe=Ce("start",R),Vn=Ce("stop",C),Yr=Ce("stop",T),sr=Ce("stop",he=>{J(he),B.current===!1&&fe(!1),h&&h(he)},!1),Io=qs(he=>{K.current||(K.current=he.currentTarget),X(he),B.current===!0&&(fe(!0),y&&y(he)),g&&g(he)}),$t=()=>{const he=K.current;return l&&l!=="button"&&!(he.tagName==="A"&&he.href)},Xr=S.useRef(!1),kn=qs(he=>{f&&!Xr.current&&ae&&A.current&&he.key===" "&&(Xr.current=!0,A.current.stop(he,()=>{A.current.start(he)})),he.target===he.currentTarget&&$t()&&he.key===" "&&he.preventDefault(),k&&k(he),he.target===he.currentTarget&&$t()&&he.key==="Enter"&&!c&&(he.preventDefault(),m&&m(he))}),jn=qs(he=>{f&&he.key===" "&&A.current&&ae&&!he.defaultPrevented&&(Xr.current=!1,A.current.stop(he,()=>{A.current.pulsate(he)})),x&&x(he),m&&he.target===he.currentTarget&&$t()&&he.key===" "&&!he.defaultPrevented&&m(he)});let tt=l;tt==="button"&&(L.href||L.to)&&(tt=p);const Jr={};tt==="button"?(Jr.type=V===void 0?"button":V,Jr.disabled=c):(!L.href&&!L.to&&(Jr.role="button"),c&&(Jr["aria-disabled"]=c));const xn=Wr(r,Re,K),gi=_({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:z,focusVisible:ae}),Aa=kq(gi);return O.jsxs(xq,_({as:tt,className:Te(Aa.root,a),ownerState:gi,onBlur:sr,onClick:m,onContextMenu:it,onFocus:Io,onKeyDown:kn,onKeyUp:jn,onMouseDown:mt,onMouseLeave:Be,onMouseUp:me,onDragLeave:Ar,onTouchEnd:Vn,onTouchMove:Yr,onTouchStart:Xe,ref:xn,tabIndex:c?-1:z,type:V},Jr,L,{children:[s,Oe?O.jsx(mq,_({ref:P,center:i},D)):null]}))}),Ab=wq;function Sq(e){return Kt("MuiIconButton",e)}const Eq=qt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Cq=Eq,Mq=["edge","children","className","color","disabled","disableFocusRipple","size"],Tq=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,s={root:["root",r&&"disabled",n!=="default"&&`color${We(n)}`,o&&`edge${We(o)}`,`size${We(i)}`]};return ir(s,Sq,t)},Oq=et(Ab,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${We(r.color)}`],r.edge&&t[`edge${We(r.edge)}`],t[`size${We(r.size)}`]]}})(({theme:e,ownerState:t})=>_({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Dr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return _({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&_({color:n==null?void 0:n.main},!t.disableRipple&&{"&:hover":_({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Dr(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${Cq.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),_q=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=n,d=be(n,Mq),f=_({},n,{edge:o,color:a,disabled:l,disableFocusRipple:c,size:u}),p=Tq(f);return O.jsx(Oq,_({className:Te(p.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:r,ownerState:f},d,{children:i}))}),Aq=_q;function Rq(e){return Kt("MuiTypography",e)}qt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Nq=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Pq=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,e.align!=="inherit"&&`align${We(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return ir(a,Rq,s)},zq=et("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${We(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>_({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),S4={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Lq={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Iq=e=>Lq[e]||e,Dq=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiTypography"}),o=Iq(n.color),i=Sb(_({},n,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:p=S4}=i,h=be(i,Nq),m=_({},i,{align:s,color:o,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:p}),b=l||(d?"p":p[f]||S4[f])||"span",v=Pq(m);return O.jsx(zq,_({as:b,ref:r,ownerState:m,className:Te(v.root,a)},h))}),lu=Dq;function uT(e){return typeof e=="string"}function cu(e,t,r){return e===void 0||uT(e)?t:_({},t,{ownerState:_({},t.ownerState,r)})}const $q={disableDefaultClasses:!1},Hq=S.createContext($q);function Bq(e){const{disableDefaultClasses:t}=S.useContext(Hq);return r=>t?"":e(r)}function dT(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Fq(e,t,r){return typeof e=="function"?e(t,r):e}function E4(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function Vq(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const p=Te(o==null?void 0:o.className,n==null?void 0:n.className,i,r==null?void 0:r.className),h=_({},r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),m=_({},r,o,n);return p.length>0&&(m.className=p),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:void 0}}const s=dT(_({},o,n)),a=E4(n),l=E4(o),c=t(s),u=Te(c==null?void 0:c.className,r==null?void 0:r.className,i,o==null?void 0:o.className,n==null?void 0:n.className),d=_({},c==null?void 0:c.style,r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),f=_({},c,r,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const jq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function li(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:i=!1}=e,s=be(e,jq),a=i?{}:Fq(n,o),{props:l,internalRef:c}=Vq(_({},s,{externalSlotProps:a})),u=Wr(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return cu(r,_({},l,{ref:u}),o)}function Uq(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=R3({badgeContent:t,max:n});let s=r;r===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=n}=s?i:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const Wq=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Kq(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function qq(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function Gq(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||qq(e))}function Yq(e){const t=[],r=[];return Array.from(e.querySelectorAll(Wq)).forEach((n,o)=>{const i=Kq(n);i===-1||!Gq(n)||(i===0?t.push(n):r.push({documentOrder:o,tabIndex:i,node:n}))}),r.sort((n,o)=>n.tabIndex===o.tabIndex?n.documentOrder-o.documentOrder:n.tabIndex-o.tabIndex).map(n=>n.node).concat(t)}function Xq(){return!0}function Jq(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=Yq,isEnabled:s=Xq,open:a}=e,l=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),f=S.useRef(null),p=S.useRef(!1),h=S.useRef(null),m=Wr(t.ref,h),b=S.useRef(null);S.useEffect(()=>{!a||!h.current||(p.current=!r)},[r,a]),S.useEffect(()=>{if(!a||!h.current)return;const y=Vr(h.current);return h.current.contains(y.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),S.useEffect(()=>{if(!a||!h.current)return;const y=Vr(h.current),k=E=>{b.current=E,!(n||!s()||E.key!=="Tab")&&y.activeElement===h.current&&E.shiftKey&&(l.current=!0,u.current&&u.current.focus())},x=()=>{const E=h.current;if(E===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(E.contains(y.activeElement)||n&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let M=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(M=i(h.current)),M.length>0){var C,T;const R=!!((C=b.current)!=null&&C.shiftKey&&((T=b.current)==null?void 0:T.key)==="Tab"),z=M[0],D=M[M.length-1];typeof z!="string"&&typeof D!="string"&&(R?D.focus():z.focus())}else E.focus()};y.addEventListener("focusin",x),y.addEventListener("keydown",k,!0);const w=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&x()},50);return()=>{clearInterval(w),y.removeEventListener("focusin",x),y.removeEventListener("keydown",k,!0)}},[r,n,o,s,a,i]);const v=y=>{d.current===null&&(d.current=y.relatedTarget),p.current=!0,f.current=y.target;const k=t.props.onFocus;k&&k(y)},g=y=>{d.current===null&&(d.current=y.relatedTarget),p.current=!0};return O.jsxs(S.Fragment,{children:[O.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:m,onFocus:v}),O.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:u,"data-testid":"sentinelEnd"})]})}var jr="top",Dn="bottom",$n="right",Ur="left",Rb="auto",qd=[jr,Dn,$n,Ur],Gl="start",gd="end",Qq="clippingParents",fT="viewport",Oc="popper",Zq="reference",C4=qd.reduce(function(e,t){return e.concat([t+"-"+Gl,t+"-"+gd])},[]),pT=[].concat(qd,[Rb]).reduce(function(e,t){return e.concat([t,t+"-"+Gl,t+"-"+gd])},[]),eG="beforeRead",tG="read",rG="afterRead",nG="beforeMain",oG="main",iG="afterMain",sG="beforeWrite",aG="write",lG="afterWrite",cG=[eG,tG,rG,nG,oG,iG,sG,aG,lG];function No(e){return e?(e.nodeName||"").toLowerCase():null}function gn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function va(e){var t=gn(e).Element;return e instanceof t||e instanceof Element}function Nn(e){var t=gn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nb(e){if(typeof ShadowRoot>"u")return!1;var t=gn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uG(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!Nn(i)||!No(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function dG(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=s.reduce(function(l,c){return l[c]="",l},{});!Nn(o)||!No(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const fG={name:"applyStyles",enabled:!0,phase:"write",fn:uG,effect:dG,requires:["computeStyles"]};function Oo(e){return e.split("-")[0]}var ta=Math.max,vh=Math.min,Yl=Math.round;function sv(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function hT(){return!/^((?!chrome|android).)*safari/i.test(sv())}function Xl(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Nn(e)&&(o=e.offsetWidth>0&&Yl(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Yl(n.height)/e.offsetHeight||1);var s=va(e)?gn(e):window,a=s.visualViewport,l=!hT()&&r,c=(n.left+(l&&a?a.offsetLeft:0))/o,u=(n.top+(l&&a?a.offsetTop:0))/i,d=n.width/o,f=n.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Pb(e){var t=Xl(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function mT(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Nb(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ci(e){return gn(e).getComputedStyle(e)}function pG(e){return["table","td","th"].indexOf(No(e))>=0}function ws(e){return((va(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zm(e){return No(e)==="html"?e:e.assignedSlot||e.parentNode||(Nb(e)?e.host:null)||ws(e)}function M4(e){return!Nn(e)||ci(e).position==="fixed"?null:e.offsetParent}function hG(e){var t=/firefox/i.test(sv()),r=/Trident/i.test(sv());if(r&&Nn(e)){var n=ci(e);if(n.position==="fixed")return null}var o=Zm(e);for(Nb(o)&&(o=o.host);Nn(o)&&["html","body"].indexOf(No(o))<0;){var i=ci(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Gd(e){for(var t=gn(e),r=M4(e);r&&pG(r)&&ci(r).position==="static";)r=M4(r);return r&&(No(r)==="html"||No(r)==="body"&&ci(r).position==="static")?t:r||hG(e)||t}function zb(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _u(e,t,r){return ta(e,vh(t,r))}function mG(e,t,r){var n=_u(e,t,r);return n>r?r:n}function gT(){return{top:0,right:0,bottom:0,left:0}}function vT(e){return Object.assign({},gT(),e)}function yT(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var gG=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,vT(typeof t!="number"?t:yT(t,qd))};function vG(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Oo(r.placement),l=zb(a),c=[Ur,$n].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var d=gG(o.padding,r),f=Pb(i),p=l==="y"?jr:Ur,h=l==="y"?Dn:$n,m=r.rects.reference[u]+r.rects.reference[l]-s[l]-r.rects.popper[u],b=s[l]-r.rects.reference[l],v=Gd(i),g=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,y=m/2-b/2,k=d[p],x=g-f[u]-d[h],w=g/2-f[u]/2+y,E=_u(k,w,x),M=l;r.modifiersData[n]=(t={},t[M]=E,t.centerOffset=E-w,t)}}function yG(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||mT(t.elements.popper,o)&&(t.elements.arrow=o))}const bG={name:"arrow",enabled:!0,phase:"main",fn:vG,effect:yG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Jl(e){return e.split("-")[1]}var kG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xG(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Yl(r*o)/o||0,y:Yl(n*o)/o||0}}function T4(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,p=f===void 0?0:f,h=s.y,m=h===void 0?0:h,b=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=b.x,m=b.y;var v=s.hasOwnProperty("x"),g=s.hasOwnProperty("y"),y=Ur,k=jr,x=window;if(c){var w=Gd(r),E="clientHeight",M="clientWidth";if(w===gn(r)&&(w=ws(r),ci(w).position!=="static"&&a==="absolute"&&(E="scrollHeight",M="scrollWidth")),w=w,o===jr||(o===Ur||o===$n)&&i===gd){k=Dn;var C=d&&w===x&&x.visualViewport?x.visualViewport.height:w[E];m-=C-n.height,m*=l?1:-1}if(o===Ur||(o===jr||o===Dn)&&i===gd){y=$n;var T=d&&w===x&&x.visualViewport?x.visualViewport.width:w[M];p-=T-n.width,p*=l?1:-1}}var R=Object.assign({position:a},c&&kG),z=u===!0?xG({x:p,y:m},gn(r)):{x:p,y:m};if(p=z.x,m=z.y,l){var D;return Object.assign({},R,(D={},D[k]=g?"0":"",D[y]=v?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",D))}return Object.assign({},R,(t={},t[k]=g?m+"px":"",t[y]=v?p+"px":"",t.transform="",t))}function wG(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,a=r.roundOffsets,l=a===void 0?!0:a,c={placement:Oo(t.placement),variation:Jl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,T4(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,T4(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const SG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wG,data:{}};var Cf={passive:!0};function EG(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=gn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",r.update,Cf)}),a&&l.addEventListener("resize",r.update,Cf),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",r.update,Cf)}),a&&l.removeEventListener("resize",r.update,Cf)}}const CG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:EG,data:{}};var MG={left:"right",right:"left",bottom:"top",top:"bottom"};function pp(e){return e.replace(/left|right|bottom|top/g,function(t){return MG[t]})}var TG={start:"end",end:"start"};function O4(e){return e.replace(/start|end/g,function(t){return TG[t]})}function Lb(e){var t=gn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ib(e){return Xl(ws(e)).left+Lb(e).scrollLeft}function OG(e,t){var r=gn(e),n=ws(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=hT();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Ib(e),y:l}}function _G(e){var t,r=ws(e),n=Lb(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=ta(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ta(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Ib(e),l=-n.scrollTop;return ci(o||r).direction==="rtl"&&(a+=ta(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Db(e){var t=ci(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function bT(e){return["html","body","#document"].indexOf(No(e))>=0?e.ownerDocument.body:Nn(e)&&Db(e)?e:bT(Zm(e))}function Au(e,t){var r;t===void 0&&(t=[]);var n=bT(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=gn(n),s=o?[i].concat(i.visualViewport||[],Db(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(Au(Zm(s)))}function av(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function AG(e,t){var r=Xl(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function _4(e,t,r){return t===fT?av(OG(e,r)):va(t)?AG(t,r):av(_G(ws(e)))}function RG(e){var t=Au(Zm(e)),r=["absolute","fixed"].indexOf(ci(e).position)>=0,n=r&&Nn(e)?Gd(e):e;return va(n)?t.filter(function(o){return va(o)&&mT(o,n)&&No(o)!=="body"}):[]}function NG(e,t,r,n){var o=t==="clippingParents"?RG(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,c){var u=_4(e,c,n);return l.top=ta(u.top,l.top),l.right=vh(u.right,l.right),l.bottom=vh(u.bottom,l.bottom),l.left=ta(u.left,l.left),l},_4(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function kT(e){var t=e.reference,r=e.element,n=e.placement,o=n?Oo(n):null,i=n?Jl(n):null,s=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,l;switch(o){case jr:l={x:s,y:t.y-r.height};break;case Dn:l={x:s,y:t.y+t.height};break;case $n:l={x:t.x+t.width,y:a};break;case Ur:l={x:t.x-r.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?zb(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Gl:l[c]=l[c]-(t[u]/2-r[u]/2);break;case gd:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function vd(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,s=i===void 0?e.strategy:i,a=r.boundary,l=a===void 0?Qq:a,c=r.rootBoundary,u=c===void 0?fT:c,d=r.elementContext,f=d===void 0?Oc:d,p=r.altBoundary,h=p===void 0?!1:p,m=r.padding,b=m===void 0?0:m,v=vT(typeof b!="number"?b:yT(b,qd)),g=f===Oc?Zq:Oc,y=e.rects.popper,k=e.elements[h?g:f],x=NG(va(k)?k:k.contextElement||ws(e.elements.popper),l,u,s),w=Xl(e.elements.reference),E=kT({reference:w,element:y,strategy:"absolute",placement:o}),M=av(Object.assign({},y,E)),C=f===Oc?M:w,T={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},R=e.modifiersData.offset;if(f===Oc&&R){var z=R[o];Object.keys(T).forEach(function(D){var F=[$n,Dn].indexOf(D)>=0?1:-1,V=[jr,Dn].indexOf(D)>=0?"y":"x";T[D]+=z[V]*F})}return T}function PG(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?pT:l,u=Jl(n),d=u?a?C4:C4.filter(function(h){return Jl(h)===u}):qd,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=vd(e,{placement:m,boundary:o,rootBoundary:i,padding:s})[Oo(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function zG(e){if(Oo(e)===Rb)return[];var t=pp(e);return[O4(e),t,O4(t)]}function LG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,b=t.options.placement,v=Oo(b),g=v===b,y=l||(g||!h?[pp(b)]:zG(b)),k=[b].concat(y).reduce(function(ae,fe){return ae.concat(Oo(fe)===Rb?PG(t,{placement:fe,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):fe)},[]),x=t.rects.reference,w=t.rects.popper,E=new Map,M=!0,C=k[0],T=0;T=0,V=F?"width":"height",L=vd(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),K=F?D?$n:Ur:D?Dn:jr;x[V]>w[V]&&(K=pp(K));var A=pp(K),P=[];if(i&&P.push(L[z]<=0),a&&P.push(L[K]<=0,L[A]<=0),P.every(function(ae){return ae})){C=R,M=!1;break}E.set(R,P)}if(M)for(var B=h?3:1,X=function(fe){var pe=k.find(function(ge){var Oe=E.get(ge);if(Oe)return Oe.slice(0,fe).every(function(Ce){return Ce})});if(pe)return C=pe,"break"},J=B;J>0;J--){var Re=X(J);if(Re==="break")break}t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}}const IG={name:"flip",enabled:!0,phase:"main",fn:LG,requiresIfExists:["offset"],data:{_skip:!1}};function A4(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function R4(e){return[jr,$n,Dn,Ur].some(function(t){return e[t]>=0})}function DG(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=vd(t,{elementContext:"reference"}),a=vd(t,{altBoundary:!0}),l=A4(s,n),c=A4(a,o,i),u=R4(l),d=R4(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const $G={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:DG};function HG(e,t,r){var n=Oo(e),o=[Ur,jr].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Ur,$n].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function BG(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,s=pT.reduce(function(u,d){return u[d]=HG(d,t.rects,i),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}const FG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:BG};function VG(e){var t=e.state,r=e.name;t.modifiersData[r]=kT({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const jG={name:"popperOffsets",enabled:!0,phase:"read",fn:VG,data:{}};function UG(e){return e==="x"?"y":"x"}function WG(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=f===void 0?!0:f,h=r.tetherOffset,m=h===void 0?0:h,b=vd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Oo(t.placement),g=Jl(t.placement),y=!g,k=zb(v),x=UG(k),w=t.modifiersData.popperOffsets,E=t.rects.reference,M=t.rects.popper,C=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,T=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(w){if(i){var D,F=k==="y"?jr:Ur,V=k==="y"?Dn:$n,L=k==="y"?"height":"width",K=w[k],A=K+b[F],P=K-b[V],B=p?-M[L]/2:0,X=g===Gl?E[L]:M[L],J=g===Gl?-M[L]:-E[L],Re=t.elements.arrow,ae=p&&Re?Pb(Re):{width:0,height:0},fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gT(),pe=fe[F],ge=fe[V],Oe=_u(0,E[L],ae[L]),Ce=y?E[L]/2-B-Oe-pe-T.mainAxis:X-Oe-pe-T.mainAxis,mt=y?-E[L]/2+B+Oe+ge+T.mainAxis:J+Oe+ge+T.mainAxis,it=t.elements.arrow&&Gd(t.elements.arrow),Ar=it?k==="y"?it.clientTop||0:it.clientLeft||0:0,me=(D=R==null?void 0:R[k])!=null?D:0,Be=K+Ce-me-Ar,Xe=K+mt-me,Vn=_u(p?vh(A,Be):A,K,p?ta(P,Xe):P);w[k]=Vn,z[k]=Vn-K}if(a){var Yr,sr=k==="x"?jr:Ur,Io=k==="x"?Dn:$n,$t=w[x],Xr=x==="y"?"height":"width",kn=$t+b[sr],jn=$t-b[Io],tt=[jr,Ur].indexOf(v)!==-1,Jr=(Yr=R==null?void 0:R[x])!=null?Yr:0,xn=tt?kn:$t-E[Xr]-M[Xr]-Jr+T.altAxis,gi=tt?$t+E[Xr]+M[Xr]-Jr-T.altAxis:jn,Aa=p&&tt?mG(xn,$t,gi):_u(p?xn:kn,$t,p?gi:jn);w[x]=Aa,z[x]=Aa-$t}t.modifiersData[n]=z}}const KG={name:"preventOverflow",enabled:!0,phase:"main",fn:WG,requiresIfExists:["offset"]};function qG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function GG(e){return e===gn(e)||!Nn(e)?Lb(e):qG(e)}function YG(e){var t=e.getBoundingClientRect(),r=Yl(t.width)/e.offsetWidth||1,n=Yl(t.height)/e.offsetHeight||1;return r!==1||n!==1}function XG(e,t,r){r===void 0&&(r=!1);var n=Nn(t),o=Nn(t)&&YG(t),i=ws(t),s=Xl(e,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((No(t)!=="body"||Db(i))&&(a=GG(t)),Nn(t)?(l=Xl(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ib(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function JG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=t.get(a);l&&o(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function QG(e){var t=JG(e);return cG.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function ZG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function eY(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var N4={placement:"bottom",modifiers:[],strategy:"absolute"};function P4(){for(var e=arguments.length,t=new Array(e),r=0;r{i||a(oY(o)||document.body)},[o,i]),ha(()=>{if(s&&!i)return Z0(r,s),()=>{Z0(r,null)}},[r,s,i]),i){if(S.isValidElement(n)){const c={ref:l};return S.cloneElement(n,c)}return O.jsx(S.Fragment,{children:n})}return O.jsx(S.Fragment,{children:s&&fm.createPortal(n,s)})});function iY(e){return Kt("MuiPopper",e)}qt("MuiPopper",["root"]);const sY=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],aY=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function lY(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function lv(e){return typeof e=="function"?e():e}function cY(e){return e.nodeType!==void 0}const uY=()=>ir({root:["root"]},Bq(iY)),dY={},fY=S.forwardRef(function(t,r){var n;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:p={},slots:h={},TransitionProps:m}=t,b=be(t,sY),v=S.useRef(null),g=Wr(v,r),y=S.useRef(null),k=Wr(y,f),x=S.useRef(k);ha(()=>{x.current=k},[k]),S.useImperativeHandle(f,()=>y.current,[]);const w=lY(u,s),[E,M]=S.useState(w),[C,T]=S.useState(lv(o));S.useEffect(()=>{y.current&&y.current.forceUpdate()}),S.useEffect(()=>{o&&T(lv(o))},[o]),ha(()=>{if(!C||!c)return;const V=A=>{M(A.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:A})=>{V(A)}}];l!=null&&(L=L.concat(l)),d&&d.modifiers!=null&&(L=L.concat(d.modifiers));const K=nY(C,v.current,_({placement:w},d,{modifiers:L}));return x.current(K),()=>{K.destroy(),x.current(null)}},[C,a,l,c,d,w]);const R={placement:E};m!==null&&(R.TransitionProps=m);const z=uY(),D=(n=h.root)!=null?n:"div",F=li({elementType:D,externalSlotProps:p.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:g},ownerState:t,className:z.root});return O.jsx(D,_({},F,{children:typeof i=="function"?i(R):i}))}),pY=S.forwardRef(function(t,r){const{anchorEl:n,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=dY,popperRef:p,style:h,transition:m=!1,slotProps:b={},slots:v={}}=t,g=be(t,aY),[y,k]=S.useState(!0),x=()=>{k(!1)},w=()=>{k(!0)};if(!l&&!u&&(!m||y))return null;let E;if(i)E=i;else if(n){const T=lv(n);E=T&&cY(T)?Vr(T).body:Vr(null).body}const M=!u&&l&&(!m||y)?"none":void 0,C=m?{in:u,onEnter:x,onExited:w}:void 0;return O.jsx(xT,{disablePortal:a,container:E,children:O.jsx(fY,_({anchorEl:n,direction:s,disablePortal:a,modifiers:c,ref:r,open:m?!y:u,placement:d,popperOptions:f,popperRef:p,slotProps:b,slots:v},g,{style:_({position:"fixed",top:0,left:0,display:M},h),TransitionProps:C,children:o}))})});function hY(e){const t=Vr(e);return t.body===e?fd(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Ru(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function z4(e){return parseInt(fd(e).getComputedStyle(e).paddingRight,10)||0}function mY(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function L4(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,s=>{const a=i.indexOf(s)===-1,l=!mY(s);a&&l&&Ru(s,o)})}function l1(e,t){let r=-1;return e.some((n,o)=>t(n)?(r=o,!0):!1),r}function gY(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(hY(n)){const s=A3(Vr(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${z4(n)+s}px`;const a=Vr(n).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${z4(l)+s}px`})}let i;if(n.parentNode instanceof DocumentFragment)i=Vr(n).body;else{const s=n.parentElement,a=fd(n);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:n}r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function vY(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class yY{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&Ru(t.modalRef,!1);const o=vY(r);L4(r,t.mount,t.modalRef,o,!0);const i=l1(this.containers,s=>s.container===r);return i!==-1?(this.containers[i].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),n)}mount(t,r){const n=l1(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[n];o.restore||(o.restore=gY(o,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const o=l1(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Ru(t.modalRef,r),L4(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Ru(s.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function bY(e){return typeof e=="function"?e():e}function kY(e){return e?e.props.hasOwnProperty("in"):!1}const xY=new yY;function wY(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=xY,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=S.useRef({}),p=S.useRef(null),h=S.useRef(null),m=Wr(h,d),[b,v]=S.useState(!u),g=kY(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const k=()=>Vr(p.current),x=()=>(f.current.modalRef=h.current,f.current.mount=p.current,f.current),w=()=>{o.mount(x(),{disableScrollLock:n}),h.current&&(h.current.scrollTop=0)},E=qs(()=>{const L=bY(t)||k().body;o.add(x(),L),h.current&&w()}),M=S.useCallback(()=>o.isTopModal(x()),[o]),C=qs(L=>{p.current=L,L&&(u&&M()?w():h.current&&Ru(h.current,y))}),T=S.useCallback(()=>{o.remove(x(),y)},[y,o]);S.useEffect(()=>()=>{T()},[T]),S.useEffect(()=>{u?E():(!g||!i)&&T()},[u,T,g,i,E]);const R=L=>K=>{var A;(A=L.onKeyDown)==null||A.call(L,K),!(K.key!=="Escape"||!M())&&(r||(K.stopPropagation(),c&&c(K,"escapeKeyDown")))},z=L=>K=>{var A;(A=L.onClick)==null||A.call(L,K),K.target===K.currentTarget&&c&&c(K,"backdropClick")};return{getRootProps:(L={})=>{const K=dT(e);delete K.onTransitionEnter,delete K.onTransitionExited;const A=_({},K,L);return _({role:"presentation"},A,{onKeyDown:R(A),ref:m})},getBackdropProps:(L={})=>{const K=L;return _({"aria-hidden":!0},K,{onClick:z(K),open:u})},getTransitionProps:()=>{const L=()=>{v(!1),s&&s()},K=()=>{v(!0),a&&a(),i&&T()};return{onEnter:Kw(L,l==null?void 0:l.props.onEnter),onExited:Kw(K,l==null?void 0:l.props.onExited)}},rootRef:m,portalRef:C,isTopModal:M,exited:b,hasTransition:g}}const SY=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],EY=et(pY,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),CY=S.forwardRef(function(t,r){var n;const o=xb(),i=Yt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:p,open:h,placement:m,popperOptions:b,popperRef:v,transition:g,slots:y,slotProps:k}=i,x=be(i,SY),w=(n=y==null?void 0:y.root)!=null?n:l==null?void 0:l.Root,E=_({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:p,open:h,placement:m,popperOptions:b,popperRef:v,transition:g},x);return O.jsx(EY,_({as:a,direction:o==null?void 0:o.direction,slots:{root:w},slotProps:k??c},E,{ref:r}))}),$b=CY,MY=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],TY={entering:{opacity:1},entered:{opacity:1}},OY=S.forwardRef(function(t,r){const n=Jm(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:h,onExiting:m,style:b,timeout:v=o,TransitionComponent:g=lT}=t,y=be(t,MY),k=S.useRef(null),x=Wr(k,a.ref,r),w=F=>V=>{if(F){const L=k.current;V===void 0?F(L):F(L,V)}},E=w(f),M=w((F,V)=>{cT(F);const L=gh({style:b,timeout:v,easing:l},{mode:"enter"});F.style.webkitTransition=n.transitions.create("opacity",L),F.style.transition=n.transitions.create("opacity",L),u&&u(F,V)}),C=w(d),T=w(m),R=w(F=>{const V=gh({style:b,timeout:v,easing:l},{mode:"exit"});F.style.webkitTransition=n.transitions.create("opacity",V),F.style.transition=n.transitions.create("opacity",V),p&&p(F)}),z=w(h),D=F=>{i&&i(k.current,F)};return O.jsx(g,_({appear:s,in:c,nodeRef:k,onEnter:M,onEntered:C,onEntering:E,onExit:R,onExited:z,onExiting:T,addEndListener:D,timeout:v},y,{children:(F,V)=>S.cloneElement(a,_({style:_({opacity:0,visibility:F==="exited"&&!c?"hidden":void 0},TY[F],b,a.props.style),ref:x},V))}))}),_Y=OY;function AY(e){return Kt("MuiBackdrop",e)}qt("MuiBackdrop",["root","invisible"]);const RY=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],NY=e=>{const{classes:t,invisible:r}=e;return ir({root:["root",r&&"invisible"]},AY,t)},PY=et("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>_({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),zY=S.forwardRef(function(t,r){var n,o,i;const s=Yt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:b=_Y,transitionDuration:v}=s,g=be(s,RY),y=_({},s,{component:c,invisible:f}),k=NY(y),x=(n=h.root)!=null?n:d.root;return O.jsx(b,_({in:p,timeout:v},g,{children:O.jsx(PY,_({"aria-hidden":!0},x,{as:(o=(i=m.root)!=null?i:u.Root)!=null?o:c,className:Te(k.root,l,x==null?void 0:x.className),ownerState:_({},y,x==null?void 0:x.ownerState),classes:k,ref:r,children:a}))}))}),LY=zY;function IY(e){return Kt("MuiBadge",e)}const DY=qt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ki=DY,$Y=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],c1=10,u1=4,HY=e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${We(r.vertical)}${We(r.horizontal)}`,`anchorOrigin${We(r.vertical)}${We(r.horizontal)}${We(o)}`,`overlap${We(o)}`,t!=="default"&&`color${We(t)}`]};return ir(a,IY,s)},BY=et("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),FY=et("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${We(r.anchorOrigin.vertical)}${We(r.anchorOrigin.horizontal)}${We(r.overlap)}`],r.color!=="default"&&t[`color${We(r.color)}`],r.invisible&&t.invisible]}})(({theme:e,ownerState:t})=>_({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:c1*2,lineHeight:1,padding:"0 6px",height:c1*2,borderRadius:c1,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.variant==="dot"&&{borderRadius:u1,height:u1*2,minWidth:u1*2,padding:0},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ki.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})})),VY=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Yt({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:p={},componentsProps:h={},children:m,overlap:b="rectangular",color:v="default",invisible:g=!1,max:y=99,badgeContent:k,slots:x,slotProps:w,showZero:E=!1,variant:M="standard"}=c,C=be(c,$Y),{badgeContent:T,invisible:R,max:z,displayValue:D}=Uq({max:y,invisible:g,badgeContent:k,showZero:E}),F=R3({anchorOrigin:u,color:v,overlap:b,variant:M,badgeContent:k}),V=R||T==null&&M!=="dot",{color:L=v,overlap:K=b,anchorOrigin:A=u,variant:P=M}=V?F:c,B=P!=="dot"?D:void 0,X=_({},c,{badgeContent:T,invisible:V,max:z,displayValue:B,showZero:E,anchorOrigin:A,color:L,overlap:K,variant:P}),J=HY(X),Re=(n=(o=x==null?void 0:x.root)!=null?o:p.Root)!=null?n:BY,ae=(i=(s=x==null?void 0:x.badge)!=null?s:p.Badge)!=null?i:FY,fe=(a=w==null?void 0:w.root)!=null?a:h.root,pe=(l=w==null?void 0:w.badge)!=null?l:h.badge,ge=li({elementType:Re,externalSlotProps:fe,externalForwardedProps:C,additionalProps:{ref:r,as:f},ownerState:X,className:Te(fe==null?void 0:fe.className,J.root,d)}),Oe=li({elementType:ae,externalSlotProps:pe,ownerState:X,className:Te(J.badge,pe==null?void 0:pe.className)});return O.jsxs(Re,_({},ge,{children:[m,O.jsx(ae,_({},Oe,{children:B}))]}))}),jY=VY,UY=Cb(),WY=IW({themeId:Kl,defaultTheme:UY,defaultClassName:"MuiBox-root",generateClassName:P3.generate}),wT=WY;function KY(e){return Kt("MuiModal",e)}qt("MuiModal",["root","hidden","backdrop"]);const qY=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],GY=e=>{const{open:t,exited:r,classes:n}=e;return ir({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},KY,n)},YY=et("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>_({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),XY=et(LY,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),JY=S.forwardRef(function(t,r){var n,o,i,s,a,l;const c=Yt({name:"MuiModal",props:t}),{BackdropComponent:u=XY,BackdropProps:d,className:f,closeAfterTransition:p=!1,children:h,container:m,component:b,components:v={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:k=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:E=!1,disableScrollLock:M=!1,hideBackdrop:C=!1,keepMounted:T=!1,onBackdropClick:R,open:z,slotProps:D,slots:F}=c,V=be(c,qY),L=_({},c,{closeAfterTransition:p,disableAutoFocus:y,disableEnforceFocus:k,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:E,disableScrollLock:M,hideBackdrop:C,keepMounted:T}),{getRootProps:K,getBackdropProps:A,getTransitionProps:P,portalRef:B,isTopModal:X,exited:J,hasTransition:Re}=wY(_({},L,{rootRef:r})),ae=_({},L,{exited:J}),fe=GY(ae),pe={};if(h.props.tabIndex===void 0&&(pe.tabIndex="-1"),Re){const{onEnter:me,onExited:Be}=P();pe.onEnter=me,pe.onExited=Be}const ge=(n=(o=F==null?void 0:F.root)!=null?o:v.Root)!=null?n:YY,Oe=(i=(s=F==null?void 0:F.backdrop)!=null?s:v.Backdrop)!=null?i:u,Ce=(a=D==null?void 0:D.root)!=null?a:g.root,mt=(l=D==null?void 0:D.backdrop)!=null?l:g.backdrop,it=li({elementType:ge,externalSlotProps:Ce,externalForwardedProps:V,getSlotProps:K,additionalProps:{ref:r,as:b},ownerState:ae,className:Te(f,Ce==null?void 0:Ce.className,fe==null?void 0:fe.root,!ae.open&&ae.exited&&(fe==null?void 0:fe.hidden))}),Ar=li({elementType:Oe,externalSlotProps:mt,additionalProps:d,getSlotProps:me=>A(_({},me,{onClick:Be=>{R&&R(Be),me!=null&&me.onClick&&me.onClick(Be)}})),className:Te(mt==null?void 0:mt.className,d==null?void 0:d.className,fe==null?void 0:fe.backdrop),ownerState:ae});return!T&&!z&&(!Re||J)?null:O.jsx(xT,{ref:B,container:m,disablePortal:w,children:O.jsxs(ge,_({},it,{children:[!C&&u?O.jsx(Oe,_({},Ar)):null,O.jsx(Jq,{disableEnforceFocus:k,disableAutoFocus:y,disableRestoreFocus:E,isEnabled:X,open:z,children:S.cloneElement(h,pe)})]}))})}),QY=JY,ZY=qt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),I4=ZY,eX=hK({createStyledComponent:et("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Yt({props:e,name:"MuiStack"})}),tX=eX,rX=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function cv(e){return`scale(${e}, ${e**2})`}const nX={entering:{opacity:1,transform:cv(1)},entered:{opacity:1,transform:"none"}},d1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ST=S.forwardRef(function(t,r){const{addEndListener:n,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:h,timeout:m="auto",TransitionComponent:b=lT}=t,v=be(t,rX),g=S.useRef(),y=S.useRef(),k=Jm(),x=S.useRef(null),w=Wr(x,i.ref,r),E=V=>L=>{if(V){const K=x.current;L===void 0?V(K):V(K,L)}},M=E(u),C=E((V,L)=>{cT(V);const{duration:K,delay:A,easing:P}=gh({style:h,timeout:m,easing:s},{mode:"enter"});let B;m==="auto"?(B=k.transitions.getAutoHeightDuration(V.clientHeight),y.current=B):B=K,V.style.transition=[k.transitions.create("opacity",{duration:B,delay:A}),k.transitions.create("transform",{duration:d1?B:B*.666,delay:A,easing:P})].join(","),l&&l(V,L)}),T=E(c),R=E(p),z=E(V=>{const{duration:L,delay:K,easing:A}=gh({style:h,timeout:m,easing:s},{mode:"exit"});let P;m==="auto"?(P=k.transitions.getAutoHeightDuration(V.clientHeight),y.current=P):P=L,V.style.transition=[k.transitions.create("opacity",{duration:P,delay:K}),k.transitions.create("transform",{duration:d1?P:P*.666,delay:d1?K:K||P*.333,easing:A})].join(","),V.style.opacity=0,V.style.transform=cv(.75),d&&d(V)}),D=E(f),F=V=>{m==="auto"&&(g.current=setTimeout(V,y.current||0)),n&&n(x.current,V)};return S.useEffect(()=>()=>{clearTimeout(g.current)},[]),O.jsx(b,_({appear:o,in:a,nodeRef:x,onEnter:C,onEntered:T,onEntering:M,onExit:z,onExited:D,onExiting:R,addEndListener:F,timeout:m==="auto"?null:m},v,{children:(V,L)=>S.cloneElement(i,_({style:_({opacity:0,transform:cv(.75),visibility:V==="exited"&&!a?"hidden":void 0},nX[V],h,i.props.style),ref:w},L))}))});ST.muiSupportAuto=!0;const uv=ST,oX=S.createContext({}),yd=oX;function iX(e){return Kt("MuiList",e)}qt("MuiList",["root","padding","dense","subheader"]);const sX=["children","className","component","dense","disablePadding","subheader"],aX=e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return ir({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},iX,t)},lX=et("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>_({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),cX=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=n,u=be(n,sX),d=S.useMemo(()=>({dense:a}),[a]),f=_({},n,{component:s,dense:a,disablePadding:l}),p=aX(f);return O.jsx(yd.Provider,{value:d,children:O.jsxs(lX,_({as:s,className:Te(p.root,i),ref:r,ownerState:f},u,{children:[c,o]}))})}),uX=cX;function dX(e){return Kt("MuiListItemIcon",e)}const fX=qt("MuiListItemIcon",["root","alignItemsFlexStart"]),D4=fX,pX=["className"],hX=e=>{const{alignItems:t,classes:r}=e;return ir({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},dX,r)},mX=et("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>_({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),gX=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiListItemIcon"}),{className:o}=n,i=be(n,pX),s=S.useContext(yd),a=_({},n,{alignItems:s.alignItems}),l=hX(a);return O.jsx(mX,_({className:Te(l.root,o),ownerState:a,ref:r},i))}),vX=gX;function yX(e){return Kt("MuiListItemText",e)}const bX=qt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),yh=bX,kX=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],xX=e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return ir({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},yX,t)},wX=et("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${yh.primary}`]:t.primary},{[`& .${yh.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>_({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),SX=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=n,f=be(n,kX),{dense:p}=S.useContext(yd);let h=l??o,m=u;const b=_({},n,{disableTypography:s,inset:a,primary:!!h,secondary:!!m,dense:p}),v=xX(b);return h!=null&&h.type!==lu&&!s&&(h=O.jsx(lu,_({variant:p?"body2":"body1",className:v.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),m!=null&&m.type!==lu&&!s&&(m=O.jsx(lu,_({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:m}))),O.jsxs(wX,_({className:Te(v.root,i),ownerState:b,ref:r},f,{children:[h,m]}))}),EX=SX,CX=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function f1(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function $4(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function ET(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function _c(e,t,r,n,o,i){let s=!1,a=o(e,t,t?r:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=n?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!ET(a,i)||l)a=o(e,a,r);else return a.focus(),!0}return!1}const MX=S.forwardRef(function(t,r){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=be(t,CX),p=S.useRef(null),h=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ha(()=>{o&&p.current.focus()},[o]),S.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(y,k)=>{const x=!p.current.style.width;if(y.clientHeight{const k=p.current,x=y.key,w=Vr(k).activeElement;if(x==="ArrowDown")y.preventDefault(),_c(k,w,c,l,f1);else if(x==="ArrowUp")y.preventDefault(),_c(k,w,c,l,$4);else if(x==="Home")y.preventDefault(),_c(k,null,c,l,f1);else if(x==="End")y.preventDefault(),_c(k,null,c,l,$4);else if(x.length===1){const E=h.current,M=x.toLowerCase(),C=performance.now();E.keys.length>0&&(C-E.lastTime>500?(E.keys=[],E.repeating=!0,E.previousKeyMatched=!0):E.repeating&&M!==E.keys[0]&&(E.repeating=!1)),E.lastTime=C,E.keys.push(M);const T=w&&!E.repeating&&ET(w,E);E.previousKeyMatched&&(T||_c(k,w,!1,l,f1,E))?y.preventDefault():E.previousKeyMatched=!1}u&&u(y)},b=Wr(p,r);let v=-1;S.Children.forEach(s,(y,k)=>{if(!S.isValidElement(y)){v===k&&(v+=1,v>=s.length&&(v=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||v===-1)&&(v=k),v===k&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const g=S.Children.map(s,(y,k)=>{if(k===v){const x={};return i&&(x.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(x.tabIndex=0),S.cloneElement(y,x)}return y});return O.jsx(uX,_({role:"menu",ref:b,className:a,onKeyDown:m,tabIndex:o?0:-1},f,{children:g}))}),TX=MX;function OX(e){return Kt("MuiPopover",e)}qt("MuiPopover",["root","paper"]);const _X=["onEntering"],AX=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],RX=["slotProps"];function H4(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function B4(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function F4(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function p1(e){return typeof e=="function"?e():e}const NX=e=>{const{classes:t}=e;return ir({root:["root"],paper:["paper"]},OX,t)},PX=et(QY,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),CT=et(oq,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),zX=S.forwardRef(function(t,r){var n,o,i;const s=Yt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:p,container:h,elevation:m=8,marginThreshold:b=16,open:v,PaperProps:g={},slots:y,slotProps:k,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=uv,transitionDuration:E="auto",TransitionProps:{onEntering:M}={},disableScrollLock:C=!1}=s,T=be(s.TransitionProps,_X),R=be(s,AX),z=(n=k==null?void 0:k.paper)!=null?n:g,D=S.useRef(),F=Wr(D,z.ref),V=_({},s,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:b,externalPaperSlotProps:z,transformOrigin:x,TransitionComponent:w,transitionDuration:E,TransitionProps:T}),L=NX(V),K=S.useCallback(()=>{if(d==="anchorPosition")return u;const me=p1(l),Xe=(me&&me.nodeType===1?me:Vr(D.current).body).getBoundingClientRect();return{top:Xe.top+H4(Xe,c.vertical),left:Xe.left+B4(Xe,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),A=S.useCallback(me=>({vertical:H4(me,x.vertical),horizontal:B4(me,x.horizontal)}),[x.horizontal,x.vertical]),P=S.useCallback(me=>{const Be={width:me.offsetWidth,height:me.offsetHeight},Xe=A(Be);if(d==="none")return{top:null,left:null,transformOrigin:F4(Xe)};const Vn=K();let Yr=Vn.top-Xe.vertical,sr=Vn.left-Xe.horizontal;const Io=Yr+Be.height,$t=sr+Be.width,Xr=fd(p1(l)),kn=Xr.innerHeight-b,jn=Xr.innerWidth-b;if(b!==null&&Yrkn){const tt=Io-kn;Yr-=tt,Xe.vertical+=tt}if(b!==null&&srjn){const tt=$t-jn;sr-=tt,Xe.horizontal+=tt}return{top:`${Math.round(Yr)}px`,left:`${Math.round(sr)}px`,transformOrigin:F4(Xe)}},[l,d,K,A,b]),[B,X]=S.useState(v),J=S.useCallback(()=>{const me=D.current;if(!me)return;const Be=P(me);Be.top!==null&&(me.style.top=Be.top),Be.left!==null&&(me.style.left=Be.left),me.style.transformOrigin=Be.transformOrigin,X(!0)},[P]);S.useEffect(()=>(C&&window.addEventListener("scroll",J),()=>window.removeEventListener("scroll",J)),[l,C,J]);const Re=(me,Be)=>{M&&M(me,Be),J()},ae=()=>{X(!1)};S.useEffect(()=>{v&&J()}),S.useImperativeHandle(a,()=>v?{updatePosition:()=>{J()}}:null,[v,J]),S.useEffect(()=>{if(!v)return;const me=kj(()=>{J()}),Be=fd(l);return Be.addEventListener("resize",me),()=>{me.clear(),Be.removeEventListener("resize",me)}},[l,v,J]);let fe=E;E==="auto"&&!w.muiSupportAuto&&(fe=void 0);const pe=h||(l?Vr(p1(l)).body:void 0),ge=(o=y==null?void 0:y.root)!=null?o:PX,Oe=(i=y==null?void 0:y.paper)!=null?i:CT,Ce=li({elementType:Oe,externalSlotProps:_({},z,{style:B?z.style:_({},z.style,{opacity:0})}),additionalProps:{elevation:m,ref:F},ownerState:V,className:Te(L.paper,z==null?void 0:z.className)}),mt=li({elementType:ge,externalSlotProps:(k==null?void 0:k.root)||{},externalForwardedProps:R,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:pe,open:v},ownerState:V,className:Te(L.root,p)}),{slotProps:it}=mt,Ar=be(mt,RX);return O.jsx(ge,_({},Ar,!uT(ge)&&{slotProps:it,disableScrollLock:C},{children:O.jsx(w,_({appear:!0,in:v,onEntering:Re,onExited:ae,timeout:fe},T,{children:O.jsx(Oe,_({},Ce,{children:f}))}))}))}),LX=zX;function IX(e){return Kt("MuiMenu",e)}qt("MuiMenu",["root","paper","list"]);const DX=["onEntering"],$X=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],HX={vertical:"top",horizontal:"right"},BX={vertical:"top",horizontal:"left"},FX=e=>{const{classes:t}=e;return ir({root:["root"],paper:["paper"],list:["list"]},IX,t)},VX=et(LX,{shouldForwardProp:e=>Tb(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jX=et(CT,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),UX=et(TX,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),WX=S.forwardRef(function(t,r){var n,o;const i=Yt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:p={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:b}={},variant:v="selectedMenu",slots:g={},slotProps:y={}}=i,k=be(i.TransitionProps,DX),x=be(i,$X),w=Jm(),E=w.direction==="rtl",M=_({},i,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:b,PaperProps:p,transitionDuration:m,TransitionProps:k,variant:v}),C=FX(M),T=s&&!c&&f,R=S.useRef(null),z=(P,B)=>{R.current&&R.current.adjustStyleForScrollbar(P,w),b&&b(P,B)},D=P=>{P.key==="Tab"&&(P.preventDefault(),d&&d(P,"tabKeyDown"))};let F=-1;S.Children.map(a,(P,B)=>{S.isValidElement(P)&&(P.props.disabled||(v==="selectedMenu"&&P.props.selected||F===-1)&&(F=B))});const V=(n=g.paper)!=null?n:jX,L=(o=y.paper)!=null?o:p,K=li({elementType:g.root,externalSlotProps:y.root,ownerState:M,className:[C.root,l]}),A=li({elementType:V,externalSlotProps:L,ownerState:M,className:C.paper});return O.jsx(VX,_({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?HX:BX,slots:{paper:V,root:g.root},slotProps:{root:K,paper:A},open:f,ref:r,transitionDuration:m,TransitionProps:_({onEntering:z},k),ownerState:M},x,{classes:h,children:O.jsx(UX,_({onKeyDown:D,actions:R,autoFocus:s&&(F===-1||c),autoFocusItem:T,variant:v},u,{className:Te(C.list,u.className),children:a}))}))}),KX=WX;function qX(e){return Kt("MuiMenuItem",e)}const GX=qt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ac=GX,YX=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],XX=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},JX=e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:s}=e,l=ir({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},qX,s);return _({},s,l)},QX=et(Ab,{shouldForwardProp:e=>Tb(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:XX})(({theme:e,ownerState:t})=>_({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ac.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Dr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ac.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Dr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ac.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Dr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Dr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ac.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ac.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${I4.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${I4.inset}`]:{marginLeft:52},[`& .${yh.root}`]:{marginTop:0,marginBottom:0},[`& .${yh.inset}`]:{paddingLeft:36},[`& .${D4.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&_({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${D4.root} svg`]:{fontSize:"1.25rem"}}))),ZX=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=n,p=be(n,YX),h=S.useContext(yd),m=S.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),b=S.useRef(null);ha(()=>{o&&b.current&&b.current.focus()},[o]);const v=_({},n,{dense:m.dense,divider:a,disableGutters:l}),g=JX(n),y=Wr(b,r);let k;return n.disabled||(k=d!==void 0?d:-1),O.jsx(yd.Provider,{value:m,children:O.jsx(QX,_({ref:y,role:u,tabIndex:k,component:i,focusVisibleClassName:Te(g.focusVisible,c),className:Te(g.root,f)},p,{ownerState:v,classes:g}))})}),eJ=ZX;function tJ(e){return Kt("MuiTooltip",e)}const rJ=qt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Bi=rJ,nJ=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function oJ(e){return Math.round(e*1e5)/1e5}const iJ=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,s={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${We(i.split("-")[0])}`],arrow:["arrow"]};return ir(s,tJ,t)},sJ=et($b,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>_({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Bi.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Bi.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Bi.arrow}`]:_({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Bi.arrow}`]:_({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),aJ=et("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${We(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>_({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Dr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${oJ(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Bi.popper}[data-popper-placement*="left"] &`]:_({transformOrigin:"right center"},t.isRtl?_({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):_({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Bi.popper}[data-popper-placement*="right"] &`]:_({transformOrigin:"left center"},t.isRtl?_({marginRight:"14px"},t.touch&&{marginRight:"24px"}):_({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Bi.popper}[data-popper-placement*="top"] &`]:_({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Bi.popper}[data-popper-placement*="bottom"] &`]:_({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),lJ=et("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Dr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Mf=!1,h1=null,Rc={x:0,y:0};function Tf(e,t){return r=>{t&&t(r),e(r)}}const cJ=S.forwardRef(function(t,r){var n,o,i,s,a,l,c,u,d,f,p,h,m,b,v,g,y,k,x;const w=Yt({props:t,name:"MuiTooltip"}),{arrow:E=!1,children:M,components:C={},componentsProps:T={},describeChild:R=!1,disableFocusListener:z=!1,disableHoverListener:D=!1,disableInteractive:F=!1,disableTouchListener:V=!1,enterDelay:L=100,enterNextDelay:K=0,enterTouchDelay:A=700,followCursor:P=!1,id:B,leaveDelay:X=0,leaveTouchDelay:J=1500,onClose:Re,onOpen:ae,open:fe,placement:pe="bottom",PopperComponent:ge,PopperProps:Oe={},slotProps:Ce={},slots:mt={},title:it,TransitionComponent:Ar=uv,TransitionProps:me}=w,Be=be(w,nJ),Xe=S.isValidElement(M)?M:O.jsx("span",{children:M}),Vn=Jm(),Yr=Vn.direction==="rtl",[sr,Io]=S.useState(),[$t,Xr]=S.useState(null),kn=S.useRef(!1),jn=F||P,tt=S.useRef(),Jr=S.useRef(),xn=S.useRef(),gi=S.useRef(),[Aa,he]=Ej({controlled:fe,default:!1,name:"Tooltip",state:"open"});let wn=Aa;const fc=Sj(B),vi=S.useRef(),pc=S.useCallback(()=>{vi.current!==void 0&&(document.body.style.WebkitUserSelect=vi.current,vi.current=void 0),clearTimeout(gi.current)},[]);S.useEffect(()=>()=>{clearTimeout(tt.current),clearTimeout(Jr.current),clearTimeout(xn.current),pc()},[pc]);const Lk=Se=>{clearTimeout(h1),Mf=!0,he(!0),ae&&!wn&&ae(Se)},Zd=qs(Se=>{clearTimeout(h1),h1=setTimeout(()=>{Mf=!1},800+X),he(!1),Re&&wn&&Re(Se),clearTimeout(tt.current),tt.current=setTimeout(()=>{kn.current=!1},Vn.transitions.duration.shortest)}),og=Se=>{kn.current&&Se.type!=="touchstart"||(sr&&sr.removeAttribute("title"),clearTimeout(Jr.current),clearTimeout(xn.current),L||Mf&&K?Jr.current=setTimeout(()=>{Lk(Se)},Mf?K:L):Lk(Se))},Ik=Se=>{clearTimeout(Jr.current),clearTimeout(xn.current),xn.current=setTimeout(()=>{Zd(Se)},X)},{isFocusVisibleRef:Dk,onBlur:KO,onFocus:qO,ref:GO}=_3(),[,$k]=S.useState(!1),Hk=Se=>{KO(Se),Dk.current===!1&&($k(!1),Ik(Se))},Bk=Se=>{sr||Io(Se.currentTarget),qO(Se),Dk.current===!0&&($k(!0),og(Se))},Fk=Se=>{kn.current=!0;const Qr=Xe.props;Qr.onTouchStart&&Qr.onTouchStart(Se)},Vk=og,jk=Ik,YO=Se=>{Fk(Se),clearTimeout(xn.current),clearTimeout(tt.current),pc(),vi.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",gi.current=setTimeout(()=>{document.body.style.WebkitUserSelect=vi.current,og(Se)},A)},XO=Se=>{Xe.props.onTouchEnd&&Xe.props.onTouchEnd(Se),pc(),clearTimeout(xn.current),xn.current=setTimeout(()=>{Zd(Se)},J)};S.useEffect(()=>{if(!wn)return;function Se(Qr){(Qr.key==="Escape"||Qr.key==="Esc")&&Zd(Qr)}return document.addEventListener("keydown",Se),()=>{document.removeEventListener("keydown",Se)}},[Zd,wn]);const JO=Wr(Xe.ref,GO,Io,r);!it&&it!==0&&(wn=!1);const ig=S.useRef(),QO=Se=>{const Qr=Xe.props;Qr.onMouseMove&&Qr.onMouseMove(Se),Rc={x:Se.clientX,y:Se.clientY},ig.current&&ig.current.update()},hc={},sg=typeof it=="string";R?(hc.title=!wn&&sg&&!D?it:null,hc["aria-describedby"]=wn?fc:null):(hc["aria-label"]=sg?it:null,hc["aria-labelledby"]=wn&&!sg?fc:null);const Un=_({},hc,Be,Xe.props,{className:Te(Be.className,Xe.props.className),onTouchStart:Fk,ref:JO},P?{onMouseMove:QO}:{}),mc={};V||(Un.onTouchStart=YO,Un.onTouchEnd=XO),D||(Un.onMouseOver=Tf(Vk,Un.onMouseOver),Un.onMouseLeave=Tf(jk,Un.onMouseLeave),jn||(mc.onMouseOver=Vk,mc.onMouseLeave=jk)),z||(Un.onFocus=Tf(Bk,Un.onFocus),Un.onBlur=Tf(Hk,Un.onBlur),jn||(mc.onFocus=Bk,mc.onBlur=Hk));const ZO=S.useMemo(()=>{var Se;let Qr=[{name:"arrow",enabled:!!$t,options:{element:$t,padding:4}}];return(Se=Oe.popperOptions)!=null&&Se.modifiers&&(Qr=Qr.concat(Oe.popperOptions.modifiers)),_({},Oe.popperOptions,{modifiers:Qr})},[$t,Oe]),gc=_({},w,{isRtl:Yr,arrow:E,disableInteractive:jn,placement:pe,PopperComponentProp:ge,touch:kn.current}),ag=iJ(gc),Uk=(n=(o=mt.popper)!=null?o:C.Popper)!=null?n:sJ,Wk=(i=(s=(a=mt.transition)!=null?a:C.Transition)!=null?s:Ar)!=null?i:uv,Kk=(l=(c=mt.tooltip)!=null?c:C.Tooltip)!=null?l:aJ,qk=(u=(d=mt.arrow)!=null?d:C.Arrow)!=null?u:lJ,e_=cu(Uk,_({},Oe,(f=Ce.popper)!=null?f:T.popper,{className:Te(ag.popper,Oe==null?void 0:Oe.className,(p=(h=Ce.popper)!=null?h:T.popper)==null?void 0:p.className)}),gc),t_=cu(Wk,_({},me,(m=Ce.transition)!=null?m:T.transition),gc),r_=cu(Kk,_({},(b=Ce.tooltip)!=null?b:T.tooltip,{className:Te(ag.tooltip,(v=(g=Ce.tooltip)!=null?g:T.tooltip)==null?void 0:v.className)}),gc),n_=cu(qk,_({},(y=Ce.arrow)!=null?y:T.arrow,{className:Te(ag.arrow,(k=(x=Ce.arrow)!=null?x:T.arrow)==null?void 0:k.className)}),gc);return O.jsxs(S.Fragment,{children:[S.cloneElement(Xe,Un),O.jsx(Uk,_({as:ge??$b,placement:pe,anchorEl:P?{getBoundingClientRect:()=>({top:Rc.y,left:Rc.x,right:Rc.x,bottom:Rc.y,width:0,height:0})}:sr,popperRef:ig,open:sr?wn:!1,id:fc,transition:!0},mc,e_,{popperOptions:ZO,children:({TransitionProps:Se})=>O.jsx(Wk,_({timeout:Vn.transitions.duration.shorter},Se,t_,{children:O.jsxs(Kk,_({},r_,{children:[it,E?O.jsx(qk,_({},n_,{ref:Xr})):null]}))}))}))]})}),MT=cJ;function uJ(e){return Kt("MuiToggleButton",e)}const dJ=qt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),V4=dJ,fJ=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],pJ=e=>{const{classes:t,fullWidth:r,selected:n,disabled:o,size:i,color:s}=e,a={root:["root",n&&"selected",o&&"disabled",r&&"fullWidth",`size${We(i)}`,s]};return ir(a,uJ,t)},hJ=et(Ab,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${We(r.size)}`]]}})(({theme:e,ownerState:t})=>{let r=t.color==="standard"?e.palette.text.primary:e.palette[t.color].main,n;return e.vars&&(r=t.color==="standard"?e.vars.palette.text.primary:e.vars.palette[t.color].main,n=t.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),_({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},t.fullWidth&&{width:"100%"},{[`&.${V4.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Dr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${V4.selected}`]:{color:r,backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Dr(r,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${n} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Dr(r,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${n} / ${e.vars.palette.action.selectedOpacity})`:Dr(r,e.palette.action.selectedOpacity)}}}},t.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},t.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),mJ=S.forwardRef(function(t,r){const n=Yt({props:t,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:a=!1,disableFocusRipple:l=!1,fullWidth:c=!1,onChange:u,onClick:d,selected:f,size:p="medium",value:h}=n,m=be(n,fJ),b=_({},n,{color:s,disabled:a,disableFocusRipple:l,fullWidth:c,size:p}),v=pJ(b),g=y=>{d&&(d(y,h),y.defaultPrevented)||u&&u(y,h)};return O.jsx(hJ,_({className:Te(v.root,i),disabled:a,focusRipple:!l,ref:r,onClick:g,onChange:u,value:h,ownerState:b,"aria-pressed":f},m,{children:o}))}),gJ=mJ;var vJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2c0 1.054.95 2 2 2h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM3 3h6a3 3 0 0 1 2.235 5A3 3 0 0 1 9 13H3V3zm6 6H5v2h4a1 1 0 0 0 0-2zm8-6a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM9 5H5v2h4a1 1 0 1 0 0-2z"}}],yJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],bJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],kJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"}}],xJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 19h18v2H3v-2zm5-6h3l-4 4-4-4h3V3h2v10zm10 0h3l-4 4-4-4h3V3h2v10z"}}],wJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],SJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],EJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],CJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],MJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18v2H3V3zm5 8v10H6V11H3l4-4 4 4H8zm10 0v10h-2V11h-3l4-4 4 4h-3z"}}],TJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 11h18v2H3v-2zm15 7v3h-2v-3h-3l4-4 4 4h-3zM8 18v3H6v-3H3l4-4 4 4H8zM18 6h3l-4 4-4-4h3V3h2v3zM8 6h3l-4 4-4-4h3V3h2v3z"}}],OJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.75 2.5A4.25 4.25 0 0 1 11 6.75V11H6.75a4.25 4.25 0 1 1 0-8.5zM9 9V6.75A2.25 2.25 0 1 0 6.75 9H9zm-2.25 4H11v4.25A4.25 4.25 0 1 1 6.75 13zm0 2A2.25 2.25 0 1 0 9 17.25V15H6.75zm10.5-12.5a4.25 4.25 0 1 1 0 8.5H13V6.75a4.25 4.25 0 0 1 4.25-4.25zm0 6.5A2.25 2.25 0 1 0 15 6.75V9h2.25zM13 13h4.25A4.25 4.25 0 1 1 13 17.25V13zm2 2v2.25A2.25 2.25 0 1 0 17.25 15H15z"}}],_J=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],AJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"}}],RJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7h-5a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h5V1l6 5-6 5V7z"}}],NJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],PJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],zJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],LJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3v7.267l6.294-3.633 1 1.732-6.293 3.633 6.293 3.635-1 1.732L13 13.732V21h-2v-7.268l-6.294 3.634-1-1.732L9.999 12 3.706 8.366l1-1.732L11 10.267V3z"}}],IJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.828 7.757l-5.656 5.657a1 1 0 1 0 1.414 1.414l5.657-5.656A3 3 0 1 0 12 4.929l-5.657 5.657a5 5 0 1 0 7.071 7.07L19.071 12l1.414 1.414-5.657 5.657a7 7 0 1 1-9.9-9.9l5.658-5.656a5 5 0 0 1 7.07 7.07L12 16.244A3 3 0 1 1 7.757 12l5.657-5.657 1.414 1.414z"}}],DJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}],$J=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12 2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3zm16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5z"}}],HJ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h8V5z"}}],BJ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5H8v8h8V8z"}}],FJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 3v2H4v13.385L5.763 17H20v-7h2v8a1 1 0 0 1-1 1H6.455L2 22.5V4a1 1 0 0 1 1-1h11zm5 0V0h2v3h3v2h-3v3h-2V5h-3V3h3z"}}],VJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"}}],jJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zm6 2H4.003L4 20h11V9zm-6.497 9l-3.536-3.536 1.414-1.414 2.122 2.122 4.242-4.243 1.414 1.414L8.503 18z"}}],UJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6zm2-2h8v4H8V2z"}}],WJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z"}}],KJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"}}],qJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],GJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"}}],YJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23 12l-7.071 7.071-1.414-1.414L20.172 12l-5.657-5.657 1.414-1.414L23 12zM3.828 12l5.657 5.657-1.414 1.414L1 12l7.071-7.071 1.414 1.414L3.828 12z"}}],XJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z"}}],JJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm-8 5v6h2v-6H9zm4 0v6h2v-6h-2zM9 4v2h6V4H9z"}}],QJ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-9 3h2v6H9v-6zm4 0h2v6h-2v-6zM9 4v2h6V4H9z"}}],ZJ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 3c.552 0 1 .448 1 1v8c.835-.628 1.874-1 3-1 2.761 0 5 2.239 5 5s-2.239 5-5 5c-1.032 0-1.99-.313-2.787-.848L13 20c0 .552-.448 1-1 1H6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2H7v14h4V5zm8 10h-6v2h6v-2z"}}],eQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 5c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1 .628.835 1 1.874 1 3 0 2.761-2.239 5-5 5s-5-2.239-5-5c0-1.126.372-2.165 1-3H4c-.552 0-1-.448-1-1V6c0-.552.448-1 1-1h16zm-7 10v2h6v-2h-6zm6-8H5v4h14V7z"}}],tQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],rQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],nQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9h5l-7 7-7-7h5V3h4v6z"}}],oQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z"}}],iQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM13 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.621 6.302 14.685 14.685 0 0 0 5.327 3.042l-.536 1.93A16.685 16.685 0 0 1 12 13.726a16.696 16.696 0 0 1-6.202 3.547l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042 18.077 18.077 0 0 1-2.822-4.3h2.24A16.031 16.031 0 0 0 12 10.876a16.168 16.168 0 0 0 2.91-4.876L5 6V4h6V2h2z"}}],sQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 19a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-5.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm11 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zM18 3v2H8v4h9v2H8v4h10v2H6V3h12z"}}],aQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 10h2v.757a4.5 4.5 0 0 1 7 3.743V20h-2v-5.5c0-1.43-1.175-2.5-2.5-2.5S16 13.07 16 14.5V20h-2V10zm-2-6v2H4v5h8v2H4v5h8v2H2V4h10z"}}],lQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}],cQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}],uQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"}}],dQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M6 21.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5c1.585 0 2.924 1.054 3.355 2.5H15v-2h2V9.242L14.757 7H9V9H3V3h6v2h5.757L18 1.756 22.243 6 19 9.241V15L21 15v6h-6v-2H9.355c-.43 1.446-1.77 2.5-3.355 2.5zm0-5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm13 .5h-2v2h2v-2zM18 4.586L16.586 6 18 7.414 19.414 6 18 4.586zM7 5H5v2h2V5z"}}],fQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z"}}],pQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],hQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}}],mQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"}}],gQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],vQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],yQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],bQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 1v4H4v14h16V3h1.008c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3H6V1h2zm4 7l4 4h-3v4h-2v-4H8l4-4zm6-7v4h-8V3h6V1h2z"}}],kQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}],xQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}],wQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],SQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"}}],EQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}],CQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"}}],MQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.784 14l.42-4H4V8h4.415l.525-5h2.011l-.525 5h3.989l.525-5h2.011l-.525 5H20v2h-3.784l-.42 4H20v2h-4.415l-.525 5h-2.011l.525-5H9.585l-.525 5H7.049l.525-5H4v-2h3.784zm2.011 0h3.99l.42-4h-3.99l-.42 4z"}}],TQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],OQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"}}],_Q=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v1.757l-2 2V5H5v8.1l4-4 4.328 4.329-1.415 1.413L9 11.93l-4 3.999V19h10.533l.708.001 1.329-1.33L18.9 19h.1v-2.758l2-2V20c0 .552-.448 1-1 1H4c-.55 0-1-.45-1-1V4c0-.552.448-1 1-1h16zm1.778 4.808l1.414 1.414L15.414 17l-1.416-.002.002-1.412 7.778-7.778zM15.5 7c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5S14 9.328 14 8.5 14.672 7 15.5 7z"}}],AQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.828 21l-.02.02-.021-.02H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H4.828zM20 15V5H4v14L14 9l6 6zm0 2.828l-6-6L6.828 19H20v-1.172zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"}}],RQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}],NQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}],PQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"}}],zQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 21v-2h3V5H8V3h8v2h-3v14h3v2H8zM18.05 7.05L23 12l-4.95 4.95-1.414-1.414L20.172 12l-3.536-3.536L18.05 7.05zm-12.1 0l1.414 1.414L3.828 12l3.536 3.536L5.95 16.95 1 12l4.95-4.95z"}}],LQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z"}}],IQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z"}}],DQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 13c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 17v2l2-.001V21h2v-2.001L15 19v-2l-2-.001V15zm7-12c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zM5 5v4h14V5H5z"}}],$Q=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 13c.552 0 1 .448 1 1v6c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h16zm-1 2H5v4h14v-4zM12 1c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L9 5v2l2-.001V9h2V6.999L15 7V5l-2-.001V3z"}}],HQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],BQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M11 5H5v14h6V5zm2 0v14h6V5h-6zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],FQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zM6 7v4H4V7H1l4-4 4 4H6zm0 10h3l-4 4-4-4h3v-4h2v4zm5 1h10v2H11v-2zm-2-7h12v2H9v-2z"}}],VQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],jQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.657 14.828l-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414zm-2.829 2.829l-1.414 1.414a6 6 0 1 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 1 0 12 17.657l1.414-1.414 1.414 1.414zm0-9.9l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07zM5.775 2.293l1.932-.518L8.742 5.64l-1.931.518-1.036-3.864zm9.483 16.068l1.931-.518 1.036 3.864-1.932.518-1.035-3.864zM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932zm16.068 9.483l3.864 1.035-.518 1.932-3.864-1.036.518-1.931z"}}],UQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],WQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}],KQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 4h10v2H11V4zm0 4h6v2h-6V8zm0 6h10v2H11v-2zm0 4h6v2h-6v-2zM3 4h6v6H3V4zm2 2v2h2V6H5zm-2 8h6v6H3v-6zm2 2v2h2v-2H5z"}}],qQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],GQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],YQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}],XQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.243 4.515l-6.738 6.737-.707 2.121-1.04 1.041 2.828 2.829 1.04-1.041 2.122-.707 6.737-6.738-4.242-4.242zm6.364 3.535a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0l5.657 5.657zm-6.364-.707l1.414 1.414-4.95 4.95-1.414-1.414 4.95-4.95zM4.283 16.89l2.828 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"}}],JQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm4 12.5v-4l2 2 2-2v4h2v-7h-2l-2 2-2-2H5v7h2zm11-3v-4h-2v4h-2l3 3 3-3h-2z"}}],QQ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 10.5H5v-7h2l2 2 2-2h2v7h-2v-4l-2 2-2-2v4zm11-3h2l-3 3-3-3h2v-4h2v4z"}}],ZQ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v5.999h2V9l3 3-3 3v-2H5v6h6v-2h2v2h6v-6h-2v2l-3-3 3-3v1.999h2V5h-6v2h-2V5zm2 8v2h-2v-2h2zm0-4v2h-2V9h2z"}}],eZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 20c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16c.552 0 1 .448 1 1v16zm-2-9V5h-5.999v2H15l-3 3-3-3h2V5H5v6h2v2H5v6h6v-2H9l3-3 3 3h-1.999v2H19v-6h-2v-2h2zm-8 2H9v-2h2v2zm4 0h-2v-2h2v2z"}}],tZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M18 3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-1.1 0-2 .9-2 2v.171c1.166.412 2 1.523 2 2.829 0 1.306-.834 2.417-2 2.829V15c0 1.1.9 2 2 2h1.17c.412-1.165 1.524-2 2.83-2h3c1.657 0 3 1.343 3 3s-1.343 3-3 3h-3c-1.306 0-2.417-.834-2.829-2H11c-2.21 0-4-1.79-4-4H5c-1.657 0-3-1.343-3-3s1.343-3 3-3h2c0-2.21 1.79-4 4-4h1.17c.412-1.165 1.524-2 2.83-2h3zm0 14h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zM8 11H5c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1zm10-6h-3c-.552 0-1 .448-1 1s.448 1 1 1h3c.552 0 1-.448 1-1s-.448-1-1-1z"}}],rZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm14 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}],nZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M10 2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H8v2h5V9c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H8v6h5v-1c0-.552.448-1 1-1h6c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-1H7c-.552 0-1-.448-1-1V8H4c-.552 0-1-.448-1-1V3c0-.552.448-1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"}}],oZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5c1.321 0 2.484.348 3.447.994.963.645 1.726 1.588 2.249 2.778.522 1.19.804 2.625.804 4.257v4.942c0 1.632-.282 3.068-.804 4.257-.523 1.19-1.286 2.133-2.25 2.778-.962.646-2.125.994-3.446.994-1.321 0-2.484-.348-3.447-.994-.963-.645-1.726-1.588-2.249-2.778-.522-1.19-.804-2.625-.804-4.257V9.529c0-1.632.282-3.068.804-4.257.523-1.19 1.286-2.133 2.25-2.778C9.515 1.848 10.678 1.5 12 1.5zm0 2c-.916 0-1.694.226-2.333.655-.637.427-1.158 1.07-1.532 1.92-.412.94-.635 2.108-.635 3.454v4.942c0 1.346.223 2.514.635 3.453.374.851.895 1.494 1.532 1.921.639.429 1.417.655 2.333.655.916 0 1.694-.226 2.333-.655.637-.427 1.158-1.07 1.532-1.92.412-.94.635-2.108.635-3.454V9.529c0-1.346-.223-2.514-.635-3.453-.374-.851-.895-1.494-1.532-1.921C13.694 3.726 12.916 3.5 12 3.5z"}}],iZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],sZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 7.5a4 4 0 1 0-8 0H6a6 6 0 1 1 10.663 3.776l-7.32 8.723L18 20v2H6v-1.127l9.064-10.802A3.982 3.982 0 0 0 16 7.5z"}}],aZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v1.362L12.809 9.55a6.501 6.501 0 1 1-7.116 8.028l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-6.505-4.03l-.228.122-.69-1.207L14.855 4 6.5 4V2H18z"}}],lZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 1.5V16h3v2h-3v4h-2v-4H4v-1.102L14 1.5h2zM14 16V5.171L6.968 16H14z"}}],cZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 2v2H9.3l-.677 6.445a6.5 6.5 0 1 1-2.93 7.133l1.94-.486A4.502 4.502 0 0 0 16.5 16a4.5 4.5 0 0 0-4.5-4.5c-2.022 0-3.278.639-3.96 1.53l-1.575-1.182L7.5 2H18z"}}],uZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.886 2l-4.438 7.686A6.5 6.5 0 1 1 6.4 12.7L12.576 2h2.31zM12 11.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],dZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],fZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a5.5 5.5 0 0 1 3.352 9.86C17.24 12.41 18.5 14.32 18.5 16.5c0 3.314-2.91 6-6.5 6s-6.5-2.686-6.5-6c0-2.181 1.261-4.09 3.147-5.141A5.5 5.5 0 0 1 12 1.5zm0 11c-2.52 0-4.5 1.828-4.5 4 0 2.172 1.98 4 4.5 4s4.5-1.828 4.5-4c0-2.172-1.98-4-4.5-4zm0-9a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z"}}],pZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1.5a6.5 6.5 0 0 1 5.619 9.77l-6.196 10.729H9.114l4.439-7.686A6.5 6.5 0 1 1 12 1.5zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"}}],hZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M14 20v-2.157c1.863-1.192 3.5-3.875 3.5-6.959 0-3.073-2-6.029-5.5-6.029s-5.5 2.956-5.5 6.03c0 3.083 1.637 5.766 3.5 6.958V20H3v-2h4.76C5.666 16.505 4 13.989 4 10.884 4 6.247 7.5 3 12 3s8 3.247 8 7.884c0 3.105-1.666 5.621-3.76 7.116H21v2h-7z"}}],mZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M15 3c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-2v2h4c.552 0 1 .448 1 1v3h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-2H8v2h2c.552 0 1 .448 1 1v4c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1h2v-3c0-.552.448-1 1-1h4V9H9c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 17H5v2h4v-2zm10 0h-4v2h4v-2zM14 5h-4v2h4V5z"}}],gZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 21v-4H7v4H5v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v5h-2zM7 3v4h10V3h2v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3h2zM2 9l4 3-4 3V9zm20 0v6l-4-3 4-3z"}}],vZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 6v15h-2v-5a6 6 0 1 1 0-12h10v2h-3v15h-2V6h-3zm-2 0a4 4 0 1 0 0 8V6z"}}],yZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}],bZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"}}],kZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.934 3.036l1.732 1L18.531 6H21v2h-2v4h2v2h-2v7h-2v-7h-3.084c-.325 2.862-1.564 5.394-3.37 7.193l-1.562-1.27c1.52-1.438 2.596-3.522 2.917-5.922L10 14v-2l2-.001V8h-2V6h2.467l-1.133-1.964 1.732-1L14.777 6h1.444l1.713-2.964zM5 13.803l-2 .536v-2.071l2-.536V8H3V6h2V3h2v3h2v2H7v3.197l2-.536v2.07l-2 .536V18.5A2.5 2.5 0 0 1 4.5 21H3v-2h1.5a.5.5 0 0 0 .492-.41L5 18.5v-4.697zM17 8h-3v4h3V8z"}}],xZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M12 19c.828 0 1.5.672 1.5 1.5S12.828 22 12 22s-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zm0-17c3.314 0 6 2.686 6 6 0 2.165-.753 3.29-2.674 4.923C13.399 14.56 13 15.297 13 17h-2c0-2.474.787-3.695 3.031-5.601C15.548 10.11 16 9.434 16 8c0-2.21-1.79-4-4-4S8 5.79 8 8v1H6V8c0-3.314 2.686-6 6-6z"}}],wZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M21 19v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2h-2v-2h2zm-4 0v2H7v-2h2zm-4 0v2H3v-2h2zm16-4v2h-2v-2h2zM5 15v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687 0 4.882 2.124 4.995 4.783L21 8v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16 5h-5V3h5zM5 7v2H3V7h2zm0-4v2H3V3h2zm4 0v2H7V3h2z"}}],SZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"}}],EZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M14 3c.552 0 1 .448 1 1v5h5c.552 0 1 .448 1 1v10c0 .552-.448 1-1 1H10c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h10zm-1 2H5v8h4v-3c0-.552.448-1 1-1h3V5z"}}],CZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M11 3c.552 0 1 .448 1 1v2h5c.552 0 1 .448 1 1v5h2c.552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-7c-.552 0-1-.448-1-1v-2H7c-.552 0-1-.448-1-1v-5H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h7zm5 5h-4v3c0 .552-.448 1-1 1H8v4h4v-3c0-.552.448-1 1-1h3V8z"}}],MZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],TZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.583 17.321C8.553 16.227 8 15 8 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"}}],OZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.417 6.679C15.447 7.773 16 9 16 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C9.591 12.322 8.17 10.841 8.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z"}}],_Z=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M19 3l4 5h-3v12h-2V8h-3l4-5zm-5 15v2H3v-2h11zm0-7v2H3v-2h11zm-2-7v2H3V4h9z"}}],AZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],RZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 9v4h16V9h2v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9h2z"}}],NZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M17.5 2.5L23 12l-5.5 9.5h-11L1 12l5.5-9.5h11zm-1.153 2H7.653L3.311 12l4.342 7.5h8.694l4.342-7.5-4.342-7.5zM11 15h2v2h-2v-2zm0-8h2v6h-2V7z"}}],PZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-9 2H5v14h6v-4h2v4h6V5h-6v4h-2V5zm4 4l3 3-3 3v-2H9v2l-3-3 3-3v2h6V9z"}}],zZ=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h16zm-1 2H5v5.999L9 11v2H5v6h14v-6h-4v-2l4-.001V5zm-7 1l3 3h-2v6h2l-3 3-3-3h2V9H9l3-3z"}}],LZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],IZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}],DZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 6v13H9V6H3V4h14v2h-6zm8.55 10.58a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 14a2 2 0 0 1 1.373 3.454L18.744 19H21v1h-4v-1l2.55-2.42z"}}],$Z=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 4L10.5 9.928 15.404 4H18l-6.202 7.497L18 18.994V19h-2.59l-4.91-5.934L5.59 19H3v-.006l6.202-7.497L3 4h2.596zM21.55 16.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 14a2 2 0 0 1 1.373 3.454L20.744 19H23v1h-4v-1l2.55-2.42z"}}],HZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],BZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 7v13H9V7H3V5h12v2h-4zm8.55-.42a.8.8 0 1 0-1.32-.36l-1.154.33A2.001 2.001 0 0 1 19 4a2 2 0 0 1 1.373 3.454L18.744 9H21v1h-4V9l2.55-2.42z"}}],FZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5.596 5l4.904 5.928L15.404 5H18l-6.202 7.497L18 19.994V20h-2.59l-4.91-5.934L5.59 20H3v-.006l6.202-7.497L3 5h2.596zM21.55 6.58a.8.8 0 1 0-1.32-.36l-1.155.33A2.001 2.001 0 0 1 21 4a2 2 0 0 1 1.373 3.454L20.744 9H23v1h-4V9l2.55-2.42z"}}],VZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"nonzero",d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],jZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 8h16V5H4v3zm10 11v-9h-4v9h4zm2 0h4v-9h-4v9zm-8 0v-9H4v9h4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"}}],UZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zm8 12v-2.5l4 3.5-4 3.5V19H5v-2h12z"}}],WZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 5v10H9v-4a4 4 0 1 1 0-8h8v2h-2v10h-2V5h-2zM9 5a2 2 0 1 0 0 4V5zM7 17h12v2H7v2.5L3 18l4-3.5V17z"}}],KZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 17h10v-2.5l3.5 3.5-3.5 3.5V19H7v2.5L3.5 18 7 14.5V17zm6-11v9h-2V6H5V4h14v2h-6z"}}],qZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"}}],GZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],YZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"}}],XZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z"}}],JZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}],QZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z"}}],ZZ=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 3.993C3 3.445 3.445 3 3.993 3h16.014c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.994.994 0 0 1 3 20.007V3.993zM5 5v14h14V5H5zm5.622 3.415l4.879 3.252a.4.4 0 0 1 0 .666l-4.88 3.252a.4.4 0 0 1-.621-.332V8.747a.4.4 0 0 1 .622-.332z"}}],eee=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 21v-2h3.662l1.234-7H5v-2h3.249l.881-5H4V3h16v2h-8.839l-.882 5H18v9h3v2H3zm13-9H9.927l-1.235 7H16v-7z"}}];const tee=Object.freeze(Object.defineProperty({__proto__:null,ab:vJ,addFill:yJ,addLine:bJ,alertLine:kJ,alignBottom:xJ,alignCenter:wJ,alignJustify:SJ,alignLeft:EJ,alignRight:CJ,alignTop:MJ,alignVertically:TJ,appsLine:OJ,arrowDownSFill:_J,arrowGoBackFill:AJ,arrowGoForwardFill:RJ,arrowLeftSFill:NJ,arrowRightSFill:PJ,arrowUpSFill:zJ,asterisk:LJ,attachment2:IJ,bold:DJ,bracesLine:$J,bringForward:HJ,bringToFront:BJ,chatNewLine:FJ,checkboxCircleLine:VJ,checkboxMultipleLine:jJ,clipboardFill:UJ,clipboardLine:WJ,closeCircleLine:KJ,closeFill:qJ,closeLine:GJ,codeLine:YJ,codeView:XJ,deleteBinFill:JJ,deleteBinLine:QJ,deleteColumn:ZJ,deleteRow:eQ,doubleQuotesL:tQ,doubleQuotesR:rQ,download2Fill:nQ,dragDropLine:oQ,emphasis:sQ,emphasisCn:iQ,englishInput:aQ,errorWarningLine:lQ,externalLinkFill:cQ,fileCopyLine:uQ,flowChart:dQ,fontColor:fQ,fontSize:hQ,fontSize2:pQ,formatClear:mQ,fullscreenExitLine:gQ,fullscreenLine:vQ,functions:yQ,galleryUploadLine:bQ,h1:kQ,h2:xQ,h3:wQ,h4:SQ,h5:EQ,h6:CQ,hashtag:MQ,heading:TQ,imageAddLine:OQ,imageEditLine:_Q,imageLine:AQ,indentDecrease:RQ,indentIncrease:NQ,informationLine:PQ,inputCursorMove:zQ,insertColumnLeft:LQ,insertColumnRight:IQ,insertRowBottom:DQ,insertRowTop:$Q,italic:HQ,layoutColumnLine:BQ,lineHeight:FQ,link:WQ,linkM:VQ,linkUnlink:UQ,linkUnlinkM:jQ,listCheck:qQ,listCheck2:KQ,listOrdered:GQ,listUnordered:YQ,markPenLine:XQ,markdownFill:JQ,markdownLine:QQ,mergeCellsHorizontal:ZQ,mergeCellsVertical:eZ,mindMap:tZ,moreFill:rZ,nodeTree:nZ,number0:oZ,number1:iZ,number2:sZ,number3:aZ,number4:lZ,number5:cZ,number6:uZ,number7:dZ,number8:fZ,number9:pZ,omega:hZ,organizationChart:mZ,pageSeparator:gZ,paragraph:vZ,pencilFill:yZ,pencilLine:bZ,pinyinInput:kZ,questionMark:xZ,roundedCorner:wZ,scissorsFill:SZ,sendBackward:EZ,sendToBack:CZ,separator:MZ,singleQuotesL:TZ,singleQuotesR:OZ,sortAsc:_Z,sortDesc:AZ,space:RZ,spamLine:NZ,splitCellsHorizontal:PZ,splitCellsVertical:zZ,strikethrough:IZ,strikethrough2:LZ,subscript:$Z,subscript2:DZ,subtractLine:HZ,superscript:FZ,superscript2:BZ,table2:VZ,tableLine:jZ,text:GZ,textDirectionL:UZ,textDirectionR:WZ,textSpacing:KZ,textWrap:qZ,translate:XZ,translate2:YZ,underline:JZ,upload2Fill:QZ,videoLine:ZZ,wubiInput:eee},Symbol.toStringTag,{value:"Module"}));function ree(e,t=null){return function(r,n){let{$from:o,$to:i}=r.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let u=r.doc.resolve(s.start-2);l=new na(u,u,s.depth),s.endIndex=0;u--)i=N.from(r[u].type.create(r[u].attrs,i));e.step(new St(t.start-(n?2:0),t.end,t.start,t.end,new W(i,0,0),r.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==e);return i?r?n.node(i.depth-1).type==e?iee(t,r,e,i):see(t,r,i):!0:!1}}function iee(e,t,r,n){let o=e.tr,i=n.end,s=n.$to.end(n.depth);im;h--)p-=o.child(h).nodeSize,n.delete(p-1,p+1);let i=n.doc.resolve(r.start),s=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?N.empty:N.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return n.step(new St(d-(a?1:0),f+(l?1:0),d+1,f-1,new W((a?N.empty:N.from(o.copy(N.empty))).append(l?N.empty:N.from(o.copy(N.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}var aee=Object.defineProperty,lee=Object.getOwnPropertyDescriptor,Bn=(e,t,r,n)=>{for(var o=n>1?void 0:n?lee(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aee(t,r,o),o};function dv(e){var t;return!!((t=e.spec.group)!=null&&t.includes(ie.ListContainerNode))}function cee(e){var t;return!!((t=e.spec.group)!=null&&t.includes(ie.ListItemNode))}function ds(e){return dv(e.type)}function Zi(e){return cee(e.type)}function Hb(e,t){return r=>{const{dispatch:n,tr:o}=r,i=qv(o,r.state),{$from:s,$to:a}=o.selection,l=s.blockRange(a);if(!l)return!1;const c=Ld({predicate:u=>dv(u.type),selection:o.selection});if(c&&l.depth-c.depth<=1&&l.startIndex===0){if(c.node.type===e)return _T(t)(r);if(dv(c.node.type))return e.validContent(c.node.content)?(n==null||n(o.setNodeMarkup(c.pos,e)),!0):uee(o,c,e,t)?(n==null||n(o.scrollIntoView()),!0):!1}return ree(e)(i,n)}}function TT(e,t=["checked"]){return function({tr:r,dispatch:n,state:o}){var i,s;const a=G6(e,o.schema),{$from:l,$to:c}=r.selection;if(Dd(r.selection)&&r.selection.node.isBlock||l.depth<2||!l.sameParent(c))return!1;const u=l.node(-1);if(u.type!==a)return!1;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(n){const m=l.index(-1)>0;let b=N.empty;for(let y=l.depth-(m?1:2);y>=l.depth-3;y--)b=N.from(l.node(y).copy(b));const v=((i=a.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;b=b.append(N.from(a.createAndFill(null,v)||void 0));const g=l.indexAfter(-1)!t.includes(m))),f=c.pos===l.end()?u.contentMatchAt(0).defaultType:null,p={...l.node().attrs};r.delete(l.pos,c.pos);const h=f?[{type:a,attrs:d},{type:f,attrs:p}]:[{type:a,attrs:d}];return pl(r.doc,l.pos,2)?(n&&n(r.split(l.pos,2,h).scrollIntoView()),!0):!1}}function uee(e,t,r,n){const o=t.node,i=e.doc.resolve(t.start),s=i.node(-1),a=i.index(-1);if(!s||!s.canReplace(a,a+1,N.from(r.create())))return!1;const l=[];for(let p=0;pb;m--)h-=o.child(m).nodeSize,n.delete(h-1,h+1);const s=n.doc.resolve(r.start),a=s.nodeAfter;if(!a||n.mapping.slice(i).map(r.end)!==r.start+a.nodeSize)return!1;const l=r.startIndex===0,c=r.endIndex===o.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?N.empty:N.from(o))))return!1;const f=s.pos,p=f+a.nodeSize;return n.step(new St(f-(l?1:0),p+(c?1:0),f+1,p-1,new W((l?N.empty:N.from(o.copy(N.empty))).append(c?N.empty:N.from(o.copy(N.empty))),l?0:1,c?0:1),l?0:1)),t(n.scrollIntoView()),!0}function OT(e,t){const r=t||e.selection.$from;let n=[],o,i,s,a;for(let c=r.depth;c>=0;c--){if(i=r.node(c),o=r.index(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&ds(s)){const u=r.before(c+1);n.push(u)}if(o=r.indexAfter(c),s=i.maybeChild(o-1),a=i.maybeChild(o),s&&a&&s.type.name===a.type.name&&ds(s)){const u=r.after(c+1);n.push(u)}}n=[...new Set(n)].sort((c,u)=>u-c);let l=!1;for(const c of n)Nd(e.doc,c)&&(e.join(c),l=!0);return l}function _T(e){return t=>{const{dispatch:r,tr:n}=t,o=qv(n,t.state),i=pee(e,n.selection);return i?(r&&fee(o,r,i),!0):!1}}function pee(e,t){const{$from:r,$to:n}=t;return r.blockRange(n,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===e})}function bh(e){const{$from:t,$to:r}=e;return t.blockRange(r,ds)}function hee(e){const t=e.selection.$from,r=t.blockRange();if(!r||!Zi(r.parent)||r.startIndex!==0)return!1;const n=t.node(r.depth-2),o=t.index(r.depth),i=t.index(r.depth-1),s=t.index(r.depth-2),a=n.maybeChild(s-1),l=a==null?void 0:a.lastChild;if(o!==0||i!==0)return!1;if(a&&ds(a)&&l&&Zi(l))return Ql({listType:a.type,itemType:l.type,tr:e});if(Zi(n)){const c=n,u=t.node(r.depth-3);if(ds(u))return Ql({listType:u.type,itemType:c.type,tr:e})}return!1}function j4({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!Zi(r.parent)||r.startIndex!==0)return!1}{const t=e.state.tr;hee(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const r=t.blockRange();if(!r||!Zi(r.parent)||r.startIndex!==0)return!1;const n=t.index(r.depth),o=t.index(r.depth-1),i=t.index(r.depth-2),s=r.depth-2>=1&&Zi(t.node(r.depth-2));n===0&&o===0&&i<=1&&s&&oee(r.parent.type)(e.state,e.dispatch)}return H5(e.state,e.dispatch,e),!0}function AT({node:e,mark:t,updateDOM:r,updateMark:n}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(us.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(us.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const a=l=>l.type!==e.type?!1:(e=l,r(e,s),n(e,t),!0);return a(e),{dom:s,contentDOM:i,update:a}}function mee(e,t){const r=e.node(t.depth-1),n=e.node(t.depth-2);return!Zi(r)||!ds(n)?!1:{parentItem:r,parentList:n}}function gee(e,t){const r=t.parent,n=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return obee(e)?(t==null||t(e.scrollIntoView()),!0):!1;function xee(e,t,r){let n,o,i,s;const a=t.doc;if(r.startIndex>=1){n=e.child(r.startIndex-1),o=e,s=a.resolve(r.start).start(r.depth),i=s+1;for(let l=0;l=1){const c=t.node(r.depth-1),u=t.start(r.depth-1);if(o=c.child(l-1),!ds(o))return!1;s=u+1;for(let d=0;d=r.depth+2?t.end(r.depth+2):r.end-1,a=r.end;return s+1>=a?(n=e.slice(i,a),o=null):(n=e.slice(i,s),o=e.slice(s+1,a-1)),{selectedSlice:n,unselectedSlice:o}}function See(e){const{$from:t,$to:r}=e.selection,n=bh(e.selection);if(!n)return!1;const o=e.doc.resolve(n.start).node();if(!ds(o))return!1;const i=xee(o,t,n);if(!i)return!1;const{previousItem:s,previousList:a,previousItemStart:l}=i,{selectedSlice:c,unselectedSlice:u}=wee(e.doc,r,n),d=s.content.append(N.fromArray([o.copy(c.content)])).append(u?u.content:N.empty);e.deleteRange(n.start,n.end);const f=l+s.nodeSize-2,p=s.copy(d);return p.check(),e.replaceRangeWith(l-1,f+1,p),e.setSelection(a===o?ue.between(e.doc.resolve(t.pos),e.doc.resolve(r.pos)):ue.between(e.doc.resolve(t.pos-2),e.doc.resolve(r.pos-2))),!0}var Eee=({tr:e,dispatch:t})=>See(e)?(t==null||t(e.scrollIntoView()),!0):!1,RT=class extends Ge{get name(){return"listItemShared"}createKeymap(){const e={Tab:Eee,"Shift-Tab":kee,Backspace:j4,"Mod-Backspace":j4};if(an.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,r)=>{const n=r.tr;return OT(n)?n:null}}}},ya=class extends nr{get name(){return"listItem"}createTags(){return[ie.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:Ve.Lowest},...t.parseDOM??[]],toDOM:r=>["li",e.dom(r),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,r)=>{const n=document.createElement("div");return n.classList.add(us.COLLAPSIBLE_LIST_ITEM_BUTTON),n.contentEditable="false",n.addEventListener("click",()=>{if(n.classList.contains("disabled"))return;const o=r(),i=de.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),AT({mark:n,node:e,updateDOM:Cee,updateMark:Mee})}:{}}createKeymap(){return{Enter:TT(this.type)}}createExtensions(){return[new RT]}toggleListItemClosed(e){return({state:{tr:t,selection:r},dispatch:n})=>{if(!Dd(r)||r.node.type.name!==this.name)return!1;const{node:o,from:i}=r;return e=O1(e)?e:!o.attrs.closed,n==null||n(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return _T(e??this.type)}};Bn([Y()],ya.prototype,"toggleListItemClosed",1);Bn([Y()],ya.prototype,"liftListItemOutOfList",1);ya=Bn([ve({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],ya);function Cee(e,t){e.attrs.closed?t.classList.add(us.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(us.COLLAPSIBLE_LIST_ITEM_CLOSED)}function Mee(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var bd=class extends nr{get name(){return"bulletList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["ul",e.dom(r),0]}}createNodeViews(){return this.options.enableSpine?(e,t,r)=>{var n;const o=document.createElement("div");o.style.position="relative";const i=r(),s=t.state.doc.resolve(i+1),a=s.node(s.depth-1);if(!(((n=a==null?void 0:a.type)==null?void 0:n.name)!=="listItem")){const u=document.createElement("div");u.contentEditable="false",u.classList.add(us.LIST_SPINE),u.addEventListener("click",d=>{const f=r(),p=t.state.doc.resolve(f+1),h=p.start(p.depth-1),m=de.create(t.state.doc,h-1);t.dispatch(t.state.tr.setSelection(m)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(u)}const c=document.createElement("ul");return c.classList.add(us.UL_LIST_CONTENT),o.append(c),{dom:o,contentDOM:c}}:{}}createExtensions(){return[new ya({priority:Ve.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Hb(this.type,lt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[$h(e,this.type),new Sa(e,(t,r,n,o)=>{const i=t.tr;return i.deleteRange(n,o),Ql({listType:this.type,itemType:lt(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};Bn([Y({icon:"listUnordered",label:({t:e})=>e(Iv.BULLET_LIST_LABEL)})],bd.prototype,"toggleBulletList",1);Bn([_t({shortcut:j.BulletList,command:"toggleBulletList"})],bd.prototype,"listShortcut",1);bd=Bn([ve({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],bd);var kd=class extends nr{get name(){return"orderedList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:r=>kt(r)?{...e.parse(r),order:+(r.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:r=>{const n=e.dom(r);return r.attrs.order===1?["ol",n,0]:["ol",{...n,start:r.attrs.order},0]}}}createExtensions(){return[new ya({priority:Ve.Low})]}toggleOrderedList(){return Hb(this.type,lt(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[$h(e,this.type,t=>({order:+lt(t,1)}),(t,r)=>r.childCount+r.attrs.order===+lt(t,1)),new Sa(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!Ql({listType:this.type,itemType:lt(this.store.schema.nodes,"listItem"),tr:i}))return null;const a=+lt(r,1);if(a!==1){const l=ns({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{order:a})}return i})]}};Bn([Y({icon:"listOrdered",label:({t:e})=>e(Iv.ORDERED_LIST_LABEL)})],kd.prototype,"toggleOrderedList",1);Bn([_t({shortcut:j.OrderedList,command:"toggleOrderedList"})],kd.prototype,"listShortcut",1);kd=Bn([ve({})],kd);var NT=class extends nr{get name(){return"taskListItem"}createTags(){return[ie.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:r=>{let n=!1;return kt(r)&&r.getAttribute("data-checked")!==null&&(n=!0),{checked:n,...e.parse(r)}},priority:Ve.Medium},...t.parseDOM??[]],toDOM:r=>["li",{...e.dom(r),"data-task-list-item":"","data-checked":r.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,r)=>{const n=document.createElement("input");return n.type="checkbox",n.classList.add(us.LIST_ITEM_CHECKBOX),n.contentEditable="false",n.addEventListener("click",o=>{t.editable||o.preventDefault()}),n.addEventListener("change",()=>{const o=r(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),n.checked=e.attrs.checked,AT({node:e,mark:n,updateDOM:Tee,updateMark:Oee})}}createKeymap(){return{Enter:TT(this.type)}}createExtensions(){return[new RT]}toggleCheckboxChecked(e){let t,r;return typeof e=="boolean"?t=e:e&&(t=e.checked,r=e.$pos),({tr:n,dispatch:o})=>{const i=ns({selection:r??n.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:a}=i,l={...s.attrs,checked:t??!s.attrs.checked};return o==null||o(n.setNodeMarkup(a,void 0,l)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[$h(e,this.type,t=>({checked:["x","X"].includes(gl(t,2))})),new Sa(e,(t,r,n,o)=>{const i=t.tr;if(i.deleteRange(n,o),!Ql({listType:lt(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const a=["x","X"].includes(gl(r,2));if(a){const l=ns({selection:i.selection,types:this.type});l&&i.setNodeMarkup(l.pos,void 0,{checked:a})}return i})]}};Bn([Y()],NT.prototype,"toggleCheckboxChecked",1);function Tee(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function Oee(e,t){t.checked=!!e.attrs.checked}var PT=class extends nr{get name(){return"taskList"}createTags(){return[ie.Block,ie.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:Ve.Medium},...t.parseDOM??[]],toDOM:r=>["ul",{...e.dom(r),"data-task-list":""},0]}}createExtensions(){return[new NT({})]}toggleTaskList(){return Hb(this.type,lt(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};Bn([Y({icon:"checkboxMultipleLine",label:({t:e})=>e(Iv.TASK_LIST_LABEL)})],PT.prototype,"toggleTaskList",1);Bn([_t({shortcut:j.TaskList,command:"toggleTaskList"})],PT.prototype,"listShortcut",1);var fo,_ee=(e=document)=>fo||(fo=e.createElement("div"),fo.setAttribute("id","a11y-status-message"),fo.setAttribute("role","status"),fo.setAttribute("aria-live","polite"),fo.setAttribute("aria-relevant","additions text"),Object.assign(fo.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(fo),fo);KS(500,()=>{_ee().textContent=""});function U4(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function W4(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function m1(e,t){if(e.clientHeightt||i>e&&s=t&&a>=r?i-e-n:s>t&&ar?s-t+o:0}var Aee=function(e,t){var r=window,n=t.scrollMode,o=t.block,i=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,l=typeof s=="function"?s:function(Be){return Be!==s};if(!U4(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],p=e;U4(p)&&l(p);){if((p=(u=(c=p).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(p);break}p!=null&&p===document.body&&m1(p)&&!m1(document.documentElement)||p!=null&&m1(p,a)&&f.push(p)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,m=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),y=g.height,k=g.width,x=g.top,w=g.right,E=g.bottom,M=g.left,C=o==="start"||o==="nearest"?x:o==="end"?E:x+y/2,T=i==="center"?M+k/2:i==="end"?w:M,R=[],z=0;z=0&&M>=0&&E<=m&&w<=h&&x>=K&&E<=P&&M>=B&&w<=A)return R;var X=getComputedStyle(D),J=parseInt(X.borderLeftWidth,10),Re=parseInt(X.borderTopWidth,10),ae=parseInt(X.borderRightWidth,10),fe=parseInt(X.borderBottomWidth,10),pe=0,ge=0,Oe="offsetWidth"in D?D.offsetWidth-D.clientWidth-J-ae:0,Ce="offsetHeight"in D?D.offsetHeight-D.clientHeight-Re-fe:0,mt="offsetWidth"in D?D.offsetWidth===0?0:L/D.offsetWidth:0,it="offsetHeight"in D?D.offsetHeight===0?0:V/D.offsetHeight:0;if(d===D)pe=o==="start"?C:o==="end"?C-m:o==="nearest"?Of(v,v+m,m,Re,fe,v+C,v+C+y,y):C-m/2,ge=i==="start"?T:i==="center"?T-h/2:i==="end"?T-h:Of(b,b+h,h,J,ae,b+T,b+T+k,k),pe=Math.max(0,pe+v),ge=Math.max(0,ge+b);else{pe=o==="start"?C-K-Re:o==="end"?C-P+fe+Ce:o==="nearest"?Of(K,P,V,Re,fe+Ce,C,C+y,y):C-(K+V/2)+Ce/2,ge=i==="start"?T-B-J:i==="center"?T-(B+L/2)+Oe/2:i==="end"?T-A+ae+Oe:Of(B,A,L,J,ae+Oe,T,T+k,k);var Ar=D.scrollLeft,me=D.scrollTop;C+=me-(pe=Math.max(0,Math.min(me+pe/it,D.scrollHeight-V/it+Ce))),T+=Ar-(ge=Math.max(0,Math.min(Ar+ge/mt,D.scrollWidth-L/mt+Oe)))}R.push({el:D,top:pe,left:ge})}return R};typeof xr=="object"&&xr.__esModule&&xr.default&&xr.default;Ih(Aee);var Ree=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Nee(e){const t=S.useRef();return Ree(()=>{t.current=e}),t.current}function Pee(e,t){const[r,n]=S.useState([]),[o,i]=S.useState(()=>X0(e)),[s,a]=S.useState([]),l=S.useRef(e),c=Nee(o);return l.current=e,Ud(Ul,({addCustomHandler:u})=>{const d=X0(l.current),f=u("positioner",d);return i(d),f},t),S.useLayoutEffect(()=>{const u=o.addListener("update",f=>{const p=[];for(const{id:h,data:m,setElement:b}of f){const v=g=>{g&&b(g)};p.push({id:h,data:m,ref:v})}a(p)}),d=o.addListener("done",f=>{n(f)});return c!=null&&c.recentUpdate&&o.onActiveChanged(c==null?void 0:c.recentUpdate),()=>{u(),d()}},[o,c]),S.useMemo(()=>{const u=[];for(const[d,{ref:f,data:p,id:h}]of s.entries()){const m=r[d],{element:b,position:v={}}=m??{},g={...rb,...XS(v)};u.push({ref:f,element:b,data:p,key:h,...g})}return u},[s,r])}function zee(e,t){const r=t==null||O1(t)?[e]:t,n=O1(t)?t:!0,o=S.useRef(Tl()),s=Pee(e,r)[0];return S.useMemo(()=>s&&n?{...s,active:!0}:{...rb,ref:void 0,data:{},active:!1,key:o.current},[n,s])}function g1(e,t){return Le(e)?e(t):e}function Lee(e){return oe(e[0])}function Iee(e,t){var r;return oe(e)?e:ft(e)?Lee(e)?e[0]??"":((r=e.find(n=>JS(n.attrs,t))??e[0])==null?void 0:r.shortcut)??"":e.shortcut}var Dee={title:e=>uA(e),upper:e=>e.toLocaleUpperCase(),lower:e=>e.toLocaleLowerCase()};function $ee(e,t){const{casing:r="title",namedAsSymbol:n=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=t,a=Mz(e),l=[],c=Dee[r];for(const u of a){if(u.type==="char"){l.push(c(u.key));continue}if(u.type==="named"){const f=n===!0||ft(n)&&Er(n,u.key)?u.symbol??s(u.i18n):s(u.i18n);l.push(c(f));continue}const d=o===!0||ft(o)&&Er(o,u.key)?u.symbol:s(u.i18n);l.push(c(d))}return l.join(i)}var zT=({commandName:e,active:t,enabled:r,attrs:n})=>{const{t:o}=JV(),{getCommandOptions:i}=gm(),s=i(e),{description:a,label:l,icon:c,shortcut:u}=s||{},d=S.useMemo(()=>({active:t,attrs:n,enabled:r,t:o}),[t,n,r,o]),f=S.useMemo(()=>{if(u)return $ee(Iee(u,n??{}),{t:o,separator:""})},[u,n,o]);return S.useMemo(()=>({description:g1(a,d),label:g1(l,d),icon:g1(c,d),shortcut:f}),[d,a,l,c,f])},Hee={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},LT=S.createContext(Hee);LT.Provider;function IT(e){return e.map((t,r)=>S.createElement(t.tag,{key:r,...t.attr},IT(t.child??[])))}var eg=e=>{const{name:t}=e;return I.createElement(Bee,{...e},IT(tee[t]))},Bee=e=>{const t=r=>{const n=e.size??r.size??"1em";let o;r.className&&(o=r.className),e.className&&(o=(o?`${o} `:"")+e.className);const{title:i,...s}=e;return I.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...r.attr,...s,className:o,style:{color:e.color??r.color,...r.style,...e.style},height:n,width:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&I.createElement("title",null,i),e.children)};return I.createElement(LT.Consumer,null,t)},Fee=e=>hs(e)?!!e.name:!1,Vee=({icon:e})=>oe(e)?I.createElement(eg,{name:e,size:"1rem"}):e,jee=({icon:e,children:t})=>{if(!Fee(e))return I.createElement(I.Fragment,null,t);const{sub:r,sup:n}=e,o=r??n,i=r!==void 0;return o===void 0?I.createElement(I.Fragment,null,t):I.createElement(jY,{anchorOrigin:{vertical:i?"bottom":"top",horizontal:"right"},badgeContent:o,sx:{"& > .MuiBadge-badge":{bgcolor:"background.paper",color:"text.secondary",minWidth:12,height:12,margin:"2px 0",padding:"1px"}}},t)},ht=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onChange:i,icon:s,displayShortcut:a=!0,"aria-label":l,label:c,...u})=>{const d=S.useCallback((g,y)=>{o(),i==null||i(g,y)},[o,i]),f=S.useCallback(g=>{g.preventDefault()},[]),p=zT({commandName:e,active:t,enabled:r,attrs:n});let h=null;p.icon&&(h=oe(p.icon)?p.icon:p.icon.name);const m=l??p.label??"",b=c??m,v=a&&p.shortcut?` (${p.shortcut})`:"";return I.createElement(MT,{title:`${b}${v}`},I.createElement(wT,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},I.createElement(gJ,{"aria-label":m,selected:t,disabled:!r,onMouseDown:f,color:"primary",size:"small",sx:{padding:"6px 12px","&.Mui-selected":{backgroundColor:"primary.main",color:"primary.contrastText"},"&.Mui-selected:hover":{backgroundColor:"primary.dark",color:"primary.contrastText"},"&:not(:first-of-type)":{borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},...u,value:e,onChange:d},I.createElement(jee,{icon:p.icon},I.createElement(Vee,{icon:s??h})))))},Uee=({icon:e})=>oe(e)?I.createElement(eg,{name:e,size:"1rem"}):e,DT=({label:e,"aria-label":t,icon:r,children:n,onClose:o,...i})=>{const s=S.useRef(Tl()),[a,l]=S.useState(null),c=!!a,u=S.useCallback(p=>{p.preventDefault()},[]),d=S.useCallback(p=>{l(p.currentTarget)},[]),f=S.useCallback((p,h)=>{l(null),o==null||o(p,h)},[o]);return I.createElement(I.Fragment,null,I.createElement(MT,{title:e??t},I.createElement(Aq,{"aria-label":t,"aria-controls":c?s.current:void 0,"aria-haspopup":!0,"aria-expanded":c?"true":void 0,onMouseDown:u,onClick:d,size:"small",sx:p=>({border:`1px solid ${p.palette.divider}`,borderRadius:`${p.shape.borderRadius}px`,padding:"6px 12px","&:not(:first-of-type)":{marginLeft:"-1px",borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}})},r&&I.createElement(Uee,{icon:r}),I.createElement(eg,{name:"arrowDownSFill",size:"1rem"}))),I.createElement(KX,{...i,id:s.current,anchorEl:a,open:c,onClose:f},n))},Wee=e=>{const{insertHorizontalRule:t}=or();ib();const r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=t.enabled();return I.createElement(ht,{...e,commandName:"insertHorizontalRule",enabled:n,onSelect:r})},Kee=e=>{const{redo:t}=or(),{redoDepth:r}=gm(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return I.createElement(ht,{...e,commandName:"redo",active:!1,enabled:o,onSelect:n})},qee=e=>{const{toggleBlockquote:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().blockquote(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleBlockquote",active:n,enabled:o,onSelect:r})},fv=e=>{const{toggleBold:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().bold(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleBold",active:n,enabled:o,onSelect:r})},Gee=e=>{const{toggleBulletList:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().bulletList(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleBulletList",active:n,enabled:o,onSelect:r})},Yee=({attrs:e={},...t})=>{const{toggleCodeBlock:r}=or(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Gr().codeBlock(),i=r.enabled(e);return I.createElement(ht,{...t,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:e,onSelect:n})},pv=e=>{const{toggleCode:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().code(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleCode",active:n,enabled:o,onSelect:r})},v1=({attrs:e,...t})=>{const{toggleHeading:r}=or(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Gr().heading(e),i=r.enabled(e);return I.createElement(ht,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},hv=e=>{const{toggleItalic:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().italic(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleItalic",active:n,enabled:o,onSelect:r})},Xee=e=>{const{toggleOrderedList:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().orderedList(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleOrderedList",active:n,enabled:o,onSelect:r})},Jee=e=>{const{toggleStrike:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().strike(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleStrike",active:n,enabled:o,onSelect:r})},mv=e=>{const{toggleUnderline:t}=or(),r=S.useCallback(()=>{t.enabled()&&t()},[t]),n=Gr().underline(),o=t.enabled();return I.createElement(ht,{...e,commandName:"toggleUnderline",active:n,enabled:o,onSelect:r})},Qee=e=>{const{undo:t}=or(),{undoDepth:r}=gm(!0),n=S.useCallback(()=>{t.enabled()&&t()},[t]),o=r()>0;return I.createElement(ht,{...e,commandName:"undo",active:!1,enabled:o,onSelect:n})},Mn=e=>I.createElement(wT,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...e}),Zee=({children:e})=>I.createElement(Mn,null,I.createElement(fv,null),I.createElement(hv,null),I.createElement(mv,null),I.createElement(Jee,null),I.createElement(pv,null),e),ete=({icon:e})=>e?I.createElement(vX,null,oe(e)?I.createElement(eg,{name:e,size:"1rem"}):I.createElement(I.Fragment,null,e)):null,Bb=({commandName:e,active:t=!1,enabled:r,attrs:n,onSelect:o,onClick:i,icon:s,displayShortcut:a=!0,label:l,description:c,displayDescription:u=!0,...d})=>{const f=S.useCallback(g=>{o(),i==null||i(g)},[o,i]),p=S.useCallback(g=>{g.preventDefault()},[]),h=zT({commandName:e,active:t,enabled:r,attrs:n});let m=null;h.icon&&(m=oe(h.icon)?h.icon:h.icon.name);const b=l??h.label??"",v=u&&(c??h.description);return I.createElement(eJ,{selected:t,disabled:!r,onMouseDown:p,...d,onClick:f},s!==null&&I.createElement(ete,{icon:s??m}),I.createElement(EX,{primary:b,secondary:v}),a&&h.shortcut&&I.createElement(lu,{variant:"body2",color:"text.secondary",sx:{ml:2}},h.shortcut))},_f=({attrs:e,...t})=>{const{toggleHeading:r}=or(),n=S.useCallback(()=>{r.enabled(e)&&r(e)},[r,e]),o=Gr().heading(e),i=r.enabled(e);return I.createElement(Bb,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:n})},tte={level:1},rte={level:2},K4={level:3},nte={level:4},ote={level:5},ite={level:6},ste=({showAll:e=!1,children:t})=>I.createElement(Mn,null,I.createElement(v1,{attrs:tte}),I.createElement(v1,{attrs:rte}),e?I.createElement(DT,{"aria-label":"More heading options"},I.createElement(_f,{attrs:K4}),I.createElement(_f,{attrs:nte}),I.createElement(_f,{attrs:ote}),I.createElement(_f,{attrs:ite})):I.createElement(v1,{attrs:K4}),t),ate=({children:e})=>I.createElement(Mn,null,I.createElement(Qee,null),I.createElement(Kee,null),e);typeof xr=="object"&&xr.__esModule&&xr.default&&xr.default;var $T=S.createContext({});function lte(e={}){const t=S.useContext($T),r=S.useMemo(()=>eE(t,e.theme??{}),[t,e.theme]),n=S.useMemo(()=>dV(r).styles,[r]),o=ju(uV,e.className);return S.useMemo(()=>({style:n,className:o,theme:r}),[n,o,r])}var cte=e=>{var t,r,n,o,i,s,a,l;const{children:c,as:u="div"}=e,{theme:d,style:f,className:p}=lte({theme:e.theme??Es}),h=Cb({palette:{primary:{main:((t=d.color)==null?void 0:t.primary)??Es.color.primary,dark:((n=(r=d.color)==null?void 0:r.hover)==null?void 0:n.primary)??Es.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??Es.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??Es.color.secondary,dark:((a=(s=d.color)==null?void 0:s.hover)==null?void 0:a.secondary)??Es.color.hover.secondary,contrastText:((l=d.color)==null?void 0:l.secondaryText)??Es.color.secondaryText}}});return I.createElement(jK,{theme:h},I.createElement($T.Provider,{value:d},I.createElement(u,{style:f,className:p},c)))},HT=e=>I.createElement(tX,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...e}),ute=[{name:"offset",options:{offset:[0,8]}}],dte=({positioner:e="selection",children:t,...r})=>{const{ref:n,x:o,y:i,width:s,height:a,active:l}=zee(()=>X0(e),[e]),[c,u]=S.useState(null),d=S.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:a}),[o,i,s,a]),f=S.useCallback(p=>{u(p),n==null||n(p)},[n]);return I.createElement(I.Fragment,null,I.createElement("div",{ref:f,style:d}),I.createElement($b,{placement:"top",modifiers:ute,...r,open:l,anchorEl:c},I.createElement(HT,null,t?I.createElement(I.Fragment,null,t):I.createElement(Zee,null))))},At=Ih(dh),Fb=Et` /** * Styles extracted from: packages/remirror__theme/src/components-theme.ts */ @@ -770,9 +770,9 @@ Error generating stack: `+i.message+` .remirror-color-picker-cell-selected { } -`;Ct.div` - ${kb} -`;var xb=bt` +`;At.div` + ${Fb} +`;var Vb=Et` /** * Styles extracted from: packages/remirror__theme/src/core-theme.ts */ @@ -837,9 +837,9 @@ Error generating stack: `+i.message+` border: 2px solid #8cf; pointer-events: none; } -`;Ct.div` - ${xb} -`;var wb=bt` +`;At.div` + ${Vb} +`;var jb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-blockquote-theme.ts */ @@ -853,9 +853,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror blockquote p { color: #888; } -`;Ct.div` - ${wb} -`;var Sb=bt` +`;At.div` + ${jb} +`;var Ub=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-callout-theme.ts */ @@ -890,9 +890,9 @@ Error generating stack: `+i.message+` .remirror-editor div[data-callout-type='blank'] { background: #f8f8f8; } -`;Ct.div` - ${Sb} -`;var Eb=bt` +`;At.div` + ${Ub} +`;var Wb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-code-block-theme.ts */ @@ -3688,18 +3688,18 @@ Error generating stack: `+i.message+` top: auto; bottom: 0.4em; } -`;Ct.div` - ${Eb} -`;var Cb=bt` +`;At.div` + ${Wb} +`;var Kb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-count-theme.ts */ .remirror-editor span.remirror-max-count-exceeded { background-color: var(--rmr-hue-red-4); } -`;Ct.div` - ${Cb} -`;var Mb=bt` +`;At.div` + ${Kb} +`;var qb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-emoji-theme.ts */ @@ -3756,9 +3756,9 @@ Error generating stack: `+i.message+` font-size: 1.25em; padding-right: 5px; } -`;Ct.div` - ${Mb} -`;var Tb=bt` +`;At.div` + ${qb} +`;var Gb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-file-theme.ts */ @@ -3809,9 +3809,9 @@ Error generating stack: `+i.message+` align-items: center; color: #000; } -`;Ct.div` - ${Tb} -`;var Ob=bt` +`;At.div` + ${Gb} +`;var Yb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-gap-cursor-theme.ts */ @@ -3838,9 +3838,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror.ProseMirror-focused .ProseMirror-gapcursor { display: block; } -`;Ct.div` - ${Ob} -`;var _b=bt` +`;At.div` + ${Yb} +`;var Xb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-image-theme.ts */ @@ -3861,9 +3861,9 @@ Error generating stack: `+i.message+` transform: rotate(360deg); } } -`;Ct.div` - ${_b} -`;var Ab=bt` +`;At.div` + ${Xb} +`;var Jb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-list-theme.ts */ @@ -3957,9 +3957,9 @@ Error generating stack: `+i.message+` .remirror-list-spine:hover { border-left-color: var(--rmr-color-primary); } -`;Ct.div` - ${Ab} -`;var Nb=bt` +`;At.div` + ${Jb} +`;var Qb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-mention-atom-theme.ts */ @@ -4023,17 +4023,17 @@ Error generating stack: `+i.message+` font-size: 1.25em; padding-right: 5px; } -`;Ct.div` - ${Nb} -`;var Rb=bt` +`;At.div` + ${Qb} +`;var Zb=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-node-formatting-theme.ts */ .remirror-editor.ProseMirror { } -`;Ct.div` - ${Rb} -`;var Pb=bt` +`;At.div` + ${Zb} +`;var ek=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-placeholder-theme.ts */ @@ -4045,9 +4045,9 @@ Error generating stack: `+i.message+` font-style: italic; content: attr(data-placeholder); } -`;Ct.div` - ${Pb} -`;var zb=bt` +`;At.div` + ${ek} +`;var tk=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-positioner-theme.ts */ @@ -4073,9 +4073,9 @@ Error generating stack: `+i.message+` height: 0; position: absolute; } -`;Ct.div` - ${zb} -`;var Lb=bt` +`;At.div` + ${tk} +`;var rk=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-tables-theme.ts */ @@ -4441,9 +4441,9 @@ Error generating stack: `+i.message+` .remirror-table-show-predelete.remirror-table-preselect-all th.remirror-table-controller { background-color: var(--rmr-color-table-predelete-controller) !important; } -`;Ct.div` - ${Lb} -`;var Ib=bt` +`;At.div` + ${rk} +`;var nk=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-whitespace-theme.ts */ @@ -4472,9 +4472,9 @@ Error generating stack: `+i.message+` .remirror-editor.ProseMirror .whitespace--p:before { content: '¶'; } -`;Ct.div` - ${Ib} -`;var Db=bt` +`;At.div` + ${nk} +`;var ok=Et` /** * Styles extracted from: packages/remirror__theme/src/extension-yjs-theme.ts */ @@ -4517,9 +4517,9 @@ Error generating stack: `+i.message+` .remirror-editor #y-functions > * { display: inline-block; } -`;Ct.div` - ${Db} -`;var $b=bt` +`;At.div` + ${ok} +`;var ik=Et` /** * Styles extracted from: packages/remirror__theme/src/theme.ts */ @@ -4820,105 +4820,105 @@ Error generating stack: `+i.message+` margin: 0; /* margin-bottom: var(--rmr-space-2); */ } -`;Ct.div` - ${$b} -`;bt` - ${kb} - ${xb} - ${wb} - ${Sb} - ${Eb} - ${Cb} - ${Mb} - ${Tb} - ${Ob} - ${_b} - ${Ab} - ${Nb} - ${Rb} - ${Pb} - ${zb} - ${Lb} - ${Ib} - ${Db} - ${$b} -`;var Lee=Ct.div` - ${kb} - ${xb} - ${wb} - ${Sb} - ${Eb} - ${Cb} - ${Mb} - ${Tb} - ${Ob} - ${_b} - ${Ab} - ${Nb} - ${Rb} - ${Pb} - ${zb} - ${Lb} - ${Ib} - ${Db} - ${$b} -`,Iee=Object.defineProperty,Dee=Object.getOwnPropertyDescriptor,hT=(e,t,r,n)=>{for(var o=n>1?void 0:n?Dee(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Iee(t,r,o),o},Hb=class extends Qt{get name(){return"blockquote"}createTags(){return[oe.Block,oe.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:r=>["blockquote",e.dom(r),0]}}toggleBlockquote(){return a5(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[xh(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};hT([G({icon:"doubleQuotesL",description:({t:e})=>e(Xk.DESCRIPTION),label:({t:e})=>e(Xk.LABEL)})],Hb.prototype,"toggleBlockquote",1);hT([Et({shortcut:"Ctrl->",command:"toggleBlockquote"})],Hb.prototype,"shortcut",1);var $ee=Object.defineProperty,Hee=Object.getOwnPropertyDescriptor,$d=(e,t,r,n)=>{for(var o=n>1?void 0:n?Hee(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$ee(t,r,o),o},Bee={icon:"bold",label:({t:e})=>e(Qk.LABEL),description:({t:e})=>e(Qk.DESCRIPTION)},da=class extends cs{get name(){return"bold"}createTags(){return[oe.FormattingMark,oe.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:r=>mt(r)&&r.style.fontWeight!=="normal"?e.parse(r):!1},{style:"font-weight",getAttrs:r=>ne(r)&&/^(bold(er)?|[5-9]\d{2,})$/.test(r)?null:!1},...t.parseDOM??[]],toDOM:r=>{const{weight:n}=this.options;return n?["strong",{"font-weight":n.toString()},0]:["strong",e.dom(r),0]}}}createInputRules(){return[Ru({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return Xi({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Tn(e??t.selection,t.doc);return r==null||r(t.addMark(n,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Tn(e??t.selection,t.doc);return t.doc.rangeHasMark(n,o,this.type)?(r==null||r(t.removeMark(n,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};$d([G(Bee)],da.prototype,"toggleBold",1);$d([G()],da.prototype,"setBold",1);$d([G()],da.prototype,"removeBold",1);$d([Et({shortcut:j.Bold,command:"toggleBold"})],da.prototype,"shortcut",1);da=$d([me({defaultOptions:{weight:void 0},staticKeys:["weight"]})],da);var Fee=Object.defineProperty,Vee=Object.getOwnPropertyDescriptor,Bb=(e,t,r,n)=>{for(var o=n>1?void 0:n?Vee(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fee(t,r,o),o},{DESCRIPTION:jee,LABEL:Uee}=ON,Wee={icon:"codeLine",description:({t:e})=>e(jee),label:({t:e})=>e(Uee)},dd=class extends cs{get name(){return"code"}createTags(){return[oe.Code,oe.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:"_",...t,attrs:e.defaults(),parseDOM:[{tag:"code",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["code",{spellcheck:"false",...e.dom(r)},0]}}createKeymap(){return{"Mod-`":Xi({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return Xi({type:this.type})}createInputRules(){return[Ru({regexp:new RegExp(`(?:\`)([^\`${sv}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};Bb([Et({shortcut:j.Code,command:"toggleCode"})],dd.prototype,"keyboardShortcut",1);Bb([G(Wee)],dd.prototype,"toggleCode",1);dd=Bb([me({})],dd);var Kee=Gee,qee=Object.prototype.hasOwnProperty;function Gee(){for(var e={},t=0;t4&&r.slice(0,4)===Wb&&Lte.test(t)&&(t.charAt(4)==="-"?n=$te(t):t=Hte(t),o=Rte),new o(n,t))}function $te(e){var t=e.slice(5).replace(ST,Fte);return Wb+t.charAt(0).toUpperCase()+t.slice(1)}function Hte(e){var t=e.slice(4);return ST.test(t)?e:(t=t.replace(Ite,Bte),t.charAt(0)!=="-"&&(t="-"+t),Wb+t)}function Bte(e){return"-"+e.toLowerCase()}function Fte(e){return e.charAt(1).toUpperCase()}var Vte=jte,_4=/[#.]/g;function jte(e,t){for(var r=e||"",n=t||"div",o={},i=0,s,a,l;i=48&&t<=57}var doe=foe;function foe(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var poe=hoe;function hoe(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var moe=poe,goe=MT,voe=yoe;function yoe(e){return moe(e)||goe(e)}var bf,boe=59,koe=xoe;function xoe(e){var t="&"+e+";",r;return bf=bf||document.createElement("i"),bf.innerHTML=t,r=bf.textContent,r.charCodeAt(r.length-1)===boe&&e!=="semi"||r===t?!1:r}var I4=loe,D4=coe,woe=MT,Soe=doe,TT=voe,Eoe=koe,Coe=$oe,Moe={}.hasOwnProperty,Ra=String.fromCharCode,Toe=Function.prototype,$4={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Ooe=9,H4=10,_oe=12,Aoe=32,B4=38,Noe=59,Roe=60,Poe=61,zoe=35,Loe=88,Ioe=120,Doe=65533,Va="named",Gb="hexadecimal",Yb="decimal",Jb={};Jb[Gb]=16;Jb[Yb]=10;var $m={};$m[Va]=TT;$m[Yb]=woe;$m[Gb]=Soe;var OT=1,_T=2,AT=3,NT=4,RT=5,Q0=6,PT=7,ms={};ms[OT]="Named character references must be terminated by a semicolon";ms[_T]="Numeric character references must be terminated by a semicolon";ms[AT]="Named character references cannot be empty";ms[NT]="Numeric character references cannot be empty";ms[RT]="Named character references must be known";ms[Q0]="Numeric character references cannot be disallowed";ms[PT]="Numeric character references cannot be outside the permissible Unicode range";function $oe(e,t){var r={},n,o;t||(t={});for(o in $4)n=t[o],r[o]=n??$4[o];return(r.position.indent||r.position.start)&&(r.indent=r.position.indent||[],r.position=r.position.start),Hoe(e,r)}function Hoe(e,t){var r=t.additional,n=t.nonTerminated,o=t.text,i=t.reference,s=t.warning,a=t.textContext,l=t.referenceContext,c=t.warningContext,u=t.position,d=t.indent||[],f=e.length,p=0,h=-1,m=u.column||1,b=u.line||1,v="",g=[],y,k,x,w,E,M,C,T,N,z,D,F,V,L,K,A,P,B,Y;for(typeof r=="string"&&(r=r.charCodeAt(0)),A=J(),T=s?_e:Toe,p--,f++;++p65535&&(M-=65536,z+=Ra(M>>>10|55296),M=56320|M&1023),M=z+Ra(M))):L!==Va&&T(NT,B)),M?(ie(),A=J(),p=Y-1,m+=Y-V+1,g.push(M),P=J(),P.offset++,i&&i.call(l,M,{start:A,end:P},e.slice(V-1,Y)),A=P):(w=e.slice(V-1,Y),v+=w,m+=w.length,p=Y-1)}else E===10&&(b++,h++,m=0),E===E?(v+=Ra(E),m++):ie();return g.join("");function J(){return{line:b,column:m,offset:p+(u.offset||0)}}function _e(ue,de){var he=J();he.column+=de,he.offset+=de,s.call(c,ms[ue],he,ue)}function ie(){v&&(g.push(v),o&&o.call(a,v,{start:A,end:J()}),v="")}}function Boe(e){return e>=55296&&e<=57343||e>1114111}function Foe(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var zT={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** +`;At.div` + ${ik} +`;Et` + ${Fb} + ${Vb} + ${jb} + ${Ub} + ${Wb} + ${Kb} + ${qb} + ${Gb} + ${Yb} + ${Xb} + ${Jb} + ${Qb} + ${Zb} + ${ek} + ${tk} + ${rk} + ${nk} + ${ok} + ${ik} +`;var fte=At.div` + ${Fb} + ${Vb} + ${jb} + ${Ub} + ${Wb} + ${Kb} + ${qb} + ${Gb} + ${Yb} + ${Xb} + ${Jb} + ${Qb} + ${Zb} + ${ek} + ${tk} + ${rk} + ${nk} + ${ok} + ${ik} +`,pte=Object.defineProperty,hte=Object.getOwnPropertyDescriptor,BT=(e,t,r,n)=>{for(var o=n>1?void 0:n?hte(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pte(t,r,o),o},sk=class extends nr{get name(){return"blockquote"}createTags(){return[ie.Block,ie.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:r=>["blockquote",e.dom(r),0]}}toggleBlockquote(){return P5(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[$h(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};BT([Y({icon:"doubleQuotesL",description:({t:e})=>e(bx.DESCRIPTION),label:({t:e})=>e(bx.LABEL)})],sk.prototype,"toggleBlockquote",1);BT([_t({shortcut:"Ctrl->",command:"toggleBlockquote"})],sk.prototype,"shortcut",1);var mte=Object.defineProperty,gte=Object.getOwnPropertyDescriptor,Yd=(e,t,r,n)=>{for(var o=n>1?void 0:n?gte(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&mte(t,r,o),o},vte={icon:"bold",label:({t:e})=>e(kx.LABEL),description:({t:e})=>e(kx.DESCRIPTION)},ba=class extends vs{get name(){return"bold"}createTags(){return[ie.FormattingMark,ie.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:r=>kt(r)&&r.style.fontWeight!=="normal"?e.parse(r):!1},{style:"font-weight",getAttrs:r=>oe(r)&&/^(bold(er)?|[5-9]\d{2,})$/.test(r)?null:!1},...t.parseDOM??[]],toDOM:r=>{const{weight:n}=this.options;return n?["strong",{"font-weight":n.toString()},0]:["strong",e.dom(r),0]}}}createInputRules(){return[Vu({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return ss({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Pn(e??t.selection,t.doc);return r==null||r(t.addMark(n,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:r})=>{const{from:n,to:o}=Pn(e??t.selection,t.doc);return t.doc.rangeHasMark(n,o,this.type)?(r==null||r(t.removeMark(n,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};Yd([Y(vte)],ba.prototype,"toggleBold",1);Yd([Y()],ba.prototype,"setBold",1);Yd([Y()],ba.prototype,"removeBold",1);Yd([_t({shortcut:j.Bold,command:"toggleBold"})],ba.prototype,"shortcut",1);ba=Yd([ve({defaultOptions:{weight:void 0},staticKeys:["weight"]})],ba);var yte=Object.defineProperty,bte=Object.getOwnPropertyDescriptor,ak=(e,t,r,n)=>{for(var o=n>1?void 0:n?bte(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&yte(t,r,o),o},{DESCRIPTION:kte,LABEL:xte}=iN,wte={icon:"codeLine",description:({t:e})=>e(kte),label:({t:e})=>e(xte)},xd=class extends vs{get name(){return"code"}createTags(){return[ie.Code,ie.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:"_",...t,attrs:e.defaults(),parseDOM:[{tag:"code",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["code",{spellcheck:"false",...e.dom(r)},0]}}createKeymap(){return{"Mod-`":ss({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return ss({type:this.type})}createInputRules(){return[Vu({regexp:new RegExp(`(?:\`)([^\`${Tv}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};ak([_t({shortcut:j.Code,command:"toggleCode"})],xd.prototype,"keyboardShortcut",1);ak([Y(wte)],xd.prototype,"toggleCode",1);xd=ak([ve({})],xd);var Ste=Cte,Ete=Object.prototype.hasOwnProperty;function Cte(){for(var e={},t=0;t4&&r.slice(0,4)===fk&&fre.test(t)&&(t.charAt(4)==="-"?n=mre(t):t=gre(t),o=cre),new o(n,t))}function mre(e){var t=e.slice(5).replace(YT,yre);return fk+t.charAt(0).toUpperCase()+t.slice(1)}function gre(e){var t=e.slice(4);return YT.test(t)?e:(t=t.replace(pre,vre),t.charAt(0)!=="-"&&(t="-"+t),fk+t)}function vre(e){return"-"+e.toLowerCase()}function yre(e){return e.charAt(1).toUpperCase()}var bre=kre,J4=/[#.]/g;function kre(e,t){for(var r=e||"",n=t||"div",o={},i=0,s,a,l;i=48&&t<=57}var Voe=joe;function joe(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var Uoe=Woe;function Woe(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var Koe=Uoe,qoe=QT,Goe=Yoe;function Yoe(e){return Koe(e)||qoe(e)}var Rf,Xoe=59,Joe=Qoe;function Qoe(e){var t="&"+e+";",r;return Rf=Rf||document.createElement("i"),Rf.innerHTML=t,r=Rf.textContent,r.charCodeAt(r.length-1)===Xoe&&e!=="semi"||r===t?!1:r}var oS=Hoe,iS=Boe,Zoe=QT,eie=Voe,ZT=Goe,tie=Joe,rie=mie,nie={}.hasOwnProperty,Va=String.fromCharCode,oie=Function.prototype,sS={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},iie=9,aS=10,sie=12,aie=32,lS=38,lie=59,cie=60,uie=61,die=35,fie=88,pie=120,hie=65533,Qa="named",mk="hexadecimal",gk="decimal",vk={};vk[mk]=16;vk[gk]=10;var tg={};tg[Qa]=ZT;tg[gk]=Zoe;tg[mk]=eie;var eO=1,tO=2,rO=3,nO=4,oO=5,vv=6,iO=7,Ss={};Ss[eO]="Named character references must be terminated by a semicolon";Ss[tO]="Numeric character references must be terminated by a semicolon";Ss[rO]="Named character references cannot be empty";Ss[nO]="Numeric character references cannot be empty";Ss[oO]="Named character references must be known";Ss[vv]="Numeric character references cannot be disallowed";Ss[iO]="Numeric character references cannot be outside the permissible Unicode range";function mie(e,t){var r={},n,o;t||(t={});for(o in sS)n=t[o],r[o]=n??sS[o];return(r.position.indent||r.position.start)&&(r.indent=r.position.indent||[],r.position=r.position.start),gie(e,r)}function gie(e,t){var r=t.additional,n=t.nonTerminated,o=t.text,i=t.reference,s=t.warning,a=t.textContext,l=t.referenceContext,c=t.warningContext,u=t.position,d=t.indent||[],f=e.length,p=0,h=-1,m=u.column||1,b=u.line||1,v="",g=[],y,k,x,w,E,M,C,T,R,z,D,F,V,L,K,A,P,B,X;for(typeof r=="string"&&(r=r.charCodeAt(0)),A=J(),T=s?Re:oie,p--,f++;++p65535&&(M-=65536,z+=Va(M>>>10|55296),M=56320|M&1023),M=z+Va(M))):L!==Qa&&T(nO,B)),M?(ae(),A=J(),p=X-1,m+=X-V+1,g.push(M),P=J(),P.offset++,i&&i.call(l,M,{start:A,end:P},e.slice(V-1,X)),A=P):(w=e.slice(V-1,X),v+=w,m+=w.length,p=X-1)}else E===10&&(b++,h++,m=0),E===E?(v+=Va(E),m++):ae();return g.join("");function J(){return{line:b,column:m,offset:p+(u.offset||0)}}function Re(fe,pe){var ge=J();ge.column+=pe,ge.offset+=pe,s.call(c,Ss[fe],ge,fe)}function ae(){v&&(g.push(v),o&&o.call(a,v,{start:A,end:J()}),v="")}}function vie(e){return e>=55296&&e<=57343||e>1114111}function yie(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var sO={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var r=function(n){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function g(y){return y instanceof l?new l(y.type,g(y.content),y.alias):Array.isArray(y)?y.map(g):y.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(x){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(x.stack)||[])[1];if(g){var y=document.getElementsByTagName("script");for(var k in y)if(y[k].src==g)return y[k]}return null}},isActive:function(g,y,k){for(var x="no-"+y;g;){var w=g.classList;if(w.contains(y))return!0;if(w.contains(x))return!1;g=g.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(g,y){var k=a.util.clone(a.languages[g]);for(var x in y)k[x]=y[x];return k},insertBefore:function(g,y,k,x){x=x||a.languages;var w=x[g],E={};for(var M in w)if(w.hasOwnProperty(M)){if(M==y)for(var C in k)k.hasOwnProperty(C)&&(E[C]=k[C]);k.hasOwnProperty(M)||(E[M]=w[M])}var T=x[g];return x[g]=E,a.languages.DFS(a.languages,function(N,z){z===T&&N!=g&&(this[N]=E)}),E},DFS:function g(y,k,x,w){w=w||{};var E=a.util.objId;for(var M in y)if(y.hasOwnProperty(M)){k.call(y,M,y[M],x||M);var C=y[M],T=a.util.type(C);T==="Object"&&!w[E(C)]?(w[E(C)]=!0,g(C,k,null,w)):T==="Array"&&!w[E(C)]&&(w[E(C)]=!0,g(C,k,M,w))}}},plugins:{},highlightAll:function(g,y){a.highlightAllUnder(document,g,y)},highlightAllUnder:function(g,y,k){var x={callback:k,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",x),x.elements=Array.prototype.slice.apply(x.container.querySelectorAll(x.selector)),a.hooks.run("before-all-elements-highlight",x);for(var w=0,E;E=x.elements[w++];)a.highlightElement(E,y===!0,x.callback)},highlightElement:function(g,y,k){var x=a.util.getLanguage(g),w=a.languages[x];a.util.setLanguage(g,x);var E=g.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,x);var M=g.textContent,C={element:g,language:x,grammar:w,code:M};function T(z){C.highlightedCode=z,a.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,a.hooks.run("after-highlight",C),a.hooks.run("complete",C),k&&k.call(C.element)}if(a.hooks.run("before-sanity-check",C),E=C.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!C.code){a.hooks.run("complete",C),k&&k.call(C.element);return}if(a.hooks.run("before-highlight",C),!C.grammar){T(a.util.encode(C.code));return}if(y&&n.Worker){var N=new Worker(a.filename);N.onmessage=function(z){T(z.data)},N.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else T(a.highlight(C.code,C.grammar,C.language))},highlight:function(g,y,k){var x={code:g,grammar:y,language:k};if(a.hooks.run("before-tokenize",x),!x.grammar)throw new Error('The language "'+x.language+'" has no grammar.');return x.tokens=a.tokenize(x.code,x.grammar),a.hooks.run("after-tokenize",x),l.stringify(a.util.encode(x.tokens),x.language)},tokenize:function(g,y){var k=y.rest;if(k){for(var x in k)y[x]=k[x];delete y.rest}var w=new d;return f(w,w.head,g),u(g,w,y,w.head,0),h(w)},hooks:{all:{},add:function(g,y){var k=a.hooks.all;k[g]=k[g]||[],k[g].push(y)},run:function(g,y){var k=a.hooks.all[g];if(!(!k||!k.length))for(var x=0,w;w=k[x++];)w(y)}},Token:l};n.Prism=a;function l(g,y,k,x){this.type=g,this.content=y,this.alias=k,this.length=(x||"").length|0}l.stringify=function g(y,k){if(typeof y=="string")return y;if(Array.isArray(y)){var x="";return y.forEach(function(T){x+=g(T,k)}),x}var w={type:y.type,content:g(y.content,k),tag:"span",classes:["token",y.type],attributes:{},language:k},E=y.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(w.classes,E):w.classes.push(E)),a.hooks.run("wrap",w);var M="";for(var C in w.attributes)M+=" "+C+'="'+(w.attributes[C]||"").replace(/"/g,""")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+M+">"+w.content+""};function c(g,y,k,x){g.lastIndex=y;var w=g.exec(k);if(w&&x&&w[1]){var E=w[1].length;w.index+=E,w[0]=w[0].slice(E)}return w}function u(g,y,k,x,w,E){for(var M in k)if(!(!k.hasOwnProperty(M)||!k[M])){var C=k[M];C=Array.isArray(C)?C:[C];for(var T=0;T=E.reach);P+=A.value.length,A=A.next){var B=A.value;if(y.length>g.length)return;if(!(B instanceof l)){var Y=1,J;if(F){if(J=c(K,P,g,D),!J||J.index>=g.length)break;var de=J.index,_e=J.index+J[0].length,ie=P;for(ie+=A.value.length;de>=ie;)A=A.next,ie+=A.value.length;if(ie-=A.value.length,P=ie,A.value instanceof l)continue;for(var ue=A;ue!==y.tail&&(ie<_e||typeof ue.value=="string");ue=ue.next)Y++,ie+=ue.value.length;Y--,B=g.slice(P,ie),J.index-=P}else if(J=c(K,0,B,D),!J)continue;var de=J.index,he=J[0],Me=B.slice(0,de),Se=B.slice(de+he.length),ut=P+B.length;E&&ut>E.reach&&(E.reach=ut);var et=A.prev;Me&&(et=f(y,et,Me),P+=Me.length),p(y,et,Y);var Cr=new l(M,z?a.tokenize(he,z):he,V,he);if(A=f(y,et,Cr),Se&&f(y,A,Se),Y>1){var pe={cause:M+","+T,reach:ut};u(g,y,k,A.prev,P,pe),E&&pe.reach>E.reach&&(E.reach=pe.reach)}}}}}}function d(){var g={value:null,prev:null,next:null},y={value:null,prev:g,next:null};g.next=y,this.head=g,this.tail=y,this.length=0}function f(g,y,k){var x=y.next,w={value:k,prev:y,next:x};return y.next=w,x.prev=w,g.length++,w}function p(g,y,k){for(var x=y.next,w=0;w/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(r,n){var o={};o["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var s={};s[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var Uoe=Qb;Qb.displayName="css";Qb.aliases=[];function Qb(e){(function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}var Woe=Zb;Zb.displayName="clike";Zb.aliases=[];function Zb(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var Koe=ek;ek.displayName="javascript";ek.aliases=["js"];function ek(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var ru=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Su=="object"?Su:{},qoe=cie();ru.Prism={manual:!0,disableWorkerMessageHandler:!0};var Goe=cre,Yoe=Coe,LT=Voe,Joe=joe,Xoe=Uoe,Qoe=Woe,Zoe=Koe;qoe();var tk={}.hasOwnProperty;function IT(){}IT.prototype=LT;var St=new IT,eie=St;St.highlight=rie;St.register=Bd;St.alias=tie;St.registered=nie;St.listLanguages=oie;Bd(Joe);Bd(Xoe);Bd(Qoe);Bd(Zoe);St.util.encode=aie;St.Token.stringify=iie;function Bd(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");St.languages[e.displayName]===void 0&&e(St)}function tie(e,t){var r=St.languages,n=e,o,i,s,a;t&&(n={},n[e]=t);for(o in n)for(i=n[o],i=typeof i=="string"?[i]:i,s=i.length,a=-1;++a{for(var o=n>1?void 0:n?die(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uie(t,r,o),o},DT=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},pi=(e,t,r)=>(DT(e,t,"read from private field"),r?r.call(e):t.get(e)),Zg=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},e1=(e,t,r,n)=>(DT(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$T="data-code-block-language";function HT(e,t,r=[]){return e.map(n=>{const o=[...r];return n.type==="element"&&n.properties.className?o.push(...n.properties.className):n.type==="text"&&o.length===0&&t&&o.push(t),n.type==="element"?HT(n.children,t,o):{text:n.value,classes:o}})}function fie(e,t){var r;const{node:n,pos:o}=e,i=ah({language:(r=n.attrs.language)==null?void 0:r.replace("language-",""),fallback:"markup"}),s=rk.highlight(n.textContent??"",i),a=HT(s,t);let l=o+1;function c(u){const d=l,f=d+u.text.length;return l=f,{...u,from:d,to:f}}return MS(a).map(c)}function F4(e){const{blocks:t,skipLast:r,plainTextClassName:n}=e,o=[];for(const i of t){const s=fie(i,n),a=r?s.length-1:s.length;for(const l of cv(a)){const c=s[l],u=c==null?void 0:c.classes;if(!c||!(u!=null&&u.length))continue;const d=qe.inline(c.from,c.to,{class:u.join(" ")});o.push(d)}}return o}function pie(e){return!!(e&&Xt(e)&&ne(e.language)&&e.language.length>0)}function hie(e){return t=>({state:{tr:r,selection:n},dispatch:o})=>{if(!pie(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=Yi({types:e,selection:n});return!i||CS(t,i.node.attrs)?!1:(r.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(r),!0)}}function ah(e){const{language:t,fallback:r}=e;if(!t)return r;const n=rk.listLanguages();for(const o of n)if(o.toLowerCase()===t.toLowerCase())return o;return r}function mie(e,t){const{language:r,wrap:n}=_h(e.attrs,t),{style:o,...i}=t.dom(e);let s=i.style;return n&&(s=$6({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Pu(i.class,`language-${r}`)},["code",{[$T]:r,style:s},0]]}function gie(e){return({pos:t}=ee())=>({tr:r,dispatch:n})=>{const{type:o,formatter:i,defaultLanguage:s}=e,{from:a,to:l}=t?{from:t,to:t}:r.selection,c=Yi({types:o,selection:r.selection});if(!c)return!1;const{node:{attrs:u,textContent:d},start:f}=c,p=a-f,h=l-f,m=ah({language:u.language,fallback:s}),b=i({source:d,language:m,cursorOffset:p});let v;if(p!==h&&(v=i({source:d,language:m,cursorOffset:h})),!b)return!1;const{cursorOffset:g,formatted:y}=b;if(y===d)return!1;const k=f+d.length;r.insertText(y,f,k);const x=f+g,w=v?f+v.cursorOffset:void 0;return r.setSelection(le.between(r.doc.resolve(x),r.doc.resolve(w??x))),n&&n(r),!0}}function vie(e){var t;return(t=e.getAttribute($T)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:yie,LABEL:bie}=CN,kie={icon:"bracesLine",description:({t:e})=>e(yie),label:({t:e})=>e(bie)},Ms,nu,ou,xie=class{constructor(e,t){Zg(this,Ms,void 0),Zg(this,nu,void 0),Zg(this,ou,!1),e1(this,nu,e),e1(this,Ms,t)}init(e){const t=X6({node:e.doc,type:pi(this,nu)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const r=F4({blocks:t,skipLast:pi(this,ou),defaultLanguage:pi(this,Ms).options.defaultLanguage,plainTextClassName:pi(this,Ms).options.plainTextClassName??void 0});this.decorationSet=Ee.create(e,r)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const r=Q6(e,{descend:!0,predicate:n=>n.type===pi(this,nu),StepTypes:[]});return this.updateDecorationSet(e,r),this}updateDecorationSet(e,t){if(t.length===0)return;let r=this.decorationSet;for(const{node:n,pos:o}of t)r=this.decorationSet.remove(this.decorationSet.find(o,o+n.nodeSize));this.decorationSet=r.add(e.doc,F4({blocks:t,skipLast:pi(this,ou),defaultLanguage:pi(this,Ms).options.defaultLanguage,plainTextClassName:pi(this,Ms).options.plainTextClassName??void 0}))}setDeleted(e){e1(this,ou,e)}};Ms=new WeakMap;nu=new WeakMap;ou=new WeakMap;var no=class extends Qt{get name(){return"codeBlock"}createTags(){return[oe.Block,oe.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const r=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:n=>{var o,i;if(!mt(n))return!1;const s=n.querySelector("pre.code");if(!mt(s))return!1;const a=ao(s,"white-space")==="pre-wrap",l=(i=(o=n.className.match(r))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(n),language:l,wrap:a}}},{tag:"pre",preserveWhitespace:"full",getAttrs:n=>{if(!mt(n))return!1;const o=n.querySelector("code");if(!mt(o))return!1;const i=ao(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,n);return{...e.parse(n),language:s,wrap:i}}},...t.parseDOM??[]],toDOM:n=>mie(n,e)}}createAttributes(){return{class:gF[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=r=>({language:ah({language:sl(r,1),fallback:this.options.defaultLanguage})});return[u5({regexp:e,type:this.type,beforeDispatch:({tr:r,start:n})=>{const o=r.doc.resolve(n);r.setSelection(le.near(o))},getAttributes:t})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new xie(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(r,n){return e.init(n)},apply(r,n,o,i){return e.apply(r,i)}},props:{handleKeyDown:Pv({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations(){return e.setDeleted(!1),e.decorationSet}}}}toggleCodeBlock(e={}){return Nv({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return Nu(this.type,e)}updateCodeBlock(e){return hie(this.type)(e)}formatCodeBlock(e){return gie({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:r,tr:n,schema:o}=e,{node:i}=u6(r);if(!Ch({node:i,types:this.type}))return!1;if(r.empty)n.insertText(" ");else{const{from:s,to:a}=r;n.replaceWith(s,a,o.text(" "))}return t&&t(n),!0}backspaceKey({dispatch:e,tr:t,state:r}){if(!t.selection.empty)return!1;const n=Yi({types:this.type,selection:t.selection});if((n==null?void 0:n.start)!==t.selection.from)return!1;const{pos:o,node:i,start:s}=n,a=nt(r.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?l6({pos:o,tr:t,content:a.create()}):a6({pos:o,tr:t}):s>2?t.setSelection(le.near(t.doc.resolve(s-2))):(t.insert(0,a.create()),t.setSelection(le.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(ls(t.selection)&&t.selection.empty))return!1;const{nodeBefore:r,parent:n}=t.selection.$anchor;if(!(r!=null&&r.isText)||!n.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=r,{textContent:a}=n;if(!i)return!1;const l=i.match(o),c=a.match(o);if(!l||!c)return!1;const[,u]=l,d=ah({language:u,fallback:this.options.defaultLanguage}),f=t.selection.$from.before(),p=f+s+1;return t.replaceWith(f,p,this.type.create({language:d})),t.setSelection(le.near(t.doc.resolve(f+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!JE({type:this.type,state:e}))return!1;const r=t.formatCodeBlock.isEnabled();return r&&t.formatCodeBlock(),r}registerLanguages(){for(const e of this.options.supportedLanguages)rk.register(e)}};ai([G(kie)],no.prototype,"toggleCodeBlock",1);ai([G()],no.prototype,"createCodeBlock",1);ai([G()],no.prototype,"updateCodeBlock",1);ai([G()],no.prototype,"formatCodeBlock",1);ai([Et({shortcut:"Tab"})],no.prototype,"tabKey",1);ai([Et({shortcut:"Backspace"})],no.prototype,"backspaceKey",1);ai([Et({shortcut:"Enter"})],no.prototype,"enterKey",1);ai([Et({shortcut:j.Format})],no.prototype,"formatShortcut",1);no=ai([me({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:vie},staticKeys:["getLanguageFromDom"]})],no);var BT=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Re=(e,t,r)=>(BT(e,t,"read from private field"),r?r.call(e):t.get(e)),ja=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},bi=(e,t,r,n)=>(BT(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),wie='',Sie='',Eie=encodeURIComponent(wie),Cie=encodeURIComponent(Sie),Tr,Mie=class{constructor(e){ja(this,Tr,void 0);const t=document.createElement("div"),r=document.createElement("div");this.dom=t,bi(this,Tr,r),this.type=e,this.createHandle(e)}createHandle(e){switch(ir(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),ir(Re(this,Tr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Re(this,Tr).dataset.dragging="",e){case 0:ir(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ir(Re(this,Tr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:ir(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ir(Re(this,Tr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:ir(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),ir(Re(this,Tr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:ir(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),ir(Re(this,Tr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${Cie}") `});break;case 4:ir(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),ir(Re(this,Tr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${Eie}") `});break}this.dom.append(Re(this,Tr))}setHandleVisibility(e){const t=e||!!Re(this,Tr).dataset.dragging;Re(this,Tr).style.opacity=t?"1":"0"}dataSetDragging(e){Re(this,Tr).dataset.dragging=e?"true":""}};Tr=new WeakMap;var kf=50,FT=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(FT||{}),Ts,Os,_s,zo,As,Tie=class{constructor({node:e,view:t,getPos:r,aspectRatio:n=0,options:o,initialSize:i}){ja(this,Ts,void 0),ja(this,Os,void 0),ja(this,_s,[]),ja(this,zo,void 0),ja(this,As,void 0);const s=this.createWrapper(e,i),a=this.createElement({node:e,view:t,getPos:r,options:o}),c=(n===1?[0,1,2,3,4]:[0,1]).map(f=>new Mie(f));for(const f of c){const p=h=>{this.startResizing(h,t,r,f)};f.dom.addEventListener("mousedown",p),Re(this,_s).push(()=>f.dom.removeEventListener("mousedown",p)),s.append(f.dom)}const u=()=>{c.forEach(f=>f.setHandleVisibility(!0))},d=()=>{c.forEach(f=>f.setHandleVisibility(!1))};s.addEventListener("mouseover",u),s.addEventListener("mouseout",d),Re(this,_s).push(()=>s.removeEventListener("mouseover",u),()=>s.removeEventListener("mouseout",d)),s.append(a),this.dom=s,bi(this,Os,e),bi(this,Ts,a),this.aspectRatio=n}createWrapper(e,t){const r=document.createElement("div");return r.classList.add("remirror-resizable-view"),r.style.position="relative",t?ir(r,{width:V4(t.width),aspectRatio:`${t.width} / ${t.height}`}):ir(r,{width:V4(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),ir(r,{maxWidth:"100%",minWidth:`${kf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),r}startResizing(e,t,r,n){var o,i;e.preventDefault(),n.dataSetDragging(!0),Re(this,Ts).style.pointerEvents="none";const s=e.pageX,a=e.pageY,l=((o=Re(this,Ts))==null?void 0:o.getBoundingClientRect().width)||0,c=((i=Re(this,Ts))==null?void 0:i.getBoundingClientRect().height)||0,u=l1(100,!1,f=>{const p=f.pageX,h=f.pageY,m=p-s,b=h-a;let v=null,g=null;if(this.aspectRatio===0&&l&&c)switch(n.type){case 0:case 3:v=l+m,g=c/l*v;break;case 1:case 4:v=l-m,g=c/l*v;break;case 2:g=c+b,v=l/c*g;break}else if(this.aspectRatio===1)switch(n.type){case 0:v=l+m;break;case 1:v=l-m;break;case 2:g=c+b;break;case 3:v=l+m,g=c+b;break;case 4:v=l-m,g=c+b;break}typeof v=="number"&&v{f.preventDefault(),n.dataSetDragging(!1),n.setHandleVisibility(!1),Re(this,Ts).style.pointerEvents="auto",document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d);const p=r(),h=t.state.tr.setNodeMarkup(p,void 0,{...Re(this,Os).attrs,width:Re(this,zo),height:Re(this,As)});t.dispatch(h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",d),Re(this,_s).push(()=>document.removeEventListener("mousemove",u)),Re(this,_s).push(()=>document.removeEventListener("mouseup",d))}update(e){return e.type!==Re(this,Os).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==Re(this,zo)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==Re(this,zo)&&e.attrs.height!==Re(this,As)||!Oie(Re(this,Os),e,["width","height"])?!1:(bi(this,Os,e),bi(this,zo,e.attrs.width),bi(this,As,e.attrs.height),!0)}destroy(){Re(this,_s).forEach(e=>e())}};Ts=new WeakMap;Os=new WeakMap;_s=new WeakMap;zo=new WeakMap;As=new WeakMap;function Oie(e,t,r){return e===t||_ie(e,t,r)&&e.content.eq(t.content)}function _ie(e,t,r){const n=e.attrs,o=t.attrs,i={};for(const a of r)i[a]=null;e.attrs={...n,...i},t.attrs={...o,...i};const s=e.sameMarkup(t);return e.attrs=n,t.attrs=o,s}function V4(e){return typeof e=="number"?`${e}px`:e||void 0}var Aie=Object.defineProperty,Nie=Object.getOwnPropertyDescriptor,VT=(e,t,r,n)=>{for(var o=n>1?void 0:n?Nie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Aie(t,r,o),o},lh=class extends Qt{get name(){return"hardBreak"}createTags(){return[oe.InlineNode]}createNodeSpec(e,t){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` -`,...t,attrs:e.defaults(),parseDOM:[{tag:"br",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["br",e.dom(r)]}}createKeymap(){const e=o6(cu(g5),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":e,"Shift-Enter":e}}insertHardBreak(){return e=>{const{tr:t,dispatch:r}=e;return r==null||r(t.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};VT([G()],lh.prototype,"insertHardBreak",1);lh=VT([me({defaultPriority:De.Low})],lh);var Rie=Object.defineProperty,Pie=Object.getOwnPropertyDescriptor,jT=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Rie(t,r,o),o},{LABEL:zie}=AN,Lie={icon:({attrs:e})=>`h${(e==null?void 0:e.level)??"1"}`,label:({t:e,attrs:t})=>e({...zie,values:{level:t==null?void 0:t.level}})},Iie=[j.H1,j.H2,j.H3,j.H4,j.H5,j.H6],ch=class extends Qt{get name(){return"heading"}createTags(){return[oe.Block,oe.TextBlock,oe.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(r=>({tag:`h${r}`,getAttrs:n=>({...e.parse(n),level:r})})),...t.parseDOM??[]],toDOM:r=>this.options.levels.includes(r.attrs.level)?[`h${r.attrs.level}`,e.dom(r),0]:[`h${this.options.defaultLevel}`,e.dom(r),0]}}toggleHeading(e={}){return Nv({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(ke),r=ee(),n=[];for(const o of this.options.levels){const i=Iie[o-1]??j.H1;r[i]=Nu(this.type,{level:o}),n.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:n}),r}createInputRules(){return this.options.levels.map(e=>eR(new RegExp(`^(#{1,${e}})\\s$`),this.type,()=>({level:e})))}createPasteRules(){return this.options.levels.map(e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0}))}};jT([G(Lie)],ch.prototype,"toggleHeading",1);ch=jT([me({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],ch);var Die=Object.defineProperty,$ie=Object.getOwnPropertyDescriptor,UT=(e,t,r,n)=>{for(var o=n>1?void 0:n?$ie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Die(t,r,o),o},Hie={icon:"separator",label:({t:e})=>e(Zk.LABEL),description:({t:e})=>e(Zk.DESCRIPTION)},uh=class extends Qt{get name(){return"horizontalRule"}createTags(){return[oe.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["hr",e.dom(r)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:r}=e,n=t.selection.$anchor,o=n.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(r&&(t.selection.empty&&Th(o)&&t.insert(n.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),r(t.scrollIntoView())),!0)}}createInputRules(){return[u5({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Md(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:r}=this.options;if(!r)return;const n=this.store.schema.nodes[r];te(n,{code:H.EXTENSION,message:`'${r}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=n.create();e.insert(t,o),e.setSelection(le.near(e.doc.resolve(t+1)))}};UT([G(Hie)],uh.prototype,"insertHorizontalRule",1);uh=UT([me({defaultOptions:{insertionNode:"paragraph"}})],uh);var Bie=Object.defineProperty,Fie=Object.getOwnPropertyDescriptor,nk=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bie(t,r,o),o},Vie=class extends Tie{constructor(e,t,r){super({node:e,view:t,getPos:r,aspectRatio:FT.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),ir(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},fd=class extends Qt{get name(){return"image"}createTags(){return[oe.InlineNode,oe.Media]}createNodeSpec(e,t){const{preferPastedTextContent:r}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:n=>{var o;if(mt(n)){const i=Uie({element:n,parse:e.parse});return r&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:n=>{const o=_h(n.attrs,e);return["img",{...e.dom(n),...o}]}}}insertImage(e,t){return({tr:r,dispatch:n})=>{const{from:o,to:i}=Tn(t??r.selection,r.doc),s=this.type.create(e);return n==null||n(r.replaceRangeWith(o,i,s)),!0}}uploadImage(e,t){const{updatePlaceholder:r,destroyPlaceholder:n,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let a=s.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return a},createElement:(l,c)=>{const u=o(l,c);return t==null||t(u),u},onUpdate:(l,c,u,d)=>{r(l,c,u,d)},onDestroy:(l,c)=>{n(l,c)}},onSuccess:(l,c,u)=>this.insertImage(l,c)(u)}).validate(({tr:l,dispatch:c})=>{const u=eE(l.doc,a,this.type);return u==null?!1:(a=u,l.selection.empty||c==null||c(l.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,r){var n;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&qie(t)&&((n=t.clipboardData)!=null&&n.getData("text/plain")))return!1;const{commands:s,chain:a}=this.store,l=e.map((u,d)=>({file:u,progress:f=>{s.updatePlaceholder(c[d],f)}})),c=i(l);ln(r)&&a.selectText(r);for(const u of c)a.uploadImage(u);return a.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t=e.type==="drop"?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,r)=>new Vie(e,t,r):{}}};nk([G()],fd.prototype,"insertImage",1);nk([G()],fd.prototype,"uploadImage",1);fd=nk([me({defaultOptions:{createPlaceholder:Wie,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Kie,enableResizing:!1,preferPastedTextContent:!0}})],fd);function jie(e){let{width:t,height:r}=e.style;return t=t||e.getAttribute("width")||"",r=r||e.getAttribute("height")||"",{width:t,height:r}}function Uie({element:e,parse:t}){const{width:r,height:n}=jie(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(n||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(r||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function Wie(e,t){const r=document.createElement("div");return r.classList.add(yF.IMAGE_LOADER),r}function Kie(e){te(e.length>0,{code:H.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const r=[];for(const{file:n,progress:o}of e)r.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",a=>{var l;t+=1,o(t/e.length),i({src:(l=a.target)==null?void 0:l.result,fileName:n.name})},{once:!0}),s.readAsDataURL(n)}));return r}function qie(e){return e.clipboardData!==void 0}var Gie=Object.defineProperty,Yie=Object.getOwnPropertyDescriptor,ok=(e,t,r,n)=>{for(var o=n>1?void 0:n?Yie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Gie(t,r,o),o},Jie={icon:"italic",label:({t:e})=>e(ex.LABEL),description:({t:e})=>e(ex.DESCRIPTION)},pd=class extends cs{get name(){return"italic"}createTags(){return[oe.FontStyle,oe.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:r=>["em",e.dom(r),0]}}createKeymap(){return{"Mod-i":Xi({type:this.type})}}createInputRules(){return[Ru({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Ru({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return Xi({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};ok([G(Jie)],pd.prototype,"toggleItalic",1);ok([Et({shortcut:j.Italic,command:"toggleItalic"})],pd.prototype,"shortcut",1);pd=ok([me({})],pd);var WT={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:Su,function(){return function(r){function n(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}var o={};return n.m=r,n.c=o,n.d=function(i,s,a){n.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:a})},n.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(s,"a",s),s},n.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},n.p="",n(n.s=0)}([function(r,n,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(c){typeof c!="string"&&i();for(var u=0,d=0,f=0,p=c.length,h=0;p--&&++h&&!(u&&-1f?"":c.slice(f,u)}var a=["/",":","?","#"],l=[".","/","@"];r.exports=function(c){if(typeof c=="string")return s(c);if(Array.isArray(c)){var u=[],d,f=0;for(d=c.length;f{for(var o=n>1?void 0:n?ese(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zie(t,r,o),o},tse=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],j4="updateLink",rse=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,fa=class extends cs{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[oe.Link,oe.ExcludeInputRules]}createMarkSpec(e,t){const r="data-link-auto",n=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,a=i?[...s,i]:s;return o&&br(a,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!mt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,a=this.options.autoLink&&(o.hasAttribute(r)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...e.parse(o),href:i,auto:a,...n(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...a}=_h(o.attrs,e),l=o.attrs.auto?{[r]:""}:{},c="noopener noreferrer nofollow";return["a",{...e.dom(o),...a,rel:c,...l,...n(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:r,to:n,empty:o,$from:i}=e.selection,s=!1;const a=Yo(i,this.type);if(o){const l=a??r5(e);if(!l)return!1;({text:t,from:r,to:n}=l),s=!0}return r===n?!1:(s||(t=e.doc.textBetween(r,n)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:a?{attrs:a.mark.attrs,from:a.from,to:a.to}:void 0,selectedText:t,from:r,to:n}),!0)}updateLink(e,t){return r=>{const{tr:n}=r;return!(ls(n.selection)&&!Tv(n.selection)||x6(n.selection)||bp({trState:n,type:this.type}))&&!t?!1:(n.setMeta(this.name,{command:j4,attrs:e,range:t}),V6({type:this.type,attrs:e,range:t})(r))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:r}=t;return bp({trState:r,type:this.type,...e})?c5({type:this.type,expand:!0,range:e})(t):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref(sl(e)),auto:!t}),transformMatch:e=>{const t=sl(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const r=t.getMark(this.type);if(!r)return;const n=r.mark.attrs,o={...n,...r};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=n.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(r)),i}}}createPlugin(){return{appendTransaction:(e,t,r)=>{if(e.filter(p=>!!p.getMeta(this.name)).forEach(p=>{const h=p.getMeta(this.name);if(h.command===j4){const{range:m,attrs:b}=h,{selection:v,doc:g}=r,y={range:m,selection:v,doc:g,attrs:b},{from:k,to:x}=m??v;this.options.onUpdateLink(g.textBetween(k,x),y)}}),!this.options.autoLink||A0(t)-A0(r)===1||!e.some(p=>p.docChanged))return;const s=s6(e,t),a=t5(s,[yt,Dt]),{mapping:l}=s,{tr:c,doc:u}=r,{updateLink:d,removeLink:f}=this.store.chain(c);if(a.forEach(({prevFrom:p,prevTo:h,from:m,to:b})=>{const v=[],g=b-m===2,y=this.getLinkMarksInRange(t.doc,p,h,!0).filter(k=>k.mark.type===this.type).map(({from:k,to:x,text:w})=>({mappedFrom:l.map(k),mappedTo:l.map(x),text:w,from:k,to:x}));y.forEach(({mappedFrom:k,mappedTo:x,from:w,to:E},M)=>this.getLinkMarksInRange(u,k,x,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const T=t.doc.textBetween(w,E,void 0," "),N=u.textBetween(C.from,C.to+1,void 0," ").trim(),z=this.isValidUrl(T);this.isValidUrl(N)||(z&&(f({from:C.from,to:C.to}).tr(),y.splice(M,1)),!g&&m===b&&this.findAutoLinks(N).map(F=>this.addLinkProperties({...F,from:k+F.start,to:k+F.end})).forEach(({attrs:F,range:V,text:L})=>{d(F,V).tr(),v.push({attrs:F,range:V,text:L})}))})),this.findTextBlocksInRange(u,{from:m,to:b}).forEach(({text:k,positionStart:x})=>{this.findAutoLinks(k).map(w=>this.addLinkProperties({...w,from:x+w.start+1,to:x+w.end+1})).filter(({range:w})=>{const E=m>=w.from&&m<=w.to,M=b>=w.from&&b<=w.to;return E||M||g}).filter(({range:w})=>this.getLinkMarksInRange(c.doc,w.from,w.to,!1).length===0).filter(({range:{from:w},text:E})=>!y.some(({text:M,mappedFrom:C})=>C===w&&M===E)).forEach(({attrs:w,text:E,range:M})=>{d(w,M).tr(),v.push({attrs:w,range:M,text:E})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:k,range:x,text:w})=>{const{doc:E,selection:M}=c;this.options.onUpdateLink(w,{attrs:k,doc:E,range:x,selection:M})})})}),c.steps.length!==0)return c}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,r,n){const o=[];if(t===r){const i=Math.max(t-1,0),s=e.resolve(i),a=Yo(s,this.type);(a==null?void 0:a.mark.attrs.auto)===n&&o.push(a)}else e.nodesBetween(t,r,(i,s)=>{const l=(i.marks??[]).find(({type:c,attrs:u})=>c===this.type&&u.auto===n);l&&o.push({from:s,to:s+i.nodeSize,mark:l,text:i.textContent})});return o}findTextBlocksInRange(e,t){const r=[];return e.nodesBetween(t.from,t.to,(n,o)=>{!n.isTextblock||!n.type.allowsMarkType(this.type)||r.push({node:n,pos:o})}),r.map(n=>({text:e.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," "),positionStart:n.pos}))}addLinkProperties({from:e,to:t,href:r,...n}){return{...n,range:{from:e,to:t},attrs:{href:r,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const r of Kl(e,this.options.autoLinkRegex)){const n=sl(r);if(!n)continue;const o=this.buildHref(n);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:n,href:o,start:r.index,end:r.index+n.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!((t=this._autoLinkRegexNonGlobal)!=null&&t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(t.length===0)return!0;const r=Qie(e);if(r==="")return!0;const n=I_(r.split("."));return t.includes(n)}};Fd([Et({shortcut:j.InsertLink})],fa.prototype,"shortcut",1);Fd([G()],fa.prototype,"updateLink",1);Fd([G()],fa.prototype,"selectLink",1);Fd([G()],fa.prototype,"removeLink",1);fa=Fd([me({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:rse,autoLinkAllowedTLDs:tse,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:nse},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:De.Medium})],fa);function nse({url:e,defaultProtocol:t}){const r=/^((?:https?|ftp)?:)\/\//.test(e);return!r&&e.includes("@")?`mailto:${e}`:r?e:`${t}//${e}`}function ose(e){for(var t=1;t0&&e[t-1]===` -`;)t--;return e.substring(0,t)}var ase=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function ik(e){return sk(e,ase)}var KT=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function qT(e){return sk(e,KT)}function lse(e){return YT(e,KT)}var GT=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function cse(e){return sk(e,GT)}function use(e){return YT(e,GT)}function sk(e,t){return t.indexOf(e.nodeName)>=0}function YT(e,t){return e.getElementsByTagName&&t.some(function(r){return e.getElementsByTagName(r).length})}var dr={};dr.paragraph={filter:"p",replacement:function(e){return` + */var r=function(n){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function g(y){return y instanceof l?new l(y.type,g(y.content),y.alias):Array.isArray(y)?y.map(g):y.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(x){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(x.stack)||[])[1];if(g){var y=document.getElementsByTagName("script");for(var k in y)if(y[k].src==g)return y[k]}return null}},isActive:function(g,y,k){for(var x="no-"+y;g;){var w=g.classList;if(w.contains(y))return!0;if(w.contains(x))return!1;g=g.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(g,y){var k=a.util.clone(a.languages[g]);for(var x in y)k[x]=y[x];return k},insertBefore:function(g,y,k,x){x=x||a.languages;var w=x[g],E={};for(var M in w)if(w.hasOwnProperty(M)){if(M==y)for(var C in k)k.hasOwnProperty(C)&&(E[C]=k[C]);k.hasOwnProperty(M)||(E[M]=w[M])}var T=x[g];return x[g]=E,a.languages.DFS(a.languages,function(R,z){z===T&&R!=g&&(this[R]=E)}),E},DFS:function g(y,k,x,w){w=w||{};var E=a.util.objId;for(var M in y)if(y.hasOwnProperty(M)){k.call(y,M,y[M],x||M);var C=y[M],T=a.util.type(C);T==="Object"&&!w[E(C)]?(w[E(C)]=!0,g(C,k,null,w)):T==="Array"&&!w[E(C)]&&(w[E(C)]=!0,g(C,k,M,w))}}},plugins:{},highlightAll:function(g,y){a.highlightAllUnder(document,g,y)},highlightAllUnder:function(g,y,k){var x={callback:k,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",x),x.elements=Array.prototype.slice.apply(x.container.querySelectorAll(x.selector)),a.hooks.run("before-all-elements-highlight",x);for(var w=0,E;E=x.elements[w++];)a.highlightElement(E,y===!0,x.callback)},highlightElement:function(g,y,k){var x=a.util.getLanguage(g),w=a.languages[x];a.util.setLanguage(g,x);var E=g.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(E,x);var M=g.textContent,C={element:g,language:x,grammar:w,code:M};function T(z){C.highlightedCode=z,a.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,a.hooks.run("after-highlight",C),a.hooks.run("complete",C),k&&k.call(C.element)}if(a.hooks.run("before-sanity-check",C),E=C.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!C.code){a.hooks.run("complete",C),k&&k.call(C.element);return}if(a.hooks.run("before-highlight",C),!C.grammar){T(a.util.encode(C.code));return}if(y&&n.Worker){var R=new Worker(a.filename);R.onmessage=function(z){T(z.data)},R.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else T(a.highlight(C.code,C.grammar,C.language))},highlight:function(g,y,k){var x={code:g,grammar:y,language:k};if(a.hooks.run("before-tokenize",x),!x.grammar)throw new Error('The language "'+x.language+'" has no grammar.');return x.tokens=a.tokenize(x.code,x.grammar),a.hooks.run("after-tokenize",x),l.stringify(a.util.encode(x.tokens),x.language)},tokenize:function(g,y){var k=y.rest;if(k){for(var x in k)y[x]=k[x];delete y.rest}var w=new d;return f(w,w.head,g),u(g,w,y,w.head,0),h(w)},hooks:{all:{},add:function(g,y){var k=a.hooks.all;k[g]=k[g]||[],k[g].push(y)},run:function(g,y){var k=a.hooks.all[g];if(!(!k||!k.length))for(var x=0,w;w=k[x++];)w(y)}},Token:l};n.Prism=a;function l(g,y,k,x){this.type=g,this.content=y,this.alias=k,this.length=(x||"").length|0}l.stringify=function g(y,k){if(typeof y=="string")return y;if(Array.isArray(y)){var x="";return y.forEach(function(T){x+=g(T,k)}),x}var w={type:y.type,content:g(y.content,k),tag:"span",classes:["token",y.type],attributes:{},language:k},E=y.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(w.classes,E):w.classes.push(E)),a.hooks.run("wrap",w);var M="";for(var C in w.attributes)M+=" "+C+'="'+(w.attributes[C]||"").replace(/"/g,""")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+M+">"+w.content+""};function c(g,y,k,x){g.lastIndex=y;var w=g.exec(k);if(w&&x&&w[1]){var E=w[1].length;w.index+=E,w[0]=w[0].slice(E)}return w}function u(g,y,k,x,w,E){for(var M in k)if(!(!k.hasOwnProperty(M)||!k[M])){var C=k[M];C=Array.isArray(C)?C:[C];for(var T=0;T=E.reach);P+=A.value.length,A=A.next){var B=A.value;if(y.length>g.length)return;if(!(B instanceof l)){var X=1,J;if(F){if(J=c(K,P,g,D),!J||J.index>=g.length)break;var pe=J.index,Re=J.index+J[0].length,ae=P;for(ae+=A.value.length;pe>=ae;)A=A.next,ae+=A.value.length;if(ae-=A.value.length,P=ae,A.value instanceof l)continue;for(var fe=A;fe!==y.tail&&(aeE.reach&&(E.reach=mt);var it=A.prev;Oe&&(it=f(y,it,Oe),P+=Oe.length),p(y,it,X);var Ar=new l(M,z?a.tokenize(ge,z):ge,V,ge);if(A=f(y,it,Ar),Ce&&f(y,A,Ce),X>1){var me={cause:M+","+T,reach:mt};u(g,y,k,A.prev,P,me),E&&me.reach>E.reach&&(E.reach=me.reach)}}}}}}function d(){var g={value:null,prev:null,next:null},y={value:null,prev:g,next:null};g.next=y,this.head=g,this.tail=y,this.length=0}function f(g,y,k){var x=y.next,w={value:k,prev:y,next:x};return y.next=w,x.prev=w,g.length++,w}function p(g,y,k){for(var x=y.next,w=0;w/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(r,n){var o={};o["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var s={};s[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var xie=bk;bk.displayName="css";bk.aliases=[];function bk(e){(function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(e)}var wie=kk;kk.displayName="clike";kk.aliases=[];function kk(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var Sie=xk;xk.displayName="javascript";xk.aliases=["js"];function xk(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var du=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Pu=="object"?Pu:{},Eie=Bie();du.Prism={manual:!0,disableWorkerMessageHandler:!0};var Cie=Bre,Mie=rie,aO=bie,Tie=kie,Oie=xie,_ie=wie,Aie=Sie;Eie();var wk={}.hasOwnProperty;function lO(){}lO.prototype=aO;var Ot=new lO,Rie=Ot;Ot.highlight=Pie;Ot.register=Jd;Ot.alias=Nie;Ot.registered=zie;Ot.listLanguages=Lie;Jd(Tie);Jd(Oie);Jd(_ie);Jd(Aie);Ot.util.encode=$ie;Ot.Token.stringify=Iie;function Jd(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");Ot.languages[e.displayName]===void 0&&e(Ot)}function Nie(e,t){var r=Ot.languages,n=e,o,i,s,a;t&&(n={},n[e]=t);for(o in n)for(i=n[o],i=typeof i=="string"?[i]:i,s=i.length,a=-1;++a{for(var o=n>1?void 0:n?Vie(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fie(t,r,o),o},cO=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},xi=(e,t,r)=>(cO(e,t,"read from private field"),r?r.call(e):t.get(e)),y1=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},b1=(e,t,r,n)=>(cO(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),uO="data-code-block-language";function dO(e,t,r=[]){return e.map(n=>{const o=[...r];return n.type==="element"&&n.properties.className?o.push(...n.properties.className):n.type==="text"&&o.length===0&&t&&o.push(t),n.type==="element"?dO(n.children,t,o):{text:n.value,classes:o}})}function jie(e,t){var r;const{node:n,pos:o}=e,i=kh({language:(r=n.attrs.language)==null?void 0:r.replace("language-",""),fallback:"markup"}),s=Sk.highlight(n.textContent??"",i),a=dO(s,t);let l=o+1;function c(u){const d=l,f=d+u.text.length;return l=f,{...u,from:d,to:f}}return QS(a).map(c)}function cS(e){const{blocks:t,skipLast:r,plainTextClassName:n}=e,o=[];for(const i of t){const s=jie(i,n),a=r?s.length-1:s.length;for(const l of Av(a)){const c=s[l],u=c==null?void 0:c.classes;if(!c||!(u!=null&&u.length))continue;const d=Qe.inline(c.from,c.to,{class:u.join(" ")});o.push(d)}}return o}function Uie(e){return!!(e&&rr(e)&&oe(e.language)&&e.language.length>0)}function Wie(e){return t=>({state:{tr:r,selection:n},dispatch:o})=>{if(!Uie(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=ns({types:e,selection:n});return!i||JS(t,i.node.attrs)?!1:(r.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(r),!0)}}function kh(e){const{language:t,fallback:r}=e;if(!t)return r;const n=Sk.listLanguages();for(const o of n)if(o.toLowerCase()===t.toLowerCase())return o;return r}function Kie(e,t){const{language:r,wrap:n}=Kh(e.attrs,t),{style:o,...i}=t.dom(e);let s=i.style;return n&&(s=mz({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:ju(i.class,`language-${r}`)},["code",{[uO]:r,style:s},0]]}function qie(e){return({pos:t}=te())=>({tr:r,dispatch:n})=>{const{type:o,formatter:i,defaultLanguage:s}=e,{from:a,to:l}=t?{from:t,to:t}:r.selection,c=ns({types:o,selection:r.selection});if(!c)return!1;const{node:{attrs:u,textContent:d},start:f}=c,p=a-f,h=l-f,m=kh({language:u.language,fallback:s}),b=i({source:d,language:m,cursorOffset:p});let v;if(p!==h&&(v=i({source:d,language:m,cursorOffset:h})),!b)return!1;const{cursorOffset:g,formatted:y}=b;if(y===d)return!1;const k=f+d.length;r.insertText(y,f,k);const x=f+g,w=v?f+v.cursorOffset:void 0;return r.setSelection(ue.between(r.doc.resolve(x),r.doc.resolve(w??x))),n&&n(r),!0}}function Gie(e){var t;return(t=e.getAttribute(uO)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:Yie,LABEL:Xie}=rN,Jie={icon:"bracesLine",description:({t:e})=>e(Yie),label:({t:e})=>e(Xie)},zs,fu,pu,Qie=class{constructor(e,t){y1(this,zs,void 0),y1(this,fu,void 0),y1(this,pu,!1),b1(this,fu,e),b1(this,zs,t)}init(e){const t=Oz({node:e.doc,type:xi(this,fu)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const r=cS({blocks:t,skipLast:xi(this,pu),defaultLanguage:xi(this,zs).options.defaultLanguage,plainTextClassName:xi(this,zs).options.plainTextClassName??void 0});this.decorationSet=Me.create(e,r)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const r=_z(e,{descend:!0,predicate:n=>n.type===xi(this,fu),StepTypes:[]});return this.updateDecorationSet(e,r),this}updateDecorationSet(e,t){if(t.length===0)return;let r=this.decorationSet;for(const{node:n,pos:o}of t)r=this.decorationSet.remove(this.decorationSet.find(o,o+n.nodeSize));this.decorationSet=r.add(e.doc,cS({blocks:t,skipLast:xi(this,pu),defaultLanguage:xi(this,zs).options.defaultLanguage,plainTextClassName:xi(this,zs).options.plainTextClassName??void 0}))}setDeleted(e){b1(this,pu,e)}};zs=new WeakMap;fu=new WeakMap;pu=new WeakMap;var co=class extends nr{get name(){return"codeBlock"}createTags(){return[ie.Block,ie.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const r=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:n=>{var o,i;if(!kt(n))return!1;const s=n.querySelector("pre.code");if(!kt(s))return!1;const a=ho(s,"white-space")==="pre-wrap",l=(i=(o=n.className.match(r))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(n),language:l,wrap:a}}},{tag:"pre",preserveWhitespace:"full",getAttrs:n=>{if(!kt(n))return!1;const o=n.querySelector("code");if(!kt(o))return!1;const i=ho(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,n);return{...e.parse(n),language:s,wrap:i}}},...t.parseDOM??[]],toDOM:n=>Kie(n,e)}}createAttributes(){return{class:qF[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=r=>({language:kh({language:gl(r,1),fallback:this.options.defaultLanguage})});return[I5({regexp:e,type:this.type,beforeDispatch:({tr:r,start:n})=>{const o=r.doc.resolve(n);r.setSelection(ue.near(o))},getAttributes:t})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new Qie(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(r,n){return e.init(n)},apply(r,n,o,i){return e.apply(r,i)}},props:{handleKeyDown:ey({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations(){return e.setDeleted(!1),e.decorationSet}}}}toggleCodeBlock(e={}){return Qv({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return Fu(this.type,e)}updateCodeBlock(e){return Wie(this.type)(e)}formatCodeBlock(e){return qie({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:r,tr:n,schema:o}=e,{node:i}=F6(r);if(!Vh({node:i,types:this.type}))return!1;if(r.empty)n.insertText(" ");else{const{from:s,to:a}=r;n.replaceWith(s,a,o.text(" "))}return t&&t(n),!0}backspaceKey({dispatch:e,tr:t,state:r}){if(!t.selection.empty)return!1;const n=ns({types:this.type,selection:t.selection});if((n==null?void 0:n.start)!==t.selection.from)return!1;const{pos:o,node:i,start:s}=n,a=lt(r.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?H6({pos:o,tr:t,content:a.create()}):$6({pos:o,tr:t}):s>2?t.setSelection(ue.near(t.doc.resolve(s-2))):(t.insert(0,a.create()),t.setSelection(ue.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(gs(t.selection)&&t.selection.empty))return!1;const{nodeBefore:r,parent:n}=t.selection.$anchor;if(!(r!=null&&r.isText)||!n.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=r,{textContent:a}=n;if(!i)return!1;const l=i.match(o),c=a.match(o);if(!l||!c)return!1;const[,u]=l,d=kh({language:u,fallback:this.options.defaultLanguage}),f=t.selection.$from.before(),p=f+s+1;return t.replaceWith(f,p,this.type.create({language:d})),t.setSelection(ue.near(t.doc.resolve(f+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!w5({type:this.type,state:e}))return!1;const r=t.formatCodeBlock.isEnabled();return r&&t.formatCodeBlock(),r}registerLanguages(){for(const e of this.options.supportedLanguages)Sk.register(e)}};mi([Y(Jie)],co.prototype,"toggleCodeBlock",1);mi([Y()],co.prototype,"createCodeBlock",1);mi([Y()],co.prototype,"updateCodeBlock",1);mi([Y()],co.prototype,"formatCodeBlock",1);mi([_t({shortcut:"Tab"})],co.prototype,"tabKey",1);mi([_t({shortcut:"Backspace"})],co.prototype,"backspaceKey",1);mi([_t({shortcut:"Enter"})],co.prototype,"enterKey",1);mi([_t({shortcut:j.Format})],co.prototype,"formatShortcut",1);co=mi([ve({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:Gie},staticKeys:["getLanguageFromDom"]})],co);var fO=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ze=(e,t,r)=>(fO(e,t,"read from private field"),r?r.call(e):t.get(e)),Za=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ti=(e,t,r,n)=>(fO(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Zie='',ese='',tse=encodeURIComponent(Zie),rse=encodeURIComponent(ese),Nr,nse=class{constructor(e){Za(this,Nr,void 0);const t=document.createElement("div"),r=document.createElement("div");this.dom=t,Ti(this,Nr,r),this.type=e,this.createHandle(e)}createHandle(e){switch(ur(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),ur(ze(this,Nr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),ze(this,Nr).dataset.dragging="",e){case 0:ur(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ur(ze(this,Nr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:ur(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),ur(ze(this,Nr),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:ur(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),ur(ze(this,Nr),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:ur(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),ur(ze(this,Nr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${rse}") `});break;case 4:ur(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),ur(ze(this,Nr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${tse}") `});break}this.dom.append(ze(this,Nr))}setHandleVisibility(e){const t=e||!!ze(this,Nr).dataset.dragging;ze(this,Nr).style.opacity=t?"1":"0"}dataSetDragging(e){ze(this,Nr).dataset.dragging=e?"true":""}};Nr=new WeakMap;var Nf=50,pO=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(pO||{}),Ls,Is,Ds,Vo,$s,ose=class{constructor({node:e,view:t,getPos:r,aspectRatio:n=0,options:o,initialSize:i}){Za(this,Ls,void 0),Za(this,Is,void 0),Za(this,Ds,[]),Za(this,Vo,void 0),Za(this,$s,void 0);const s=this.createWrapper(e,i),a=this.createElement({node:e,view:t,getPos:r,options:o}),c=(n===1?[0,1,2,3,4]:[0,1]).map(f=>new nse(f));for(const f of c){const p=h=>{this.startResizing(h,t,r,f)};f.dom.addEventListener("mousedown",p),ze(this,Ds).push(()=>f.dom.removeEventListener("mousedown",p)),s.append(f.dom)}const u=()=>{c.forEach(f=>f.setHandleVisibility(!0))},d=()=>{c.forEach(f=>f.setHandleVisibility(!1))};s.addEventListener("mouseover",u),s.addEventListener("mouseout",d),ze(this,Ds).push(()=>s.removeEventListener("mouseover",u),()=>s.removeEventListener("mouseout",d)),s.append(a),this.dom=s,Ti(this,Is,e),Ti(this,Ls,a),this.aspectRatio=n}createWrapper(e,t){const r=document.createElement("div");return r.classList.add("remirror-resizable-view"),r.style.position="relative",t?ur(r,{width:uS(t.width),aspectRatio:`${t.width} / ${t.height}`}):ur(r,{width:uS(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),ur(r,{maxWidth:"100%",minWidth:`${Nf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),r}startResizing(e,t,r,n){var o,i;e.preventDefault(),n.dataSetDragging(!0),ze(this,Ls).style.pointerEvents="none";const s=e.pageX,a=e.pageY,l=((o=ze(this,Ls))==null?void 0:o.getBoundingClientRect().width)||0,c=((i=ze(this,Ls))==null?void 0:i.getBoundingClientRect().height)||0,u=T1(100,!1,f=>{const p=f.pageX,h=f.pageY,m=p-s,b=h-a;let v=null,g=null;if(this.aspectRatio===0&&l&&c)switch(n.type){case 0:case 3:v=l+m,g=c/l*v;break;case 1:case 4:v=l-m,g=c/l*v;break;case 2:g=c+b,v=l/c*g;break}else if(this.aspectRatio===1)switch(n.type){case 0:v=l+m;break;case 1:v=l-m;break;case 2:g=c+b;break;case 3:v=l+m,g=c+b;break;case 4:v=l-m,g=c+b;break}typeof v=="number"&&v{f.preventDefault(),n.dataSetDragging(!1),n.setHandleVisibility(!1),ze(this,Ls).style.pointerEvents="auto",document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d);const p=r(),h=t.state.tr.setNodeMarkup(p,void 0,{...ze(this,Is).attrs,width:ze(this,Vo),height:ze(this,$s)});t.dispatch(h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",d),ze(this,Ds).push(()=>document.removeEventListener("mousemove",u)),ze(this,Ds).push(()=>document.removeEventListener("mouseup",d))}update(e){return e.type!==ze(this,Is).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==ze(this,Vo)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==ze(this,Vo)&&e.attrs.height!==ze(this,$s)||!ise(ze(this,Is),e,["width","height"])?!1:(Ti(this,Is,e),Ti(this,Vo,e.attrs.width),Ti(this,$s,e.attrs.height),!0)}destroy(){ze(this,Ds).forEach(e=>e())}};Ls=new WeakMap;Is=new WeakMap;Ds=new WeakMap;Vo=new WeakMap;$s=new WeakMap;function ise(e,t,r){return e===t||sse(e,t,r)&&e.content.eq(t.content)}function sse(e,t,r){const n=e.attrs,o=t.attrs,i={};for(const a of r)i[a]=null;e.attrs={...n,...i},t.attrs={...o,...i};const s=e.sameMarkup(t);return e.attrs=n,t.attrs=o,s}function uS(e){return typeof e=="number"?`${e}px`:e||void 0}var ase=Object.defineProperty,lse=Object.getOwnPropertyDescriptor,hO=(e,t,r,n)=>{for(var o=n>1?void 0:n?lse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ase(t,r,o),o},xh=class extends nr{get name(){return"hardBreak"}createTags(){return[ie.InlineNode]}createNodeSpec(e,t){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` +`,...t,attrs:e.defaults(),parseDOM:[{tag:"br",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["br",e.dom(r)]}}createKeymap(){const e=L6(yu(V5),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":e,"Shift-Enter":e}}insertHardBreak(){return e=>{const{tr:t,dispatch:r}=e;return r==null||r(t.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};hO([Y()],xh.prototype,"insertHardBreak",1);xh=hO([ve({defaultPriority:Ve.Low})],xh);var cse=Object.defineProperty,use=Object.getOwnPropertyDescriptor,mO=(e,t,r,n)=>{for(var o=n>1?void 0:n?use(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cse(t,r,o),o},{LABEL:dse}=aN,fse={icon:({attrs:e})=>`h${(e==null?void 0:e.level)??"1"}`,label:({t:e,attrs:t})=>e({...dse,values:{level:t==null?void 0:t.level}})},pse=[j.H1,j.H2,j.H3,j.H4,j.H5,j.H6],wh=class extends nr{get name(){return"heading"}createTags(){return[ie.Block,ie.TextBlock,ie.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(r=>({tag:`h${r}`,getAttrs:n=>({...e.parse(n),level:r})})),...t.parseDOM??[]],toDOM:r=>this.options.levels.includes(r.attrs.level)?[`h${r.attrs.level}`,e.dom(r),0]:[`h${this.options.defaultLevel}`,e.dom(r),0]}}toggleHeading(e={}){return Qv({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(we),r=te(),n=[];for(const o of this.options.levels){const i=pse[o-1]??j.H1;r[i]=Fu(this.type,{level:o}),n.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:n}),r}createInputRules(){return this.options.levels.map(e=>RN(new RegExp(`^(#{1,${e}})\\s$`),this.type,()=>({level:e})))}createPasteRules(){return this.options.levels.map(e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0}))}};mO([Y(fse)],wh.prototype,"toggleHeading",1);wh=mO([ve({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],wh);var hse=Object.defineProperty,mse=Object.getOwnPropertyDescriptor,gO=(e,t,r,n)=>{for(var o=n>1?void 0:n?mse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hse(t,r,o),o},gse={icon:"separator",label:({t:e})=>e(xx.LABEL),description:({t:e})=>e(xx.DESCRIPTION)},Sh=class extends nr{get name(){return"horizontalRule"}createTags(){return[ie.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:r=>["hr",e.dom(r)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:r}=e,n=t.selection.$anchor,o=n.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(r&&(t.selection.empty&&Uh(o)&&t.insert(n.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),r(t.scrollIntoView())),!0)}}createInputRules(){return[I5({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Dd(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:r}=this.options;if(!r)return;const n=this.store.schema.nodes[r];re(n,{code:H.EXTENSION,message:`'${r}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=n.create();e.insert(t,o),e.setSelection(ue.near(e.doc.resolve(t+1)))}};gO([Y(gse)],Sh.prototype,"insertHorizontalRule",1);Sh=gO([ve({defaultOptions:{insertionNode:"paragraph"}})],Sh);var vse=Object.defineProperty,yse=Object.getOwnPropertyDescriptor,Ek=(e,t,r,n)=>{for(var o=n>1?void 0:n?yse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&vse(t,r,o),o},bse=class extends ose{constructor(e,t,r){super({node:e,view:t,getPos:r,aspectRatio:pO.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),ur(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},wd=class extends nr{get name(){return"image"}createTags(){return[ie.InlineNode,ie.Media]}createNodeSpec(e,t){const{preferPastedTextContent:r}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:n=>{var o;if(kt(n)){const i=xse({element:n,parse:e.parse});return r&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:n=>{const o=Kh(n.attrs,e);return["img",{...e.dom(n),...o}]}}}insertImage(e,t){return({tr:r,dispatch:n})=>{const{from:o,to:i}=Pn(t??r.selection,r.doc),s=this.type.create(e);return n==null||n(r.replaceRangeWith(o,i,s)),!0}}uploadImage(e,t){const{updatePlaceholder:r,destroyPlaceholder:n,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let a=s.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return a},createElement:(l,c)=>{const u=o(l,c);return t==null||t(u),u},onUpdate:(l,c,u,d)=>{r(l,c,u,d)},onDestroy:(l,c)=>{n(l,c)}},onSuccess:(l,c,u)=>this.insertImage(l,c)(u)}).validate(({tr:l,dispatch:c})=>{const u=ME(l.doc,a,this.type);return u==null?!1:(a=u,l.selection.empty||c==null||c(l.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,r){var n;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&Ese(t)&&((n=t.clipboardData)!=null&&n.getData("text/plain")))return!1;const{commands:s,chain:a}=this.store,l=e.map((u,d)=>({file:u,progress:f=>{s.updatePlaceholder(c[d],f)}})),c=i(l);hn(r)&&a.selectText(r);for(const u of c)a.uploadImage(u);return a.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t=e.type==="drop"?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,r)=>new bse(e,t,r):{}}};Ek([Y()],wd.prototype,"insertImage",1);Ek([Y()],wd.prototype,"uploadImage",1);wd=Ek([ve({defaultOptions:{createPlaceholder:wse,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Sse,enableResizing:!1,preferPastedTextContent:!0}})],wd);function kse(e){let{width:t,height:r}=e.style;return t=t||e.getAttribute("width")||"",r=r||e.getAttribute("height")||"",{width:t,height:r}}function xse({element:e,parse:t}){const{width:r,height:n}=kse(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(n||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(r||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function wse(e,t){const r=document.createElement("div");return r.classList.add(YF.IMAGE_LOADER),r}function Sse(e){re(e.length>0,{code:H.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const r=[];for(const{file:n,progress:o}of e)r.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",a=>{var l;t+=1,o(t/e.length),i({src:(l=a.target)==null?void 0:l.result,fileName:n.name})},{once:!0}),s.readAsDataURL(n)}));return r}function Ese(e){return e.clipboardData!==void 0}var Cse=Object.defineProperty,Mse=Object.getOwnPropertyDescriptor,Ck=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Cse(t,r,o),o},Tse={icon:"italic",label:({t:e})=>e(wx.LABEL),description:({t:e})=>e(wx.DESCRIPTION)},Sd=class extends vs{get name(){return"italic"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:r=>["em",e.dom(r),0]}}createKeymap(){return{"Mod-i":ss({type:this.type})}}createInputRules(){return[Vu({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Vu({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return ss({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};Ck([Y(Tse)],Sd.prototype,"toggleItalic",1);Ck([_t({shortcut:j.Italic,command:"toggleItalic"})],Sd.prototype,"shortcut",1);Sd=Ck([ve({})],Sd);var vO={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:Pu,function(){return function(r){function n(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}var o={};return n.m=r,n.c=o,n.d=function(i,s,a){n.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:a})},n.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(s,"a",s),s},n.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},n.p="",n(n.s=0)}([function(r,n,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(c){typeof c!="string"&&i();for(var u=0,d=0,f=0,p=c.length,h=0;p--&&++h&&!(u&&-1f?"":c.slice(f,u)}var a=["/",":","?","#"],l=[".","/","@"];r.exports=function(c){if(typeof c=="string")return s(c);if(Array.isArray(c)){var u=[],d,f=0;for(d=c.length;f{for(var o=n>1?void 0:n?Rse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ase(t,r,o),o},Nse=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],dS="updateLink",Pse=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,ka=class extends vs{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[ie.Link,ie.ExcludeInputRules]}createMarkSpec(e,t){const r="data-link-auto",n=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,a=i?[...s,i]:s;return o&&Er(a,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!kt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,a=this.options.autoLink&&(o.hasAttribute(r)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...e.parse(o),href:i,auto:a,...n(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...a}=Kh(o.attrs,e),l=o.attrs.auto?{[r]:""}:{},c="noopener noreferrer nofollow";return["a",{...e.dom(o),...a,rel:c,...l,...n(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:r,to:n,empty:o,$from:i}=e.selection,s=!1;const a=ni(i,this.type);if(o){const l=a??O5(e);if(!l)return!1;({text:t,from:r,to:n}=l),s=!0}return r===n?!1:(s||(t=e.doc.textBetween(r,n)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:a?{attrs:a.mark.attrs,from:a.from,to:a.to}:void 0,selectedText:t,from:r,to:n}),!0)}updateLink(e,t){return r=>{const{tr:n}=r;return!(gs(n.selection)&&!Gv(n.selection)||Q6(n.selection)||Np({trState:n,type:this.type}))&&!t?!1:(n.setMeta(this.name,{command:dS,attrs:e,range:t}),bz({type:this.type,attrs:e,range:t})(r))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:r}=t;return Np({trState:r,type:this.type,...e})?L5({type:this.type,expand:!0,range:e})(t):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref(gl(e)),auto:!t}),transformMatch:e=>{const t=gl(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const r=t.getMark(this.type);if(!r)return;const n=r.mark.attrs,o={...n,...r};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=n.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(r)),i}}}createPlugin(){return{appendTransaction:(e,t,r)=>{if(e.filter(p=>!!p.getMeta(this.name)).forEach(p=>{const h=p.getMeta(this.name);if(h.command===dS){const{range:m,attrs:b}=h,{selection:v,doc:g}=r,y={range:m,selection:v,doc:g,attrs:b},{from:k,to:x}=m??v;this.options.onUpdateLink(g.textBetween(k,x),y)}}),!this.options.autoLink||Y0(t)-Y0(r)===1||!e.some(p=>p.docChanged))return;const s=D6(e,t),a=T5(s,[St,Vt]),{mapping:l}=s,{tr:c,doc:u}=r,{updateLink:d,removeLink:f}=this.store.chain(c);if(a.forEach(({prevFrom:p,prevTo:h,from:m,to:b})=>{const v=[],g=b-m===2,y=this.getLinkMarksInRange(t.doc,p,h,!0).filter(k=>k.mark.type===this.type).map(({from:k,to:x,text:w})=>({mappedFrom:l.map(k),mappedTo:l.map(x),text:w,from:k,to:x}));y.forEach(({mappedFrom:k,mappedTo:x,from:w,to:E},M)=>this.getLinkMarksInRange(u,k,x,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const T=t.doc.textBetween(w,E,void 0," "),R=u.textBetween(C.from,C.to+1,void 0," ").trim(),z=this.isValidUrl(T);this.isValidUrl(R)||(z&&(f({from:C.from,to:C.to}).tr(),y.splice(M,1)),!g&&m===b&&this.findAutoLinks(R).map(F=>this.addLinkProperties({...F,from:k+F.start,to:k+F.end})).forEach(({attrs:F,range:V,text:L})=>{d(F,V).tr(),v.push({attrs:F,range:V,text:L})}))})),this.findTextBlocksInRange(u,{from:m,to:b}).forEach(({text:k,positionStart:x})=>{this.findAutoLinks(k).map(w=>this.addLinkProperties({...w,from:x+w.start+1,to:x+w.end+1})).filter(({range:w})=>{const E=m>=w.from&&m<=w.to,M=b>=w.from&&b<=w.to;return E||M||g}).filter(({range:w})=>this.getLinkMarksInRange(c.doc,w.from,w.to,!1).length===0).filter(({range:{from:w},text:E})=>!y.some(({text:M,mappedFrom:C})=>C===w&&M===E)).forEach(({attrs:w,text:E,range:M})=>{d(w,M).tr(),v.push({attrs:w,range:M,text:E})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:k,range:x,text:w})=>{const{doc:E,selection:M}=c;this.options.onUpdateLink(w,{attrs:k,doc:E,range:x,selection:M})})})}),c.steps.length!==0)return c}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,r,n){const o=[];if(t===r){const i=Math.max(t-1,0),s=e.resolve(i),a=ni(s,this.type);(a==null?void 0:a.mark.attrs.auto)===n&&o.push(a)}else e.nodesBetween(t,r,(i,s)=>{const l=(i.marks??[]).find(({type:c,attrs:u})=>c===this.type&&u.auto===n);l&&o.push({from:s,to:s+i.nodeSize,mark:l,text:i.textContent})});return o}findTextBlocksInRange(e,t){const r=[];return e.nodesBetween(t.from,t.to,(n,o)=>{!n.isTextblock||!n.type.allowsMarkType(this.type)||r.push({node:n,pos:o})}),r.map(n=>({text:e.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," "),positionStart:n.pos}))}addLinkProperties({from:e,to:t,href:r,...n}){return{...n,range:{from:e,to:t},attrs:{href:r,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const r of rc(e,this.options.autoLinkRegex)){const n=gl(r);if(!n)continue;const o=this.buildHref(n);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:n,href:o,start:r.index,end:r.index+n.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!((t=this._autoLinkRegexNonGlobal)!=null&&t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(t.length===0)return!0;const r=_se(e);if(r==="")return!0;const n=pA(r.split("."));return t.includes(n)}};Qd([_t({shortcut:j.InsertLink})],ka.prototype,"shortcut",1);Qd([Y()],ka.prototype,"updateLink",1);Qd([Y()],ka.prototype,"selectLink",1);Qd([Y()],ka.prototype,"removeLink",1);ka=Qd([ve({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Pse,autoLinkAllowedTLDs:Nse,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:zse},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:Ve.Medium})],ka);function zse({url:e,defaultProtocol:t}){const r=/^((?:https?|ftp)?:)\/\//.test(e);return!r&&e.includes("@")?`mailto:${e}`:r?e:`${t}//${e}`}function Lse(e){for(var t=1;t0&&e[t-1]===` +`;)t--;return e.substring(0,t)}var $se=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Mk(e){return Tk(e,$se)}var yO=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function bO(e){return Tk(e,yO)}function Hse(e){return xO(e,yO)}var kO=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Bse(e){return Tk(e,kO)}function Fse(e){return xO(e,kO)}function Tk(e,t){return t.indexOf(e.nodeName)>=0}function xO(e,t){return e.getElementsByTagName&&t.some(function(r){return e.getElementsByTagName(r).length})}var gr={};gr.paragraph={filter:"p",replacement:function(e){return` `+e+` -`}};dr.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+` -`}};dr.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var o=Z0(n===1?"=":"-",e.length);return` +`}};gr.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+` +`}};gr.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var n=Number(t.nodeName.charAt(1));if(r.headingStyle==="setext"&&n<3){var o=yv(n===1?"=":"-",e.length);return` `+e+` `+o+` `}else return` -`+Z0("#",n)+" "+e+` +`+yv("#",n)+" "+e+` -`}};dr.blockquote={filter:"blockquote",replacement:function(e){return e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^/gm,"> "),` +`}};gr.blockquote={filter:"blockquote",replacement:function(e){return e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^/gm,"> "),` `+e+` -`}};dr.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return r.nodeName==="LI"&&r.lastElementChild===t?` +`}};gr.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return r.nodeName==="LI"&&r.lastElementChild===t?` `+e:` `+e+` -`}};dr.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,` +`}};gr.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,` `).replace(/\n/gm,` `);var n=r.bulletListMarker+" ",o=t.parentNode;if(o.nodeName==="OL"){var i=o.getAttribute("start"),s=Array.prototype.indexOf.call(o.children,t);n=(i?Number(i)+s:s+1)+". "}return n+e+(t.nextSibling&&!/\n$/.test(e)?` -`:"")}};dr.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){return` +`:"")}};gr.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){return` `+t.firstChild.textContent.replace(/\n/g,` `)+` -`}};dr.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){for(var n=t.firstChild.getAttribute("class")||"",o=(n.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),a=3,l=new RegExp("^"+s+"{3,}","gm"),c;c=l.exec(i);)c[0].length>=a&&(a=c[0].length+1);var u=Z0(s,a);return` +`}};gr.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){for(var n=t.firstChild.getAttribute("class")||"",o=(n.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),a=3,l=new RegExp("^"+s+"{3,}","gm"),c;c=l.exec(i);)c[0].length>=a&&(a=c[0].length+1);var u=yv(s,a);return` `+u+o+` `+i.replace(/\n$/,"")+` `+u+` -`}};dr.horizontalRule={filter:"hr",replacement:function(e,t,r){return` +`}};gr.horizontalRule={filter:"hr",replacement:function(e,t,r){return` `+r.hr+` -`}};dr.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),n=dh(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}};dr.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,r){var n=t.getAttribute("href"),o=dh(t.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(r.linkReferenceStyle){case"collapsed":i="["+e+"][]",s="["+e+"]: "+n+o;break;case"shortcut":i="["+e+"]",s="["+e+"]: "+n+o;break;default:var a=this.references.length+1;i="["+e+"]["+a+"]",s="["+a+"]: "+n+o}return this.references.push(s),i},references:[],append:function(e){var t="";return this.references.length&&(t=` +`}};gr.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),n=Eh(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}};gr.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,r){var n=t.getAttribute("href"),o=Eh(t.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(r.linkReferenceStyle){case"collapsed":i="["+e+"][]",s="["+e+"]: "+n+o;break;case"shortcut":i="["+e+"]",s="["+e+"]: "+n+o;break;default:var a=this.references.length+1;i="["+e+"]["+a+"]",s="["+a+"]: "+n+o}return this.references.push(s),i},references:[],append:function(e){var t="";return this.references.length&&(t=` `+this.references.join(` `)+` -`,this.references=[]),t}};dr.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}};dr.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}};dr.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+t+e+t+r}};dr.image={filter:"img",replacement:function(e,t){var r=dh(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=dh(t.getAttribute("title")),i=o?' "'+o+'"':"";return n?"!["+r+"]("+n+i+")":""}};function dh(e){return e?e.replace(/(\n+\s*)+/g,` -`):""}function JT(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}JT.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=t1(this.array,e,this.options))||(t=t1(this._keep,e,this.options))||(t=t1(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t-1)return!0}else if(typeof n=="function"){if(n.call(e,t,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function fse(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(d){return d.nodeName==="PRE"};if(!(!t.firstChild||o(t))){for(var i=null,s=!1,a=null,l=U4(a,t,o);l!==t;){if(l.nodeType===3||l.nodeType===4){var c=l.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&c[0]===" "&&(c=c.substr(1)),!c){l=r1(l);continue}l.data=c,i=l}else if(l.nodeType===1)r(l)||l.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):n(l)||o(l)?(i=null,s=!0):i&&(s=!1);else{l=r1(l);continue}var u=U4(a,l,o);a=l,l=u}i&&(i.data=i.data.replace(/ $/,""),i.data||r1(i))}}function r1(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function U4(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var XT=typeof window<"u"?window:{};function pse(){var e=XT.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function hse(){var e=function(){};return mse()?e.prototype.parseFromString=function(t){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(t),r.close(),r}:e.prototype.parseFromString=function(t){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(t),r.close(),r},e}function mse(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(e=!0)}return e}var gse=pse()?XT.DOMParser:hse();function vse(e,t){var r;if(typeof e=="string"){var n=yse().parseFromString(''+e+"","text/html");r=n.getElementById("turndown-root")}else r=e.cloneNode(!0);return fse({element:r,isBlock:ik,isVoid:qT,isPre:t.preformattedCode?bse:null}),r}var n1;function yse(){return n1=n1||new gse,n1}function bse(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function kse(e,t){return e.isBlock=ik(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=xse(e),e.flankingWhitespace=wse(e,t),e}function xse(e){return!qT(e)&&!cse(e)&&/^\s*$/i.test(e.textContent)&&!lse(e)&&!use(e)}function wse(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=Sse(e.textContent);return r.leadingAscii&&W4("left",e,t)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&W4("right",e,t)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}function Sse(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function W4(e,t,r){var n,o,i;return e==="left"?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(n.nodeType===3?i=o.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?i=!1:n.nodeType===1&&!ik(n)&&(i=o.test(n.textContent))),i}var Ese=Array.prototype.reduce,Cse=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function hd(e){if(!(this instanceof hd))return new hd(e);var t={rules:dr,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(r,n){return n.isBlock?` +`,this.references=[]),t}};gr.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}};gr.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}};gr.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];n.indexOf(r)!==-1;)r=r+"`";return r+t+e+t+r}};gr.image={filter:"img",replacement:function(e,t){var r=Eh(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=Eh(t.getAttribute("title")),i=o?' "'+o+'"':"";return n?"!["+r+"]("+n+i+")":""}};function Eh(e){return e?e.replace(/(\n+\s*)+/g,` +`):""}function wO(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}wO.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=k1(this.array,e,this.options))||(t=k1(this._keep,e,this.options))||(t=k1(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t-1)return!0}else if(typeof n=="function"){if(n.call(e,t,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function jse(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(d){return d.nodeName==="PRE"};if(!(!t.firstChild||o(t))){for(var i=null,s=!1,a=null,l=fS(a,t,o);l!==t;){if(l.nodeType===3||l.nodeType===4){var c=l.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&c[0]===" "&&(c=c.substr(1)),!c){l=x1(l);continue}l.data=c,i=l}else if(l.nodeType===1)r(l)||l.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):n(l)||o(l)?(i=null,s=!0):i&&(s=!1);else{l=x1(l);continue}var u=fS(a,l,o);a=l,l=u}i&&(i.data=i.data.replace(/ $/,""),i.data||x1(i))}}function x1(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function fS(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var SO=typeof window<"u"?window:{};function Use(){var e=SO.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function Wse(){var e=function(){};return Kse()?e.prototype.parseFromString=function(t){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(t),r.close(),r}:e.prototype.parseFromString=function(t){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(t),r.close(),r},e}function Kse(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(e=!0)}return e}var qse=Use()?SO.DOMParser:Wse();function Gse(e,t){var r;if(typeof e=="string"){var n=Yse().parseFromString(''+e+"","text/html");r=n.getElementById("turndown-root")}else r=e.cloneNode(!0);return jse({element:r,isBlock:Mk,isVoid:bO,isPre:t.preformattedCode?Xse:null}),r}var w1;function Yse(){return w1=w1||new qse,w1}function Xse(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function Jse(e,t){return e.isBlock=Mk(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=Qse(e),e.flankingWhitespace=Zse(e,t),e}function Qse(e){return!bO(e)&&!Bse(e)&&/^\s*$/i.test(e.textContent)&&!Hse(e)&&!Fse(e)}function Zse(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=eae(e.textContent);return r.leadingAscii&&pS("left",e,t)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&pS("right",e,t)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}function eae(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function pS(e,t,r){var n,o,i;return e==="left"?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(n.nodeType===3?i=o.test(n.nodeValue):r.preformattedCode&&n.nodeName==="CODE"?i=!1:n.nodeType===1&&!Mk(n)&&(i=o.test(n.textContent))),i}var tae=Array.prototype.reduce,rae=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Ed(e){if(!(this instanceof Ed))return new Ed(e);var t={rules:gr,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(r,n){return n.isBlock?` `:""},keepReplacement:function(r,n){return n.isBlock?` @@ -4928,22 +4928,22 @@ Error generating stack: `+i.message+` `+r+` -`:r}};this.options=ose({},t,e),this.rules=new JT(this.options)}hd.prototype={turndown:function(e){if(!Ose(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=QT.call(this,new vse(e,this.options));return Mse.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t"']/,Ase=new RegExp(tO.source,"g"),rO=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Nse=new RegExp(rO.source,"g"),Rse={"&":"&","<":"<",">":">",'"':""","'":"'"},K4=e=>Rse[e];function ar(e,t){if(t){if(tO.test(e))return e.replace(Ase,K4)}else if(rO.test(e))return e.replace(Nse,K4);return e}const Pse=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function nO(e){return e.replace(Pse,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const zse=/(^|[^\[])\^/g;function Ve(e,t){e=typeof e=="string"?e:e.source,t=t||"";const r={replace:(n,o)=>(o=o.source||o,o=o.replace(zse,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}const Lse=/[^\w:]/g,Ise=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function q4(e,t,r){if(e){let n;try{n=decodeURIComponent(nO(r)).replace(Lse,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}t&&!Ise.test(r)&&(r=Bse(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const xf={},Dse=/^[^:]+:\/*[^/]*$/,$se=/^([^:]+:)[\s\S]*$/,Hse=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Bse(e,t){xf[" "+e]||(Dse.test(e)?xf[" "+e]=e+"/":xf[" "+e]=tp(e,"/",!0)),e=xf[" "+e];const r=e.indexOf(":")===-1;return t.substring(0,2)==="//"?r?t:e.replace($se,"$1")+t:t.charAt(0)==="/"?r?t:e.replace(Hse,"$1")+t:e+t}const fh={exec:function(){}};function G4(e,t){const r=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function J4(e,t,r,n){const o=t.href,i=t.title?ar(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){n.state.inLink=!0;const a={type:"link",raw:r,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,a}return{type:"image",raw:r,href:o,title:i,text:ar(s)}}function jse(e,t){const r=e.match(/^(\s+)(?:```)/);if(r===null)return t;const n=r[1];return t.split(` +`.substring(0,o);return r+i+n}function iae(e){return e!=null&&(typeof e=="string"||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}function MO(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Oa=MO();function sae(e){Oa=e}const TO=/[&<>"']/,aae=new RegExp(TO.source,"g"),OO=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,lae=new RegExp(OO.source,"g"),cae={"&":"&","<":"<",">":">",'"':""","'":"'"},hS=e=>cae[e];function fr(e,t){if(t){if(TO.test(e))return e.replace(aae,hS)}else if(OO.test(e))return e.replace(lae,hS);return e}const uae=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _O(e){return e.replace(uae,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const dae=/(^|[^\[])\^/g;function qe(e,t){e=typeof e=="string"?e:e.source,t=t||"";const r={replace:(n,o)=>(o=o.source||o,o=o.replace(dae,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}const fae=/[^\w:]/g,pae=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function mS(e,t,r){if(e){let n;try{n=decodeURIComponent(_O(r)).replace(fae,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}t&&!pae.test(r)&&(r=vae(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Pf={},hae=/^[^:]+:\/*[^/]*$/,mae=/^([^:]+:)[\s\S]*$/,gae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function vae(e,t){Pf[" "+e]||(hae.test(e)?Pf[" "+e]=e+"/":Pf[" "+e]=hp(e,"/",!0)),e=Pf[" "+e];const r=e.indexOf(":")===-1;return t.substring(0,2)==="//"?r?t:e.replace(mae,"$1")+t:t.charAt(0)==="/"?r?t:e.replace(gae,"$1")+t:e+t}const Ch={exec:function(){}};function gS(e,t){const r=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function yS(e,t,r,n){const o=t.href,i=t.title?fr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){n.state.inLink=!0;const a={type:"link",raw:r,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,a}return{type:"image",raw:r,href:o,title:i,text:fr(s)}}function kae(e,t){const r=e.match(/^(\s+)(?:```)/);if(r===null)return t;const n=r[1];return t.split(` `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=n.length?o.slice(n.length):o}).join(` -`)}class ak{constructor(t){this.options=t||ba}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:tp(n,` -`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],o=jse(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){const o=tp(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){const n=r[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n,o,i,s,a,l,c,u,d,f,p,h,m=r[1].trim();const b=m.length>1,v={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(h=!1,!(!(r=g.exec(t))||this.rules.block.hr.test(t)));){if(n=r[0],t=t.substring(n.length),u=r[2].split(` +`)}class Ok{constructor(t){this.options=t||Oa}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:hp(n,` +`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],o=kae(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){const o=hp(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){const n=r[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n,o,i,s,a,l,c,u,d,f,p,h,m=r[1].trim();const b=m.length>1,v={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(h=!1,!(!(r=g.exec(t))||this.rules.block.hr.test(t)));){if(n=r[0],t=t.substring(n.length),u=r[2].split(` `,1)[0].replace(/^\t+/,k=>" ".repeat(3*k.length)),d=t.split(` `,1)[0],this.options.pedantic?(s=2,p=u.trimLeft()):(s=r[2].search(/[^ ]/),s=s>4?1:s,p=u.slice(s),s+=r[1].length),l=!1,!u&&/^ *$/.test(d)&&(n+=d+` `,t=t.substring(d.length+1),h=!0),!h){const k=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;t&&(f=t.split(` `,1)[0],d=f,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(w.test(d)||E.test(d)||k.test(d)||x.test(t)));){if(d.search(/[^ ]/)>=s||!d.trim())p+=` `+d.slice(s);else{if(l||u.search(/[^ ]/)>=4||w.test(u)||E.test(u)||x.test(u))break;p+=` `+d}!l&&!d.trim()&&(l=!0),n+=f+` -`,t=t.substring(f.length+1),u=d.slice(s)}}v.loose||(c?v.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(p),o&&(i=o[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:n,task:!!o,checked:i,loose:!1,text:p}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=p.trimRight(),v.raw=v.raw.trimRight();const y=v.items.length;for(a=0;aw.type==="space"),x=k.length>0&&k.some(w=>/\n.*\n/.test(w.raw));v.loose=x}if(v.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){const r=this.rules.block.table.exec(t);if(r){const n={type:"table",header:G4(r[1]).map(o=>({text:o})),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(n.header.length===n.align.length){n.raw=r[0];let o=n.align.length,i,s,a,l;for(i=0;i({text:c}));for(o=n.header.length,s=0;s/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):ar(r[0]):r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=tp(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Fse(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),J4(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return J4(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(n===""||this.rules.inline.punctuation.exec(n))){const s=o[0].length-1;let a,l,c=s,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(o=d.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=a.length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=t.slice(0,s+o.index+(o[0].length-a.length)+l);if(Math.min(s,l)%2){const h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," ");const o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=ar(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t,r){const n=this.rules.inline.autolink.exec(t);if(n){let o,i;return n[2]==="@"?(o=ar(this.options.mangle?r(n[1]):n[1]),i="mailto:"+o):(o=ar(n[1]),i=o),{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t,r){let n;if(n=this.rules.inline.url.exec(t)){let o,i;if(n[2]==="@")o=ar(this.options.mangle?r(n[0]):n[0]),i="mailto:"+o;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(s!==n[0]);o=ar(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t,r){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):ar(n[0]):n[0]:o=ar(this.options.smartypants?r(n[0]):n[0]),{type:"text",raw:n[0],text:o}}}}const ae={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:fh,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};ae._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ae._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ae.def=Ve(ae.def).replace("label",ae._label).replace("title",ae._title).getRegex();ae.bullet=/(?:[*+-]|\d{1,9}[.)])/;ae.listItemStart=Ve(/^( *)(bull) */).replace("bull",ae.bullet).getRegex();ae.list=Ve(ae.list).replace(/bull/g,ae.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ae.def.source+")").getRegex();ae._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";ae._comment=/|$)/;ae.html=Ve(ae.html,"i").replace("comment",ae._comment).replace("tag",ae._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ae.paragraph=Ve(ae._paragraph).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ae._tag).getRegex();ae.blockquote=Ve(ae.blockquote).replace("paragraph",ae.paragraph).getRegex();ae.normal={...ae};ae.gfm={...ae.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};ae.gfm.table=Ve(ae.gfm.table).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ae._tag).getRegex();ae.gfm.paragraph=Ve(ae._paragraph).replace("hr",ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ae.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ae._tag).getRegex();ae.pedantic={...ae.normal,html:Ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ae._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ve(ae.normal._paragraph).replace("hr",ae.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",ae.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fh,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:fh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";Q.punctuation=Ve(Q.punctuation).replace(/punctuation/g,Q._punctuation).getRegex();Q.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;Q.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;Q._comment=Ve(ae._comment).replace("(?:-->|$)","-->").getRegex();Q.emStrong.lDelim=Ve(Q.emStrong.lDelim).replace(/punct/g,Q._punctuation).getRegex();Q.emStrong.rDelimAst=Ve(Q.emStrong.rDelimAst,"g").replace(/punct/g,Q._punctuation).getRegex();Q.emStrong.rDelimUnd=Ve(Q.emStrong.rDelimUnd,"g").replace(/punct/g,Q._punctuation).getRegex();Q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;Q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Q._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Q.autolink=Ve(Q.autolink).replace("scheme",Q._scheme).replace("email",Q._email).getRegex();Q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Q.tag=Ve(Q.tag).replace("comment",Q._comment).replace("attribute",Q._attribute).getRegex();Q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Q._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Q.link=Ve(Q.link).replace("label",Q._label).replace("href",Q._href).replace("title",Q._title).getRegex();Q.reflink=Ve(Q.reflink).replace("label",Q._label).replace("ref",ae._label).getRegex();Q.nolink=Ve(Q.nolink).replace("ref",ae._label).getRegex();Q.reflinkSearch=Ve(Q.reflinkSearch,"g").replace("reflink",Q.reflink).replace("nolink",Q.nolink).getRegex();Q.normal={...Q};Q.pedantic={...Q.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ve(/^!?\[(label)\]\((.*?)\)/).replace("label",Q._label).getRegex(),reflink:Ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q._label).getRegex()};Q.gfm={...Q.normal,escape:Ve(Q.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),t+="&#"+n+";";return t}class ns{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ba,this.options.tokenizer=this.options.tokenizer||new ak,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={block:ae.normal,inline:Q.normal};this.options.pedantic?(r.block=ae.pedantic,r.inline=Q.pedantic):this.options.gfm&&(r.block=ae.gfm,this.options.breaks?r.inline=Q.breaks:r.inline=Q.gfm),this.tokenizer.rules=r}static get rules(){return{block:ae,inline:Q}}static lex(t,r){return new ns(r).lex(t)}static lexInline(t,r){return new ns(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` +`,t=t.substring(f.length+1),u=d.slice(s)}}v.loose||(c?v.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(p),o&&(i=o[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:n,task:!!o,checked:i,loose:!1,text:p}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=p.trimRight(),v.raw=v.raw.trimRight();const y=v.items.length;for(a=0;aw.type==="space"),x=k.length>0&&k.some(w=>/\n.*\n/.test(w.raw));v.loose=x}if(v.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){const r=this.rules.block.table.exec(t);if(r){const n={type:"table",header:gS(r[1]).map(o=>({text:o})),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(n.header.length===n.align.length){n.raw=r[0];let o=n.align.length,i,s,a,l;for(i=0;i({text:c}));for(o=n.header.length,s=0;s/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):fr(r[0]):r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=hp(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=yae(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),yS(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yS(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(n===""||this.rules.inline.punctuation.exec(n))){const s=o[0].length-1;let a,l,c=s,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(o=d.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=a.length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=t.slice(0,s+o.index+(o[0].length-a.length)+l);if(Math.min(s,l)%2){const h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," ");const o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=fr(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t,r){const n=this.rules.inline.autolink.exec(t);if(n){let o,i;return n[2]==="@"?(o=fr(this.options.mangle?r(n[1]):n[1]),i="mailto:"+o):(o=fr(n[1]),i=o),{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t,r){let n;if(n=this.rules.inline.url.exec(t)){let o,i;if(n[2]==="@")o=fr(this.options.mangle?r(n[0]):n[0]),i="mailto:"+o;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(s!==n[0]);o=fr(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t,r){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):fr(n[0]):n[0]:o=fr(this.options.smartypants?r(n[0]):n[0]),{type:"text",raw:n[0],text:o}}}}const ce={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ch,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ce.def=qe(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex();ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;ce.listItemStart=qe(/^( *)(bull) */).replace("bull",ce.bullet).getRegex();ce.list=qe(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex();ce._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";ce._comment=/|$)/;ce.html=qe(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ce.paragraph=qe(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.blockquote=qe(ce.blockquote).replace("paragraph",ce.paragraph).getRegex();ce.normal={...ce};ce.gfm={...ce.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};ce.gfm.table=qe(ce.gfm.table).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.gfm.paragraph=qe(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ce.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.pedantic={...ce.normal,html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ch,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qe(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ch,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ch,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";Z.punctuation=qe(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex();Z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;Z.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;Z._comment=qe(ce._comment).replace("(?:-->|$)","-->").getRegex();Z.emStrong.lDelim=qe(Z.emStrong.lDelim).replace(/punct/g,Z._punctuation).getRegex();Z.emStrong.rDelimAst=qe(Z.emStrong.rDelimAst,"g").replace(/punct/g,Z._punctuation).getRegex();Z.emStrong.rDelimUnd=qe(Z.emStrong.rDelimUnd,"g").replace(/punct/g,Z._punctuation).getRegex();Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Z.autolink=qe(Z.autolink).replace("scheme",Z._scheme).replace("email",Z._email).getRegex();Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Z.tag=qe(Z.tag).replace("comment",Z._comment).replace("attribute",Z._attribute).getRegex();Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Z.link=qe(Z.link).replace("label",Z._label).replace("href",Z._href).replace("title",Z._title).getRegex();Z.reflink=qe(Z.reflink).replace("label",Z._label).replace("ref",ce._label).getRegex();Z.nolink=qe(Z.nolink).replace("ref",ce._label).getRegex();Z.reflinkSearch=qe(Z.reflinkSearch,"g").replace("reflink",Z.reflink).replace("nolink",Z.nolink).getRegex();Z.normal={...Z};Z.pedantic={...Z.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",Z._label).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z._label).getRegex()};Z.gfm={...Z.normal,escape:qe(Z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),t+="&#"+n+";";return t}class fs{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Oa,this.options.tokenizer=this.options.tokenizer||new Ok,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={block:ce.normal,inline:Z.normal};this.options.pedantic?(r.block=ce.pedantic,r.inline=Z.pedantic):this.options.gfm&&(r.block=ce.gfm,this.options.breaks?r.inline=Z.breaks:r.inline=Z.gfm),this.tokenizer.rules=r}static get rules(){return{block:ce,inline:Z}}static lex(t,r){return new fs(r).lex(t)}static lexInline(t,r){return new fs(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` `),this.blockTokens(t,this.tokens);let r;for(;r=this.inlineQueue.shift();)this.inlineTokens(r.src,r.tokens);return this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,c)=>l+" ".repeat(c.length));let n,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+n.raw,o.text+=` @@ -4953,9 +4953,9 @@ Error generating stack: `+i.message+` `+n.raw,o.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n),s=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&o.type==="text"?(o.raw+=` `+n.raw,o.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+Y4("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+Y4("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index+a[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,s,c)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t,X4)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t,X4))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(n=this.tokenizer.inlineText(i,Use)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}}class lk{constructor(t){this.options=t||ba}code(t,r,n){const o=(r||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(t,o);i!=null&&i!==t&&(n=!0,t=i)}return t=t.replace(/\n$/,"")+` -`,o?'
'+(n?t:ar(t,!0))+`
-`:"
"+(n?t:ar(t,!0))+`
+`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+vS("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+vS("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index+a[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,s,c)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t,bS)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t,bS))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(n=this.tokenizer.inlineText(i,xae)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}}class _k{constructor(t){this.options=t||Oa}code(t,r,n){const o=(r||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(t,o);i!=null&&i!==t&&(n=!0,t=i)}return t=t.replace(/\n$/,"")+` +`,o?'
'+(n?t:fr(t,!0))+`
+`:"
"+(n?t:fr(t,!0))+`
`}blockquote(t){return`
${t}
`}html(t){return t}heading(t,r,n,o){if(this.options.headerIds){const i=this.options.headerPrefix+o.slug(n);return`${t} @@ -4973,31 +4973,31 @@ ${t} `}tablerow(t){return` ${t} `}tablecell(t,r){const n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
":"
"}del(t){return`${t}`}link(t,r,n){if(t=q4(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o='",o}image(t,r,n){if(t=q4(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o=`${n}":">",o}text(t){return t}}class oO{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}}class iO{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,r){let n=t,o=0;if(this.seen.hasOwnProperty(n)){o=this.seen[t];do o++,n=t+"-"+o;while(this.seen.hasOwnProperty(n))}return r||(this.seen[t]=o,this.seen[n]=0),n}slug(t,r={}){const n=this.serialize(t);return this.getNextSafeSlug(n,r.dryrun)}}class is{constructor(t){this.options=t||ba,this.options.renderer=this.options.renderer||new lk,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oO,this.slugger=new iO}static parse(t,r){return new is(r).parse(t)}static parseInline(t,r){return new is(r).parseInline(t)}parse(t,r=!0){let n="",o,i,s,a,l,c,u,d,f,p,h,m,b,v,g,y,k,x,w;const E=t.length;for(o=0;o0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=x+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=x+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:x}):v+=x),v+=this.parse(g.tokens,b),f+=this.renderer.listitem(v,k,y);n+=this.renderer.list(f,h,m);continue}case"html":{n+=this.renderer.html(p.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;o+1{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const o="

An error occurred:

"+ar(n.message+"",!0)+"
";if(t)return Promise.resolve(o);if(r){r(null,o);return}return o}if(t)return Promise.reject(n);if(r){r(n);return}throw n}}function sO(e,t){return(r,n,o)=>{typeof n=="function"&&(o=n,n=null);const i={...n};n={...se.defaults,...i};const s=Wse(n.silent,n.async,o);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(Vse(n),n.hooks&&(n.hooks.options=n),o){const a=n.highlight;let l;try{n.hooks&&(r=n.hooks.preprocess(r)),l=e(r,n)}catch(d){return s(d)}const c=function(d){let f;if(!d)try{n.walkTokens&&se.walkTokens(l,n.walkTokens),f=t(l,n),n.hooks&&(f=n.hooks.postprocess(f))}catch(p){d=p}return n.highlight=a,d?s(d):o(null,f)};if(!a||a.length<3||(delete n.highlight,!l.length))return c();let u=0;se.walkTokens(l,function(d){d.type==="code"&&(u++,setTimeout(()=>{a(d.text,d.lang,function(f,p){if(f)return c(f);p!=null&&p!==d.text&&(d.text=p,d.escaped=!0),u--,u===0&&c()})},0))}),u===0&&c();return}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(a=>e(a,n)).then(a=>n.walkTokens?Promise.all(se.walkTokens(a,n.walkTokens)).then(()=>a):a).then(a=>t(a,n)).then(a=>n.hooks?n.hooks.postprocess(a):a).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const a=e(r,n);n.walkTokens&&se.walkTokens(a,n.walkTokens);let l=t(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return s(a)}}}function se(e,t,r){return sO(ns.lex,is.parse)(e,t,r)}se.options=se.setOptions=function(e){return se.defaults={...se.defaults,...e},_se(se.defaults),se};se.getDefaults=eO;se.defaults=ba;se.use=function(...e){const t=se.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(r=>{const n={...r};if(n.async=se.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=t.renderers[o.name];i?t.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=i.apply(this,s)),a}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=se.defaults.renderer||new lk;for(const i in r.renderer){const s=o[i];o[i]=(...a)=>{let l=r.renderer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.renderer=o}if(r.tokenizer){const o=se.defaults.tokenizer||new ak;for(const i in r.tokenizer){const s=o[i];o[i]=(...a)=>{let l=r.tokenizer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.tokenizer=o}if(r.hooks){const o=se.defaults.hooks||new ph;for(const i in r.hooks){const s=o[i];ph.passThroughHooks.has(i)?o[i]=a=>{if(se.defaults.async)return Promise.resolve(r.hooks[i].call(o,a)).then(c=>s.call(o,c));const l=r.hooks[i].call(o,a);return s.call(o,l)}:o[i]=(...a)=>{let l=r.hooks[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.hooks=o}if(r.walkTokens){const o=se.defaults.walkTokens;n.walkTokens=function(i){let s=[];return s.push(r.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}se.setOptions(n)})};se.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(se,n)),n.type){case"table":{for(const o of n.header)r=r.concat(se.walkTokens(o.tokens,t));for(const o of n.rows)for(const i of o)r=r.concat(se.walkTokens(i.tokens,t));break}case"list":{r=r.concat(se.walkTokens(n.items,t));break}default:se.defaults.extensions&&se.defaults.extensions.childTokens&&se.defaults.extensions.childTokens[n.type]?se.defaults.extensions.childTokens[n.type].forEach(function(o){r=r.concat(se.walkTokens(n[o],t))}):n.tokens&&(r=r.concat(se.walkTokens(n.tokens,t)))}return r};se.parseInline=sO(ns.lexInline,is.parseInline);se.Parser=is;se.parser=is.parse;se.Renderer=lk;se.TextRenderer=oO;se.Lexer=ns;se.lexer=ns.lex;se.Tokenizer=ak;se.Slugger=iO;se.Hooks=ph;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;is.parse;ns.lex;var Kse=Object.defineProperty,qse=Object.getOwnPropertyDescriptor,Hm=(e,t,r,n)=>{for(var o=n>1?void 0:n?qse(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Kse(t,r,o),o},Gse=bh(hd);function Yse(e){return Xse.turndown(e)}function o1(e){const t=e.parentNode;if(!mt(t))return!1;if(t.nodeName==="THEAD")return!0;if(t.nodeName!=="TABLE"&&!aO(t))return!1;const r=[...e.childNodes];return r.every(n=>n.nodeName==="TH")&&r.some(n=>!!n.textContent)}function hh(e){return mt(e)&&e.matches("th[data-controller-cell]")}function Jse(e){const t=e.parentNode;return!mt(t)||t.nodeName!=="TABLE"&&!aO(t)?!1:[...e.childNodes].every(n=>hh(n))}function aO(e){var t;if(e.nodeName!=="TBODY")return!1;const r=e.previousSibling;return r?mt(r)&&r.nodeName==="THEAD"&&!((t=r.textContent)!=null&&t.trim()):!0}function Q4(e){const t=e.closest("table");if(!t)return!1;const{parentNode:r}=t;return r?!!r.closest("table"):!0}function Z4(e,t){var r;const n=[];for(const s of((r=t.parentNode)==null?void 0:r.childNodes)??[])hh(s)||n.push(s);return`${(n.indexOf(t)===0?"| ":" ")+e.trim()} |`}var Xse=new Gse({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:e=>e.nodeName==="LI"&&e.hasAttribute("data-task-list-item"),replacement:(e,t)=>`- ${t.hasAttribute("data-checked")?"[x]":"[ ]"} ${e.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(e,t)=>hh(t)?"":Z4(e,t)}).addRule("tableRow",{filter:"tr",replacement:(e,t)=>{let r="";const n={left:":--",right:"--:",center:":-:"},o=[...t.childNodes].filter(i=>!hh(i));if(o1(t))for(const i of o){if(!mt(i))continue;let s="---";const a=(i.getAttribute("align")??"").toLowerCase();a&&(s=n[a]||s),r+=Z4(s,i)}return` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
":"
"}del(t){return`${t}`}link(t,r,n){if(t=mS(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o='
",o}image(t,r,n){if(t=mS(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let o=`${n}":">",o}text(t){return t}}class AO{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}}class RO{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,r){let n=t,o=0;if(this.seen.hasOwnProperty(n)){o=this.seen[t];do o++,n=t+"-"+o;while(this.seen.hasOwnProperty(n))}return r||(this.seen[t]=o,this.seen[n]=0),n}slug(t,r={}){const n=this.serialize(t);return this.getNextSafeSlug(n,r.dryrun)}}class ps{constructor(t){this.options=t||Oa,this.options.renderer=this.options.renderer||new _k,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new AO,this.slugger=new RO}static parse(t,r){return new ps(r).parse(t)}static parseInline(t,r){return new ps(r).parseInline(t)}parse(t,r=!0){let n="",o,i,s,a,l,c,u,d,f,p,h,m,b,v,g,y,k,x,w;const E=t.length;for(o=0;o0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=x+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=x+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:x}):v+=x),v+=this.parse(g.tokens,b),f+=this.renderer.listitem(v,k,y);n+=this.renderer.list(f,h,m);continue}case"html":{n+=this.renderer.html(p.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;o+1{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const o="

An error occurred:

"+fr(n.message+"",!0)+"
";if(t)return Promise.resolve(o);if(r){r(null,o);return}return o}if(t)return Promise.reject(n);if(r){r(n);return}throw n}}function NO(e,t){return(r,n,o)=>{typeof n=="function"&&(o=n,n=null);const i={...n};n={...le.defaults,...i};const s=wae(n.silent,n.async,o);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(bae(n),n.hooks&&(n.hooks.options=n),o){const a=n.highlight;let l;try{n.hooks&&(r=n.hooks.preprocess(r)),l=e(r,n)}catch(d){return s(d)}const c=function(d){let f;if(!d)try{n.walkTokens&&le.walkTokens(l,n.walkTokens),f=t(l,n),n.hooks&&(f=n.hooks.postprocess(f))}catch(p){d=p}return n.highlight=a,d?s(d):o(null,f)};if(!a||a.length<3||(delete n.highlight,!l.length))return c();let u=0;le.walkTokens(l,function(d){d.type==="code"&&(u++,setTimeout(()=>{a(d.text,d.lang,function(f,p){if(f)return c(f);p!=null&&p!==d.text&&(d.text=p,d.escaped=!0),u--,u===0&&c()})},0))}),u===0&&c();return}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(a=>e(a,n)).then(a=>n.walkTokens?Promise.all(le.walkTokens(a,n.walkTokens)).then(()=>a):a).then(a=>t(a,n)).then(a=>n.hooks?n.hooks.postprocess(a):a).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const a=e(r,n);n.walkTokens&&le.walkTokens(a,n.walkTokens);let l=t(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return s(a)}}}function le(e,t,r){return NO(fs.lex,ps.parse)(e,t,r)}le.options=le.setOptions=function(e){return le.defaults={...le.defaults,...e},sae(le.defaults),le};le.getDefaults=MO;le.defaults=Oa;le.use=function(...e){const t=le.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(r=>{const n={...r};if(n.async=le.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=t.renderers[o.name];i?t.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=i.apply(this,s)),a}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=le.defaults.renderer||new _k;for(const i in r.renderer){const s=o[i];o[i]=(...a)=>{let l=r.renderer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.renderer=o}if(r.tokenizer){const o=le.defaults.tokenizer||new Ok;for(const i in r.tokenizer){const s=o[i];o[i]=(...a)=>{let l=r.tokenizer[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.tokenizer=o}if(r.hooks){const o=le.defaults.hooks||new Mh;for(const i in r.hooks){const s=o[i];Mh.passThroughHooks.has(i)?o[i]=a=>{if(le.defaults.async)return Promise.resolve(r.hooks[i].call(o,a)).then(c=>s.call(o,c));const l=r.hooks[i].call(o,a);return s.call(o,l)}:o[i]=(...a)=>{let l=r.hooks[i].apply(o,a);return l===!1&&(l=s.apply(o,a)),l}}n.hooks=o}if(r.walkTokens){const o=le.defaults.walkTokens;n.walkTokens=function(i){let s=[];return s.push(r.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}le.setOptions(n)})};le.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(le,n)),n.type){case"table":{for(const o of n.header)r=r.concat(le.walkTokens(o.tokens,t));for(const o of n.rows)for(const i of o)r=r.concat(le.walkTokens(i.tokens,t));break}case"list":{r=r.concat(le.walkTokens(n.items,t));break}default:le.defaults.extensions&&le.defaults.extensions.childTokens&&le.defaults.extensions.childTokens[n.type]?le.defaults.extensions.childTokens[n.type].forEach(function(o){r=r.concat(le.walkTokens(n[o],t))}):n.tokens&&(r=r.concat(le.walkTokens(n.tokens,t)))}return r};le.parseInline=NO(fs.lexInline,ps.parseInline);le.Parser=ps;le.parser=ps.parse;le.Renderer=_k;le.TextRenderer=AO;le.Lexer=fs;le.lexer=fs.lex;le.Tokenizer=Ok;le.Slugger=RO;le.Hooks=Mh;le.parse=le;le.options;le.setOptions;le.use;le.walkTokens;le.parseInline;ps.parse;fs.lex;var Sae=Object.defineProperty,Eae=Object.getOwnPropertyDescriptor,rg=(e,t,r,n)=>{for(var o=n>1?void 0:n?Eae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Sae(t,r,o),o},Cae=Ih(Ed);function Mae(e){return Oae.turndown(e)}function S1(e){const t=e.parentNode;if(!kt(t))return!1;if(t.nodeName==="THEAD")return!0;if(t.nodeName!=="TABLE"&&!PO(t))return!1;const r=[...e.childNodes];return r.every(n=>n.nodeName==="TH")&&r.some(n=>!!n.textContent)}function Th(e){return kt(e)&&e.matches("th[data-controller-cell]")}function Tae(e){const t=e.parentNode;return!kt(t)||t.nodeName!=="TABLE"&&!PO(t)?!1:[...e.childNodes].every(n=>Th(n))}function PO(e){var t;if(e.nodeName!=="TBODY")return!1;const r=e.previousSibling;return r?kt(r)&&r.nodeName==="THEAD"&&!((t=r.textContent)!=null&&t.trim()):!0}function kS(e){const t=e.closest("table");if(!t)return!1;const{parentNode:r}=t;return r?!!r.closest("table"):!0}function xS(e,t){var r;const n=[];for(const s of((r=t.parentNode)==null?void 0:r.childNodes)??[])Th(s)||n.push(s);return`${(n.indexOf(t)===0?"| ":" ")+e.trim()} |`}var Oae=new Cae({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:e=>e.nodeName==="LI"&&e.hasAttribute("data-task-list-item"),replacement:(e,t)=>`- ${t.hasAttribute("data-checked")?"[x]":"[ ]"} ${e.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(e,t)=>Th(t)?"":xS(e,t)}).addRule("tableRow",{filter:"tr",replacement:(e,t)=>{let r="";const n={left:":--",right:"--:",center:":-:"},o=[...t.childNodes].filter(i=>!Th(i));if(S1(t))for(const i of o){if(!kt(i))continue;let s="---";const a=(i.getAttribute("align")??"").toLowerCase();a&&(s=n[a]||s),r+=xS(s,i)}return` ${e}${r?` -${r}`:""}`}}).addRule("table",{filter:e=>{if(e.nodeName!=="TABLE"||Q4(e))return!1;const t=[...e.rows].filter(r=>!Jse(r));return o1(t[0])},replacement:e=>(e=e.replace(` +${r}`:""}`}}).addRule("table",{filter:e=>{if(e.nodeName!=="TABLE"||kS(e))return!1;const t=[...e.rows].filter(r=>!Tae(r));return S1(t[0])},replacement:e=>(e=e.replace(` `,` `),` ${e} -`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(e){return e}}).keep(e=>e.nodeName==="TABLE"&&!o1(e.rows[0])).keep(e=>e.nodeName==="TABLE"&&Q4(e)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return`~${e}~`}}).addRule("fencedCodeBlock",{filter:(e,t)=>!!(t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"),replacement:(e,t,r)=>{var n,o;te(mt(t.firstChild),{code:H.EXTENSION,message:`Invalid node \`${(n=t.firstChild)==null?void 0:n.nodeName}\` encountered for codeblock when converting html to markdown.`});const s=((o=(t.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:o[1])??t.firstChild.getAttribute("data-code-block-language")??"";return` +`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(e){return e}}).keep(e=>e.nodeName==="TABLE"&&!S1(e.rows[0])).keep(e=>e.nodeName==="TABLE"&&kS(e)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return`~${e}~`}}).addRule("fencedCodeBlock",{filter:(e,t)=>!!(t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"),replacement:(e,t,r)=>{var n,o;re(kt(t.firstChild),{code:H.EXTENSION,message:`Invalid node \`${(n=t.firstChild)==null?void 0:n.nodeName}\` encountered for codeblock when converting html to markdown.`});const s=((o=(t.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:o[1])??t.firstChild.getAttribute("data-code-block-language")??"";return` ${r.fence}${s} ${t.firstChild.textContent} ${r.fence} -`}});se.use({renderer:{list(e,t,r){return t?`
    +`}});le.use({renderer:{list(e,t,r){return t?`
      ${e}
    `:`
      ${e}
    `},listitem(e,t,r){return t?`
  1. ${e}
  2. `:`
  3. ${e}
  4. -`}}});function Qse(e,t){return se(e,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:t})}function Zse(e){te(typeof document,{code:H.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const t=new DOMParser().parseFromString(`${e}`,"text/html");return t.normalize(),lO(t.body),t.body.innerHTML}function lO(e){if(!i6(e)){if(!mt(e)||/^(script|iframe|object|embed|svg)$/i.test(e.tagName))return e==null?void 0:e.remove();for(const{name:t}of e.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(t)||e.attributes.removeNamedItem(t);for(const t of e.childNodes)lO(t)}}var jl=class extends je{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?t=>{const r=document.createElement("div"),n=rn.fromSchema(this.store.schema);return r.append(n.serializeFragment(t.content)),this.options.htmlToMarkdown(r.innerHTML)}:void 0}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return r=>{const{state:n}=r;let o=this.options.markdownToHtml(e,this.options.htmlSanitizer);o=!(t!=null&&t.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    -`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...t,replaceEmptyParentBlock:!0})(r)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};Hm([G()],jl.prototype,"insertMarkdown",1);Hm([Ue()],jl.prototype,"getMarkdown",1);Hm([G()],jl.prototype,"toggleBoldMarkdown",1);jl=Hm([me({defaultOptions:{htmlToMarkdown:Yse,markdownToHtml:Qse,htmlSanitizer:Zse,activeNodes:[oe.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],jl);var eae=Object.defineProperty,tae=Object.getOwnPropertyDescriptor,ck=(e,t,r,n)=>{for(var o=n>1?void 0:n?tae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&eae(t,r,o),o},rae={icon:"strikethrough",label:({t:e})=>e(tx.LABEL),description:({t:e})=>e(tx.DESCRIPTION)},md=class extends cs{get name(){return"strike"}createTags(){return[oe.FontStyle,oe.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:r=>["s",e.dom(r),0]}}toggleStrike(){return Xi({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Ru({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};ck([G(rae)],md.prototype,"toggleStrike",1);ck([Et({shortcut:j.Strike,command:"toggleStrike"})],md.prototype,"shortcut",1);md=ck([me({})],md);var eS=new pa("trailingNode");function nae(e){const{ignoredNodes:t=[],nodeName:r="paragraph"}=e??{},n=yl([...t,r]);let o,i;return new Mo({key:eS,appendTransaction(s,a,l){const{doc:c,tr:u}=l,d=eS.getState(l),f=c.content.size;if(d)return u.insert(f,o.create())},state:{init:(s,{doc:a,schema:l})=>{var c;const u=l.nodes[r];if(!u)throw new Error(`Invalid node being used for trailing node extension: '${r}'`);return o=u,i=Object.values(l.nodes).map(d=>d).filter(d=>!n.includes(d.name)),br(i,(c=a.lastChild)==null?void 0:c.type)},apply:(s,a)=>{var l;return s.docChanged?br(i,(l=s.doc.lastChild)==null?void 0:l.type):a}}})}var oae=Object.defineProperty,iae=Object.getOwnPropertyDescriptor,sae=(e,t,r,n)=>{for(var o=n>1?void 0:n?iae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&oae(t,r,o),o},ev=class extends je{get name(){return"trailingNode"}onSetOptions(e){const{changes:t}=e;(t.disableTags.changed||t.ignoredNodes.changed||t.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:e}=this.store,{disableTags:t,nodeName:r}=this.options,n=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[nae({ignoredNodes:n,nodeName:r})]}};ev=sae([me({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],ev);var aae=Object.defineProperty,lae=Object.getOwnPropertyDescriptor,uk=(e,t,r,n)=>{for(var o=n>1?void 0:n?lae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aae(t,r,o),o},cae={icon:"underline",label:({t:e})=>e(rx.LABEL),description:({t:e})=>e(rx.DESCRIPTION)},gd=class extends cs{get name(){return"underline"}createTags(){return[oe.FontStyle,oe.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="underline"?{}:!1},...t.parseDOM??[]],toDOM:r=>["u",e.dom(r),0]}}toggleUnderline(e){return Xi({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};uk([G(cae)],gd.prototype,"toggleUnderline",1);uk([Et({shortcut:j.Underline,command:"toggleUnderline"})],gd.prototype,"shortcut",1);gd=uk([me({})],gd);const tS={};function uae(e,t){if(tS[e])return;const r=document.createElement("style"),n=dae(e)/1e4,o=fae({h:Math.abs(n),s:.6,v:.6}),i=pae(o);r.type="text/css",r.textContent=` +`}}});function _ae(e,t){return le(e,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:t})}function Aae(e){re(typeof document,{code:H.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const t=new DOMParser().parseFromString(`${e}`,"text/html");return t.normalize(),zO(t.body),t.body.innerHTML}function zO(e){if(!I6(e)){if(!kt(e)||/^(script|iframe|object|embed|svg)$/i.test(e.tagName))return e==null?void 0:e.remove();for(const{name:t}of e.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(t)||e.attributes.removeNamedItem(t);for(const t of e.childNodes)zO(t)}}var Zl=class extends Ge{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?t=>{const r=document.createElement("div"),n=cn.fromSchema(this.store.schema);return r.append(n.serializeFragment(t.content)),this.options.htmlToMarkdown(r.innerHTML)}:void 0}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return r=>{const{state:n}=r;let o=this.options.markdownToHtml(e,this.options.htmlSanitizer);o=!(t!=null&&t.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    +`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...t,replaceEmptyParentBlock:!0})(r)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};rg([Y()],Zl.prototype,"insertMarkdown",1);rg([Ye()],Zl.prototype,"getMarkdown",1);rg([Y()],Zl.prototype,"toggleBoldMarkdown",1);Zl=rg([ve({defaultOptions:{htmlToMarkdown:Mae,markdownToHtml:_ae,htmlSanitizer:Aae,activeNodes:[ie.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],Zl);var Rae=Object.defineProperty,Nae=Object.getOwnPropertyDescriptor,Ak=(e,t,r,n)=>{for(var o=n>1?void 0:n?Nae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Rae(t,r,o),o},Pae={icon:"strikethrough",label:({t:e})=>e(Sx.LABEL),description:({t:e})=>e(Sx.DESCRIPTION)},Cd=class extends vs{get name(){return"strike"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:r=>["s",e.dom(r),0]}}toggleStrike(){return ss({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Vu({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};Ak([Y(Pae)],Cd.prototype,"toggleStrike",1);Ak([_t({shortcut:j.Strike,command:"toggleStrike"})],Cd.prototype,"shortcut",1);Cd=Ak([ve({})],Cd);var wS=new wa("trailingNode");function zae(e){const{ignoredNodes:t=[],nodeName:r="paragraph"}=e??{},n=Ol([...t,r]);let o,i;return new zo({key:wS,appendTransaction(s,a,l){const{doc:c,tr:u}=l,d=wS.getState(l),f=c.content.size;if(d)return u.insert(f,o.create())},state:{init:(s,{doc:a,schema:l})=>{var c;const u=l.nodes[r];if(!u)throw new Error(`Invalid node being used for trailing node extension: '${r}'`);return o=u,i=Object.values(l.nodes).map(d=>d).filter(d=>!n.includes(d.name)),Er(i,(c=a.lastChild)==null?void 0:c.type)},apply:(s,a)=>{var l;return s.docChanged?Er(i,(l=s.doc.lastChild)==null?void 0:l.type):a}}})}var Lae=Object.defineProperty,Iae=Object.getOwnPropertyDescriptor,Dae=(e,t,r,n)=>{for(var o=n>1?void 0:n?Iae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lae(t,r,o),o},bv=class extends Ge{get name(){return"trailingNode"}onSetOptions(e){const{changes:t}=e;(t.disableTags.changed||t.ignoredNodes.changed||t.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:e}=this.store,{disableTags:t,nodeName:r}=this.options,n=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[zae({ignoredNodes:n,nodeName:r})]}};bv=Dae([ve({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],bv);var $ae=Object.defineProperty,Hae=Object.getOwnPropertyDescriptor,Rk=(e,t,r,n)=>{for(var o=n>1?void 0:n?Hae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$ae(t,r,o),o},Bae={icon:"underline",label:({t:e})=>e(Ex.LABEL),description:({t:e})=>e(Ex.DESCRIPTION)},Md=class extends vs{get name(){return"underline"}createTags(){return[ie.FontStyle,ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:r=>r==="underline"?{}:!1},...t.parseDOM??[]],toDOM:r=>["u",e.dom(r),0]}}toggleUnderline(e){return ss({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};Rk([Y(Bae)],Md.prototype,"toggleUnderline",1);Rk([_t({shortcut:j.Underline,command:"toggleUnderline"})],Md.prototype,"shortcut",1);Md=Rk([ve({})],Md);const SS={};function Fae(e,t){if(SS[e])return;const r=document.createElement("style"),n=Vae(e)/1e4,o=jae({h:Math.abs(n),s:.6,v:.6}),i=Uae(o);r.type="text/css",r.textContent=` .remirror-editor-wrapper .${t}${e}::before { content: '[${e}]'; font-family: monospace; @@ -5011,5 +5011,53 @@ ${e} font-size: 90%; color: ${i}; } - `,document.head.appendChild(r),tS[e]=!0}function dae(e){let t=0;if(!e||e.length===0)return t;for(let r=0;r{for(var o=n>1?void 0:n?mae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hae(t,r,o),o};const rp="__editor_";let Ul=class extends cs{get name(){return"className"}constructor(e){super(e);for(const t of e.classNames||[])uae(t,rp)}createTags(){return[oe.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:{...e.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:r=>{if(!mt(r))return!1;for(let n of r.classList)if(n.startsWith(rp)&&(n=n.substring(rp.length)),this.options.classNames.indexOf(n)>=0)return{...e.parse(r),className:n};return!1}},...t.parseDOM??[]],toDOM:r=>{const{className:n,...o}=_h(r.attrs,e),i=e.dom(r),s=i.className,a=gae(n,s);return["span",{...o,...i,class:a},0]}}}setClassName(e,t){return this.store.commands.applyMark.original(this.type,{className:e},t)}removeClassName(e){return this.store.commands.removeMark.original({type:this.type,selection:e,expand:!0})}};dk([G({})],Ul.prototype,"setClassName",1);dk([G({})],Ul.prototype,"removeClassName",1);Ul=dk([me({defaultOptions:{}})],Ul);function gae(e,t){return e&&(e=`${rp}${e}`),e&&t?`${e} ${t}`:e||t}function cO(e){const[t,r]=S.useState(e),n=S.useRef(e);return n.current=t,[t,r,n]}function vae(e,t,r){if(!e)return;const n=`${t}/api/assets/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function yae(e,t,r){if(!e)return;const n=`${t}/api/content/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}const bae=bh(hd),fk=new bae({hr:"---"});fk.addRule("link2",{filter:(e,t)=>t.linkStyle==="inlined"&&e.nodeName==="A"&&!!e.getAttribute("href"),replacement:function(e,t){const r=t,n=r.getAttribute("href");if(!n)return"";const o=tv(r.getAttribute("title"));return o?`[${e}](${n} '${o}')`:`[${e}](${n})`}});fk.addRule("link2",{filter:"img",replacement:(e,t)=>{const r=t,n=r.getAttribute("src")||"";if(!n)return"";const o=tv(r.getAttribute("alt")),i=tv(r.getAttribute("title"));return i?`![${o}](${n} '${i}')`:`![${o}](${n})`}});function tv(e){return(e==null?void 0:e.replace(/(\n+\s*)+/g,` -`))||""}function kae(e){return fk.turndown(e)}const ri=e=>{const{type:t}=e;return t==="Assets"?O.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[O.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),O.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),O.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):t==="Contents"?O.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[O.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),O.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),O.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),O.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):t==="Check"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:O.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):t==="Cancel"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:O.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):t==="Edit"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1rem",height:"1rem",children:O.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):null},xae=({node:e})=>{const t=Pd(vd),r=e.attrs.contentId,n=e.attrs.contentTitle,o=e.attrs.schemaName,i=t.options.onEditContent;return O.jsxs("div",{className:"squidex-editor-content-link",children:[O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,r),children:O.jsx(ri,{type:"Contents"})}),O.jsx("div",{className:"squidex-editor-content-schema",children:o}),O.jsx("div",{className:"squidex-editor-content-name",children:n})]})};var wae=Object.defineProperty,Sae=Object.getOwnPropertyDescriptor,uO=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&wae(t,r,o),o};let vd=class extends Qt{constructor(t){super({...t,disableExtraAttributes:!0});ac(this,"ReactComponent",xae)}get name(){return"contentLink"}createTags(){return[oe.InlineNode,oe.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:t=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${t.attrs.schemaName}/${t.attrs.contentId}`},t.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:t=>{const r=t.getAttribute("href");if(!r)return!1;const n=yae(r,this.options.baseUrl,this.options.appName);return n?{contentId:n.id,contentTitle:t.innerText,schemaName:n.schemaName}:!1},priority:1e5}]}}addContent(t,r){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:t.id,contentTitle:t.title,schemaName:t.schemaName},selection:r})}};uO([G({})],vd.prototype,"addContent",1);vd=uO([me({defaultOptions:{}})],vd);const Eae=e=>{const{appName:t,baseUrl:r,onEditNode:n,onEditAsset:o,node:i,getPosition:s}=e,a=vae(i.attrs.src,r,t);return O.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[O.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),O.jsxs("div",{className:"squidex-editor-image-buttons",children:[O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>n({node:i,getPos:s}),children:O.jsx(ri,{type:"Edit"})}),a&&O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(a.id),children:O.jsx(ri,{type:"Assets"})})]}),a&&O.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};class Cae extends je{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?r=>{const n=document.createElement("div");return n.append(rn.fromSchema(this.store.schema).serializeFragment(r.content)),n.innerHTML}:void 0}}}}const Mae=({mode:e,onChange:t,state:r,value:n})=>{const{setContent:o}=ii(),{getMarkdown:i,getHTML:s}=Zh(),a=S.useRef(null),l=S.useRef(!1),c=S.useRef(0),u=_V();return S.useEffect(()=>{c.current+=1},[u]),S.useEffect(()=>{l.current=!!n&&n.length>0,a.current!==n&&(a.current=n,o(n||""),c.current=-1)},[o,n]),S.useEffect(()=>{if(!t)return;function d(){switch(e){case"Markdown":return i(r);default:return s(r)}}if(c.current<=0)return;let f=d().trim();f&&f.length>0&&Tae.indexOf(f)>=0&&(f=""),a.current!==f&&(!l.current&&f.length===0?t(void 0):t(f),a.current=f,l.current=!!f&&f.length>0)},[s,i,e,t,r]),null},Tae=["

    ",'

    ','

    '],Oae=({node:e,getPosition:t,view:r})=>{const n=S.useCallback(o=>{const i=r.state.tr.setNodeAttribute(t(),"html",o.target.value);r.dispatch(i)},[t,r]);return O.jsxs("div",{className:"squidex-editor-html",children:[O.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),O.jsx("textarea",{spellCheck:"false",value:e.attrs.content,onChange:n})]})};var _ae=Object.defineProperty,Aae=Object.getOwnPropertyDescriptor,dO=(e,t,r,n)=>{for(var o=n>1?void 0:n?Aae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_ae(t,r,o),o};let mh=class extends Qt{constructor(){super({disableExtraAttributes:!0});ac(this,"ReactComponent",Oae)}get name(){return"plainHtml"}createTags(){return[oe.Block,oe.TextBlock,oe.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:t=>{const r=t.attrs.html;return["div",{class:"__editor_html"},...Nae(r)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:t=>({content:t.innerHTML}),priority:1e4}]}}insertPlainHtml(t){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:t})}};dO([G({})],mh.prototype,"insertPlainHtml",1);mh=dO([me({defaultOptions:{}})],mh);function Nae(e){if(!e)return[""];const t=document.createElement("div");return t.innerHTML=e,fO(t)}function Rae(e){const t={};for(let r=0;r{const t=Zl(),r=S.useCallback(async()=>{const n=await e();zae(n)&&n.length>0&&t.insertText(n),t.run()},[t,e]);return O.jsx(ct,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:O.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"AI"})})};function zae(e){return typeof e=="string"||e instanceof String}const pO=e=>{const t=S.useRef(null);return S.useEffect(()=>{const r=window.requestAnimationFrame(()=>{var n;(n=t.current)==null||n.focus()});return()=>{window.cancelAnimationFrame(r)}},[]),O.jsx("input",{className:"squidex-editor-input",ref:t,...e})},hO=({children:e,title:t})=>O.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[O.jsx("div",{className:"squidex-editor-modal-backdrop"}),O.jsxs("div",{className:"squidex-editor-modal-window",children:[t&&O.jsx("div",{className:"squidex-editor-modal-title",children:t}),O.jsx("div",{className:"squidex-editor-modal-body",children:e})]})]}),Lae=({onSelectAssets:e})=>{const t=Zl(),r=S.useCallback(async()=>{const n=await e();for(const o of n){if(o.mimeType.startsWith("image/")){const i={src:o.src,alt:o.alt,title:o.fileName};t.insertImage(i)}else t.insertAsset(o);t.insertText(" ")}t.run()},[t,e]);return O.jsx(ct,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:O.jsx(ri,{type:"Assets"})})},Iae=({onSelectContents:e})=>{const t=Zl(),r=S.useCallback(async()=>{const n=await e();for(const o of n)t.addContent(o);t.run()},[t,e]);return O.jsx(ct,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:O.jsx(ri,{type:"Contents"})})},Dae=()=>{const e=Zl(),t=S.useCallback(async()=>{e.insertPlainHtml().run()},[e]);return O.jsx(ct,{commandName:"addImage",enabled:!0,onSelect:t,label:"Add HTML",icon:O.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"HTML"})})},$ae=({attrs:e,...t})=>{const{setClassName:r}=Zt(),n=S.useCallback(()=>{r(e.className)},[e.className,r]),o=jr().className(e);return O.jsx(bb,{...t,commandName:"toggleClass",active:o,attrs:e,enabled:!0,onSelect:n,label:(e==null?void 0:e.className)||"No Class"})},Hae=({...e})=>{const{removeClassName:t}=Zt(),r=S.useCallback(()=>{t()},[t]),n=!jr().className();return O.jsx(bb,{...e,commandName:"removeClass",active:n,attrs:{},enabled:!0,onSelect:r,label:"No Class"})},Bae=()=>{const e=Pd(Ul);return!e.options.classNames||e.options.classNames.length===0?null:O.jsxs(dT,{"aria-label":"Class Name",icon:O.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[O.jsx(Hae,{}),e.options.classNames.map(t=>O.jsx($ae,{attrs:{className:t}},t))]})},Fae=()=>{const e=Pd(Qi);return O.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",O.jsx("strong",{children:e.getWordCount()}),", Characters: ",O.jsx("strong",{children:e.getCharacterCount()})]})},rS=({onEdit:e})=>{const t=Zl(),n=jr().link(),o=$y(),i=S.useCallback(()=>{t.removeLink().focus().run()},[t]);return O.jsxs(O.Fragment,{children:[O.jsx(ct,{commandName:"updateLink",enabled:!o.empty,label:"Add or Edit Link",onSelect:e,icon:"link"}),O.jsx(ct,{commandName:"removeLink",enabled:n,label:"Remove Link",onSelect:i,icon:"linkUnlink"})]})},Vae=({onClose:e})=>{const[t,r,n]=cO(""),o=Zl(),i=vV(!0).link(),s=(i==null?void 0:i.href)??"",a=$y();S.useEffect(()=>{r(s)},[s,a,r]);const l=S.useCallback(()=>{const d=n.current;d?o.updateLink({href:d,auto:!1}):o.removeLink(),o.focus(a.to).run(),e()},[o,n,e,a.to]),c=S.useCallback(d=>{r(d.target.value)},[r]),u=S.useCallback(d=>{const{code:f}=d;f==="Enter"&&l(),f==="Escape"&&e()},[e,l]);return O.jsxs(hO,{title:"Change Link",children:[O.jsx(pO,{value:t,onChange:c,onKeyDown:u,placeholder:"Enter Link..."}),O.jsxs(kn,{children:[O.jsx(ct,{commandName:"submitLink",enabled:!0,onSelect:l,icon:O.jsx(ri,{type:"Check"})}),O.jsx(ct,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:O.jsx(ri,{type:"Cancel"})})]})]})},jae=({onClose:e,node:t})=>{const[r,n,o]=cO(""),i=Zt();S.useEffect(()=>{n(t.node.attrs.title||"")},[t,n]);const s=S.useCallback(c=>{n(c.target.value)},[n]),a=S.useCallback(()=>{i.updateNodeAttributes(t.getPos()||0,{...t.node.attrs||{},title:o.current}),e()},[i,t,e,o]),l=S.useCallback(c=>{const{code:u}=c;u==="Enter"&&a(),u==="Escape"&&e()},[e,a]);return O.jsxs(hO,{title:"Change Image Title",children:[O.jsx(pO,{value:r,onChange:s,onKeyDown:l,placeholder:"Enter Title..."}),O.jsxs(kn,{children:[O.jsx(ct,{commandName:"submitLink",enabled:!0,onSelect:a,icon:O.jsx(ri,{type:"Check"})}),O.jsx(ct,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:O.jsx(ri,{type:"Cancel"})})]})]})};const Uae=e=>{const{appName:t,classNames:r,canSelectAIText:n,canSelectAssets:o,canSelectContents:i,isDisabled:s,mode:a,onChange:l,onEditAsset:c,onEditContent:u,onSelectAIText:d,onSelectAssets:f,onSelectContents:p,onUpload:h,value:m}=e,b=S.useMemo(()=>{let z=e.baseUrl;return z.endsWith("/")&&(z=z.substring(0,z.length-1)),z},[e.baseUrl]),[v,g]=S.useState(),[y,k]=S.useState(!1),x=S.useCallback(()=>{k(!0)},[]),w=S.useCallback(()=>{k(!1)},[]),E=S.useCallback(()=>{g(null)},[]),M=S.useCallback(()=>[new Hb,new da({}),new cd({enableSpine:!0}),new Ul({classNames:r}),new no({}),new dd,new vd({appName:t,baseUrl:b,onEditContent:u}),new Qi({}),new lh,new ch({}),new uh,new Cae({copyAsHtml:a==="Html"}),new fd({uploadHandler:h}),new pd,new fa({autoLink:!0}),new ua({enableCollapsible:!0}),new jl({copyAsMarkdown:a==="Markdown",htmlToMarkdown:kae}),new ud,new mh,new md,new ev,new gd],[t,b,r,a,u,h]),{manager:C,state:T,setState:N}=OV({stringHandler:a==="Markdown"?"markdown":"html",content:m,nodeViewComponents:{image:z=>O.jsx(Eae,{...z,appName:t,baseUrl:b,onEditNode:g,onEditAsset:c})},extensions:M});return O.jsx(Lee,{children:O.jsx(Ree,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:O.jsxs(NV,{classNames:s?["squidex-editor-disabled"]:[],manager:C,state:T,onChange:z=>N(z.state),children:[O.jsx("div",{className:"squidex-editor-menu",children:O.jsxs(pT,{children:[O.jsx(Aee,{}),O.jsx(_ee,{showAll:!0}),O.jsxs(kn,{children:[O.jsx(q0,{}),O.jsx(Y0,{}),O.jsx(J0,{}),O.jsx(G0,{})]}),O.jsxs(kn,{children:[O.jsx(gee,{}),O.jsx(yee,{}),O.jsx(hee,{})]}),O.jsxs(kn,{children:[O.jsx(vee,{}),O.jsx(bee,{})]}),a==="Html"&&r&&r.length>0&&O.jsx(kn,{children:O.jsx(Bae,{})}),O.jsx(kn,{children:O.jsx(rS,{onEdit:x})}),O.jsxs(kn,{children:[o&&f&&O.jsx(Lae,{onSelectAssets:f}),i&&p&&O.jsx(Iae,{onSelectContents:p}),n&&d&&O.jsx(Pae,{onSelectAIText:d})]}),a==="Html"&&O.jsx(kn,{children:O.jsx(Dae,{})})]})}),O.jsx(Mae,{mode:a,onChange:l,state:T,value:m}),O.jsx(P0,{}),y?O.jsx(Vae,{onClose:w}):v?O.jsx(jae,{node:v,onClose:E}):O.jsxs(zee,{className:"squidex-editor-floating",children:[O.jsx(q0,{}),O.jsx(Y0,{}),O.jsx(J0,{}),O.jsx(G0,{}),O.jsx(rS,{onEdit:x})]}),O.jsx(Fae,{})]})})})};var mO,nS=Yh;mO=nS.createRoot,nS.hydrateRoot;class Wae{constructor(t,r){ac(this,"root");this.element=t,this.props=r,this.root=mO(this.element),this.render()}update(t){this.props={...this.props,...t},this.render()}setValue(t){this.update({value:t})}setIsDisabled(t){this.update({isDisabled:t})}destroy(){this.root.unmount()}render(){this.root.render(O.jsx(Uae,{...this.props}))}}window.SquidexEditorWrapper=Wae; + `,document.head.appendChild(r),SS[e]=!0}function Vae(e){let t=0;if(!e||e.length===0)return t;for(let r=0;r{for(var o=n>1?void 0:n?Kae(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Wae(t,r,o),o};const mp="__editor_";let ec=class extends vs{get name(){return"className"}constructor(e){super(e);for(const t of e.classNames||[])Fae(t,mp)}createTags(){return[ie.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:{...e.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:r=>{var n;if(!kt(r))return!1;for(let o of r.classList)if(o.startsWith(mp)&&(o=o.substring(mp.length)),((n=this.options.classNames)==null?void 0:n.indexOf(o))>=0)return{...e.parse(r),className:o};return!1}},...t.parseDOM??[]],toDOM:r=>{const{className:n,...o}=Kh(r.attrs,e),i=e.dom(r),s=i.className,a=qae(n,s);return["span",{...o,...i,class:a},0]}}}setClassName(e,t){return this.store.commands.applyMark.original(this.type,{className:e},t)}removeClassName(e){return this.store.commands.removeMark.original({type:this.type,selection:e,expand:!0})}};Nk([Y({})],ec.prototype,"setClassName",1);Nk([Y({})],ec.prototype,"removeClassName",1);ec=Nk([ve({defaultOptions:{}})],ec);function qae(e,t){return e&&(e=`${mp}${e}`),e&&t?`${e} ${t}`:e||t}function LO(e){const[t,r]=S.useState(e),n=S.useRef(e);return n.current=t,[t,r,n]}function Gae(e,t,r){if(!e)return;const n=`${t}/api/assets/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function Yae(e,t,r){if(!e)return;const n=`${t}/api/content/${r}/`;if(e.startsWith(n)){const o=e.substring(n.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}function Pk(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _a=Pk();function IO(e){_a=e}const DO=/[&<>"']/,Xae=new RegExp(DO.source,"g"),$O=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Jae=new RegExp($O.source,"g"),Qae={"&":"&","<":"<",">":">",'"':""","'":"'"},ES=e=>Qae[e];function nn(e,t){if(t){if(DO.test(e))return e.replace(Xae,ES)}else if($O.test(e))return e.replace(Jae,ES);return e}const Zae=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ele(e){return e.replace(Zae,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const tle=/(^|[^\[])\^/g;function De(e,t){e=typeof e=="string"?e:e.source,t=t||"";const r={replace:(n,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(tle,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}function CS(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Oh={exec:()=>null};function MS(e,t){const r=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=n.length?o.slice(n.length):o}).join(` +`)}class _h{constructor(t){Fe(this,"options");Fe(this,"rules");Fe(this,"lexer");this.options=t||_a}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:zf(n,` +`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const n=r[0],o=nle(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){const o=zf(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){const n=zf(r[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim();const o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",l="",c=!1;for(;t;){let u=!1;if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;a=r[0],t=t.substring(a.length);let d=r[2].split(` +`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(` +`,1)[0],p=0;this.options.pedantic?(p=2,l=d.trimStart()):(p=r[2].search(/[^ ]/),p=p>4?1:p,l=d.slice(p),p+=r[1].length);let h=!1;if(!d&&/^ *$/.test(f)&&(a+=f+` +`,t=t.substring(f.length+1),u=!0),!u){const v=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),g=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),y=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,p-1)}}#`);for(;t;){const x=t.split(` +`,1)[0];if(f=x,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),y.test(f)||k.test(f)||v.test(f)||g.test(t))break;if(f.search(/[^ ]/)>=p||!f.trim())l+=` +`+f.slice(p);else{if(h||d.search(/[^ ]/)>=4||y.test(d)||k.test(d)||g.test(d))break;l+=` +`+f}!h&&!f.trim()&&(h=!0),a+=x+` +`,t=t.substring(x.length+1),d=f.slice(p)}}i.loose||(c?i.loose=!0:/\n *\n *$/.test(a)&&(c=!0));let m=null,b;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(b=m[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!m,checked:b,loose:!1,text:l,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=l.trimEnd(),i.raw=i.raw.trimEnd();for(let u=0;up.type==="space"),f=d.length>0&&d.some(p=>/\n.*\n/.test(p.raw));i.loose=f}if(i.loose)for(let u=0;u$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){const r=this.rules.block.table.exec(t);if(r){if(!/[:|]/.test(r[2]))return;const n={type:"table",raw:r[0],header:MS(r[1]).map(o=>({text:o,tokens:[]})),align:r[2].replace(/^\||\| *$/g,"").split("|"),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(n.header.length===n.align.length){let o=n.align.length,i,s,a,l;for(i=0;i({text:c,tokens:[]}));for(o=n.header.length,s=0;s/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=zf(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=rle(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),TS(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return TS(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...o[0]].length-1;let a,l,c=s,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(o=d.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=[...o[0]][0].length,p=t.slice(0,s+o.index+f+l);if(Math.min(s,l)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const h=p.slice(2,-2);return{type:"strong",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," ");const o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=nn(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let n,o;return r[2]==="@"?(n=nn(r[1]),o="mailto:"+n):(n=nn(r[1]),o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,o;if(r[2]==="@")n=nn(r[0]),o="mailto:"+n;else{let i;do i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(i!==r[0]);n=nn(r[0]),r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=nn(r[0]),{type:"text",raw:r[0],text:n}}}}const se={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Oh,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;se.def=De(se.def).replace("label",se._label).replace("title",se._title).getRegex();se.bullet=/(?:[*+-]|\d{1,9}[.)])/;se.listItemStart=De(/^( *)(bull) */).replace("bull",se.bullet).getRegex();se.list=De(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex();se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";se._comment=/|$)/;se.html=De(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();se.lheading=De(se.lheading).replace(/bull/g,se.bullet).getRegex();se.paragraph=De(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.blockquote=De(se.blockquote).replace("paragraph",se.paragraph).getRegex();se.normal={...se};se.gfm={...se.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};se.gfm.table=De(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.gfm.paragraph=De(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.pedantic={...se.normal,html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Oh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Oh,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Oh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";G.punctuation=De(G.punctuation,"u").replace(/punctuation/g,G._punctuation).getRegex();G.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;G.anyPunctuation=/\\[punct]/g;G._escapes=/\\([punct])/g;G._comment=De(se._comment).replace("(?:-->|$)","-->").getRegex();G.emStrong.lDelim=De(G.emStrong.lDelim,"u").replace(/punct/g,G._punctuation).getRegex();G.emStrong.rDelimAst=De(G.emStrong.rDelimAst,"gu").replace(/punct/g,G._punctuation).getRegex();G.emStrong.rDelimUnd=De(G.emStrong.rDelimUnd,"gu").replace(/punct/g,G._punctuation).getRegex();G.anyPunctuation=De(G.anyPunctuation,"gu").replace(/punct/g,G._punctuation).getRegex();G._escapes=De(G._escapes,"gu").replace(/punct/g,G._punctuation).getRegex();G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;G.autolink=De(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex();G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;G.tag=De(G.tag).replace("comment",G._comment).replace("attribute",G._attribute).getRegex();G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;G._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;G.link=De(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex();G.reflink=De(G.reflink).replace("label",G._label).replace("ref",se._label).getRegex();G.nolink=De(G.nolink).replace("ref",se._label).getRegex();G.reflinkSearch=De(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex();G.normal={...G};G.pedantic={...G.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()};G.gfm={...G.normal,escape:De(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let n,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+n.raw,o.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+n.raw,o.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){o=r[r.length-1],s&&o.type==="paragraph"?(o.raw+=` +`+n.raw,o.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n),s=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&o.type==="text"?(o.raw+=` +`+n.raw,o.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,s,c)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}}class Ah{constructor(t){Fe(this,"options");this.options=t||_a}code(t,r,n){var i;const o=(i=(r||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` +`,o?'
    '+(n?t:nn(t,!0))+`
    +`:"
    "+(n?t:nn(t,!0))+`
    +`}blockquote(t){return`
    +${t}
    +`}html(t,r){return t}heading(t,r,n){return`${t} +`}hr(){return`
    +`}list(t,r,n){const o=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t,r,n){return`
  5. ${t}
  6. +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,r){return r&&(r=`${r}`),` + +`+t+` +`+r+`
    +`}tablerow(t){return` +${t} +`}tablecell(t,r){const n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,r,n){const o=CS(t);if(o===null)return n;t=o;let i='
    ",i}image(t,r,n){const o=CS(t);if(o===null)return n;t=o;let i=`${n}0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=b+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=b+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:b+" "}):m+=b+" "}m+=this.parse(f.tokens,c),u+=this.renderer.listitem(m,h,!!p)}n+=this.renderer.list(u,a,l);continue}case"html":{const s=i;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,a=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{n=n.concat(this.walkTokens(a[l],r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=r.renderers[i.name];s?r.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:r.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=r[i.level];s?s.unshift(i.tokenizer):r[i.level]=[i.tokenizer],i.start&&(i.level==="block"?r.startBlock?r.startBlock.push(i.start):r.startBlock=[i.start]:i.level==="inline"&&(r.startInline?r.startInline.push(i.start):r.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(r.childTokens[i.name]=i.childTokens)}),o.extensions=r),n.renderer){const i=this.defaults.renderer||new Ah(this.defaults);for(const s in n.renderer){const a=n.renderer[s],l=s,c=i[l];i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}o.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new _h(this.defaults);for(const s in n.tokenizer){const a=n.tokenizer[s],l=s,c=i[l];i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Nu;for(const s in n.hooks){const a=n.hooks[s],l=s,c=i[l];Nu.passThroughHooks.has(s)?i[l]=u=>{if(this.defaults.async)return Promise.resolve(a.call(i,u)).then(f=>c.call(i,f));const d=a.call(i,u);return c.call(i,d)}:i[l]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,s=n.walkTokens;o.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return wo.lex(t,r??this.defaults)}parser(t,r){return So.parse(t,r??this.defaults)}}Od=new WeakSet,kv=function(t,r){return(n,o)=>{const i={...o},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=ef(this,Nh,HO).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>t(l,s)).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>r(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));const l=t(n,s);s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=r(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(l){return a(l)}}},Nh=new WeakSet,HO=function(t,r){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+nn(n.message+"",!0)+"
    ";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}};const xa=new ole;function Ie(e,t){return xa.parse(e,t)}Ie.options=Ie.setOptions=function(e){return xa.setOptions(e),Ie.defaults=xa.defaults,IO(Ie.defaults),Ie};Ie.getDefaults=Pk;Ie.defaults=_a;Ie.use=function(...e){return xa.use(...e),Ie.defaults=xa.defaults,IO(Ie.defaults),Ie};Ie.walkTokens=function(e,t){return xa.walkTokens(e,t)};Ie.parseInline=xa.parseInline;Ie.Parser=So;Ie.parser=So.parse;Ie.Renderer=Ah;Ie.TextRenderer=zk;Ie.Lexer=wo;Ie.lexer=wo.lex;Ie.Tokenizer=_h;Ie.Hooks=Nu;Ie.parse=Ie;Ie.options;Ie.setOptions;Ie.use;Ie.walkTokens;Ie.parseInline;So.parse;wo.lex;const ile=Ih(Ed),ng=new ile({hr:"---"});ng.addRule("link2",{filter:(e,t)=>t.linkStyle==="inlined"&&e.nodeName==="A"&&!!e.getAttribute("href"),replacement:function(e,t){const r=t,n=r.getAttribute("href");if(!n)return"";const o=xv(r.getAttribute("title"));return o?`[${e}](${n} '${o}')`:`[${e}](${n})`}});ng.addRule("link2",{filter:"img",replacement:(e,t)=>{const r=t,n=r.getAttribute("src")||"";if(!n)return"";const o=xv(r.getAttribute("alt")),i=xv(r.getAttribute("title"));return i?`![${o}](${n} '${i}')`:`![${o}](${n})`}});ng.addRule("paragraph2",{filter:"p",replacement:e=>`${e} +`});function xv(e){return(e==null?void 0:e.replace(/(\n+\s*)+/g,` +`))||""}Ie.use({renderer:{paragraph:e=>e.split(` +`).map(r=>`

    ${r}

    +`).join("")+wv}});const wv=`

    +`;function sle(e){return ng.turndown(e)}function ale(e){let t=Ie(e,{gfm:!0});return t.endsWith(wv)&&(t=t.substring(0,t.length-wv.length)),t}const ui=e=>{const{type:t}=e;return t==="Assets"?O.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[O.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),O.jsx("path",{d:"M21.088 23.537h-11.988c-0.35 0-0.612-0.175-0.787-0.525s-0.088-0.7 0.088-0.962l8.225-9.713c0.175-0.175 0.438-0.35 0.7-0.35s0.525 0.175 0.7 0.35l5.25 7.525c0.088 0.087 0.088 0.175 0.088 0.262 0.438 1.225 0.087 2.012-0.175 2.45-0.613 0.875-1.925 0.963-2.1 0.963zM11.025 21.787h10.15c0.175 0 0.612-0.088 0.7-0.262 0.088-0.088 0.088-0.35 0-0.7l-4.55-6.475-6.3 7.438z"}),O.jsx("path",{d:"M9.1 13.737c-2.1 0-3.85-1.75-3.85-3.85s1.75-3.85 3.85-3.85 3.85 1.75 3.85 3.85-1.663 3.85-3.85 3.85zM9.1 7.788c-1.138 0-2.1 0.875-2.1 2.1s0.962 2.1 2.1 2.1 2.1-0.962 2.1-2.1-0.875-2.1-2.1-2.1z"})]}):t==="Contents"?O.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 28 28",children:[O.jsx("path",{d:"M21.875 28h-15.75c-3.413 0-6.125-2.713-6.125-6.125v-15.75c0-3.413 2.712-6.125 6.125-6.125h15.75c3.412 0 6.125 2.712 6.125 6.125v15.75c0 3.412-2.713 6.125-6.125 6.125zM6.125 1.75c-2.45 0-4.375 1.925-4.375 4.375v15.75c0 2.45 1.925 4.375 4.375 4.375h15.75c2.45 0 4.375-1.925 4.375-4.375v-15.75c0-2.45-1.925-4.375-4.375-4.375h-15.75z"}),O.jsx("path",{d:"M13.125 12.25h-5.775c-1.575 0-2.888-1.313-2.888-2.888v-2.013c0-1.575 1.313-2.888 2.888-2.888h5.775c1.575 0 2.887 1.313 2.887 2.888v2.013c0 1.575-1.312 2.888-2.887 2.888zM7.35 6.212c-0.613 0-1.138 0.525-1.138 1.138v2.012c0 0.612 0.525 1.138 1.138 1.138h5.775c0.612 0 1.138-0.525 1.138-1.138v-2.013c0-0.612-0.525-1.138-1.138-1.138h-5.775z"}),O.jsx("path",{d:"M22.662 16.713h-17.325c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h17.237c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"}),O.jsx("path",{d:"M15.138 21.262h-9.8c-0.525 0-0.875-0.35-0.875-0.875s0.35-0.875 0.875-0.875h9.713c0.525 0 0.875 0.35 0.875 0.875s-0.35 0.875-0.787 0.875z"})]}):t==="Check"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:O.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):t==="Cancel"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:"1rem",height:"1rem",children:O.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})}):t==="Edit"?O.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1rem",height:"1rem",children:O.jsx("path",{d:"M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"})}):null},lle=({node:e})=>{const t=Ud(Td),r=e.attrs.contentId,n=e.attrs.contentTitle,o=e.attrs.schemaName,i=t.options.onEditContent;return O.jsxs("div",{className:"squidex-editor-content-link",children:[O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,r),children:O.jsx(ui,{type:"Contents"})}),O.jsx("div",{className:"squidex-editor-content-schema",children:o}),O.jsx("div",{className:"squidex-editor-content-name",children:n})]})};var cle=Object.defineProperty,ule=Object.getOwnPropertyDescriptor,BO=(e,t,r,n)=>{for(var o=n>1?void 0:n?ule(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cle(t,r,o),o};let Td=class extends nr{constructor(t){super({...t,disableExtraAttributes:!0});Fe(this,"ReactComponent",lle)}get name(){return"contentLink"}createTags(){return[ie.InlineNode,ie.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:t=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${t.attrs.schemaName}/${t.attrs.contentId}`},t.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:t=>{const r=t.getAttribute("href");if(!r)return!1;const n=Yae(r,this.options.baseUrl,this.options.appName);return n?{contentId:n.id,contentTitle:t.innerText,schemaName:n.schemaName}:!1},priority:1e5}]}}addContent(t,r){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:t.id,contentTitle:t.title,schemaName:t.schemaName},selection:r})}};BO([Y({})],Td.prototype,"addContent",1);Td=BO([ve({defaultOptions:{}})],Td);const dle=e=>{const{appName:t,baseUrl:r,onEditNode:n,onEditAsset:o,node:i,getPosition:s}=e,a=Gae(i.attrs.src,r,t);return O.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[O.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),O.jsxs("div",{className:"squidex-editor-image-buttons",children:[O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>n({node:i,getPos:s}),children:O.jsx(ui,{type:"Edit"})}),a&&O.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(a.id),children:O.jsx(ui,{type:"Assets"})})]}),a&&O.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};class fle extends Ge{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?r=>{const n=document.createElement("div");return n.append(cn.fromSchema(this.store.schema).serializeFragment(r.content)),n.innerHTML}:void 0}}}}const ple=({mode:e,onChange:t,state:r,value:n})=>{const{setContent:o}=pi(),{getMarkdown:i,getHTML:s}=gm(),a=S.useRef(null),l=S.useRef(!1),c=S.useRef(0),u=sj();return S.useEffect(()=>{c.current+=1},[u]),S.useEffect(()=>{l.current=!!n&&n.length>0,a.current!==n&&(a.current=n,o(n||""),c.current=-1)},[o,n]),S.useEffect(()=>{if(!t)return;function d(){switch(e){case"Markdown":return i(r);default:return s(r)}}if(c.current<=0)return;let f=d().trim();f&&f.length>0&&hle.indexOf(f)>=0&&(f=""),a.current!==f&&(!l.current&&f.length===0?t(void 0):t(f),a.current=f,l.current=!!f&&f.length>0)},[s,i,e,t,r]),null},hle=["

    ",'

    ','

    '],mle=({node:e,getPosition:t,view:r})=>{const n=S.useCallback(o=>{const i=r.state.tr.setNodeAttribute(t(),"html",o.target.value);r.dispatch(i)},[t,r]);return O.jsxs("div",{className:"squidex-editor-html",children:[O.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),O.jsx("textarea",{spellCheck:"false",value:e.attrs.content,onChange:n})]})};var gle=Object.defineProperty,vle=Object.getOwnPropertyDescriptor,FO=(e,t,r,n)=>{for(var o=n>1?void 0:n?vle(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gle(t,r,o),o};let Rh=class extends nr{constructor(){super({disableExtraAttributes:!0});Fe(this,"ReactComponent",mle)}get name(){return"plainHtml"}createTags(){return[ie.Block,ie.TextBlock,ie.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:t=>{const r=t.attrs.html;return["div",{class:"__editor_html"},...yle(r)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:t=>({content:t.innerHTML}),priority:1e4}]}}insertPlainHtml(t){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:t})}};FO([Y({})],Rh.prototype,"insertPlainHtml",1);Rh=FO([ve({defaultOptions:{}})],Rh);function yle(e){if(!e)return[""];const t=document.createElement("div");return t.innerHTML=e,VO(t)}function ble(e){const t={};for(let r=0;r{const t=cc(),r=S.useCallback(async()=>{const n=await e();xle(n)&&n.length>0&&t.insertText(n),t.run()},[t,e]);return O.jsx(ht,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:O.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"AI"})})};function xle(e){return typeof e=="string"||e instanceof String}const jO=e=>{const t=S.useRef(null);return S.useEffect(()=>{const r=window.requestAnimationFrame(()=>{var n;(n=t.current)==null||n.focus()});return()=>{window.cancelAnimationFrame(r)}},[]),O.jsx("input",{className:"squidex-editor-input",ref:t,...e})},UO=({children:e,title:t})=>O.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[O.jsx("div",{className:"squidex-editor-modal-backdrop"}),O.jsxs("div",{className:"squidex-editor-modal-window",children:[t&&O.jsx("div",{className:"squidex-editor-modal-title",children:t}),O.jsx("div",{className:"squidex-editor-modal-body",children:e})]})]}),wle=({onSelectAssets:e})=>{const t=cc(),r=S.useCallback(async()=>{const n=await e();for(const o of n){if(o.mimeType.startsWith("image/")){const i={src:o.src,alt:o.alt,title:o.fileName};t.insertImage(i)}else t.insertAsset(o);t.insertText(" ")}t.run()},[t,e]);return O.jsx(ht,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:O.jsx(ui,{type:"Assets"})})},Sle=({onSelectContents:e})=>{const t=cc(),r=S.useCallback(async()=>{const n=await e();for(const o of n)t.addContent(o);t.run()},[t,e]);return O.jsx(ht,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:O.jsx(ui,{type:"Contents"})})},Ele=()=>{const e=cc(),t=S.useCallback(async()=>{e.insertPlainHtml().run()},[e]);return O.jsx(ht,{commandName:"addImage",enabled:!0,onSelect:t,label:"Add HTML",icon:O.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:"HTML"})})},Cle=({attrs:e,...t})=>{const{setClassName:r}=or(),n=S.useCallback(()=>{r(e.className)},[e.className,r]),o=Gr().className(e);return O.jsx(Bb,{...t,commandName:"toggleClass",active:o,attrs:e,enabled:!0,onSelect:n,label:(e==null?void 0:e.className)||"No Class"})},Mle=({...e})=>{const{removeClassName:t}=or(),r=S.useCallback(()=>{t()},[t]),n=!Gr().className();return O.jsx(Bb,{...e,commandName:"removeClass",active:n,attrs:{},enabled:!0,onSelect:r,label:"No Class"})},Tle=()=>{const e=Ud(ec);return!e.options.classNames||e.options.classNames.length===0?null:O.jsxs(DT,{"aria-label":"Class Name",icon:O.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[O.jsx(Mle,{}),e.options.classNames.map(t=>O.jsx(Cle,{attrs:{className:t}},t))]})},Ole=()=>{const e=Ud(as);return O.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",O.jsx("strong",{children:e.getWordCount()}),", Characters: ",O.jsx("strong",{children:e.getCharacterCount()})]})},OS=({onEdit:e})=>{const t=cc(),n=Gr().link(),o=ib(),i=S.useCallback(()=>{t.removeLink().focus().run()},[t]);return O.jsxs(O.Fragment,{children:[O.jsx(ht,{commandName:"updateLink",enabled:!o.empty,label:"Add or Edit Link",onSelect:e,icon:"link"}),O.jsx(ht,{commandName:"removeLink",enabled:n,label:"Remove Link",onSelect:i,icon:"linkUnlink"})]})},_le=({onClose:e})=>{const[t,r,n]=LO(""),o=cc(),i=GV(!0).link(),s=(i==null?void 0:i.href)??"",a=ib();S.useEffect(()=>{r(s)},[s,a,r]);const l=S.useCallback(()=>{const d=n.current;d?o.updateLink({href:d,auto:!1}):o.removeLink(),o.focus(a.to).run(),e()},[o,n,e,a.to]),c=S.useCallback(d=>{r(d.target.value)},[r]),u=S.useCallback(d=>{const{code:f}=d;f==="Enter"&&l(),f==="Escape"&&e()},[e,l]);return O.jsxs(UO,{title:"Change Link",children:[O.jsx(jO,{value:t,onChange:c,onKeyDown:u,placeholder:"Enter Link..."}),O.jsxs(Mn,{children:[O.jsx(ht,{commandName:"submitLink",enabled:!0,onSelect:l,icon:O.jsx(ui,{type:"Check"})}),O.jsx(ht,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:O.jsx(ui,{type:"Cancel"})})]})]})},Ale=({onClose:e,node:t})=>{const[r,n,o]=LO(""),i=or();S.useEffect(()=>{n(t.node.attrs.title||"")},[t,n]);const s=S.useCallback(c=>{n(c.target.value)},[n]),a=S.useCallback(()=>{i.updateNodeAttributes(t.getPos()||0,{...t.node.attrs||{},title:o.current}),e()},[i,t,e,o]),l=S.useCallback(c=>{const{code:u}=c;u==="Enter"&&a(),u==="Escape"&&e()},[e,a]);return O.jsxs(UO,{title:"Change Image Title",children:[O.jsx(jO,{value:r,onChange:s,onKeyDown:l,placeholder:"Enter Title..."}),O.jsxs(Mn,{children:[O.jsx(ht,{commandName:"submitLink",enabled:!0,onSelect:a,icon:O.jsx(ui,{type:"Check"})}),O.jsx(ht,{commandName:"cancelLink",enabled:!0,onSelect:e,icon:O.jsx(ui,{type:"Cancel"})})]})]})};const Rle=e=>{const{appName:t,classNames:r,canSelectAIText:n,canSelectAssets:o,canSelectContents:i,isDisabled:s,mode:a,onChange:l,onEditAsset:c,onEditContent:u,onSelectAIText:d,onSelectAssets:f,onSelectContents:p,onUpload:h,value:m}=e,b=S.useMemo(()=>{let z=e.baseUrl;return z.endsWith("/")&&(z=z.substring(0,z.length-1)),z},[e.baseUrl]),[v,g]=S.useState(),[y,k]=S.useState(!1),x=S.useCallback(()=>{k(!0)},[]),w=S.useCallback(()=>{k(!1)},[]),E=S.useCallback(()=>{g(null)},[]),M=S.useCallback(()=>[new sk,new ba({}),new bd({enableSpine:!0}),new ec({classNames:r}),new co({}),new xd,new Td({appName:t,baseUrl:b,onEditContent:u}),new as({}),new xh,new wh({}),new Sh,new fle({copyAsHtml:a==="Html"}),new wd({uploadHandler:h}),new Sd,new ka({autoLink:!0}),new ya({enableCollapsible:!0}),new Zl({copyAsMarkdown:a==="Markdown",htmlToMarkdown:sle,markdownToHtml:ale}),new kd,new Rh,new Cd,new bv,new Md],[t,b,r,a,u,h]),{manager:C,state:T,setState:R}=ij({stringHandler:a==="Markdown"?"markdown":"html",content:m,nodeViewComponents:{image:z=>O.jsx(dle,{...z,appName:t,baseUrl:b,onEditNode:g,onEditAsset:c})},extensions:M});return O.jsx(fte,{children:O.jsx(cte,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:O.jsxs(lj,{classNames:s?["squidex-editor-disabled"]:[],manager:C,state:T,onChange:z=>R(z.state),children:[O.jsx("div",{className:"squidex-editor-menu",children:O.jsxs(HT,{children:[O.jsx(ate,{}),O.jsx(ste,{showAll:!0}),O.jsxs(Mn,{children:[O.jsx(fv,{}),O.jsx(hv,{}),O.jsx(mv,{}),O.jsx(pv,{})]}),O.jsxs(Mn,{children:[O.jsx(qee,{}),O.jsx(Yee,{}),O.jsx(Wee,{})]}),O.jsxs(Mn,{children:[O.jsx(Gee,{}),O.jsx(Xee,{})]}),a==="Html"&&r&&r.length>0&&O.jsx(Mn,{children:O.jsx(Tle,{})}),O.jsx(Mn,{children:O.jsx(OS,{onEdit:x})}),O.jsxs(Mn,{children:[o&&f&&O.jsx(wle,{onSelectAssets:f}),i&&p&&O.jsx(Sle,{onSelectContents:p}),n&&d&&O.jsx(kle,{onSelectAIText:d})]}),a==="Html"&&O.jsx(Mn,{children:O.jsx(Ele,{})})]})}),O.jsx(ple,{mode:a,onChange:l,state:T,value:m}),O.jsx(Q0,{}),y?O.jsx(_le,{onClose:w}):v?O.jsx(Ale,{node:v,onClose:E}):O.jsxs(dte,{className:"squidex-editor-floating",children:[O.jsx(fv,{}),O.jsx(hv,{}),O.jsx(mv,{}),O.jsx(pv,{}),O.jsx(OS,{onEdit:x})]}),O.jsx(Ole,{})]})})})};var WO,_S=fm;WO=_S.createRoot,_S.hydrateRoot;class Nle{constructor(t,r){Fe(this,"root");this.element=t,this.props=r,this.root=WO(this.element),this.render()}update(t){this.props={...this.props,...t},this.render()}setValue(t){this.update({value:t})}setIsDisabled(t){this.update({isDisabled:t})}destroy(){this.root.unmount()}render(){this.root.render(O.jsx(Rle,{...this.props}))}}window.SquidexEditorWrapper=Nle;