From 6c56c62075424b9db2df05c8f0ca532d3d8615ca Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 19 Nov 2023 18:35:25 +0100 Subject: [PATCH] Update editor. --- .../Squidex/wwwroot/editor/squidex-editor.js | 511 ++++++----- frontend/package-lock.json | 854 +++++++++--------- frontend/package.json | 57 +- frontend/src/app/declarations.d.ts | 41 +- .../pages/calendar/calendar-page.component.ts | 48 +- .../workflows/workflow-diagram.component.ts | 100 +- .../forms/editors/code-editor.component.ts | 144 +-- .../angular/video-player.component.ts | 16 +- .../forms/geolocation-editor.component.ts | 165 ++-- .../components/forms/rich-editor.component.ts | 118 +-- .../src/app/shared/services/auth.service.ts | 10 +- frontend/tsconfig.app.json | 1 - 12 files changed, 1058 insertions(+), 1007 deletions(-) diff --git a/backend/src/Squidex/wwwroot/editor/squidex-editor.js b/backend/src/Squidex/wwwroot/editor/squidex-editor.js index 65509ef9a..f6e9dc7a7 100644 --- a/backend/src/Squidex/wwwroot/editor/squidex-editor.js +++ b/backend/src/Squidex/wwwroot/editor/squidex-editor.js @@ -1,4 +1,4 @@ -var r4=Object.defineProperty;var o4=(t,e,n)=>e in t?r4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ct=(t,e,n)=>(o4(t,typeof e!="symbol"?e+"":e,n),n),i4=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Uv=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var xf=(t,e,n)=>(i4(t,e,"access private method"),n);function s4(t,e){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(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"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(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 r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H_={exports:{}},nm={},U_={exports:{}},Ve={};/** +var h4=Object.defineProperty;var f4=(e,t,n)=>t in e?h4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>(f4(e,typeof t!="symbol"?t+"":t,n),n),p4=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Gv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Cf=(e,t,n)=>(p4(e,t,"access private method"),n);function g4(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var dt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ko(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q_={exports:{}},sm={},Z_={exports:{}},je={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var r4=Object.defineProperty;var o4=(t,e,n)=>e in t?r4(t,e,{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 $h=Symbol.for("react.element"),a4=Symbol.for("react.portal"),l4=Symbol.for("react.fragment"),c4=Symbol.for("react.strict_mode"),u4=Symbol.for("react.profiler"),d4=Symbol.for("react.provider"),h4=Symbol.for("react.context"),f4=Symbol.for("react.forward_ref"),p4=Symbol.for("react.suspense"),g4=Symbol.for("react.memo"),m4=Symbol.for("react.lazy"),YE=Symbol.iterator;function v4(t){return t===null||typeof t!="object"?null:(t=YE&&t[YE]||t["@@iterator"],typeof t=="function"?t:null)}var W_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V_=Object.assign,j_={};function iu(t,e,n){this.props=t,this.context=e,this.refs=j_,this.updater=n||W_}iu.prototype.isReactComponent={};iu.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};iu.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function G_(){}G_.prototype=iu.prototype;function ib(t,e,n){this.props=t,this.context=e,this.refs=j_,this.updater=n||W_}var sb=ib.prototype=new G_;sb.constructor=ib;V_(sb,iu.prototype);sb.isPureReactComponent=!0;var XE=Array.isArray,K_=Object.prototype.hasOwnProperty,ab={current:null},Y_={key:!0,ref:!0,__self:!0,__source:!0};function X_(t,e,n){var r,o={},i=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(i=""+e.key),e)K_.call(e,r)&&!Y_.hasOwnProperty(r)&&(o[r]=e[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1e in t?r4(t,e,{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 k4=P,E4=Symbol.for("react.element"),S4=Symbol.for("react.fragment"),C4=Object.prototype.hasOwnProperty,T4=k4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A4={key:!0,ref:!0,__self:!0,__source:!0};function q_(t,e,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)C4.call(e,r)&&!A4.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:E4,type:t,key:i,ref:s,props:o,_owner:T4.current}}nm.Fragment=S4;nm.jsx=q_;nm.jsxs=q_;H_.exports=nm;var j=H_.exports,c0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(u){var c=new Error;r(u,"stack",{configurable:!0,get:function(){var h=c.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(u,"stack",{configurable:!0,value:h,writable:!0})}})});function i(a){a!==void 0&&r(this,"message",{configurable:!0,value:a,writable:!0});var u=this.constructor.name;u!==void 0&&u!==this.name&&r(this,"name",{configurable:!0,value:u,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function a(c,d){return r(c,"name",{configurable:!0,value:d})}try{var u=function(){};if(a(u,"foo"),u.name==="foo")return a}catch{}}();function l(a,u){if(u==null||u===Error)u=i;else if(typeof u!="function")throw new TypeError("super_ should be a function");var c;if(typeof a=="string")c=a,a=n!==void 0?function(){return n(u,arguments,this.constructor)}:function(){u.apply(this,arguments)},s!==void 0&&(s(a,c),c=void 0);else if(typeof a!="function")throw new TypeError("constructor should be either a string or a function");a.super_=a.super=u;var d={constructor:{configurable:!0,value:a,writable:!0}};return c!==void 0&&(d.name={configurable:!0,value:c,writable:!0}),a.prototype=Object.create(u.prototype,d),a}e=t.exports=l,e.BaseError=i})(c0,c0.exports);var Z_=c0.exports,ZE="ProseMirror-selectednode",cb="",ws="\0",QE="__state_override__",_4={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"},Ee=_4,Bi=Symbol.for("__remirror__"),bn=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(bn||{}),dt=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(dt||{}),mr=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(mr||{}),oe=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(oe||{}),re=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(re||{}),R4=function(e){return M4(e)&&!O4(e)};function M4(t){return!!t&&typeof t=="object"}function O4(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||N4(t)}var I4=typeof Symbol=="function"&&Symbol.for,L4=I4?Symbol.for("react.element"):60103;function N4(t){return t.$$typeof===L4}function $4(t){return Array.isArray(t)?[]:{}}function Fd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?_c($4(t),t,e):t}function D4(t,e,n){return t.concat(e).map(function(r){return Fd(r,n)})}function P4(t,e){if(!e.customMerge)return _c;var n=e.customMerge(t);return typeof n=="function"?n:_c}function z4(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function JE(t){return Object.keys(t).concat(z4(t))}function Q_(t,e){try{return e in t}catch{return!1}}function F4(t,e){return Q_(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function B4(t,e,n){var r={};return n.isMergeableObject(t)&&JE(t).forEach(function(o){r[o]=Fd(t[o],n)}),JE(e).forEach(function(o){F4(t,o)||(Q_(t,o)&&n.isMergeableObject(e[o])?r[o]=P4(o,n)(t[o],e[o],n):r[o]=Fd(e[o],n))}),r}function _c(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||D4,n.isMergeableObject=n.isMergeableObject||R4,n.cloneUnlessOtherwiseSpecified=Fd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):B4(t,e,n):Fd(e,n)}_c.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return _c(r,o,n)},{})};var H4=_c,U4=H4;const W4=jo(U4);var V4=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const j4=jo(V4);/*! + */var O4=P,I4=Symbol.for("react.element"),L4=Symbol.for("react.fragment"),N4=Object.prototype.hasOwnProperty,$4=O4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D4={key:!0,ref:!0,__self:!0,__source:!0};function iR(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)N4.call(t,r)&&!D4.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:I4,type:e,key:i,ref:s,props:o,_owner:$4.current}}sm.Fragment=L4;sm.jsx=iR;sm.jsxs=iR;q_.exports=sm;var V=q_.exports,f0={exports:{}};(function(e,t){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(u){var c=new Error;r(u,"stack",{configurable:!0,get:function(){var h=c.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(u,"stack",{configurable:!0,value:h,writable:!0})}})});function i(a){a!==void 0&&r(this,"message",{configurable:!0,value:a,writable:!0});var u=this.constructor.name;u!==void 0&&u!==this.name&&r(this,"name",{configurable:!0,value:u,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function a(c,d){return r(c,"name",{configurable:!0,value:d})}try{var u=function(){};if(a(u,"foo"),u.name==="foo")return a}catch{}}();function l(a,u){if(u==null||u===Error)u=i;else if(typeof u!="function")throw new TypeError("super_ should be a function");var c;if(typeof a=="string")c=a,a=n!==void 0?function(){return n(u,arguments,this.constructor)}:function(){u.apply(this,arguments)},s!==void 0&&(s(a,c),c=void 0);else if(typeof a!="function")throw new TypeError("constructor should be either a string or a function");a.super_=a.super=u;var d={constructor:{configurable:!0,value:a,writable:!0}};return c!==void 0&&(d.name={configurable:!0,value:c,writable:!0}),a.prototype=Object.create(u.prototype,d),a}t=e.exports=l,t.BaseError=i})(f0,f0.exports);var sR=f0.exports,nS="ProseMirror-selectednode",fb="",Es="\0",rS="__state_override__",P4={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"},Ee=P4,Ui=Symbol.for("__remirror__"),wn=(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))(wn||{}),st=(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))(st||{}),vr=(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))(vr||{}),oe=(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))(oe||{}),re=(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))(re||{}),z4=function(t){return F4(t)&&!B4(t)};function F4(e){return!!e&&typeof e=="object"}function B4(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||W4(e)}var H4=typeof Symbol=="function"&&Symbol.for,U4=H4?Symbol.for("react.element"):60103;function W4(e){return e.$$typeof===U4}function V4(e){return Array.isArray(e)?[]:{}}function Ud(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Oc(V4(e),e,t):e}function j4(e,t,n){return e.concat(t).map(function(r){return Ud(r,n)})}function G4(e,t){if(!t.customMerge)return Oc;var n=t.customMerge(e);return typeof n=="function"?n:Oc}function K4(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function oS(e){return Object.keys(e).concat(K4(e))}function aR(e,t){try{return t in e}catch{return!1}}function Y4(e,t){return aR(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function X4(e,t,n){var r={};return n.isMergeableObject(e)&&oS(e).forEach(function(o){r[o]=Ud(e[o],n)}),oS(t).forEach(function(o){Y4(e,o)||(aR(e,o)&&n.isMergeableObject(t[o])?r[o]=G4(o,n)(e[o],t[o],n):r[o]=Ud(t[o],n))}),r}function Oc(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||j4,n.isMergeableObject=n.isMergeableObject||z4,n.cloneUnlessOtherwiseSpecified=Ud;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):X4(e,t,n):Ud(t,n)}Oc.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Oc(r,o,n)},{})};var q4=Oc,Z4=q4;const Q4=Ko(Z4);var J4=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const eD=Ko(J4);/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var J_=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! + */var lR=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 G4=J_;function eS(t){return G4(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var K4=function(e){var n,r;return!(eS(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,eS(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var tD=lR;function iS(e){return tD(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var nD=function(t){var n,r;return!(iS(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,iS(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var Y4=K4,X4=function(e){return Y4(e)||typeof e=="function"||Array.isArray(e)};/*! + */var rD=nD,oD=function(t){return rD(t)||typeof t=="function"||Array.isArray(t)};/*! * object.omit * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var q4=X4,Z4=function(e,n,r){if(!q4(e))return{};typeof n=="function"&&(r=n,n=[]),typeof n=="string"&&(n=[n]);for(var o=typeof r=="function",i=Object.keys(e),s={},l=0;l * * Copyright (c) 2014-2015 Jon Schlinkert, contributors. * Licensed under the MIT License - */var Q4=J_,J4=function(e,n){if(!Q4(e)&&typeof e!="function")return{};var r={};if(typeof n=="string")return n in e&&(r[n]=e[n]),r;for(var o=n.length,i=-1;++i{let d=a.prefixes[c]||"",h=u;return n===!1&&(r&&(h=h.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${r.join("")}]`,"g"),"")),r||(h=h.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),r&&(d=d.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),c===0?d+h:!d&&!h?"":s&&!d&&o.match(/\s/)?" "+h:(d||o)+h}).filter(Boolean)}function nD(t){const e=t.matchAll(eR).next().value,n=e?e.index:0;return t.slice(0,n+1).toUpperCase()+t.slice(n+1).toLowerCase()}function nR(t,e){return tR(t,e).reduce((n,r)=>n+nD(r),"")}function tS(t,e){return tR(t,{...e,prefix:"-"}).join("").toLowerCase()}function d0(t,e,n,r){var o,i=!1,s=0;function l(){o&&clearTimeout(o)}function a(){l(),i=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function u(){for(var c=arguments.length,d=new Array(c),h=0;ht?g():e!==!0&&(o=setTimeout(r?m:g,r===void 0?t-p:t))}return u.cancel=a,u}function rR(t,e,n){return n===void 0?d0(t,e,!1):d0(t,n,e!==!1)}function Ot(t,e,n){const r=t[e];return oR(!om(r),n),r}function oR(t,e){if(!t)throw new rD(e)}var rD=class extends Z_.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function cn(t){return Object.entries(t)}function Bd(t){return Object.keys(t)}function rm(t){return Object.values(t)}function sr(t,e,n){return t.includes(e,n)}function be(t){return Object.assign(Object.create(null),t)}function iR(t){return Object.prototype.toString.call(t)}function sR(t){return iR(t).slice(8,-1)}function Dh(t,e){return n=>typeof n!==t?!1:e?e(n):!0}function db(t){return e=>sR(e)===t}var om=Dh("undefined"),ke=Dh("string"),Yr=Dh("number",t=>!Number.isNaN(t)),tt=Dh("function");function oD(t){return t===null}function h0(t){return t===!0||t===!1}function Zs(t){if(sR(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})}function iD(t){return t==null||/^[bns]/.test(typeof t)}function Fs(t){return oD(t)||om(t)}function Dn(t){return!Fs(t)&&(tt(t)||Dh("object")(t))}var sD=db("RegExp");function aD(t){return db("Map")(t)}function lD(t){return db("Set")(t)}function Pp(t){return Dn(t)&&!aD(t)&&!lD(t)&&Object.keys(t).length===0}var Bt=Array.isArray;function Bs(t){return Bt(t)&&t.length===0}function nS(t){return Bt(t)&&t.length>0}function cD(t){return t.charAt(0).toUpperCase()+t.slice(1)}function su(t,e,n=r=>!!r){e.lastIndex=0;const r=[],o=e.flags;let i;o.includes("g")||(e=new RegExp(e.source,`g${o}`));do i=e.exec(t),i&&r.push(i);while(n(i));return e.lastIndex=0,r}function zp(){const t=Date.now(),e=zp.last||t;return zp.last=t>e?t:e+1}zp.last=0;function Rc(t=""){return`${t}${zp().toString(36)}`}function aR(t){return ub(t,e=>!om(e))}function uD(t){if(!Zs(t))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...t}}var lR=j4;function Mc(t,e=!1){const n=e?[...t].reverse():t,r=new Set(n);return e?[...r].reverse():[...r]}function cR(t){const e=[];for(const n of t){const r=Bt(n)?cR(n):[n];e.push(...r)}return e}function uR(){}function dR(...t){return W4.all(t,{isMergeableObject:Zs})}function dD({min:t,max:e,value:n}){return ne?e:n}function hD(t){return t[t.length-1]}function Ka(t,e){return[...t].map((n,r)=>({value:n,index:r})).sort((n,r)=>e(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function fD(t,e,n){try{if(ke(e)&&e in t)return t[e];Bt(e)&&(e=`['${e.join("']['")}']`);let r=t;return e.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,l,a,u)=>(r=r[s||l||a||u],"")),r===void 0?n:r}catch{return n}}function pD(t,e){const n=uD(e);let r=n;for(const[o,i]of t.entries()){const s=o>=t.length-1;let l=r[i];if(s){if(Bt(r)){const a=Number.parseInt(i.toString(),10);Yr(a)&&r.splice(a,1)}else Reflect.deleteProperty(r,i);return n}if(iD(l))return n;l=Bt(l)?[...l]:{...l},r[i]=l,r=l}return n}function gD(t){return e=>fD(e,t)}function hb(t,e,n=!1){const r=[],o=new Set,i=tt(e)?e:gD(e),s=n?[...t].reverse():t;for(const l of s){const a=i(l);o.has(a)||(o.add(a),r.push(l))}return n?r.reverse():r}function fb(t,e){const n=Bt(t)?t[0]:t;return Yr(e)?n<=e?Array.from({length:e+1-n},(r,o)=>o+n):Array.from({length:n+1-e},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function rS(t,...e){const n=e.filter(Yr);return t>=Math.min(...n)&&t<=Math.max(...n)}function hR(t){return tt(t)?t():t}var fR="https://remirror.io/docs/errors",mD={[re.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[re.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[re.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[re.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[re.MUTATION]:"Mutation of immutable value detected.",[re.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[re.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[re.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[re.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.",[re.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[re.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[re.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).",[re.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[re.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[re.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[re.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[re.INVALID_EXTENSION]:"The provided extension is invalid.",[re.INVALID_CONTENT]:"The content provided to the editor is not supported.",[re.INVALID_NAME]:"An invalid name was used for the extension.",[re.EXTENSION]:"An error occurred within an extension. More details should be made available.",[re.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[re.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[re.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[re.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[re.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.",[re.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[re.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[re.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[re.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.",[re.REACT_COMPONENTS]:"An error occurred within a remirror component.",[re.REACT_HOOKS]:"An error occurred within a remirror hook.",[re.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function vD(t){return ke(t)&&sr(rm(re),t)}function yD(t,e){const n=mD[t],r=n?`${n} + */var aD=lR,lD=function(t,n){if(!aD(t)&&typeof t!="function")return{};var r={};if(typeof n=="string")return n in t&&(r[n]=t[n]),r;for(var o=n.length,i=-1;++i{let d=a.prefixes[c]||"",h=u;return n===!1&&(r&&(h=h.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${r.join("")}]`,"g"),"")),r||(h=h.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),d="")),r&&(d=d.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),c===0?d+h:!d&&!h?"":s&&!d&&o.match(/\s/)?" "+h:(d||o)+h}).filter(Boolean)}function dD(e){const t=e.matchAll(cR).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function dR(e,t){return uR(e,t).reduce((n,r)=>n+dD(r),"")}function sS(e,t){return uR(e,{...t,prefix:"-"}).join("").toLowerCase()}function g0(e,t,n,r){var o,i=!1,s=0;function l(){o&&clearTimeout(o)}function a(){l(),i=!0}typeof t!="boolean"&&(r=n,n=t,t=void 0);function u(){for(var c=arguments.length,d=new Array(c),h=0;he?g():t!==!0&&(o=setTimeout(r?m:g,r===void 0?e-p:e))}return u.cancel=a,u}function hR(e,t,n){return n===void 0?g0(e,t,!1):g0(e,n,t!==!1)}function It(e,t,n){const r=e[t];return gb(!lm(r),n),r}function gb(e,t){if(!e)throw new hD(t)}var hD=class extends sR.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function cn(e){return Object.entries(e)}function Wd(e){return Object.keys(e)}function am(e){return Object.values(e)}function ar(e,t,n){return e.includes(t,n)}function be(e){return Object.assign(Object.create(null),e)}function fR(e){return Object.prototype.toString.call(e)}function pR(e){return fR(e).slice(8,-1)}function Bh(e,t){return n=>typeof n!==e?!1:t?t(n):!0}function mb(e){return t=>pR(t)===e}var lm=Bh("undefined"),ke=Bh("string"),Zr=Bh("number",e=>!Number.isNaN(e)),tt=Bh("function");function fD(e){return e===null}function m0(e){return e===!0||e===!1}function ta(e){if(pR(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function pD(e){return e==null||/^[bns]/.test(typeof e)}function Us(e){return fD(e)||lm(e)}function Pn(e){return!Us(e)&&(tt(e)||Bh("object")(e))}var gD=mb("RegExp");function mD(e){return mb("Map")(e)}function vD(e){return mb("Set")(e)}function Vd(e){return Pn(e)&&!mD(e)&&!vD(e)&&Object.keys(e).length===0}var Bt=Array.isArray;function Ws(e){return Bt(e)&&e.length===0}function aS(e){return Bt(e)&&e.length>0}function yD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function cu(e,t,n=r=>!!r){t.lastIndex=0;const r=[],o=t.flags;let i;o.includes("g")||(t=new RegExp(t.source,`g${o}`));do i=t.exec(e),i&&r.push(i);while(n(i));return t.lastIndex=0,r}function Hp(){const e=Date.now(),t=Hp.last||e;return Hp.last=e>t?e:t+1}Hp.last=0;function Ic(e=""){return`${e}${Hp().toString(36)}`}function gR(e){return pb(e,t=>!lm(t))}function bD(e){if(!ta(e))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}var mR=eD;function Lc(e,t=!1){const n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function vR(e){const t=[];for(const n of e){const r=Bt(n)?vR(n):[n];t.push(...r)}return t}function yR(){}function bR(...e){return Q4.all(e,{isMergeableObject:ta})}function wD({min:e,max:t,value:n}){return nt?t:n}function xD(e){return e[e.length-1]}function Vs(e,t){return[...e].map((n,r)=>({value:n,index:r})).sort((n,r)=>t(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function kD(e,t,n){try{if(ke(t)&&t in e)return e[t];Bt(t)&&(t=`['${t.join("']['")}']`);let r=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,s,l,a,u)=>(r=r[s||l||a||u],"")),r===void 0?n:r}catch{return n}}function ED(e,t){const n=bD(t);let r=n;for(const[o,i]of e.entries()){const s=o>=e.length-1;let l=r[i];if(s){if(Bt(r)){const a=Number.parseInt(i.toString(),10);Zr(a)&&r.splice(a,1)}else Reflect.deleteProperty(r,i);return n}if(pD(l))return n;l=Bt(l)?[...l]:{...l},r[i]=l,r=l}return n}function SD(e){return t=>kD(t,e)}function vb(e,t,n=!1){const r=[],o=new Set,i=tt(t)?t:SD(t),s=n?[...e].reverse():e;for(const l of s){const a=i(l);o.has(a)||(o.add(a),r.push(l))}return n?r.reverse():r}function yb(e,t){const n=Bt(e)?e[0]:e;return Zr(t)?n<=t?Array.from({length:t+1-n},(r,o)=>o+n):Array.from({length:n+1-t},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function ii(e,...t){const n=t.filter(Zr);return e>=Math.min(...n)&&e<=Math.max(...n)}function wR(e){return tt(e)?e():e}var xR="https://remirror.io/docs/errors",CD={[re.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[re.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[re.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[re.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[re.MUTATION]:"Mutation of immutable value detected.",[re.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[re.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[re.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[re.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.",[re.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[re.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[re.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).",[re.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[re.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[re.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[re.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[re.INVALID_EXTENSION]:"The provided extension is invalid.",[re.INVALID_CONTENT]:"The content provided to the editor is not supported.",[re.INVALID_NAME]:"An invalid name was used for the extension.",[re.EXTENSION]:"An error occurred within an extension. More details should be made available.",[re.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[re.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[re.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[re.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the ``.",[re.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.",[re.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[re.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[re.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[re.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.",[re.REACT_COMPONENTS]:"An error occurred within a remirror component.",[re.REACT_HOOKS]:"An error occurred within a remirror hook.",[re.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function TD(e){return ke(e)&&ar(am(re),e)}function AD(e,t){const n=CD[e],r=n?`${n} -`:"",o=e?`${e} +`:"",o=t?`${t} -`:"";return`${r}${o}For more information visit ${fR}#${t.toLowerCase()}`}var pR=class extends Z_.BaseError{constructor({code:t,message:e,disableLogging:n=!1}={}){const r=vD(t)?t:re.CUSTOM;super(yD(r,e)),this.errorCode=r,this.url=`${fR}#${r.toLowerCase()}`,n||console.error(this.message)}static create(t={}){return new pR(t)}};function we(t,e){if(!t)throw pR.create(e)}function im(t){if(typeof t!="object"||t===null)return t;const e=Symbol.toStringTag in t&&t[Symbol.toStringTag]==="Module"?t.default??t:t;return e&&typeof t=="object"&&"__esModule"in e&&e.__esModule&&e.default!==void 0?e.default:e}function Oa(t,e={}){return t}function Mn(t){this.content=t}Mn.prototype={constructor:Mn,find:function(t){for(var e=0;e>1}};Mn.from=function(t){if(t instanceof Mn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Mn(e)};function gR(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=gR(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function mR(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ue&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,n-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);ie)for(let i=0,s=0;se&&((sn)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new Q(r,o)}cutByIndex(e,n){return e==n?Q.empty:e==0&&n==this.content.length?this:new Q(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Q(o,i)}addToStart(e){return new Q([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Q(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;nthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?Ef(r+1,s):Ef(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Q.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Q(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Q.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;nr.type.rank-o.type.rank),n}}Ke.none=[];class Bp extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yR(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(vR(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ae.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(Q.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ae(e,r,o)}}ae.empty=new ae(Q.empty,0,0);function vR(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(vR(i.content,e-o-1,n-o-1)))}function yR(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=yR(s.content,e-i-1,n);return l&&t.replaceChild(o,s.copy(l))}function bD(t,e,n){if(n.openStart>t.depth)throw new Bp("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Bp("Inconsistent open depths");return bR(t,e,n,0)}function bR(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function wd(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ba(t.nodeAfter,r),i++));for(let l=i;lo&&f0(t,e,o+1),s=r.depth>o&&f0(n,r,o+1),l=[];return wd(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(wR(i,s),Ba(Ha(i,xR(t,e,n,r,o+1)),l)):(i&&Ba(Ha(i,Hp(t,e,o+1)),l),wd(e,n,o,l),s&&Ba(Ha(s,Hp(n,r,o+1)),l)),wd(r,null,o,l),new Q(l)}function Hp(t,e,n){let r=[];if(wd(null,t,n,r),t.depth>n){let o=f0(t,e,n+1);Ba(Ha(o,Hp(t,e,n+1)),r)}return wd(e,null,n,r),new Q(r)}function wD(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Q.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Oc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ya(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new Oc(n,r,i)}static resolveCached(e,n){for(let o=0;oe&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),kR(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Q.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Q.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,o,r)}};Ts.prototype.text=void 0;class Up extends Ts{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):kR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Up(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Up(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function kR(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Xa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new ED(e,n);if(r.next==null)return Xa.empty;let o=ER(r);r.next&&r.err("Unexpected trailing text");let i=MD(RD(o));return OD(i,r),i}matchType(e){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return i}).join(` -`)}}Xa.empty=new Xa(!0);class ED{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ER(t){let e=[];do e.push(SD(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function SD(t){let e=[];do e.push(CD(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function CD(t){let e=_D(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=TD(t,e);else break;return e}function oS(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function TD(t,e){let n=oS(t),r=n;return t.eat(",")&&(t.next!="}"?r=oS(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function AD(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function _D(t){if(t.eat("(")){let e=ER(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=AD(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function RD(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let u={term:a,to:l};return e[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new Xa(r.indexOf(t.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;nr[i]=new _R(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class ID{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ph{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=AR(o.attrs),this.excluded=null;let i=CR(this.attrs);this.instance=i?new Ke(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ke(this,TR(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Ph(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n-1}}let LD=class{constructor(e){this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Mn.from(e.nodes),n.marks=Mn.from(e.marks||{}),this.nodes=g0.compile(this.spec.nodes,this),this.marks=Ph.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Xa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?sS(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:sS(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(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof g0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Up(r,r.defaultAttrs,e,Ke.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Ts.fromJSON(this,e)}markFromJSON(e){return Ke.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function sS(t,e){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}let pb=class m0{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new lS(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new lS(this,n,!0);return r.addAll(e,n.from,n.to),ae.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;oe.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=cS(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=cS(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new m0(e,m0.schemaRules(e)))}};const RR={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},ND={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},MR={ol:!0,ul:!0},Wp=1,Vp=2,xd=4;function aS(t,e,n){return e!=null?(e?Wp:0)|(e==="full"?Vp:0):t&&t.whitespace=="pre"?Wp|Vp:n&~xd}class Sf{constructor(e,n,r,o,i,s,l){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Ke.none,this.stashMarks=[],this.match=s||(l&xd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Q.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wp)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Q.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Q.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;nthis.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` -`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=Ke.none,r=Ke.none;for(let o=0;o{s.clearMark(l)&&(r=l.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(e,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(e):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let n=FD(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function $D(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&MR.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function DD(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function PD(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function cS(t){let e={};for(let n in t)e[n]=t[n];return e}function zD(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ur.renderSpec(Kv(r),o(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=n[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let c in a)if(a[c]!=null){let d=c.indexOf(" ");d>0?l.setAttributeNS(c.slice(0,d),c.slice(d+1),a[c]):l.setAttribute(c,a[c])}}for(let c=u;cu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:f}=Ur.renderSpec(e,d,r);if(l.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ur(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=uS(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return uS(e.marks)}}function uS(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Kv(t){return t.document||window.document}const OR=65535,IR=Math.pow(2,16);function BD(t,e){return t+e*IR}function dS(t){return t&OR}function HD(t){return(t-(t&OR))/IR}const LR=1,NR=2,op=4,$R=8;class v0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$R)>0}get deletedBefore(){return(this.delInfo&(LR|op))>0}get deletedAfter(){return(this.delInfo&(NR|op))>0}get deletedAcross(){return(this.delInfo&op)>0}}class Fr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Fr.empty)return Fr.empty}recover(e){let n=0,r=dS(e);if(!this.inverted)for(let o=0;oe)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(e<=d){let h=u?e==a?-1:e==d?1:n:n,f=a+o+(h<0?0:c);if(r)return f;let p=e==(n<0?a:d)?null:BD(l/3,e-a),g=e==a?NR:e==d?LR:op;return(n<0?e!=a:e!=d)&&(g|=$R),new v0(f,g,p)}o+=c-u}return r?e+o:new v0(e+o,0,null)}touches(e,n){let r=0,o=dS(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;le)break;let u=this.ranges[l+i],c=a+u;if(e<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=e.getMirror(n);this.appendMap(e.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new pc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Xt.fromReplace(e,this.from,this.to,i)}invert(){return new Po(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ii(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ii&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ii(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ii(n.from,n.to,e.markFromJSON(n.mark))}}dn.jsonID("addMark",Ii);class Po extends dn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ae(gb(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Xt.fromReplace(e,this.from,this.to,r)}invert(){return new Ii(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Po(n.pos,r.pos,this.mark)}merge(e){return e instanceof Po&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Po(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Po(n.from,n.to,e.markFromJSON(n.mark))}}dn.jsonID("removeMark",Po);class xs extends dn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Xt.fromReplace(e,this.pos,this.pos+1,new ae(Q.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new qt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new qt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}dn.jsonID("replaceAround",qt);function y0(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function UD(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),f=Math.min(u+a.nodeSize,n),p=r.addToSet(d);for(let g=0;gt.step(a)),i.forEach(a=>t.step(a))}function WD(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof Ph){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ct.step(new Po(s.from,s.to,s.style)))}function VD(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l=0;l--)t.step(i[l])}function jD(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function au(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(rn;p--)g||r.index(p)>0?(g=!0,c=Q.from(r.node(p).copy(c)),d++):a--;let h=Q.empty,f=0;for(let p=i,g=!1;p>n;p--)g||o.after(p+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Q.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new qt(o,i,o,i,new ae(r,0,0),n.length,!0))}function qD(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&ZD(t.doc,t.mapping.slice(i).map(l),r)){t.clearIncompatible(t.mapping.slice(i).map(l,1),r);let a=t.mapping.slice(i),u=a.map(l,1),c=a.map(l+s.nodeSize,1);return t.step(new qt(u,c,u+1,c-1,new ae(Q.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function ZD(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function QD(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new qt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ae(Q.from(s),0,0),1,!0))}function gc(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.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 u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),h=o.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=r&&r[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(f))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function JD(t,e,n=1,r){let o=t.doc.resolve(e),i=Q.empty,s=Q.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=Q.from(o.node(l).copy(i));let c=r&&r[u];s=Q.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}t.step(new yn(e,e,new ae(i.append(s),n,n),!0))}function zh(t,e){let n=t.resolve(e),r=n.index();return eP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function eP(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function tP(t,e,n){let r=new yn(e-n,e+n,ae.empty,!0);t.step(r)}function DR(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function vb(t,e,n=e,r=ae.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return PR(o,i,r)?new yn(e,n,r):new rP(o,i,r).fit()}function PR(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class rP{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Q.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Q.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new ae(i,s,l);return e>-1?new qt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new yn(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Xv(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(Q.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Xv(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ae(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Xv(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ae(Fu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ae(Fu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=m,c.push(zR(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?f:-1)))}let p=u==l.childCount;p||(f=-1),this.placed=Bu(this.placed,n,Q.from(c)),this.frontier[n].match=d,p&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,m=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=qv(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Bu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Bu(this.placed,this.depth,Q.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Q.empty,!0);n.childCount&&(this.placed=Bu(this.placed,this.frontier.length,n))}}function Fu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Fu(t.firstChild.content,e-1,n)))}function Bu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Bu(t.lastChild.content,e-1,n)))}function Xv(t,e){for(let n=0;n1&&(r=r.replaceChild(0,zR(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Q.empty,!0)))),t.copy(r)}function qv(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!oP(n,i.content,s)?l:null}function oP(t,e,n){for(let r=n;r0;h--,f--){let p=o.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==f&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,f=0;;f++){let p=h.firstChild;if(u.push(p),f==r.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let f=u[h],p=iP(f.type);if(p&&!f.sameMarkup(o.node(Math.abs(l)-1)))c=h;else if(p||!f.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let f=(h+c+1)%(r.openStart+1),p=u[f];if(p)for(let g=0;g=0&&(t.replace(e,n,r),!(t.steps.length>d));h--){let f=s[h];f<0||(e=o.before(f),n=i.after(f))}}function FR(t,e,n,r,o){if(er){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(Q.empty,!0))}return t}function aP(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=DR(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ae(Q.from(r),0,0))}function lP(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=BR(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function BR(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(ie.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class mc extends dn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Xt.fromReplace(e,this.pos,this.pos+1,new ae(Q.from(o),0,n.isLeaf?0:1))}getMap(){return Fr.empty}invert(e){return new mc(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new mc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new mc(n.pos,n.attr,n.value)}}dn.jsonID("attr",mc);class Hd extends dn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Xt.ok(r)}getMap(){return Fr.empty}invert(e){return new Hd(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Hd(n.attr,n.value)}}dn.jsonID("docAttr",Hd);let Lc=class extends Error{};Lc=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Lc.prototype=Object.create(Error.prototype);Lc.prototype.constructor=Lc;Lc.prototype.name="TransformError";class cP{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new pc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Lc(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ae.empty){let o=vb(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ae(Q.from(r),0,0))}delete(e,n){return this.replace(e,n,ae.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return sP(this,e,n,r),this}replaceRangeWith(e,n,r){return aP(this,e,n,r),this}deleteRange(e,n){return lP(this,e,n),this}lift(e,n){return GD(this,e,n),this}join(e,n=1){return tP(this,e,n),this}wrap(e,n){return XD(this,e,n),this}setBlockType(e,n=e,r,o=null){return qD(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return QD(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new mc(e,n,r)),this}setDocAttribute(e,n){return this.step(new Hd(e,n)),this}addNodeMark(e,n){return this.step(new xs(e,n)),this}removeNodeMark(e,n){if(!(n instanceof Ke)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Ic(e,n)),this}split(e,n=1,r){return JD(this,e,n,r),this}addMark(e,n,r){return UD(this,e,n,r),this}removeMark(e,n,r){return WD(this,e,n,r),this}clearIncompatible(e,n,r){return VD(this,e,n,r),this}}const Zv=Object.create(null);class Ue{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new uP(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n=0;i--){let s=n<0?Vl(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Vl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new or(e.node(0))}static atStart(e){return Vl(e,e,0,0,1)||new or(e)}static atEnd(e){return Vl(e,e,e.content.size,e.childCount,-1)||new or(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Zv[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Zv)throw new RangeError("Duplicate use of selection JSON ID "+e);return Zv[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ie.between(this.$anchor,this.$head).getBookmark()}}Ue.prototype.visible=!0;class uP{constructor(e,n){this.$from=e,this.$to=n}}let fS=!1;function pS(t){!fS&&!t.parent.inlineContent&&(fS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ie extends Ue{constructor(e,n=e){pS(e),pS(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ue.near(r);let o=e.resolve(n.map(this.anchor));return new Ie(o.parent.inlineContent?o:r,r)}replace(e,n=ae.empty){if(super.replace(e,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ie&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new sm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ie(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ue.findFrom(n,r,!0)||Ue.findFrom(n,-r,!0);if(i)n=i.$head;else return Ue.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Ue.findFrom(e,-r,!0)||Ue.findFrom(e,r,!0)).$anchor,e.pos0?0:1);o>0?s=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Le.isSelectable(l))return Le.create(t,n-(o<0?l.nodeSize:0))}else{let a=Vl(t,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function gS(t,e,n){let r=t.steps.length-1;if(r{s==null&&(s=c)}),t.setSelection(Ue.near(t.doc.resolve(s),n))}const mS=1,Cf=2,vS=4;class hP extends cP{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Cf,this}ensureMarks(e){return Ke.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Cf)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Cf,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ke.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Ue.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=vS,this}get scrolledIntoView(){return(this.updated&vS)>0}}function yS(t,e){return!e||!t?t:t.bind(e)}class Hu{constructor(e,n,r){this.name=e,this.init=yS(n.init,r),this.apply=yS(n.apply,r)}}const fP=[new Hu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Hu("selection",{init(t,e){return t.selection||Ue.atStart(e.doc)},apply(t){return t.selection}}),new Hu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Hu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Qv{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=fP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Hu(r.key,r.spec.state,r))})}}class Ia{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Qv(e.schema,e.plugins),i=new Ia(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ts.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Ue.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function HR(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=HR(o,e,{})),n[r]=o}return n}class gi{constructor(e){this.spec=e,this.props={},e.props&&HR(e.props,this,this.props),this.key=e.key?e.key.key:UR("plugin")}getState(e){return e[this.key]}}const Jv=Object.create(null);function UR(t){return t in Jv?t+"$"+ ++Jv[t]:(Jv[t]=0,t+"$")}class gl{constructor(e="key"){this.key=UR(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var pP=/[A-Z]/g,gP=/^ms-/,e1={};function mP(t){return"-"+t.toLowerCase()}function vP(t){if(e1.hasOwnProperty(t))return e1[t];var e=t.replace(pP,mP);return e1[t]=gP.test(e)?"-"+e:e}function yP(t){return vP(t)}function bP(t,e){return yP(t)+":"+e}function wP(t){var e="";for(var n in t){var r=t[n];typeof r!="string"&&typeof r!="number"||(e&&(e+=";"),e+=bP(n,r))}return e}function xP(){return typeof document<"u"?document:null}var WR=xP;function VR(t,e){if(typeof t!="string")return[t];var n=[t];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",i=!!e.flat;r.forEach(function(a){var u=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),c=[];function d(h,f,p){var g=n.push(h.slice(a[0].length,-a[1].length))-1;return c.push(g),o+g+o}n.forEach(function(h,f){for(var p,g=0;h!=p;)if(p=h,h=h.replace(u,d),g++>1e4)throw Error("References have circular dependency. Please, check them.");n[f]=h}),c=c.reverse(),n=n.map(function(h){return c.forEach(function(f){h=h.replace(new RegExp("(\\"+o+f+"\\"+o+")","g"),a[0]+"$1"+a[1])}),h})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function l(a,u,c){for(var d=[],h,f=0;h=s.exec(a);){if(f++>1e4)throw Error("Circular references in parenthesis");d.push(a.slice(0,h.index)),d.push(l(u[h[1]],u)),a=a.slice(h.index+h[0].length)}return d.push(a),d}return i?n:l(n[0],n)}function jR(t,e){if(e&&e.flat){var n=e&&e.escape||"___",r=t[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),s=0;r!=o;){if(s++>1e4)throw Error("Circular references in "+t);o=r,r=r.replace(i,l)}return r}return t.reduce(function a(u,c){return Array.isArray(c)&&(c=c.reduce(a,"")),u+c},"");function l(a,u){if(t[u]==null)throw Error("Reference "+u+"is undefined");return t[u]}}function GR(t,e){return Array.isArray(t)?jR(t,e):VR(t,e)}GR.parse=VR;GR.stringify=jR;const kP={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},EP={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},SP={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},CP={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},TP={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},AP={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},_P={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},RP={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var Hs=Object.freeze({__proto__:null,COPY_DESCRIPTION:EP,COPY_LABEL:kP,CUT_DESCRIPTION:CP,CUT_LABEL:SP,PASTE_DESCRIPTION:AP,PASTE_LABEL:TP,SELECT_ALL_DESCRIPTION:RP,SELECT_ALL_LABEL:_P});const MP={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},OP={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},IP={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},LP={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},NP={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},$P={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},DP={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},PP={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},zP={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},FP={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},BP={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},HP={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},UP={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},WP={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},VP={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},jP={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},GP={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},KP={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},YP={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var on=Object.freeze({__proto__:null,ALT_KEY:$P,ARROW_DOWN_KEY:YP,ARROW_LEFT_KEY:jP,ARROW_RIGHT_KEY:GP,ARROW_UP_KEY:KP,BACKSPACE_KEY:PP,CAPS_LOCK_KEY:DP,COMMAND_KEY:OP,CONTROL_KEY:IP,DELETE_KEY:BP,END_KEY:VP,ENTER_KEY:LP,ESCAPE_KEY:MP,HOME_KEY:WP,PAGE_DOWN_KEY:UP,PAGE_UP_KEY:HP,SHIFT_KEY:NP,SPACE_KEY:FP,TAB_KEY:zP});const XP={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},qP={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var bS=Object.freeze({__proto__:null,DESCRIPTION:qP,LABEL:XP});const ZP={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},QP={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var wS=Object.freeze({__proto__:null,DESCRIPTION:QP,LABEL:ZP});const JP={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},e5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var t5=Object.freeze({__proto__:null,DESCRIPTION:e5,LABEL:JP});const n5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},r5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var o5=Object.freeze({__proto__:null,DESCRIPTION:r5,LABEL:n5});const i5={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1} +`:"";return`${r}${o}For more information visit ${xR}#${e.toLowerCase()}`}var kR=class extends sR.BaseError{constructor({code:e,message:t,disableLogging:n=!1}={}){const r=TD(e)?e:re.CUSTOM;super(AD(r,t)),this.errorCode=r,this.url=`${xR}#${r.toLowerCase()}`,n||console.error(this.message)}static create(e={}){return new kR(e)}};function we(e,t){if(!e)throw kR.create(t)}function cm(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 $a(e,t={}){return e}function Mn(e){this.content=e}Mn.prototype={constructor:Mn,find:function(e){for(var t=0;t>1}};Mn.from=function(e){if(e instanceof Mn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Mn(t)};function ER(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=ER(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function SR(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;ut&&r(a,o+l,i||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(t,a)-a,n-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(l.isText?l=l.cut(Math.max(0,t-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,t-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=a}return new Q(r,o)}cutByIndex(t,n){return t==n?Q.empty:t==0&&n==this.content.length?this:new Q(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new Q(o,i)}addToStart(t){return new Q([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Q(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||n>0?Af(r+1,s):Af(r,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,n){if(!n)return Q.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Q(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Q.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}}Ke.none=[];class Wp extends Error{}class ae{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=TR(this.content,t+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ae(CR(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ae.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(Q.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ae(t,r,o)}}ae.empty=new ae(Q.empty,0,0);function CR(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(CR(i.content,t-o-1,n-o-1)))}function TR(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=TR(s.content,t-i-1,n);return l&&e.replaceChild(o,s.copy(l))}function _D(e,t,n){if(n.openStart>e.depth)throw new Wp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Wp("Inconsistent open depths");return AR(e,t,n,0)}function AR(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Ed(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Va(e.nodeAfter,r),i++));for(let l=i;lo&&v0(e,t,o+1),s=r.depth>o&&v0(n,r,o+1),l=[];return Ed(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(_R(i,s),Va(ja(i,RR(e,t,n,r,o+1)),l)):(i&&Va(ja(i,Vp(e,t,o+1)),l),Ed(t,n,o,l),s&&Va(ja(s,Vp(n,r,o+1)),l)),Ed(r,null,o,l),new Q(l)}function Vp(e,t,n){let r=[];if(Ed(null,e,n,r),e.depth>n){let o=v0(e,t,n+1);Va(ja(o,Vp(e,t,n+1)),r)}return Ed(t,null,n,r),new Q(r)}function RD(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(Q.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Nc{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Za(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:l,offset:a}=s.content.findIndex(i),u=i-a;if(r.push(s,l,o+a),!u||(s=s.child(l),s.isText))break;i=u-1,o+=a+1}return new Nc(n,r,i)}static resolveCached(t,n){for(let o=0;ot&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),MR(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Q.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=Q.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};Rs.prototype.text=void 0;class jp extends Rs{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):MR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new jp(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new jp(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function MR(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Qa{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new ID(t,n);if(r.next==null)return Qa.empty;let o=OR(r);r.next&&r.err("Unexpected trailing text");let i=FD(zD(o));return BD(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` +`)}}Qa.empty=new Qa(!0);class ID{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function OR(e){let t=[];do t.push(LD(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function LD(e){let t=[];do t.push(ND(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function ND(e){let t=PD(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=$D(e,t);else break;return t}function lS(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function $D(e,t){let n=lS(e),r=n;return e.eat(",")&&(e.next!="}"?r=lS(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function DD(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function PD(e){if(e.eat("(")){let t=OR(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=DD(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function zD(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,l,a){let u={term:a,to:l};return t[s].push(u),u}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(i(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=i(s.exprs[a],l);if(a==s.exprs.length-1)return u;o(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u{e[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=t[r.join(",")]=new Qa(r.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new DR(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class HD{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Hh{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=$R(o.attrs),this.excluded=null;let i=LR(this.attrs);this.instance=i?new Ke(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Ke(this,NR(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new Hh(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}let UD=class{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Mn.from(t.nodes),n.marks=Mn.from(t.marks||{}),this.nodes=b0.compile(this.spec.nodes,this),this.marks=Hh.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Qa.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?uS(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:uS(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,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof b0){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new jp(r,r.defaultAttrs,t,Ke.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Rs.fromJSON(this,t)}markFromJSON(t){return Ke.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function uS(e,t){let n=[];for(let r=0;r-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}let bb=class w0{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new hS(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new hS(this,n,!0);return r.addAll(t,n.from,n.to),ae.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=fS(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=>{r(s=fS(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new w0(t,w0.schemaRules(t)))}};const PR={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},WD={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},zR={ol:!0,ul:!0},Gp=1,Kp=2,Sd=4;function dS(e,t,n){return t!=null?(t?Gp:0)|(t==="full"?Kp:0):e&&e.whitespace=="pre"?Gp|Kp:n&~Sd}class _f{constructor(t,n,r,o,i,s,l){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Ke.none,this.stashMarks=[],this.match=s||(l&Sd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Q.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Gp)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Q.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Q.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;nthis.addAll(t)),s&&this.sync(l),this.needsBlock=a}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 n=Ke.none,r=Ke.none;for(let o=0;o{s.clearMark(l)&&(r=l.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(t,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=YD(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];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==n)break}}}function VD(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&zR.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function jD(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function GD(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function fS(e){let t={};for(let n in e)t[n]=e[n];return t}function KD(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=l=>{i.push(l);for(let a=0;a{if(i.length||s.marks.length){let l=0,a=0;for(;l=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&jr.renderSpec(Zv(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?t.createElementNS(r,o):t.createElement(o),a=n[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let c in a)if(a[c]!=null){let d=c.indexOf(" ");d>0?l.setAttributeNS(c.slice(0,d),c.slice(d+1),a[c]):l.setAttribute(c,a[c])}}for(let c=u;cu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:f}=jr.renderSpec(t,d,r);if(l.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new jr(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=pS(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return pS(t.marks)}}function pS(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Zv(e){return e.document||window.document}const FR=65535,BR=Math.pow(2,16);function XD(e,t){return e+t*BR}function gS(e){return e&FR}function qD(e){return(e-(e&FR))/BR}const HR=1,UR=2,lp=4,WR=8;class x0{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&WR)>0}get deletedBefore(){return(this.delInfo&(HR|lp))>0}get deletedAfter(){return(this.delInfo&(UR|lp))>0}get deletedAcross(){return(this.delInfo&lp)>0}}class Wr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Wr.empty)return Wr.empty}recover(t){let n=0,r=gS(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[l+i],c=this.ranges[l+s],d=a+u;if(t<=d){let h=u?t==a?-1:t==d?1:n:n,f=a+o+(h<0?0:c);if(r)return f;let p=t==(n<0?a:d)?null:XD(l/3,t-a),g=t==a?UR:t==d?HR:lp;return(n<0?t!=a:t!=d)&&(g|=WR),new x0(f,g,p)}o+=c-u}return r?t+o:new x0(t+o,0,null)}touches(t,n){let r=0,o=gS(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+i],c=a+u;if(t<=c&&l==o*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new vc;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Xt.fromReplace(t,this.from,this.to,i)}invert(){return new Fo(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ni(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ni&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ni(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ni(n.from,n.to,t.markFromJSON(n.mark))}}dn.jsonID("addMark",Ni);class Fo extends dn{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ae(wb(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return Xt.fromReplace(t,this.from,this.to,r)}invert(){return new Ni(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Fo(n.pos,r.pos,this.mark)}merge(t){return t instanceof Fo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Fo(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Fo(n.from,n.to,t.markFromJSON(n.mark))}}dn.jsonID("removeMark",Fo);class Ss extends dn{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Xt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Xt.fromReplace(t,this.pos,this.pos+1,new ae(Q.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new qt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new qt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(t,n.slice),n.insert,!!n.structure)}}dn.jsonID("replaceAround",qt);function k0(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function ZD(e,t,n,r){let o=[],i=[],s,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,t),f=Math.min(u+a.nodeSize,n),p=r.addToSet(d);for(let g=0;ge.step(a)),i.forEach(a=>e.step(a))}function QD(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof Hh){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;ce.step(new Fo(s.from,s.to,s.style)))}function JD(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let l=0;l=0;l--)e.step(i[l])}function eP(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function uu(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;p--)g||r.index(p)>0?(g=!0,c=Q.from(r.node(p).copy(c)),d++):a--;let h=Q.empty,f=0;for(let p=i,g=!1;p>n;p--)g||o.after(p+1)=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Q.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new qt(o,i,o,i,new ae(r,0,0),n.length,!0))}function iP(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&sP(e.doc,e.mapping.slice(i).map(l),r)){e.clearIncompatible(e.mapping.slice(i).map(l,1),r);let a=e.mapping.slice(i),u=a.map(l,1),c=a.map(l+s.nodeSize,1);return e.step(new qt(u,c,u+1,c-1,new ae(Q.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function sP(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function aP(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new qt(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ae(Q.from(s),0,0),1,!0))}function yc(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.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 u=o.depth-1,c=n-2;u>i;u--,c--){let d=o.node(u),h=o.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=r&&r[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(f))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function lP(e,t,n=1,r){let o=e.doc.resolve(t),i=Q.empty,s=Q.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){i=Q.from(o.node(l).copy(i));let c=r&&r[u];s=Q.from(c?c.type.create(c.attrs,s):o.node(l).copy(s))}e.step(new bn(t,t,new ae(i.append(s),n,n),!0))}function Uh(e,t){let n=e.resolve(t),r=n.index();return cP(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function cP(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function uP(e,t,n){let r=new bn(t-n,t+n,ae.empty,!0);e.step(r)}function VR(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(i==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function kb(e,t,n=t,r=ae.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return jR(o,i,r)?new bn(t,n,r):new hP(o,i,r).fit()}function jR(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class hP{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Q.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=Q.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new ae(i,s,l);return t>-1?new qt(r.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new bn(r.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Jv(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(Q.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Jv(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ae(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Jv(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ae(Uu(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ae(Uu(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g1||a==0||g.content.size)&&(d=m,c.push(GR(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?f:-1)))}let p=u==l.childCount;p||(f=-1),this.placed=Wu(this.placed,n,Q.from(c)),this.frontier[n].match=d,p&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,m=l;g1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;l--){let{match:a,type:u}=this.frontier[l],c=e1(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Wu(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Wu(this.placed,this.depth,Q.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Q.empty,!0);n.childCount&&(this.placed=Wu(this.placed,this.frontier.length,n))}}function Uu(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Uu(e.firstChild.content,t-1,n)))}function Wu(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Wu(e.lastChild.content,t-1,n)))}function Jv(e,t){for(let n=0;n1&&(r=r.replaceChild(0,GR(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Q.empty,!0)))),e.copy(r)}function e1(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!fP(n,i.content,s)?l:null}function fP(e,t,n){for(let r=n;r0;h--,f--){let p=o.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==f&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,f=0;;f++){let p=h.firstChild;if(u.push(p),f==r.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let f=u[h],p=pP(f.type);if(p&&!f.sameMarkup(o.node(Math.abs(l)-1)))c=h;else if(p||!f.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let f=(h+c+1)%(r.openStart+1),p=u[f];if(p)for(let g=0;g=0&&(e.replace(t,n,r),!(e.steps.length>d));h--){let f=s[h];f<0||(t=o.before(f),n=i.after(f))}}function KR(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(Q.empty,!0))}return e}function mP(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=VR(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ae(Q.from(r),0,0))}function vP(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=YR(r,o);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return e.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function YR(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;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)&&n.push(o)}return n}class bc extends dn{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Xt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Xt.fromReplace(t,this.pos,this.pos+1,new ae(Q.from(o),0,n.isLeaf?0:1))}getMap(){return Wr.empty}invert(t){return new bc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new bc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new bc(n.pos,n.attr,n.value)}}dn.jsonID("attr",bc);class jd extends dn{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Xt.ok(r)}getMap(){return Wr.empty}invert(t){return new jd(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new jd(n.attr,n.value)}}dn.jsonID("docAttr",jd);let Dc=class extends Error{};Dc=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Dc.prototype=Object.create(Error.prototype);Dc.prototype.constructor=Dc;Dc.prototype.name="TransformError";class yP{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new vc}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Dc(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=ae.empty){let o=kb(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new ae(Q.from(r),0,0))}delete(t,n){return this.replace(t,n,ae.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return gP(this,t,n,r),this}replaceRangeWith(t,n,r){return mP(this,t,n,r),this}deleteRange(t,n){return vP(this,t,n),this}lift(t,n){return tP(this,t,n),this}join(t,n=1){return uP(this,t,n),this}wrap(t,n){return oP(this,t,n),this}setBlockType(t,n=t,r,o=null){return iP(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return aP(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new bc(t,n,r)),this}setDocAttribute(t,n){return this.step(new jd(t,n)),this}addNodeMark(t,n){return this.step(new Ss(t,n)),this}removeNodeMark(t,n){if(!(n instanceof Ke)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new $c(t,n)),this}split(t,n=1,r){return lP(this,t,n,r),this}addMark(t,n,r){return ZD(this,t,n,r),this}removeMark(t,n,r){return QD(this,t,n,r),this}clearIncompatible(t,n,r){return JD(this,t,n,r),this}}const t1=Object.create(null);class Ue{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new bP(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?Kl(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):Kl(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ir(t.node(0))}static atStart(t){return Kl(t,t,0,0,1)||new ir(t)}static atEnd(t){return Kl(t,t,t.content.size,t.childCount,-1)||new ir(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=t1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in t1)throw new RangeError("Duplicate use of selection JSON ID "+t);return t1[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ie.between(this.$anchor,this.$head).getBookmark()}}Ue.prototype.visible=!0;class bP{constructor(t,n){this.$from=t,this.$to=n}}let vS=!1;function yS(e){!vS&&!e.parent.inlineContent&&(vS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ie extends Ue{constructor(t,n=t){yS(t),yS(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ue.near(r);let o=t.resolve(n.map(this.anchor));return new Ie(o.parent.inlineContent?o:r,r)}replace(t,n=ae.empty){if(super.replace(t,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ie&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new um(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ie(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ue.findFrom(n,r,!0)||Ue.findFrom(n,-r,!0);if(i)n=i.$head;else return Ue.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ue.findFrom(t,-r,!0)||Ue.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let l=t.child(s);if(l.isAtom){if(!i&&Le.isSelectable(l))return Le.create(e,n-(o<0?l.nodeSize:0))}else{let a=Kl(e,l,n+o,o<0?l.childCount:0,o,i);if(a)return a}n+=l.nodeSize*o}return null}function bS(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=c)}),e.setSelection(Ue.near(e.doc.resolve(s),n))}const wS=1,Rf=2,xS=4;class xP extends yP{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|=Rf,this}ensureMarks(t){return Ke.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&Rf)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Rf,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ke.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(Ue.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xS,this}get scrolledIntoView(){return(this.updated&xS)>0}}function kS(e,t){return!t||!e?e:e.bind(t)}class Vu{constructor(t,n,r){this.name=t,this.init=kS(n.init,r),this.apply=kS(n.apply,r)}}const kP=[new Vu("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Vu("selection",{init(e,t){return e.selection||Ue.atStart(t.doc)},apply(e){return e.selection}}),new Vu("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Vu("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class n1{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=kP.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Vu(r.key,r.spec.state,r))})}}class Da{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new n1(t.schema,t.plugins),i=new Da(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Rs.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ue.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=u.fromJSON.call(a,t,n[l],i);return}}i[s.name]=s.init(t,i)}}),i}}function XR(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=XR(o,t,{})),n[r]=o}return n}class yi{constructor(t){this.spec=t,this.props={},t.props&&XR(t.props,this,this.props),this.key=t.key?t.key.key:qR("plugin")}getState(t){return t[this.key]}}const r1=Object.create(null);function qR(e){return e in r1?e+"$"+ ++r1[e]:(r1[e]=0,e+"$")}class yl{constructor(t="key"){this.key=qR(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var EP=/[A-Z]/g,SP=/^ms-/,o1={};function CP(e){return"-"+e.toLowerCase()}function TP(e){if(o1.hasOwnProperty(e))return o1[e];var t=e.replace(EP,CP);return o1[e]=SP.test(t)?"-"+t:t}function AP(e){return TP(e)}function _P(e,t){return AP(e)+":"+t}function RP(e){var t="";for(var n in e){var r=e[n];typeof r!="string"&&typeof r!="number"||(t&&(t+=";"),t+=_P(n,r))}return t}function MP(){return typeof document<"u"?document:null}var ZR=MP;function QR(e,t){if(typeof e!="string")return[e];var n=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;r.forEach(function(a){var u=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),c=[];function d(h,f,p){var g=n.push(h.slice(a[0].length,-a[1].length))-1;return c.push(g),o+g+o}n.forEach(function(h,f){for(var p,g=0;h!=p;)if(p=h,h=h.replace(u,d),g++>1e4)throw Error("References have circular dependency. Please, check them.");n[f]=h}),c=c.reverse(),n=n.map(function(h){return c.forEach(function(f){h=h.replace(new RegExp("(\\"+o+f+"\\"+o+")","g"),a[0]+"$1"+a[1])}),h})});var s=new RegExp("\\"+o+"([0-9]+)\\"+o);function l(a,u,c){for(var d=[],h,f=0;h=s.exec(a);){if(f++>1e4)throw Error("Circular references in parenthesis");d.push(a.slice(0,h.index)),d.push(l(u[h[1]],u)),a=a.slice(h.index+h[0].length)}return d.push(a),d}return i?n:l(n[0],n)}function JR(e,t){if(t&&t.flat){var n=t&&t.escape||"___",r=e[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),s=0;r!=o;){if(s++>1e4)throw Error("Circular references in "+e);o=r,r=r.replace(i,l)}return r}return e.reduce(function a(u,c){return Array.isArray(c)&&(c=c.reduce(a,"")),u+c},"");function l(a,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function e2(e,t){return Array.isArray(e)?JR(e,t):QR(e,t)}e2.parse=QR;e2.stringify=JR;const OP={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},IP={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},LP={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},NP={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},$P={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},DP={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},PP={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},zP={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var js=Object.freeze({__proto__:null,COPY_DESCRIPTION:IP,COPY_LABEL:OP,CUT_DESCRIPTION:NP,CUT_LABEL:LP,PASTE_DESCRIPTION:DP,PASTE_LABEL:$P,SELECT_ALL_DESCRIPTION:zP,SELECT_ALL_LABEL:PP});const FP={id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},BP={id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},HP={id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},UP={id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},WP={id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},VP={id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},jP={id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},GP={id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},KP={id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."},YP={id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},XP={id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},qP={id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},ZP={id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},QP={id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},JP={id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},e5={id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},t5={id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},n5={id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},r5={id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."};var on=Object.freeze({__proto__:null,ALT_KEY:VP,ARROW_DOWN_KEY:r5,ARROW_LEFT_KEY:e5,ARROW_RIGHT_KEY:t5,ARROW_UP_KEY:n5,BACKSPACE_KEY:GP,CAPS_LOCK_KEY:jP,COMMAND_KEY:BP,CONTROL_KEY:HP,DELETE_KEY:XP,END_KEY:JP,ENTER_KEY:UP,ESCAPE_KEY:FP,HOME_KEY:QP,PAGE_DOWN_KEY:ZP,PAGE_UP_KEY:qP,SHIFT_KEY:WP,SPACE_KEY:YP,TAB_KEY:KP});const o5={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},i5={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var ES=Object.freeze({__proto__:null,DESCRIPTION:i5,LABEL:o5});const s5={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},a5={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var SS=Object.freeze({__proto__:null,DESCRIPTION:a5,LABEL:s5});const l5={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},c5={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var u5=Object.freeze({__proto__:null,DESCRIPTION:c5,LABEL:l5});const d5={id:"extension.command.toggle-code.label",message:"Code",comment:"Label for the inline code formatting."},h5={id:"extension.command.toggle-code.description",message:"Add inline code formatting to the selected text",comment:"Description for the inline code formatting command."};var f5=Object.freeze({__proto__:null,DESCRIPTION:h5,LABEL:d5});const p5={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 s5=Object.freeze({__proto__:null,LABEL:i5});const a5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},l5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},c5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},u5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var jp=Object.freeze({__proto__:null,REDO_DESCRIPTION:u5,REDO_LABEL:c5,UNDO_DESCRIPTION:l5,UNDO_LABEL:a5});const d5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},h5={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 xS=Object.freeze({__proto__:null,DESCRIPTION:h5,LABEL:d5});const f5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},p5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var kS=Object.freeze({__proto__:null,DESCRIPTION:p5,LABEL:f5});const g5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},m5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},v5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var bb=Object.freeze({__proto__:null,BULLET_LIST_LABEL:m5,ORDERED_LIST_LABEL:g5,TASK_LIST_LABEL:v5});const y5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},b5={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},w5={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},x5={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var Gp=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:x5,CONVERT_LABEL:w5,INSERT_DESCRIPTION:b5,INSERT_LABEL:y5});const k5={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},E5={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var ES=Object.freeze({__proto__:null,DESCRIPTION:E5,LABEL:k5});const S5={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},C5={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var SS=Object.freeze({__proto__:null,DESCRIPTION:C5,LABEL:S5});class ml{constructor(e,n){this.match=e,this.match=e,this.handler=typeof n=="string"?T5(n):n}}function T5(t){return function(e,n,r,o){let i=t;if(n[1]){let s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;let l=r-o;l>0&&(i=n[0].slice(s-l,s)+i,r=o)}return e.tr.insertText(i,r,o)}}const A5=500;function _5({rules:t}){let e=new gi({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return CS(n,r,o,i,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&CS(n,r.pos,r.pos,"",t,e)})}}},isInputRules:!0});return e}function CS(t,e,n,r,o,i){if(t.composing)return!1;let s=t.state,l=s.doc.resolve(e);if(l.parent.type.spec.code)return!1;let a=l.parent.textBetween(Math.max(0,l.parentOffset-A5),l.parentOffset,null,"")+r;for(let u=0;u{let n=t.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,a))}else s.delete(i.from,i.to);e(s)}return!0}}return!1};function am(t,e,n=null,r){return new ml(t,(o,i,s,l)=>{let a=n instanceof Function?n(i):n,u=o.tr.delete(s,l),c=u.doc.resolve(s),d=c.blockRange(),h=d&&mb(d,e,a);if(!h)return null;u.wrap(d,h);let f=u.doc.resolve(s-1).nodeBefore;return f&&f.type==e&&zh(u.doc,s-1)&&(!r||r(i,f))&&u.join(s-1),u})}function M5(t,e,n=null){return new ml(t,(r,o,i,s)=>{let l=r.doc.resolve(i),a=n instanceof Function?n(o):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(i,s).setBlockType(i,i,e,a):null})}const nr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Ud=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let TS=null;const Ai=function(t,e,n){let r=TS||(TS=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},qa=function(t,e,n,r){return n&&(AS(t,e,n,r,-1)||AS(t,e,n,r,1))},O5=/^(img|br|input|textarea|hr)$/i;function AS(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:ei(t))){let i=t.parentNode;if(!i||i.nodeType!=1||wb(t)||O5.test(t.nodeName)||t.contentEditable=="false")return!1;e=nr(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?ei(t):0}else return!1}}function ei(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function I5(t,e,n){for(let r=e==0,o=e==ei(t);r||o;){if(t==n)return!0;let i=nr(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==ei(t)}}function wb(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const lm=function(t){return t.focusNode&&qa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ma(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function L5(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function N5(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const ui=typeof navigator<"u"?navigator:null,_S=typeof document<"u"?document:null,Qs=ui&&ui.userAgent||"",b0=/Edge\/(\d+)/.exec(Qs),KR=/MSIE \d/.exec(Qs),w0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qs),xr=!!(KR||w0||b0),As=KR?document.documentMode:w0?+w0[1]:b0?+b0[1]:0,Ho=!xr&&/gecko\/(\d+)/i.test(Qs);Ho&&+(/Firefox\/(\d+)/.exec(Qs)||[0,0])[1];const x0=!xr&&/Chrome\/(\d+)/.exec(Qs),Kn=!!x0,$5=x0?+x0[1]:0,ar=!xr&&!!ui&&/Apple Computer/.test(ui.vendor),Nc=ar&&(/Mobile\/\w+/.test(Qs)||!!ui&&ui.maxTouchPoints>2),oo=Nc||(ui?/Mac/.test(ui.platform):!1),D5=ui?/Win/.test(ui.platform):!1,Lo=/Android \d/.test(Qs),Fh=!!_S&&"webkitFontSmoothing"in _S.documentElement.style,P5=Fh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z5(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function wi(t,e){return typeof t=="number"?t:t[e]}function F5(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function RS(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Ud(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,u=a?z5(i):F5(l),c=0,d=0;if(e.topu.bottom-wi(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+wi(o,"top")-u.top:e.bottom-u.bottom+wi(o,"bottom")),e.leftu.right-wi(r,"right")&&(c=e.right-u.right+wi(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,f=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let p=l.scrollLeft-h,g=l.scrollTop-f;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function B5(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:YR(t.dom)}}function YR(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ud(r));return e}function H5({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;XR(n,r==0?0:r-e)}function XR(t,e){for(let n=0;n=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?W5(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:qR(n,o)}function W5(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function xb(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function V5(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function G5(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right-1?o:t.docView.posFromDOM(e,n,-1)}function ZR(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let u;Fh&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=G5(t,r,o,e))}l==null&&(l=j5(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function MS(t){return t.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Eu(as(Ai(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return t1(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ei(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Ai(a,ei(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Eu(as(u,1),!1)}if(i==null&&o=0)}function Eu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function t1(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function JR(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function X5(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return JR(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=QR(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ai(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const q5=/[\u0590-\u08ac]/;function Z5(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return!q5.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:JR(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let f=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:g}=t.domSelectionRange(),m=p&&!f.contains(p.nodeType==1?p:p.parentNode)||a==p&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),m})}let OS=null,IS=null,LS=!1;function Q5(t,e,n){return OS==e&&IS==n?LS:(OS=e,IS=n,LS=n=="up"||n=="down"?X5(t,e,n):Z5(t,e,n))}const uo=0,NS=1,La=2,di=3;class Bh{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=uo,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;nnr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;ne||s instanceof t2){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof e2&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?nr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=s;for(let d=l;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=nr(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;cf&&sn){let f=l;l=a,a=f}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o=r:er){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?La:NS,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=di:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?La:di}r=s}this.dirty=La}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?La:NS;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==uo&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class J5 extends Bh{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Za extends Bh{constructor(e,n,r,o){super(e,[],r,o),this.mark=n}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Ur.renderSpec(document,n.type.spec.toDOM(n,r))),new Za(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&di||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=di&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=uo){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=S0(i,0,e,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Ur.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=o2(c,r,n),u?a=new e3(e,n,r,o,c,d||null,h,u,i,s+1):n.isText?new cm(e,n,r,o,c,h,i):new _s(e,n,r,o,c,d||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Q.empty)}return e}matchesNode(e,n,r){return this.dirty==uo&&e.eq(this.node)&&E0(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new n3(this,s&&s.node,e);i3(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?Ke.none:this.node.child(c).marks,r,e),a.placeWidget(u,e,o)},(u,c,d,h)=>{a.syncToMarks(u.marks,r,e);let f;a.findNodeMatch(u,c,d,h)||l&&e.state.selection.from>o&&e.state.selection.to-1&&a.updateNodeAt(u,c,d,f,e)||a.updateNextNode(u,c,d,e,h,o)||a.addNode(u,c,d,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==La)&&(s&&this.protectLocalComposition(e,s),n2(this.contentDOM,this.children,e),Nc&&s3(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ie)||rn+this.node.content.size)return null;let i=e.domSelectionRange(),s=a3(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=l3(this.node.content,l,r-n,o-n);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new J5(this,i,n,o);e.input.compositionNodes.push(s),this.children=S0(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==di||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=uo}updateOuterDeco(e){if(E0(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=r2(this.dom,this.nodeDOM,k0(this.outerDeco,this.node,n),k0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function $S(t,e,n,r,o){o2(r,e,t);let i=new _s(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class cm extends _s{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==di||this.dirty!=uo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=uo||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=uo,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new cm(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=di)}get domAtom(){return!1}}class t2 extends Bh{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==uo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class e3 extends _s{constructor(e,n,r,o,i,s,l,a,u,c){super(e,n,r,o,i,s,l,u,c),this.spec=a}update(e,n,r,o){if(this.dirty==di)return!1;if(this.spec.update){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function n2(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,e.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Za.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Za)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function o3(t,e){return t.type.side-e.type.side}function i3(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let p=i+h.nodeSize;if(h.isText){let m=p;s!m.inline):l.slice();r(h,g,e.forChild(i,h),f),i=p}}function s3(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function a3(t,e){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0){if(t.childNodes.length>e&&t.childNodes[e].nodeType==3)return t.childNodes[e];t=t.childNodes[e-1],e=ei(t)}else if(t.nodeType==1&&e=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function S0(t,e,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=e?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function kb(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(lm(n)){for(a=l;o&&!o.node;)o=o.parent;let c=o.node;if(o&&c.isAtom&&Le.isSelectable(c)&&o.parent&&!(c.isInline&&I5(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;u=new Le(s==d?l:r.resolve(d))}}else{let c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=e=="pointer"||t.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!i2(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function u3(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,nr(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&xr&&As<=11&&(r.disabled=!0,r.disabled=!1)}function s2(t,e){if(e instanceof Le){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(BS(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else BS(t)}function BS(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Eb(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Ie.between(e,n,r)}function HS(t){return t.editable&&!t.hasFocus()?!1:a2(t)}function a2(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function d3(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return qa(e.node,e.offset,n.anchorNode,n.anchorOffset)}function C0(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Ue.findFrom(i,e)}function fs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function US(t,e,n){let r=t.state.selection;if(r instanceof Ie)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return fs(t,new Ie(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=C0(t.state,e);return o&&o instanceof Le?fs(t,o):!1}else if(!(oo&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?Le.isSelectable(i)?fs(t,new Le(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Fh?fs(t,new Ie(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Le&&r.node.isInline)return fs(t,new Ie(e>0?r.$to:r.$from));{let o=C0(t.state,e);return o?fs(t,o):!1}}}function Kp(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ed(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Ll(t,e){return e<0?h3(t):f3(t)}function h3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(Ho&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Ed(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(l2(n))break;{let l=n.previousSibling;for(;l&&Ed(l,-1);)o=n.parentNode,i=nr(l),l=l.previousSibling;if(l)n=l,r=Kp(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?T0(t,n,r):o&&T0(t,o,i)}function f3(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Kp(n),i,s;for(;;)if(r{t.state==o&&zi(t)},50)}function WS(t,e){let n=t.state.doc.resolve(e);if(!(Kn||D5)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-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(t.dom).direction=="rtl"?"rtl":"ltr"}function VS(t,e,n){let r=t.state.selection;if(r instanceof Ie&&!r.empty||n.indexOf("s")>-1||oo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=C0(t.state,e);if(s&&s instanceof Le)return fs(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof or?Ue.near(s,e):Ue.findFrom(s,e);return l?fs(t,l):!1}return!1}function jS(t,e){if(!(t.state.selection instanceof Ie))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function GS(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function m3(t){if(!ar||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;GS(t,r,"true"),setTimeout(()=>GS(t,r,"false"),20)}return!1}function v3(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function y3(t,e){let n=e.keyCode,r=v3(e);if(n==8||oo&&n==72&&r=="c")return jS(t,-1)||Ll(t,-1);if(n==46&&!e.shiftKey||oo&&n==68&&r=="c")return jS(t,1)||Ll(t,1);if(n==13||n==27)return!0;if(n==37||oo&&n==66&&r=="c"){let o=n==37?WS(t,t.state.selection.from)=="ltr"?-1:1:-1;return US(t,o,r)||Ll(t,o)}else if(n==39||oo&&n==70&&r=="c"){let o=n==39?WS(t,t.state.selection.from)=="ltr"?1:-1:1;return US(t,o,r)||Ll(t,o)}else{if(n==38||oo&&n==80&&r=="c")return VS(t,-1,r)||Ll(t,-1);if(n==40||oo&&n==78&&r=="c")return m3(t)||VS(t,1,r)||Ll(t,1);if(r==(oo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function c2(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=t.someProp("clipboardSerializer")||Ur.fromSchema(t.state.schema),l=g2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=p2[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=l.createElement(c[f]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` +other {Heading}}`,comment:"Label for heading command with support for levels."};var g5=Object.freeze({__proto__:null,LABEL:p5});const m5={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},v5={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},y5={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},b5={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var Yp=Object.freeze({__proto__:null,REDO_DESCRIPTION:b5,REDO_LABEL:y5,UNDO_DESCRIPTION:v5,UNDO_LABEL:m5});const w5={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},x5={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 CS=Object.freeze({__proto__:null,DESCRIPTION:x5,LABEL:w5});const k5={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},E5={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var TS=Object.freeze({__proto__:null,DESCRIPTION:E5,LABEL:k5});const S5={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},C5={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},T5={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var Sb=Object.freeze({__proto__:null,BULLET_LIST_LABEL:C5,ORDERED_LIST_LABEL:S5,TASK_LIST_LABEL:T5});const A5={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},_5={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},R5={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},M5={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var Xp=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:M5,CONVERT_LABEL:R5,INSERT_DESCRIPTION:_5,INSERT_LABEL:A5});const O5={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},I5={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var AS=Object.freeze({__proto__:null,DESCRIPTION:I5,LABEL:O5});const L5={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},N5={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var _S=Object.freeze({__proto__:null,DESCRIPTION:N5,LABEL:L5});class bl{constructor(t,n){this.match=t,this.match=t,this.handler=typeof n=="string"?$5(n):n}}function $5(e){return function(t,n,r,o){let i=e;if(n[1]){let s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;let l=r-o;l>0&&(i=n[0].slice(s-l,s)+i,r=o)}return t.tr.insertText(i,r,o)}}const D5=500;function P5({rules:e}){let t=new yi({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return RS(n,r,o,i,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&RS(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function RS(e,t,n,r,o,i){if(e.composing)return!1;let s=e.state,l=s.doc.resolve(t);if(l.parent.type.spec.code)return!1;let a=l.parent.textBetween(Math.max(0,l.parentOffset-D5),l.parentOffset,null,"")+r;for(let u=0;u{let n=e.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(i.text){let a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,a))}else s.delete(i.from,i.to);t(s)}return!0}}return!1};function dm(e,t,n=null,r){return new bl(e,(o,i,s,l)=>{let a=n instanceof Function?n(i):n,u=o.tr.delete(s,l),c=u.doc.resolve(s),d=c.blockRange(),h=d&&xb(d,t,a);if(!h)return null;u.wrap(d,h);let f=u.doc.resolve(s-1).nodeBefore;return f&&f.type==t&&Uh(u.doc,s-1)&&(!r||r(i,f))&&u.join(s-1),u})}function F5(e,t,n=null){return new bl(e,(r,o,i,s)=>{let l=r.doc.resolve(i),a=n instanceof Function?n(o):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),t)?r.tr.delete(i,s).setBlockType(i,i,t,a):null})}const rr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Gd=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let MS=null;const Ri=function(e,t,n){let r=MS||(MS=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Ja=function(e,t,n,r){return n&&(OS(e,t,n,r,-1)||OS(e,t,n,r,1))},B5=/^(img|br|input|textarea|hr)$/i;function OS(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ni(e))){let i=e.parentNode;if(!i||i.nodeType!=1||Cb(e)||B5.test(e.nodeName)||e.contentEditable=="false")return!1;t=rr(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?ni(e):0}else return!1}}function ni(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function H5(e,t,n){for(let r=t==0,o=t==ni(e);r||o;){if(e==n)return!0;let i=rr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==ni(e)}}function Cb(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const hm=function(e){return e.focusNode&&Ja(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Na(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function U5(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function W5(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const fi=typeof navigator<"u"?navigator:null,IS=typeof document<"u"?document:null,na=fi&&fi.userAgent||"",E0=/Edge\/(\d+)/.exec(na),t2=/MSIE \d/.exec(na),S0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(na),Er=!!(t2||S0||E0),Ms=t2?document.documentMode:S0?+S0[1]:E0?+E0[1]:0,Wo=!Er&&/gecko\/(\d+)/i.test(na);Wo&&+(/Firefox\/(\d+)/.exec(na)||[0,0])[1];const C0=!Er&&/Chrome\/(\d+)/.exec(na),Yn=!!C0,V5=C0?+C0[1]:0,lr=!Er&&!!fi&&/Apple Computer/.test(fi.vendor),Pc=lr&&(/Mobile\/\w+/.test(na)||!!fi&&fi.maxTouchPoints>2),lo=Pc||(fi?/Mac/.test(fi.platform):!1),j5=fi?/Win/.test(fi.platform):!1,$o=/Android \d/.test(na),Wh=!!IS&&"webkitFontSmoothing"in IS.documentElement.style,G5=Wh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function K5(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ki(e,t){return typeof e=="number"?e:e[t]}function Y5(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function LS(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=Gd(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,u=a?K5(i):Y5(l),c=0,d=0;if(t.topu.bottom-ki(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+ki(o,"top")-u.top:t.bottom-u.bottom+ki(o,"bottom")),t.leftu.right-ki(r,"right")&&(c=t.right-u.right+ki(o,"right")),c||d)if(a)i.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,f=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let p=l.scrollLeft-h,g=l.scrollTop-f;t={left:t.left-p,top:t.top-g,right:t.right-p,bottom:t.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function X5(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:n2(e.dom)}}function n2(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Gd(r));return t}function q5({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;r2(n,r==0?0:r-t)}function r2(e,t){for(let n=0;n=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!a&&p.left<=t.left&&p.right>=t.left&&(a=c,u={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(i=d+1)}}return!n&&a&&(n=a,o=u,r=0),n&&n.nodeType==3?Q5(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:o2(n,o)}function Q5(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function Tb(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function J5(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function t3(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right-1?o:e.docView.posFromDOM(t,n,-1)}function i2(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;Wh&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=t3(e,r,o,t))}l==null&&(l=e3(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function NS(e){return e.top=0&&o==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Tu(us(Ri(r,a,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ni(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return i1(a.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ni(r))){let a=r.childNodes[o-1],u=a.nodeType==3?Ri(a,ni(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Tu(us(u,1),!1)}if(i==null&&o=0)}function Tu(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function i1(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function a2(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function o3(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return a2(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=s2(e,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ri(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const i3=/[\u0590-\u08ac]/;function s3(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return!i3.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:a2(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let f=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:p,focusOffset:g}=e.domSelectionRange(),m=p&&!f.contains(p.nodeType==1?p:p.parentNode)||a==p&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),m})}let $S=null,DS=null,PS=!1;function a3(e,t,n){return $S==t&&DS==n?PS:($S=t,DS=n,PS=n=="up"||n=="down"?o3(e,t,n):s3(e,t,n))}const po=0,zS=1,Pa=2,pi=3;class Vh{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=po,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nrr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof c2){o=t-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof l2&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?rr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=s;for(let d=l;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=rr(h.dom)+1;break}t-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;cf&&sn){let f=l;l=a,a=f}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let l=r+i.border,a=s-i.border;if(t>=l&&n<=a){this.dirty=t==r||n==s?Pa:zS,t==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=pi:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Pa:pi}r=s}this.dirty=Pa}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Pa:zS;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==po&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class l3 extends Vh{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class el extends Vh{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=jr.renderSpec(document,n.type.spec.toDOM(n,r))),new el(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&pi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=pi&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=po){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=_0(i,0,t,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=jr.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=h2(c,r,n),u?a=new c3(t,n,r,o,c,d||null,h,u,i,s+1):n.isText?new fm(t,n,r,o,c,h,i):new Os(t,n,r,o,c,d||null,h,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 n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Q.empty)}return t}matchesNode(t,n,r){return this.dirty==po&&t.eq(this.node)&&A0(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new d3(this,s&&s.node,t);p3(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?Ke.none:this.node.child(c).marks,r,t),a.placeWidget(u,t,o)},(u,c,d,h)=>{a.syncToMarks(u.marks,r,t);let f;a.findNodeMatch(u,c,d,h)||l&&t.state.selection.from>o&&t.state.selection.to-1&&a.updateNodeAt(u,c,d,f,t)||a.updateNextNode(u,c,d,t,h,o)||a.addNode(u,c,d,t,o),o+=u.nodeSize}),a.syncToMarks([],r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Pa)&&(s&&this.protectLocalComposition(t,s),u2(this.contentDOM,this.children,t),Pc&&g3(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ie)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=m3(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=v3(this.node.content,l,r-n,o-n);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new l3(this,i,n,o);t.input.compositionNodes.push(s),this.children=_0(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==pi||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=po}updateOuterDeco(t){if(A0(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=d2(this.dom,this.nodeDOM,T0(this.outerDeco,this.node,n),T0(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function FS(e,t,n,r,o){h2(r,t,e);let i=new Os(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class fm extends Os{constructor(t,n,r,o,i,s,l){super(t,n,r,o,i,null,s,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==pi||this.dirty!=po&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=po||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=po,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new fm(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=pi)}get domAtom(){return!1}}class c2 extends Vh{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==po&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class c3 extends Os{constructor(t,n,r,o,i,s,l,a,u,c){super(t,n,r,o,i,s,l,u,c),this.spec=a}update(t,n,r,o){if(this.dirty==pi)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function u2(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=el.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof el)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function f3(e,t){return e.type.side-t.type.side}function p3(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)l.push(o[s++]);let p=i+h.nodeSize;if(h.isText){let m=p;s!m.inline):l.slice();r(h,g,t.forChild(i,h),f),i=p}}function g3(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 m3(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=ni(e)}else if(e.nodeType==1&&t=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l=0&&u+t.length+l>=n)return l+u;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}function _0(e,t,n,r,o){let i=[];for(let s=0,l=0;s=n||c<=t?i.push(a):(un&&i.push(a.slice(n-u,a.size,r)))}return i}function Ab(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(hm(n)){for(a=l;o&&!o.node;)o=o.parent;let c=o.node;if(o&&c.isAtom&&Le.isSelectable(c)&&o.parent&&!(c.isInline&&H5(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;u=new Le(s==d?l:r.resolve(d))}}else{let c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!f2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function b3(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,rr(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Er&&Ms<=11&&(r.disabled=!0,r.disabled=!1)}function p2(e,t){if(t instanceof Le){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(VS(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else VS(e)}function VS(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _b(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ie.between(t,n,r)}function jS(e){return e.editable&&!e.hasFocus()?!1:g2(e)}function g2(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 w3(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ja(t.node,t.offset,n.anchorNode,n.anchorOffset)}function R0(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ue.findFrom(i,t)}function ms(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function GS(e,t,n){let r=e.state.selection;if(r instanceof Ie)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return ms(e,new Ie(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=R0(e.state,t);return o&&o instanceof Le?ms(e,o):!1}else if(!(lo&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(l))&&!s.contentDOM?Le.isSelectable(i)?ms(e,new Le(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Wh?ms(e,new Ie(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Le&&r.node.isInline)return ms(e,new Ie(t>0?r.$to:r.$from));{let o=R0(e.state,t);return o?ms(e,o):!1}}}function qp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Td(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Dl(e,t){return t<0?x3(e):k3(e)}function x3(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Wo&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Td(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(m2(n))break;{let l=n.previousSibling;for(;l&&Td(l,-1);)o=n.parentNode,i=rr(l),l=l.previousSibling;if(l)n=l,r=qp(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?M0(e,n,r):o&&M0(e,o,i)}function k3(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=qp(n),i,s;for(;;)if(r{e.state==o&&Bi(e)},50)}function KS(e,t){let n=e.state.doc.resolve(t);if(!(Yn||j5)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.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 YS(e,t,n){let r=e.state.selection;if(r instanceof Ie&&!r.empty||n.indexOf("s")>-1||lo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=R0(e.state,t);if(s&&s instanceof Le)return ms(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,l=r instanceof ir?Ue.near(s,t):Ue.findFrom(s,t);return l?ms(e,l):!1}return!1}function XS(e,t){if(!(e.state.selection instanceof Ie))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function qS(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function C3(e){if(!lr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;qS(e,r,"true"),setTimeout(()=>qS(e,r,"false"),20)}return!1}function T3(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function A3(e,t){let n=t.keyCode,r=T3(t);if(n==8||lo&&n==72&&r=="c")return XS(e,-1)||Dl(e,-1);if(n==46&&!t.shiftKey||lo&&n==68&&r=="c")return XS(e,1)||Dl(e,1);if(n==13||n==27)return!0;if(n==37||lo&&n==66&&r=="c"){let o=n==37?KS(e,e.state.selection.from)=="ltr"?-1:1:-1;return GS(e,o,r)||Dl(e,o)}else if(n==39||lo&&n==70&&r=="c"){let o=n==39?KS(e,e.state.selection.from)=="ltr"?1:-1:1;return GS(e,o,r)||Dl(e,o)}else{if(n==38||lo&&n==80&&r=="c")return YS(e,-1,r)||Dl(e,-1);if(n==40||lo&&n==78&&r=="c")return C3(e)||YS(e,1,r)||Dl(e,1);if(r==(lo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function v2(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=e.someProp("clipboardSerializer")||jr.fromSchema(e.state.schema),l=E2(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=k2[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=l.createElement(c[f]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` -`);return{dom:a,text:h}}function u2(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",h=>{e=h(e,i||r,t)}),i)return e?new ae(Q.from(t.state.schema.text(e.replace(/\r\n?/g,` -`))),0,0):ae.empty;let d=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(d)l=d;else{let h=o.marks(),{schema:f}=t.state,p=Ur.fromSchema(f);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(p.serializeNode(f.text(g,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),s=x3(n),Fh&&k3(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||pb.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!b3.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=E3(KS(l,+c[1],+c[2]),c[4]);else if(l=ae.maxOpen(w3(l.content,o),!0),l.openStart||l.openEnd){let d=0,h=0;for(let f=l.content.firstChild;d{l=d(l,t)}),l}const b3=/^(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 w3(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&h2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=f2(s[s.length-1],i.length));let c=d2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return Q.from(s)}return t}function d2(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Q.from(t));return t}function h2(t,e,n,r,o){if(o1&&(i=0),o=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(Q.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function KS(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=g2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&p2[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"").reverse().join("")),n.innerHTML=t,o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=Q.from(a.create(r[l+1],o)),i++,s++}return new ae(o,i,s)}const lr={},cr={},S3={touchstart:!0,touchmove:!0};class C3{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 T3(t){for(let e in lr){let n=lr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{_3(t,r)&&!Sb(t,r)&&(t.editable||!(r.type in cr))&&n(t,r)},S3[e]?{passive:!0}:void 0)}ar&&t.dom.addEventListener("input",()=>null),_0(t)}function ks(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function A3(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function _0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Sb(t,r))})}function Sb(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function _3(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function R3(t,e){!Sb(t,e)&&lr[e.type]&&(t.editable||!(e.type in cr))&&lr[e.type](t,e)}cr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!v2(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Lo&&Kn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Nc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Ma(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||y3(t,n)?n.preventDefault():ks(t,"key")};cr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};cr.keypress=(t,e)=>{let n=e;if(v2(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||oo&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Ie)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function um(t){return{left:t.clientX,top:t.clientY}}function M3(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Cb(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function vc(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function O3(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(vc(t,new Le(n),"pointer"),!0):!1}function I3(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Le&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Le.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(vc(t,Le.create(t.state.doc,o),"pointer"),!0):!1}function L3(t,e,n,r,o){return Cb(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?I3(t,n):O3(t,n))}function N3(t,e,n,r){return Cb(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function $3(t,e,n,r){return Cb(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||D3(t,n,r)}function D3(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(vc(t,Ie.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)vc(t,Ie.create(r,l+1,l+1+s.content.size),"pointer");else if(Le.isSelectable(s))vc(t,Le.create(r,l),"pointer");else continue;return!0}}function Tb(t){return Yp(t)}const m2=oo?"metaKey":"ctrlKey";lr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Tb(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&M3(n,t.input.lastClick)&&!n[m2]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(um(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new P3(t,s,n,!!r)):(i=="doubleClick"?N3:$3)(t,s.pos,s.inside,n)?n.preventDefault():ks(t,"pointer"))};class P3{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[m2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ho&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ks(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(um(e))),this.updateAllowDefault(e),this.allowDefault||!n?ks(this.view,"pointer"):L3(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ar&&this.mightDrag&&!this.mightDrag.node.isAtom||Kn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(vc(this.view,Ue.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):ks(this.view,"pointer")}move(e){this.updateAllowDefault(e),ks(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}lr.touchstart=t=>{t.input.lastTouch=Date.now(),Tb(t),ks(t,"pointer")};lr.touchmove=t=>{t.input.lastTouch=Date.now(),ks(t,"pointer")};lr.contextmenu=t=>Tb(t);function v2(t,e){return t.composing?!0:ar&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const z3=Lo?5e3:-1;cr.compositionstart=cr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Yp(t,!0),t.markCursor=null;else if(Yp(t),Ho&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){t.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}y2(t,z3)};cr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,y2(t,20))};function y2(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Yp(t),e))}function b2(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=F3());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function F3(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Yp(t,e=!1){if(!(Lo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),b2(t),e||t.docView&&t.docView.dirty){let n=kb(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function B3(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const $c=xr&&As<15||Nc&&P5<604;lr.copy=cr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=$c?null:n.clipboardData,s=r.content(),{dom:l,text:a}=c2(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):B3(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function H3(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function U3(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Wd(t,r.value,null,o,e):Wd(t,r.textContent,r.innerHTML,o,e)},50)}function Wd(t,e,n,r,o){let i=u2(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ae.empty)))return!0;if(!i)return!1;let s=H3(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}cr.paste=(t,e)=>{let n=e;if(t.composing&&!Lo)return;let r=$c?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Wd(t,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():U3(t,n)};class W3{constructor(e,n){this.slice=e,this.move=n}}const w2=oo?"altKey":"ctrlKey";lr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(um(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Le.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=t.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=t.docView&&t.dispatch(t.state.tr.setSelection(Le.create(t.state.doc,u.posBefore)))}}let s=t.state.selection.content(),{dom:l,text:a}=c2(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData($c?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",$c||n.dataTransfer.setData("text/plain",a),t.dragging=new W3(s,!n[w2])};lr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};cr.dragover=cr.dragenter=(t,e)=>e.preventDefault();cr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(um(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",p=>{s=p(s,t)}):s=u2(t,n.dataTransfer.getData($c?"Text":"text/plain"),$c?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!n[w2]);if(t.someProp("handleDrop",p=>p(t,n,s||ae.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?nP(t.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let u=t.state.tr;l&&u.deleteSelection();let c=u.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let f=u.doc.resolve(c);if(d&&Le.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(f));else{let p=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,m,v,y)=>p=y),u.setSelection(Eb(t,f,u.doc.resolve(p)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};lr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zi(t)},20))};lr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};lr.beforeinput=(t,e)=>{if(Kn&&Lo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Ma(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in cr)lr[t]=cr[t];function Vd(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Xp{constructor(e,n){this.toDOM=e,this.spec=n||Ua,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new kt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Xp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Vd(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Rs{constructor(e,n){this.attrs=e,this.spec=n||Ua}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new kt(i,s,this)}valid(e,n){return n.from=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Vn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Ua)}mapInner(e,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=k2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof Rs){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(e,n,Ua));return vs.from(r)}forChild(e,n){if(n.isLeaf)return je.empty;let r=[];for(let o=0;on instanceof je)?e:e.reduce((n,r)=>n.concat(r instanceof je?r:r.members),[]))}}}function V3(t,e,n,r,o,i,s){let l=t.slice();for(let u=0,c=i;u{let m=g-p-(f-h);for(let v=0;vy+c-d)continue;let b=l[v]+c-d;f>=b?l[v+1]=h<=b?-2:-1:p>=o&&m&&(l[v]+=m,l[v+1]+=m)}d+=m}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let h=n.map(t[u+1]+i,-1),f=h-o,{index:p,offset:g}=r.content.findIndex(d),m=r.maybeChild(p);if(m&&g==d&&g+m.nodeSize==f){let v=l[u+2].mapInner(n,m,c+1,t[u]+i+1,s);v!=Vn?(l[u]=d,l[u+1]=f,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=j3(l,t,e,n,o,i,s),c=qp(u,r,0,s);e=c.local;for(let d=0;dn&&s.to{let u=k2(t,l,a+n);if(u){i=!0;let c=qp(u,l,n+a+1,r);c!=Vn&&o.push(a,a+l.nodeSize,c)}});let s=x2(i?E2(t):t,-n).sort(Wa);for(let l=0;l0;)e++;t.splice(e,0,n)}function r1(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Vn&&e.push(r)}),t.cursorWrapper&&e.push(je.create(t.state.doc,[t.cursorWrapper.deco])),vs.from(e)}const G3={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},K3=xr&&As<=11;class Y3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class X3{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Y3,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),K3&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,G3)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;nthis.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(HS(this.view)){if(this.suppressingSelectionUpdates)return zi(this.view);if(xr&&As<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&qa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Ud(i))n.add(i);for(let i=e.anchorNode;i;i=Ud(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&HS(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let c=0;c1){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||o)&&(i>-1&&(e.docView.markDirty(i,s),q3(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||zi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;co;m--){let v=r.childNodes[m-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){i=m;break}if(!y||y.size)break}let d=t.state.doc,h=t.someProp("domParser")||pb.fromSchema(t.state.schema),f=d.resolve(s),p=null,g=h.parse(r,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:J3,context:f});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),p={anchor:m+s,head:v+s}}return{doc:g,sel:p,from:s,to:l}}function J3(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ar&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ar&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const ez=/^(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 tz(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=kb(t,C);if(O&&!t.state.selection.eq(O)){if(Kn&&Lo&&t.input.lastKeyCode===13&&Date.now()-100R(t,Ma(13,"Enter"))))return;let _=t.state.tr.setSelection(O);C=="pointer"?_.setMeta("pointer",!0):C=="key"&&_.scrollIntoView(),i&&_.setMeta("composition",i),t.dispatch(_)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=Q3(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),h,f;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Lo)&&o.some(C=>C.nodeType==1&&!ez.test(C.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",C=>C(t,Ma(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof Ie&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let C=QS(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let O=t.state.tr.setSelection(C);i&&O.setMeta("composition",i),t.dispatch(O)}}return}if(Kn&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let C=p.endB-p.start;u.sel={anchor:u.sel.anchor+C,head:u.sel.anchor+C}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),xr&&As<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=u.doc.resolveNoCache(p.start-u.from),m=u.doc.resolveNoCache(p.endB-u.from),v=c.resolve(p.start),y=g.sameParent(m)&&g.parent.inlineContent&&v.end()>=p.endA,b;if((Nc&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&g.posC(t,Ma(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&rz(c,p.start,p.endA,g,m)&&t.someProp("handleKeyDown",C=>C(t,Ma(8,"Backspace")))){Lo&&Kn&&t.domObserver.suppressSelectionUpdates();return}Kn&&Lo&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Lo&&!y&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,m=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,Ma(13,"Enter"))})},20));let w=p.start,k=p.endA,x,S,T;if(y){if(g.pos==m.pos)xr&&As<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>zi(t),20)),x=t.state.tr.delete(w,k),S=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(T=nz(g.parent.content.cut(g.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,p.endA-v.start()))))x=t.state.tr,T.type=="add"?x.addMark(w,k,T.mark):x.removeMark(w,k,T.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",O=>O(t,w,k,C)))return;x=t.state.tr.insertText(C,w,k)}}if(x||(x=t.state.tr.replace(w,k,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let C=QS(t,x.doc,u.sel);C&&!(Kn&&Lo&&t.composing&&C.empty&&(p.start!=p.endB||t.input.lastAndroidDeletee.content.size?null:Eb(t,e.resolve(n.anchor),e.resolve(n.head))}function nz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||o1(s,!0,!1)0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function oz(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,l=i+(l-s),s=i}else if(l=l?i-r:0;i-=a,s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}class iz{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new C3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(rC),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tC(this),eC(this),this.nodeViews=nC(this),this.docView=$S(this.state.doc,JS(this),r1(this),this.dom,this),this.domObserver=new X3(this,(r,o,i,s)=>tz(this,r,o,i,s)),this.domObserver.start(),T3(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&_0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(rC),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){let r=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(b2(this),i=!0),this.state=e;let s=r.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=nC(this);az(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&_0(this),this.editable=tC(this),eC(this);let l=r1(this),a=JS(this),u=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,a,l);(c||!e.selection.eq(r.selection))&&(i=!0);let d=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&B5(this);if(i){this.domObserver.stop();let h=c&&(xr||Kn)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&sz(r.selection,e.selection);if(c){let f=Kn?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,a,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=$S(e.doc,a,l,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&d3(this))?zi(this,h):(s2(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&H5(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&RS(this,n.getBoundingClientRect(),e)}else RS(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return K5(this,e)}coordsAtPos(e,n=1){return QR(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return Q5(this,n||this.state,e)}pasteHTML(e,n){return Wd(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Wd(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(A3(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],r1(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(e){return R3(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return ar&&this.root.nodeType===11&&L5(this.dom.ownerDocument)==this.dom?Z3(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function JS(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[kt.node(0,t.state.doc.content.size,e)]}function eC(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:kt.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function tC(t){return!t.someProp("editable",e=>e(t.state)===!1)}function sz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function nC(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function az(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function rC(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var lz=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const cz=jo(lz);var S2=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ze=(t,e,n)=>(S2(t,e,"read from private field"),n?n.call(t):e.get(t)),xi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},xt=(t,e,n,r)=>(S2(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function uz(t){return!!(t.prev&&t.next&&t.prev.text.full!==t.next.text.full)}function dz(t){return!!(t.prev&&t.next&&t.prev.range.cursor!==t.next.range.cursor)}function hz(t){return!!(!t.prev&&t.next)}function fz(t){return!!(t.prev&&!t.next)}function pz(t){return!!(t.prev&&t.next&&t.prev.range.from!==t.next.range.from)}function gz(t){return t==="invalid-exit-split"}var mz=["jump-backward-exit","jump-forward-exit"],vz=["jump-backward-change","jump-forward-change"];function yz(t){var e,n;return sr(mz,(e=t.exit)==null?void 0:e.exitReason)||sr(vz,(n=t.change)==null?void 0:n.changeReason)}function oC(t){return!!(t&&t.query.full.length>=t.suggester.matchOffset)}function iC(t){return Dn(t)&&t instanceof Ie}function yr(t){const{match:e,changeReason:n,exitReason:r}=t;return{...e,changeReason:n,exitReason:r}}function bz(t,e){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=e;return n?!new RegExp(M0(n)).test(t):new RegExp(M0(r)).test(t)}function wz(t){const{text:e,regexp:n,$pos:r,suggester:o}=t,i=r.start();let s;return su(e,n).forEach(l=>{const a=l.input.slice(Math.max(0,l.index-1),l.index);if(bz(a,o)){const u=l.index+i,c=l[0],d=l[1];if(!ke(c)||!ke(d))return;const h=u+c.length,f=Math.min(h,r.pos),p=f-u;u=r.pos&&(s={range:{from:u,to:h,cursor:f},match:l,query:{partial:c.slice(d.length,p),full:c.slice(d.length)},text:{partial:c.slice(0,p),full:c},textAfter:r.doc.textBetween(h,r.end(),ws,ws),textBefore:r.doc.textBetween(i,u,ws,ws),suggester:o})}}),s}function C2(t){const{$pos:e,suggester:n}=t,{char:r,name:o,startOfLine:i,supportedCharacters:s,matchOffset:l,multiline:a,caseInsensitive:u,unicode:c}=n,d=Rz({char:r,matchOffset:l,startOfLine:i,supportedCharacters:s,multiline:a,caseInsensitive:u,unicode:c}),h=e.doc.textBetween(e.before(),e.end(),ws,ws);return wz({suggester:n,text:h,regexp:d,$pos:e,char:r,name:o})}function T2(t){const{state:e,match:n}=t;try{return C2({$pos:e.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function A2(t){const{prev:e,next:n,state:r}=t;return!n&&e.range.from>=r.doc.nodeSize?{exit:yr({match:e,exitReason:"delete"})}:!n||!e.query.partial?{exit:yr({match:e,exitReason:"invalid-exit-split"})}:e.range.to===n.range.cursor?{exit:yr({match:n,exitReason:"exit-end"})}:e.query.partial?{exit:yr({match:n,exitReason:"exit-split"})}:{}}function xz(t){const{prev:e,next:n,state:r}=t,o=be(),i=T2({state:r,match:e}),{exit:s}=i&&i.query.full!==e.query.full?A2({prev:e,next:i,state:r}):o;return e.range.from=e.range.to)?{exit:yr({match:e,exitReason:"selection-outside"})}:r.pos>e.range.to?{exit:yr({match:e,exitReason:"move-end"})}:r.pos<=e.range.from?{exit:yr({match:e,exitReason:"move-start"})}:{}}function Ez(t){const{prev:e,next:n,state:r,$pos:o}=t,i=be();if(!e&&!n)return i;const s={prev:e,next:n};return pz(s)?xz({prev:s.prev,next:s.next,state:r}):hz(s)?{change:yr({match:s.next,changeReason:"start"})}:fz(s)?kz({$pos:o,match:s.prev,state:r}):uz(s)?{change:yr({match:s.next,changeReason:"change-character"})}:dz(s)?{change:yr({match:s.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function sC(t,e){for(let n=t.depth;n>0;n--){const r=t.node(n);if(e.includes(r.type.name))return!0}return!1}function R0(t,e){const{$from:n,$to:r}=t;return _2(t,e)?!0:fb(n.pos,r.pos).some(o=>Sz(n.doc.resolve(o),e))}function _2(t,e){const{$from:n,$to:r}=t,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return e.some(i=>o.has(i))}function Sz(t,e){const n=new Set(t.marks().map(r=>r.type.name));return e.some(r=>n.has(r))}function Cz(t,e){const{$cursor:n}=e,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:s}=t;return!r&&!o&&Bs(i)&&Bs(s)?!0:!(r&&!_2(e,r)||o&&!sC(n,o)||!r&&R0(e,i)||!o&&sC(n,s))}function aC(t){const{suggesters:e,$pos:n,selectionEmpty:r}=t;for(const o of e)if(!(o.emptySelectionsOnly&&!r))try{const i=C2({suggester:o,$pos:n});if(!i)continue;const s={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(Cz(o,s)&&o.isValidPosition(s,i))return i}catch{}}function M0(t){return sD(t)?t.source:t}function Tz(t){return t?"^":""}function Az(t,e){return`(?:${M0(t)}){${e},}`}function _z(t){return ke(t)?new RegExp(cz(t)):t}function Rz(t){const{char:e,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:l=!1,unicode:a=!1}=t,u=`g${l?"m":""}${s?"i":""}${a?"u":""}`;let c=_z(e).source;return i&&(c=`(${c})`),new RegExp(`${Tz(r)}${c}${Az(o,n)}`,u)}var Mz={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},R2="__ignore_prosemirror_suggest_update__",ip,Uu,gn,ls,Gl,Yo,an,cs,Kl,M2=class{constructor(t){xi(this,ip,!1),xi(this,Uu,!1),xi(this,gn,void 0),xi(this,ls,void 0),xi(this,Gl,void 0),xi(this,Yo,be()),xi(this,an,je.empty),xi(this,cs,!1),xi(this,Kl,!1),this.setMarkRemoved=()=>{xt(this,cs,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),s=Ue.findFrom(i,1,!0);if(iC(s))return s},this.ignoreNextExit=()=>{xt(this,Uu,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=ze(this,gn).find(c=>c.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const s=ke(i.char)?i.char.length:1,l=n+s,a=i.ignoredClassName?{class:i.ignoredClassName}:{},u=kt.inline(n,l,{nodeName:i.ignoredTag,...a},{name:r,specific:o,char:i.char});xt(this,an,ze(this,an).add(this.view.state.doc,[u]))},this.removeIgnored=({from:n,name:r})=>{const o=ze(this,gn).find(l=>l.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=ke(o.char)?o.char.length:1,s=ze(this,an).find(n,n+i)[0];!s||s.spec.name!==r||xt(this,an,ze(this,an).remove([s]))},this.clearIgnored=n=>{if(!n){xt(this,an,je.empty);return}const o=ze(this,an).find().filter(({spec:i})=>i.name===n);xt(this,an,ze(this,an).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?ze(this,gn).filter(i=>i.name===r):ze(this,gn);return aC({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{xt(this,Kl,!0)};const e=lC();xt(this,gn,t.map(e)),xt(this,gn,Ka(ze(this,gn),(n,r)=>r.priority-n.priority))}static create(t){return new M2(t)}get decorationSet(){return ze(this,an)}get removed(){return ze(this,cs)}get match(){return ze(this,ls)?ze(this,ls):ze(this,Gl)&&ze(this,Yo).exit?ze(this,Gl):void 0}init(t){return this.view=t,this}createProps(t){const{name:e,char:n}=t.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:e,char:n,...t}}shouldRunExit(){return ze(this,Uu)?(xt(this,Uu,!1),!1):!0}updateWithNextSelection(t){var e,n,r;const o=this.findNextTextSelection(t.selection);if(o)for(const i of ze(this,gn)){const s=(e=ze(this,Yo).change)==null?void 0:e.suggester.name,l=(n=ze(this,Yo).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,t,{change:s,exit:l})}}changeHandler(t,e){const{change:n,exit:r}=ze(this,Yo),o=this.match;if(!n&&!r||!oC(o))return;const i=e===(r==null?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),s=e===(n==null?void 0:n.suggester.appendTransaction);if(!(!i&&!s)){if(n&&r&&yz({change:n,exit:r})){const l=this.createProps(r),a=this.createProps(n),u=r.range.from{const l=ke(s.char)?s.char.length:1;return i-o!==l});xt(this,an,e.remove(r))}shouldIgnoreMatch({range:t,suggester:{name:e}}){return ze(this,an).find().some(({spec:o,from:i})=>i!==t.from?!1:o.specific?o.name===e:!0)}resetState(){xt(this,Yo,be()),xt(this,ls,void 0),xt(this,cs,!1),xt(this,Kl,!1)}updateReasons(t){const{$pos:e,state:n}=t,r=ze(this,ip),o=ze(this,gn),i=n.selection.empty,s=iC(n.selection)?aC({suggesters:o,$pos:e,docChanged:r,selectionEmpty:i}):void 0;xt(this,ls,s&&this.shouldIgnoreMatch(s)?void 0:s),xt(this,Yo,Ez({next:ze(this,ls),prev:ze(this,Gl),state:n,$pos:e}))}addSuggester(t){const e=ze(this,gn).find(r=>r.name===t.name),n=lC();if(e)xt(this,gn,ze(this,gn).map(r=>r===e?n(t):r));else{const r=[...ze(this,gn),n(t)];xt(this,gn,Ka(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(t.name)}removeSuggester(t){const e=ke(t)?t:t.name;xt(this,gn,ze(this,gn).filter(n=>n.name!==e)),this.clearIgnored(e)}toJSON(){return this.match}apply(t){const{exit:e,change:n}=ze(this,Yo);if(ze(this,Kl)&&(xt(this,Kl,!1),!(e!=null&&e.suggester.appendTransaction)&&!(n!=null&&n.suggester.appendTransaction)))return this;const{tr:r,state:o}=t,i=r.docChanged||r.selectionSet;return r.getMeta(R2)||!i&&!ze(this,cs)?this:(xt(this,ip,r.docChanged),this.mapIgnoredDecorations(r),e&&this.resetState(),xt(this,Gl,ze(this,ls)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(t){const e=this.match;if(!oC(e))return ze(this,an);const{disableDecorations:n}=e.suggester;if(tt(n)?n(t,e):n)return ze(this,an);const{range:o,suggester:i}=e,{name:s,suggestTag:l,suggestClassName:a}=i,{from:u,to:c}=o;return this.shouldIgnoreMatch(e)?ze(this,an):ze(this,an).add(t.doc,[kt.inline(u,c,{nodeName:l,class:s?`${a} suggest-${s}`:a},{name:s})])}},Oz=M2;ip=new WeakMap;Uu=new WeakMap;gn=new WeakMap;ls=new WeakMap;Gl=new WeakMap;Yo=new WeakMap;an=new WeakMap;cs=new WeakMap;Kl=new WeakMap;function lC(){const t=new Set;return e=>{if(t.has(e.name))throw new Error(`A suggester already exists with the name '${e.name}'. The name provided must be unique.`);const n={...Mz,...e};return t.add(e.name),n}}var O2=new gl("suggest");function Rb(t){return O2.getState(t)}function cC(t,e){return Rb(t).addSuggester(e)}function uC(t){t.setMeta(R2,!0)}function Iz(t,e){return Rb(t).removeSuggester(e)}function Lz(...t){const e=Oz.create(t);return new gi({key:O2,view:n=>(e.init(n),{update:r=>e.changeHandler(r.state.tr,!1)}),state:{init:()=>e,apply:(n,r,o,i)=>e.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return e.updateWithNextSelection(i),e.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(e.setLastChangeFromAppend(),i):null},props:{decorations:n=>e.createDecorations(n)}})}function Mb(t,e){const n=Object.getPrototypeOf(e);let r=t.selection,o=t.doc,i=t.storedMarks;const s=be();for(const[l,a]of Object.entries(e))s[l]={value:a};return Object.create(n,{...s,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}})}function Sd(t){return({state:e,dispatch:n,view:r,tr:o})=>t(Mb(o,e),n,r)}function dC(t){return e=>{var n;return we(e.dispatch===void 0||e.dispatch===((n=e.view)==null?void 0:n.dispatch),{code:re.NON_CHAINABLE_COMMAND}),t(e)}}function Nz(...t){return({state:e,dispatch:n,view:r,tr:o,...i})=>{for(const s of t)if(s({state:e,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}var Br={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return Br.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return Br.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return Br.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return Br.isNode?process.platform==="darwin":Br.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function Xo(t,e){var n;const r=cF(t);return((n=r==null?void 0:r.getComputedStyle(t))==null?void 0:n.getPropertyValue(e))??""}function Wn(t,e){return Object.assign(t.style,e)}function Zp(t){return Dn(t)&&Yr(t.nodeType)&&ke(t.nodeName)}function zt(t){return Zp(t)&&t.nodeType===1}function $z(t){return Zp(t)&&t.nodeType===3}function dm(t){const{types:e,node:n}=t;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Bt(e)?e.some(r):r(e)}function Dz(t,e){const{tr:n}=e;return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Pz({pos:t,tr:e}){const n=e.doc.nodeAt(t);return n&&e.delete(t,t+n.nodeSize),e}function zz({pos:t,tr:e,content:n}){const r=e.doc.nodeAt(t);return r&&e.replaceWith(t,t+r.nodeSize,n),e}function Hh(t){const{predicate:e,selection:n}=t,r=N2(n)?n.selection.$from:Lb(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),s=o>0?r.before(o):0,l=r.start(o),a=s+i.nodeSize;if(e(i,s))return{pos:s,depth:o,node:i,start:l,end:a}}}function Fz(t){const{depth:e}=t,n=e>0?t.before(e):0,r=t.node(e),o=t.start(e),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:e}}function Bz(t){const e=Hh({predicate:()=>!0,selection:t});return we(e,{message:"No parent node found for the selection provided."}),e}function hi(t){const{types:e,selection:n}=t;return Hh({predicate:r=>dm({types:e,node:r}),selection:n})}function Hz(t){const{types:e,selection:n}=t;if(!(!Wh(n)||!dm({types:e,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Ob(t){return Lb(t)?t.empty:t.selection.empty}function Uz(t){return t.docChanged||t.selectionSet}function I2(t){return!!jd(t)}function jd(t){const{state:e,type:n,attrs:r}=t,{selection:o,doc:i}=e,s=ke(n)?i.type.schema.nodes[n]:n;we(s,{code:re.SCHEMA,message:`No node exists for ${n}`});const l=Hz({selection:o,types:n})??Hh({predicate:a=>a.type===s,selection:o});return!r||Pp(r)||!l||l.node.hasMarkup(s,{...l.node.attrs,...r})?l:void 0}function Qp(...t){return e=>{if(!nS(t))return!1;const[n,...r]=t;let o=!1;const i=(...a)=>()=>{if(!nS(a))return!1;o=!0;const[,...u]=a;return Qp(...a)({...e,next:i(...u)})},s=i(...r),l=n({...e,next:s});return o||l?l:s()}}function Wz(t,e){const n=new Map,r=be();for(const o of t)for(const[i,s]of cn(o)){const a=[...n.get(i)??[],s],u=Qp(...a);n.set(i,a),r[i]=e(u)}return r}function Vz(t){return Wz(t,e=>(n,r,o)=>e({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function Ib(t,e){const n=t.attrs??{};return Object.entries(e).every(([r,o])=>n[r]===o)}function jz(t){return D2(t,[Ii,qt,yn,Po])}function lu(t){return Dn(t)}function cu(t,e){return Bt(e)?sr(e,t[Bi]):e===t[Bi]}function Gz(t){return Dn(t)&&t instanceof g0}function Kz(t,e){return ke(t)?Ot(e.nodes,t):t}function L2(t){return Dn(t)&&t instanceof Ph}function Yz(t,e){return ke(t)?Ot(e.marks,t):t}function Uh(t){return Dn(t)&&t instanceof Ts}function Xz(t){return Dn(t)&&t instanceof Q}function qz(t){return Dn(t)&&t instanceof Ke}function N2(t){return Dn(t)&&t instanceof Ia}function Js(t){return Dn(t)&&t instanceof Ie}function Zz(t){return Dn(t)&&t instanceof or}function Lb(t){return Dn(t)&&t instanceof Ue}function Qz(t){return Dn(t)&&t instanceof Oc}function hC(t){const{trState:e,from:n,to:r,type:o,attrs:i={}}=t,{doc:s}=e,l=Yz(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(n,r,l);let a=!1;return r>n&&s.nodesBetween(n,r,u=>a?!1:(a=(u.marks??[]).some(d=>d.type!==l?!1:Ib(d,i)),!a)),a}function Wh(t){return Dn(t)&&t instanceof Le}function Jp(t){const{trState:e,type:n,attrs:r={},from:o,to:i}=t,{selection:s,doc:l,storedMarks:a}=e,u=ke(n)?l.type.schema.marks[n]:n;if(we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==n?!1:Ib(d,r??{})):hC({...t,from:s.from,to:s.to})}function Nb(t,e={}){const n=Jz(t.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=e;return r?$2(n,t):o?n.content.eq(t.content):n.eq(t)}function $2(t,e){if(t===e)return!0;const n=t.type===e.type&&Ke.sameSet(t.marks,e.marks);function r(){if(t.content===e.content)return!0;if(t.content.size!==e.content.size)return!1;const o=[],i=[];t.content.forEach(s=>o.push(s)),e.content.forEach(s=>i.push(s));for(const[s,l]of o.entries()){const a=i[s];if(!a||!$2(l,a))return!1}return!0}return n&&r()}function Jz(t){var e;return((e=t.nodes.doc)==null?void 0:e.createAndFill())??void 0}function hm(t){for(const e of Object.values(t.nodes))if(e.name!=="doc"&&(e.isBlock||e.isTextblock))return e;we(!1,{code:re.SCHEMA,message:"No default block node found for the provided schema."})}function eF(t){return t.type===hm(t.type.schema)}function fm(t){return!!t&&t.type.isBlock&&!t.textContent&&!t.childCount}function Hi(t,e,n){const r=t.parent.childAfter(t.parentOffset);if(!r.node)return;const o=ke(e)?e:e.name,i=r.node.marks.find(({type:d})=>d.name===o);let s=t.index(),l=t.start()+r.offset,a=s+1,u=l+r.node.nodeSize;if(!i)return n&&u0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;a{t=h(t,i||r,e)}),i)return t?new ae(Q.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):ae.empty;let d=e.someProp("clipboardTextParser",h=>h(t,o,r,e));if(d)l=d;else{let h=o.marks(),{schema:f}=e.state,p=jr.fromSchema(f);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=s.appendChild(document.createElement("p"));g&&m.appendChild(p.serializeNode(f.text(g,h)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=M3(n),Wh&&O3(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||bb.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!_3.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=I3(ZS(l,+c[1],+c[2]),c[4]);else if(l=ae.maxOpen(R3(l.content,o),!0),l.openStart||l.openEnd){let d=0,h=0;for(let f=l.content.firstChild;d{l=d(l,e)}),l}const _3=/^(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 R3(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&i.length&&w2(a,i,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=x2(s[s.length-1],i.length));let c=b2(l,a);s.push(c),o=o.matchType(c.type),i=a}}),s)return Q.from(s)}return e}function b2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Q.from(e));return e}function w2(e,t,n,r,o){if(o1&&(i=0),o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(Q.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function ZS(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=E2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&k2[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=e,o)for(let i=0;i=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=Q.from(a.create(r[l+1],o)),i++,s++}return new ae(o,i,s)}const cr={},ur={},L3={touchstart:!0,touchmove:!0};class N3{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 $3(e){for(let t in cr){let n=cr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{P3(e,r)&&!Rb(e,r)&&(e.editable||!(r.type in ur))&&n(e,r)},L3[t]?{passive:!0}:void 0)}lr&&e.dom.addEventListener("input",()=>null),I0(e)}function Cs(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function D3(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 I0(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Rb(e,r))})}function Rb(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function P3(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function z3(e,t){!Rb(e,t)&&cr[t.type]&&(e.editable||!(t.type in ur))&&cr[t.type](e,t)}ur.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!C2(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!($o&&Yn&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Pc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Na(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||A3(e,n)?n.preventDefault():Cs(e,"key")};ur.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};ur.keypress=(e,t)=>{let n=t;if(C2(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||lo&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ie)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function pm(e){return{left:e.clientX,top:e.clientY}}function F3(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Mb(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,l=>s>i.depth?l(e,n,i.nodeAfter,i.before(s),o,!0):l(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function wc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function B3(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(wc(e,new Le(n),"pointer"),!0):!1}function H3(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Le&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Le.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(wc(e,Le.create(e.state.doc,o),"pointer"),!0):!1}function U3(e,t,n,r,o){return Mb(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?H3(e,n):B3(e,n))}function W3(e,t,n,r){return Mb(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function V3(e,t,n,r){return Mb(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||j3(e,n,r)}function j3(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(wc(e,Ie.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)wc(e,Ie.create(r,l+1,l+1+s.content.size),"pointer");else if(Le.isSelectable(s))wc(e,Le.create(r,l),"pointer");else continue;return!0}}function Ob(e){return Zp(e)}const S2=lo?"metaKey":"ctrlKey";cr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Ob(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&F3(n,e.input.lastClick)&&!n[S2]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(pm(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new G3(e,s,n,!!r)):(i=="doubleClick"?W3:V3)(e,s.pos,s.inside,n)?n.preventDefault():Cs(e,"pointer"))};class G3{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[S2],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);i=c.parent,s=c.depth?c.before():0}const l=o?null:r.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Wo&&!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)),Cs(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(()=>Bi(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(pm(t))),this.updateAllowDefault(t),this.allowDefault||!n?Cs(this.view,"pointer"):U3(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||lr&&this.mightDrag&&!this.mightDrag.node.isAtom||Yn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(wc(this.view,Ue.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Cs(this.view,"pointer")}move(t){this.updateAllowDefault(t),Cs(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)}}cr.touchstart=e=>{e.input.lastTouch=Date.now(),Ob(e),Cs(e,"pointer")};cr.touchmove=e=>{e.input.lastTouch=Date.now(),Cs(e,"pointer")};cr.contextmenu=e=>Ob(e);function C2(e,t){return e.composing?!0:lr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const K3=$o?5e3:-1;ur.compositionstart=ur.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Zp(e,!0),e.markCursor=null;else if(Zp(e),Wo&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let 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}T2(e,K3)};ur.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++,T2(e,20))};function T2(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Zp(e),t))}function A2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Y3());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Y3(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Zp(e,t=!1){if(!($o&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),A2(e),t||e.docView&&e.docView.dirty){let n=Ab(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function X3(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const zc=Er&&Ms<15||Pc&&G5<604;cr.copy=ur.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=zc?null:n.clipboardData,s=r.content(),{dom:l,text:a}=v2(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):X3(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function q3(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Z3(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Kd(e,r.value,null,o,t):Kd(e,r.textContent,r.innerHTML,o,t)},50)}function Kd(e,t,n,r,o){let i=y2(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,o,i||ae.empty)))return!0;if(!i)return!1;let s=q3(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ur.paste=(e,t)=>{let n=t;if(e.composing&&!$o)return;let r=zc?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Kd(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():Z3(e,n)};class Q3{constructor(t,n){this.slice=t,this.move=n}}const _2=lo?"altKey":"ctrlKey";cr.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(pm(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:l,text:a}=v2(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(zc?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",zc||n.dataTransfer.setData("text/plain",a),e.dragging=new Q3(s,!n[_2])};cr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};ur.dragover=ur.dragenter=(e,t)=>t.preventDefault();ur.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(pm(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",p=>{s=p(s,e)}):s=y2(e,n.dataTransfer.getData(zc?"Text":"text/plain"),zc?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!n[_2]);if(e.someProp("handleDrop",p=>p(e,n,s||ae.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?dP(e.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let u=e.state.tr;l&&u.deleteSelection();let c=u.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let f=u.doc.resolve(c);if(d&&Le.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(f));else{let p=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,m,v,y)=>p=y),u.setSelection(_b(e,f,u.doc.resolve(p)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};cr.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())&&Bi(e)},20))};cr.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};cr.beforeinput=(e,t)=>{if(Yn&&$o&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Na(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 ur)cr[e]=ur[e];function Yd(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Qp{constructor(t,n){this.toDOM=t,this.spec=n||Ga,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new yt(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Qp&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Yd(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Is{constructor(t,n){this.attrs=t,this.spec=n||Ga}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new yt(i,s,this)}valid(t,n){return n.from=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;st){let l=this.children[s]+1;this.children[s+2].findInner(t-l,n-l,r,o+l,i)}}map(t,n,r){return this==jn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Ga)}mapInner(t,n,r,o,i){let s;for(let l=0;l{let u=a+r,c;if(c=M2(n,l,u)){for(o||(o=this.children.slice());il&&d.to=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,s=i+n.content.size;for(let l=0;li&&a.type instanceof Is){let u=Math.max(i,a.from)-i,c=Math.min(s,a.to)-i;uo.map(t,n,Ga));return ws.from(r)}forChild(t,n){if(n.isLeaf)return We.empty;let r=[];for(let o=0;on instanceof We)?t:t.reduce((n,r)=>n.concat(r instanceof We?r:r.members),[]))}}}function J3(e,t,n,r,o,i,s){let l=e.slice();for(let u=0,c=i;u{let m=g-p-(f-h);for(let v=0;vy+c-d)continue;let b=l[v]+c-d;f>=b?l[v+1]=h<=b?-2:-1:p>=o&&m&&(l[v]+=m,l[v+1]+=m)}d+=m}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=r.content.size){a=!0;continue}let h=n.map(e[u+1]+i,-1),f=h-o,{index:p,offset:g}=r.content.findIndex(d),m=r.maybeChild(p);if(m&&g==d&&g+m.nodeSize==f){let v=l[u+2].mapInner(n,m,c+1,e[u]+i+1,s);v!=jn?(l[u]=d,l[u+1]=f,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=ez(l,e,t,n,o,i,s),c=Jp(u,r,0,s);t=c.local;for(let d=0;dn&&s.to{let u=M2(e,l,a+n);if(u){i=!0;let c=Jp(u,l,n+a+1,r);c!=jn&&o.push(a,a+l.nodeSize,c)}});let s=R2(i?O2(e):e,-n).sort(Ka);for(let l=0;l0;)t++;e.splice(t,0,n)}function a1(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=jn&&t.push(r)}),e.cursorWrapper&&t.push(We.create(e.state.doc,[e.cursorWrapper.deco])),ws.from(t)}const tz={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},nz=Er&&Ms<=11;class rz{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 oz{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rz,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),nz&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tz)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.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(jS(this.view)){if(this.suppressingSelectionUpdates)return Bi(this.view);if(Er&&Ms<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ja(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Gd(i))n.add(i);for(let i=t.anchorNode;i;i=Gd(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&jS(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let c=0;c1){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=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),iz(t)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Bi(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;co;m--){let v=r.childNodes[m-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){i=m;break}if(!y||y.size)break}let d=e.state.doc,h=e.someProp("domParser")||bb.fromSchema(e.state.schema),f=d.resolve(s),p=null,g=h.parse(r,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:lz,context:f});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),p={anchor:m+s,head:v+s}}return{doc:g,sel:p,from:s,to:l}}function lz(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(lr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||lr&&/^(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 cz=/^(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 uz(e,t,n,r,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,I=Ab(e,C);if(I&&!e.state.selection.eq(I)){if(Yn&&$o&&e.input.lastKeyCode===13&&Date.now()-100R(e,Na(13,"Enter"))))return;let _=e.state.tr.setSelection(I);C=="pointer"?_.setMeta("pointer",!0):C=="key"&&_.scrollIntoView(),i&&_.setMeta("composition",i),e.dispatch(_)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=az(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),h,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||$o)&&o.some(C=>C.nodeType==1&&!cz.test(C.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",C=>C(e,Na(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof Ie&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let C=nC(e,e.state.doc,u.sel);if(C&&!C.eq(e.state.selection)){let I=e.state.tr.setSelection(C);i&&I.setMeta("composition",i),e.dispatch(I)}}return}if(Yn&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let C=p.endB-p.start;u.sel={anchor:u.sel.anchor+C,head:u.sel.anchor+C}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),Er&&Ms<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=u.doc.resolveNoCache(p.start-u.from),m=u.doc.resolveNoCache(p.endB-u.from),v=c.resolve(p.start),y=g.sameParent(m)&&g.parent.inlineContent&&v.end()>=p.endA,b;if((Pc&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&g.posC(e,Na(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&hz(c,p.start,p.endA,g,m)&&e.someProp("handleKeyDown",C=>C(e,Na(8,"Backspace")))){$o&&Yn&&e.domObserver.suppressSelectionUpdates();return}Yn&&$o&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),$o&&!y&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,m=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(C){return C(e,Na(13,"Enter"))})},20));let w=p.start,k=p.endA,x,S,T;if(y){if(g.pos==m.pos)Er&&Ms<=11&&g.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Bi(e),20)),x=e.state.tr.delete(w,k),S=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(T=dz(g.parent.content.cut(g.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,p.endA-v.start()))))x=e.state.tr,T.type=="add"?x.addMark(w,k,T.mark):x.removeMark(w,k,T.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,m.parentOffset);if(e.someProp("handleTextInput",I=>I(e,w,k,C)))return;x=e.state.tr.insertText(C,w,k)}}if(x||(x=e.state.tr.replace(w,k,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let C=nC(e,x.doc,u.sel);C&&!(Yn&&$o&&e.composing&&C.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:_b(e,t.resolve(n.anchor),t.resolve(n.head))}function dz(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,l,a;for(let c=0;cc.mark(l.addToSet(c.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cn||l1(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function fz(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s=s?i-r:0;i-=a,l=i+(l-s),s=i}else if(l=l?i-r:0;i-=a,s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}class pz{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new N3,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(aC),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=iC(this),oC(this),this.nodeViews=sC(this),this.docView=FS(this.state.doc,rC(this),a1(this),this.dom,this),this.domObserver=new oz(this,(r,o,i,s)=>uz(this,r,o,i,s)),this.domObserver.start(),$3(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&I0(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(aC),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(A2(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=sC(this);mz(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&I0(this),this.editable=iC(this),oC(this);let l=a1(this),a=rC(this),u=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(t.doc,a,l);(c||!t.selection.eq(r.selection))&&(i=!0);let d=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&X5(this);if(i){this.domObserver.stop();let h=c&&(Er||Yn)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&gz(r.selection,t.selection);if(c){let f=Yn?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,a,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=FS(t.doc,a,l,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&w3(this))?Bi(this,h):(p2(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&q5(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&LS(this,n.getBoundingClientRect(),t)}else LS(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return n3(this,t)}coordsAtPos(t,n=1){return s2(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return a3(this,n||this.state,t)}pasteHTML(t,n){return Kd(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Kd(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(D3(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],a1(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 z3(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return lr&&this.root.nodeType===11&&U5(this.dom.ownerDocument)==this.dom?sz(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function rC(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[yt.node(0,e.state.doc.content.size,t)]}function oC(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:yt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function iC(e){return!e.someProp("editable",t=>t(e.state)===!1)}function gz(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function sC(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function mz(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function aC(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 vz=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};const yz=Ko(vz);var I2=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ze=(e,t,n)=>(I2(e,t,"read from private field"),n?n.call(e):t.get(e)),Ei=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},kt=(e,t,n,r)=>(I2(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function bz(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function wz(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function xz(e){return!!(!e.prev&&e.next)}function kz(e){return!!(e.prev&&!e.next)}function Ez(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function Sz(e){return e==="invalid-exit-split"}var Cz=["jump-backward-exit","jump-forward-exit"],Tz=["jump-backward-change","jump-forward-change"];function Az(e){var t,n;return ar(Cz,(t=e.exit)==null?void 0:t.exitReason)||ar(Tz,(n=e.change)==null?void 0:n.changeReason)}function lC(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function cC(e){return Pn(e)&&e instanceof Ie}function wr(e){const{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function _z(e,t){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(N0(n)).test(e):new RegExp(N0(r)).test(e)}function Rz(e){const{text:t,regexp:n,$pos:r,suggester:o}=e,i=r.start();let s;return cu(t,n).forEach(l=>{const a=l.input.slice(Math.max(0,l.index-1),l.index);if(_z(a,o)){const u=l.index+i,c=l[0],d=l[1];if(!ke(c)||!ke(d))return;const h=u+c.length,f=Math.min(h,r.pos),p=f-u;u=r.pos&&(s={range:{from:u,to:h,cursor:f},match:l,query:{partial:c.slice(d.length,p),full:c.slice(d.length)},text:{partial:c.slice(0,p),full:c},textAfter:r.doc.textBetween(h,r.end(),Es,Es),textBefore:r.doc.textBetween(i,u,Es,Es),suggester:o})}}),s}function L2(e){const{$pos:t,suggester:n}=e,{char:r,name:o,startOfLine:i,supportedCharacters:s,matchOffset:l,multiline:a,caseInsensitive:u,unicode:c}=n,d=zz({char:r,matchOffset:l,startOfLine:i,supportedCharacters:s,multiline:a,caseInsensitive:u,unicode:c}),h=t.doc.textBetween(t.before(),t.end(),Es,Es);return Rz({suggester:n,text:h,regexp:d,$pos:t,char:r,name:o})}function N2(e){const{state:t,match:n}=e;try{return L2({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function $2(e){const{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:wr({match:t,exitReason:"delete"})}:!n||!t.query.partial?{exit:wr({match:t,exitReason:"invalid-exit-split"})}:t.range.to===n.range.cursor?{exit:wr({match:n,exitReason:"exit-end"})}:t.query.partial?{exit:wr({match:n,exitReason:"exit-split"})}:{}}function Mz(e){const{prev:t,next:n,state:r}=e,o=be(),i=N2({state:r,match:t}),{exit:s}=i&&i.query.full!==t.query.full?$2({prev:t,next:i,state:r}):o;return t.range.from=t.range.to)?{exit:wr({match:t,exitReason:"selection-outside"})}:r.pos>t.range.to?{exit:wr({match:t,exitReason:"move-end"})}:r.pos<=t.range.from?{exit:wr({match:t,exitReason:"move-start"})}:{}}function Iz(e){const{prev:t,next:n,state:r,$pos:o}=e,i=be();if(!t&&!n)return i;const s={prev:t,next:n};return Ez(s)?Mz({prev:s.prev,next:s.next,state:r}):xz(s)?{change:wr({match:s.next,changeReason:"start"})}:kz(s)?Oz({$pos:o,match:s.prev,state:r}):bz(s)?{change:wr({match:s.next,changeReason:"change-character"})}:wz(s)?{change:wr({match:s.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function uC(e,t){for(let n=e.depth;n>0;n--){const r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function L0(e,t){const{$from:n,$to:r}=e;return D2(e,t)?!0:yb(n.pos,r.pos).some(o=>Lz(n.doc.resolve(o),t))}function D2(e,t){const{$from:n,$to:r}=e,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function Lz(e,t){const n=new Set(e.marks().map(r=>r.type.name));return t.some(r=>n.has(r))}function Nz(e,t){const{$cursor:n}=t,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:s}=e;return!r&&!o&&Ws(i)&&Ws(s)?!0:!(r&&!D2(t,r)||o&&!uC(n,o)||!r&&L0(t,i)||!o&&uC(n,s))}function dC(e){const{suggesters:t,$pos:n,selectionEmpty:r}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!r))try{const i=L2({suggester:o,$pos:n});if(!i)continue;const s={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(Nz(o,s)&&o.isValidPosition(s,i))return i}catch{}}function N0(e){return gD(e)?e.source:e}function $z(e){return e?"^":""}function Dz(e,t){return`(?:${N0(e)}){${t},}`}function Pz(e){return ke(e)?new RegExp(yz(e)):e}function zz(e){const{char:t,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:l=!1,unicode:a=!1}=e,u=`g${l?"m":""}${s?"i":""}${a?"u":""}`;let c=Pz(t).source;return i&&(c=`(${c})`),new RegExp(`${$z(r)}${c}${Dz(o,n)}`,u)}var Fz={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},P2="__ignore_prosemirror_suggest_update__",cp,ju,mn,ds,Xl,qo,an,hs,ql,z2=class{constructor(e){Ei(this,cp,!1),Ei(this,ju,!1),Ei(this,mn,void 0),Ei(this,ds,void 0),Ei(this,Xl,void 0),Ei(this,qo,be()),Ei(this,an,We.empty),Ei(this,hs,!1),Ei(this,ql,!1),this.setMarkRemoved=()=>{kt(this,hs,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),s=Ue.findFrom(i,1,!0);if(cC(s))return s},this.ignoreNextExit=()=>{kt(this,ju,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=ze(this,mn).find(c=>c.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const s=ke(i.char)?i.char.length:1,l=n+s,a=i.ignoredClassName?{class:i.ignoredClassName}:{},u=yt.inline(n,l,{nodeName:i.ignoredTag,...a},{name:r,specific:o,char:i.char});kt(this,an,ze(this,an).add(this.view.state.doc,[u]))},this.removeIgnored=({from:n,name:r})=>{const o=ze(this,mn).find(l=>l.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=ke(o.char)?o.char.length:1,s=ze(this,an).find(n,n+i)[0];!s||s.spec.name!==r||kt(this,an,ze(this,an).remove([s]))},this.clearIgnored=n=>{if(!n){kt(this,an,We.empty);return}const o=ze(this,an).find().filter(({spec:i})=>i.name===n);kt(this,an,ze(this,an).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?ze(this,mn).filter(i=>i.name===r):ze(this,mn);return dC({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{kt(this,ql,!0)};const t=hC();kt(this,mn,e.map(t)),kt(this,mn,Vs(ze(this,mn),(n,r)=>r.priority-n.priority))}static create(e){return new z2(e)}get decorationSet(){return ze(this,an)}get removed(){return ze(this,hs)}get match(){return ze(this,ds)?ze(this,ds):ze(this,Xl)&&ze(this,qo).exit?ze(this,Xl):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return ze(this,ju)?(kt(this,ju,!1),!1):!0}updateWithNextSelection(e){var t,n,r;const o=this.findNextTextSelection(e.selection);if(o)for(const i of ze(this,mn)){const s=(t=ze(this,qo).change)==null?void 0:t.suggester.name,l=(n=ze(this,qo).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,e,{change:s,exit:l})}}changeHandler(e,t){const{change:n,exit:r}=ze(this,qo),o=this.match;if(!n&&!r||!lC(o))return;const i=t===(r==null?void 0:r.suggester.appendTransaction)&&this.shouldRunExit(),s=t===(n==null?void 0:n.suggester.appendTransaction);if(!(!i&&!s)){if(n&&r&&Az({change:n,exit:r})){const l=this.createProps(r),a=this.createProps(n),u=r.range.from{const l=ke(s.char)?s.char.length:1;return i-o!==l});kt(this,an,t.remove(r))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return ze(this,an).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){kt(this,qo,be()),kt(this,ds,void 0),kt(this,hs,!1),kt(this,ql,!1)}updateReasons(e){const{$pos:t,state:n}=e,r=ze(this,cp),o=ze(this,mn),i=n.selection.empty,s=cC(n.selection)?dC({suggesters:o,$pos:t,docChanged:r,selectionEmpty:i}):void 0;kt(this,ds,s&&this.shouldIgnoreMatch(s)?void 0:s),kt(this,qo,Iz({next:ze(this,ds),prev:ze(this,Xl),state:n,$pos:t}))}addSuggester(e){const t=ze(this,mn).find(r=>r.name===e.name),n=hC();if(t)kt(this,mn,ze(this,mn).map(r=>r===t?n(e):r));else{const r=[...ze(this,mn),n(e)];kt(this,mn,Vs(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=ke(e)?e:e.name;kt(this,mn,ze(this,mn).filter(n=>n.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:n}=ze(this,qo);if(ze(this,ql)&&(kt(this,ql,!1),!(t!=null&&t.suggester.appendTransaction)&&!(n!=null&&n.suggester.appendTransaction)))return this;const{tr:r,state:o}=e,i=r.docChanged||r.selectionSet;return r.getMeta(P2)||!i&&!ze(this,hs)?this:(kt(this,cp,r.docChanged),this.mapIgnoredDecorations(r),t&&this.resetState(),kt(this,Xl,ze(this,ds)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!lC(t))return ze(this,an);const{disableDecorations:n}=t.suggester;if(tt(n)?n(e,t):n)return ze(this,an);const{range:o,suggester:i}=t,{name:s,suggestTag:l,suggestClassName:a}=i,{from:u,to:c}=o;return this.shouldIgnoreMatch(t)?ze(this,an):ze(this,an).add(e.doc,[yt.inline(u,c,{nodeName:l,class:s?`${a} suggest-${s}`:a},{name:s})])}},Bz=z2;cp=new WeakMap;ju=new WeakMap;mn=new WeakMap;ds=new WeakMap;Xl=new WeakMap;qo=new WeakMap;an=new WeakMap;hs=new WeakMap;ql=new WeakMap;function hC(){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 n={...Fz,...t};return e.add(t.name),n}}var F2=new yl("suggest");function Nb(e){return F2.getState(e)}function fC(e,t){return Nb(e).addSuggester(t)}function pC(e){e.setMeta(P2,!0)}function Hz(e,t){return Nb(e).removeSuggester(t)}function Uz(...e){const t=Bz.create(e);return new yi({key:F2,view:n=>(t.init(n),{update:r=>t.changeHandler(r.state.tr,!1)}),state:{init:()=>t,apply:(n,r,o,i)=>t.apply({tr:n,state:i})},appendTransaction:(n,r,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:n=>t.createDecorations(n)}})}function $b(e,t){const n=Object.getPrototypeOf(t);let r=e.selection,o=e.doc,i=e.storedMarks;const s=be();for(const[l,a]of Object.entries(t))s[l]={value:a};return Object.create(n,{...s,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=e.selection,o=e.doc,i=e.storedMarks,e}}})}function Ad(e){return({state:t,dispatch:n,view:r,tr:o})=>e($b(o,t),n,r)}function gC(e){return t=>{var n;return we(t.dispatch===void 0||t.dispatch===((n=t.view)==null?void 0:n.dispatch),{code:re.NON_CHAINABLE_COMMAND}),e(t)}}function Wz(...e){return({state:t,dispatch:n,view:r,tr:o,...i})=>{for(const s of e)if(s({state:t,dispatch:n,view:r,tr:o,...i}))return!0;return!1}}var br={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return br.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return br.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return br.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return br.isNode?process.platform==="darwin":br.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function Zo(e,t){var n;const r=yF(e);return((n=r==null?void 0:r.getComputedStyle(e))==null?void 0:n.getPropertyValue(t))??""}function Vn(e,t){return Object.assign(e.style,t)}function eg(e){return Pn(e)&&Zr(e.nodeType)&&ke(e.nodeName)}function zt(e){return eg(e)&&e.nodeType===1}function Vz(e){return eg(e)&&e.nodeType===3}function gm(e){const{types:t,node:n}=e;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Bt(t)?t.some(r):r(t)}function jz(e,t){const{tr:n}=t;return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Gz({pos:e,tr:t}){const n=t.doc.nodeAt(e);return n&&t.delete(e,e+n.nodeSize),t}function Kz({pos:e,tr:t,content:n}){const r=t.doc.nodeAt(e);return r&&t.replaceWith(e,e+r.nodeSize,n),t}function jh(e){const{predicate:t,selection:n}=e,r=U2(n)?n.selection.$from:zb(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),s=o>0?r.before(o):0,l=r.start(o),a=s+i.nodeSize;if(t(i,s))return{pos:s,depth:o,node:i,start:l,end:a}}}function Yz(e){const{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t),o=e.start(t),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:t}}function Xz(e){const t=jh({predicate:()=>!0,selection:e});return we(t,{message:"No parent node found for the selection provided."}),t}function gi(e){const{types:t,selection:n}=e;return jh({predicate:r=>gm({types:t,node:r}),selection:n})}function qz(e){const{types:t,selection:n}=e;if(!(!Kh(n)||!gm({types:t,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Db(e){return zb(e)?e.empty:e.selection.empty}function Zz(e){return e.docChanged||e.selectionSet}function B2(e){return!!Xd(e)}function Xd(e){const{state:t,type:n,attrs:r}=e,{selection:o,doc:i}=t,s=ke(n)?i.type.schema.nodes[n]:n;we(s,{code:re.SCHEMA,message:`No node exists for ${n}`});const l=qz({selection:o,types:n})??jh({predicate:a=>a.type===s,selection:o});return!r||Vd(r)||!l||l.node.hasMarkup(s,{...l.node.attrs,...r})?l:void 0}function tg(...e){return t=>{if(!aS(e))return!1;const[n,...r]=e;let o=!1;const i=(...a)=>()=>{if(!aS(a))return!1;o=!0;const[,...u]=a;return tg(...a)({...t,next:i(...u)})},s=i(...r),l=n({...t,next:s});return o||l?l:s()}}function Qz(e,t){const n=new Map,r=be();for(const o of e)for(const[i,s]of cn(o)){const a=[...n.get(i)??[],s],u=tg(...a);n.set(i,a),r[i]=t(u)}return r}function Jz(e){return Qz(e,t=>(n,r,o)=>t({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function Pb(e,t){const n=e.attrs??{};return Object.entries(t).every(([r,o])=>n[r]===o)}function eF(e){return V2(e,[Ni,qt,bn,Fo])}function du(e){return Pn(e)}function hu(e,t){return Bt(t)?ar(t,e[Ui]):t===e[Ui]}function tF(e){return Pn(e)&&e instanceof b0}function nF(e,t){return ke(e)?It(t.nodes,e):e}function H2(e){return Pn(e)&&e instanceof Hh}function rF(e,t){return ke(e)?It(t.marks,e):e}function Gh(e){return Pn(e)&&e instanceof Rs}function oF(e){return Pn(e)&&e instanceof Q}function iF(e){return Pn(e)&&e instanceof Ke}function U2(e){return Pn(e)&&e instanceof Da}function ra(e){return Pn(e)&&e instanceof Ie}function sF(e){return Pn(e)&&e instanceof ir}function zb(e){return Pn(e)&&e instanceof Ue}function aF(e){return Pn(e)&&e instanceof Nc}function mC(e){const{trState:t,from:n,to:r,type:o,attrs:i={}}=e,{doc:s}=t,l=rF(o,s.type.schema);if(Object.keys(i).length===0)return s.rangeHasMark(n,r,l);let a=!1;return r>n&&s.nodesBetween(n,r,u=>a?!1:(a=(u.marks??[]).some(d=>d.type!==l?!1:Pb(d,i)),!a)),a}function Kh(e){return Pn(e)&&e instanceof Le}function ng(e){const{trState:t,type:n,attrs:r={},from:o,to:i}=e,{selection:s,doc:l,storedMarks:a}=t,u=ke(n)?l.type.schema.marks[n]:n;if(we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)d.type!==n?!1:Pb(d,r??{})):mC({...e,from:s.from,to:s.to})}function Fb(e,t={}){const n=lF(e.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=t;return r?W2(n,e):o?n.content.eq(e.content):n.eq(e)}function W2(e,t){if(e===t)return!0;const n=e.type===t.type&&Ke.sameSet(e.marks,t.marks);function r(){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,l]of o.entries()){const a=i[s];if(!a||!W2(l,a))return!1}return!0}return n&&r()}function lF(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function mm(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;we(!1,{code:re.SCHEMA,message:"No default block node found for the provided schema."})}function cF(e){return e.type===mm(e.type.schema)}function vm(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function Wi(e,t,n){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const o=ke(t)?t:t.name,i=r.node.marks.find(({type:d})=>d.name===o);let s=e.index(),l=e.start()+r.offset,a=s+1,u=l+r.node.nodeSize;if(!i)return n&&u0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,l-=e.parent.child(s).nodeSize;for(;at instanceof n)}function tF(t){return hb(t,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,s)=>r===s?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function P2(t,e=[]){const n=[],{steps:r,mapping:o}=t,i=o.invert();r.forEach((l,a)=>{if(!D2(l,e))return;const u=[],c=l.getMap(),d=o.slice(a);if(c.ranges.length===0&&jz(l)){const{from:h,to:f}=l;u.push({from:h,to:f})}else c.forEach((h,f)=>{u.push({from:h,to:f})});u.forEach(h=>{const f=d.map(h.from,-1),p=d.map(h.to);n.push({from:f,to:p,prevFrom:i.map(f,-1),prevTo:i.map(p)})})});const s=Ka(n,(l,a)=>l.from-a.from);return tF(s)}function nF(t,e){const n=[],r=P2(t,e);for(const o of r)try{const i=t.doc.resolve(o.from),s=t.doc.resolve(o.to),l=i.blockRange(s);l&&n.push(l)}catch{}return n}function rF(t){var e;return((e=t.content.firstChild)==null?void 0:e.textContent)??""}function oF(t,e){if(!Js(t.selection))return;let{from:n,to:r}=t.selection;const o=(s,l)=>rF(Ie.between(t.doc.resolve(s),t.doc.resolve(l)).content());for(let s=o(n-1,n);s&&!e.test(s);n--,s=o(n-1,n));for(let s=o(r,r+1);s&&!e.test(s);r++,s=o(r,r+1));if(n===r)return;const i=t.doc.textBetween(n,r,cb,` +`);return{from:l,to:u,text:c,mark:i}}function V2(e,t){return t.length===0||t.some(n=>e instanceof n)}function uF(e){return vb(e,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,s)=>r===s?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function j2(e,t=[]){const n=[],{steps:r,mapping:o}=e,i=o.invert();r.forEach((l,a)=>{if(!V2(l,t))return;const u=[],c=l.getMap(),d=o.slice(a);if(c.ranges.length===0&&eF(l)){const{from:h,to:f}=l;u.push({from:h,to:f})}else c.forEach((h,f)=>{u.push({from:h,to:f})});u.forEach(h=>{const f=d.map(h.from,-1),p=d.map(h.to);n.push({from:f,to:p,prevFrom:i.map(f,-1),prevTo:i.map(p)})})});const s=Vs(n,(l,a)=>l.from-a.from);return uF(s)}function dF(e,t){const n=[],r=j2(e,t);for(const o of r)try{const i=e.doc.resolve(o.from),s=e.doc.resolve(o.to),l=i.blockRange(s);l&&n.push(l)}catch{}return n}function hF(e){var t;return((t=e.content.firstChild)==null?void 0:t.textContent)??""}function fF(e,t){if(!ra(e.selection))return;let{from:n,to:r}=e.selection;const o=(s,l)=>hF(Ie.between(e.doc.resolve(s),e.doc.resolve(l)).content());for(let s=o(n-1,n);s&&!t.test(s);n--,s=o(n-1,n));for(let s=o(r,r+1);s&&!t.test(s);r++,s=o(r,r+1));if(n===r)return;const i=e.doc.textBetween(n,r,fb,` -`);return{from:n,to:r,text:i}}function z2(t){return oF(t,/\W/)}function yc(t,e=0){const n=Bt(t)?t[e]:t;return oR(ke(n),`No match string found for match ${t}`),n??""}function iF(t){return Js(t)?t.$cursor:void 0}function sF(t,e){return Uh(t)?e?t.type===e.nodes.doc:t.type.name==="doc":!1}function aF(t){return Dn(t)&&Yr(t.anchor)&&Yr(t.head)}function po(t,e){const n=e.nodeSize-2,r=0;let o;const i=a=>dD({min:r,max:n,value:a});if(Lb(t))return t;if(t==="all")return new or(e);if(t==="start"?o=r:t==="end"?o=n:Qz(t)?o=t.pos:o=t,Yr(o))return o=i(o),Ie.near(e.resolve(o));if(aF(o)){const a=i(o.anchor),u=i(o.head);return Ie.between(e.resolve(a),e.resolve(u))}const s=i(o.from),l=i(o.to);return Ie.between(e.resolve(s),e.resolve(l))}var lF=3;function F2(t){const{content:e,schema:n,document:r,stringHandler:o,onError:i,attempts:s=0}=t,l=i&&s<=lF||s===0;if(we(l,{code:re.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."}),ke(e))return we(o,{code:re.INVALID_CONTENT,message:`The string '${e}' 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:r,content:e,schema:n});if(N2(e))return e.doc;if(Uh(e))return e;try{return n.nodeFromJSON(e)}catch(a){const u=mF({schema:n,error:a,json:e}),c=i==null?void 0:i(u);return we(c,{code:re.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(u.invalidContent,null,2)}`}),F2({...t,content:c,attempts:s+1})}}function pm(){const t=WR();if(t)return t;throw new Error(`Unable to retrieve the document from the global scope. +`);return{from:n,to:r,text:i}}function G2(e){return fF(e,/\W/)}function xc(e,t=0){const n=Bt(e)?e[t]:e;return gb(ke(n),`No match string found for match ${e}`),n??""}function pF(e){return ra(e)?e.$cursor:void 0}function gF(e,t){return Gh(e)?t?e.type===t.nodes.doc:e.type.name==="doc":!1}function mF(e){return Pn(e)&&Zr(e.anchor)&&Zr(e.head)}function Mr(e,t){const n=t.nodeSize-2,r=0;let o;const i=a=>wD({min:r,max:n,value:a});if(zb(e))return e;if(e==="all")return new ir(t);if(e==="start"?o=r:e==="end"?o=n:aF(e)?o=e.pos:o=e,Zr(o))return o=i(o),Ie.near(t.resolve(o));if(mF(o)){const a=i(o.anchor),u=i(o.head);return Ie.between(t.resolve(a),t.resolve(u))}const s=i(o.from),l=i(o.to);return Ie.between(t.resolve(s),t.resolve(l))}var vF=3;function K2(e){const{content:t,schema:n,document:r,stringHandler:o,onError:i,attempts:s=0}=e,l=i&&s<=vF||s===0;if(we(l,{code:re.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."}),ke(t))return we(o,{code:re.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:r,content:t,schema:n});if(U2(t))return t.doc;if(Gh(t))return t;try{return n.nodeFromJSON(t)}catch(a){const u=CF({schema:n,error:a,json:t}),c=i==null?void 0:i(u);return we(c,{code:re.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(u.invalidContent,null,2)}`}),K2({...e,content:c,attempts:s+1})}}function ym(){const e=ZR();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 B2(t){var e;return(t==null?void 0:t.defaultView)??(typeof window<"u"?window:void 0)??((e=WR())==null?void 0:e.defaultView)}function cF(t){return B2(t==null?void 0:t.ownerDocument)}function uF(t){const e=B2(t)??pm().defaultView;if(e)return e;throw new Error("Unable to retrieve the window from the global scope")}function dF(t,e=pm()){const n=sF(t,t.type.schema)?t.content:Q.from(t);return Ur.fromSchema(t.type.schema).serializeFragment(n,{document:e})}function hF(t,e){return new(uF(e)).DOMParser().parseFromString(`${t}`,"text/html").body}function fF(t,e=pm()){const n=e.createElement("div");return n.append(dF(t,e)),n.innerHTML}function O0(t){const{content:e,schema:n,document:r,fragment:o=!1,...i}=t,s=hF(e,r),l=pb.fromSchema(n);return o?l.parseSlice(s,{...fC,...i}).content:l.parse(s,{...fC,...i})}var fC={preserveWhitespace:!1};function gm(t,e){const n=Bd(e.defaults());return ub({...t},n)}function pF(t,e){let n="";e&&(n=`${e.trim()}`);const r=wP(t);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var gF={remove(t,e){let n=t;for(const r of e)r.invalidParentNode||(n=pD(r.path,n));return n}};function mF({json:t,schema:e,...n}){const r=new Set(Bd(e.marks)),o=new Set(Bd(e.nodes)),i=H2({json:t,path:[],validNodes:o,validMarks:r});return{json:t,invalidContent:i,transformers:gF,...n}}function H2(t){const{json:e,validMarks:n,validNodes:r,path:o=[]}=t,i={validMarks:n,validNodes:r},s=[],{type:l,marks:a,content:u}=e;let{invalidParentMark:c=!1,invalidParentNode:d=!1}=t;if(a){const h=[];for(const[f,p]of a.entries()){const g=ke(p)?p:p.type;n.has(g)||(h.unshift({name:g,path:[...o,"marks",`${f}`],type:"mark",invalidParentMark:c,invalidParentNode:d}),c=!0)}s.push(...h)}if(r.has(l)||(s.push({name:l,type:"node",path:o,invalidParentMark:c,invalidParentNode:d}),d=!0),u){const h=[];for(const[f,p]of u.entries())h.unshift(...H2({...i,json:p,path:[...o,"content",`${f}`],invalidParentMark:c,invalidParentNode:d}));s.unshift(...h)}return s}function vF(t){return!!(Js(t)&&t.$cursor&&t.$cursor.parentOffset>=t.$cursor.parent.content.size)}function I0(t){return!!(Js(t)&&t.$cursor&&t.$cursor.parentOffset<=0)}function pC(t){const e=Ue.atStart(t.$anchor.doc);return!!(I0(t)&&e.anchor===t.anchor)}function yF(t){return({dispatch:e,tr:n})=>{const{type:r,attrs:o=be(),appendText:i,range:s}=t,l=s?Ie.between(n.doc.resolve(s.from),n.doc.resolve(s.to)):n.selection,{$from:a,from:u,to:c}=l;let d=a.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(u,c,h=>{if(d)return!1;if(h.inlineContent&&h.type.allowsMarkType(r)){d=!0;return}}),d?(e==null||e(n.addMark(u,c,r.create(o))&&i?n.insertText(i):n),!0):!1}}function bF({tr:t,dispatch:e}){const{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&au(o);return!Yr(i)||!o?!1:(e==null||e(t.lift(o,i).scrollIntoView()),!0)}function U2(t,e={},n){return function(r){const{tr:o,dispatch:i,state:s}=r,l=ke(t)?Ot(s.schema.nodes,t):t,{from:a,to:u}=po(n??o.selection,o.doc),c=o.doc.resolve(a),d=o.doc.resolve(u),h=c.blockRange(d),f=h&&mb(h,l,e);return!f||!h?!1:(i==null||i(o.wrap(h,f).scrollIntoView()),!0)}}function W2(t,e={},n){return r=>{const{tr:o,state:i}=r,s=ke(t)?Ot(i.schema.nodes,t):t;return jd({state:o,type:s,attrs:e})?bF(r):U2(t,e,n)(r)}}function Gd(t,e,n,r=!0){return function(o){const{tr:i,dispatch:s,state:l}=o,a=ke(t)?Ot(l.schema.nodes,t):t,{from:u,to:c}=po(n??i.selection,i.doc);let d=!1,h;return i.doc.nodesBetween(u,c,(f,p)=>{if(d)return!1;if(!f.isTextblock||f.hasMarkup(a,e))return;if(f.type===a){d=!0,h=f.attrs;return}const g=i.doc.resolve(p),m=g.index();d=g.parent.canReplaceWith(m,m+1,a),d&&(h=g.parent.attrs)}),d?(s==null||s(i.setBlockType(u,c,a,{...r?h:{},...e}).scrollIntoView()),!0):!1}}function $b(t){return e=>{const{tr:n,state:r}=e,{type:o,attrs:i,preserveAttrs:s=!0}=t,l=jd({state:n,type:o,attrs:i}),a=t.toggleType??hm(r.schema);if(l)return Gd(a,{...s?l.node.attrs:{},...i})(e);const u=jd({state:n,type:a,attrs:i});return Gd(o,{...s?u==null?void 0:u.node.attrs:{},...i})(e)}}function wF(t=0){const e=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return e?Number.parseInt(Ot(e,2),10)>=t:!1}function xF(t,e){let{head:n,empty:r,anchor:o}=t;for(const i of e.steps)n=i.getMap().map(n);r?e.setSelection(Ie.near(e.doc.resolve(n))):e.setSelection(Ie.between(e.doc.resolve(o),e.doc.resolve(n)))}function kF(t){const{attrs:e={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=t;return({state:s,tr:l,dispatch:a})=>{var u;const c=s.schema,d=po(t.selection??i??l.selection,l.doc),h=d.$from.index(),{from:f,to:p,$from:g}=d,m=ke(t.type)?c.nodes[t.type]??c.marks[t.type]:t.type;if(we(ke(t.type)?m:!0,{code:re.SCHEMA,message:`Schema contains no marks or nodes with name ${m}`}),Gz(m)){if(!g.parent.canReplaceWith(h,h,m))return!1;l.replaceWith(f,p,m.create(e,r?c.text(r):void 0))}else we(r,{message:"`replaceText` cannot be called without content when using a mark type"}),l.replaceWith(f,p,c.text(r,L2(m)?[m.create(e)]:void 0));return n&&l.insertText(n),o&&xF(s.selection,l),a&&(wF(60)&&((u=document.getSelection())==null||u.empty()),a(l)),!0}}function V2(t,e){const n=t.parent.childAfter(t.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const s=t.start()+n.offset+o;return V2(t.doc.resolve(s+1))}function j2(t){return({dispatch:e,tr:n,state:r})=>{const{type:o,expand:i=!0,range:s}=t,l=po(t.selection??s??n.selection,n.doc);let{from:a,to:u,$from:c,$to:d}=l;const h=ke(o)?r.schema.marks[o]:o;h!==null&&we(h,{code:re.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const f=h??V2(c);if(!f)return!1;const p=Hi(c,f,d);return i&&p&&(a=Math.max(0,Math.min(a,p.from)),u=Math.min(Math.max(u,p.to),n.doc.nodeSize-2)),e==null||e(n.removeMark(a,Yr(u)?u:a,L2(h)?h:void 0)),!0}}function EF(t){const e=["command","cmd","meta"];return Br.isMac&&e.push("mod"),e.includes(t)}function SF(t){const e=["control","ctrl"];return Br.isMac||e.push("mod"),e.includes(t)}function CF(t){const e=[];for(let n of t.split("-")){if(n=n.toLowerCase(),EF(n)){e.push({type:"modifier",symbol:"⌘",key:"command",i18n:on.COMMAND_KEY});continue}if(SF(n)){e.push({type:"modifier",symbol:"⌃",key:"control",i18n:on.CONTROL_KEY});continue}switch(n){case"shift":e.push({type:"modifier",symbol:"⇧",key:n,i18n:on.SHIFT_KEY});continue;case"alt":e.push({type:"modifier",symbol:"⌥",key:n,i18n:on.ALT_KEY});continue;case` -`:case"\r":case"enter":e.push({type:"named",symbol:"↵",key:n,i18n:on.ENTER_KEY});continue;case"backspace":e.push({type:"named",symbol:"⌫",key:n,i18n:on.BACKSPACE_KEY});continue;case"delete":e.push({type:"named",symbol:"⌦",key:n,i18n:on.DELETE_KEY});continue;case"escape":e.push({type:"named",symbol:"␛",key:n,i18n:on.ESCAPE_KEY});continue;case"tab":e.push({type:"named",symbol:"⇥",key:n,i18n:on.TAB_KEY});continue;case"capslock":e.push({type:"named",symbol:"⇪",key:n,i18n:on.CAPS_LOCK_KEY});continue;case"space":e.push({type:"named",symbol:"␣",key:n,i18n:on.SPACE_KEY});continue;case"pageup":e.push({type:"named",symbol:"⤒",key:n,i18n:on.PAGE_UP_KEY});continue;case"pagedown":e.push({type:"named",symbol:"⤓",key:n,i18n:on.PAGE_DOWN_KEY});continue;case"home":e.push({type:"named",key:n,i18n:on.HOME_KEY});continue;case"end":e.push({type:"named",key:n,i18n:on.END_KEY});continue;case"arrowleft":e.push({type:"named",symbol:"←",key:n,i18n:on.ARROW_LEFT_KEY});continue;case"arrowright":e.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_RIGHT_KEY});continue;case"arrowup":e.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_UP_KEY});continue;case"arrowdown":e.push({type:"named",symbol:"↓",key:n,i18n:on.ARROW_DOWN_KEY});continue;default:e.push({type:"char",key:n});continue}}return e}function TF(t){const{node:e,predicate:n,descend:r=!0,action:o}=t;we(Uh(e),{code:re.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),we(tt(n),{code:re.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return e.descendants((s,l)=>{const a={node:s,pos:l};return n(a)&&(i.push(a),o==null||o(a)),r}),i}function AF(t){const{type:e,...n}=t;return TF({...n,predicate:r=>r.node.type===e})}function _F(t,e={}){const{descend:n=!1,predicate:r,StepTypes:o}=e,i=nF(t,o),s=[];for(const l of i){const{start:a,end:u}=l;t.doc.nodesBetween(a,u,(c,d)=>(((r==null?void 0:r(c,d,l))??!0)&&s.push({node:c,pos:d}),n))}return s}function Kd(t){const{regexp:e,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:l,invalidMarks:a}=t;let u;const c=new ml(e,(d,h,f,p)=>{const{tr:g,schema:m}=d;u||(u=ke(n)?m.marks[n]:n,we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=h[1],y=h[0];const b=K2({captureGroup:v,fullMatch:y,end:p,start:f,rule:c,state:d,ignoreWhitespace:o,invalidMarks:a,shouldSkip:l,updateCaptured:s});if(!b)return null;({start:f,end:p,captureGroup:v,fullMatch:y}=b);const w=tt(r)?r(h):r;let k=p,x=[];if(v){const S=y.search(/\S/),T=f+y.indexOf(v),C=T+v.length;x=g.storedMarks??[],Cf&&g.delete(f+S,T),k=f+S+v.length}return g.addMark(f,k,u.create(w)),g.setStoredMarks(x),i==null||i({tr:g,match:h,start:f,end:p}),g});return c}function G2(t){const{regexp:e,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:l,invalidMarks:a}=t,u=new ml(e,(c,d,h,f)=>{const p=tt(r)?r(d):r,{tr:g,schema:m}=c,v=ke(n)?m.nodes[n]:n;let y=d[1],b=d[0];const w=K2({captureGroup:y,fullMatch:b,end:f,start:h,rule:u,state:c,ignoreWhitespace:s,invalidMarks:a,shouldSkip:i,updateCaptured:l});if(!w)return null;({start:h,end:f,captureGroup:y,fullMatch:b}=w),we(v,{code:re.SCHEMA,message:`No node exists for ${n} in the schema.`});const k=v.createAndFill(p);return k&&(g.replaceRangeWith(v.isBlock?g.doc.resolve(h).before():h,f,k),o==null||o({tr:g,match:[b,y??""],start:h,end:f})),g});return u}function K2({captureGroup:t,fullMatch:e,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:l,state:a,invalidMarks:u}){var c;if(e==null)return null;const d=(l==null?void 0:l({captureGroup:t,fullMatch:e,start:r,end:n}))??{};t=d.captureGroup??t,e=d.fullMatch??e,r=d.start??r,n=d.end??n;const h=a.doc.resolve(r),f=a.doc.resolve(n);return u&&R0({$from:h,$to:f},u)||o.invalidMarks&&R0({$from:h,$to:f},o.invalidMarks)||i&&(t==null?void 0:t.trim())===""||s!=null&&s({state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})||(c=o.shouldSkip)!=null&&c.call(o,{state:a,captureGroup:t,fullMatch:e,start:r,end:n,ruleType:"mark"})?null:{captureGroup:t,end:n,fullMatch:e,start:r}}var RF=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];e.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");n[a]=l}else r.push(l)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},MF=RF;const Y2=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function OF(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const X2=(t,e,n)=>{let r=OF(t,n);if(!r)return!1;let o=q2(r);if(!o){let s=r.blockRange(),l=s&&au(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&J2(t,o,e))return!0;if(r.parent.content.size==0&&(Dc(i,"end")||Le.isSelectable(i))){let s=vb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=q2(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Le.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function q2(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function LF(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let r=LF(t,n);if(!r)return!1;let o=Z2(r);if(!o)return!1;let i=o.nodeAfter;if(J2(t,o,e))return!0;if(r.parent.content.size==0&&(Dc(i,"start")||Le.isSelectable(i))){let s=vb(t.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` -`).scrollIntoView()),!0)};function Db(t){for(let e=0;e{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Db(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Ue.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},PF=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof or||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Db(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(gc(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&au(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function FF(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Le&&e.selection.node.isBlock)return!r.parentOffset||!gc(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,s=e.tr;(e.selection instanceof Ie||e.selection instanceof or)&&s.deleteSelection();let l=r.depth==0?null:Db(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=t&&t(o.parent,i),u=a?[a]:i&&l?[{type:l}]:void 0,c=gc(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&gc(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=l)){let d=s.mapping.map(r.before()),h=s.doc.resolve(d);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const BF=FF(),HF=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Le.create(t.doc,o))),!0)},UF=(t,e)=>(e&&e(t.tr.setSelection(new or(t.doc))),!0);function WF(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||zh(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function J2(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(WF(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let d=e.pos+o.nodeSize,h=Q.empty;for(let g=i.length-1;g>=0;g--)h=Q.from(i[g].create(null,h));h=Q.from(r.copy(h));let f=t.tr.step(new qt(e.pos-1,d,e.pos,d,new ae(h,1,0),i.length,!0)),p=d+2*i.length;zh(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let a=Ue.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),c=u&&au(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(l&&Dc(o,"start",!0)&&Dc(r,"end")){let d=r,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=o,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(n){let g=Q.empty;for(let v=h.length-1;v>=0;v--)g=Q.from(h[v].copy(g));let m=t.tr.step(new qt(e.pos-h.length,e.pos+o.nodeSize,e.pos+p,e.pos+o.nodeSize-p,new ae(g,h.length,0),0,!0));n(m.scrollIntoView())}return!0}}return!1}function eM(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Ie.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const VF=eM(-1),jF=eM(1);function GF(t,e,n){for(let r=0;r{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(n)}),s)return!0}return!1}function KF(t,e=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!GF(n.doc,s,t))return!1;if(r)if(i)t.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let l=!1,a=n.tr;for(let u=0;!l&&u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XF=typeof navigator<"u"&&/Mac/.test(navigator.platform),qF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ln=0;Ln<10;Ln++)Us[48+Ln]=Us[96+Ln]=String(Ln);for(var Ln=1;Ln<=24;Ln++)Us[Ln+111]="F"+Ln;for(var Ln=65;Ln<=90;Ln++)Us[Ln]=String.fromCharCode(Ln+32),eg[Ln]=String.fromCharCode(Ln);for(var a1 in Us)eg.hasOwnProperty(a1)||(eg[a1]=Us[a1]);function ZF(t){var e=XF&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||qF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?eg:Us)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const QF=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function JF(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l127)&&(i=Us[r.keyCode])&&i!=o){let l=e[l1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}function tB(t){const e=Ka(t,(i,s)=>(s.priority??dt.Low)-(i.priority??dt.Low)),n=[],r=[];for(const i of e)lB(i)?n.push(i):r.push(i);let o;return new gi({key:nB,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,l,a;const u=o.state.selection.$from,c=u.node().type.name,d=new Set(u.marks().map(h=>h.type.name));for(const h of n){if((s=h.ignoredNodes)!=null&&s.includes(c)||(l=h.ignoredMarks)!=null&&l.some(y=>d.has(y)))continue;const f=((a=i.content.firstChild)==null?void 0:a.textContent)??"",p=!o.state.selection.empty&&i.content.childCount===1&&f,g=su(f,h.regexp)[0];if(p&&g&&h.type==="mark"&&h.replaceSelection){const{from:y,to:b}=o.state.selection,w=o.state.doc.slice(y,b),k=w.content.textBetween(0,w.content.size);if(typeof h.replaceSelection!="boolean"?h.replaceSelection(k):h.replaceSelection){const x=[],{getAttributes:S,markType:T}=h,C=tt(S)?S(g,!0):S,O=T.create(C);return w.content.forEach(_=>{if(_.isText){const R=O.addToSet(_.marks);x.push(_.mark(R))}}),ae.maxOpen(Q.fromArray(x))}}const{nodes:m,transformed:v}=sB(i.content,h,o.state.schema);v&&(i=h.type==="node"&&h.nodeType.isBlock?new ae(Q.fromArray(m),0,0):new ae(Q.fromArray(m),i.openStart,i.openEnd))}return hB(i)},handleDOMEvents:{paste:(i,s)=>{var l,a;const u=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{clipboardData:c}=u;if(!c)return!1;const d=[...c.items].map(f=>f.getAsFile()).filter(f=>!!f);if(d.length===0)return!1;const{selection:h}=i.state;for(const{fileHandler:f,regexp:p}of r){const g=p?d.filter(m=>p.test(m.type)):d;if(g.length!==0&&f({event:u,files:g,selection:h,view:i,type:"paste"}))return u.preventDefault(),!0}return!1},drop:(i,s)=>{var l,a,u;const c=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{dataTransfer:d,clientX:h,clientY:f}=c;if(!d)return!1;const p=dB(c);if(p.length===0)return!1;const g=((u=i.posAtCoords({left:h,top:f}))==null?void 0:u.pos)??i.state.selection.anchor;for(const{fileHandler:m,regexp:v}of r){const y=v?p.filter(b=>v.test(b.type)):p;if(y.length!==0&&m({event:c,files:y,pos:g,view:i,type:"drop"}))return c.preventDefault(),!0}return!1}}}})}var nB=new gl("pasteRule");function c1(t,e){return function n(r){const{fragment:o,rule:i,nodes:s}=r,{regexp:l,ignoreWhitespace:a,ignoredMarks:u,ignoredNodes:c}=i;let d=!1;return o.forEach(h=>{if(c!=null&&c.includes(h.type.name)||cB(h)){s.push(h);return}if(!h.isText){const g=n({fragment:h.content,rule:i,nodes:[]});d||(d=g.transformed);const m=Q.fromArray(g.nodes);h.type.validContent(m)?s.push(h.copy(m)):s.push(...g.nodes);return}if(h.marks.some(g=>uB(g)||(u==null?void 0:u.includes(g.type.name)))){s.push(h);return}const f=h.text??"";let p=0;for(const g of su(f,l)){const m=g[1],v=g[0];if(a&&(m==null?void 0:m.trim())===""||!v)return;const y=g.index,b=y+v.length;y>p&&s.push(h.cut(p,y));let w=h.cut(y,b);if(v&&m){const k=v.search(/\S/),x=y+v.indexOf(m),S=x+m.length;k&&s.push(h.cut(y,y+k)),w=h.cut(x,S)}t({nodes:s,rule:i,textNode:w,match:g,schema:e}),d=!0,p=b}f&&p0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function hB(t){const e=ae.maxOpen(t.content);return e.openStart({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var fB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,me=(t,e,n,r)=>{for(var o=r>1?void 0:r?pB(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fB(e,n,o),o},nM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},le=(t,e,n)=>(nM(t,e,"read from private field"),n?n.call(t):e.get(t)),Qt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},mn=(t,e,n,r)=>(nM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function gB(t,e){return t===e}function mC(t){const{previousOptions:e,update:n,equals:r=gB}=t,o=Oa({...e,...n}),i=be(),s=Bd(e);for(const a of s){const u=e[a],c=o[a];if(r(u,c)){i[a]={changed:!1};continue}i[a]={changed:!0,previousValue:u,value:c}}const l=a=>{const u=be();for(const c of a){const d=i[c];d!=null&&d.changed&&(u[c]=d.value)}return u};return{changes:Oa(i),options:o,pickChanged:l}}var mB={[re.DUPLICATE_HELPER_NAMES]:"helper method",[re.DUPLICATE_COMMAND_NAMES]:"command method"};function rM(t){const{name:e,set:n,code:r}=t,o=mB[r];we(!n.has(e),{code:r,message:`There is a naming conflict for the name: ${e} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(e)}function Pc(...t){return Mc(MF(...t).split(" ")).join(" ")}var vC="__IGNORE__",vB="__ALL__",uu=class{constructor(t,...[e]){this["~O"]={},this._mappedHandlers=be(),this.populateMappedHandlers(),this._options=this._initialOptions=dR(t,this.constructor.defaultOptions,e??be(),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 t=[],{customHandlerKeys:e,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Bd(this._options))r.includes(o)||n.includes(o)||e.includes(o)||t.push(o);return t}ensureAllKeysAreDynamic(t){}setOptions(t){var e;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(t);const{changes:r,options:o,pickChanged:i}=mC({previousOptions:n,update:t});this.updateDynamicOptions(o),(e=this.onSetOptions)==null||e.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var t;const e=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=mC({previousOptions:e,update:this._initialOptions});this.updateDynamicOptions(r),(t=this.onSetOptions)==null||t.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return ub(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(t){this._options={...this._options,...t}}populateMappedHandlers(){for(const t of this.constructor.handlerKeys)this._mappedHandlers[t]=[]}createDefaultHandlerOptions(){const t=be();for(const e of this.constructor.handlerKeys)t[e]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[e])==null?void 0:r.reducer;let s=i==null?void 0:i.getDefault(...n);for(const[,l]of this._mappedHandlers[e]){const a=l(...n);if(s=i?i.accumulator(s,a,...n):a,yB(o,s,e))return s}return s};return t}addHandler(t,e,n=dt.Default){return this._mappedHandlers[t].push([n,e]),this.sortHandlers(t),()=>this._mappedHandlers[t]=this._mappedHandlers[t].filter(([,r])=>r!==e)}hasHandlers(t){return(this._mappedHandlers[t]??[]).length>0}sortHandlers(t){this._mappedHandlers[t]=Ka(this._mappedHandlers[t],([e],[n])=>n-e)}addCustomHandler(t,e){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[t]:e}))??uR}};uu.defaultOptions={};uu.staticKeys=[];uu.handlerKeys=[];uu.handlerKeyOptions={};uu.customHandlerKeys=[];function yB(t,e,n){const{[vB]:r}=t,o=t[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==vC&&(tt(o.earlyReturnValue)?o.earlyReturnValue(e)===!0:e===o.earlyReturnValue)||r&&r.earlyReturnValue!==vC&&(tt(r.earlyReturnValue)?r.earlyReturnValue(e)===!0:e===r.earlyReturnValue))}var ym=class extends uu{constructor(...t){super(bB,...t),this["~E"]={},this._extensions=hb(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(const e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${nR(this.name)}Extension`}get store(){return we(this._store,{code:re.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."}),Oa(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(t,e){this.extensionMap.has(t)&&(this.extensionMap.set(t,e),this._extensions=this.extensions.map(n=>e.constructor===t?e:n))}createExtensions(){return[]}getExtension(t){const e=this.extensionMap.get(t);return we(e,{code:re.INVALID_GET_EXTENSION,message:`'${t.name}' does not exist within the preset: '${this.name}'`}),e}isOfType(t){return this.constructor===t}setStore(t){this._store||(this._store=t)}clone(...t){return new this.constructor(...t)}setPriority(t){this.priorityOverride=t}};ym.defaultPriority=dt.Default;var yt=class extends ym{static get[Bi](){return bn.PlainExtensionConstructor}get[Bi](){return bn.PlainExtension}},ea=class extends ym{static get[Bi](){return bn.MarkExtensionConstructor}get[Bi](){return bn.MarkExtension}get type(){return Ot(this.store.schema.marks,this.name)}constructor(...t){super(...t)}};ea.disableExtraAttributes=!1;var Pn=class extends ym{static get[Bi](){return bn.NodeExtensionConstructor}get[Bi](){return bn.NodeExtension}get type(){return Ot(this.store.schema.nodes,this.name)}constructor(...t){super(...t)}};Pn.disableExtraAttributes=!1;var bB={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function oM(t){return lu(t)&&cu(t,[bn.PlainExtension,bn.MarkExtension,bn.NodeExtension])}function wB(t){return lu(t)&&cu(t,[bn.PlainExtensionConstructor,bn.MarkExtensionConstructor,bn.NodeExtensionConstructor])}function iM(t){return lu(t)&&cu(t,bn.PlainExtension)}function Vh(t){return lu(t)&&cu(t,bn.NodeExtension)}function bm(t){return lu(t)&&cu(t,bn.MarkExtension)}function Pe(t){return e=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:l,...a}=t,u=e;n&&(u.defaultOptions=n),s&&(u.defaultPriority=s),l&&(u.handlerKeyOptions=l),u.staticKeys=i??[],u.handlerKeys=o??[],u.customHandlerKeys=r??[];for(const[c,d]of Object.entries(a))u[c]||(u[c]=d);return u}}var xB=class extends yt{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=be(),this.updateAttributes=(t=!0)=>{this.transformAttributes(),t&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var t,e,n;if(this.attributeObject=be(),(t=this.store.managerSettings.exclude)!=null&&t.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((e=r.options.exclude)!=null&&e.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:Pc(...r.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:Pc(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function bt(t={}){return(e,n,r)=>{(e.decoratedHelpers??(e.decoratedHelpers={}))[n]=t}}function de(t={}){return(e,n,r)=>{(e.decoratedCommands??(e.decoratedCommands={}))[n]=t}}function nn(t){return(e,n,r)=>{(e.decoratedKeybindings??(e.decoratedKeybindings={}))[n]=t}}var kB=class{constructor(t){this.promiseCreator=t,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let n=!0;const{view:r,tr:o,dispatch:i}=e;if(!r)return!1;for(const l of this.validateHandlers)if(!l({...e,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(e).then(l=>{this.runHandlers(this.successHandlers,{value:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(l=>{this.runHandlers(this.failureHandlers,{error:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(t,e="push"){return this.validateHandlers[e](t),this}success(t,e="push"){return this.successHandlers[e](t),this}failure(t,e="push"){return this.failureHandlers[e](t),this}runHandlers(t,e){var n;for(const r of t)if(!r({...e,dispatch:()=>{}}))break;(n=e.dispatch)==null||n.call(e,e.tr)}};function Ws(t){const{type:e,attrs:n,range:r,selection:o}=t;return i=>{const{dispatch:s,tr:l,state:a}=i,u=ke(e)?a.schema.marks[e]:e;if(we(u,{code:re.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),r||o){const{from:c,to:d}=po(o??r??l.selection,l.doc);return Jp({trState:l,type:e,...r})?s==null||s(l.removeMark(c,d,u)):s==null||s(l.addMark(c,d,u.create(n))),!0}return Sd(KF(u,n))(i)}}function EB(t,e,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?e.type.allowsMarkType(t):!1;if(e.nodesBetween(r.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(t)}),i)return!0}return!1}function SB(t,e,n){return({tr:r,dispatch:o,state:i})=>{const s=po(n??r.selection,r.doc),l=iF(s),a=ke(t)?i.schema.marks[t]:t;if(we(a,{code:re.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),s.empty&&!l||!EB(a,r.doc,s.ranges))return!1;if(!o)return!0;if(l)return r.removeStoredMark(a),e&&r.addStoredMark(a.create(e)),o(r),!0;let u=!1;for(const{$from:c,$to:d}of s.ranges){if(u)break;u=r.doc.rangeHasMark(c.pos,d.pos,a)}for(const{$from:c,$to:d}of s.ranges)u&&r.removeMark(c.pos,d.pos,a),e&&r.addMark(c.pos,d.pos,a.create(e));return o(r),!0}}function CB(t,e={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,s=n.selection,{from:l=s.from,to:a=l??s.to,marks:u={}}=e;if(!r)return!0;n.insertText(t,l,a);const c=Ot(n.steps,n.steps.length-1).getMap().map(a);for(const[d,h]of cn(u))n.addMark(l,c,Ot(i.marks,d).create(h));return r(n),!0}}var We=class extends yt{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(t,...e)=>{const{forcedUpdates:n}=this.getCommandMeta(t);return this.setCommandMeta(t,{forcedUpdates:Mc([...n,...e])}),t}}get name(){return"commands"}get transaction(){const t=this.store.getState();this._transaction||(this._transaction=t.tr);const e=this._transaction.before.eq(t.doc),n=!Bs(this._transaction.steps);if(!e){const r=t.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(t){var e;const{extensions:n,helpers:r}=this.store,o=be(),i=new Set;let s=be();const l=u=>{var c;const d=be(),h=()=>u??this.transaction;let f=[];const p=()=>f;for(const[m,v]of Object.entries(o))(c=s[m])!=null&&c.disableChaining||(d[m]=this.chainedFactory({chain:d,command:v.original,getTr:h,getChain:p}));const g=m=>{we(m===h(),{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=(m={})=>{const v=f;f=[];for(const y of v)if(!y(g)&&m.exitEarly)return;t.dispatch(h())},d.tr=()=>{const m=f;f=[];for(const v of m)v(g);return h()},d.enabled=()=>{for(const m of f)if(!m())return!1;return!0},d.new=m=>l(m),d};for(const u of n){const c=((e=u.createCommands)==null?void 0:e.call(u))??{},d=u.decoratedCommands??{},h={};s={...s,decoratedCommands:d};for(const[f,p]of Object.entries(d)){const g=ke(p.shortcut)&&p.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(p.shortcut,u.options)}:void 0;this.updateDecorated(f,{...p,name:u.name,...g}),c[f]=u[f].bind(u),p.active&&(h[f]=()=>{var m;return((m=p.active)==null?void 0:m.call(p,u.options,this.store))??!1})}Pp(c)||this.addCommands({active:h,names:i,commands:o,extensionCommands:c})}const a=l();for(const[u,c]of Object.entries(a))l[u]=c;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",l),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",l)}onStateUpdate({state:t}){this._transaction=t.tr}createPlugin(){return{}}customDispatch(t){return t}insertText(t,e={}){return ke(t)?CB(t,e):this.store.createPlaceholderCommand({promise:t,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...e,...r})(o)}).generateCommand()}selectText(t,e={}){return({tr:n,dispatch:r})=>{const o=po(t,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!e.forceUpdate?!1:(r==null||r(n.setSelection(o)),!0)}}selectMark(t){return e=>{const{tr:n}=e,r=Hi(n.selection.$from,t);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(e):!1}}delete(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=t??e.selection;return n==null||n(e.delete(r,o)),!0}}emptyUpdate(t){return({tr:e,dispatch:n})=>(n&&(t==null||t(),n(e)),!0)}forceUpdate(...t){return({tr:e,dispatch:n})=>(n==null||n(this.forceUpdateTransaction(e,...t)),!0)}updateNodeAttributes(t,e){return({tr:n,dispatch:r})=>(r==null||r(n.setNodeMarkup(t,void 0,e)),!0)}setContent(t,e){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:t,selection:e});return i?(o==null||o(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return t=>{const{tr:e,dispatch:n}=t,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(t):(n==null||n(e.delete(0,e.doc.nodeSize)),!0)}}emptySelection(){return({tr:t,dispatch:e})=>t.selection.empty?!1:(e==null||e(t.setSelection(Ie.near(t.selection.$anchor))),!0)}insertNewLine(){return({dispatch:t,tr:e})=>Js(e.selection)?(t==null||t(e.insertText(` -`)),!0):!1}insertNode(t,e={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:s,range:l,selection:a,replaceEmptyParentBlock:u=!1}=e,{from:c,to:d,$from:h}=po(a??l??r.selection,r.doc);if(Uh(t)||Xz(t)){const v=h.before(h.depth);return n==null||n(u&&c===d&&fm(h.parent)?r.replaceWith(v,v+h.parent.nodeSize,t):r.replaceWith(c,d,t)),!0}const f=ke(t)?o.schema.nodes[t]:t;we(f,{code:re.SCHEMA,message:`The requested node type ${t} does not exist in the schema.`});const p=(i=e.marks)==null?void 0:i.map(v=>{if(v instanceof Ke)return v;const y=ke(v)?o.schema.marks[v]:v;return we(y,{code:re.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),y.create()}),g=f.createAndFill(s,ke(e.content)?o.schema.text(e.content):e.content,p);if(!g)return!1;const m=c!==d;return n==null||n(m?r.replaceRangeWith(c,d,g):r.insert(c,g)),!0}}focus(t){return e=>{const{dispatch:n,tr:r}=e,{view:o}=this.store;if(t===!1||o.hasFocus()&&(t===void 0||t===!0))return!1;if(t===void 0||t===!0){const{from:i=0,to:s=i}=r.selection;t={from:i,to:s}}return n&&this.delayedFocus(),this.selectText(t)(e)}}blur(t){return e=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),t?this.selectText(t)(e):!0):!1}}setBlockNodeType(t,e,n,r=!0){return Gd(t,e,n,r)}toggleWrappingNode(t,e,n){return W2(t,e,n)}toggleBlockNodeItem(t){return $b(t)}wrapInNode(t,e,n){return U2(t,e,n)}applyMark(t,e,n){return SB(t,e,n)}toggleMark(t){return Ws(t)}removeMark(t){return j2(t)}setMeta(t,e){return({tr:n})=>(n.setMeta(t,e),!0)}selectAll(){return this.selectText("all")}copy(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var t;return(t=navigator.clipboard)!=null&&t.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(t,e,n)=>this.insertNode(O0({content:t,schema:n.state.schema}),{selection:e})(n)}).generateCommand()}cut(){return t=>t.tr.selection.empty?!1:(t.dispatch&&document.execCommand("cut"),!0)}replaceText(t){return kF(t)}getAllCommandOptions(){const t={};for(const[e,n]of this.decorated)Pp(n)||(t[e]=n);return t}getCommandOptions(t){return this.decorated.get(t)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(t,e){if(!e){this.decorated.delete(t);return}const n=this.decorated.get(t)??{name:""};this.decorated.set(t,{...n,...e})}handleIosFocus(){Br.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(t){return this.getCommandMeta(t).forcedUpdates}getCommandMeta(t){const e=t.getMeta(this.pluginKey)??{};return{...TB,...e}}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addCommands(t){const{extensionCommands:e,commands:n,names:r,active:o}=t;for(const[i,s]of cn(e))rM({name:i,set:r,code:re.DUPLICATE_COMMAND_NAMES}),we(!AB.has(i),{code:re.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(t){return(...e)=>{const{shouldDispatch:n=!0,command:r}=t,{view:o}=this.store,{state:i}=o;let s;return n&&(s=o.dispatch),r(...e)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(t,e){const n=this.unchainedFactory({command:t});return n.enabled=this.unchainedFactory({command:t,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=t,n.active=e,n}chainedFactory(t){return(...e)=>{const{chain:n,command:r,getTr:o,getChain:i}=t,s=i(),{view:l}=this.store,{state:a}=l;return s.push(u=>r(...e)({state:a,dispatch:u,view:l,tr:o()})),n}}};me([de()],We.prototype,"customDispatch",1);me([de()],We.prototype,"insertText",1);me([de()],We.prototype,"selectText",1);me([de()],We.prototype,"selectMark",1);me([de()],We.prototype,"delete",1);me([de()],We.prototype,"emptyUpdate",1);me([de()],We.prototype,"forceUpdate",1);me([de()],We.prototype,"updateNodeAttributes",1);me([de()],We.prototype,"setContent",1);me([de()],We.prototype,"resetContent",1);me([de()],We.prototype,"emptySelection",1);me([de()],We.prototype,"insertNewLine",1);me([de()],We.prototype,"insertNode",1);me([de()],We.prototype,"focus",1);me([de()],We.prototype,"blur",1);me([de()],We.prototype,"setBlockNodeType",1);me([de()],We.prototype,"toggleWrappingNode",1);me([de()],We.prototype,"toggleBlockNodeItem",1);me([de()],We.prototype,"wrapInNode",1);me([de()],We.prototype,"applyMark",1);me([de()],We.prototype,"toggleMark",1);me([de()],We.prototype,"removeMark",1);me([de()],We.prototype,"setMeta",1);me([de({description:({t})=>t(Hs.SELECT_ALL_DESCRIPTION),label:({t})=>t(Hs.SELECT_ALL_LABEL),shortcut:oe.SelectAll})],We.prototype,"selectAll",1);me([de({description:({t})=>t(Hs.COPY_DESCRIPTION),label:({t})=>t(Hs.COPY_LABEL),shortcut:oe.Copy,icon:"fileCopyLine"})],We.prototype,"copy",1);me([de({description:({t})=>t(Hs.PASTE_DESCRIPTION),label:({t})=>t(Hs.PASTE_LABEL),shortcut:oe.Paste,icon:"clipboardLine"})],We.prototype,"paste",1);me([de({description:({t})=>t(Hs.CUT_DESCRIPTION),label:({t})=>t(Hs.CUT_LABEL),shortcut:oe.Cut,icon:"scissorsFill"})],We.prototype,"cut",1);me([de()],We.prototype,"replaceText",1);me([bt()],We.prototype,"getAllCommandOptions",1);me([bt()],We.prototype,"getCommandOptions",1);me([bt()],We.prototype,"getCommandProp",1);We=me([Pe({defaultPriority:dt.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],We);var TB={forcedUpdates:[]},AB=new Set(["run","chain","original","raw","enabled","tr","new"]),Uo=class extends yt{constructor(){super(...arguments),this.placeholders=je.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=t=>{const e=Rc(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=t;return new kB(n).validate(s=>this.addPlaceholder(e,r)(s)).success(s=>{const{state:l,tr:a,dispatch:u,view:c,value:d}=s,h=this.store.helpers.findPlaceholder(e);if(!h){const f=new Error("The placeholder has been removed");return(o==null?void 0:o({error:f,state:l,tr:a,dispatch:u,view:c}))??!1}return this.removePlaceholder(e)({state:l,tr:a,view:c,dispatch:()=>{}}),i(d,h,{state:l,tr:a,dispatch:u,view:c})}).failure(s=>(this.removePlaceholder(e)({...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:t=>{var e,n,r,o,i,s;const{added:l,clearTrackers:a,removed:u,updated:c}=this.getMeta(t);if(a){this.placeholders=je.empty;for(const[,d]of this.placeholderWidgets)(n=(e=d.spec).onDestroy)==null||n.call(e,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(t.mapping,t.doc,{onRemove:d=>{var h,f;const p=this.placeholderWidgets.get(d.id);p&&((f=(h=p.spec).onDestroy)==null||f.call(h,this.store.view,p.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(r=d.spec).onUpdate)==null||o.call(r,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of l){if(d.type==="inline"){this.addInlinePlaceholder(d,t);continue}if(d.type==="node"){this.addNodePlaceholder(d,t);continue}if(d.type==="widget"){this.addWidgetPlaceholder(d,t);continue}}for(const{id:d,data:h}of c){const f=this.placeholderWidgets.get(d);if(!f)continue;const p=kt.widget(f.from,f.spec.element,{...f.spec,data:h});this.placeholders=this.placeholders.remove([f]).add(t.doc,[p]),this.placeholderWidgets.set(d,p)}for(const d of u){const h=this.placeholders.find(void 0,void 0,p=>p.id===d&&p.__type===Nl),f=this.placeholderWidgets.get(d);f&&((s=(i=f.spec).onDestroy)==null||s.call(i,this.store.view,f.spec.element)),this.placeholders=this.placeholders.remove(h),this.placeholderWidgets.delete(d)}}},props:{decorations:t=>{let e=this.options.decorations(t);e=e.add(t.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(t).find();e=e.add(t.doc,r)}return e},handleDOMEvents:{blur:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(yC,!1)),!1),focus:t=>(this.options.persistentSelectionClass&&t.dispatch(t.state.tr.setMeta(yC,!0)),!1)}}}}updateDecorations(){return({tr:t,dispatch:e})=>(e==null||e(t),!0)}addPlaceholder(t,e,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(t,e,o,!r)?(r==null||r(n?o.deleteSelection():o),!0):!1}updatePlaceholder(t,e){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:t,data:e,tr:r,checkOnly:!n})?(n==null||n(r),!0):!1}removePlaceholder(t){return({dispatch:e,tr:n})=>this.removePlaceholderTransaction({id:t,tr:n,checkOnly:!e})?(e==null||e(n),!0):!1}clearPlaceholders(){return({tr:t,dispatch:e})=>this.clearPlaceholdersTransaction({tr:t,checkOnly:!e})?(e==null||e(t),!0):!1}findPlaceholder(t){return this.findAllPlaceholders().get(t)}findAllPlaceholders(){const t=new Map,e=this.placeholders.find(void 0,void 0,n=>n.__type===Nl);for(const n of e)t.set(n.spec.id,{from:n.from,to:n.to});return t}createDecorations(t){var e,n,r;const{persistentSelectionClass:o}=this.options;return!o||(e=this.store.view)!=null&&e.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?je.empty:RB(t,je.empty,{class:ke(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(t,e){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:s,nodeName:l,id:a,type:u}=t,c=(r==null?void 0:r(this.store.view,n))??document.createElement(l);c.classList.add(s);const d=kt.widget(n,c,{id:a,__type:Nl,type:u,element:c,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(a,d),this.placeholders=this.placeholders.add(e.doc,[d])}addInlinePlaceholder(t,e){const{from:n=e.selection.from,to:r=e.selection.to,className:o,nodeName:i,id:s,type:l}=t;let a;if(n===r){const u=document.createElement(i);u.classList.add(o),a=kt.widget(n,u,{id:s,type:l,__type:Nl,widget:u})}else a=kt.inline(n,r,{nodeName:i,class:o},{id:s,__type:Nl});this.placeholders=this.placeholders.add(e.doc,[a])}addNodePlaceholder(t,e){const{pos:n,className:r,nodeName:o,id:i}=t,s=Yr(n)?e.doc.resolve(n):e.selection.$from,l=Yr(n)?s.nodeAfter?{pos:n,end:s.nodeAfter.nodeSize}:void 0:Fz(s);if(!l)return;const a=kt.node(l.pos,l.end,{nodeName:o,class:r},{id:i,__type:Nl});this.placeholders=this.placeholders.add(e.doc,[a])}withRequiredBase(t,e){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...s}=e,l=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:l,...s,id:t}}getMeta(t){const e=t.getMeta(this.pluginKey)??{};return{..._B,...e}}setMeta(t,e){const n=this.getMeta(t);t.setMeta(this.pluginKey,{...n,...e})}addPlaceholderTransaction(t,e,n,r=!1){if(this.findPlaceholder(t))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(t,e)]}),!0}updatePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1,data:o}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{updated:s}=this.getMeta(n);return this.setMeta(n,{updated:Mc([...s,{id:e,data:o}])}),!0}removePlaceholderTransaction(t){const{id:e,tr:n,checkOnly:r=!1}=t;if(!this.findPlaceholder(e))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:Mc([...i,e])}),!0}clearPlaceholdersTransaction(t){const{tr:e,checkOnly:n=!1}=t;return this.getPluginState()===je.empty?!1:(n||this.setMeta(e,{clearTrackers:!0}),!0)}};me([de()],Uo.prototype,"updateDecorations",1);me([de()],Uo.prototype,"addPlaceholder",1);me([de()],Uo.prototype,"updatePlaceholder",1);me([de()],Uo.prototype,"removePlaceholder",1);me([de()],Uo.prototype,"clearPlaceholders",1);me([bt()],Uo.prototype,"findPlaceholder",1);me([bt()],Uo.prototype,"findAllPlaceholders",1);Uo=me([Pe({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(t,e,n)=>t.add(n.doc,e.find()),getDefault:()=>je.empty}}},defaultPriority:dt.Low})],Uo);var _B={added:[],updated:[],clearTrackers:!1,removed:[]},Nl="placeholderDecoration",yC="persistentSelectionFocus";function RB(t,e,n){const{selection:r,doc:o}=t;if(r.empty)return e;const{from:i,to:s}=r,l=Wh(r)?kt.node(i,s,n):kt.inline(i,s,n);return e.add(o,[l])}var L0=class extends yt{get name(){return"docChanged"}onStateUpdate(t){const{firstUpdate:e,transactions:n,tr:r}=t;e||(n??[r]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(t)}};L0=me([Pe({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:dt.Lowest})],L0);var go=class extends yt{get name(){return"helpers"}onCreate(){var t;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",O0);const e=be(),n=be(),r=be(),o=new Set;for(const i of this.store.extensions){Vh(i)&&(n[i.name]=l=>I2({state:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{var a;return(a=jd({state:this.store.getState(),type:i.type,attrs:l}))==null?void 0:a.node.attrs}),bm(i)&&(n[i.name]=l=>Jp({trState:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{const a=Hi(this.store.getState().selection.$from,i.type);if(!a||!l)return a==null?void 0:a.mark.attrs;if(Ib(a.mark,l))return a.mark.attrs});const s=((t=i.createHelpers)==null?void 0:t.call(i))??{};for(const l of Object.keys(i.decoratedHelpers??{}))s[l]=i[l].bind(i);if(!Pp(s))for(const[l,a]of cn(s))rM({name:l,set:o,code:re.DUPLICATE_HELPER_NAMES}),e[l]=a}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",e),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",e)}isSelectionEmpty(t=this.store.getState()){return Ob(t)}isViewEditable(t=this.store.getState()){var e,n;return((n=(e=this.store.view.props).editable)==null?void 0:n.call(e,t))??!1}getStateJSON(t=this.store.getState()){return t.toJSON()}getJSON(t=this.store.getState()){return t.doc.toJSON()}getRemirrorJSON(t=this.store.getState()){return this.getJSON(t)}insertHtml(t,e){return n=>{const{state:r}=n,o=O0({content:t,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,e)(n)}}getText({lineBreakDivider:t=` +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 Y2(e){var t;return(e==null?void 0:e.defaultView)??(typeof window<"u"?window:void 0)??((t=ZR())==null?void 0:t.defaultView)}function yF(e){return Y2(e==null?void 0:e.ownerDocument)}function bF(e){const t=Y2(e)??ym().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function wF(e,t=ym()){const n=gF(e,e.type.schema)?e.content:Q.from(e);return jr.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function xF(e,t){return new(bF(t)).DOMParser().parseFromString(`${e}`,"text/html").body}function kF(e,t=ym()){const n=t.createElement("div");return n.append(wF(e,t)),n.innerHTML}function $0(e){const{content:t,schema:n,document:r,fragment:o=!1,...i}=e,s=xF(t,r),l=bb.fromSchema(n);return o?l.parseSlice(s,{...vC,...i}).content:l.parse(s,{...vC,...i})}var vC={preserveWhitespace:!1};function bm(e,t){const n=Wd(t.defaults());return pb({...e},n)}function EF(e,t){let n="";t&&(n=`${t.trim()}`);const r=RP(e);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var SF={remove(e,t){let n=e;for(const r of t)r.invalidParentNode||(n=ED(r.path,n));return n}};function CF({json:e,schema:t,...n}){const r=new Set(Wd(t.marks)),o=new Set(Wd(t.nodes)),i=X2({json:e,path:[],validNodes:o,validMarks:r});return{json:e,invalidContent:i,transformers:SF,...n}}function X2(e){const{json:t,validMarks:n,validNodes:r,path:o=[]}=e,i={validMarks:n,validNodes:r},s=[],{type:l,marks:a,content:u}=t;let{invalidParentMark:c=!1,invalidParentNode:d=!1}=e;if(a){const h=[];for(const[f,p]of a.entries()){const g=ke(p)?p:p.type;n.has(g)||(h.unshift({name:g,path:[...o,"marks",`${f}`],type:"mark",invalidParentMark:c,invalidParentNode:d}),c=!0)}s.push(...h)}if(r.has(l)||(s.push({name:l,type:"node",path:o,invalidParentMark:c,invalidParentNode:d}),d=!0),u){const h=[];for(const[f,p]of u.entries())h.unshift(...X2({...i,json:p,path:[...o,"content",`${f}`],invalidParentMark:c,invalidParentNode:d}));s.unshift(...h)}return s}function TF(e){return!!(ra(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function D0(e){return!!(ra(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function yC(e){const t=Ue.atStart(e.$anchor.doc);return!!(D0(e)&&t.anchor===e.anchor)}function AF(e){return({dispatch:t,tr:n})=>{const{type:r,attrs:o=be(),appendText:i,range:s}=e,l=s?Ie.between(n.doc.resolve(s.from),n.doc.resolve(s.to)):n.selection,{$from:a,from:u,to:c}=l;let d=a.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(u,c,h=>{if(d)return!1;if(h.inlineContent&&h.type.allowsMarkType(r)){d=!0;return}}),d?(t==null||t(n.addMark(u,c,r.create(o))&&i?n.insertText(i):n),!0):!1}}function _F({tr:e,dispatch:t}){const{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&uu(o);return!Zr(i)||!o?!1:(t==null||t(e.lift(o,i).scrollIntoView()),!0)}function q2(e,t={},n){return function(r){const{tr:o,dispatch:i,state:s}=r,l=ke(e)?It(s.schema.nodes,e):e,{from:a,to:u}=Mr(n??o.selection,o.doc),c=o.doc.resolve(a),d=o.doc.resolve(u),h=c.blockRange(d),f=h&&xb(h,l,t);return!f||!h?!1:(i==null||i(o.wrap(h,f).scrollIntoView()),!0)}}function Z2(e,t={},n){return r=>{const{tr:o,state:i}=r,s=ke(e)?It(i.schema.nodes,e):e;return Xd({state:o,type:s,attrs:t})?_F(r):q2(e,t,n)(r)}}function qd(e,t,n,r=!0){return function(o){const{tr:i,dispatch:s,state:l}=o,a=ke(e)?It(l.schema.nodes,e):e,{from:u,to:c}=Mr(n??i.selection,i.doc);let d=!1,h;return i.doc.nodesBetween(u,c,(f,p)=>{if(d)return!1;if(!f.isTextblock||f.hasMarkup(a,t))return;if(f.type===a){d=!0,h=f.attrs;return}const g=i.doc.resolve(p),m=g.index();d=g.parent.canReplaceWith(m,m+1,a),d&&(h=g.parent.attrs)}),d?(s==null||s(i.setBlockType(u,c,a,{...r?h:{},...t}).scrollIntoView()),!0):!1}}function Bb(e){return t=>{const{tr:n,state:r}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,l=Xd({state:n,type:o,attrs:i}),a=e.toggleType??mm(r.schema);if(l)return qd(a,{...s?l.node.attrs:{},...i})(t);const u=Xd({state:n,type:a,attrs:i});return qd(o,{...s?u==null?void 0:u.node.attrs:{},...i})(t)}}function RF(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(It(t,2),10)>=e:!1}function MF(e,t){let{head:n,empty:r,anchor:o}=e;for(const i of t.steps)n=i.getMap().map(n);r?t.setSelection(Ie.near(t.doc.resolve(n))):t.setSelection(Ie.between(t.doc.resolve(o),t.doc.resolve(n)))}function OF(e){const{attrs:t={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=e;return({state:s,tr:l,dispatch:a})=>{var u;const c=s.schema,d=Mr(e.selection??i??l.selection,l.doc),h=d.$from.index(),{from:f,to:p,$from:g}=d,m=ke(e.type)?c.nodes[e.type]??c.marks[e.type]:e.type;if(we(ke(e.type)?m:!0,{code:re.SCHEMA,message:`Schema contains no marks or nodes with name ${m}`}),tF(m)){if(!g.parent.canReplaceWith(h,h,m))return!1;l.replaceWith(f,p,m.create(t,r?c.text(r):void 0))}else we(r,{message:"`replaceText` cannot be called without content when using a mark type"}),l.replaceWith(f,p,c.text(r,H2(m)?[m.create(t)]:void 0));return n&&l.insertText(n),o&&MF(s.selection,l),a&&(RF(60)&&((u=document.getSelection())==null||u.empty()),a(l)),!0}}function Q2(e,t){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const s=e.start()+n.offset+o;return Q2(e.doc.resolve(s+1))}function J2(e){return({dispatch:t,tr:n,state:r})=>{const{type:o,expand:i=!0,range:s}=e,l=Mr(e.selection??s??n.selection,n.doc);let{from:a,to:u,$from:c,$to:d}=l;const h=ke(o)?r.schema.marks[o]:o;h!==null&&we(h,{code:re.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const f=h??Q2(c);if(!f)return!1;const p=Wi(c,f,d);return i&&p&&(a=Math.max(0,Math.min(a,p.from)),u=Math.min(Math.max(u,p.to),n.doc.nodeSize-2)),t==null||t(n.removeMark(a,Zr(u)?u:a,H2(h)?h:void 0)),!0}}function IF(e){const t=["command","cmd","meta"];return br.isMac&&t.push("mod"),t.includes(e)}function LF(e){const t=["control","ctrl"];return br.isMac||t.push("mod"),t.includes(e)}function NF(e){const t=[];for(let n of e.split("-")){if(n=n.toLowerCase(),IF(n)){t.push({type:"modifier",symbol:"⌘",key:"command",i18n:on.COMMAND_KEY});continue}if(LF(n)){t.push({type:"modifier",symbol:"⌃",key:"control",i18n:on.CONTROL_KEY});continue}switch(n){case"shift":t.push({type:"modifier",symbol:"⇧",key:n,i18n:on.SHIFT_KEY});continue;case"alt":t.push({type:"modifier",symbol:"⌥",key:n,i18n:on.ALT_KEY});continue;case` +`:case"\r":case"enter":t.push({type:"named",symbol:"↵",key:n,i18n:on.ENTER_KEY});continue;case"backspace":t.push({type:"named",symbol:"⌫",key:n,i18n:on.BACKSPACE_KEY});continue;case"delete":t.push({type:"named",symbol:"⌦",key:n,i18n:on.DELETE_KEY});continue;case"escape":t.push({type:"named",symbol:"␛",key:n,i18n:on.ESCAPE_KEY});continue;case"tab":t.push({type:"named",symbol:"⇥",key:n,i18n:on.TAB_KEY});continue;case"capslock":t.push({type:"named",symbol:"⇪",key:n,i18n:on.CAPS_LOCK_KEY});continue;case"space":t.push({type:"named",symbol:"␣",key:n,i18n:on.SPACE_KEY});continue;case"pageup":t.push({type:"named",symbol:"⤒",key:n,i18n:on.PAGE_UP_KEY});continue;case"pagedown":t.push({type:"named",symbol:"⤓",key:n,i18n:on.PAGE_DOWN_KEY});continue;case"home":t.push({type:"named",key:n,i18n:on.HOME_KEY});continue;case"end":t.push({type:"named",key:n,i18n:on.END_KEY});continue;case"arrowleft":t.push({type:"named",symbol:"←",key:n,i18n:on.ARROW_LEFT_KEY});continue;case"arrowright":t.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_RIGHT_KEY});continue;case"arrowup":t.push({type:"named",symbol:"→",key:n,i18n:on.ARROW_UP_KEY});continue;case"arrowdown":t.push({type:"named",symbol:"↓",key:n,i18n:on.ARROW_DOWN_KEY});continue;default:t.push({type:"char",key:n});continue}}return t}function $F(e){const{node:t,predicate:n,descend:r=!0,action:o}=e;we(Gh(t),{code:re.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),we(tt(n),{code:re.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((s,l)=>{const a={node:s,pos:l};return n(a)&&(i.push(a),o==null||o(a)),r}),i}function DF(e){const{type:t,...n}=e;return $F({...n,predicate:r=>r.node.type===t})}function PF(e,t={}){const{descend:n=!1,predicate:r,StepTypes:o}=t,i=dF(e,o),s=[];for(const l of i){const{start:a,end:u}=l;e.doc.nodesBetween(a,u,(c,d)=>(((r==null?void 0:r(c,d,l))??!0)&&s.push({node:c,pos:d}),n))}return s}function Zd(e){const{regexp:t,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:s,shouldSkip:l,invalidMarks:a}=e;let u;const c=new bl(t,(d,h,f,p)=>{const{tr:g,schema:m}=d;u||(u=ke(n)?m.marks[n]:n,we(u,{code:re.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let v=h[1],y=h[0];const b=tM({captureGroup:v,fullMatch:y,end:p,start:f,rule:c,state:d,ignoreWhitespace:o,invalidMarks:a,shouldSkip:l,updateCaptured:s});if(!b)return null;({start:f,end:p,captureGroup:v,fullMatch:y}=b);const w=tt(r)?r(h):r;let k=p,x=[];if(v){const S=y.search(/\S/),T=f+y.indexOf(v),C=T+v.length;x=g.storedMarks??[],Cf&&g.delete(f+S,T),k=f+S+v.length}return g.addMark(f,k,u.create(w)),g.setStoredMarks(x),i==null||i({tr:g,match:h,start:f,end:p}),g});return c}function eM(e){const{regexp:t,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:l,invalidMarks:a}=e,u=new bl(t,(c,d,h,f)=>{const p=tt(r)?r(d):r,{tr:g,schema:m}=c,v=ke(n)?m.nodes[n]:n;let y=d[1],b=d[0];const w=tM({captureGroup:y,fullMatch:b,end:f,start:h,rule:u,state:c,ignoreWhitespace:s,invalidMarks:a,shouldSkip:i,updateCaptured:l});if(!w)return null;({start:h,end:f,captureGroup:y,fullMatch:b}=w),we(v,{code:re.SCHEMA,message:`No node exists for ${n} in the schema.`});const k=v.createAndFill(p);return k&&(g.replaceRangeWith(v.isBlock?g.doc.resolve(h).before():h,f,k),o==null||o({tr:g,match:[b,y??""],start:h,end:f})),g});return u}function tM({captureGroup:e,fullMatch:t,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:l,state:a,invalidMarks:u}){var c;if(t==null)return null;const d=(l==null?void 0:l({captureGroup:e,fullMatch:t,start:r,end:n}))??{};e=d.captureGroup??e,t=d.fullMatch??t,r=d.start??r,n=d.end??n;const h=a.doc.resolve(r),f=a.doc.resolve(n);return u&&L0({$from:h,$to:f},u)||o.invalidMarks&&L0({$from:h,$to:f},o.invalidMarks)||i&&(e==null?void 0:e.trim())===""||s!=null&&s({state:a,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})||(c=o.shouldSkip)!=null&&c.call(o,{state:a,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})?null:{captureGroup:e,end:n,fullMatch:t,start:r}}var zF=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");n[a]=l}else r.push(l)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},FF=zF;const nM=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function BF(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const rM=(e,t,n)=>{let r=BF(e,n);if(!r)return!1;let o=oM(r);if(!o){let s=r.blockRange(),l=s&&uu(s);return l==null?!1:(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&aM(e,o,t))return!0;if(r.parent.content.size==0&&(Fc(i,"end")||Le.isSelectable(i))){let s=kb(e.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=oM(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Le.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function oM(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 UF(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=UF(e,n);if(!r)return!1;let o=iM(r);if(!o)return!1;let i=o.nodeAfter;if(aM(e,o,t))return!0;if(r.parent.content.size==0&&(Fc(i,"start")||Le.isSelectable(i))){let s=kb(e.doc,r.before(),r.after(),ae.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function Hb(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Hb(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Ue.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},GF=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof ir||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Hb(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(yc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&uu(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function YF(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof Le&&t.selection.node.isBlock)return!r.parentOffset||!yc(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof Ie||t.selection instanceof ir)&&s.deleteSelection();let l=r.depth==0?null:Hb(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=e&&e(o.parent,i),u=a?[a]:i&&l?[{type:l}]:void 0,c=yc(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&yc(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=l)){let d=s.mapping.map(r.before()),h=s.doc.resolve(d);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const XF=YF(),qF=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(Le.create(e.doc,o))),!0)},ZF=(e,t)=>(t&&t(e.tr.setSelection(new ir(e.doc))),!0);function QF(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||Uh(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function aM(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(QF(e,t,n))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let d=t.pos+o.nodeSize,h=Q.empty;for(let g=i.length-1;g>=0;g--)h=Q.from(i[g].create(null,h));h=Q.from(r.copy(h));let f=e.tr.step(new qt(t.pos-1,d,t.pos,d,new ae(h,1,0),i.length,!0)),p=d+2*i.length;Uh(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let a=Ue.findFrom(t,1),u=a&&a.$from.blockRange(a.$to),c=u&&uu(u);if(c!=null&&c>=t.depth)return n&&n(e.tr.lift(u,c).scrollIntoView()),!0;if(l&&Fc(o,"start",!0)&&Fc(r,"end")){let d=r,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=o,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(n){let g=Q.empty;for(let v=h.length-1;v>=0;v--)g=Q.from(h[v].copy(g));let m=e.tr.step(new qt(t.pos-h.length,t.pos+o.nodeSize,t.pos+p,t.pos+o.nodeSize-p,new ae(g,h.length,0),0,!0));n(m.scrollIntoView())}return!0}}return!1}function lM(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Ie.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const JF=lM(-1),eB=lM(1);function tB(e,t,n){for(let r=0;r{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(n)}),s)return!0}return!1}function nB(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!tB(n.doc,s,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let l=!1,a=n.tr;for(let u=0;!l&&u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oB=typeof navigator<"u"&&/Mac/.test(navigator.platform),iB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ln=0;Ln<10;Ln++)Gs[48+Ln]=Gs[96+Ln]=String(Ln);for(var Ln=1;Ln<=24;Ln++)Gs[Ln+111]="F"+Ln;for(var Ln=65;Ln<=90;Ln++)Gs[Ln]=String.fromCharCode(Ln+32),rg[Ln]=String.fromCharCode(Ln);for(var d1 in Gs)rg.hasOwnProperty(d1)||(rg[d1]=Gs[d1]);function sB(e){var t=oB&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||iB&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?rg:Gs)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const aB=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function lB(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l127)&&(i=Gs[r.keyCode])&&i!=o){let l=t[h1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}function uB(e){const t=Vs(e,(i,s)=>(s.priority??st.Low)-(i.priority??st.Low)),n=[],r=[];for(const i of t)vB(i)?n.push(i):r.push(i);let o;return new yi({key:dB,view:i=>(o=i,{}),props:{transformPasted:i=>{var s,l,a;const u=o.state.selection.$from,c=u.node().type.name,d=new Set(u.marks().map(h=>h.type.name));for(const h of n){if((s=h.ignoredNodes)!=null&&s.includes(c)||(l=h.ignoredMarks)!=null&&l.some(y=>d.has(y)))continue;const f=((a=i.content.firstChild)==null?void 0:a.textContent)??"",p=!o.state.selection.empty&&i.content.childCount===1&&f,g=cu(f,h.regexp)[0];if(p&&g&&h.type==="mark"&&h.replaceSelection){const{from:y,to:b}=o.state.selection,w=o.state.doc.slice(y,b),k=w.content.textBetween(0,w.content.size);if(typeof h.replaceSelection!="boolean"?h.replaceSelection(k):h.replaceSelection){const x=[],{getAttributes:S,markType:T}=h,C=tt(S)?S(g,!0):S,I=T.create(C);return w.content.forEach(_=>{if(_.isText){const R=I.addToSet(_.marks);x.push(_.mark(R))}}),ae.maxOpen(Q.fromArray(x))}}const{nodes:m,transformed:v}=gB(i.content,h,o.state.schema);v&&(i=h.type==="node"&&h.nodeType.isBlock?new ae(Q.fromArray(m),0,0):new ae(Q.fromArray(m),i.openStart,i.openEnd))}return xB(i)},handleDOMEvents:{paste:(i,s)=>{var l,a;const u=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{clipboardData:c}=u;if(!c)return!1;const d=[...c.items].map(f=>f.getAsFile()).filter(f=>!!f);if(d.length===0)return!1;const{selection:h}=i.state;for(const{fileHandler:f,regexp:p}of r){const g=p?d.filter(m=>p.test(m.type)):d;if(g.length!==0&&f({event:u,files:g,selection:h,view:i,type:"paste"}))return u.preventDefault(),!0}return!1},drop:(i,s)=>{var l,a,u;const c=s;if(!((a=(l=i.props).editable)!=null&&a.call(l,i.state)))return!1;const{dataTransfer:d,clientX:h,clientY:f}=c;if(!d)return!1;const p=wB(c);if(p.length===0)return!1;const g=((u=i.posAtCoords({left:h,top:f}))==null?void 0:u.pos)??i.state.selection.anchor;for(const{fileHandler:m,regexp:v}of r){const y=v?p.filter(b=>v.test(b.type)):p;if(y.length!==0&&m({event:c,files:y,pos:g,view:i,type:"drop"}))return c.preventDefault(),!0}return!1}}}})}var dB=new yl("pasteRule");function f1(e,t){return function n(r){const{fragment:o,rule:i,nodes:s}=r,{regexp:l,ignoreWhitespace:a,ignoredMarks:u,ignoredNodes:c}=i;let d=!1;return o.forEach(h=>{if(c!=null&&c.includes(h.type.name)||yB(h)){s.push(h);return}if(!h.isText){const g=n({fragment:h.content,rule:i,nodes:[]});d||(d=g.transformed);const m=Q.fromArray(g.nodes);h.type.validContent(m)?s.push(h.copy(m)):s.push(...g.nodes);return}if(h.marks.some(g=>bB(g)||(u==null?void 0:u.includes(g.type.name)))){s.push(h);return}const f=h.text??"";let p=0;for(const g of cu(f,l)){const m=g[1],v=g[0];if(a&&(m==null?void 0:m.trim())===""||!v)return;const y=g.index,b=y+v.length;y>p&&s.push(h.cut(p,y));let w=h.cut(y,b);if(v&&m){const k=v.search(/\S/),x=y+v.indexOf(m),S=x+m.length;k&&s.push(h.cut(y,y+k)),w=h.cut(x,S)}e({nodes:s,rule:i,textNode:w,match:g,schema:t}),d=!0,p=b}f&&p0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function xB(e){const t=ae.maxOpen(e.content);return t.openStart({events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}});var kB=Object.defineProperty,EB=Object.getOwnPropertyDescriptor,me=(e,t,n,r)=>{for(var o=r>1?void 0:r?EB(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&kB(t,n,o),o},uM=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ce=(e,t,n)=>(uM(e,t,"read from private field"),n?n.call(e):t.get(e)),Qt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},vn=(e,t,n,r)=>(uM(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function SB(e,t){return e===t}function wC(e){const{previousOptions:t,update:n,equals:r=SB}=e,o=$a({...t,...n}),i=be(),s=Wd(t);for(const a of s){const u=t[a],c=o[a];if(r(u,c)){i[a]={changed:!1};continue}i[a]={changed:!0,previousValue:u,value:c}}const l=a=>{const u=be();for(const c of a){const d=i[c];d!=null&&d.changed&&(u[c]=d.value)}return u};return{changes:$a(i),options:o,pickChanged:l}}var CB={[re.DUPLICATE_HELPER_NAMES]:"helper method",[re.DUPLICATE_COMMAND_NAMES]:"command method"};function dM(e){const{name:t,set:n,code:r}=e,o=CB[r];we(!n.has(t),{code:r,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.`}),n.add(t)}function Bc(...e){return Lc(FF(...e).split(" ")).join(" ")}var xC="__IGNORE__",TB="__ALL__",fu=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=be(),this.populateMappedHandlers(),this._options=this._initialOptions=bR(e,this.constructor.defaultOptions,t??be(),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:n,staticKeys:r}=this.constructor;for(const o of Wd(this._options))r.includes(o)||n.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){}setOptions(e){var t;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:r,options:o,pickChanged:i}=wC({previousOptions:n,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=wC({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(r),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return pb(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=be();for(const t of this.constructor.handlerKeys)e[t]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[t])==null?void 0:r.reducer;let s=i==null?void 0:i.getDefault(...n);for(const[,l]of this._mappedHandlers[t]){const a=l(...n);if(s=i?i.accumulator(s,a,...n):a,AB(o,s,t))return s}return s};return e}addHandler(e,t,n=st.Default){return this._mappedHandlers[e].push([n,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,r])=>r!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=Vs(this._mappedHandlers[e],([t],[n])=>n-t)}addCustomHandler(e,t){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[e]:t}))??yR}};fu.defaultOptions={};fu.staticKeys=[];fu.handlerKeys=[];fu.handlerKeyOptions={};fu.customHandlerKeys=[];function AB(e,t,n){const{[TB]:r}=e,o=e[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==xC&&(tt(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||r&&r.earlyReturnValue!==xC&&(tt(r.earlyReturnValue)?r.earlyReturnValue(t)===!0:t===r.earlyReturnValue))}var km=class extends fu{constructor(...e){super(_B,...e),this["~E"]={},this._extensions=vb(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`${dR(this.name)}Extension`}get store(){return we(this._store,{code:re.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."}),$a(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(n=>t.constructor===e?t:n))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return we(t,{code:re.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}};km.defaultPriority=st.Default;var gt=class extends km{static get[Ui](){return wn.PlainExtensionConstructor}get[Ui](){return wn.PlainExtension}},oa=class extends km{static get[Ui](){return wn.MarkExtensionConstructor}get[Ui](){return wn.MarkExtension}get type(){return It(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};oa.disableExtraAttributes=!1;var zn=class extends km{static get[Ui](){return wn.NodeExtensionConstructor}get[Ui](){return wn.NodeExtension}get type(){return It(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};zn.disableExtraAttributes=!1;var _B={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function hM(e){return du(e)&&hu(e,[wn.PlainExtension,wn.MarkExtension,wn.NodeExtension])}function RB(e){return du(e)&&hu(e,[wn.PlainExtensionConstructor,wn.MarkExtensionConstructor,wn.NodeExtensionConstructor])}function fM(e){return du(e)&&hu(e,wn.PlainExtension)}function Yh(e){return du(e)&&hu(e,wn.NodeExtension)}function Em(e){return du(e)&&hu(e,wn.MarkExtension)}function De(e){return t=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:l,...a}=e,u=t;n&&(u.defaultOptions=n),s&&(u.defaultPriority=s),l&&(u.handlerKeyOptions=l),u.staticKeys=i??[],u.handlerKeys=o??[],u.customHandlerKeys=r??[];for(const[c,d]of Object.entries(a))u[c]||(u[c]=d);return u}}var MB=class extends gt{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=be(),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,n;if(this.attributeObject=be(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((t=r.options.exclude)!=null&&t.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:Bc(...r.classNames??[],o==null?void 0:o.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:Bc(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function lt(e={}){return(t,n,r)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[n]=e}}function le(e={}){return(t,n,r)=>{(t.decoratedCommands??(t.decoratedCommands={}))[n]=e}}function nn(e){return(t,n,r)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[n]=e}}var OB=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let n=!0;const{view:r,tr:o,dispatch:i}=t;if(!r)return!1;for(const l of this.validateHandlers)if(!l({...t,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(t).then(l=>{this.runHandlers(this.successHandlers,{value:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(l=>{this.runHandlers(this.failureHandlers,{error:l,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),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 n;for(const r of e)if(!r({...t,dispatch:()=>{}}))break;(n=t.dispatch)==null||n.call(t,t.tr)}};function Ks(e){const{type:t,attrs:n,range:r,selection:o}=e;return i=>{const{dispatch:s,tr:l,state:a}=i,u=ke(t)?a.schema.marks[t]:t;if(we(u,{code:re.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),r||o){const{from:c,to:d}=Mr(o??r??l.selection,l.doc);return ng({trState:l,type:t,...r})?s==null||s(l.removeMark(c,d,u)):s==null||s(l.addMark(c,d,u.create(n))),!0}return Ad(nB(u,n))(i)}}function IB(e,t,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(r.pos,o.pos,s=>{if(i)return!1;i=s.inlineContent&&s.type.allowsMarkType(e)}),i)return!0}return!1}function LB(e,t,n){return({tr:r,dispatch:o,state:i})=>{const s=Mr(n??r.selection,r.doc),l=pF(s),a=ke(e)?i.schema.marks[e]:e;if(we(a,{code:re.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),s.empty&&!l||!IB(a,r.doc,s.ranges))return!1;if(!o)return!0;if(l)return r.removeStoredMark(a),t&&r.addStoredMark(a.create(t)),o(r),!0;let u=!1;for(const{$from:c,$to:d}of s.ranges){if(u)break;u=r.doc.rangeHasMark(c.pos,d.pos,a)}for(const{$from:c,$to:d}of s.ranges)u&&r.removeMark(c.pos,d.pos,a),t&&r.addMark(c.pos,d.pos,a.create(t));return o(r),!0}}function NB(e,t={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,s=n.selection,{from:l=s.from,to:a=l??s.to,marks:u={}}=t;if(!r)return!0;n.insertText(e,l,a);const c=It(n.steps,n.steps.length-1).getMap().map(a);for(const[d,h]of cn(u))n.addMark(l,c,It(i.marks,d).create(h));return r(n),!0}}var Ve=class extends gt{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:n}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:Lc([...n,...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),n=!Ws(this._transaction.steps);if(!t){const r=e.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:n,helpers:r}=this.store,o=be(),i=new Set;let s=be();const l=u=>{var c;const d=be(),h=()=>u??this.transaction;let f=[];const p=()=>f;for(const[m,v]of Object.entries(o))(c=s[m])!=null&&c.disableChaining||(d[m]=this.chainedFactory({chain:d,command:v.original,getTr:h,getChain:p}));const g=m=>{we(m===h(),{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=(m={})=>{const v=f;f=[];for(const y of v)if(!y(g)&&m.exitEarly)return;e.dispatch(h())},d.tr=()=>{const m=f;f=[];for(const v of m)v(g);return h()},d.enabled=()=>{for(const m of f)if(!m())return!1;return!0},d.new=m=>l(m),d};for(const u of n){const c=((t=u.createCommands)==null?void 0:t.call(u))??{},d=u.decoratedCommands??{},h={};s={...s,decoratedCommands:d};for(const[f,p]of Object.entries(d)){const g=ke(p.shortcut)&&p.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(p.shortcut,u.options)}:void 0;this.updateDecorated(f,{...p,name:u.name,...g}),c[f]=u[f].bind(u),p.active&&(h[f]=()=>{var m;return((m=p.active)==null?void 0:m.call(p,u.options,this.store))??!1})}Vd(c)||this.addCommands({active:h,names:i,commands:o,extensionCommands:c})}const a=l();for(const[u,c]of Object.entries(a))l[u]=c;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",l),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",l)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return ke(e)?NB(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...t,...r})(o)}).generateCommand()}selectText(e,t={}){return({tr:n,dispatch:r})=>{const o=Mr(e,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!t.forceUpdate?!1:(r==null||r(n.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:n}=t,r=Wi(n.selection.$from,e);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(t):!1}}delete(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=e??t.selection;return n==null||n(t.delete(r,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:n})=>(n&&(e==null||e(),n(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:n})=>(n==null||n(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:n,dispatch:r})=>(r==null||r(n.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:e,selection:t});return i?(o==null||o(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:n}=e,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(e):(n==null||n(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t==null||t(e.setSelection(Ie.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>ra(t.selection)?(e==null||e(t.insertText(` +`)),!0):!1}insertNode(e,t={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:s,range:l,selection:a,replaceEmptyParentBlock:u=!1}=t,{from:c,to:d,$from:h}=Mr(a??l??r.selection,r.doc);if(Gh(e)||oF(e)){const v=h.before(h.depth);return n==null||n(u&&c===d&&vm(h.parent)?r.replaceWith(v,v+h.parent.nodeSize,e):r.replaceWith(c,d,e)),!0}const f=ke(e)?o.schema.nodes[e]:e;we(f,{code:re.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const p=(i=t.marks)==null?void 0:i.map(v=>{if(v instanceof Ke)return v;const y=ke(v)?o.schema.marks[v]:v;return we(y,{code:re.SCHEMA,message:`The requested mark type ${v} does not exist in the schema.`}),y.create()}),g=f.createAndFill(s,ke(t.content)?o.schema.text(t.content):t.content,p);if(!g)return!1;const m=c!==d;return n==null||n(m?r.replaceRangeWith(c,d,g):r.insert(c,g)),!0}}focus(e){return t=>{const{dispatch:n,tr:r}=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}=r.selection;e={from:i,to:s}}return n&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,n,r=!0){return qd(e,t,n,r)}toggleWrappingNode(e,t,n){return Z2(e,t,n)}toggleBlockNodeItem(e){return Bb(e)}wrapInNode(e,t,n){return q2(e,t,n)}applyMark(e,t,n){return LB(e,t,n)}toggleMark(e){return Ks(e)}removeMark(e){return J2(e)}setMeta(e,t){return({tr:n})=>(n.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,n)=>this.insertNode($0({content:e,schema:n.state.schema}),{selection:t})(n)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return OF(e)}getAllCommandOptions(){const e={};for(const[t,n]of this.decorated)Vd(n)||(e[t]=n);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 n=this.decorated.get(e)??{name:""};this.decorated.set(e,{...n,...t})}handleIosFocus(){br.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{...$B,...t}}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addCommands(e){const{extensionCommands:t,commands:n,names:r,active:o}=e;for(const[i,s]of cn(t))dM({name:i,set:r,code:re.DUPLICATE_COMMAND_NAMES}),we(!DB.has(i),{code:re.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(s,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:n=!0,command:r}=e,{view:o}=this.store,{state:i}=o;let s;return n&&(s=o.dispatch),r(...t)({state:i,dispatch:s,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const n=this.unchainedFactory({command:e});return n.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=e,n.active=t,n}chainedFactory(e){return(...t)=>{const{chain:n,command:r,getTr:o,getChain:i}=e,s=i(),{view:l}=this.store,{state:a}=l;return s.push(u=>r(...t)({state:a,dispatch:u,view:l,tr:o()})),n}}};me([le()],Ve.prototype,"customDispatch",1);me([le()],Ve.prototype,"insertText",1);me([le()],Ve.prototype,"selectText",1);me([le()],Ve.prototype,"selectMark",1);me([le()],Ve.prototype,"delete",1);me([le()],Ve.prototype,"emptyUpdate",1);me([le()],Ve.prototype,"forceUpdate",1);me([le()],Ve.prototype,"updateNodeAttributes",1);me([le()],Ve.prototype,"setContent",1);me([le()],Ve.prototype,"resetContent",1);me([le()],Ve.prototype,"emptySelection",1);me([le()],Ve.prototype,"insertNewLine",1);me([le()],Ve.prototype,"insertNode",1);me([le()],Ve.prototype,"focus",1);me([le()],Ve.prototype,"blur",1);me([le()],Ve.prototype,"setBlockNodeType",1);me([le()],Ve.prototype,"toggleWrappingNode",1);me([le()],Ve.prototype,"toggleBlockNodeItem",1);me([le()],Ve.prototype,"wrapInNode",1);me([le()],Ve.prototype,"applyMark",1);me([le()],Ve.prototype,"toggleMark",1);me([le()],Ve.prototype,"removeMark",1);me([le()],Ve.prototype,"setMeta",1);me([le({description:({t:e})=>e(js.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(js.SELECT_ALL_LABEL),shortcut:oe.SelectAll})],Ve.prototype,"selectAll",1);me([le({description:({t:e})=>e(js.COPY_DESCRIPTION),label:({t:e})=>e(js.COPY_LABEL),shortcut:oe.Copy,icon:"fileCopyLine"})],Ve.prototype,"copy",1);me([le({description:({t:e})=>e(js.PASTE_DESCRIPTION),label:({t:e})=>e(js.PASTE_LABEL),shortcut:oe.Paste,icon:"clipboardLine"})],Ve.prototype,"paste",1);me([le({description:({t:e})=>e(js.CUT_DESCRIPTION),label:({t:e})=>e(js.CUT_LABEL),shortcut:oe.Cut,icon:"scissorsFill"})],Ve.prototype,"cut",1);me([le()],Ve.prototype,"replaceText",1);me([lt()],Ve.prototype,"getAllCommandOptions",1);me([lt()],Ve.prototype,"getCommandOptions",1);me([lt()],Ve.prototype,"getCommandProp",1);Ve=me([De({defaultPriority:st.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],Ve);var $B={forcedUpdates:[]},DB=new Set(["run","chain","original","raw","enabled","tr","new"]),Vo=class extends gt{constructor(){super(...arguments),this.placeholders=We.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=Ic(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=e;return new OB(n).validate(s=>this.addPlaceholder(t,r)(s)).success(s=>{const{state:l,tr:a,dispatch:u,view:c,value:d}=s,h=this.store.helpers.findPlaceholder(t);if(!h){const f=new Error("The placeholder has been removed");return(o==null?void 0:o({error:f,state:l,tr:a,dispatch:u,view:c}))??!1}return this.removePlaceholder(t)({state:l,tr:a,view:c,dispatch:()=>{}}),i(d,h,{state:l,tr:a,dispatch:u,view:c})}).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,n,r,o,i,s;const{added:l,clearTrackers:a,removed:u,updated:c}=this.getMeta(e);if(a){this.placeholders=We.empty;for(const[,d]of this.placeholderWidgets)(n=(t=d.spec).onDestroy)==null||n.call(t,this.store.view,d.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:d=>{var h,f;const p=this.placeholderWidgets.get(d.id);p&&((f=(h=p.spec).onDestroy)==null||f.call(h,this.store.view,p.spec.element))}});for(const[,d]of this.placeholderWidgets)(o=(r=d.spec).onUpdate)==null||o.call(r,this.store.view,d.from,d.spec.element,d.spec.data);for(const d of l){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:h}of c){const f=this.placeholderWidgets.get(d);if(!f)continue;const p=yt.widget(f.from,f.spec.element,{...f.spec,data:h});this.placeholders=this.placeholders.remove([f]).add(e.doc,[p]),this.placeholderWidgets.set(d,p)}for(const d of u){const h=this.placeholders.find(void 0,void 0,p=>p.id===d&&p.__type===Pl),f=this.placeholderWidgets.get(d);f&&((s=(i=f.spec).onDestroy)==null||s.call(i,this.store.view,f.spec.element)),this.placeholders=this.placeholders.remove(h),this.placeholderWidgets.delete(d)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(e).find();t=t.add(e.doc,r)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(kC,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(kC,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t==null||t(e),!0)}addPlaceholder(e,t,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(e,t,o,!r)?(r==null||r(n?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:e,data:t,tr:r,checkOnly:!n})?(n==null||n(r),!0):!1}removePlaceholder(e){return({dispatch:t,tr:n})=>this.removePlaceholderTransaction({id:e,tr:n,checkOnly:!t})?(t==null||t(n),!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,n=>n.__type===Pl);for(const n of t)e.set(n.spec.id,{from:n.from,to:n.to});return e}createDecorations(e){var t,n,r;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?We.empty:zB(e,We.empty,{class:ke(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:s,nodeName:l,id:a,type:u}=e,c=(r==null?void 0:r(this.store.view,n))??document.createElement(l);c.classList.add(s);const d=yt.widget(n,c,{id:a,__type:Pl,type:u,element:c,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(a,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){const{from:n=t.selection.from,to:r=t.selection.to,className:o,nodeName:i,id:s,type:l}=e;let a;if(n===r){const u=document.createElement(i);u.classList.add(o),a=yt.widget(n,u,{id:s,type:l,__type:Pl,widget:u})}else a=yt.inline(n,r,{nodeName:i,class:o},{id:s,__type:Pl});this.placeholders=this.placeholders.add(t.doc,[a])}addNodePlaceholder(e,t){const{pos:n,className:r,nodeName:o,id:i}=e,s=Zr(n)?t.doc.resolve(n):t.selection.$from,l=Zr(n)?s.nodeAfter?{pos:n,end:s.nodeAfter.nodeSize}:void 0:Yz(s);if(!l)return;const a=yt.node(l.pos,l.end,{nodeName:o,class:r},{id:i,__type:Pl});this.placeholders=this.placeholders.add(t.doc,[a])}withRequiredBase(e,t){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...s}=t,l=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:l,...s,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...PB,...t}}setMeta(e,t){const n=this.getMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addPlaceholderTransaction(e,t,n,r=!1){if(this.findPlaceholder(e))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{updated:s}=this.getMeta(n);return this.setMeta(n,{updated:Lc([...s,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:Lc([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:n=!1}=e;return this.getPluginState()===We.empty?!1:(n||this.setMeta(t,{clearTrackers:!0}),!0)}};me([le()],Vo.prototype,"updateDecorations",1);me([le()],Vo.prototype,"addPlaceholder",1);me([le()],Vo.prototype,"updatePlaceholder",1);me([le()],Vo.prototype,"removePlaceholder",1);me([le()],Vo.prototype,"clearPlaceholders",1);me([lt()],Vo.prototype,"findPlaceholder",1);me([lt()],Vo.prototype,"findAllPlaceholders",1);Vo=me([De({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,n)=>e.add(n.doc,t.find()),getDefault:()=>We.empty}}},defaultPriority:st.Low})],Vo);var PB={added:[],updated:[],clearTrackers:!1,removed:[]},Pl="placeholderDecoration",kC="persistentSelectionFocus";function zB(e,t,n){const{selection:r,doc:o}=e;if(r.empty)return t;const{from:i,to:s}=r,l=Kh(r)?yt.node(i,s,n):yt.inline(i,s,n);return t.add(o,[l])}var P0=class extends gt{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:n,tr:r}=e;t||(n??[r]).some(o=>o==null?void 0:o.docChanged)&&this.options.docChanged(e)}};P0=me([De({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:st.Lowest})],P0);var vo=class extends gt{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",$0);const t=be(),n=be(),r=be(),o=new Set;for(const i of this.store.extensions){Yh(i)&&(n[i.name]=l=>B2({state:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{var a;return(a=Xd({state:this.store.getState(),type:i.type,attrs:l}))==null?void 0:a.node.attrs}),Em(i)&&(n[i.name]=l=>ng({trState:this.store.getState(),type:i.type,attrs:l}),r[i.name]=l=>{const a=Wi(this.store.getState().selection.$from,i.type);if(!a||!l)return a==null?void 0:a.mark.attrs;if(Pb(a.mark,l))return a.mark.attrs});const s=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const l of Object.keys(i.decoratedHelpers??{}))s[l]=i[l].bind(i);if(!Vd(s))for(const[l,a]of cn(s))dM({name:l,set:o,code:re.DUPLICATE_HELPER_NAMES}),t[l]=a}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return Db(e)}isViewEditable(e=this.store.getState()){var t,n;return((n=(t=this.store.view.props).editable)==null?void 0:n.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 n=>{const{state:r}=n,o=$0({content:e,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(n)}}getText({lineBreakDivider:e=` -`,state:e=this.store.getState()}={}){return e.doc.textBetween(0,e.doc.content.size,t,ws)}getTextBetween(t,e,n=this.store.getState().doc){return n.textBetween(t,e,` +`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,Es)}getTextBetween(e,t,n=this.store.getState().doc){return n.textBetween(e,t,` -`,ws)}getHTML(t=this.store.getState()){return fF(t.doc,this.store.document)}textToProsemirrorNode(t){const e=`
${t.content}
`;return this.store.stringHandlers.html({...t,content:e})}};me([bt()],go.prototype,"isSelectionEmpty",1);me([bt()],go.prototype,"isViewEditable",1);me([bt()],go.prototype,"getStateJSON",1);me([bt()],go.prototype,"getJSON",1);me([bt()],go.prototype,"getRemirrorJSON",1);me([de()],go.prototype,"insertHtml",1);me([bt()],go.prototype,"getText",1);me([bt()],go.prototype,"getTextBetween",1);me([bt()],go.prototype,"getHTML",1);go=me([Pe({})],go);var N0=class extends yt{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var t,e;const n=[],r=this.store.markTags[Ee.ExcludeInputRules];for(const o of this.store.extensions)if(!((t=this.store.managerSettings.exclude)!=null&&t.inputRules||!o.createInputRules||(e=o.options.exclude)!=null&&e.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return _5({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};N0=me([Pe({defaultPriority:dt.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],N0);var $o=class extends yt{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:t})=>{var e,n;if(t)return this.extraKeyBindings=[...this.extraKeyBindings,t],(n=(e=this.store).rebuildKeymap)==null||n.call(e),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==t),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:t}=this.options;return ke(t)?LB[t]:t}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var t;return(t=this.store.managerSettings.exclude)!=null&&t.keymap?[]:(this.setupKeydownHandler(),[new gi({props:{handleKeyDown:(e,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,e,n)}}})])}setupKeydownHandler(){const t=this.generateKeymapBindings();this.keydownHandler=Pb(t)}generateKeymapBindings(){var t;const e=[],n=this.shortcutMap,r=this.store.getExtension(We),o=l=>a=>sp({shortcut:a,map:n,store:this.store,options:l.options});for(const l of this.store.extensions){const a=l.decoratedKeybindings??{};if(!((t=l.options.exclude)!=null&&t.keymap)){l.createKeymap&&e.push(OB(l.createKeymap(o(l)),n));for(const[u,c]of cn(a)){if(c.isActive&&!c.isActive(l.options,this.store))continue;const d=l[u].bind(l),h=sp({shortcut:c.shortcut,map:n,options:l.options,store:this.store}),f=tt(c.priority)?c.priority(l.options,this.store):c.priority??dt.Low,p=be();for(const g of h)p[g]=d;e.push([f,p]),c.command&&r.updateDecorated(c.command,{shortcut:h})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...e]);return Vz(i)}arrowRightShortcut(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return this.exitMarkForwards(e,n)(t)}arrowLeftShortcut(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return Qp(this.exitNodeBackwards(n),this.exitMarkBackwards(e,n))(t)}backspace(t){const e=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return Qp(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(e,n,!0))(t)}createKeymap(){const{selectParentNodeOnEscape:t,undoInputRuleOnBackspace:e,excludeBaseKeymap:n}=this.options,r=be();if(!n)for(const[o,i]of cn(s1))r[o]=Sd(i);return e&&s1.Backspace&&(r.Backspace=Sd(mm(R5,s1.Backspace))),t&&(r.Escape=Sd(HF)),[dt.Low,r]}getNamedShortcut(t,e={}){return t.startsWith("_|")?sp({shortcut:t,map:this.shortcutMap,store:this.store,options:e}):[t]}onSetOptions(t){var e,n;const{changes:r}=t;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(e=this.store).rebuildKeymap)==null||n.call(e))}sortKeymaps(t){return Ka(t.map(e=>Bt(e)?e:[dt.Default,e]),(e,n)=>n[0]-e[0]).map(e=>e[1])}exitMarkForwards(t,e){return n=>{const{tr:r,dispatch:o}=n;if(!vF(r.selection)||hi({selection:r.selection,types:e}))return!1;const l=r.selection.$from.marks().filter(a=>!t.includes(a.type.name));if(Bs(l))return!1;if(!o)return!0;for(const a of l)r.removeStoredMark(a);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(t,e=!1){return n=>{const{tr:r}=n;if(!(e?pC:I0)(r.selection))return!1;const i=r.selection.$anchor.node();return!fm(i)||eF(i)||t.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(t,e,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?pC:I0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(hi({selection:o.selection,types:e}))return!1;const a=[...o.storedMarks??[],...o.selection.$from.marks()].filter(u=>!t.includes(u.type.name));if(Bs(a))return!1;if(!i)return!0;for(const u of a)o.removeStoredMark(u);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};me([nn({shortcut:"ArrowRight",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowRightShortcut",1);me([nn({shortcut:"ArrowLeft",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"arrowLeftShortcut",1);me([nn({shortcut:"Backspace",isActive:t=>t.exitMarksOnArrowPress})],$o.prototype,"backspace",1);me([bt()],$o.prototype,"getNamedShortcut",1);$o=me([Pe({defaultPriority:dt.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],$o);function MB(t){return sr(rm(oe),t)}function sp({shortcut:t,map:e,options:n,store:r}){return ke(t)?[$0(t,e)]:Bt(t)?t.map(o=>$0(o,e)):(t=t(n,r),sp({shortcut:t,map:e,options:n,store:r}))}function $0(t,e){return MB(t)?e[t]:t}function OB(t,e){const n={};let r,o;Bt(t)?[o,r]=t:r=t;for(const[i,s]of cn(r))n[$0(i,e)]=s;return om(o)?n:[o,n]}var sM={[oe.Copy]:"Mod-c",[oe.Cut]:"Mod-x",[oe.Paste]:"Mod-v",[oe.PastePlain]:"Mod-Shift-v",[oe.SelectAll]:"Mod-a",[oe.Undo]:"Mod-z",[oe.Redo]:Br.isMac?"Shift-Mod-z":"Mod-y",[oe.Bold]:"Mod-b",[oe.Italic]:"Mod-i",[oe.Underline]:"Mod-u",[oe.Strike]:"Mod-d",[oe.Code]:"Mod-`",[oe.Paragraph]:"Mod-Shift-0",[oe.H1]:"Mod-Shift-1",[oe.H2]:"Mod-Shift-2",[oe.H3]:"Mod-Shift-3",[oe.H4]:"Mod-Shift-4",[oe.H5]:"Mod-Shift-5",[oe.H6]:"Mod-Shift-6",[oe.TaskList]:"Mod-Shift-7",[oe.BulletList]:"Mod-Shift-8",[oe.OrderedList]:"Mod-Shift-9",[oe.Quote]:"Mod->",[oe.Divider]:"Mod-Shift-|",[oe.Codeblock]:"Mod-Shift-~",[oe.ClearFormatting]:"Mod-Shift-C",[oe.Superscript]:"Mod-.",[oe.Subscript]:"Mod-,",[oe.LeftAlignment]:"Mod-Shift-L",[oe.CenterAlignment]:"Mod-Shift-E",[oe.RightAlignment]:"Mod-Shift-R",[oe.JustifyAlignment]:"Mod-Shift-J",[oe.InsertLink]:"Mod-k",[oe.Find]:"Mod-f",[oe.FindBackwards]:"Mod-Shift-f",[oe.FindReplace]:"Mod-Shift-H",[oe.AddFootnote]:"Mod-Alt-f",[oe.AddComment]:"Mod-Alt-m",[oe.ContextMenu]:"Mod-Shift-\\",[oe.IncreaseFontSize]:"Mod-Shift-.",[oe.DecreaseFontSize]:"Mod-Shift-,",[oe.IncreaseIndent]:"Tab",[oe.DecreaseIndent]:"Shift-Tab",[oe.Shortcuts]:"Mod-/",[oe.Format]:Br.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},IB={...sM,[oe.Strike]:"Mod-Shift-S",[oe.Code]:"Mod-Shift-M",[oe.Paragraph]:"Mod-Alt-0",[oe.H1]:"Mod-Alt-1",[oe.H2]:"Mod-Alt-2",[oe.H3]:"Mod-Alt-3",[oe.H4]:"Mod-Alt-4",[oe.H5]:"Mod-Alt-5",[oe.H6]:"Mod-Alt-6",[oe.OrderedList]:"Mod-Alt-7",[oe.BulletList]:"Mod-Alt-8",[oe.Quote]:"Mod-Alt-9",[oe.ClearFormatting]:"Mod-\\",[oe.IncreaseIndent]:"Mod-[",[oe.DecreaseIndent]:"Mod-]"},LB={default:sM,googleDoc:IB},NB=class extends yt{get name(){return"nodeViews"}createPlugin(){const t=[],e=be();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();t.unshift(tt(r)?{[n.name]:r}:r)}t.unshift(this.store.managerSettings.nodeViews??{});for(const n of t)Object.assign(e,n);return{props:{nodeViews:e}}}},$B=class extends yt{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.pasteRules||!r.createPasteRules||(e=r.options.exclude)!=null&&e.pasteRules)continue;const o=r.createPasteRules(),i=Bt(o)?o:[o];n.push(...i)}return tB(n)}},tg=class extends yt{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=be(),this.stateGetters=new Map,this.getPluginStateCreator=t=>e=>t.getState(e??this.store.getState()),this.getStateByName=t=>{const e=this.stateGetters.get(t);return we(e,{message:"No plugin exists for the requested extension name."}),e()}}get name(){return"plugins"}onCreate(){const{setStoreKey:t,setExtensionStore:e,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)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),t("pluginKeys",this.pluginKeys),t("getPluginState",this.getStateByName),e("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr,o={previousState:e,tr:r,transactions:t,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(t,e)=>{for(const n of this.initStateHandlers)n(e)},apply:(t,e,n,r)=>{const o={previousState:n,state:r,tr:t};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(t){var e,n;if(!(!t.createPlugin&&!t.createExternalPlugins||(e=this.store.managerSettings.exclude)!=null&&e.plugins||(n=t.options.exclude)!=null&&n.plugins)){if(t.createPlugin){const o=new gl(t.name);this.pluginKeys[t.name]=o;const i=this.getPluginStateCreator(o);t.pluginKey=o,t.getPluginState=i,this.stateGetters.set(t.name,i),this.stateGetters.set(t.constructor,i);const s={...t.createPlugin(),key:o},l=new gi(s);this.updatePlugins([l],t.plugin?[t.plugin]:void 0),t.plugin=l}if(t.createExternalPlugins){const o=t.createExternalPlugins();this.updatePlugins(o,t.externalPlugins),t.externalPlugins=o}}}updatePlugins(t,e){if(!e||Bs(e)){this.plugins=[...this.plugins,...t];return}if(t.length!==e.length){this.plugins=[...this.plugins.filter(r=>!e.includes(r)),...t];return}const n=new Map;for(const[r,o]of t.entries())n.set(Ot(e,r),o);this.plugins=this.plugins.map(r=>e.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:t}=this.store;t("updatePlugins",this.updatePlugins.bind(this)),t("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),t("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(t){const e=oM(t)?t:wB(t)?this.store.manager.getExtension(t):this.store.extensions.find(n=>n.name===t);we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`The extension ${t} does not exist within the editor.`}),this.extractExtensionPlugins(e),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){we(this.store.phase>=mr.EditorView,{code:re.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:t,updateState:e}=this.store,n=t.state.reconfigure({plugins:this.plugins});e(n)}};tg=me([Pe({defaultPriority:dt.Highest,handlerKeys:["applyState","appendTransaction"]})],tg);var D0=class extends yt{constructor(){super(...arguments),this.dynamicAttributes={marks:be(),nodes:be()}}get name(){return"schema"}onCreate(){const{managerSettings:t,tags:e,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:l,markOverride:a}=t,u=p=>!!(p&&e[Ee.Block].includes(p));if(t.schema){const{nodes:p,marks:g}=WB(t.schema);this.addSchema(t.schema,p,g);return}const c=u(i)?{doc:be(),[i]:be()}:be(),d=be(),h=DB({settings:t,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:e});for(const p of o){h[p.name]={...h[p.name],...p.options.extraAttributes};const g=s===!0||p.options.disableExtraAttributes===!0||p.constructor.disableExtraAttributes===!0;if(Vh(p)){const{spec:m,dynamic:v}=bC({createExtensionSpec:(y,b)=>p.createNodeSpec(y,b),extraAttributes:Ot(h,p.name),override:{...l,...p.options.nodeOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags});p.spec=m,c[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[p.name]=v)}if(bm(p)){const{spec:m,dynamic:v}=bC({createExtensionSpec:(y,b)=>p.createMarkSpec(y,b),extraAttributes:Ot(h,p.name),override:{...a,...p.options.markOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags??[]});p.spec=m,d[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.marks[p.name]=v)}}const f=new LD({nodes:c,marks:d,topNode:"doc"});this.addSchema(f,c,d)}createPlugin(){return{appendTransaction:(t,e,n)=>{const{tr:r}=n;return!t.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,r),this.checkAndUpdateDynamicMarks(i,s,r),!0)),r.steps.length>0?r:null)}}}addSchema(t,e,n){this.store.setStoreKey("nodes",e),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",t),this.store.setExtensionStore("schema",t),this.store.setStoreKey("defaultBlockNode",hm(t).name);for(const r of Object.values(t.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(t,e,n){for(const[r,o]of cn(this.dynamicAttributes.nodes))if(t.type.name===r)for(const[i,s]of cn(o)){if(!Fs(t.attrs[i]))continue;const l={...t.attrs,[i]:s(t)};n.setNodeMarkup(e,void 0,l),uC(n)}}checkAndUpdateDynamicMarks(t,e,n){for(const[r,o]of cn(this.dynamicAttributes.marks)){const i=Ot(this.store.schema.marks,r),s=t.marks.find(l=>l.type.name===r);if(s)for(const[l,a]of cn(o)){if(!Fs(s.attrs[l]))continue;const u=Hi(n.doc.resolve(e),i);if(!u)continue;const{from:c,to:d}=u,h=i.create({...s.attrs,[l]:a(s)});n.removeMark(c,d,i).addMark(c,d,h),uC(n)}}}gatherExtraAttributes(t){const e=[];for(const n of t)n.createSchemaAttributes&&e.push(...n.createSchemaAttributes());return e}};D0=me([Pe({defaultPriority:dt.Highest})],D0);function DB(t){const{settings:e,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=t,s=be();if(e.disableExtraAttributes)return s;const l=[...n,...e.extraAttributes??[]];for(const a of l??[]){const u=zB({identifiers:a.identifiers,nodeNames:r,markNames:o,tags:i});for(const c of u){const d=s[c]??{};s[c]={...d,...a.attributes}}}return s}function PB(t){return Zs(t)&&Bt(t.tags)}function zB(t){const{identifiers:e,nodeNames:n,markNames:r,tags:o}=t;if(e==="nodes")return n;if(e==="marks")return r;if(e==="all")return[...n,...r];if(Bt(e))return e;we(PB(e),{code:re.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:l="any",excludeNames:a,excludeTags:u,type:c}=e,d=new Set,h=c==="mark"?r:c==="node"?n:[...r,...n],f=g=>h.includes(g)&&!(a!=null&&a.includes(g));for(const g of s)f(g)&&d.add(g);const p=new Map;for(const g of i)if(!(u!=null&&u.includes(g)))for(const m of o[g]){if(!f(m))continue;if(l==="any"){d.add(m);continue}const v=p.get(m)??new Set;v.add(g),p.set(m,v)}for(const[g,m]of p)m.size===i.length&&d.add(g);return[...d]}function bC(t){var e;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:s,override:l}=t,a=be();function u(m,v){a[m]=v}let c=!1;function d(){c=!0}const h=FB(r,o,d,u),f=BB(r,o),p=HB(r,o),g=n({defaults:h,parse:f,dom:p},l);return we(o||c,{code:re.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'.`}),g.group=[...((e=g.group)==null?void 0:e.split(" "))??[],...s].join(" ")||void 0,{spec:g,dynamic:a}}function zb(t){return ke(t)||tt(t)?{default:t}:(we(t,{message:`${iR(t)} is not supported`,code:re.EXTENSION_EXTRA_ATTRIBUTES}),t)}function FB(t,e,n,r){return()=>{n();const o=be();if(e)return o;for(const[i,s]of cn(t)){let a=zb(s).default;tt(a)&&(r(i,a),a=null),o[i]=a===void 0?{}:{default:a}}return o}}function BB(t,e){return n=>{const r=be();if(e)return r;for(const[o,i]of cn(t)){const{parseDOM:s,...l}=zb(i);if(zt(n)){if(Fs(s)){r[o]=n.getAttribute(o)??l.default;continue}if(tt(s)){r[o]=s(n)??l.default;continue}r[o]=n.getAttribute(s)??l.default}}return r}}function HB(t,e){return n=>{const r=be();if(e)return r;function o(i,s){if(i){if(ke(i)){r[s]=i;return}if(Bt(i)){const[l,a]=i;r[l]=a??n.attrs[s];return}for(const[l,a]of cn(i))r[l]=a}}for(const[i,s]of cn(t)){const{toDOM:l,parseDOM:a}=zb(s);if(Fs(l)){const u=ke(a)?a:i;r[u]=n.attrs[i];continue}if(tt(l)){o(l(n.attrs,UB(n)),i);continue}o(l,i)}return r}}function UB(t){return Uh(t)?{node:t}:qz(t)?{mark:t}:{}}function WB(t){const e=be(),n=be();for(const[r,o]of Object.entries(t.nodes))e[r]=o.spec;for(const[r,o]of Object.entries(t.marks))n[r]=o.spec;return{nodes:e,marks:n}}var zc=class extends yt{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:t})=>{var e;if(!(!t||(e=this.store.managerSettings.exclude)!=null&&e.suggesters))return cC(this.store.getState(),t)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",t=>cC(this.store.getState(),t)),this.store.setExtensionStore("removeSuggester",t=>Iz(this.store.getState(),t))}createExternalPlugins(){var t,e;const n=[];for(const r of this.store.extensions){if((t=this.store.managerSettings.exclude)!=null&&t.suggesters)break;if(!r.createSuggesters||(e=r.options.exclude)!=null&&e.suggesters)continue;const o=r.createSuggesters(),i=Bt(o)?o:[o];n.push(...i)}return[Lz(...n)]}getSuggestState(t){return Rb(t??this.store.getState())}getSuggestMethods(){const{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}=this.getSuggestState();return{addIgnored:t,clearIgnored:e,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}}isSuggesterActive(t){var e;return sr(Bt(t)?t:[t],(e=this.getSuggestState().match)==null?void 0:e.suggester.name)}};me([bt()],zc.prototype,"getSuggestState",1);me([bt()],zc.prototype,"getSuggestMethods",1);me([bt()],zc.prototype,"isSuggesterActive",1);zc=me([Pe({customHandlerKeys:["suggester"]})],zc);var P0=class extends yt{constructor(){super(...arguments),this.allTags=be(),this.plainTags=be(),this.markTags=be(),this.nodeTags=be()}get name(){return"tags"}onCreate(){this.resetTags();for(const t of this.store.extensions)this.updateTagForExtension(t);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 t=be(),e=be(),n=be(),r=be();for(const o of rm(Ee))t[o]=[],e[o]=[],n[o]=[],r[o]=[];this.allTags=t,this.plainTags=e,this.markTags=n,this.nodeTags=r}updateTagForExtension(t){var e,n;const r=new Set([...t.tags??[],...((e=t.createTags)==null?void 0:e.call(t))??[],...t.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[t.name])??[]]);for(const o of r)we(VB(o),{code:re.EXTENSION,message:`The tag provided by the extension: ${t.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(t.name),iM(t)&&this.plainTags[o].push(t.name),bm(t)&&this.markTags[o].push(t.name),Vh(t)&&this.nodeTags[o].push(t.name);t.tags=[...r]}};P0=me([Pe({defaultPriority:dt.Highest})],P0);function VB(t){return sr(rm(Ee),t)}var jB=new gl("remirrorFilePlaceholderPlugin");function GB(){const t=new gi({key:jB,state:{init(){return{set:je.empty,payloads:new Map}},apply(e,{set:n,payloads:r}){n=n.map(e.mapping,e.doc);const o=e.getMeta(t);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=kt.widget(o.pos,i,{id:o.id});n=n.add(e.doc,[s]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(e){var n;return((n=t.getState(e))==null?void 0:n.set)??null}}});return t}var KB=class extends yt{get name(){return"upload"}createExternalPlugins(){return[GB()]}};function YB(t={}){t={...{exitMarksOnArrowPress:$o.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:$o.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:$o.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:$o.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Uo.defaultOptions.persistentSelectionClass},...t};const n=u0(t,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=u0(t,["persistentSelectionClass"]);return[new P0,new D0,new xB,new tg,new N0,new $B,new NB,new zc,new We,new go,new $o(n),new L0,new KB,new Uo(r)]}var wC=class extends yt{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const t of this.store.extensions)this.captureCommands(t),this.captureKeybindings(t)}createPlugin(){return{}}captureCommands(t){const e=t.decoratedCommands??{},n=t.createCommands;for(const r of Object.keys(e)){const o=t[r];t[r]=(...i)=>s=>{var l;const a=o(...i)(s);return s.dispatch&&a&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((l=s.view)==null?void 0:l.dispatch),name:r,extension:t.name,decorated:!0}),a}}n&&(t.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...s)=>l=>{var a;const u=i(...s)(l);return l.dispatch&&u&&this.setCommandMeta(l.tr,{type:"command",chain:l.dispatch!==((a=l.view)==null?void 0:a.dispatch),name:o,extension:t.name,decorated:!1}),u};return r})}captureKeybindings(t){}getCommandMeta(t){return t.getMeta(this.pluginKey)??[]}setCommandMeta(t,e){const n=this.getCommandMeta(t);t.setMeta(this.pluginKey,[...n,e])}};wC=me([Pe({defaultOptions:{capture:Br.isDevelopment},staticKeys:["capture"],defaultPriority:dt.Highest})],wC);var ap,Wu,lp,Yl,us,cp,up,XB=class{constructor(t){Qt(this,ap,Rc()),Qt(this,Wu,void 0),Qt(this,lp,void 0),Qt(this,Yl,!0),Qt(this,us,vm()),Qt(this,cp,void 0),Qt(this,up,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,l;we(!this.manager.destroyed,{code:re.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=((l=(s=this.props).onDispatchTransaction)==null?void 0:l.call(s,i,this.getState()))??i;const a=this.getState(),{state:u,transactions:c}=a.applyTransaction(i);mn(this,lp,a),this.updateState({state:u,tr:i,transactions:c});const d=this.manager.store.getForcedUpdates(i);Bs(d)||this.updateViewProps(...d)},this.onChange=(i=be())=>{var s,l;const a=this.eventListenerProps(i);le(this,Yl)&&mn(this,Yl,!1),(l=(s=this.props).onChange)==null||l.call(s,a)},this.onBlur=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onBlur)==null||l.call(s,a,i),le(this,us).emit("blur",a,i)},this.onFocus=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onFocus)==null||l.call(s,a,i),le(this,us).emit("focus",a,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:l}=this.manager.createState({content:i}),a=this.getState(),{state:u}=this.getState().applyTransaction(a.tr.replaceRangeWith(0,a.doc.nodeSize-2,l));if(s)return this.updateState({state:u,triggerChange:s});this.view.updateState(u)},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:e,initialEditorState:n,element:r}=t;if(mn(this,Wu,e),mn(this,up,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return le(this,cp)??mn(this,cp,le(this,us).on.bind(le(this,us)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return le(this,Yl)}get props(){return le(this,Wu).call(this)}get previousState(){return this.previousStateOverride??le(this,lp)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return le(this,ap)}get initialEditorState(){return le(this,up)}updateListener(t){const{state:e,tr:n}=t;return le(this,us).emit("updated",this.eventListenerProps({state:e,tr:n}))}update(t){const{getProps:e}=t;return mn(this,Wu,e),this}updateViewProps(...t){const e=u0(this.updatableViewProps,t);this.view.setProps({...this.view.props,...e})}getAttributes(t){var e;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:s}=this.props,l=(e=this.manager.store)==null?void 0:e.attributes,a=tt(n)?n(this.eventListenerProps()):n;let u={};(r||Yr(r))&&(u=t?{autoFocus:!0}:{autofocus:"true"});const c=Mc(Pc(t&&"Prosemirror","remirror-editor",l==null?void 0:l.class,...o).split(" ")).join(" "),d={role:"textbox",...u,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...l,class:c};return aR({...d,...a})}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(){le(this,us).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(t=be()){const{state:e,tr:n,transactions:r}=t;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:le(this,Yl),state:e??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:le(this,ap),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}}};ap=new WeakMap;Wu=new WeakMap;lp=new WeakMap;Yl=new WeakMap;us=new WeakMap;cp=new WeakMap;up=new WeakMap;function qB(t,e){const n=[],r=new WeakMap,o=[],i=new WeakMap;let s=[];const l={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:e};for(const d of t)aM(l,{extension:d});s=Ka(s,(d,h)=>h.priority-d.priority);const a=new WeakSet,u=new Set;for(const d of s){const h=d.constructor,f=d.name,p=i.get(h);we(p,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:re.INTERNAL}),!(a.has(h)||u.has(f))&&(a.add(h),u.add(f),n.push(d),r.set(h,d),p.forEach(g=>g==null?void 0:g.replaceChildExtension(h,d)))}const c=[];for(const d of n)ZB({extension:d,found:a,missing:c});return we(Bs(c),{code:re.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:d,extension:h})=>`The extension '${h.name}' requires '${d.name} in order to run correctly.`).join(` -`)}),{extensions:n,extensionMap:r}}function aM(t,e){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:s}=t,{extension:l,parentExtension:a}=e;let{names:u=[]}=e;we(oM(l),{code:re.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});const c=l.extensions;if(l.setPriority((n=s.priority)==null?void 0:n[l.name]),r.push(l),QB({duplicateMap:o,extension:l,parentExtension:a}),c.length!==0){if(u.includes(l.name)){`${u.join(" > ")}${l.name}`;return}u=[...u,l.name],i.push(l);for(const d of c)aM(t,{names:u,extension:d,parentExtension:l})}}function ZB(t){const{extension:e,found:n,missing:r}=t;if(e.requiredExtensions)for(const o of e.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:e})}function QB(t){const{duplicateMap:e,extension:n,parentExtension:r}=t,o=n.constructor,i=e.get(o),s=r?[r]:[];e.set(o,i?[...i,...s]:s)}function JB(t){var e,n,r,o;const{extension:i,nodeNames:s,markNames:l,plainNames:a,store:u,handlers:c}=t;i.setStore(u);const d=(e=i.onCreate)==null?void 0:e.bind(i),h=(n=i.onView)==null?void 0:n.bind(i),f=(r=i.onStateUpdate)==null?void 0:r.bind(i),p=(o=i.onDestroy)==null?void 0:o.bind(i);d&&c.create.push(d),h&&c.view.push(h),f&&c.update.push(f),p&&c.destroy.push(p),bm(i)&&l.push(i.name),Vh(i)&&i.name!=="doc"&&s.push(i.name),iM(i)&&a.push(i.name)}var ds,Vu,_o,Si,ju,Nr,ma,Gu,va,Ku,ya,Ro,Yu,dp=class{constructor(t,e={}){Qt(this,ds,void 0),Qt(this,Vu,be()),Qt(this,_o,be()),Qt(this,Si,void 0),Qt(this,ju,void 0),Qt(this,Nr,mr.None),Qt(this,ma,void 0),Qt(this,Gu,!0),Qt(this,va,{create:[],view:[],update:[],destroy:[]}),Qt(this,Ku,[]),Qt(this,ya,vm()),Qt(this,Ro,void 0),Qt(this,Yu,void 0),this.getState=()=>{var o;return le(this,Nr)>=mr.EditorView?this.view.state:(we(le(this,Ro),{code:re.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=le(this,Ro))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=qB(t,e);mn(this,ma,e),mn(this,Si,Oa(n)),mn(this,ju,r),mn(this,ds,this.createExtensionStore()),mn(this,Nr,mr.Create),this.setupLifecycleHandlers();for(const o of le(this,va).create){const i=o();i&&le(this,Ku).push(i)}}static create(t,e={}){return new dp([...hR(t),...YB(e.builtin)],e)}get[Bi](){return bn.Manager}get destroyed(){return le(this,Nr)===mr.Destroy}get mounted(){return le(this,Nr)>=mr.EditorView&&le(this,Nr)le(this,Si),enumerable:e},phase:{get:()=>le(this,Nr),enumerable:e},view:{get:()=>this.view,enumerable:e},managerSettings:{get:()=>Oa(le(this,ma)),enumerable:e},getState:{value:this.getState,enumerable:e},updateState:{value:this.updateState,enumerable:e},isMounted:{value:()=>this.mounted,enumerable:e},getExtension:{value:this.getExtension.bind(this),enumerable:e},manager:{get:()=>this,enumerable:e},document:{get:()=>this.document,enumerable:e},stringHandlers:{get:()=>le(this,Vu),enumerable:e},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:e},previousState:{get:()=>r,set:o=>{r=o},enumerable:e}}),t.getStoreKey=this.getStoreKey.bind(this),t.setStoreKey=this.setStoreKey.bind(this),t.setExtensionStore=this.setExtensionStore.bind(this),t.setStringHandler=this.setStringHandler.bind(this),t}addView(t){if(le(this,Nr)>=mr.EditorView)return this;mn(this,Gu,!0),mn(this,Nr,mr.EditorView),le(this,_o).view=t;for(const e of le(this,va).view){const n=e(t);n&&le(this,Ku).push(n)}return this}attachFramework(t,e){var n;le(this,Ro)!==t&&(le(this,Ro)&&(le(this,Ro).destroy(),(n=le(this,Yu))==null||n.call(this)),mn(this,Ro,t),mn(this,Yu,this.addHandler("stateUpdate",e)))}createEmptyDoc(){var t;const e=(t=this.schema.nodes.doc)==null?void 0:t.createAndFill();return we(e,{code:re.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),e}createState(t={}){const{onError:e,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=t,{schema:s,plugins:l}=this.store,a=F2({stringHandler:ke(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:e,schema:s,selection:o});return Ia.create({schema:s,doc:a,plugins:l,selection:po(o,a)})}addHandler(t,e){return le(this,ya).on(t,e)}onStateUpdate(t){const e=le(this,Gu);le(this,ds).currentState=t.state,le(this,ds).previousState=t.previousState,e&&(mn(this,Nr,mr.Runtime),mn(this,Gu,!1));const n={...t,firstUpdate:e};for(const r of le(this,va).update)r(n);le(this,ya).emit("stateUpdate",n)}getExtension(t){const e=le(this,ju).get(t);return we(e,{code:re.INVALID_MANAGER_EXTENSION,message:`'${t.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),e}hasExtension(t){return!!le(this,ju).get(t)}clone(){const t=le(this,Si).map(n=>n.clone(n.options)),e=dp.create(()=>t,le(this,ma));return le(this,ya).emit("clone",e),e}recreate(t=[],e={}){const n=le(this,Si).map(o=>o.clone(o.initialOptions)),r=dp.create(()=>[...n,...t],e);return le(this,ya).emit("recreate",r),r}destroy(){var t,e,n,r,o,i;mn(this,Nr,mr.Destroy);for(const s of((t=this.view)==null?void 0:t.state.plugins)??[])(n=(e=s.getState(this.view.state))==null?void 0:e.destroy)==null||n.call(e);(r=le(this,Ro))==null||r.destroy(),(o=le(this,Yu))==null||o.call(this);for(const s of le(this,Ku))s();for(const s of le(this,va).destroy)s();(i=this.view)==null||i.destroy(),le(this,ya).emit("destroy")}includes(t){const e=[],n=[];for(const r of le(this,Si))e.push(r.name,r.constructorName),n.push(r.constructor);return t.every(r=>ke(r)?sr(e,r):sr(n,r))}},eH=dp;ds=new WeakMap;Vu=new WeakMap;_o=new WeakMap;Si=new WeakMap;ju=new WeakMap;Nr=new WeakMap;ma=new WeakMap;Gu=new WeakMap;va=new WeakMap;Ku=new WeakMap;ya=new WeakMap;Ro=new WeakMap;Yu=new WeakMap;function tH(t,e){return!lu(t)||!cu(t,bn.Manager)?!1:e?t.includes(e):!0}var nH=Object.defineProperty,rH=Object.getOwnPropertyDescriptor,jh=(t,e,n,r)=>{for(var o=r>1?void 0:r?rH(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&nH(e,n,o),o},lM=/\S+/g;function cM(t){return t.type.isTextblock?1:t.type.isText?t.textBetween(0,t.nodeSize).length:0}function oH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;const s=cM(o);return n+s>e?(r=i+1+(e-n),!1):(n+=s,!0)}),r}function iH({doc:t},e){let n=0,r=0;return t.nodesBetween(0,t.nodeSize-2,(o,i)=>{if(r>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),l=su(s,lM);if(n+l.length>e){const a=e-n,u=l[a];return r=i+((u==null?void 0:u.index)??0),!1}return n+=l.length,!0}),r}var Vs=class extends yt{get name(){return"count"}getCountMaximum(){return this.options.maximum}getCharacterCount(t=this.store.getState()){let e=0;return t.doc.nodesBetween(0,t.doc.nodeSize-2,n=>(e+=cM(n),!0)),Math.max(e-1,0)}getWordCount(t=this.store.getState()){const e=this.store.helpers.getText({lineBreakDivider:" ",state:t});return su(e,lM).length}isCountValid(t=this.store.getState()){const{maximumStrategy:e,maximum:n}=this.options;return n<1?!0:e==="CHARACTERS"?this.store.helpers.getCharacterCount(t)<=n:this.store.helpers.getWordCount(t)<=n}createDecorationSet(t){const{maximum:e=-1,maximumStrategy:n,maximumExceededClassName:r}=this.options,s=(n==="CHARACTERS"?oH:iH)(t,e);return je.create(t.doc,[kt.inline(s,t.doc.nodeSize-2,{class:r})])}createExternalPlugins(){const{maximum:t}=this.options,e=new gi({state:{init:(n,r)=>this.isCountValid(r)?{decorationSet:je.empty}:{decorationSet:this.createDecorationSet(r)},apply:(n,r,o,i)=>!n.docChanged||t<1?r:this.isCountValid(i)?{decorationSet:je.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(n){var r;return((r=e.getState(n))==null?void 0:r.decorationSet)??null}}});return[e]}};jh([bt()],Vs.prototype,"getCountMaximum",1);jh([bt()],Vs.prototype,"getCharacterCount",1);jh([bt()],Vs.prototype,"getWordCount",1);jh([bt()],Vs.prototype,"isCountValid",1);Vs=jh([Pe({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Vs);var sH="Expected a function",uM="__lodash_hash_undefined__",aH="[object Function]",lH="[object GeneratorFunction]",cH=/[\\^$.*+?()[\]{}|]/g,uH=/^\[object .+?Constructor\]$/,dH=typeof ut=="object"&&ut&&ut.Object===Object&&ut,hH=typeof self=="object"&&self&&self.Object===Object&&self,dM=dH||hH||Function("return this")();function fH(t,e){return t==null?void 0:t[e]}function pH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var gH=Array.prototype,mH=Function.prototype,hM=Object.prototype,u1=dM["__core-js_shared__"],xC=function(){var t=/[^.]+$/.exec(u1&&u1.keys&&u1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fM=mH.toString,Fb=hM.hasOwnProperty,vH=hM.toString,yH=RegExp("^"+fM.call(Fb).replace(cH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bH=gH.splice,wH=pM(dM,"Map"),Yd=pM(Object,"create");function Qa(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function MH(t,e){var n=this.__data__,r=wm(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}du.prototype.clear=TH;du.prototype.delete=AH;du.prototype.get=_H;du.prototype.has=RH;du.prototype.set=MH;function vl(t){var e=-1,n=t?t.length:0;for(this.clear();++e4&&n.slice(0,4)===jb&&L6.test(e)&&(e.charAt(4)==="-"?r=D6(e):e=P6(e),o=M6),new o(r,e))}function D6(t){var e=t.slice(5).replace(SM,F6);return jb+e.charAt(0).toUpperCase()+e.slice(1)}function P6(t){var e=t.slice(4);return SM.test(e)?t:(e=e.replace(N6,z6),e.charAt(0)!=="-"&&(e="-"+e),jb+e)}function z6(t){return"-"+t.toLowerCase()}function F6(t){return t.charAt(1).toUpperCase()}var B6=H6,TC=/[#.]/g;function H6(t,e){for(var n=t||"",r=e||"div",o={},i=0,s,l,a;i=48&&e<=57}var cU=uU;function uU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}var dU=hU;function hU(t){var e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}var fU=dU,pU=AM,gU=mU;function mU(t){return fU(t)||pU(t)}var Af,vU=59,yU=bU;function bU(t){var e="&"+t+";",n;return Af=Af||document.createElement("i"),Af.innerHTML=e,n=Af.textContent,n.charCodeAt(n.length-1)===vU&&t!=="semi"||n===e?!1:n}var LC=sU,NC=aU,wU=AM,xU=cU,_M=gU,kU=yU,EU=DU,SU={}.hasOwnProperty,$l=String.fromCharCode,CU=Function.prototype,$C={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},TU=9,DC=10,AU=12,_U=32,PC=38,RU=59,MU=60,OU=61,IU=35,LU=88,NU=120,$U=65533,Xl="named",Yb="hexadecimal",Xb="decimal",qb={};qb[Yb]=16;qb[Xb]=10;var km={};km[Xl]=_M;km[Xb]=wU;km[Yb]=xU;var RM=1,MM=2,OM=3,IM=4,LM=5,F0=6,NM=7,ta={};ta[RM]="Named character references must be terminated by a semicolon";ta[MM]="Numeric character references must be terminated by a semicolon";ta[OM]="Named character references cannot be empty";ta[IM]="Numeric character references cannot be empty";ta[LM]="Named character references must be known";ta[F0]="Numeric character references cannot be disallowed";ta[NM]="Numeric character references cannot be outside the permissible Unicode range";function DU(t,e){var n={},r,o;e||(e={});for(o in $C)r=e[o],n[o]=r??$C[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),PU(t,n)}function PU(t,e){var n=e.additional,r=e.nonTerminated,o=e.text,i=e.reference,s=e.warning,l=e.textContext,a=e.referenceContext,u=e.warningContext,c=e.position,d=e.indent||[],h=t.length,f=0,p=-1,g=c.column||1,m=c.line||1,v="",y=[],b,w,k,x,S,T,C,O,_,R,A,E,M,I,N,L,$,D,F;for(typeof n=="string"&&(n=n.charCodeAt(0)),L=U(),O=s?W:CU,f--,h++;++f65535&&(T-=65536,R+=$l(T>>>10|55296),T=56320|T&1023),T=R+$l(T))):I!==Xl&&O(IM,D)),T?(B(),L=U(),f=F-1,g+=F-M+1,y.push(T),$=U(),$.offset++,i&&i.call(a,T,{start:L,end:$},t.slice(M-1,F)),L=$):(x=t.slice(M-1,F),v+=x,g+=x.length,f=F-1)}else S===10&&(m++,p++,g=0),S===S?(v+=$l(S),g++):B();return y.join("");function U(){return{line:m,column:g,offset:f+(c.offset||0)}}function W(H,V){var Y=U();Y.column+=V,Y.offset+=V,s.call(u,ta[H],Y,H)}function B(){v&&(y.push(v),o&&o.call(l,v,{start:L,end:U()}),v="")}}function zU(t){return t>=55296&&t<=57343||t>1114111}function FU(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}var $M={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** +`,Es)}getHTML(e=this.store.getState()){return kF(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`
${e.content}
`;return this.store.stringHandlers.html({...e,content:t})}};me([lt()],vo.prototype,"isSelectionEmpty",1);me([lt()],vo.prototype,"isViewEditable",1);me([lt()],vo.prototype,"getStateJSON",1);me([lt()],vo.prototype,"getJSON",1);me([lt()],vo.prototype,"getRemirrorJSON",1);me([le()],vo.prototype,"insertHtml",1);me([lt()],vo.prototype,"getText",1);me([lt()],vo.prototype,"getTextBetween",1);me([lt()],vo.prototype,"getHTML",1);vo=me([De({})],vo);var z0=class extends gt{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const n=[],r=this.store.markTags[Ee.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=r,n.push(i);return P5({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};z0=me([De({defaultPriority:st.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],z0);var Po=class extends gt{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,n;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(n=(t=this.store).rebuildKeymap)==null||n.call(t),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return ke(e)?UB[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new yi({props:{handleKeyDown:(t,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,t,n)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=Ub(e)}generateKeymapBindings(){var e;const t=[],n=this.shortcutMap,r=this.store.getExtension(Ve),o=l=>a=>up({shortcut:a,map:n,store:this.store,options:l.options});for(const l of this.store.extensions){const a=l.decoratedKeybindings??{};if(!((e=l.options.exclude)!=null&&e.keymap)){l.createKeymap&&t.push(BB(l.createKeymap(o(l)),n));for(const[u,c]of cn(a)){if(c.isActive&&!c.isActive(l.options,this.store))continue;const d=l[u].bind(l),h=up({shortcut:c.shortcut,map:n,options:l.options,store:this.store}),f=tt(c.priority)?c.priority(l.options,this.store):c.priority??st.Low,p=be();for(const g of h)p[g]=d;t.push([f,p]),c.command&&r.updateDecorated(c.command,{shortcut:h})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return Jz(i)}arrowRightShortcut(e){const t=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return this.exitMarkForwards(t,n)(e)}arrowLeftShortcut(e){const t=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return tg(this.exitNodeBackwards(n),this.exitMarkBackwards(t,n))(e)}backspace(e){const t=this.store.markTags[Ee.PreventExits],n=this.store.nodeTags[Ee.PreventExits];return tg(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(t,n,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:n}=this.options,r=be();if(!n)for(const[o,i]of cn(u1))r[o]=Ad(i);return t&&u1.Backspace&&(r.Backspace=Ad(wm(z5,u1.Backspace))),e&&(r.Escape=Ad(qF)),[st.Low,r]}getNamedShortcut(e,t={}){return e.startsWith("_|")?up({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,n;const{changes:r}=e;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(t=this.store).rebuildKeymap)==null||n.call(t))}sortKeymaps(e){return Vs(e.map(t=>Bt(t)?t:[st.Default,t]),(t,n)=>n[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return n=>{const{tr:r,dispatch:o}=n;if(!TF(r.selection)||gi({selection:r.selection,types:t}))return!1;const l=r.selection.$from.marks().filter(a=>!e.includes(a.type.name));if(Ws(l))return!1;if(!o)return!0;for(const a of l)r.removeStoredMark(a);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(e,t=!1){return n=>{const{tr:r}=n;if(!(t?yC:D0)(r.selection))return!1;const i=r.selection.$anchor.node();return!vm(i)||cF(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(e,t,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?yC:D0)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(gi({selection:o.selection,types:t}))return!1;const a=[...o.storedMarks??[],...o.selection.$from.marks()].filter(u=>!e.includes(u.type.name));if(Ws(a))return!1;if(!i)return!0;for(const u of a)o.removeStoredMark(u);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};me([nn({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],Po.prototype,"arrowRightShortcut",1);me([nn({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],Po.prototype,"arrowLeftShortcut",1);me([nn({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],Po.prototype,"backspace",1);me([lt()],Po.prototype,"getNamedShortcut",1);Po=me([De({defaultPriority:st.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],Po);function FB(e){return ar(am(oe),e)}function up({shortcut:e,map:t,options:n,store:r}){return ke(e)?[F0(e,t)]:Bt(e)?e.map(o=>F0(o,t)):(e=e(n,r),up({shortcut:e,map:t,options:n,store:r}))}function F0(e,t){return FB(e)?t[e]:e}function BB(e,t){const n={};let r,o;Bt(e)?[o,r]=e:r=e;for(const[i,s]of cn(r))n[F0(i,t)]=s;return lm(o)?n:[o,n]}var pM={[oe.Copy]:"Mod-c",[oe.Cut]:"Mod-x",[oe.Paste]:"Mod-v",[oe.PastePlain]:"Mod-Shift-v",[oe.SelectAll]:"Mod-a",[oe.Undo]:"Mod-z",[oe.Redo]:br.isMac?"Shift-Mod-z":"Mod-y",[oe.Bold]:"Mod-b",[oe.Italic]:"Mod-i",[oe.Underline]:"Mod-u",[oe.Strike]:"Mod-d",[oe.Code]:"Mod-`",[oe.Paragraph]:"Mod-Shift-0",[oe.H1]:"Mod-Shift-1",[oe.H2]:"Mod-Shift-2",[oe.H3]:"Mod-Shift-3",[oe.H4]:"Mod-Shift-4",[oe.H5]:"Mod-Shift-5",[oe.H6]:"Mod-Shift-6",[oe.TaskList]:"Mod-Shift-7",[oe.BulletList]:"Mod-Shift-8",[oe.OrderedList]:"Mod-Shift-9",[oe.Quote]:"Mod->",[oe.Divider]:"Mod-Shift-|",[oe.Codeblock]:"Mod-Shift-~",[oe.ClearFormatting]:"Mod-Shift-C",[oe.Superscript]:"Mod-.",[oe.Subscript]:"Mod-,",[oe.LeftAlignment]:"Mod-Shift-L",[oe.CenterAlignment]:"Mod-Shift-E",[oe.RightAlignment]:"Mod-Shift-R",[oe.JustifyAlignment]:"Mod-Shift-J",[oe.InsertLink]:"Mod-k",[oe.Find]:"Mod-f",[oe.FindBackwards]:"Mod-Shift-f",[oe.FindReplace]:"Mod-Shift-H",[oe.AddFootnote]:"Mod-Alt-f",[oe.AddComment]:"Mod-Alt-m",[oe.ContextMenu]:"Mod-Shift-\\",[oe.IncreaseFontSize]:"Mod-Shift-.",[oe.DecreaseFontSize]:"Mod-Shift-,",[oe.IncreaseIndent]:"Tab",[oe.DecreaseIndent]:"Shift-Tab",[oe.Shortcuts]:"Mod-/",[oe.Format]:br.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},HB={...pM,[oe.Strike]:"Mod-Shift-S",[oe.Code]:"Mod-Shift-M",[oe.Paragraph]:"Mod-Alt-0",[oe.H1]:"Mod-Alt-1",[oe.H2]:"Mod-Alt-2",[oe.H3]:"Mod-Alt-3",[oe.H4]:"Mod-Alt-4",[oe.H5]:"Mod-Alt-5",[oe.H6]:"Mod-Alt-6",[oe.OrderedList]:"Mod-Alt-7",[oe.BulletList]:"Mod-Alt-8",[oe.Quote]:"Mod-Alt-9",[oe.ClearFormatting]:"Mod-\\",[oe.IncreaseIndent]:"Mod-[",[oe.DecreaseIndent]:"Mod-]"},UB={default:pM,googleDoc:HB},WB=class extends gt{get name(){return"nodeViews"}createPlugin(){const e=[],t=be();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();e.unshift(tt(r)?{[n.name]:r}:r)}e.unshift(this.store.managerSettings.nodeViews??{});for(const n of e)Object.assign(t,n);return{props:{nodeViews:t}}}},VB=class extends gt{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!r.createPasteRules||(t=r.options.exclude)!=null&&t.pasteRules)continue;const o=r.createPasteRules(),i=Bt(o)?o:[o];n.push(...i)}return uB(n)}},og=class extends gt{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=be(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return we(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)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,n)=>{const r=n.tr,o={previousState:t,tr:r,transactions:e,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(e,t)=>{for(const n of this.initStateHandlers)n(t)},apply:(e,t,n,r)=>{const o={previousState:n,state:r,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,n;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(n=e.options.exclude)!=null&&n.plugins)){if(e.createPlugin){const o=new yl(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},l=new yi(s);this.updatePlugins([l],e.plugin?[e.plugin]:void 0),e.plugin=l}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||Ws(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(r=>!t.includes(r)),...e];return}const n=new Map;for(const[r,o]of e.entries())n.set(It(t,r),o);this.plugins=this.plugins.map(r=>t.includes(r)?n.get(r):r)}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=hM(e)?e:RB(e)?this.store.manager.getExtension(e):this.store.extensions.find(n=>n.name===e);we(t,{code:re.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(){we(this.store.phase>=vr.EditorView,{code:re.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,n=e.state.reconfigure({plugins:this.plugins});t(n)}};og=me([De({defaultPriority:st.Highest,handlerKeys:["applyState","appendTransaction"]})],og);var B0=class extends gt{constructor(){super(...arguments),this.dynamicAttributes={marks:be(),nodes:be()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:l,markOverride:a}=e,u=p=>!!(p&&t[Ee.Block].includes(p));if(e.schema){const{nodes:p,marks:g}=QB(e.schema);this.addSchema(e.schema,p,g);return}const c=u(i)?{doc:be(),[i]:be()}:be(),d=be(),h=jB({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:t});for(const p of o){h[p.name]={...h[p.name],...p.options.extraAttributes};const g=s===!0||p.options.disableExtraAttributes===!0||p.constructor.disableExtraAttributes===!0;if(Yh(p)){const{spec:m,dynamic:v}=EC({createExtensionSpec:(y,b)=>p.createNodeSpec(y,b),extraAttributes:It(h,p.name),override:{...l,...p.options.nodeOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags});p.spec=m,c[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.nodes[p.name]=v)}if(Em(p)){const{spec:m,dynamic:v}=EC({createExtensionSpec:(y,b)=>p.createMarkSpec(y,b),extraAttributes:It(h,p.name),override:{...a,...p.options.markOverride},ignoreExtraAttributes:g,name:p.constructorName,tags:p.tags??[]});p.spec=m,d[p.name]=m,Object.keys(v).length>0&&(this.dynamicAttributes.marks[p.name]=v)}}const f=new UD({nodes:c,marks:d,topNode:"doc"});this.addSchema(f,c,d)}createPlugin(){return{appendTransaction:(e,t,n)=>{const{tr:r}=n;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,s)=>(this.checkAndUpdateDynamicNodes(i,s,r),this.checkAndUpdateDynamicMarks(i,s,r),!0)),r.steps.length>0?r:null)}}}addSchema(e,t,n){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",mm(e).name);for(const r of Object.values(e.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(e,t,n){for(const[r,o]of cn(this.dynamicAttributes.nodes))if(e.type.name===r)for(const[i,s]of cn(o)){if(!Us(e.attrs[i]))continue;const l={...e.attrs,[i]:s(e)};n.setNodeMarkup(t,void 0,l),pC(n)}}checkAndUpdateDynamicMarks(e,t,n){for(const[r,o]of cn(this.dynamicAttributes.marks)){const i=It(this.store.schema.marks,r),s=e.marks.find(l=>l.type.name===r);if(s)for(const[l,a]of cn(o)){if(!Us(s.attrs[l]))continue;const u=Wi(n.doc.resolve(t),i);if(!u)continue;const{from:c,to:d}=u,h=i.create({...s.attrs,[l]:a(s)});n.removeMark(c,d,i).addMark(c,d,h),pC(n)}}}gatherExtraAttributes(e){const t=[];for(const n of e)n.createSchemaAttributes&&t.push(...n.createSchemaAttributes());return t}};B0=me([De({defaultPriority:st.Highest})],B0);function jB(e){const{settings:t,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=e,s=be();if(t.disableExtraAttributes)return s;const l=[...n,...t.extraAttributes??[]];for(const a of l??[]){const u=KB({identifiers:a.identifiers,nodeNames:r,markNames:o,tags:i});for(const c of u){const d=s[c]??{};s[c]={...d,...a.attributes}}}return s}function GB(e){return ta(e)&&Bt(e.tags)}function KB(e){const{identifiers:t,nodeNames:n,markNames:r,tags:o}=e;if(t==="nodes")return n;if(t==="marks")return r;if(t==="all")return[...n,...r];if(Bt(t))return t;we(GB(t),{code:re.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:s=[],behavior:l="any",excludeNames:a,excludeTags:u,type:c}=t,d=new Set,h=c==="mark"?r:c==="node"?n:[...r,...n],f=g=>h.includes(g)&&!(a!=null&&a.includes(g));for(const g of s)f(g)&&d.add(g);const p=new Map;for(const g of i)if(!(u!=null&&u.includes(g)))for(const m of o[g]){if(!f(m))continue;if(l==="any"){d.add(m);continue}const v=p.get(m)??new Set;v.add(g),p.set(m,v)}for(const[g,m]of p)m.size===i.length&&d.add(g);return[...d]}function EC(e){var t;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:s,override:l}=e,a=be();function u(m,v){a[m]=v}let c=!1;function d(){c=!0}const h=YB(r,o,d,u),f=XB(r,o),p=qB(r,o),g=n({defaults:h,parse:f,dom:p},l);return we(o||c,{code:re.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'.`}),g.group=[...((t=g.group)==null?void 0:t.split(" "))??[],...s].join(" ")||void 0,{spec:g,dynamic:a}}function Wb(e){return ke(e)||tt(e)?{default:e}:(we(e,{message:`${fR(e)} is not supported`,code:re.EXTENSION_EXTRA_ATTRIBUTES}),e)}function YB(e,t,n,r){return()=>{n();const o=be();if(t)return o;for(const[i,s]of cn(e)){let a=Wb(s).default;tt(a)&&(r(i,a),a=null),o[i]=a===void 0?{}:{default:a}}return o}}function XB(e,t){return n=>{const r=be();if(t)return r;for(const[o,i]of cn(e)){const{parseDOM:s,...l}=Wb(i);if(zt(n)){if(Us(s)){r[o]=n.getAttribute(o)??l.default;continue}if(tt(s)){r[o]=s(n)??l.default;continue}r[o]=n.getAttribute(s)??l.default}}return r}}function qB(e,t){return n=>{const r=be();if(t)return r;function o(i,s){if(i){if(ke(i)){r[s]=i;return}if(Bt(i)){const[l,a]=i;r[l]=a??n.attrs[s];return}for(const[l,a]of cn(i))r[l]=a}}for(const[i,s]of cn(e)){const{toDOM:l,parseDOM:a}=Wb(s);if(Us(l)){const u=ke(a)?a:i;r[u]=n.attrs[i];continue}if(tt(l)){o(l(n.attrs,ZB(n)),i);continue}o(l,i)}return r}}function ZB(e){return Gh(e)?{node:e}:iF(e)?{mark:e}:{}}function QB(e){const t=be(),n=be();for(const[r,o]of Object.entries(e.nodes))t[r]=o.spec;for(const[r,o]of Object.entries(e.marks))n[r]=o.spec;return{nodes:t,marks:n}}var Hc=class extends gt{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return fC(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>fC(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>Hz(this.store.getState(),e))}createExternalPlugins(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!r.createSuggesters||(t=r.options.exclude)!=null&&t.suggesters)continue;const o=r.createSuggesters(),i=Bt(o)?o:[o];n.push(...i)}return[Uz(...n)]}getSuggestState(e){return Nb(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:l}}isSuggesterActive(e){var t;return ar(Bt(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};me([lt()],Hc.prototype,"getSuggestState",1);me([lt()],Hc.prototype,"getSuggestMethods",1);me([lt()],Hc.prototype,"isSuggesterActive",1);Hc=me([De({customHandlerKeys:["suggester"]})],Hc);var H0=class extends gt{constructor(){super(...arguments),this.allTags=be(),this.plainTags=be(),this.markTags=be(),this.nodeTags=be()}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=be(),t=be(),n=be(),r=be();for(const o of am(Ee))e[o]=[],t[o]=[],n[o]=[],r[o]=[];this.allTags=e,this.plainTags=t,this.markTags=n,this.nodeTags=r}updateTagForExtension(e){var t,n;const r=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[e.name])??[]]);for(const o of r)we(JB(o),{code:re.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),fM(e)&&this.plainTags[o].push(e.name),Em(e)&&this.markTags[o].push(e.name),Yh(e)&&this.nodeTags[o].push(e.name);e.tags=[...r]}};H0=me([De({defaultPriority:st.Highest})],H0);function JB(e){return ar(am(Ee),e)}var eH=new yl("remirrorFilePlaceholderPlugin");function tH(){const e=new yi({key:eH,state:{init(){return{set:We.empty,payloads:new Map}},apply(t,{set:n,payloads:r}){n=n.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),s=yt.widget(o.pos,i,{id:o.id});n=n.add(t.doc,[s]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(t){var n;return((n=e.getState(t))==null?void 0:n.set)??null}}});return e}var nH=class extends gt{get name(){return"upload"}createExternalPlugins(){return[tH()]}};function rH(e={}){e={...{exitMarksOnArrowPress:Po.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:Po.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:Po.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:Po.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Vo.defaultOptions.persistentSelectionClass},...e};const n=p0(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=p0(e,["persistentSelectionClass"]);return[new H0,new B0,new MB,new og,new z0,new VB,new WB,new Hc,new Ve,new vo,new Po(n),new P0,new nH,new Vo(r)]}var SC=class extends gt{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??{},n=e.createCommands;for(const r of Object.keys(t)){const o=e[r];e[r]=(...i)=>s=>{var l;const a=o(...i)(s);return s.dispatch&&a&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((l=s.view)==null?void 0:l.dispatch),name:r,extension:e.name,decorated:!0}),a}}n&&(e.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...s)=>l=>{var a;const u=i(...s)(l);return l.dispatch&&u&&this.setCommandMeta(l.tr,{type:"command",chain:l.dispatch!==((a=l.view)==null?void 0:a.dispatch),name:o,extension:e.name,decorated:!1}),u};return r})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...n,t])}};SC=me([De({defaultOptions:{capture:br.isDevelopment},staticKeys:["capture"],defaultPriority:st.Highest})],SC);var dp,Gu,hp,Zl,fs,fp,pp,oH=class{constructor(e){Qt(this,dp,Ic()),Qt(this,Gu,void 0),Qt(this,hp,void 0),Qt(this,Zl,!0),Qt(this,fs,xm()),Qt(this,fp,void 0),Qt(this,pp,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var s,l;we(!this.manager.destroyed,{code:re.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=((l=(s=this.props).onDispatchTransaction)==null?void 0:l.call(s,i,this.getState()))??i;const a=this.getState(),{state:u,transactions:c}=a.applyTransaction(i);vn(this,hp,a),this.updateState({state:u,tr:i,transactions:c});const d=this.manager.store.getForcedUpdates(i);Ws(d)||this.updateViewProps(...d)},this.onChange=(i=be())=>{var s,l;const a=this.eventListenerProps(i);ce(this,Zl)&&vn(this,Zl,!1),(l=(s=this.props).onChange)==null||l.call(s,a)},this.onBlur=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onBlur)==null||l.call(s,a,i),ce(this,fs).emit("blur",a,i)},this.onFocus=i=>{var s,l;const a=this.eventListenerProps();(l=(s=this.props).onFocus)==null||l.call(s,a,i),ce(this,fs).emit("focus",a,i)},this.setContent=(i,{triggerChange:s=!1}={})=>{const{doc:l}=this.manager.createState({content:i}),a=this.getState(),{state:u}=this.getState().applyTransaction(a.tr.replaceRangeWith(0,a.doc.nodeSize-2,l));if(s)return this.updateState({state:u,triggerChange:s});this.view.updateState(u)},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:n,element:r}=e;if(vn(this,Gu,t),vn(this,pp,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return ce(this,fp)??vn(this,fp,ce(this,fs).on.bind(ce(this,fs)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return ce(this,Zl)}get props(){return ce(this,Gu).call(this)}get previousState(){return this.previousStateOverride??ce(this,hp)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return ce(this,dp)}get initialEditorState(){return ce(this,pp)}updateListener(e){const{state:t,tr:n}=e;return ce(this,fs).emit("updated",this.eventListenerProps({state:t,tr:n}))}update(e){const{getProps:t}=e;return vn(this,Gu,t),this}updateViewProps(...e){const t=p0(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:s}=this.props,l=(t=this.manager.store)==null?void 0:t.attributes,a=tt(n)?n(this.eventListenerProps()):n;let u={};(r||Zr(r))&&(u=e?{autoFocus:!0}:{autofocus:"true"});const c=Lc(Bc(e&&"Prosemirror","remirror-editor",l==null?void 0:l.class,...o).split(" ")).join(" "),d={role:"textbox",...u,"aria-multiline":"true",...s??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...l,class:c};return gR({...d,...a})}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(){ce(this,fs).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=be()){const{state:t,tr:n,transactions:r}=e;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:ce(this,Zl),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:ce(this,dp),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}}};dp=new WeakMap;Gu=new WeakMap;hp=new WeakMap;Zl=new WeakMap;fs=new WeakMap;fp=new WeakMap;pp=new WeakMap;function iH(e,t){const n=[],r=new WeakMap,o=[],i=new WeakMap;let s=[];const l={duplicateMap:i,parentExtensions:o,gatheredExtensions:s,settings:t};for(const d of e)gM(l,{extension:d});s=Vs(s,(d,h)=>h.priority-d.priority);const a=new WeakSet,u=new Set;for(const d of s){const h=d.constructor,f=d.name,p=i.get(h);we(p,{message:`No entries were found for the ExtensionConstructor ${d.name}`,code:re.INTERNAL}),!(a.has(h)||u.has(f))&&(a.add(h),u.add(f),n.push(d),r.set(h,d),p.forEach(g=>g==null?void 0:g.replaceChildExtension(h,d)))}const c=[];for(const d of n)sH({extension:d,found:a,missing:c});return we(Ws(c),{code:re.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:d,extension:h})=>`The extension '${h.name}' requires '${d.name} in order to run correctly.`).join(` +`)}),{extensions:n,extensionMap:r}}function gM(e,t){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:s}=e,{extension:l,parentExtension:a}=t;let{names:u=[]}=t;we(hM(l),{code:re.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});const c=l.extensions;if(l.setPriority((n=s.priority)==null?void 0:n[l.name]),r.push(l),aH({duplicateMap:o,extension:l,parentExtension:a}),c.length!==0){if(u.includes(l.name)){`${u.join(" > ")}${l.name}`;return}u=[...u,l.name],i.push(l);for(const d of c)gM(e,{names:u,extension:d,parentExtension:l})}}function sH(e){const{extension:t,found:n,missing:r}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:t})}function aH(e){const{duplicateMap:t,extension:n,parentExtension:r}=e,o=n.constructor,i=t.get(o),s=r?[r]:[];t.set(o,i?[...i,...s]:s)}function lH(e){var t,n,r,o;const{extension:i,nodeNames:s,markNames:l,plainNames:a,store:u,handlers:c}=e;i.setStore(u);const d=(t=i.onCreate)==null?void 0:t.bind(i),h=(n=i.onView)==null?void 0:n.bind(i),f=(r=i.onStateUpdate)==null?void 0:r.bind(i),p=(o=i.onDestroy)==null?void 0:o.bind(i);d&&c.create.push(d),h&&c.view.push(h),f&&c.update.push(f),p&&c.destroy.push(p),Em(i)&&l.push(i.name),Yh(i)&&i.name!=="doc"&&s.push(i.name),fM(i)&&a.push(i.name)}var ps,Ku,Mo,Ti,Yu,Pr,wa,Xu,xa,qu,ka,Oo,Zu,gp=class{constructor(e,t={}){Qt(this,ps,void 0),Qt(this,Ku,be()),Qt(this,Mo,be()),Qt(this,Ti,void 0),Qt(this,Yu,void 0),Qt(this,Pr,vr.None),Qt(this,wa,void 0),Qt(this,Xu,!0),Qt(this,xa,{create:[],view:[],update:[],destroy:[]}),Qt(this,qu,[]),Qt(this,ka,xm()),Qt(this,Oo,void 0),Qt(this,Zu,void 0),this.getState=()=>{var o;return ce(this,Pr)>=vr.EditorView?this.view.state:(we(ce(this,Oo),{code:re.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=ce(this,Oo))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=iH(e,t);vn(this,wa,t),vn(this,Ti,$a(n)),vn(this,Yu,r),vn(this,ps,this.createExtensionStore()),vn(this,Pr,vr.Create),this.setupLifecycleHandlers();for(const o of ce(this,xa).create){const i=o();i&&ce(this,qu).push(i)}}static create(e,t={}){return new gp([...wR(e),...rH(t.builtin)],t)}get[Ui](){return wn.Manager}get destroyed(){return ce(this,Pr)===vr.Destroy}get mounted(){return ce(this,Pr)>=vr.EditorView&&ce(this,Pr)ce(this,Ti),enumerable:t},phase:{get:()=>ce(this,Pr),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>$a(ce(this,wa)),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:()=>ce(this,Ku),enumerable:t},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:t},previousState:{get:()=>r,set:o=>{r=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(ce(this,Pr)>=vr.EditorView)return this;vn(this,Xu,!0),vn(this,Pr,vr.EditorView),ce(this,Mo).view=e;for(const t of ce(this,xa).view){const n=t(e);n&&ce(this,qu).push(n)}return this}attachFramework(e,t){var n;ce(this,Oo)!==e&&(ce(this,Oo)&&(ce(this,Oo).destroy(),(n=ce(this,Zu))==null||n.call(this)),vn(this,Oo,e),vn(this,Zu,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return we(t,{code:re.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=e,{schema:s,plugins:l}=this.store,a=K2({stringHandler:ke(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:t,schema:s,selection:o});return Da.create({schema:s,doc:a,plugins:l,selection:Mr(o,a)})}addHandler(e,t){return ce(this,ka).on(e,t)}onStateUpdate(e){const t=ce(this,Xu);ce(this,ps).currentState=e.state,ce(this,ps).previousState=e.previousState,t&&(vn(this,Pr,vr.Runtime),vn(this,Xu,!1));const n={...e,firstUpdate:t};for(const r of ce(this,xa).update)r(n);ce(this,ka).emit("stateUpdate",n)}getExtension(e){const t=ce(this,Yu).get(e);return we(t,{code:re.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!!ce(this,Yu).get(e)}clone(){const e=ce(this,Ti).map(n=>n.clone(n.options)),t=gp.create(()=>e,ce(this,wa));return ce(this,ka).emit("clone",t),t}recreate(e=[],t={}){const n=ce(this,Ti).map(o=>o.clone(o.initialOptions)),r=gp.create(()=>[...n,...e],t);return ce(this,ka).emit("recreate",r),r}destroy(){var e,t,n,r,o,i;vn(this,Pr,vr.Destroy);for(const s of((e=this.view)==null?void 0:e.state.plugins)??[])(n=(t=s.getState(this.view.state))==null?void 0:t.destroy)==null||n.call(t);(r=ce(this,Oo))==null||r.destroy(),(o=ce(this,Zu))==null||o.call(this);for(const s of ce(this,qu))s();for(const s of ce(this,xa).destroy)s();(i=this.view)==null||i.destroy(),ce(this,ka).emit("destroy")}includes(e){const t=[],n=[];for(const r of ce(this,Ti))t.push(r.name,r.constructorName),n.push(r.constructor);return e.every(r=>ke(r)?ar(t,r):ar(n,r))}},cH=gp;ps=new WeakMap;Ku=new WeakMap;Mo=new WeakMap;Ti=new WeakMap;Yu=new WeakMap;Pr=new WeakMap;wa=new WeakMap;Xu=new WeakMap;xa=new WeakMap;qu=new WeakMap;ka=new WeakMap;Oo=new WeakMap;Zu=new WeakMap;function uH(e,t){return!du(e)||!hu(e,wn.Manager)?!1:t?e.includes(t):!0}var dH=Object.defineProperty,hH=Object.getOwnPropertyDescriptor,Xh=(e,t,n,r)=>{for(var o=r>1?void 0:r?hH(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&dH(t,n,o),o},mM=/\S+/g;function vM(e){return e.type.isTextblock?1:e.type.isText?e.textBetween(0,e.nodeSize).length:0}function fH({doc:e},t){let n=0,r=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(r>0)return!1;const s=vM(o);return n+s>t?(r=i+1+(t-n),!1):(n+=s,!0)}),r}function pH({doc:e},t){let n=0,r=0;return e.nodesBetween(0,e.nodeSize-2,(o,i)=>{if(r>0)return!1;if(!o.type.isText)return!0;const s=o.textBetween(0,o.nodeSize),l=cu(s,mM);if(n+l.length>t){const a=t-n,u=l[a];return r=i+((u==null?void 0:u.index)??0),!1}return n+=l.length,!0}),r}var Ys=class extends gt{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,n=>(t+=vM(n),!0)),Math.max(t-1,0)}getWordCount(e=this.store.getState()){const t=this.store.helpers.getText({lineBreakDivider:" ",state:e});return cu(t,mM).length}isCountValid(e=this.store.getState()){const{maximumStrategy:t,maximum:n}=this.options;return n<1?!0:t==="CHARACTERS"?this.store.helpers.getCharacterCount(e)<=n:this.store.helpers.getWordCount(e)<=n}createDecorationSet(e){const{maximum:t=-1,maximumStrategy:n,maximumExceededClassName:r}=this.options,s=(n==="CHARACTERS"?fH:pH)(e,t);return We.create(e.doc,[yt.inline(s,e.doc.nodeSize-2,{class:r})])}createExternalPlugins(){const{maximum:e}=this.options,t=new yi({state:{init:(n,r)=>this.isCountValid(r)?{decorationSet:We.empty}:{decorationSet:this.createDecorationSet(r)},apply:(n,r,o,i)=>!n.docChanged||e<1?r:this.isCountValid(i)?{decorationSet:We.empty}:{decorationSet:this.createDecorationSet(i)}},props:{decorations(n){var r;return((r=t.getState(n))==null?void 0:r.decorationSet)??null}}});return[t]}};Xh([lt()],Ys.prototype,"getCountMaximum",1);Xh([lt()],Ys.prototype,"getCharacterCount",1);Xh([lt()],Ys.prototype,"getWordCount",1);Xh([lt()],Ys.prototype,"isCountValid",1);Ys=Xh([De({defaultOptions:{maximum:-1,maximumExceededClassName:"remirror-max-count-exceeded",maximumStrategy:"CHARACTERS"},staticKeys:["maximum","maximumStrategy","maximumExceededClassName"]})],Ys);var gH="Expected a function",yM="__lodash_hash_undefined__",mH="[object Function]",vH="[object GeneratorFunction]",yH=/[\\^$.*+?()[\]{}|]/g,bH=/^\[object .+?Constructor\]$/,wH=typeof dt=="object"&&dt&&dt.Object===Object&&dt,xH=typeof self=="object"&&self&&self.Object===Object&&self,bM=wH||xH||Function("return this")();function kH(e,t){return e==null?void 0:e[t]}function EH(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var SH=Array.prototype,CH=Function.prototype,wM=Object.prototype,p1=bM["__core-js_shared__"],CC=function(){var e=/[^.]+$/.exec(p1&&p1.keys&&p1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xM=CH.toString,Vb=wM.hasOwnProperty,TH=wM.toString,AH=RegExp("^"+xM.call(Vb).replace(yH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_H=SH.splice,RH=kM(bM,"Map"),Qd=kM(Object,"create");function tl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function FH(e,t){var n=this.__data__,r=Sm(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}pu.prototype.clear=$H;pu.prototype.delete=DH;pu.prototype.get=PH;pu.prototype.has=zH;pu.prototype.set=FH;function wl(e){var t=-1,n=e?e.length:0;for(this.clear();++t4&&n.slice(0,4)===qb&&U6.test(t)&&(t.charAt(4)==="-"?r=j6(t):t=G6(t),o=F6),new o(r,t))}function j6(e){var t=e.slice(5).replace(IM,Y6);return qb+t.charAt(0).toUpperCase()+t.slice(1)}function G6(e){var t=e.slice(4);return IM.test(t)?e:(t=t.replace(W6,K6),t.charAt(0)!=="-"&&(t="-"+t),qb+t)}function K6(e){return"-"+e.toLowerCase()}function Y6(e){return e.charAt(1).toUpperCase()}var X6=q6,MC=/[#.]/g;function q6(e,t){for(var n=e||"",r=t||"div",o={},i=0,s,l,a;i=48&&t<=57}var yU=bU;function bU(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var wU=xU;function xU(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var kU=wU,EU=$M,SU=CU;function CU(e){return kU(e)||EU(e)}var Of,TU=59,AU=_U;function _U(e){var t="&"+e+";",n;return Of=Of||document.createElement("i"),Of.innerHTML=t,n=Of.textContent,n.charCodeAt(n.length-1)===TU&&e!=="semi"||n===t?!1:n}var PC=gU,zC=mU,RU=$M,MU=yU,DM=SU,OU=AU,IU=jU,LU={}.hasOwnProperty,zl=String.fromCharCode,NU=Function.prototype,FC={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},$U=9,BC=10,DU=12,PU=32,HC=38,zU=59,FU=60,BU=61,HU=35,UU=88,WU=120,VU=65533,Ql="named",Jb="hexadecimal",ew="decimal",tw={};tw[Jb]=16;tw[ew]=10;var Tm={};Tm[Ql]=DM;Tm[ew]=RU;Tm[Jb]=MU;var PM=1,zM=2,FM=3,BM=4,HM=5,W0=6,UM=7,ia={};ia[PM]="Named character references must be terminated by a semicolon";ia[zM]="Numeric character references must be terminated by a semicolon";ia[FM]="Named character references cannot be empty";ia[BM]="Numeric character references cannot be empty";ia[HM]="Named character references must be known";ia[W0]="Numeric character references cannot be disallowed";ia[UM]="Numeric character references cannot be outside the permissible Unicode range";function jU(e,t){var n={},r,o;t||(t={});for(o in FC)r=t[o],n[o]=r??FC[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),GU(e,n)}function GU(e,t){var n=t.additional,r=t.nonTerminated,o=t.text,i=t.reference,s=t.warning,l=t.textContext,a=t.referenceContext,u=t.warningContext,c=t.position,d=t.indent||[],h=e.length,f=0,p=-1,g=c.column||1,m=c.line||1,v="",y=[],b,w,k,x,S,T,C,I,_,R,A,E,M,O,N,L,$,D,F;for(typeof n=="string"&&(n=n.charCodeAt(0)),L=U(),I=s?W:NU,f--,h++;++f65535&&(T-=65536,R+=zl(T>>>10|55296),T=56320|T&1023),T=R+zl(T))):O!==Ql&&I(BM,D)),T?(B(),L=U(),f=F-1,g+=F-M+1,y.push(T),$=U(),$.offset++,i&&i.call(a,T,{start:L,end:$},e.slice(M-1,F)),L=$):(x=e.slice(M-1,F),v+=x,g+=x.length,f=F-1)}else S===10&&(m++,p++,g=0),S===S?(v+=zl(S),g++):B();return y.join("");function U(){return{line:m,column:g,offset:f+(c.offset||0)}}function W(H,j){var Y=U();Y.column+=j,Y.offset+=j,s.call(u,ia[H],Y,H)}function B(){v&&(y.push(v),o&&o.call(l,v,{start:L,end:U()}),v="")}}function KU(e){return e>=55296&&e<=57343||e>1114111}function YU(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 WM={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 n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof a?new a(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(k){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var w in b)if(b[w].src==y)return b[w]}return null}},isActive:function(y,b,w){for(var k="no-"+b;y;){var x=y.classList;if(x.contains(b))return!0;if(x.contains(k))return!1;y=y.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var w=l.util.clone(l.languages[y]);for(var k in b)w[k]=b[k];return w},insertBefore:function(y,b,w,k){k=k||l.languages;var x=k[y],S={};for(var T in x)if(x.hasOwnProperty(T)){if(T==b)for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w.hasOwnProperty(T)||(S[T]=x[T])}var O=k[y];return k[y]=S,l.languages.DFS(l.languages,function(_,R){R===O&&_!=y&&(this[_]=S)}),S},DFS:function y(b,w,k,x){x=x||{};var S=l.util.objId;for(var T in b)if(b.hasOwnProperty(T)){w.call(b,T,b[T],k||T);var C=b[T],O=l.util.type(C);O==="Object"&&!x[S(C)]?(x[S(C)]=!0,y(C,w,null,x)):O==="Array"&&!x[S(C)]&&(x[S(C)]=!0,y(C,w,T,x))}}},plugins:{},highlightAll:function(y,b){l.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,w){var k={callback:w,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var x=0,S;S=k.elements[x++];)l.highlightElement(S,b===!0,k.callback)},highlightElement:function(y,b,w){var k=l.util.getLanguage(y),x=l.languages[k];l.util.setLanguage(y,k);var S=y.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var T=y.textContent,C={element:y,language:k,grammar:x,code:T};function O(R){C.highlightedCode=R,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),w&&w.call(C.element)}if(l.hooks.run("before-sanity-check",C),S=C.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),w&&w.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){O(l.util.encode(C.code));return}if(b&&r.Worker){var _=new Worker(l.filename);_.onmessage=function(R){O(R.data)},_.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else O(l.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,w){var k={code:y,grammar:b,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(y,b){var w=b.rest;if(w){for(var k in w)b[k]=w[k];delete b.rest}var x=new d;return h(x,x.head,y),c(y,x,b,x.head,0),p(x)},hooks:{all:{},add:function(y,b){var w=l.hooks.all;w[y]=w[y]||[],w[y].push(b)},run:function(y,b){var w=l.hooks.all[y];if(!(!w||!w.length))for(var k=0,x;x=w[k++];)x(b)}},Token:a};r.Prism=l;function a(y,b,w,k){this.type=y,this.content=b,this.alias=w,this.length=(k||"").length|0}a.stringify=function y(b,w){if(typeof b=="string")return b;if(Array.isArray(b)){var k="";return b.forEach(function(O){k+=y(O,w)}),k}var x={type:b.type,content:y(b.content,w),tag:"span",classes:["token",b.type],attributes:{},language:w},S=b.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(x.classes,S):x.classes.push(S)),l.hooks.run("wrap",x);var T="";for(var C in x.attributes)T+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+T+">"+x.content+""};function u(y,b,w,k){y.lastIndex=b;var x=y.exec(w);if(x&&k&&x[1]){var S=x[1].length;x.index+=S,x[0]=x[0].slice(S)}return x}function c(y,b,w,k,x,S){for(var T in w)if(!(!w.hasOwnProperty(T)||!w[T])){var C=w[T];C=Array.isArray(C)?C:[C];for(var O=0;O=S.reach);$+=L.value.length,L=L.next){var D=L.value;if(b.length>y.length)return;if(!(D instanceof a)){var F=1,U;if(E){if(U=u(N,$,y,A),!U||U.index>=y.length)break;var V=U.index,W=U.index+U[0].length,B=$;for(B+=L.value.length;V>=B;)L=L.next,B+=L.value.length;if(B-=L.value.length,$=B,L.value instanceof a)continue;for(var H=L;H!==b.tail&&(BS.reach&&(S.reach=te);var ce=L.prev;X&&(ce=h(b,ce,X),$+=X.length),f(b,ce,F);var Ne=new a(T,R?l.tokenize(Y,R):Y,M,Y);if(L=h(b,ce,Ne),Z&&h(b,L,Z),F>1){var ye={cause:T+","+O,reach:te};c(y,b,w,L.prev,$,ye),S&&ye.reach>S.reach&&(S.reach=ye.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,w){var k=b.next,x={value:w,prev:b,next:k};return b.next=x,k.prev=x,y.length++,x}function f(y,b,w){for(var k=b.next,x=0;x/,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]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\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:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}var UU=Qb;Qb.displayName="css";Qb.aliases=[];function Qb(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}var WU=Jb;Jb.displayName="clike";Jb.aliases=[];function Jb(t){t.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 VU=ew;ew.displayName="javascript";ew.aliases=["js"];function ew(t){t.languages.javascript=t.languages.extend("clike",{"class-name":[t.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}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.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:t.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:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.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:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.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:t.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"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.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")),t.languages.js=t.languages.javascript}var qu=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof ut=="object"?ut:{},jU=a7();qu.Prism={manual:!0,disableWorkerMessageHandler:!0};var GU=a9,KU=EU,DM=BU,YU=HU,XU=UU,qU=WU,ZU=VU;jU();var tw={}.hasOwnProperty;function PM(){}PM.prototype=DM;var tn=new PM,QU=tn;tn.highlight=e7;tn.register=Kh;tn.alias=JU;tn.registered=t7;tn.listLanguages=n7;Kh(YU);Kh(XU);Kh(qU);Kh(ZU);tn.util.encode=i7;tn.Token.stringify=r7;function Kh(t){if(typeof t!="function"||!t.displayName)throw new Error("Expected `function` for `grammar`, got `"+t+"`");tn.languages[t.displayName]===void 0&&t(tn)}function JU(t,e){var n=tn.languages,r=t,o,i,s,l;e&&(r={},r[t]=e);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,s=i.length,l=-1;++lparseInt(Xd(l,2),16)),parseInt(Xd(s[3]||"f",2),16)/255]}const r=f7.exec(e);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,16)),parseInt(s[3]||"ff",16)/255]}const o=p7.exec(e);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,10)),parseFloat(s[3]||"1")]}const i=g7.exec(e);if(i){const[s,l,a,u]=Array.from(i).slice(1).map(parseFloat);if(Li(0,100,l)!==l)throw new Zu(t);if(Li(0,100,a)!==a)throw new Zu(t);return[...v7(s,l,a),Number.isNaN(u)?1:u]}throw new Zu(t)}function c7(t){let e=5381,n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return(e>>>0)%2341}const zC=t=>parseInt(t.replace(/_/g,""),36),u7="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((t,e)=>{const n=zC(e.substring(0,3)),r=zC(e.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return t[n]=`${o}${r}`,t},{});function d7(t){const e=t.toLowerCase().trim(),n=u7[c7(e)];if(!n)throw new Zu(t);return`#${n}`}const Xd=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),h7=new RegExp(`^#${Xd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),f7=new RegExp(`^#${Xd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),p7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Xd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),g7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,m7=/^[a-z]+$/i,FC=t=>Math.round(t*255),v7=(t,e,n)=>{let r=n/100;if(e===0)return[r,r,r].map(FC);const o=(t%360+360)%360/60,i=(1-Math.abs(2*r-1))*(e/100),s=i*(1-Math.abs(o%2-1));let l=0,a=0,u=0;o>=0&&o<1?(l=i,a=s):o>=1&&o<2?(l=s,a=i):o>=2&&o<3?(a=i,u=s):o>=3&&o<4?(a=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);const c=r-i/2,d=l+c,h=a+c,f=u+c;return[d,h,f].map(FC)};function y7(t){const[e,n,r,o]=rw(t).map((d,h)=>h===3?d:d/255),i=Math.max(e,n,r),s=Math.min(e,n,r),l=(i+s)/2;if(i===s)return[0,0,l,o];const a=i-s,u=l>.5?a/(2-i-s):a/(i+s);return[60*(e===i?(n-r)/a+(n.179}function bc(t){return k7(t)?"#000":"#fff"}const E7="remirror-editor-wrapper",S7="remirror-button-active",C7="remirror-button",T7="remirror-composite",A7="remirror-dialog",_7="remirror-dialog-backdrop",R7="remirror-form",M7="remirror-form-message",O7="remirror-form-label",I7="remirror-form-group",L7="remirror-group",N7="remirror-input",$7="remirror-menu",D7="remirror-menu-pane",P7="remirror-menu-pane-active",z7="remirror-menu-dropdown-label",F7="remirror-menu-pane-icon",B7="remirror-menu-pane-label",H7="remirror-menu-pane-shortcut",U7="remirror-menu-button-left",W7="remirror-menu-button-right",V7="remirror-menu-button-nested-left",j7="remirror-menu-button-nested-right",G7="remirror-menu-button",K7="remirror-menu-bar",Y7="remirror-flex-column",X7="remirror-flex-row",q7="remirror-menu-item",Z7="remirror-menu-item-row",Q7="remirror-menu-item-column",J7="remirror-menu-item-checkbox",eW="remirror-menu-item-radio",tW="remirror-menu-group",nW="remirror-floating-popover",rW="remirror-popover",oW="remirror-animated-popover",iW="remirror-role",sW="remirror-separator",aW="remirror-tab",lW="remirror-tab-list",cW="remirror-tabbable",uW="remirror-toolbar",dW="remirror-tooltip",hW="remirror-table-size-editor",fW="remirror-table-size-editor-body",pW="remirror-table-size-editor-cell",gW="remirror-table-size-editor-cell-selected",mW="remirror-table-size-editor-footer",vW="remirror-color-picker",yW="remirror-color-picker-cell",bW="remirror-color-picker-cell-selected";var wW=Object.freeze({__proto__:null,ANIMATED_POPOVER:oW,BUTTON:C7,BUTTON_ACTIVE:S7,COLOR_PICKER:vW,COLOR_PICKER_CELL:yW,COLOR_PICKER_CELL_SELECTED:bW,COMPOSITE:T7,DIALOG:A7,DIALOG_BACKDROP:_7,EDITOR_WRAPPER:E7,FLEX_COLUMN:Y7,FLEX_ROW:X7,FLOATING_POPOVER:nW,FORM:R7,FORM_GROUP:I7,FORM_LABEL:O7,FORM_MESSAGE:M7,GROUP:L7,INPUT:N7,MENU:$7,MENU_BAR:K7,MENU_BUTTON:G7,MENU_BUTTON_LEFT:U7,MENU_BUTTON_NESTED_LEFT:V7,MENU_BUTTON_NESTED_RIGHT:j7,MENU_BUTTON_RIGHT:W7,MENU_DROPDOWN_LABEL:z7,MENU_GROUP:tW,MENU_ITEM:q7,MENU_ITEM_CHECKBOX:J7,MENU_ITEM_COLUMN:Q7,MENU_ITEM_RADIO:eW,MENU_ITEM_ROW:Z7,MENU_PANE:D7,MENU_PANE_ACTIVE:P7,MENU_PANE_ICON:F7,MENU_PANE_LABEL:B7,MENU_PANE_SHORTCUT:H7,POPOVER:rW,ROLE:iW,SEPARATOR:sW,TAB:aW,TABBABLE:cW,TABLE_SIZE_EDITOR:hW,TABLE_SIZE_EDITOR_BODY:fW,TABLE_SIZE_EDITOR_CELL:pW,TABLE_SIZE_EDITOR_CELL_SELECTED:gW,TABLE_SIZE_EDITOR_FOOTER:mW,TAB_LIST:lW,TOOLBAR:uW,TOOLTIP:dW});const xW="remirror-wrap",kW="remirror-language-select-positioner",EW="remirror-language-select-width",SW="remirror-a11y-dark",CW="remirror-atom-dark",TW="remirror-base16-ateliersulphurpool-light",AW="remirror-cb",_W="remirror-darcula",RW="remirror-dracula",MW="remirror-duotone-dark",OW="remirror-duotone-earth",IW="remirror-duotone-forest",LW="remirror-duotone-light",NW="remirror-duotone-sea",$W="remirror-duotone-space",DW="remirror-gh-colors",PW="remirror-hopscotch",zW="remirror-pojoaque",FW="remirror-vs",BW="remirror-xonokai";var B0=Object.freeze({__proto__:null,A11Y_DARK:SW,ATOM_DARK:CW,BASE16_ATELIERSULPHURPOOL_LIGHT:TW,CB:AW,DARCULA:_W,DRACULA:RW,DUOTONE_DARK:MW,DUOTONE_EARTH:OW,DUOTONE_FOREST:IW,DUOTONE_LIGHT:LW,DUOTONE_SEA:NW,DUOTONE_SPACE:$W,GH_COLORS:DW,HOPSCOTCH:PW,LANGUAGE_SELECT_POSITIONER:kW,LANGUAGE_SELECT_WIDTH:EW,POJOAQUE:zW,VS:FW,WRAP:xW,XONOKAI:BW});const HW="remirror-image-loader";var UW=Object.freeze({__proto__:null,IMAGE_LOADER:HW});const WW="remirror-list-item-with-custom-mark",VW="remirror-ul-list-content",jW="remirror-editor",GW="remirror-list-item-marker-container",KW="remirror-list-item-checkbox",YW="remirror-collapsible-list-item-closed",XW="remirror-collapsible-list-item-button",qW="remirror-list-spine";var js=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:XW,COLLAPSIBLE_LIST_ITEM_CLOSED:YW,EDITOR:jW,LIST_ITEM_CHECKBOX:KW,LIST_ITEM_MARKER_CONTAINER:GW,LIST_ITEM_WITH_CUSTOM_MARKER:WW,LIST_SPINE:qW,UL_LIST_CONTENT:VW});const ZW="remirror-is-empty";var QW=Object.freeze({__proto__:null,IS_EMPTY:ZW});const JW="remirror-editor",eV="remirror-positioner",tV="remirror-positioner-widget";var nV=Object.freeze({__proto__:null,EDITOR:JW,POSITIONER:eV,POSITIONER_WIDGET:tV});const rV="remirror-theme";function oV(t={}){const e=[],n={};function r(o,i){if(typeof i=="string"||typeof i=="number"){e.push(`${BC(o)}: ${i};`),n[BC(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,l]of Object.entries(i))r([...o,s],l)}for(const[o,i]of Object.entries(t))r([o],i);return{css:e.join(` -`),styles:n}}function iV(t){return t.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function BC(t){return`--rmr-${t.map(iV).join("-")}`}const Mo={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"]},Ni="#000000",ow="#ffffff",sV="#252103",iw=ng(Ni,.75),Em="#7963d2",sw="#bcd263",aV="#fff",lV="#fff",aw=Mo.gray[1],HC="rgba(10,31,68,0.08)",UC="rgba(10,31,68,0.10)",WC="rgba(10,31,68,0.12)",cV=hp(ng(Ni,.1),.13),lw={background:ow,border:iw,foreground:Ni,muted:aw,primary:Em,secondary:sw,primaryText:aV,secondaryText:lV,text:sV,faded:cV},uV={...lw,background:zr(ow,.15),border:zr(iw,.15),foreground:zr(Ni,.15),muted:zr(aw,.15),primary:zr(Em,.15),secondary:zr(sw,.15),get text(){return bc(this.background)},get primaryText(){return bc(this.primary)},get secondaryText(){return bc(this.secondary)}},dV={...lw,background:zr(ow,.075),border:zr(iw,.075),foreground:zr(Ni,.075),muted:zr(aw,.075),primary:zr(Em,.075),secondary:zr(sw,.075),get text(){return bc(this.background)},get primaryText(){return bc(this.primary)},get secondaryText(){return bc(this.secondary)}},ga={color:{...lw,active:uV,hover:dV,shadow1:HC,shadow2:UC,shadow3:WC,backdrop:ng(Ni,.1),outline:ng(Em,.6),table:{default:{border:hp(Ni,.8),cell:hp(Ni,.4),controller:Mo.gray[3]},selected:{border:Mo.blue[7],cell:Mo.blue[1],controller:Mo.blue[5]},preselect:{border:Mo.blue[7],cell:hp(Ni,.4),controller:Mo.blue[5]},predelete:{border:Mo.red[7],cell:Mo.red[1],controller:Mo.red[5]},mark:"#91919196"}},hue:Mo,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 ${HC}`,2:`0 1px 1px ${UC}`,3:`0 1px 1px ${WC}`}};var hV=Object.defineProperty,fV=Object.getOwnPropertyDescriptor,Yi=(t,e,n,r)=>{for(var o=r>1?void 0:r?fV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&hV(e,n,o),o},zM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ns=(t,e,n)=>(zM(t,e,"read from private field"),n?n.call(t):e.get(t)),d1=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},h1=(t,e,n,r)=>(zM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),FM="data-code-block-language";function BM(t,e,n=[]){return t.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&e&&o.push(e),r.type==="element"?BM(r.children,e,o):{text:r.value,classes:o}})}function pV(t,e){var n;const{node:r,pos:o}=t,i=rg({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),s=nw.highlight(r.textContent??"",i),l=BM(s,e);let a=o+1;function u(c){const d=a,h=d+c.text.length;return a=h,{...c,from:d,to:h}}return cR(l).map(u)}function VC(t){const{blocks:e,skipLast:n,plainTextClassName:r}=t,o=[];for(const i of e){const s=pV(i,r),l=n?s.length-1:s.length;for(const a of fb(l)){const u=s[a],c=u==null?void 0:u.classes;if(!u||!(c!=null&&c.length))continue;const d=kt.inline(u.from,u.to,{class:c.join(" ")});o.push(d)}}return o}function gV(t){return!!(t&&Dn(t)&&ke(t.language)&&t.language.length>0)}function mV(t){return e=>({state:{tr:n,selection:r},dispatch:o})=>{if(!gV(e))throw new Error("Invalid attrs passed to the updateAttributes method");const i=hi({types:t,selection:r});return!i||lR(e,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,t,{...i.node.attrs,...e}),o&&o(n),!0)}}function rg(t){const{language:e,fallback:n}=t;if(!e)return n;const r=nw.listLanguages();for(const o of r)if(o.toLowerCase()===e.toLowerCase())return o;return n}function vV(t,e){const{language:n,wrap:r}=gm(t.attrs,e),{style:o,...i}=e.dom(t);let s=i.style;return r&&(s=pF({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Pc(i.class,`language-${n}`)},["code",{[FM]:n,style:s},0]]}function yV(t){return({pos:e}=be())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:s}=t,{from:l,to:a}=e?{from:e,to:e}:n.selection,u=hi({types:o,selection:n.selection});if(!u)return!1;const{node:{attrs:c,textContent:d},start:h}=u,f=l-h,p=a-h,g=rg({language:c.language,fallback:s}),m=i({source:d,language:g,cursorOffset:f});let v;if(f!==p&&(v=i({source:d,language:g,cursorOffset:p})),!m)return!1;const{cursorOffset:y,formatted:b}=m;if(b===d)return!1;const w=h+d.length;n.insertText(b,h,w);const k=h+y,x=v?h+v.cursorOffset:void 0;return n.setSelection(Ie.between(n.doc.resolve(k),n.doc.resolve(x??k))),r&&r(n),!0}}function bV(t){var e;return(e=t.getAttribute(FM)??t.classList[0])==null?void 0:e.replace("language-","")}var{DESCRIPTION:wV,LABEL:xV}=t5,kV={icon:"bracesLine",description:({t})=>t(wV),label:({t})=>t(xV)},ba,Qu,Ju,EV=class{constructor(t,e){d1(this,ba,void 0),d1(this,Qu,void 0),d1(this,Ju,!1),h1(this,Qu,t),h1(this,ba,e)}init(t){const e=AF({node:t.doc,type:ns(this,Qu)});return this.refreshDecorationSet(t.doc,e),this}refreshDecorationSet(t,e){const n=VC({blocks:e,skipLast:ns(this,Ju),defaultLanguage:ns(this,ba).options.defaultLanguage,plainTextClassName:ns(this,ba).options.plainTextClassName??void 0});this.decorationSet=je.create(t,n)}apply(t,e){if(!t.docChanged)return this;this.decorationSet=this.decorationSet.map(t.mapping,t.doc);const n=_F(t,{descend:!0,predicate:r=>r.type===ns(this,Qu),StepTypes:[]});return this.updateDecorationSet(t,n),this}updateDecorationSet(t,e){if(e.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of e)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(t.doc,VC({blocks:e,skipLast:ns(this,Ju),defaultLanguage:ns(this,ba).options.defaultLanguage,plainTextClassName:ns(this,ba).options.plainTextClassName??void 0}))}setDeleted(t){h1(this,Ju,t)}};ba=new WeakMap;Qu=new WeakMap;Ju=new WeakMap;var mo=class extends Pn{get name(){return"codeBlock"}createTags(){return[Ee.Block,Ee.Code]}init(){this.registerLanguages()}createNodeSpec(t,e){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...e,code:!0,attrs:{...t.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!zt(r))return!1;const s=r.querySelector("pre.code");if(!zt(s))return!1;const l=Xo(s,"white-space")==="pre-wrap",a=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...t.parse(r),language:a,wrap:l}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!zt(r))return!1;const o=r.querySelector("code");if(!zt(o))return!1;const i=Xo(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,r);return{...t.parse(r),language:s,wrap:i}}},...e.parseDOM??[]],toDOM:r=>vV(r,t)}}createAttributes(){return{class:B0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const t=/^```([\dA-Za-z]*) $/,e=n=>({language:rg({language:yc(n,1),fallback:this.options.defaultLanguage})});return[G2({regexp:t,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Ie.near(o))},getAttributes:e})]}onSetOptions(t){const{changes:e}=t;e.supportedLanguages.changed&&this.registerLanguages(),e.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const t=new EV(this.type,this),e=()=>(t.setDeleted(!0),!1);return{state:{init(n,r){return t.init(r)},apply(n,r,o,i){return t.apply(n,i)}},props:{handleKeyDown:Pb({Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e}),decorations(){return t.setDeleted(!1),t.decorationSet}}}}toggleCodeBlock(t={}){return $b({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...t}})}createCodeBlock(t){return Gd(this.type,t)}updateCodeBlock(t){return mV(this.type)(t)}formatCodeBlock(t){return yV({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(t)}tabKey({state:t,dispatch:e}){const{selection:n,tr:r,schema:o}=t,{node:i}=Bz(n);if(!dm({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:s,to:l}=n;r.replaceWith(s,l,o.text(" "))}return e&&e(r),!0}backspaceKey({dispatch:t,tr:e,state:n}){if(!e.selection.empty)return!1;const r=hi({types:this.type,selection:e.selection});if((r==null?void 0:r.start)!==e.selection.from)return!1;const{pos:o,node:i,start:s}=r,l=Ot(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?e.doc.lastChild===i&&e.doc.firstChild===i?zz({pos:o,tr:e,content:l.create()}):Pz({pos:o,tr:e}):s>2?e.setSelection(Ie.near(e.doc.resolve(s-2))):(e.insert(0,l.create()),e.setSelection(Ie.near(e.doc.resolve(1)))),t&&t(e),!0}enterKey({dispatch:t,tr:e}){if(!(Js(e.selection)&&e.selection.empty))return!1;const{nodeBefore:n,parent:r}=e.selection.$anchor;if(!(n!=null&&n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=n,{textContent:l}=r;if(!i)return!1;const a=i.match(o),u=l.match(o);if(!a||!u)return!1;const[,c]=a,d=rg({language:c,fallback:this.options.defaultLanguage}),h=e.selection.$from.before(),f=h+s+1;return e.replaceWith(h,f,this.type.create({language:d})),e.setSelection(Ie.near(e.doc.resolve(h+1))),t&&t(e),!0}formatShortcut({tr:t}){const e=this.store.commands;if(!I2({type:this.type,state:t}))return!1;const n=e.formatCodeBlock.isEnabled();return n&&e.formatCodeBlock(),n}registerLanguages(){for(const t of this.options.supportedLanguages)nw.register(t)}};Yi([de(kV)],mo.prototype,"toggleCodeBlock",1);Yi([de()],mo.prototype,"createCodeBlock",1);Yi([de()],mo.prototype,"updateCodeBlock",1);Yi([de()],mo.prototype,"formatCodeBlock",1);Yi([nn({shortcut:"Tab"})],mo.prototype,"tabKey",1);Yi([nn({shortcut:"Backspace"})],mo.prototype,"backspaceKey",1);Yi([nn({shortcut:"Enter"})],mo.prototype,"enterKey",1);Yi([nn({shortcut:oe.Format})],mo.prototype,"formatShortcut",1);mo=Yi([Pe({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:t})=>({cursorOffset:0,formatted:t}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:bV},staticKeys:["getLanguageFromDom"]})],mo);var SV=Object.defineProperty,CV=Object.getOwnPropertyDescriptor,cw=(t,e,n,r)=>{for(var o=r>1?void 0:r?CV(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&SV(e,n,o),o},HM=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},sn=(t,e,n)=>(HM(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},rs=(t,e,n,r)=>(HM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ed,td,ql,nd,fp,rd,od,id,sd,pp=class{constructor(t){ki(this,ed,vm()),ki(this,td,[]),ki(this,ql,new Map),ki(this,nd,[]),ki(this,fp,!1),ki(this,rd,void 0),ki(this,od,void 0),ki(this,id,void 0),ki(this,sd,void 0),this.addListener=(e,n)=>sn(this,ed).on(e,n),rs(this,rd,t),rs(this,od,t.getActive),rs(this,sd,t.getPosition),rs(this,id,t.getID),this.hasChanged=t.hasChanged,this.events=t.events??["state","scroll"]}static create(t){return new pp(t)}static fromPositioner(t,e){return pp.create({...t.basePositioner,...e})}get basePositioner(){return{getActive:sn(this,od),getPosition:sn(this,sd),hasChanged:this.hasChanged,events:this.events,getID:sn(this,id)}}onActiveChanged(t){this.recentUpdate=t;const e=sn(this,od).call(this,t);rs(this,td,e),rs(this,ql,new Map),rs(this,fp,!1),rs(this,nd,[]);const n=[];for(const[r,o]of e.entries()){const i=this.getID(o,r);sn(this,nd).push(i),n.push({setElement:s=>this.addProps({...t,data:o,element:s},r),id:i,data:o})}sn(this,ed).emit("update",n)}getID(t,e){var n;return((n=sn(this,id))==null?void 0:n.call(this,t,e))??e.toString()}addProps(t,e){if(sn(this,fp)||(sn(this,ql).set(e,t),sn(this,ql).sizet;return this.clone(n=>({getActive:r=>n.getActive(r).filter(e)}))}},Vr=pp;ed=new WeakMap;td=new WeakMap;ql=new WeakMap;nd=new WeakMap;fp=new WeakMap;rd=new WeakMap;od=new WeakMap;id=new WeakMap;sd=new WeakMap;Vr.EMPTY=[];function TV(t,e=WM){const{key:n}=(t==null?void 0:t.getMeta(UM))??{};return n===e}function uw(t){const{tr:e,state:n,previousState:r}=t;return!r||e&&TV(e)?!0:e?Uz(e):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function dw(t,e,n={}){const r=e.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,s=0,l=0,a=0;if(zt(e)&&o){const c=Number.parseFloat(Xo(e,"padding-left").replace("px","")),d=Number.parseFloat(Xo(e,"padding-right").replace("px","")),h=Number.parseFloat(Xo(e,"padding-top").replace("px","")),f=Number.parseFloat(Xo(e,"padding-bottom").replace("px","")),p=Number.parseFloat(Xo(e,"border-left").replace("px","")),g=Number.parseFloat(Xo(e,"border-right").replace("px","")),m=Number.parseFloat(Xo(e,"border-top").replace("px","")),v=Number.parseFloat(Xo(e,"border-bottom").replace("px","")),y=e.offsetWidth-e.clientWidth,b=e.offsetHeight-e.clientHeight;i+=c+p+(e.dir==="rtl"?y:0),s+=d+g+(e.dir==="rtl"?0:y),l+=h+m,a+=f+v+b}const u=new DOMRect(r.left+i,r.top+l,r.width-s,r.height-a);for(const[c,d]of[[t.top,t.left],[t.top,t.right],[t.bottom,t.left],[t.bottom,t.right]])if(rS(c,u.top,u.bottom)&&rS(d,u.left,u.right))return!0;return!1}var AV="remirror-positioner-widget",UM="positionerUpdate",WM="__all_positioners__",VM={y:-999999,x:-999999,width:0,height:0},jC={...VM,left:-999999,top:-999999,bottom:-999999,right:-999999},Sm={...VM,rect:{...jC,toJSON:()=>jC},visible:!1},jM=Vr.create({hasChanged:uw,getActive(t){const{state:e}=t;if(!Ob(e)||e.selection.$anchor.depth>2)return Vr.EMPTY;const n=Hh({predicate:r=>r.type.isBlock,selection:e});return n?[n]:Vr.EMPTY},getPosition(t){const{view:e,data:n}=t,r=e.nodeDOM(n.pos);if(!zt(r))return Sm;const o=r.getBoundingClientRect(),i=e.dom.getBoundingClientRect(),s=o.height,l=o.width,a=e.dom.scrollLeft+o.left-i.left,u=e.dom.scrollTop+o.top-i.top,c=dw(o,e.dom);return{y:u,x:a,height:s,width:l,rect:o,visible:c}}}),hw=jM.clone(({getActive:t})=>({getActive:e=>{const[n]=t(e);return n&&fm(n.node)&&n.node.type===hm(e.state.schema)?[n]:Vr.EMPTY}})),_V=hw.clone(({getPosition:t})=>({getPosition:e=>({...t(e),width:1})})),RV=hw.clone(({getPosition:t})=>({getPosition:e=>{const{width:n,x:r,y:o,height:i}=t(e);return{...t(e),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function fw(t){return Vr.create({hasChanged:uw,getActive:e=>{const{state:n,view:r}=e;if(!t(n)||!Js(n.selection))return Vr.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Vr.EMPTY}},getPosition(e){const{element:n,data:r,view:o}=e,{from:i,to:s}=r,l=n.offsetParent??o.dom,a=l.getBoundingClientRect(),u=Math.abs(s.bottom-i.top),c=u>i.bottom-i.top,d=Math.min(i.left,s.left),h=Math.min(i.top,s.top),f=l.scrollLeft+(c?s.left-a.left:d-a.left),p=l.scrollTop+h-a.top,g=c?1:Math.abs(i.left-s.right),m=new DOMRect(c?s.left:d,h,g,u),v=dw(m,o.dom);return{rect:m,y:p,x:f,height:u,width:g,visible:v}}})}var GM=fw(t=>!t.selection.empty),MV=fw(t=>t.selection.empty),OV=fw(()=>!0),IV=GM.clone(()=>({getActive:t=>{const{state:e,view:n}=t;if(!e.selection.empty)return Vr.EMPTY;const r=z2(e);if(!r)return Vr.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Vr.EMPTY}}})),LV={selection:GM,cursor:MV,always:OV,block:jM,emptyBlock:hw,emptyBlockStart:_V,emptyBlockEnd:RV,nearestWord:IV},Fc=class extends yt{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:t})=>{if(t)return this.positioners=[...this.positioners,t],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(e=>e!==t)}}}get name(){return"positioner"}createAttributes(){return{class:nV.EDITOR}}init(){this.onScroll=rR(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(t,e)=>(this.positioner(this.getBaseProps("hover",{hover:e})),!1),contextmenu:(t,e)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:e})),!1)}}onStateUpdate(t){this.positioner({...t,previousState:t.firstUpdate?void 0:t.previousState,event:"state",helpers:this.store.helpers})}createDecorations(t){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return je.empty;const e=kt.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return je.create(t.doc,[e])}forceUpdatePositioners(t=WM){return({tr:e,dispatch:n})=>(n==null||n(e.setMeta(UM,{key:t})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const t=document.createElement("span");return t.dataset.id=AV,t.setAttribute("role","presentation"),t}triggerPositioner(t,e){t.hasChanged(e)&&t.onActiveChanged({...e,view:this.store.view})}positioner(t){for(const e of this.positioners)e.events.includes(t.event)&&this.triggerPositioner(e,t)}getBaseProps(t,e){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:t,firstUpdate:!1,previousState:r,state:n,...e}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};cw([de()],Fc.prototype,"forceUpdatePositioners",1);cw([bt()],Fc.prototype,"getPositionerWidget",1);Fc=cw([Pe({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Fc);function H0(t){return ke(t)?LV[t].clone():tt(t)?t().clone():t.clone()}function NV(t){const e=P.createContext(null),n=$V(e);return[o=>{const i=t(o);return ee.createElement(e.Provider,{value:i},o.children)},n,e]}function $V(t){return(e,n)=>{const r=P.useContext(t),o=DV(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="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=e(r);if(!o||!n)return i;const s=e(o);return n(s,i)?s:i}}function DV(t){const e=P.useRef();return PV(()=>{e.current=t}),e.current}var PV=typeof document<"u"?P.useLayoutEffect:P.useEffect;function zV(t,e){return NV(n=>{const r=P.useRef(null),o=P.useRef(),i=e==null?void 0:e(n),[s,l]=P.useState(()=>t({get:GC(r),set:KC(o),previousContext:void 0,props:n,state:i})),a=[...Object.values(n),i];return P.useEffect(()=>{a.length!==0&&l(u=>t({get:GC(r),set:KC(o),previousContext:u,props:n,state:i}))},a),r.current=s,o.current=l,s})}function GC(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="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 e(t.current)}}function KC(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>({...n,...typeof e=="function"?e(n):e}))}}var KM={},YM={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(YM);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=YM;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,g){const m=n(f);if(Number.isNaN(m)||g!==void 0&&g!==f.length)throw new SyntaxError(e.errorMessages.get(p));return m}function o(f){const p=r(f,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const g=r(f,e.ErrorType.MalformedUnicode,4);if(p!==void 0){const m=r(p,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,m)}return String.fromCharCode(g)}function s(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function l(f){if(!s(f))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const p=f.slice(1,-1),g=r(p,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(m){throw m instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):m}}function a(f,p=!1){if(p)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const g=parseInt(f,8);return String.fromCharCode(g)}const u=new Map([["b","\b"],["f","\f"],["n",` -`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function c(f){return u.get(f)||f}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 h(f,p=!1){return f.replace(d,function(g,m,v,y,b,w,k,x,S){if(m!==void 0)return"\\";if(v!==void 0)return o(v);if(y!==void 0)return l(y);if(b!==void 0)return i(b,w);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return a(x,!p);if(S!==void 0)return c(S);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(KM);const FV=jo(KM),$i=t=>typeof t=="string",BV=t=>typeof t=="function",YC=new Map;function pw(t){return[...Array.isArray(t)?t:[t],"en"]}function XM(t,e,n){const r=pw(t);return og(()=>ig("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format($i(e)?new Date(e):e)}function U0(t,e,n){const r=pw(t);return og(()=>ig("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function XC(t,e,n,{offset:r=0,...o}){const i=pw(t),s=e?og(()=>ig("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):og(()=>ig("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[s.select(n-r)]??o.other}function og(t,e){const n=t();let r=YC.get(n);return r||(r=e(),YC.set(n,r)),r}function ig(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const qM=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,HV=(t,e,n={})=>{e=e||t;const r=i=>$i(i)?n[i]||{style:i}:i,o=(i,s)=>{const l=Object.keys(n).length?r("number"):{},a=U0(e,i,l);return s.replace("#",a)};return{plural:(i,s)=>{const{offset:l=0}=s,a=XC(e,!1,i,s);return o(i-l,a)},selectordinal:(i,s)=>{const{offset:l=0}=s,a=XC(e,!0,i,s);return o(i-l,a)},select:(i,s)=>s[i]??s.other,number:(i,s)=>U0(e,i,r(s)),date:(i,s)=>XM(e,i,r(s)),undefined:i=>i}};function UV(t,e,n){return(r,o={})=>{const i=HV(e,n,o),s=a=>Array.isArray(a)?a.reduce((u,c)=>{if($i(c))return u+c;const[d,h,f]=c;let p={};f!=null&&!$i(f)?Object.keys(f).forEach(m=>{p[m]=s(f[m])}):p=f;const g=i[h](r[d],p);return g==null?u:u+g},""):a,l=s(t);return $i(l)&&qM.test(l)?FV(l.trim()):$i(l)?l.trim():l}}var WV=Object.defineProperty,VV=(t,e,n)=>e in t?WV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jV=(t,e,n)=>(VV(t,typeof e!="symbol"?e+"":e,n),n);class GV{constructor(){jV(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var KV=Object.defineProperty,YV=(t,e,n)=>e in t?KV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dl=(t,e,n)=>(YV(t,typeof e!="symbol"?e+"":e,n),n);class XV extends GV{constructor(e){super(),Dl(this,"_locale"),Dl(this,"_locales"),Dl(this,"_localeData"),Dl(this,"_messages"),Dl(this,"_missing"),Dl(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.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(e,n){this._localeData[e]==null?this._localeData[e]=n:Object.assign(this._localeData[e],n)}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n={},{message:r,formats:o}={}){$i(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],s=this._missing;if(s&&i)return BV(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||r||e;return $i(l)&&qM.test(l)?JSON.parse(`"${l}"`):$i(l)?l:UV(l,this._locale,this._locales)(n,o)}date(e,n){return XM(this._locales||this._locale,e,n)}number(e,n){return U0(this._locales||this._locale,e,n)}}function qV(t={}){return new XV(t)}const Cm=qV();function se(t,e){return e?"other":t==1?"one":"other"}function Xi(t,e){return e?"other":t==0||t==1?"one":"other"}function Mr(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function at(t,e){return"other"}function na(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const ZV=at,QV=se,JV=Xi;function ej(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const tj=se;function nj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function rj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function oj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const ij=se,sj=Mr;function aj(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),s=r.slice(-3);return e?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":r==0||o==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function lj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const cj=se,uj=se,dj=se,hj=Xi,fj=at;function pj(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const gj=at;function mj(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[0].slice(-6);return e?"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":t!=0&&r&&s==0?"many":"other"}const vj=se;function yj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function bj(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const wj=se;function xj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const kj=se,Ej=se,Sj=se;function Cj(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function Tj(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Aj(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t;return e?"other":t==1||!o&&(r==0||r==1)?"one":"other"}const _j=Mr;function Rj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}const Mj=se,Oj=at,Ij=se,Lj=se;function Nj(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":t==1&&r?"one":"other"}const $j=se,Dj=se,Pj=Mr,zj=se;function Fj(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function Bj(t,e){return e?"other":t>=0&&t<2?"one":"other"}const Hj=Mr;function Uj(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Wj=se;function Vj(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const jj=se,Gj=Mr;function Kj(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Yj(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const Xj=Mr,qj=se;function Zj(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Qj=Xi;function Jj(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"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 eG=se,tG=se;function nG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}function rG(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function oG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function iG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return e?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}function sG(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function aG(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const lG=Mr,cG=at,uG=at,dG=at,hG=Mr;function fG(t,e){var n=String(t).split("."),r=n[0],o=Number(n[0])==t,i=r.slice(-1),s=r.slice(-2);return e?"other":o&&i==1&&s!=11||!o?"one":"other"}function pG(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const gG=na;function mG(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1);return e?"other":t==1&&o?"one":r==2&&o?"two":o&&(t<0||t>10)&&i&&s==0?"many":"other"}const vG=at,yG=at,bG=se,wG=Mr,xG=se,kG=at,EG=at;function SG(t,e){var n=String(t).split("."),r=n[0],o=r.slice(-2);return e?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":t==1?"one":"other"}function CG(t,e){return e?"other":t>=0&&t<2?"one":"other"}const TG=se,AG=se,_G=at,RG=at;function MG(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||r&&o==0&&t!=0?"many":"other":t==1?"one":"other"}const OG=se,IG=se,LG=at;function NG(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const $G=at,DG=se,PG=se;function zG(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const FG=se;function BG(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),l=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":t==5||o==5?"many":"other":t==0?"zero":t==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||t!=0&&l==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":t!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const HG=se;function UG(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const WG=se,VG=se,jG=at,GG=Xi;function KG(t,e){return e&&t==1?"one":"other"}function YG(t,e){var n=String(t).split("."),r=n[1]||"",o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":r!=0?"many":"other"}function XG(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const qG=se,ZG=Xi,QG=se;function JG(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?s==1&&l!=11?"one":s==2&&l!=12?"two":(s==7||s==8)&&l!=17&&l!=18?"many":"other":i&&s==1&&l!=11||a==1&&u!=11?"one":"other"}const eK=se,tK=se;function nK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function rK(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function oK(t,e){return e&&t==1?"one":"other"}function iK(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const sK=at,aK=se,lK=na,cK=se,uK=se;function dK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const hK=Mr,fK=se,pK=se,gK=se,mK=at,vK=se,yK=Xi,bK=se,wK=se,xK=se;function kK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const EK=se,SK=at,CK=Xi,TK=se;function AK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"other":t==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function _K(t,e){var n=String(t).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return e?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const RK=se;function MK(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const OK=Mr,IK=se;function LK(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const NK=se,$K=at;function DK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return e?"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 PK=se,zK=at,FK=se;function BK(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function HK(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const UK=se,WK=se,VK=na,jK=se,GK=at,KK=at;function YK(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function XK(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function qK(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"";return e?"other":t==0||t==1||r==0&&o==1?"one":"other"}function ZK(t,e){var n=String(t).split("."),r=n[0],o=!n[1];return e?"other":t==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function QK(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=r.slice(-2);return e?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const JK=na,eY=na,tY=na,nY=na,rY=na,oY=se,iY=se;function sY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":o==4&&i!=14?"many":"other":t==1?"one":"other"}function aY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return e?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}const lY=se,cY=se,uY=se,dY=at;function hY(t,e){var n=String(t).split("."),r=!n[1],o=Number(n[0])==t,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return e?(i==1||i==2)&&s!=11&&s!=12?"one":"other":t==1&&r?"one":"other"}const fY=Mr,pY=se,gY=se,mY=se,vY=se,yY=at,bY=Xi,wY=se;function xY(t,e){var n=String(t).split("."),r=Number(n[0])==t,o=r&&n[0].slice(-1);return e?o==6||o==9||t==10?"few":"other":t==1?"one":"other"}function kY(t,e){var n=String(t).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const EY=se,SY=at,CY=se,TY=se;function AY(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const _Y=se;function RY(t,e){var n=String(t).split("."),r=n[0],o=!n[1],i=Number(n[0])==t,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-1),u=r.slice(-2);return e?s==3&&l!=13?"few":"other":o&&a==1&&u!=11?"one":o&&a>=2&&a<=4&&(u<12||u>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&u>=11&&u<=14?"many":"other"}const MY=Mr,OY=se,IY=se;function LY(t,e){return e&&t==1?"one":"other"}const NY=se,$Y=se,DY=Xi,PY=se,zY=at,FY=se,BY=se,HY=Mr,UY=at,WY=at,VY=at;function jY(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const GY=Object.freeze(Object.defineProperty({__proto__:null,_in:ZV,af:QV,ak:JV,am:ej,an:tj,ar:nj,ars:rj,as:oj,asa:ij,ast:sj,az:aj,be:lj,bem:cj,bez:uj,bg:dj,bho:hj,bm:fj,bn:pj,bo:gj,br:mj,brx:vj,bs:yj,ca:bj,ce:wj,ceb:xj,cgg:kj,chr:Ej,ckb:Sj,cs:Cj,cy:Tj,da:Aj,de:_j,dsb:Rj,dv:Mj,dz:Oj,ee:Ij,el:Lj,en:Nj,eo:$j,es:Dj,et:Pj,eu:zj,fa:Fj,ff:Bj,fi:Hj,fil:Uj,fo:Wj,fr:Vj,fur:jj,fy:Gj,ga:Kj,gd:Yj,gl:Xj,gsw:qj,gu:Zj,guw:Qj,gv:Jj,ha:eG,haw:tG,he:nG,hi:rG,hr:oG,hsb:iG,hu:sG,hy:aG,ia:lG,id:cG,ig:uG,ii:dG,io:hG,is:fG,it:pG,iu:gG,iw:mG,ja:vG,jbo:yG,jgo:bG,ji:wG,jmc:xG,jv:kG,jw:EG,ka:SG,kab:CG,kaj:TG,kcg:AG,kde:_G,kea:RG,kk:MG,kkj:OG,kl:IG,km:LG,kn:NG,ko:$G,ks:DG,ksb:PG,ksh:zG,ku:FG,kw:BG,ky:HG,lag:UG,lb:WG,lg:VG,lkt:jG,ln:GG,lo:KG,lt:YG,lv:XG,mas:qG,mg:ZG,mgo:QG,mk:JG,ml:eK,mn:tK,mo:nK,mr:rK,ms:oK,mt:iK,my:sK,nah:aK,naq:lK,nb:cK,nd:uK,ne:dK,nl:hK,nn:fK,nnh:pK,no:gK,nqo:mK,nr:vK,nso:yK,ny:bK,nyn:wK,om:xK,or:kK,os:EK,osa:SK,pa:CK,pap:TK,pl:AK,prg:_K,ps:RK,pt:MK,pt_PT:OK,rm:IK,ro:LK,rof:NK,root:$K,ru:DK,rwk:PK,sah:zK,saq:FK,sc:BK,scn:HK,sd:UK,sdh:WK,se:VK,seh:jK,ses:GK,sg:KK,sh:YK,shi:XK,si:qK,sk:ZK,sl:QK,sma:JK,smi:eY,smj:tY,smn:nY,sms:rY,sn:oY,so:iY,sq:sY,sr:aY,ss:lY,ssy:cY,st:uY,su:dY,sv:hY,sw:fY,syr:pY,ta:gY,te:mY,teo:vY,th:yY,ti:bY,tig:wY,tk:xY,tl:kY,tn:EY,to:SY,tr:CY,ts:TY,tzm:AY,ug:_Y,uk:RY,ur:MY,uz:OY,ve:IY,vi:LY,vo:NY,vun:$Y,wa:DY,wae:PY,wo:zY,xh:FY,xog:BY,yi:HY,yo:UY,yue:WY,zh:VY,zu:jY},Symbol.toStringTag,{value:"Module"}));var KY=Object.defineProperty,YY=Object.getOwnPropertyDescriptor,XY=Object.getOwnPropertyNames,qY=Object.prototype.hasOwnProperty,qC=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of XY(e))!qY.call(t,o)&&o!==n&&KY(t,o,{get:()=>e[o],enumerable:!(r=YY(e,o))||r.enumerable});return t},ZY=(t,e,n)=>(qC(t,e,"default"),n&&qC(n,e,"default")),QY=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"]]}'),ZM={};ZY(ZM,GY);Cm.loadLocaleData("en",{plurals:ZM.en});Cm.load("en",QY);Cm.activate("en");var JY=Object.defineProperty,eX=Object.getOwnPropertyDescriptor,gw=(t,e,n,r)=>{for(var o=r>1?void 0:r?eX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&JY(e,n,o),o},Bc=class extends Pn{get name(){return"doc"}createNodeSpec(t,e){const{docAttributes:n,content:r}=this.options,o=be();if(Zs(n))for(const[i,s]of cn(n))o[i]={default:s};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...e}}setDocAttributes(t){return({tr:e,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(t))e.step(new qd(r,o));n(e)}return!0}}isDefaultDocNode({state:t=this.store.getState(),options:e}={}){return Nb(t.doc,e)}};gw([de()],Bc.prototype,"setDocAttributes",1);gw([bt()],Bc.prototype,"isDefaultDocNode",1);Bc=gw([Pe({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:dt.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Bc);var QM="SetDocAttribute",JM="RevertSetDocAttribute",qd=class extends dn{constructor(t,e,n=QM){super(),this.stepType=n,this.key=t,this.value=e}static fromJSON(t,e){return new qd(e.key,e.value,e.stepType)}apply(t){this.previous=t.attrs[this.key];const e={...t.attrs,[this.key]:this.value};return Xt.ok(t.type.create(e,t.content,t.marks))}invert(){return new qd(this.key,this.previous,JM)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{dn.jsonID(QM,qd),dn.jsonID(JM,qd)}catch(t){if(!t.message.startsWith("Duplicate use of step JSON ID"))throw t}var tX=Object.defineProperty,nX=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var o=r>1?void 0:r?nX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&tX(e,n,o),o};function rX(t,e,n,r){const o=t.docView.posFromDOM(e,n,r);return o===null||o<0?null:o}function oX(t,e){const n=e.target;if(n){const r=rX(t,n,0);if(r!==null){const o=t.state.doc.resolve(r),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:r,inside:s}}}return t.posAtCoords({left:e.clientX,top:e.clientY})??void 0}var sg=class extends yt{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=t=>(e,n)=>{const r=n,o=oX(e,r);if(!o)return!1;const i=[],s=[],{inside:l,pos:a}=o;if(l===-1)return!1;const u=e.state.doc.resolve(a),c=u.depth+1;for(const d of fb(c,1))i.push({node:d>u.depth&&u.nodeAfter?u.nodeAfter:u.node(d),pos:u.before(d)});for(const{type:d}of u.marksAcross(u)??[]){const h=Hi(u,d);h&&s.push(h)}return t(r,{view:e,nodes:i,marks:s,getMark:d=>{const h=ke(d)?e.state.schema.marks[d]:d;return we(h,{code:re.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(f=>f.mark.type===h)},getNode:d=>{var h;const f=ke(d)?e.state.schema.nodes[d]:d;we(f,{code:re.EXTENSION,message:"The node being checked does not exist"});const p=i.find(({node:g})=>g.type===f);if(p)return{...p,isRoot:!!((h=i[0])!=null&&h.node.eq(p.node))}}})}}get name(){return"events"}onView(){var t,e;if(!((t=this.store.managerSettings.exclude)!=null&&t.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(e=n.options.exclude)!=null&&e.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of cn(r))this.addHandler(o,i)}}createPlugin(){const t=new WeakMap,e=(n,r,o,i,s,l,a,u)=>{const c=this.store.currentState,{schema:d,doc:h}=c,f=h.resolve(i),p=t.has(a),g=iX({$pos:f,handled:p,view:o,state:c});let m=!1;p||(m=n(a,g)||m);const v={...g,pos:i,direct:u,nodeWithPosition:{node:s,pos:l},getNode:y=>{const b=ke(y)?d.nodes[y]:y;return we(b,{code:re.EXTENSION,message:"The node being checked does not exist"}),b===s.type?{node:s,pos:l}:void 0}};return t.set(a,!0),r(a,v)||m};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,s,l)=>e(this.options.clickMark,this.options.click,n,r,o,i,s,l),handleDoubleClickOn:(n,r,o,i,s,l)=>e(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,s,l),handleTripleClickOn:(n,r,o,i,s,l)=>e(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,s,l),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const s=i.editable;s!==r&&(o.editable(s),r=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())}};eO([bt()],sg.prototype,"isInteracting",1);sg=eO([Pe({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:dt.High})],sg);function iX(t){const{handled:e,view:n,$pos:r,state:o}=t,i={getMark:uR,markRanges:[],view:n,state:o};if(e)return i;for(const{type:s}of r.marksAcross(r)??[]){const l=Hi(r,s);l&&i.markRanges.push(l)}return i.getMark=s=>{const l=ke(s)?o.schema.marks[s]:s;return we(l,{code:re.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(a=>a.mark.type===l)},i}class Gt extends Ue{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Gt.valid(r)?new Gt(r):Ue.near(r)}content(){return ae.empty}eq(e){return e instanceof Gt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Gt(e.resolve(n.pos))}getBookmark(){return new mw(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!sX(e)||!aX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Gt.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let a=e.doc.resolve(o);if(Gt.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(Gt.valid(l))return l}return null}}}Gt.prototype.visible=!1;Gt.findFrom=Gt.findGapCursorFrom;Ue.jsonID("gapcursor",Gt);class mw{constructor(e){this.pos=e}map(e){return new mw(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Gt.valid(n)?new Gt(n):Ue.near(n)}}function sX(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function aX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function lX(){return new gi({props:{decorations:hX,createSelectionBetween(t,e,n){return e.pos==n.pos&&Gt.valid(n)?new Gt(n):null},handleClick:uX,handleKeyDown:cX,handleDOMEvents:{beforeinput:dX}}})}const cX=Pb({ArrowLeft:_f("horiz",-1),ArrowRight:_f("horiz",1),ArrowUp:_f("vert",-1),ArrowDown:_f("vert",1)});function _f(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof Ie){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let u=Gt.findGapCursorFrom(l,e,a);return u?(o&&o(r.tr.setSelection(new Gt(u))),!0):!1}}function uX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Gt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0)}function dX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Gt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Q.empty;for(let s=r.length-1;s>=0;s--)o=Q.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new ae(o,0,0));return i.setSelection(Ie.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function hX(t){if(!(t.selection instanceof Gt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",je.create(t.doc,[kt.widget(t.selection.head,e,{key:"gapcursor"})])}var fX=Object.defineProperty,pX=Object.getOwnPropertyDescriptor,gX=(t,e,n,r)=>{for(var o=r>1?void 0:r?pX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fX(e,n,o),o},W0=class extends yt{get name(){return"gapCursor"}createExternalPlugins(){return[lX()]}};W0=gX([Pe({})],W0);var ag=200,wn=function(){};wn.prototype.append=function(e){return e.length?(e=wn.from(e),!this.length&&e||e.length=n?wn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};wn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};wn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};wn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};wn.from=function(e){return e instanceof wn?e:e&&e.length?new tO(e):wn.empty};var tO=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=ag)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=ag)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(wn);wn.empty=new tO([]);var mX=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(wn);const vX=500;class Do{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,a,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new qo(d.map));let f=d.step.map(o.slice(i)),p;f&&s.maybeStep(f).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],u.push(new qo(p,void 0,void 0,u.length+c.length))),i--,p&&o.appendMap(p,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new Do(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;cbX&&(l=yX(l,u),s-=u),new Do(l.append(i),s)}remapping(e,n){let r=new pc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Do(this.items.append(e.map(n=>new qo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let a=n;this.items.forEach(h=>{let f=i.getMirror(--a);if(f==null)return;s=Math.min(s,f);let p=i.maps[f];if(h.step){let g=e.steps[f].invert(e.docs[f]),m=h.selection&&h.selection.map(i.slice(a+1,f));m&&l++,r.push(new qo(p,g,m))}else r.push(new qo(p))},o);let u=[];for(let h=n;hvX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new qo(u.invert(),a,c),h,f=o.length-1;(h=o.length&&o[f].merge(d))?o[f]=h:o.push(d)}}else s.map&&r--},this.items.length,0),new Do(wn.from(o.reverse()),i)}}Do.empty=new Do(wn.empty,0);function yX(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qo(n.getMap().invert(),n,this.selection)}}}class ps{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const bX=20;function wX(t,e,n,r){let o=n.getMeta(ii),i;if(o)return o.historyState;n.getMeta(kX)&&(t=new ps(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ii))return s.getMeta(ii).redo?new ps(t.done.addTransform(n,void 0,r,gp(e)),t.undone,ZC(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new ps(t.done,t.undone.addTransform(n,void 0,r,gp(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!xX(n,t.prevRanges)),u=s?f1(t.prevRanges,n.mapping):ZC(n.mapping.maps[n.steps.length-1]);return new ps(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,gp(e)),Do.empty,u,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ps(t.done.rebased(n,i),t.undone.rebased(n,i),f1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ps(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),f1(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function xX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=e[i]&&(n=!0)}),n}function ZC(t){let e=[];return t.forEach((n,r,o,i)=>e.push(o,i)),e}function f1(t,e){if(!t)return null;let n=[];for(let r=0;r{let n=ii.getState(t);return!n||n.done.eventCount==0?!1:(e&&nO(n,t,e,!1),!0)},ad=(t,e)=>{let n=ii.getState(t);return!n||n.undone.eventCount==0?!1:(e&&nO(n,t,e,!0),!0)};function V0(t){let e=ii.getState(t);return e?e.done.eventCount:0}function SX(t){let e=ii.getState(t);return e?e.undone.eventCount:0}var CX=Object.defineProperty,TX=Object.getOwnPropertyDescriptor,bl=(t,e,n,r)=>{for(var o=r>1?void 0:r?TX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&CX(e,n,o),o},fi=class extends yt{constructor(){super(...arguments),this.wrapMethod=(t,e)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:s}=this.options,l=tt(i)?i():n,a=tt(s)&&r?s():r,u=t(l,a,o);return e==null||e(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":Br.isMac?()=>!1:this.wrapMethod(ad,this.options.onRedo),"Mod-z":this.wrapMethod(mp,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(ad,this.options.onRedo)}}undoShortcut(t){return this.wrapMethod(mp,this.options.onUndo)(t)}redoShortcut(t){return this.wrapMethod(ad,this.options.onRedo)(t)}createExternalPlugins(){const{depth:t,newGroupDelay:e}=this.options;return[EX({depth:t,newGroupDelay:e})]}undo(){return dC(this.wrapMethod(mp,this.options.onUndo))}redo(){return dC(this.wrapMethod(ad,this.options.onRedo))}undoDepth(t=this.store.getState()){return V0(t)}redoDepth(t=this.store.getState()){return SX(t)}};bl([nn({shortcut:oe.Undo,command:"undo"})],fi.prototype,"undoShortcut",1);bl([nn({shortcut:oe.Redo,command:"redo"})],fi.prototype,"redoShortcut",1);bl([de({disableChaining:!0,description:({t})=>t(jp.UNDO_DESCRIPTION),label:({t})=>t(jp.UNDO_LABEL),icon:"arrowGoBackFill"})],fi.prototype,"undo",1);bl([de({disableChaining:!0,description:({t})=>t(jp.REDO_DESCRIPTION),label:({t})=>t(jp.REDO_LABEL),icon:"arrowGoForwardFill"})],fi.prototype,"redo",1);bl([bt()],fi.prototype,"undoDepth",1);bl([bt()],fi.prototype,"redoDepth",1);fi=bl([Pe({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],fi);var AX=Object.defineProperty,_X=Object.getOwnPropertyDescriptor,Tm=(t,e,n,r)=>{for(var o=r>1?void 0:r?_X(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&AX(e,n,o),o},RX={icon:"paragraph",label:({t})=>t(Gp.INSERT_LABEL),description:({t})=>t(Gp.INSERT_DESCRIPTION)},MX={icon:"paragraph",label:({t})=>t(Gp.CONVERT_LABEL),description:({t})=>t(Gp.CONVERT_DESCRIPTION)},Ja=class extends Pn{get name(){return"paragraph"}createTags(){return[Ee.LastNodeCompatible,Ee.TextBlock,Ee.Block,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Tm([de(MX)],Ja.prototype,"convertParagraph",1);Tm([de(RX)],Ja.prototype,"insertParagraph",1);Tm([nn({shortcut:oe.Paragraph,command:"convertParagraph"})],Ja.prototype,"shortcut",1);Ja=Tm([Pe({defaultPriority:dt.Medium})],Ja);var OX=Object.defineProperty,IX=Object.getOwnPropertyDescriptor,LX=(t,e,n,r)=>{for(var o=r>1?void 0:r?IX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&OX(e,n,o),o},j0=class extends Pn{get name(){return"text"}createTags(){return[Ee.InlineNode]}createNodeSpec(){return{}}};j0=LX([Pe({disableExtraAttributes:!0,defaultPriority:dt.Medium})],j0);var NX={...Bc.defaultOptions,...Ja.defaultOptions,...fi.defaultOptions,excludeExtensions:[]};function $X(t={}){t={...NX,...t};const{content:e,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=t,l={};for(const u of s??[])l[u]=!0;const a=[];if(!l.history){const u=new fi({depth:n,getDispatch:r,getState:o,newGroupDelay:i});a.push(u)}return l.doc||a.push(new Bc({content:e})),l.text||a.push(new j0),l.paragraph||a.push(new Ja),l.positioner||a.push(new Fc),l.gapCursor||a.push(new W0),l.events||a.push(new sg),a}var DX=Object.defineProperty,PX=Object.getOwnPropertyDescriptor,zX=(t,e,n,r)=>{for(var o=r>1?void 0:r?PX(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&DX(e,n,o),o},el=class extends yt{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Nb(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>FX({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>BX({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=mr.EditorView&&this.store.updateAttributes()}};el=zX([Pe({defaultOptions:{emptyNodeClass:QW.IS_EMPTY,placeholder:""}})],el);function FX(t){const{pluginState:e,extension:n,tr:r,state:o}=t;return r.docChanged?{...n.options,empty:Nb(o.doc)}:e}function BX(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=e.options;if(!r)return null;const s=[];return n.doc.descendants((l,a)=>{const u=kt.node(a,a+l.nodeSize,{class:o,"data-placeholder":i});s.push(u)}),je.create(n.doc,s)}var rO={exports:{}},Zr={},oO={exports:{}},iO={};/** + */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof a?new a(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(k){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var w in b)if(b[w].src==y)return b[w]}return null}},isActive:function(y,b,w){for(var k="no-"+b;y;){var x=y.classList;if(x.contains(b))return!0;if(x.contains(k))return!1;y=y.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var w=l.util.clone(l.languages[y]);for(var k in b)w[k]=b[k];return w},insertBefore:function(y,b,w,k){k=k||l.languages;var x=k[y],S={};for(var T in x)if(x.hasOwnProperty(T)){if(T==b)for(var C in w)w.hasOwnProperty(C)&&(S[C]=w[C]);w.hasOwnProperty(T)||(S[T]=x[T])}var I=k[y];return k[y]=S,l.languages.DFS(l.languages,function(_,R){R===I&&_!=y&&(this[_]=S)}),S},DFS:function y(b,w,k,x){x=x||{};var S=l.util.objId;for(var T in b)if(b.hasOwnProperty(T)){w.call(b,T,b[T],k||T);var C=b[T],I=l.util.type(C);I==="Object"&&!x[S(C)]?(x[S(C)]=!0,y(C,w,null,x)):I==="Array"&&!x[S(C)]&&(x[S(C)]=!0,y(C,w,T,x))}}},plugins:{},highlightAll:function(y,b){l.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,w){var k={callback:w,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var x=0,S;S=k.elements[x++];)l.highlightElement(S,b===!0,k.callback)},highlightElement:function(y,b,w){var k=l.util.getLanguage(y),x=l.languages[k];l.util.setLanguage(y,k);var S=y.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var T=y.textContent,C={element:y,language:k,grammar:x,code:T};function I(R){C.highlightedCode=R,l.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,l.hooks.run("after-highlight",C),l.hooks.run("complete",C),w&&w.call(C.element)}if(l.hooks.run("before-sanity-check",C),S=C.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!C.code){l.hooks.run("complete",C),w&&w.call(C.element);return}if(l.hooks.run("before-highlight",C),!C.grammar){I(l.util.encode(C.code));return}if(b&&r.Worker){var _=new Worker(l.filename);_.onmessage=function(R){I(R.data)},_.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else I(l.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,w){var k={code:y,grammar:b,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(y,b){var w=b.rest;if(w){for(var k in w)b[k]=w[k];delete b.rest}var x=new d;return h(x,x.head,y),c(y,x,b,x.head,0),p(x)},hooks:{all:{},add:function(y,b){var w=l.hooks.all;w[y]=w[y]||[],w[y].push(b)},run:function(y,b){var w=l.hooks.all[y];if(!(!w||!w.length))for(var k=0,x;x=w[k++];)x(b)}},Token:a};r.Prism=l;function a(y,b,w,k){this.type=y,this.content=b,this.alias=w,this.length=(k||"").length|0}a.stringify=function y(b,w){if(typeof b=="string")return b;if(Array.isArray(b)){var k="";return b.forEach(function(I){k+=y(I,w)}),k}var x={type:b.type,content:y(b.content,w),tag:"span",classes:["token",b.type],attributes:{},language:w},S=b.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(x.classes,S):x.classes.push(S)),l.hooks.run("wrap",x);var T="";for(var C in x.attributes)T+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+T+">"+x.content+""};function u(y,b,w,k){y.lastIndex=b;var x=y.exec(w);if(x&&k&&x[1]){var S=x[1].length;x.index+=S,x[0]=x[0].slice(S)}return x}function c(y,b,w,k,x,S){for(var T in w)if(!(!w.hasOwnProperty(T)||!w[T])){var C=w[T];C=Array.isArray(C)?C:[C];for(var I=0;I=S.reach);$+=L.value.length,L=L.next){var D=L.value;if(b.length>y.length)return;if(!(D instanceof a)){var F=1,U;if(E){if(U=u(N,$,y,A),!U||U.index>=y.length)break;var j=U.index,W=U.index+U[0].length,B=$;for(B+=L.value.length;j>=B;)L=L.next,B+=L.value.length;if(B-=L.value.length,$=B,L.value instanceof a)continue;for(var H=L;H!==b.tail&&(BS.reach&&(S.reach=te);var ue=L.prev;X&&(ue=h(b,ue,X),$+=X.length),f(b,ue,F);var Ne=new a(T,R?l.tokenize(Y,R):Y,M,Y);if(L=h(b,ue,Ne),Z&&h(b,L,Z),F>1){var ye={cause:T+","+I,reach:te};c(y,b,w,L.prev,$,ye),S&&ye.reach>S.reach&&(S.reach=ye.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,w){var k=b.next,x={value:w,prev:b,next:k};return b.next=x,k.prev=x,y.length++,x}function f(y,b,w){for(var k=b.next,x=0;x/,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(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){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:[n,"language-"+n],inside:e.languages[n]},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 ZU=rw;rw.displayName="css";rw.aliases=[];function rw(e){(function(t){var n=/(?:"(?:\\(?:\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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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 r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}var QU=ow;ow.displayName="clike";ow.aliases=[];function ow(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 JU=iw;iw.displayName="javascript";iw.aliases=["js"];function iw(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 Ju=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof dt=="object"?dt:{},e7=m7();Ju.Prism={manual:!0,disableWorkerMessageHandler:!0};var t7=m9,n7=IU,VM=XU,r7=qU,o7=ZU,i7=QU,s7=JU;e7();var sw={}.hasOwnProperty;function jM(){}jM.prototype=VM;var tn=new jM,a7=tn;tn.highlight=c7;tn.register=Zh;tn.alias=l7;tn.registered=u7;tn.listLanguages=d7;Zh(r7);Zh(o7);Zh(i7);Zh(s7);tn.util.encode=p7;tn.Token.stringify=h7;function Zh(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");tn.languages[e.displayName]===void 0&&e(tn)}function l7(e,t){var n=tn.languages,r=e,o,i,s,l;t&&(r={},r[e]=t);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,s=i.length,l=-1;++lparseInt(Jd(l,2),16)),parseInt(Jd(s[3]||"f",2),16)/255]}const r=k7.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,16)),parseInt(s[3]||"ff",16)/255]}const o=E7.exec(t);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(l=>parseInt(l,10)),parseFloat(s[3]||"1")]}const i=S7.exec(t);if(i){const[s,l,a,u]=Array.from(i).slice(1).map(parseFloat);if($i(0,100,l)!==l)throw new ed(e);if($i(0,100,a)!==a)throw new ed(e);return[...T7(s,l,a),Number.isNaN(u)?1:u]}throw new ed(e)}function y7(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const UC=e=>parseInt(e.replace(/_/g,""),36),b7="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 n=UC(t.substring(0,3)),r=UC(t.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return e[n]=`${o}${r}`,e},{});function w7(e){const t=e.toLowerCase().trim(),n=b7[y7(t)];if(!n)throw new ed(e);return`#${n}`}const Jd=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),x7=new RegExp(`^#${Jd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),k7=new RegExp(`^#${Jd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),E7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Jd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),S7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,C7=/^[a-z]+$/i,WC=e=>Math.round(e*255),T7=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(WC);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),s=i*(1-Math.abs(o%2-1));let l=0,a=0,u=0;o>=0&&o<1?(l=i,a=s):o>=1&&o<2?(l=s,a=i):o>=2&&o<3?(a=i,u=s):o>=3&&o<4?(a=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);const c=r-i/2,d=l+c,h=a+c,f=u+c;return[d,h,f].map(WC)};function A7(e){const[t,n,r,o]=lw(e).map((d,h)=>h===3?d:d/255),i=Math.max(t,n,r),s=Math.min(t,n,r),l=(i+s)/2;if(i===s)return[0,0,l,o];const a=i-s,u=l>.5?a/(2-i-s):a/(i+s);return[60*(t===i?(n-r)/a+(n.179}function kc(e){return O7(e)?"#000":"#fff"}const I7="remirror-editor-wrapper",L7="remirror-button-active",N7="remirror-button",$7="remirror-composite",D7="remirror-dialog",P7="remirror-dialog-backdrop",z7="remirror-form",F7="remirror-form-message",B7="remirror-form-label",H7="remirror-form-group",U7="remirror-group",W7="remirror-input",V7="remirror-menu",j7="remirror-menu-pane",G7="remirror-menu-pane-active",K7="remirror-menu-dropdown-label",Y7="remirror-menu-pane-icon",X7="remirror-menu-pane-label",q7="remirror-menu-pane-shortcut",Z7="remirror-menu-button-left",Q7="remirror-menu-button-right",J7="remirror-menu-button-nested-left",eW="remirror-menu-button-nested-right",tW="remirror-menu-button",nW="remirror-menu-bar",rW="remirror-flex-column",oW="remirror-flex-row",iW="remirror-menu-item",sW="remirror-menu-item-row",aW="remirror-menu-item-column",lW="remirror-menu-item-checkbox",cW="remirror-menu-item-radio",uW="remirror-menu-group",dW="remirror-floating-popover",hW="remirror-popover",fW="remirror-animated-popover",pW="remirror-role",gW="remirror-separator",mW="remirror-tab",vW="remirror-tab-list",yW="remirror-tabbable",bW="remirror-toolbar",wW="remirror-tooltip",xW="remirror-table-size-editor",kW="remirror-table-size-editor-body",EW="remirror-table-size-editor-cell",SW="remirror-table-size-editor-cell-selected",CW="remirror-table-size-editor-footer",TW="remirror-color-picker",AW="remirror-color-picker-cell",_W="remirror-color-picker-cell-selected";var RW=Object.freeze({__proto__:null,ANIMATED_POPOVER:fW,BUTTON:N7,BUTTON_ACTIVE:L7,COLOR_PICKER:TW,COLOR_PICKER_CELL:AW,COLOR_PICKER_CELL_SELECTED:_W,COMPOSITE:$7,DIALOG:D7,DIALOG_BACKDROP:P7,EDITOR_WRAPPER:I7,FLEX_COLUMN:rW,FLEX_ROW:oW,FLOATING_POPOVER:dW,FORM:z7,FORM_GROUP:H7,FORM_LABEL:B7,FORM_MESSAGE:F7,GROUP:U7,INPUT:W7,MENU:V7,MENU_BAR:nW,MENU_BUTTON:tW,MENU_BUTTON_LEFT:Z7,MENU_BUTTON_NESTED_LEFT:J7,MENU_BUTTON_NESTED_RIGHT:eW,MENU_BUTTON_RIGHT:Q7,MENU_DROPDOWN_LABEL:K7,MENU_GROUP:uW,MENU_ITEM:iW,MENU_ITEM_CHECKBOX:lW,MENU_ITEM_COLUMN:aW,MENU_ITEM_RADIO:cW,MENU_ITEM_ROW:sW,MENU_PANE:j7,MENU_PANE_ACTIVE:G7,MENU_PANE_ICON:Y7,MENU_PANE_LABEL:X7,MENU_PANE_SHORTCUT:q7,POPOVER:hW,ROLE:pW,SEPARATOR:gW,TAB:mW,TABBABLE:yW,TABLE_SIZE_EDITOR:xW,TABLE_SIZE_EDITOR_BODY:kW,TABLE_SIZE_EDITOR_CELL:EW,TABLE_SIZE_EDITOR_CELL_SELECTED:SW,TABLE_SIZE_EDITOR_FOOTER:CW,TAB_LIST:vW,TOOLBAR:bW,TOOLTIP:wW});const MW="remirror-wrap",OW="remirror-language-select-positioner",IW="remirror-language-select-width",LW="remirror-a11y-dark",NW="remirror-atom-dark",$W="remirror-base16-ateliersulphurpool-light",DW="remirror-cb",PW="remirror-darcula",zW="remirror-dracula",FW="remirror-duotone-dark",BW="remirror-duotone-earth",HW="remirror-duotone-forest",UW="remirror-duotone-light",WW="remirror-duotone-sea",VW="remirror-duotone-space",jW="remirror-gh-colors",GW="remirror-hopscotch",KW="remirror-pojoaque",YW="remirror-vs",XW="remirror-xonokai";var V0=Object.freeze({__proto__:null,A11Y_DARK:LW,ATOM_DARK:NW,BASE16_ATELIERSULPHURPOOL_LIGHT:$W,CB:DW,DARCULA:PW,DRACULA:zW,DUOTONE_DARK:FW,DUOTONE_EARTH:BW,DUOTONE_FOREST:HW,DUOTONE_LIGHT:UW,DUOTONE_SEA:WW,DUOTONE_SPACE:VW,GH_COLORS:jW,HOPSCOTCH:GW,LANGUAGE_SELECT_POSITIONER:OW,LANGUAGE_SELECT_WIDTH:IW,POJOAQUE:KW,VS:YW,WRAP:MW,XONOKAI:XW});const qW="remirror-image-loader";var ZW=Object.freeze({__proto__:null,IMAGE_LOADER:qW});const QW="remirror-list-item-with-custom-mark",JW="remirror-ul-list-content",eV="remirror-editor",tV="remirror-list-item-marker-container",nV="remirror-list-item-checkbox",rV="remirror-collapsible-list-item-closed",oV="remirror-collapsible-list-item-button",iV="remirror-list-spine";var Xs=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:oV,COLLAPSIBLE_LIST_ITEM_CLOSED:rV,EDITOR:eV,LIST_ITEM_CHECKBOX:nV,LIST_ITEM_MARKER_CONTAINER:tV,LIST_ITEM_WITH_CUSTOM_MARKER:QW,LIST_SPINE:iV,UL_LIST_CONTENT:JW});const sV="remirror-is-empty";var aV=Object.freeze({__proto__:null,IS_EMPTY:sV});const lV="remirror-editor",cV="remirror-positioner",uV="remirror-positioner-widget";var dV=Object.freeze({__proto__:null,EDITOR:lV,POSITIONER:cV,POSITIONER_WIDGET:uV});const hV="remirror-theme";function fV(e={}){const t=[],n={};function r(o,i){if(typeof i=="string"||typeof i=="number"){t.push(`${VC(o)}: ${i};`),n[VC(o)]=i;return}if(!(typeof i!="object"||!i))for(const[s,l]of Object.entries(i))r([...o,s],l)}for(const[o,i]of Object.entries(e))r([o],i);return{css:t.join(` +`),styles:n}}function pV(e){return e.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function VC(e){return`--rmr-${e.map(pV).join("-")}`}const Io={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"]},Di="#000000",cw="#ffffff",gV="#252103",uw=ig(Di,.75),Am="#7963d2",dw="#bcd263",mV="#fff",vV="#fff",hw=Io.gray[1],jC="rgba(10,31,68,0.08)",GC="rgba(10,31,68,0.10)",KC="rgba(10,31,68,0.12)",yV=mp(ig(Di,.1),.13),fw={background:cw,border:uw,foreground:Di,muted:hw,primary:Am,secondary:dw,primaryText:mV,secondaryText:vV,text:gV,faded:yV},bV={...fw,background:Ur(cw,.15),border:Ur(uw,.15),foreground:Ur(Di,.15),muted:Ur(hw,.15),primary:Ur(Am,.15),secondary:Ur(dw,.15),get text(){return kc(this.background)},get primaryText(){return kc(this.primary)},get secondaryText(){return kc(this.secondary)}},wV={...fw,background:Ur(cw,.075),border:Ur(uw,.075),foreground:Ur(Di,.075),muted:Ur(hw,.075),primary:Ur(Am,.075),secondary:Ur(dw,.075),get text(){return kc(this.background)},get primaryText(){return kc(this.primary)},get secondaryText(){return kc(this.secondary)}},ba={color:{...fw,active:bV,hover:wV,shadow1:jC,shadow2:GC,shadow3:KC,backdrop:ig(Di,.1),outline:ig(Am,.6),table:{default:{border:mp(Di,.8),cell:mp(Di,.4),controller:Io.gray[3]},selected:{border:Io.blue[7],cell:Io.blue[1],controller:Io.blue[5]},preselect:{border:Io.blue[7],cell:mp(Di,.4),controller:Io.blue[5]},predelete:{border:Io.red[7],cell:Io.red[1],controller:Io.red[5]},mark:"#91919196"}},hue:Io,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 ${jC}`,2:`0 1px 1px ${GC}`,3:`0 1px 1px ${KC}`}};var xV=Object.defineProperty,kV=Object.getOwnPropertyDescriptor,qi=(e,t,n,r)=>{for(var o=r>1?void 0:r?kV(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&xV(t,n,o),o},GM=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ss=(e,t,n)=>(GM(e,t,"read from private field"),n?n.call(e):t.get(e)),g1=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},m1=(e,t,n,r)=>(GM(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),KM="data-code-block-language";function YM(e,t,n=[]){return e.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&t&&o.push(t),r.type==="element"?YM(r.children,t,o):{text:r.value,classes:o}})}function EV(e,t){var n;const{node:r,pos:o}=e,i=sg({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),s=aw.highlight(r.textContent??"",i),l=YM(s,t);let a=o+1;function u(c){const d=a,h=d+c.text.length;return a=h,{...c,from:d,to:h}}return vR(l).map(u)}function YC(e){const{blocks:t,skipLast:n,plainTextClassName:r}=e,o=[];for(const i of t){const s=EV(i,r),l=n?s.length-1:s.length;for(const a of yb(l)){const u=s[a],c=u==null?void 0:u.classes;if(!u||!(c!=null&&c.length))continue;const d=yt.inline(u.from,u.to,{class:c.join(" ")});o.push(d)}}return o}function SV(e){return!!(e&&Pn(e)&&ke(e.language)&&e.language.length>0)}function CV(e){return t=>({state:{tr:n,selection:r},dispatch:o})=>{if(!SV(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=gi({types:e,selection:r});return!i||mR(t,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(n),!0)}}function sg(e){const{language:t,fallback:n}=e;if(!t)return n;const r=aw.listLanguages();for(const o of r)if(o.toLowerCase()===t.toLowerCase())return o;return n}function TV(e,t){const{language:n,wrap:r}=bm(e.attrs,t),{style:o,...i}=t.dom(e);let s=i.style;return r&&(s=EF({whiteSpace:"pre-wrap",wordBreak:"break-all"},s)),["pre",{spellcheck:"false",...i,class:Bc(i.class,`language-${n}`)},["code",{[KM]:n,style:s},0]]}function AV(e){return({pos:t}=be())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:s}=e,{from:l,to:a}=t?{from:t,to:t}:n.selection,u=gi({types:o,selection:n.selection});if(!u)return!1;const{node:{attrs:c,textContent:d},start:h}=u,f=l-h,p=a-h,g=sg({language:c.language,fallback:s}),m=i({source:d,language:g,cursorOffset:f});let v;if(f!==p&&(v=i({source:d,language:g,cursorOffset:p})),!m)return!1;const{cursorOffset:y,formatted:b}=m;if(b===d)return!1;const w=h+d.length;n.insertText(b,h,w);const k=h+y,x=v?h+v.cursorOffset:void 0;return n.setSelection(Ie.between(n.doc.resolve(k),n.doc.resolve(x??k))),r&&r(n),!0}}function _V(e){var t;return(t=e.getAttribute(KM)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:RV,LABEL:MV}=u5,OV={icon:"bracesLine",description:({t:e})=>e(RV),label:({t:e})=>e(MV)},Ea,td,nd,IV=class{constructor(e,t){g1(this,Ea,void 0),g1(this,td,void 0),g1(this,nd,!1),m1(this,td,e),m1(this,Ea,t)}init(e){const t=DF({node:e.doc,type:ss(this,td)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const n=YC({blocks:t,skipLast:ss(this,nd),defaultLanguage:ss(this,Ea).options.defaultLanguage,plainTextClassName:ss(this,Ea).options.plainTextClassName??void 0});this.decorationSet=We.create(e,n)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const n=PF(e,{descend:!0,predicate:r=>r.type===ss(this,td),StepTypes:[]});return this.updateDecorationSet(e,n),this}updateDecorationSet(e,t){if(t.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of t)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(e.doc,YC({blocks:t,skipLast:ss(this,nd),defaultLanguage:ss(this,Ea).options.defaultLanguage,plainTextClassName:ss(this,Ea).options.plainTextClassName??void 0}))}setDeleted(e){m1(this,nd,e)}};Ea=new WeakMap;td=new WeakMap;nd=new WeakMap;var yo=class extends zn{get name(){return"codeBlock"}createTags(){return[Ee.Block,Ee.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const n=/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:r=>{var o,i;if(!zt(r))return!1;const s=r.querySelector("pre.code");if(!zt(s))return!1;const l=Zo(s,"white-space")==="pre-wrap",a=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(r),language:a,wrap:l}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!zt(r))return!1;const o=r.querySelector("code");if(!zt(o))return!1;const i=Zo(o,"white-space")==="pre-wrap",s=this.options.getLanguageFromDom(o,r);return{...e.parse(r),language:s,wrap:i}}},...t.parseDOM??[]],toDOM:r=>TV(r,e)}}createAttributes(){return{class:V0[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=n=>({language:sg({language:xc(n,1),fallback:this.options.defaultLanguage})});return[eM({regexp:e,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Ie.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 IV(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(n,r){return e.init(r)},apply(n,r,o,i){return e.apply(n,i)}},props:{handleKeyDown:Ub({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 Bb({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return qd(this.type,e)}updateCodeBlock(e){return CV(this.type)(e)}formatCodeBlock(e){return AV({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:n,tr:r,schema:o}=e,{node:i}=Xz(n);if(!gm({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:s,to:l}=n;r.replaceWith(s,l,o.text(" "))}return t&&t(r),!0}backspaceKey({dispatch:e,tr:t,state:n}){if(!t.selection.empty)return!1;const r=gi({types:this.type,selection:t.selection});if((r==null?void 0:r.start)!==t.selection.from)return!1;const{pos:o,node:i,start:s}=r,l=It(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?Kz({pos:o,tr:t,content:l.create()}):Gz({pos:o,tr:t}):s>2?t.setSelection(Ie.near(t.doc.resolve(s-2))):(t.insert(0,l.create()),t.setSelection(Ie.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(ra(t.selection)&&t.selection.empty))return!1;const{nodeBefore:n,parent:r}=t.selection.$anchor;if(!(n!=null&&n.isText)||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:s}=n,{textContent:l}=r;if(!i)return!1;const a=i.match(o),u=l.match(o);if(!a||!u)return!1;const[,c]=a,d=sg({language:c,fallback:this.options.defaultLanguage}),h=t.selection.$from.before(),f=h+s+1;return t.replaceWith(h,f,this.type.create({language:d})),t.setSelection(Ie.near(t.doc.resolve(h+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!B2({type:this.type,state:e}))return!1;const n=t.formatCodeBlock.isEnabled();return n&&t.formatCodeBlock(),n}registerLanguages(){for(const e of this.options.supportedLanguages)aw.register(e)}};qi([le(OV)],yo.prototype,"toggleCodeBlock",1);qi([le()],yo.prototype,"createCodeBlock",1);qi([le()],yo.prototype,"updateCodeBlock",1);qi([le()],yo.prototype,"formatCodeBlock",1);qi([nn({shortcut:"Tab"})],yo.prototype,"tabKey",1);qi([nn({shortcut:"Backspace"})],yo.prototype,"backspaceKey",1);qi([nn({shortcut:"Enter"})],yo.prototype,"enterKey",1);qi([nn({shortcut:oe.Format})],yo.prototype,"formatShortcut",1);yo=qi([De({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:_V},staticKeys:["getLanguageFromDom"]})],yo);var LV=Object.defineProperty,NV=Object.getOwnPropertyDescriptor,pw=(e,t,n,r)=>{for(var o=r>1?void 0:r?NV(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&LV(t,n,o),o},XM=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},sn=(e,t,n)=>(XM(e,t,"read from private field"),n?n.call(e):t.get(e)),Si=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},as=(e,t,n,r)=>(XM(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rd,od,Jl,id,vp,sd,ad,ld,cd,yp=class{constructor(e){Si(this,rd,xm()),Si(this,od,[]),Si(this,Jl,new Map),Si(this,id,[]),Si(this,vp,!1),Si(this,sd,void 0),Si(this,ad,void 0),Si(this,ld,void 0),Si(this,cd,void 0),this.addListener=(t,n)=>sn(this,rd).on(t,n),as(this,sd,e),as(this,ad,e.getActive),as(this,cd,e.getPosition),as(this,ld,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new yp(e)}static fromPositioner(e,t){return yp.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:sn(this,ad),getPosition:sn(this,cd),hasChanged:this.hasChanged,events:this.events,getID:sn(this,ld)}}onActiveChanged(e){this.recentUpdate=e;const t=sn(this,ad).call(this,e);as(this,od,t),as(this,Jl,new Map),as(this,vp,!1),as(this,id,[]);const n=[];for(const[r,o]of t.entries()){const i=this.getID(o,r);sn(this,id).push(i),n.push({setElement:s=>this.addProps({...e,data:o,element:s},r),id:i,data:o})}sn(this,rd).emit("update",n)}getID(e,t){var n;return((n=sn(this,ld))==null?void 0:n.call(this,e,t))??t.toString()}addProps(e,t){if(sn(this,vp)||(sn(this,Jl).set(t,e),sn(this,Jl).sizee;return this.clone(n=>({getActive:r=>n.getActive(r).filter(t)}))}},Kr=yp;rd=new WeakMap;od=new WeakMap;Jl=new WeakMap;id=new WeakMap;vp=new WeakMap;sd=new WeakMap;ad=new WeakMap;ld=new WeakMap;cd=new WeakMap;Kr.EMPTY=[];function $V(e,t=ZM){const{key:n}=(e==null?void 0:e.getMeta(qM))??{};return n===t}function gw(e){const{tr:t,state:n,previousState:r}=e;return!r||t&&$V(t)?!0:t?Zz(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function mw(e,t,n={}){const r=t.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,s=0,l=0,a=0;if(zt(t)&&o){const c=Number.parseFloat(Zo(t,"padding-left").replace("px","")),d=Number.parseFloat(Zo(t,"padding-right").replace("px","")),h=Number.parseFloat(Zo(t,"padding-top").replace("px","")),f=Number.parseFloat(Zo(t,"padding-bottom").replace("px","")),p=Number.parseFloat(Zo(t,"border-left").replace("px","")),g=Number.parseFloat(Zo(t,"border-right").replace("px","")),m=Number.parseFloat(Zo(t,"border-top").replace("px","")),v=Number.parseFloat(Zo(t,"border-bottom").replace("px","")),y=t.offsetWidth-t.clientWidth,b=t.offsetHeight-t.clientHeight;i+=c+p+(t.dir==="rtl"?y:0),s+=d+g+(t.dir==="rtl"?0:y),l+=h+m,a+=f+v+b}const u=new DOMRect(r.left+i,r.top+l,r.width-s,r.height-a);for(const[c,d]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(ii(c,u.top,u.bottom)&&ii(d,u.left,u.right))return!0;return!1}var DV="remirror-positioner-widget",qM="positionerUpdate",ZM="__all_positioners__",QM={y:-999999,x:-999999,width:0,height:0},XC={...QM,left:-999999,top:-999999,bottom:-999999,right:-999999},_m={...QM,rect:{...XC,toJSON:()=>XC},visible:!1},JM=Kr.create({hasChanged:gw,getActive(e){const{state:t}=e;if(!Db(t)||t.selection.$anchor.depth>2)return Kr.EMPTY;const n=jh({predicate:r=>r.type.isBlock,selection:t});return n?[n]:Kr.EMPTY},getPosition(e){const{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!zt(r))return _m;const o=r.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,l=o.width,a=t.dom.scrollLeft+o.left-i.left,u=t.dom.scrollTop+o.top-i.top,c=mw(o,t.dom);return{y:u,x:a,height:s,width:l,rect:o,visible:c}}}),vw=JM.clone(({getActive:e})=>({getActive:t=>{const[n]=e(t);return n&&vm(n.node)&&n.node.type===mm(t.state.schema)?[n]:Kr.EMPTY}})),PV=vw.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),zV=vw.clone(({getPosition:e})=>({getPosition:t=>{const{width:n,x:r,y:o,height:i}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function yw(e){return Kr.create({hasChanged:gw,getActive:t=>{const{state:n,view:r}=t;if(!e(n)||!ra(n.selection))return Kr.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Kr.EMPTY}},getPosition(t){const{element:n,data:r,view:o}=t,{from:i,to:s}=r,l=n.offsetParent??o.dom,a=l.getBoundingClientRect(),u=Math.abs(s.bottom-i.top),c=u>i.bottom-i.top,d=Math.min(i.left,s.left),h=Math.min(i.top,s.top),f=l.scrollLeft+(c?s.left-a.left:d-a.left),p=l.scrollTop+h-a.top,g=c?1:Math.abs(i.left-s.right),m=new DOMRect(c?s.left:d,h,g,u),v=mw(m,o.dom);return{rect:m,y:p,x:f,height:u,width:g,visible:v}}})}var eO=yw(e=>!e.selection.empty),FV=yw(e=>e.selection.empty),BV=yw(()=>!0),HV=eO.clone(()=>({getActive:e=>{const{state:t,view:n}=e;if(!t.selection.empty)return Kr.EMPTY;const r=G2(t);if(!r)return Kr.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Kr.EMPTY}}})),UV={selection:eO,cursor:FV,always:BV,block:JM,emptyBlock:vw,emptyBlockStart:PV,emptyBlockEnd:zV,nearestWord:HV},Uc=class extends gt{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:dV.EDITOR}}init(){this.onScroll=hR(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 We.empty;const t=yt.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return We.create(e.doc,[t])}forceUpdatePositioners(e=ZM){return({tr:t,dispatch:n})=>(n==null||n(t.setMeta(qM,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=DV,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 n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};pw([le()],Uc.prototype,"forceUpdatePositioners",1);pw([lt()],Uc.prototype,"getPositionerWidget",1);Uc=pw([De({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],Uc);function j0(e){return ke(e)?UV[e].clone():tt(e)?e().clone():e.clone()}function WV(e){const t=P.createContext(null),n=VV(t);return[o=>{const i=e(o);return ee.createElement(t.Provider,{value:i},o.children)},n,t]}function VV(e){return(t,n)=>{const r=P.useContext(e),o=jV(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;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(r);if(!o||!n)return i;const s=t(o);return n(s,i)?s:i}}function jV(e){const t=P.useRef();return GV(()=>{t.current=e}),t.current}var GV=typeof document<"u"?P.useLayoutEffect:P.useEffect;function KV(e,t){return WV(n=>{const r=P.useRef(null),o=P.useRef(),i=t==null?void 0:t(n),[s,l]=P.useState(()=>e({get:qC(r),set:ZC(o),previousContext:void 0,props:n,state:i})),a=[...Object.values(n),i];return P.useEffect(()=>{a.length!==0&&l(u=>e({get:qC(r),set:ZC(o),previousContext:u,props:n,state:i}))},a),r.current=s,o.current=l,s})}function qC(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 ZC(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(n=>({...n,...typeof t=="function"?t(n):t}))}}var tO={},nO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.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"]])})(nO);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=nO;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,g){const m=n(f);if(Number.isNaN(m)||g!==void 0&&g!==f.length)throw new SyntaxError(t.errorMessages.get(p));return m}function o(f){const p=r(f,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const g=r(f,t.ErrorType.MalformedUnicode,4);if(p!==void 0){const m=r(p,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,m)}return String.fromCharCode(g)}function s(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function l(f){if(!s(f))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const p=f.slice(1,-1),g=r(p,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(m){throw m instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):m}}function a(f,p=!1){if(p)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const g=parseInt(f,8);return String.fromCharCode(g)}const u=new Map([["b","\b"],["f","\f"],["n",` +`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function c(f){return u.get(f)||f}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 h(f,p=!1){return f.replace(d,function(g,m,v,y,b,w,k,x,S){if(m!==void 0)return"\\";if(v!==void 0)return o(v);if(y!==void 0)return l(y);if(b!==void 0)return i(b,w);if(k!==void 0)return i(k);if(x==="0")return"\0";if(x!==void 0)return a(x,!p);if(S!==void 0)return c(S);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=h,e.default=h})(tO);const YV=Ko(tO),Pi=e=>typeof e=="string",XV=e=>typeof e=="function",QC=new Map;function bw(e){return[...Array.isArray(e)?e:[e],"en"]}function rO(e,t,n){const r=bw(e);return ag(()=>lg("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(Pi(t)?new Date(t):t)}function G0(e,t,n){const r=bw(e);return ag(()=>lg("number",r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function JC(e,t,n,{offset:r=0,...o}){const i=bw(e),s=t?ag(()=>lg("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):ag(()=>lg("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[s.select(n-r)]??o.other}function ag(e,t){const n=e();let r=QC.get(n);return r||(r=t(),QC.set(n,r)),r}function lg(e,t,n){const r=t.join("-");return`${e}-${r}-${JSON.stringify(n)}`}const oO=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,qV=(e,t,n={})=>{t=t||e;const r=i=>Pi(i)?n[i]||{style:i}:i,o=(i,s)=>{const l=Object.keys(n).length?r("number"):{},a=G0(t,i,l);return s.replace("#",a)};return{plural:(i,s)=>{const{offset:l=0}=s,a=JC(t,!1,i,s);return o(i-l,a)},selectordinal:(i,s)=>{const{offset:l=0}=s,a=JC(t,!0,i,s);return o(i-l,a)},select:(i,s)=>s[i]??s.other,number:(i,s)=>G0(t,i,r(s)),date:(i,s)=>rO(t,i,r(s)),undefined:i=>i}};function ZV(e,t,n){return(r,o={})=>{const i=qV(t,n,o),s=a=>Array.isArray(a)?a.reduce((u,c)=>{if(Pi(c))return u+c;const[d,h,f]=c;let p={};f!=null&&!Pi(f)?Object.keys(f).forEach(m=>{p[m]=s(f[m])}):p=f;const g=i[h](r[d],p);return g==null?u:u+g},""):a,l=s(e);return Pi(l)&&oO.test(l)?YV(l.trim()):Pi(l)?l.trim():l}}var QV=Object.defineProperty,JV=(e,t,n)=>t in e?QV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ej=(e,t,n)=>(JV(e,typeof t!="symbol"?t+"":t,n),n);class tj{constructor(){ej(this,"_events",{})}on(t,n){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(n),()=>this.removeListener(t,n)}removeListener(t,n){if(!this._hasEvent(t))return;const r=this._events[t].indexOf(n);~r&&this._events[t].splice(r,1)}emit(t,...n){this._hasEvent(t)&&this._events[t].map(r=>r.apply(this,n))}_hasEvent(t){return Array.isArray(this._events[t])}}var nj=Object.defineProperty,rj=(e,t,n)=>t in e?nj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fl=(e,t,n)=>(rj(e,typeof t!="symbol"?t+"":t,n),n);class oj extends tj{constructor(t){super(),Fl(this,"_locale"),Fl(this,"_locales"),Fl(this,"_localeData"),Fl(this,"_messages"),Fl(this,"_missing"),Fl(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,n){this._localeData[t]==null?this._localeData[t]=n:Object.assign(this._localeData[t],n)}loadLocaleData(t,n){n!=null?this._loadLocaleData(t,n):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,n){this._messages[t]==null?this._messages[t]=n:Object.assign(this._messages[t],n)}load(t,n){n!=null?this._load(t,n):Object.keys(t).forEach(r=>this._load(r,t[r])),this.emit("change")}loadAndActivate({locale:t,locales:n,messages:r}){this._locale=t,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,n){this._locale=t,this._locales=n,this.emit("change")}_(t,n={},{message:r,formats:o}={}){Pi(t)||(n=t.values||n,r=t.message,t=t.id);const i=!this.messages[t],s=this._missing;if(s&&i)return XV(s)?s(this._locale,t):s;i&&this.emit("missing",{id:t,locale:this._locale});let l=this.messages[t]||r||t;return Pi(l)&&oO.test(l)?JSON.parse(`"${l}"`):Pi(l)?l:ZV(l,this._locale,this._locales)(n,o)}date(t,n){return rO(this._locales||this._locale,t,n)}number(t,n){return G0(this._locales||this._locale,t,n)}}function ij(e={}){return new oj(e)}const Rm=ij();function se(e,t){return t?"other":e==1?"one":"other"}function Zi(e,t){return t?"other":e==0||e==1?"one":"other"}function Lr(e,t){var n=String(e).split("."),r=!n[1];return t?"other":e==1&&r?"one":"other"}function ct(e,t){return"other"}function sa(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const sj=ct,aj=se,lj=Zi;function cj(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const uj=se;function dj(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[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 hj(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[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 fj(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 pj=se,gj=Lr;function mj(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),s=r.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":r==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function vj(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[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":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const yj=se,bj=se,wj=se,xj=Zi,kj=ct;function Ej(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 Sj=ct;function Cj(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),s=r&&n[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&&r&&s==0?"many":"other"}const Tj=se;function Aj(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return t?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function _j(e,t){var n=String(e).split("."),r=!n[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&r?"one":"other"}const Rj=se;function Mj(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return t?"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Oj=se,Ij=se,Lj=se;function Nj(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function $j(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 Dj(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t?"other":e==1||!o&&(r==0||r==1)?"one":"other"}const Pj=Lr;function zj(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return t?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}const Fj=se,Bj=ct,Hj=se,Uj=se;function Wj(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?i==1&&s!=11?"one":i==2&&s!=12?"two":i==3&&s!=13?"few":"other":e==1&&r?"one":"other"}const Vj=se,jj=se,Gj=Lr,Kj=se;function Yj(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function Xj(e,t){return t?"other":e>=0&&e<2?"one":"other"}const qj=Lr;function Zj(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const Qj=se;function Jj(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const eG=se,tG=Lr;function nG(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"}function rG(e,t){var n=String(e).split("."),r=Number(n[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":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"}const oG=Lr,iG=se;function sG(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 aG=Zi;function lG(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.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 cG=se,uG=se;function dG(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}function hG(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 fG(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return t?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function pG(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-2),l=o.slice(-2);return t?"other":i&&s==1||l==1?"one":i&&s==2||l==2?"two":i&&(s==3||s==4)||l==3||l==4?"few":"other"}function gG(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function mG(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const vG=Lr,yG=ct,bG=ct,wG=ct,xG=Lr;function kG(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e,i=r.slice(-1),s=r.slice(-2);return t?"other":o&&i==1&&s!=11||!o?"one":"other"}function EG(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const SG=sa;function CG(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&s==0?"many":"other"}const TG=ct,AG=ct,_G=se,RG=Lr,MG=se,OG=ct,IG=ct;function LG(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-2);return t?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function NG(e,t){return t?"other":e>=0&&e<2?"one":"other"}const $G=se,DG=se,PG=ct,zG=ct;function FG(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||r&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const BG=se,HG=se,UG=ct;function WG(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const VG=ct,jG=se,GG=se;function KG(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const YG=se;function XG(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),s=r&&n[0].slice(-5),l=r&&n[0].slice(-6);return t?r&&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||r&&i==0&&(s>=1e3&&s<=2e4||s==4e4||s==6e4||s==8e4)||e!=0&&l==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 qG=se;function ZG(e,t){var n=String(e).split("."),r=n[0];return t?"other":e==0?"zero":(r==0||r==1)&&e!=0?"one":"other"}const QG=se,JG=se,eK=ct,tK=Zi;function nK(e,t){return t&&e==1?"one":"other"}function rK(e,t){var n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?"other":i==1&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":r!=0?"many":"other"}function oK(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return t?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const iK=se,sK=Zi,aK=se;function lK(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return t?s==1&&l!=11?"one":s==2&&l!=12?"two":(s==7||s==8)&&l!=17&&l!=18?"many":"other":i&&s==1&&l!=11||a==1&&u!=11?"one":"other"}const cK=se,uK=se;function dK(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}function hK(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function fK(e,t){return t&&e==1?"one":"other"}function pK(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const gK=ct,mK=se,vK=sa,yK=se,bK=se;function wK(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const xK=Lr,kK=se,EK=se,SK=se,CK=ct,TK=se,AK=Zi,_K=se,RK=se,MK=se;function OK(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1||e==5||r&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const IK=se,LK=ct,NK=Zi,$K=se;function DK(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"}function PK(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-2),u=r.slice(-1);return t?"other":i&&s==0||l>=11&&l<=19||o==2&&a>=11&&a<=19?"zero":s==1&&l!=11||o==2&&u==1&&a!=11||o!=2&&u==1?"one":"other"}const zK=se;function FK(e,t){var n=String(e).split("."),r=n[0];return t?"other":r==0||r==1?"one":"other"}const BK=Lr,HK=se;function UK(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}const WK=se,VK=ct;function jK(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),s=r.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 GK=se,KK=ct,YK=se;function XK(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}function qK(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const ZK=se,QK=se,JK=sa,eY=se,tY=ct,nY=ct;function rY(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return t?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}function oY(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"}function iY(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":e==0||e==1||r==0&&o==1?"one":"other"}function sY(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function aY(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const lY=sa,cY=sa,uY=sa,dY=sa,hY=sa,fY=se,pY=se;function gY(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function mY(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=r.slice(-2),a=o.slice(-1),u=o.slice(-2);return t?"other":i&&s==1&&l!=11||a==1&&u!=11?"one":i&&s>=2&&s<=4&&(l<12||l>14)||a>=2&&a<=4&&(u<12||u>14)?"few":"other"}const vY=se,yY=se,bY=se,wY=ct;function xY(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),s=o&&n[0].slice(-2);return t?(i==1||i==2)&&s!=11&&s!=12?"one":"other":e==1&&r?"one":"other"}const kY=Lr,EY=se,SY=se,CY=se,TY=se,AY=ct,_Y=Zi,RY=se;function MY(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function OY(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],s=r.slice(-1),l=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&s!=4&&s!=6&&s!=9||!i&&l!=4&&l!=6&&l!=9?"one":"other"}const IY=se,LY=ct,NY=se,$Y=se;function DY(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e==0||e==1||r&&e>=11&&e<=99?"one":"other"}const PY=se;function zY(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,s=i&&n[0].slice(-1),l=i&&n[0].slice(-2),a=r.slice(-1),u=r.slice(-2);return t?s==3&&l!=13?"few":"other":o&&a==1&&u!=11?"one":o&&a>=2&&a<=4&&(u<12||u>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&u>=11&&u<=14?"many":"other"}const FY=Lr,BY=se,HY=se;function UY(e,t){return t&&e==1?"one":"other"}const WY=se,VY=se,jY=Zi,GY=se,KY=ct,YY=se,XY=se,qY=Lr,ZY=ct,QY=ct,JY=ct;function eX(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const tX=Object.freeze(Object.defineProperty({__proto__:null,_in:sj,af:aj,ak:lj,am:cj,an:uj,ar:dj,ars:hj,as:fj,asa:pj,ast:gj,az:mj,be:vj,bem:yj,bez:bj,bg:wj,bho:xj,bm:kj,bn:Ej,bo:Sj,br:Cj,brx:Tj,bs:Aj,ca:_j,ce:Rj,ceb:Mj,cgg:Oj,chr:Ij,ckb:Lj,cs:Nj,cy:$j,da:Dj,de:Pj,dsb:zj,dv:Fj,dz:Bj,ee:Hj,el:Uj,en:Wj,eo:Vj,es:jj,et:Gj,eu:Kj,fa:Yj,ff:Xj,fi:qj,fil:Zj,fo:Qj,fr:Jj,fur:eG,fy:tG,ga:nG,gd:rG,gl:oG,gsw:iG,gu:sG,guw:aG,gv:lG,ha:cG,haw:uG,he:dG,hi:hG,hr:fG,hsb:pG,hu:gG,hy:mG,ia:vG,id:yG,ig:bG,ii:wG,io:xG,is:kG,it:EG,iu:SG,iw:CG,ja:TG,jbo:AG,jgo:_G,ji:RG,jmc:MG,jv:OG,jw:IG,ka:LG,kab:NG,kaj:$G,kcg:DG,kde:PG,kea:zG,kk:FG,kkj:BG,kl:HG,km:UG,kn:WG,ko:VG,ks:jG,ksb:GG,ksh:KG,ku:YG,kw:XG,ky:qG,lag:ZG,lb:QG,lg:JG,lkt:eK,ln:tK,lo:nK,lt:rK,lv:oK,mas:iK,mg:sK,mgo:aK,mk:lK,ml:cK,mn:uK,mo:dK,mr:hK,ms:fK,mt:pK,my:gK,nah:mK,naq:vK,nb:yK,nd:bK,ne:wK,nl:xK,nn:kK,nnh:EK,no:SK,nqo:CK,nr:TK,nso:AK,ny:_K,nyn:RK,om:MK,or:OK,os:IK,osa:LK,pa:NK,pap:$K,pl:DK,prg:PK,ps:zK,pt:FK,pt_PT:BK,rm:HK,ro:UK,rof:WK,root:VK,ru:jK,rwk:GK,sah:KK,saq:YK,sc:XK,scn:qK,sd:ZK,sdh:QK,se:JK,seh:eY,ses:tY,sg:nY,sh:rY,shi:oY,si:iY,sk:sY,sl:aY,sma:lY,smi:cY,smj:uY,smn:dY,sms:hY,sn:fY,so:pY,sq:gY,sr:mY,ss:vY,ssy:yY,st:bY,su:wY,sv:xY,sw:kY,syr:EY,ta:SY,te:CY,teo:TY,th:AY,ti:_Y,tig:RY,tk:MY,tl:OY,tn:IY,to:LY,tr:NY,ts:$Y,tzm:DY,ug:PY,uk:zY,ur:FY,uz:BY,ve:HY,vi:UY,vo:WY,vun:VY,wa:jY,wae:GY,wo:KY,xh:YY,xog:XY,yi:qY,yo:ZY,yue:QY,zh:JY,zu:eX},Symbol.toStringTag,{value:"Module"}));var nX=Object.defineProperty,rX=Object.getOwnPropertyDescriptor,oX=Object.getOwnPropertyNames,iX=Object.prototype.hasOwnProperty,eT=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of oX(t))!iX.call(e,o)&&o!==n&&nX(e,o,{get:()=>t[o],enumerable:!(r=rX(t,o))||r.enumerable});return e},sX=(e,t,n)=>(eT(e,t,"default"),n&&eT(n,t,"default")),aX=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"]]}'),iO={};sX(iO,tX);Rm.loadLocaleData("en",{plurals:iO.en});Rm.load("en",aX);Rm.activate("en");var lX=Object.defineProperty,cX=Object.getOwnPropertyDescriptor,ww=(e,t,n,r)=>{for(var o=r>1?void 0:r?cX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&lX(t,n,o),o},Wc=class extends zn{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:n,content:r}=this.options,o=be();if(ta(n))for(const[i,s]of cn(n))o[i]={default:s};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(e))t.step(new eh(r,o));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return Fb(e.doc,t)}};ww([le()],Wc.prototype,"setDocAttributes",1);ww([lt()],Wc.prototype,"isDefaultDocNode",1);Wc=ww([De({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:st.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],Wc);var sO="SetDocAttribute",aO="RevertSetDocAttribute",eh=class extends dn{constructor(e,t,n=sO){super(),this.stepType=n,this.key=e,this.value=t}static fromJSON(e,t){return new eh(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return Xt.ok(e.type.create(t,e.content,e.marks))}invert(){return new eh(this.key,this.previous,aO)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{dn.jsonID(sO,eh),dn.jsonID(aO,eh)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var uX=Object.defineProperty,dX=Object.getOwnPropertyDescriptor,lO=(e,t,n,r)=>{for(var o=r>1?void 0:r?dX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&uX(t,n,o),o};function hX(e,t,n,r){const o=e.docView.posFromDOM(t,n,r);return o===null||o<0?null:o}function fX(e,t){const n=t.target;if(n){const r=hX(e,n,0);if(r!==null){const o=e.state.doc.resolve(r),i=o.node().isLeaf?0:1,s=o.start()-i;return{pos:r,inside:s}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var cg=class extends gt{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{const r=n,o=fX(t,r);if(!o)return!1;const i=[],s=[],{inside:l,pos:a}=o;if(l===-1)return!1;const u=t.state.doc.resolve(a),c=u.depth+1;for(const d of yb(c,1))i.push({node:d>u.depth&&u.nodeAfter?u.nodeAfter:u.node(d),pos:u.before(d)});for(const{type:d}of u.marksAcross(u)??[]){const h=Wi(u,d);h&&s.push(h)}return e(r,{view:t,nodes:i,marks:s,getMark:d=>{const h=ke(d)?t.state.schema.marks[d]:d;return we(h,{code:re.EXTENSION,message:`The mark ${d} being checked does not exist within the editor schema.`}),s.find(f=>f.mark.type===h)},getNode:d=>{var h;const f=ke(d)?t.state.schema.nodes[d]:d;we(f,{code:re.EXTENSION,message:"The node being checked does not exist"});const p=i.find(({node:g})=>g.type===f);if(p)return{...p,isRoot:!!((h=i[0])!=null&&h.node.eq(p.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(t=n.options.exclude)!=null&&t.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of cn(r))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(n,r,o,i,s,l,a,u)=>{const c=this.store.currentState,{schema:d,doc:h}=c,f=h.resolve(i),p=e.has(a),g=pX({$pos:f,handled:p,view:o,state:c});let m=!1;p||(m=n(a,g)||m);const v={...g,pos:i,direct:u,nodeWithPosition:{node:s,pos:l},getNode:y=>{const b=ke(y)?d.nodes[y]:y;return we(b,{code:re.EXTENSION,message:"The node being checked does not exist"}),b===s.type?{node:s,pos:l}:void 0}};return e.set(a,!0),r(a,v)||m};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,s,l)=>t(this.options.clickMark,this.options.click,n,r,o,i,s,l),handleDoubleClickOn:(n,r,o,i,s,l)=>t(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,s,l),handleTripleClickOn:(n,r,o,i,s,l)=>t(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,s,l),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const s=i.editable;s!==r&&(o.editable(s),r=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())}};lO([lt()],cg.prototype,"isInteracting",1);cg=lO([De({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:st.High})],cg);function pX(e){const{handled:t,view:n,$pos:r,state:o}=e,i={getMark:yR,markRanges:[],view:n,state:o};if(t)return i;for(const{type:s}of r.marksAcross(r)??[]){const l=Wi(r,s);l&&i.markRanges.push(l)}return i.getMark=s=>{const l=ke(s)?o.schema.marks[s]:s;return we(l,{code:re.EXTENSION,message:`The mark ${s} being checked does not exist within the editor schema.`}),i.markRanges.find(a=>a.mark.type===l)},i}class Gt extends Ue{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Gt.valid(r)?new Gt(r):Ue.near(r)}content(){return ae.empty}eq(t){return t instanceof Gt&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Gt(t.resolve(n.pos))}getBookmark(){return new xw(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!gX(t)||!mX(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Gt.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let l=t.node(s);if(n>0?t.indexAfter(s)0){i=l.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let a=t.doc.resolve(o);if(Gt.valid(a))return a}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=t.doc.resolve(o);if(Gt.valid(l))return l}return null}}}Gt.prototype.visible=!1;Gt.findFrom=Gt.findGapCursorFrom;Ue.jsonID("gapcursor",Gt);class xw{constructor(t){this.pos=t}map(t){return new xw(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Gt.valid(n)?new Gt(n):Ue.near(n)}}function gX(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function mX(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function vX(){return new yi({props:{decorations:xX,createSelectionBetween(e,t,n){return t.pos==n.pos&&Gt.valid(n)?new Gt(n):null},handleClick:bX,handleKeyDown:yX,handleDOMEvents:{beforeinput:wX}}})}const yX=Ub({ArrowLeft:If("horiz",-1),ArrowRight:If("horiz",1),ArrowUp:If("vert",-1),ArrowDown:If("vert",1)});function If(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,l=t>0?s.$to:s.$from,a=s.empty;if(s instanceof Ie){if(!i.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=Gt.findGapCursorFrom(l,t,a);return u?(o&&o(r.tr.setSelection(new Gt(u))),!0):!1}}function bX(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Gt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Gt(r))),!0)}function wX(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Gt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=Q.empty;for(let s=r.length-1;s>=0;s--)o=Q.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new ae(o,0,0));return i.setSelection(Ie.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function xX(e){if(!(e.selection instanceof Gt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",We.create(e.doc,[yt.widget(e.selection.head,t,{key:"gapcursor"})])}var kX=Object.defineProperty,EX=Object.getOwnPropertyDescriptor,SX=(e,t,n,r)=>{for(var o=r>1?void 0:r?EX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&kX(t,n,o),o},K0=class extends gt{get name(){return"gapCursor"}createExternalPlugins(){return[vX()]}};K0=SX([De({})],K0);var ug=200,xn=function(){};xn.prototype.append=function(t){return t.length?(t=xn.from(t),!this.length&&t||t.length=n?xn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};xn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};xn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};xn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};xn.from=function(t){return t instanceof xn?t:t&&t.length?new cO(t):xn.empty};var cO=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,l){for(var a=i;a=s;a--)if(o(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=ug)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=ug)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(xn);xn.empty=new cO([]);var CX=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(xn);const TX=500;class zo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,l,a,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,c.push(d);return}if(o){c.push(new Qo(d.map));let f=d.step.map(o.slice(i)),p;f&&s.maybeStep(f).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],u.push(new Qo(p,void 0,void 0,u.length+c.length))),i--,p&&o.appendMap(p,i)}else s.maybeStep(d.step);if(d.selection)return l=o?d.selection.map(o.slice(i)):d.selection,a=new zo(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(t,n,r,o){let i=[],s=this.eventCount,l=this.items,a=!o&&l.length?l.get(l.length-1):null;for(let c=0;c_X&&(l=AX(l,u),s-=u),new zo(l.append(i),s)}remapping(t,n){let r=new vc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new zo(this.items.append(t.map(n=>new Qo(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let a=n;this.items.forEach(h=>{let f=i.getMirror(--a);if(f==null)return;s=Math.min(s,f);let p=i.maps[f];if(h.step){let g=t.steps[f].invert(t.docs[f]),m=h.selection&&h.selection.map(i.slice(a+1,f));m&&l++,r.push(new Qo(p,g,m))}else r.push(new Qo(p))},o);let u=[];for(let h=n;hTX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=t)o.push(s),s.selection&&i++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&i++;let d=new Qo(u.invert(),a,c),h,f=o.length-1;(h=o.length&&o[f].merge(d))?o[f]=h:o.push(d)}}else s.map&&r--},this.items.length,0),new zo(xn.from(o.reverse()),i)}}zo.empty=new zo(xn.empty,0);function AX(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class Qo{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Qo(n.getMap().invert(),n,this.selection)}}}class vs{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _X=20;function RX(e,t,n,r){let o=n.getMeta(li),i;if(o)return o.historyState;n.getMeta(OX)&&(e=new vs(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(li))return s.getMeta(li).redo?new vs(e.done.addTransform(n,void 0,r,bp(t)),e.undone,tT(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new vs(e.done,e.undone.addTransform(n,void 0,r,bp(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!s&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!MX(n,e.prevRanges)),u=s?v1(e.prevRanges,n.mapping):tT(n.mapping.maps[n.steps.length-1]);return new vs(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,bp(t)),zo.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new vs(e.done.rebased(n,i),e.undone.rebased(n,i),v1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new vs(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),v1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function MX(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function tT(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function v1(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=li.getState(e);return!n||n.done.eventCount==0?!1:(t&&uO(n,e,t,!1),!0)},ud=(e,t)=>{let n=li.getState(e);return!n||n.undone.eventCount==0?!1:(t&&uO(n,e,t,!0),!0)};function Y0(e){let t=li.getState(e);return t?t.done.eventCount:0}function LX(e){let t=li.getState(e);return t?t.undone.eventCount:0}var NX=Object.defineProperty,$X=Object.getOwnPropertyDescriptor,kl=(e,t,n,r)=>{for(var o=r>1?void 0:r?$X(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&NX(t,n,o),o},mi=class extends gt{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:s}=this.options,l=tt(i)?i():n,a=tt(s)&&r?s():r,u=e(l,a,o);return t==null||t(u),u}}get name(){return"history"}createKeymap(){return{"Mod-y":br.isMac?()=>!1:this.wrapMethod(ud,this.options.onRedo),"Mod-z":this.wrapMethod(wp,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(ud,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(wp,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(ud,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[IX({depth:e,newGroupDelay:t})]}undo(){return gC(this.wrapMethod(wp,this.options.onUndo))}redo(){return gC(this.wrapMethod(ud,this.options.onRedo))}undoDepth(e=this.store.getState()){return Y0(e)}redoDepth(e=this.store.getState()){return LX(e)}};kl([nn({shortcut:oe.Undo,command:"undo"})],mi.prototype,"undoShortcut",1);kl([nn({shortcut:oe.Redo,command:"redo"})],mi.prototype,"redoShortcut",1);kl([le({disableChaining:!0,description:({t:e})=>e(Yp.UNDO_DESCRIPTION),label:({t:e})=>e(Yp.UNDO_LABEL),icon:"arrowGoBackFill"})],mi.prototype,"undo",1);kl([le({disableChaining:!0,description:({t:e})=>e(Yp.REDO_DESCRIPTION),label:({t:e})=>e(Yp.REDO_LABEL),icon:"arrowGoForwardFill"})],mi.prototype,"redo",1);kl([lt()],mi.prototype,"undoDepth",1);kl([lt()],mi.prototype,"redoDepth",1);mi=kl([De({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],mi);var DX=Object.defineProperty,PX=Object.getOwnPropertyDescriptor,Mm=(e,t,n,r)=>{for(var o=r>1?void 0:r?PX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&DX(t,n,o),o},zX={icon:"paragraph",label:({t:e})=>e(Xp.INSERT_LABEL),description:({t:e})=>e(Xp.INSERT_DESCRIPTION)},FX={icon:"paragraph",label:({t:e})=>e(Xp.CONVERT_LABEL),description:({t:e})=>e(Xp.CONVERT_DESCRIPTION)},nl=class extends zn{get name(){return"paragraph"}createTags(){return[Ee.LastNodeCompatible,Ee.TextBlock,Ee.Block,Ee.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...e.parse(n)})},...t.parseDOM??[]],toDOM:n=>["p",e.dom(n),0]}}convertParagraph(e={}){const{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){const{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};Mm([le(FX)],nl.prototype,"convertParagraph",1);Mm([le(zX)],nl.prototype,"insertParagraph",1);Mm([nn({shortcut:oe.Paragraph,command:"convertParagraph"})],nl.prototype,"shortcut",1);nl=Mm([De({defaultPriority:st.Medium})],nl);var BX=Object.defineProperty,HX=Object.getOwnPropertyDescriptor,UX=(e,t,n,r)=>{for(var o=r>1?void 0:r?HX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&BX(t,n,o),o},X0=class extends zn{get name(){return"text"}createTags(){return[Ee.InlineNode]}createNodeSpec(){return{}}};X0=UX([De({disableExtraAttributes:!0,defaultPriority:st.Medium})],X0);var WX={...Wc.defaultOptions,...nl.defaultOptions,...mi.defaultOptions,excludeExtensions:[]};function VX(e={}){e={...WX,...e};const{content:t,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:s}=e,l={};for(const u of s??[])l[u]=!0;const a=[];if(!l.history){const u=new mi({depth:n,getDispatch:r,getState:o,newGroupDelay:i});a.push(u)}return l.doc||a.push(new Wc({content:t})),l.text||a.push(new X0),l.paragraph||a.push(new nl),l.positioner||a.push(new Uc),l.gapCursor||a.push(new K0),l.events||a.push(new cg),a}var jX=Object.defineProperty,GX=Object.getOwnPropertyDescriptor,KX=(e,t,n,r)=>{for(var o=r>1?void 0:r?GX(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&jX(t,n,o),o},rl=class extends gt{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:Fb(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>YX({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>XX({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=vr.EditorView&&this.store.updateAttributes()}};rl=KX([De({defaultOptions:{emptyNodeClass:aV.IS_EMPTY,placeholder:""}})],rl);function YX(e){const{pluginState:t,extension:n,tr:r,state:o}=e;return r.docChanged?{...n.options,empty:Fb(o.doc)}:t}function XX(e){const{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=t.options;if(!r)return null;const s=[];return n.doc.descendants((l,a)=>{const u=yt.node(a,a+l.nodeSize,{class:o,"data-placeholder":i});s.push(u)}),We.create(n.doc,s)}var dO={exports:{}},to={},hO={exports:{}},fO={};/** * @license React * scheduler.production.min.js * @@ -89,7 +89,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(t){function e(L,$){var D=L.length;L.push($);e:for(;0>>1,U=L[F];if(0>>1;Fo(H,D))Vo(Y,H)?(L[F]=Y,L[V]=D,F=V):(L[F]=H,L[B]=D,F=B);else if(Vo(Y,D))L[F]=Y,L[V]=D,F=V;else break e}}return $}function o(L,$){var D=L.sortIndex-$.sortIndex;return D!==0?D:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,f=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(u)}}function w(L){if(g=!1,b(L),!p)if(n(a)!==null)p=!0,I(k);else{var $=n(u);$!==null&&N(w,$.startTime-L)}}function k(L,$){p=!1,g&&(g=!1,v(T),T=-1),f=!0;var D=h;try{for(b($),d=n(a);d!==null&&(!(d.expirationTime>$)||L&&!_());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var U=F(d.expirationTime<=$);$=t.unstable_now(),typeof U=="function"?d.callback=U:d===n(a)&&r(a),b($)}else r(a);d=n(a)}if(d!==null)var W=!0;else{var B=n(u);B!==null&&N(w,B.startTime-$),W=!1}return W}finally{d=null,h=D,f=!1}}var x=!1,S=null,T=-1,C=5,O=-1;function _(){return!(t.unstable_now()-OL||125F?(L.sortIndex=D,e(u,L),n(a)===null&&L===n(u)&&(g?(v(T),T=-1):g=!0,N(w,D-F))):(L.sortIndex=U,e(a,L),p||f||(p=!0,I(k))),L},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(L){var $=h;return function(){var D=h;h=$;try{return L.apply(this,arguments)}finally{h=D}}}})(iO);oO.exports=iO;var HX=oO.exports;/** + */(function(e){function t(L,$){var D=L.length;L.push($);e:for(;0>>1,U=L[F];if(0>>1;Fo(H,D))jo(Y,H)?(L[F]=Y,L[j]=D,F=j):(L[F]=H,L[B]=D,F=B);else if(jo(Y,D))L[F]=Y,L[j]=D,F=j;else break e}}return $}function o(L,$){var D=L.sortIndex-$.sortIndex;return D!==0?D:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,f=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(L){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=L)r(u),$.sortIndex=$.expirationTime,t(a,$);else break;$=n(u)}}function w(L){if(g=!1,b(L),!p)if(n(a)!==null)p=!0,O(k);else{var $=n(u);$!==null&&N(w,$.startTime-L)}}function k(L,$){p=!1,g&&(g=!1,v(T),T=-1),f=!0;var D=h;try{for(b($),d=n(a);d!==null&&(!(d.expirationTime>$)||L&&!_());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var U=F(d.expirationTime<=$);$=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(a)&&r(a),b($)}else r(a);d=n(a)}if(d!==null)var W=!0;else{var B=n(u);B!==null&&N(w,B.startTime-$),W=!1}return W}finally{d=null,h=D,f=!1}}var x=!1,S=null,T=-1,C=5,I=-1;function _(){return!(e.unstable_now()-IL||125F?(L.sortIndex=D,t(u,L),n(a)===null&&L===n(u)&&(g?(v(T),T=-1):g=!0,N(w,D-F))):(L.sortIndex=U,t(a,L),p||f||(p=!0,O(k))),L},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(L){var $=h;return function(){var D=h;h=$;try{return L.apply(this,arguments)}finally{h=D}}}})(fO);hO.exports=fO;var qX=hO.exports;/** * @license React * react-dom.production.min.js * @@ -97,14 +97,14 @@ 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 sO=P,Xr=HX;function ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),G0=Object.prototype.hasOwnProperty,UX=/^[: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]*$/,JC={},eT={};function WX(t){return G0.call(eT,t)?!0:G0.call(JC,t)?!1:UX.test(t)?eT[t]=!0:(JC[t]=!0,!1)}function VX(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jX(t,e,n,r){if(e===null||typeof e>"u"||VX(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function dr(t,e,n,r,o,i,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=s}var $n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){$n[t]=new dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];$n[e]=new dr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){$n[t]=new dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){$n[t]=new dr(t,2,!1,t,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(t){$n[t]=new dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){$n[t]=new dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){$n[t]=new dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){$n[t]=new dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){$n[t]=new dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var vw=/[\-:]([a-z])/g;function yw(t){return t[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(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(vw,yw);$n[e]=new dr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){$n[t]=new dr(t,1,!1,t.toLowerCase(),null,!1,!1)});$n.xlinkHref=new dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){$n[t]=new dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function bw(t,e,n,r){var o=$n.hasOwnProperty(e)?$n[e]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),q0=Object.prototype.hasOwnProperty,ZX=/^[: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]*$/,rT={},oT={};function QX(e){return q0.call(oT,e)?!0:q0.call(rT,e)?!1:ZX.test(e)?oT[e]=!0:(rT[e]=!0,!1)}function JX(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eq(e,t,n,r){if(t===null||typeof t>"u"||JX(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 hr(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Dn[e]=new hr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Dn[t]=new hr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Dn[e]=new hr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Dn[e]=new hr(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){Dn[e]=new hr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Dn[e]=new hr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Dn[e]=new hr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Dn[e]=new hr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Dn[e]=new hr(e,5,!1,e.toLowerCase(),null,!1,!1)});var kw=/[\-:]([a-z])/g;function Ew(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(kw,Ew);Dn[t]=new hr(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(kw,Ew);Dn[t]=new hr(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(kw,Ew);Dn[t]=new hr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Dn[e]=new hr(e,1,!1,e.toLowerCase(),null,!1,!1)});Dn.xlinkHref=new hr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Dn[e]=new hr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sw(e,t,n,r){var o=Dn.hasOwnProperty(t)?Dn[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{m1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ld(t):""}function GX(t){switch(t.tag){case 5:return ld(t.type);case 16:return ld("Lazy");case 13:return ld("Suspense");case 19:return ld("SuspenseList");case 0:case 2:case 15:return t=v1(t.type,!1),t;case 11:return t=v1(t.type.render,!1),t;case 1:return t=v1(t.type,!0),t;default:return""}}function q0(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case rc:return"Fragment";case nc:return"Portal";case K0:return"Profiler";case ww:return"StrictMode";case Y0:return"Suspense";case X0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case cO:return(t.displayName||"Context")+".Consumer";case lO:return(t._context.displayName||"Context")+".Provider";case xw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case kw:return e=t.displayName||null,e!==null?e:q0(t.type)||"Memo";case gs:e=t._payload,t=t._init;try{return q0(t(e))}catch{}}return null}function KX(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q0(e);case 8:return e===ww?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Gs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function dO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function YX(t){var e=dO(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Mf(t){t._valueTracker||(t._valueTracker=YX(t))}function hO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=dO(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function lg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Z0(t,e){var n=e.checked;return Ht({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function nT(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Gs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function fO(t,e){e=e.checked,e!=null&&bw(t,"checked",e,!1)}function Q0(t,e){fO(t,e);var n=Gs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?J0(t,e.type,n):e.hasOwnProperty("defaultValue")&&J0(t,e.type,Gs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function rT(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function J0(t,e,n){(e!=="number"||lg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var cd=Array.isArray;function wc(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o"+e.valueOf().toString()+"",e=Of.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Qd(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Cd={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},XX=["Webkit","ms","Moz","O"];Object.keys(Cd).forEach(function(t){XX.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Cd[e]=Cd[t]})});function vO(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Cd.hasOwnProperty(t)&&Cd[t]?(""+e).trim():e+"px"}function yO(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vO(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var qX=Ht({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 ny(t,e){if(e){if(qX[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function ry(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 oy=null;function Ew(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var iy=null,xc=null,kc=null;function sT(t){if(t=qh(t)){if(typeof iy!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=Om(e),iy(t.stateNode,t.type,e))}}function bO(t){xc?kc?kc.push(t):kc=[t]:xc=t}function wO(){if(xc){var t=xc,e=kc;if(kc=xc=null,sT(t),e)for(t=0;t>>=0,t===0?32:31-(aq(t)/lq|0)|0}var If=64,Lf=4194304;function ud(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function hg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,i=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=ud(l):(i&=s,i!==0&&(r=ud(i)))}else s=n&~o,s!==0?r=ud(s):i!==0&&(r=ud(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,i=e&-e,o>=i||o===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Yh(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fo(e),t[e]=n}function hq(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Ad),gT=String.fromCharCode(32),mT=!1;function BO(t,e){switch(t){case"keyup":return Bq.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HO(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var oc=!1;function Uq(t,e){switch(t){case"compositionend":return HO(e);case"keypress":return e.which!==32?null:(mT=!0,gT);case"textInput":return t=e.data,t===gT&&mT?null:t;default:return null}}function Wq(t,e){if(oc)return t==="compositionend"||!Ow&&BO(t,e)?(t=zO(),yp=_w=Es=null,oc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wT(n)}}function jO(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jO(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function GO(){for(var t=window,e=lg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=lg(t.document)}return e}function Iw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Qq(t){var e=GO(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&jO(n.ownerDocument.documentElement,n)){if(r!==null&&Iw(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!t.extend&&i>r&&(o=r,r=i,i=o),o=xT(n,i);var s=xT(n,r);o&&s&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ic=null,dy=null,Rd=null,hy=!1;function kT(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hy||ic==null||ic!==lg(r)||(r=ic,"selectionStart"in r&&Iw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rd&&oh(Rd,r)||(Rd=r,r=gg(dy,"onSelect"),0lc||(t.current=yy[lc],yy[lc]=null,lc--)}function Et(t,e){lc++,yy[lc]=t.current,t.current=e}var Ks={},Yn=oa(Ks),kr=oa(!1),tl=Ks;function Uc(t,e){var n=t.type.contextTypes;if(!n)return Ks;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Er(t){return t=t.childContextTypes,t!=null}function vg(){_t(kr),_t(Yn)}function RT(t,e,n){if(Yn.current!==Ks)throw Error(ne(168));Et(Yn,e),Et(kr,n)}function tI(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(ne(108,KX(t)||"Unknown",o));return Ht({},n,r)}function yg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ks,tl=Yn.current,Et(Yn,t),Et(kr,kr.current),!0}function MT(t,e,n){var r=t.stateNode;if(!r)throw Error(ne(169));n?(t=tI(t,e,tl),r.__reactInternalMemoizedMergedChildContext=t,_t(kr),_t(Yn),Et(Yn,t)):_t(kr),Et(kr,n)}var Mi=null,Im=!1,O1=!1;function nI(t){Mi===null?Mi=[t]:Mi.push(t)}function uZ(t){Im=!0,nI(t)}function ia(){if(!O1&&Mi!==null){O1=!0;var t=0,e=ht;try{var n=Mi;for(ht=1;t>=s,o-=s,Di=1<<32-Fo(e)+o|n<T?(C=S,S=null):C=S.sibling;var O=h(v,S,b[T],w);if(O===null){S===null&&(S=C);break}t&&S&&O.alternate===null&&e(v,S),y=i(O,y,T),x===null?k=O:x.sibling=O,x=O,S=C}if(T===b.length)return n(v,S),Mt&&wa(v,T),k;if(S===null){for(;TT?(C=S,S=null):C=S.sibling;var _=h(v,S,O.value,w);if(_===null){S===null&&(S=C);break}t&&S&&_.alternate===null&&e(v,S),y=i(_,y,T),x===null?k=_:x.sibling=_,x=_,S=C}if(O.done)return n(v,S),Mt&&wa(v,T),k;if(S===null){for(;!O.done;T++,O=b.next())O=d(v,O.value,w),O!==null&&(y=i(O,y,T),x===null?k=O:x.sibling=O,x=O);return Mt&&wa(v,T),k}for(S=r(v,S);!O.done;T++,O=b.next())O=f(S,v,T,O.value,w),O!==null&&(t&&O.alternate!==null&&S.delete(O.key===null?T:O.key),y=i(O,y,T),x===null?k=O:x.sibling=O,x=O);return t&&S.forEach(function(R){return e(v,R)}),Mt&&wa(v,T),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===rc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Rf:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===rc){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===gs&&PT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Mu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else e(v,x);x=x.sibling}b.type===rc?(y=ja(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Tp(b.type,b.key,b.props,null,v.mode,w),w.ref=Mu(v,y,b),w.return=v,v=w)}return s(v);case nc:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=F1(b,v.mode,w),y.return=v,v=y}return s(v);case gs:return x=b._init,m(v,y,x(b._payload),w)}if(cd(b))return p(v,y,b,w);if(Cu(b))return g(v,y,b,w);Bf(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=z1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Vc=uI(!0),dI=uI(!1),Zh={},ai=oa(Zh),lh=oa(Zh),ch=oa(Zh);function Pa(t){if(t===Zh)throw Error(ne(174));return t}function Hw(t,e){switch(Et(ch,e),Et(lh,t),Et(ai,Zh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ty(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ty(e,t)}_t(ai),Et(ai,e)}function jc(){_t(ai),_t(lh),_t(ch)}function hI(t){Pa(ch.current);var e=Pa(ai.current),n=ty(e,t.type);e!==n&&(Et(lh,t),Et(ai,n))}function Uw(t){lh.current===t&&(_t(ai),_t(lh))}var Pt=oa(0);function Sg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var I1=[];function Ww(){for(var t=0;tn?n:4,t(!0);var r=L1.transition;L1.transition={};try{t(!1),e()}finally{ht=n,L1.transition=r}}function _I(){return yo().memoizedState}function pZ(t,e,n){var r=Ds(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RI(t))MI(e,n);else if(n=sI(t,e,n,r),n!==null){var o=ir();Bo(n,t,r,o),OI(n,e,r)}}function gZ(t,e,n){var r=Ds(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RI(t))MI(e,o);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var s=e.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Wo(l,s)){var a=e.interleaved;a===null?(o.next=o,Fw(e)):(o.next=a.next,a.next=o),e.interleaved=o;return}}catch{}finally{}n=sI(t,e,o,r),n!==null&&(o=ir(),Bo(n,t,r,o),OI(n,e,r))}}function RI(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function MI(t,e){Md=Cg=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function OI(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Cw(t,n)}}var Tg={readContext:vo,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},mZ={readContext:vo,useCallback:function(t,e){return Zo().memoizedState=[t,e===void 0?null:e],t},useContext:vo,useEffect:FT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,kp(4194308,4,EI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return kp(4194308,4,t,e)},useInsertionEffect:function(t,e){return kp(4,2,t,e)},useMemo:function(t,e){var n=Zo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=pZ.bind(null,Ft,t),[r.memoizedState,t]},useRef:function(t){var e=Zo();return t={current:t},e.memoizedState=t},useState:zT,useDebugValue:Yw,useDeferredValue:function(t){return Zo().memoizedState=t},useTransition:function(){var t=zT(!1),e=t[0];return t=fZ.bind(null,t[1]),Zo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ft,o=Zo();if(Mt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=e(),xn===null)throw Error(ne(349));rl&30||gI(r,e,n)}o.memoizedState=n;var i={value:n,getSnapshot:e};return o.queue=i,FT(vI.bind(null,r,i,t),[t]),r.flags|=2048,hh(9,mI.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Zo(),e=xn.identifierPrefix;if(Mt){var n=Pi,r=Di;n=(r&~(1<<32-Fo(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=uh++,0")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{w1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dd(e):""}function tq(e){switch(e.tag){case 5:return dd(e.type);case 16:return dd("Lazy");case 13:return dd("Suspense");case 19:return dd("SuspenseList");case 0:case 2:case 15:return e=x1(e.type,!1),e;case 11:return e=x1(e.type.render,!1),e;case 1:return e=x1(e.type,!0),e;default:return""}}function ey(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 sc:return"Fragment";case ic:return"Portal";case Z0:return"Profiler";case Cw:return"StrictMode";case Q0:return"Suspense";case J0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vO:return(e.displayName||"Context")+".Consumer";case mO:return(e._context.displayName||"Context")+".Provider";case Tw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Aw:return t=e.displayName||null,t!==null?t:ey(e.type)||"Memo";case ys:t=e._payload,e=e._init;try{return ey(e(t))}catch{}}return null}function nq(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 ey(t);case 8:return t===Cw?"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 qs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rq(e){var t=bO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nf(e){e._valueTracker||(e._valueTracker=rq(e))}function wO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dg(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 ty(e,t){var n=t.checked;return Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xO(e,t){t=t.checked,t!=null&&Sw(e,"checked",t,!1)}function ny(e,t){xO(e,t);var n=qs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ry(e,t.type,n):t.hasOwnProperty("defaultValue")&&ry(e,t.type,qs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aT(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ry(e,t,n){(t!=="number"||dg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hd=Array.isArray;function Ec(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=$f.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _d={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},oq=["Webkit","ms","Moz","O"];Object.keys(_d).forEach(function(e){oq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_d[t]=_d[e]})});function CO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_d.hasOwnProperty(e)&&_d[e]?(""+t).trim():t+"px"}function TO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=CO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var iq=Ht({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 sy(e,t){if(t){if(iq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function ay(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 ly=null;function _w(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cy=null,Sc=null,Cc=null;function uT(e){if(e=ef(e)){if(typeof cy!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=$m(t),cy(e.stateNode,e.type,t))}}function AO(e){Sc?Cc?Cc.push(e):Cc=[e]:Sc=e}function _O(){if(Sc){var e=Sc,t=Cc;if(Cc=Sc=null,uT(e),t)for(e=0;e>>=0,e===0?32:31-(mq(e)/vq|0)|0}var Df=64,Pf=4194304;function fd(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 gg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=fd(l):(i&=s,i!==0&&(r=fd(i)))}else s=n&~o,s!==0?r=fd(s):i!==0&&(r=fd(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ho(t),e[t]=n}function xq(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Md),bT=String.fromCharCode(32),wT=!1;function YO(e,t){switch(e){case"keyup":return Xq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ac=!1;function Zq(e,t){switch(e){case"compositionend":return XO(t);case"keypress":return t.which!==32?null:(wT=!0,bT);case"textInput":return e=t.data,e===bT&&wT?null:e;default:return null}}function Qq(e,t){if(ac)return e==="compositionend"||!Dw&&YO(e,t)?(e=GO(),kp=Lw=Ts=null,ac=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ST(n)}}function JO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eI(){for(var e=window,t=dg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=dg(e.document)}return t}function Pw(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 aZ(e){var t=eI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JO(n.ownerDocument.documentElement,n)){if(r!==null&&Pw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=CT(n,i);var s=CT(n,r);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>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,lc=null,gy=null,Id=null,my=!1;function TT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;my||lc==null||lc!==dg(r)||(r=lc,"selectionStart"in r&&Pw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Id&&lh(Id,r)||(Id=r,r=yg(gy,"onSelect"),0dc||(e.current=ky[dc],ky[dc]=null,dc--)}function Et(e,t){dc++,ky[dc]=e.current,e.current=t}var Zs={},Xn=la(Zs),Sr=la(!1),ol=Zs;function jc(e,t){var n=e.type.contextTypes;if(!n)return Zs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Cr(e){return e=e.childContextTypes,e!=null}function wg(){_t(Sr),_t(Xn)}function LT(e,t,n){if(Xn.current!==Zs)throw Error(ne(168));Et(Xn,t),Et(Sr,n)}function cI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ne(108,nq(e)||"Unknown",o));return Ht({},n,r)}function xg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zs,ol=Xn.current,Et(Xn,e),Et(Sr,Sr.current),!0}function NT(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=cI(e,t,ol),r.__reactInternalMemoizedMergedChildContext=e,_t(Sr),_t(Xn),Et(Xn,e)):_t(Sr),Et(Sr,n)}var Ii=null,Dm=!1,$1=!1;function uI(e){Ii===null?Ii=[e]:Ii.push(e)}function bZ(e){Dm=!0,uI(e)}function ca(){if(!$1&&Ii!==null){$1=!0;var e=0,t=ht;try{var n=Ii;for(ht=1;e>=s,o-=s,zi=1<<32-Ho(t)+o|n<T?(C=S,S=null):C=S.sibling;var I=h(v,S,b[T],w);if(I===null){S===null&&(S=C);break}e&&S&&I.alternate===null&&t(v,S),y=i(I,y,T),x===null?k=I:x.sibling=I,x=I,S=C}if(T===b.length)return n(v,S),Ot&&Sa(v,T),k;if(S===null){for(;TT?(C=S,S=null):C=S.sibling;var _=h(v,S,I.value,w);if(_===null){S===null&&(S=C);break}e&&S&&_.alternate===null&&t(v,S),y=i(_,y,T),x===null?k=_:x.sibling=_,x=_,S=C}if(I.done)return n(v,S),Ot&&Sa(v,T),k;if(S===null){for(;!I.done;T++,I=b.next())I=d(v,I.value,w),I!==null&&(y=i(I,y,T),x===null?k=I:x.sibling=I,x=I);return Ot&&Sa(v,T),k}for(S=r(v,S);!I.done;T++,I=b.next())I=f(S,v,T,I.value,w),I!==null&&(e&&I.alternate!==null&&S.delete(I.key===null?T:I.key),y=i(I,y,T),x===null?k=I:x.sibling=I,x=I);return e&&S.forEach(function(R){return t(v,R)}),Ot&&Sa(v,T),k}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===sc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Lf:e:{for(var k=b.key,x=y;x!==null;){if(x.key===k){if(k=b.type,k===sc){if(x.tag===7){n(v,x.sibling),y=o(x,b.props.children),y.return=v,v=y;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ys&&HT(k)===x.type){n(v,x.sibling),y=o(x,b.props),y.ref=Lu(v,x,b),y.return=v,v=y;break e}n(v,x);break}else t(v,x);x=x.sibling}b.type===sc?(y=Xa(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=Mp(b.type,b.key,b.props,null,v.mode,w),w.ref=Lu(v,y,b),w.return=v,v=w)}return s(v);case ic:e:{for(x=b.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=W1(b,v.mode,w),y.return=v,v=y}return s(v);case ys:return x=b._init,m(v,y,x(b._payload),w)}if(hd(b))return p(v,y,b,w);if(_u(b))return g(v,y,b,w);Vf(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=U1(b,v.mode,w),y.return=v,v=y),s(v)):n(v,y)}return m}var Kc=yI(!0),bI=yI(!1),tf={},ui=la(tf),hh=la(tf),fh=la(tf);function Ha(e){if(e===tf)throw Error(ne(174));return e}function Gw(e,t){switch(Et(fh,t),Et(hh,e),Et(ui,tf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:iy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=iy(t,e)}_t(ui),Et(ui,t)}function Yc(){_t(ui),_t(hh),_t(fh)}function wI(e){Ha(fh.current);var t=Ha(ui.current),n=iy(t,e.type);t!==n&&(Et(hh,e),Et(ui,n))}function Kw(e){hh.current===e&&(_t(ui),_t(hh))}var Pt=la(0);function Ag(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 D1=[];function Yw(){for(var e=0;en?n:4,e(!0);var r=P1.transition;P1.transition={};try{e(!1),t()}finally{ht=n,P1.transition=r}}function DI(){return wo().memoizedState}function EZ(e,t,n){var r=Fs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},PI(e))zI(t,n);else if(n=pI(e,t,n,r),n!==null){var o=sr();Uo(n,e,r,o),FI(n,t,r)}}function SZ(e,t,n){var r=Fs(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(PI(e))zI(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,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,jo(l,s)){var a=t.interleaved;a===null?(o.next=o,Vw(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=pI(e,t,o,r),n!==null&&(o=sr(),Uo(n,e,r,o),FI(n,t,r))}}function PI(e){var t=e.alternate;return e===Ft||t!==null&&t===Ft}function zI(e,t){Ld=_g=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FI(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mw(e,n)}}var Rg={readContext:bo,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},CZ={readContext:bo,useCallback:function(e,t){return Jo().memoizedState=[e,t===void 0?null:t],e},useContext:bo,useEffect:WT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tp(4194308,4,OI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tp(4,2,e,t)},useMemo:function(e,t){var n=Jo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=EZ.bind(null,Ft,e),[r.memoizedState,e]},useRef:function(e){var t=Jo();return e={current:e},t.memoizedState=e},useState:UT,useDebugValue:Jw,useDeferredValue:function(e){return Jo().memoizedState=e},useTransition:function(){var e=UT(!1),t=e[0];return e=kZ.bind(null,e[1]),Jo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ft,o=Jo();if(Ot){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),kn===null)throw Error(ne(349));sl&30||EI(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,WT(CI.bind(null,r,i,e),[e]),r.flags|=2048,mh(9,SI.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jo(),t=kn.identifierPrefix;if(Ot){var n=Fi,r=zi;n=(r&~(1<<32-Ho(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ph++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ti]=e,t[ah]=r,BI(t,e,!1,!1),e.stateNode=t;e:{switch(s=ry(n,r),n){case"dialog":At("cancel",t),At("close",t),o=r;break;case"iframe":case"object":case"embed":At("load",t),o=r;break;case"video":case"audio":for(o=0;oKc&&(e.flags|=128,r=!0,Ou(i,!1),e.lanes=4194304)}else{if(!r)if(t=Sg(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ou(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Mt)return Hn(e),null}else 2*Yt()-i.renderingStartTime>Kc&&n!==1073741824&&(e.flags|=128,r=!0,Ou(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(n=i.last,n!==null?n.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Yt(),e.sibling=null,n=Pt.current,Et(Pt,r?n&1|2:n&1),e):(Hn(e),null);case 22:case 23:return ex(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Dr&1073741824&&(Hn(e),e.subtreeFlags&6&&(e.flags|=8192)):Hn(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function SZ(t,e){switch(Nw(e),e.tag){case 1:return Er(e.type)&&vg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return jc(),_t(kr),_t(Yn),Ww(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Uw(e),null;case 13:if(_t(Pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Wc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Pt),null;case 4:return jc(),null;case 10:return zw(e.type._context),null;case 22:case 23:return ex(),null;case 24:return null;default:return null}}var Uf=!1,Gn=!1,CZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function hc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(t,e,r)}else n.current=null}function My(t,e,n){try{n()}catch(r){jt(t,e,r)}}var YT=!1;function TZ(t,e){if(fy=fg,t=GO(),Iw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(py={focusedElem:t,selectionRange:n},fg=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:Oo(e.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return p=YT,YT=!1,p}function Od(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var i=o.destroy;o.destroy=void 0,i!==void 0&&My(e,n,i)}o=o.next}while(o!==r)}}function $m(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Oy(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function WI(t){var e=t.alternate;e!==null&&(t.alternate=null,WI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ti],delete e[ah],delete e[vy],delete e[lZ],delete e[cZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function VI(t){return t.tag===5||t.tag===3||t.tag===4}function XT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||VI(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Iy(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=mg));else if(r!==4&&(t=t.child,t!==null))for(Iy(t,e,n),t=t.sibling;t!==null;)Iy(t,e,n),t=t.sibling}function Ly(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Ly(t,e,n),t=t.sibling;t!==null;)Ly(t,e,n),t=t.sibling}var On=null,Io=!1;function is(t,e,n){for(n=n.child;n!==null;)jI(t,e,n),n=n.sibling}function jI(t,e,n){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(Am,n)}catch{}switch(n.tag){case 5:Gn||hc(n,e);case 6:var r=On,o=Io;On=null,is(t,e,n),On=r,Io=o,On!==null&&(Io?(t=On,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):On.removeChild(n.stateNode));break;case 18:On!==null&&(Io?(t=On,n=n.stateNode,t.nodeType===8?M1(t.parentNode,n):t.nodeType===1&&M1(t,n),nh(t)):M1(On,n.stateNode));break;case 4:r=On,o=Io,On=n.stateNode.containerInfo,Io=!0,is(t,e,n),On=r,Io=o;break;case 0:case 11:case 14:case 15:if(!Gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&My(n,e,s),o=o.next}while(o!==r)}is(t,e,n);break;case 1:if(!Gn&&(hc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,e,l)}is(t,e,n);break;case 21:is(t,e,n);break;case 22:n.mode&1?(Gn=(r=Gn)||n.memoizedState!==null,is(t,e,n),Gn=r):is(t,e,n);break;default:is(t,e,n)}}function qT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new CZ),e.forEach(function(r){var o=$Z.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ao(t,e){var n=e.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_Z(r/1960))-r,10t?16:t,Ss===null)var r=!1;else{if(t=Ss,Ss=null,Rg=0,Ye&6)throw Error(ne(331));var o=Ye;for(Ye|=4,pe=t.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aYt()-Qw?Va(t,0):Zw|=n),Sr(t,e)}function JI(t,e){e===0&&(t.mode&1?(e=Lf,Lf<<=1,!(Lf&130023424)&&(Lf=4194304)):e=1);var n=ir();t=Vi(t,e),t!==null&&(Yh(t,e,n),Sr(t,n))}function NZ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),JI(t,n)}function $Z(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(e),JI(t,n)}var eL;eL=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||kr.current)br=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return br=!1,kZ(t,e,n);br=!!(t.flags&131072)}else br=!1,Mt&&e.flags&1048576&&rI(e,wg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ep(t,e),t=e.pendingProps;var o=Uc(e,Yn.current);Sc(e,n),o=jw(null,e,r,t,o,n);var i=Gw();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Er(r)?(i=!0,yg(e)):i=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Bw(e),o.updater=Lm,e.stateNode=o,o._reactInternals=e,Ey(e,r,t,n),e=Ty(null,e,r,!0,i,n)):(e.tag=0,Mt&&i&&Lw(e),tr(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ep(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=PZ(r),t=Oo(r,t),o){case 0:e=Cy(null,e,r,t,n);break e;case 1:e=jT(null,e,r,t,n);break e;case 11:e=WT(null,e,r,t,n);break e;case 14:e=VT(null,e,r,Oo(r.type,t),n);break e}throw Error(ne(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Cy(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),jT(t,e,r,o,n);case 3:e:{if(PI(e),t===null)throw Error(ne(387));r=e.pendingProps,i=e.memoizedState,o=i.element,aI(t,e),Eg(e,r,null,n);var s=e.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){o=Gc(Error(ne(423)),e),e=GT(t,e,r,n,o);break e}else if(r!==o){o=Gc(Error(ne(424)),e),e=GT(t,e,r,n,o);break e}else for(Wr=Ls(e.stateNode.containerInfo.firstChild),jr=e,Mt=!0,No=null,n=dI(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wc(),r===o){e=ji(t,e,n);break e}tr(t,e,r,n)}e=e.child}return e;case 5:return hI(e),t===null&&wy(e),r=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,s=o.children,gy(r,o)?s=null:i!==null&&gy(r,i)&&(e.flags|=32),DI(t,e),tr(t,e,s,n),e.child;case 6:return t===null&&wy(e),null;case 13:return zI(t,e,n);case 4:return Hw(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Vc(e,null,r,n):tr(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),WT(t,e,r,o,n);case 7:return tr(t,e,e.pendingProps,n),e.child;case 8:return tr(t,e,e.pendingProps.children,n),e.child;case 12:return tr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,i=e.memoizedProps,s=o.value,Et(xg,r._currentValue),r._currentValue=s,i!==null)if(Wo(i.value,s)){if(i.children===o.children&&!kr.current){e=ji(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Fi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),xy(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===e.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),xy(s,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}tr(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,Sc(e,n),o=vo(o),r=r(o),e.flags|=1,tr(t,e,r,n),e.child;case 14:return r=e.type,o=Oo(r,e.pendingProps),o=Oo(r.type,o),VT(t,e,r,o,n);case 15:return NI(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Oo(r,o),Ep(t,e),e.tag=1,Er(r)?(t=!0,yg(e)):t=!1,Sc(e,n),cI(e,r,o),Ey(e,r,o,n),Ty(null,e,r,!0,t,n);case 19:return FI(t,e,n);case 22:return $I(t,e,n)}throw Error(ne(156,e.tag))};function tL(t,e){return AO(t,e)}function DZ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function co(t,e,n,r){return new DZ(t,e,n,r)}function nx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function PZ(t){if(typeof t=="function")return nx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===xw)return 11;if(t===kw)return 14}return 2}function Ps(t,e){var n=t.alternate;return n===null?(n=co(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Tp(t,e,n,r,o,i){var s=2;if(r=t,typeof t=="function")nx(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case rc:return ja(n.children,o,i,e);case ww:s=8,o|=8;break;case K0:return t=co(12,n,e,o|2),t.elementType=K0,t.lanes=i,t;case Y0:return t=co(13,n,e,o),t.elementType=Y0,t.lanes=i,t;case X0:return t=co(19,n,e,o),t.elementType=X0,t.lanes=i,t;case uO:return Pm(n,o,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case lO:s=10;break e;case cO:s=9;break e;case xw:s=11;break e;case kw:s=14;break e;case gs:s=16,r=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=co(s,n,e,o),e.elementType=t,e.type=r,e.lanes=i,e}function ja(t,e,n,r){return t=co(7,t,r,e),t.lanes=n,t}function Pm(t,e,n,r){return t=co(22,t,r,e),t.elementType=uO,t.lanes=n,t.stateNode={isHidden:!1},t}function z1(t,e,n){return t=co(6,t,null,e),t.lanes=n,t}function F1(t,e,n){return e=co(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function zZ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=b1(0),this.expirationTimes=b1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function rx(t,e,n,r,o,i,s,l,a){return t=new zZ(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=co(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bw(i),t}function FZ(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iL)}catch(t){console.error(t)}}iL(),rO.exports=Zr;var Qh=rO.exports;const jf=jo(Qh);var VZ=Object.defineProperty,jZ=Object.getOwnPropertyDescriptor,GZ=(t,e,n,r)=>{for(var o=r>1?void 0:r?jZ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&VZ(e,n,o),o},sL=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xe=(t,e,n)=>(sL(t,e,"read from private field"),n?n.call(t):e.get(t)),$r=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Lr=(t,e,n,r)=>(sL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),hd,KZ=class{constructor(){this.portals=new Map,$r(this,hd,vm()),this.on=t=>xe(this,hd).on("update",t),this.once=t=>{const e=xe(this,hd).on("update",n=>{e(),t(n)});return e}}update(){xe(this,hd).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??Rc()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:Rc()})}remove(t){this.portals.delete(t),this.update()}};hd=new WeakMap;var YZ=t=>{const{portals:e}=t;return ee.createElement(ee.Fragment,null,e.map(([n,{Component:r,key:o}])=>Qh.createPortal(ee.createElement(r,null),n,o)))};function XZ(t){const[e,n]=P.useState(()=>Array.from(t.portals.entries()));return P.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),P.useMemo(()=>e,[e])}var Dt,fd,ka,pd,Ap,gd,Zl,md,_p,Ci,er,zy,aL=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:o,options:i}){$r(this,Dt,void 0),$r(this,fd,[]),$r(this,ka,void 0),$r(this,pd,void 0),$r(this,Ap,void 0),$r(this,gd,void 0),$r(this,Zl,void 0),$r(this,md,!1),$r(this,_p,void 0),$r(this,Ci,void 0),$r(this,er,void 0),$r(this,zy,a=>{a&&(we(xe(this,Ci),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${xe(this,Dt).type.name}' which doesn't support content.`}),a.append(xe(this,Ci)))}),this.Component=()=>{const a=xe(this,Ap);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${xe(this,Dt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:xe(this,ka),getPosition:xe(this,gd),node:xe(this,Dt),forwardRef:xe(this,zy),decorations:xe(this,fd)})},this.updateAttributes=a=>{if(!xe(this,ka).editable)return;const u=xe(this,gd).call(this);if(u==null)return;const c=xe(this,ka).state.tr.setNodeMarkup(u,void 0,{...xe(this,Dt).attrs,...a});xe(this,ka).dispatch(c)},we(tt(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Lr(this,Dt,e),Lr(this,ka,r),Lr(this,pd,n),Lr(this,Ap,o),Lr(this,gd,t),Lr(this,Zl,i),Lr(this,er,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};Lr(this,_p,s??void 0),Lr(this,Ci,l),xe(this,Ci)&&xe(this,er).append(xe(this,Ci)),this.setDomAttributes(xe(this,Dt),xe(this,er)),this.Component.displayName=nR(`${xe(this,Dt).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(o,i,s)=>new aL({options:r,node:o,view:i,getPosition:s,portalContainer:e,ReactComponent:n})}get selected(){return xe(this,md)}get contentDOM(){return xe(this,_p)}get dom(){return xe(this,er)}renderComponent(){xe(this,pd).render({Component:this.Component,container:xe(this,er)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=xe(this,Zl),n=xe(this,Dt).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${tS(xe(this,Dt).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(xe(this,Dt).isLeaf)return;const n=(e=(t=xe(this,Dt).type.spec).toDOM)==null?void 0:e.call(t,xe(this,Dt));if(!n)return;const{contentDOM:r,dom:o}=Ur.renderSpec(document,n);let i;if(zt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${tS(xe(this,Dt).type.name)}-node-view-content-wrapper`),i.append(r)),zt(r),{wrapper:i,contentDOM:r}}update(t,e){return dm({types:xe(this,Dt).type,node:t})?(xe(this,Dt)===t&&xe(this,fd)===e||(xe(this,Dt).sameMarkup(t)||this.setDomAttributes(t,xe(this,er)),Lr(this,Dt,t),Lr(this,fd,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=xe(this,Dt).type.spec;let r=t.attrs;if(n){const o=n(t);if(ke(o)||qZ(o))return;Zs(o[1])&&(r=o[1])}for(const[o,i]of cn(r))e.setAttribute(o,i)}selectNode(){Lr(this,md,!0),xe(this,er)&&xe(this,er).classList.add(ZE),this.renderComponent()}deselectNode(){Lr(this,md,!1),xe(this,er)&&xe(this,er).classList.remove(ZE),this.renderComponent()}destroy(){xe(this,pd).remove(xe(this,er))}ignoreMutation(t){return t.type==="selection"?!xe(this,Dt).type.spec.selectable:xe(this,Ci)?!xe(this,Ci).contains(t.target):!0}stopEvent(t){var e;if(!xe(this,er))return!1;if(tt(xe(this,Zl).stopEvent))return xe(this,Zl).stopEvent({event:t});const n=t.target;if(!(xe(this,er).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!xe(this,Dt).type.spec.draggable,l=Le.isSelectable(xe(this,Dt)),a=t.type==="copy",u=t.type==="paste",c=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!s&&l&&h&&t.preventDefault(),!(h||o||a||u||c||d&&l)}},oA=aL;Dt=new WeakMap;fd=new WeakMap;ka=new WeakMap;pd=new WeakMap;Ap=new WeakMap;gd=new WeakMap;Zl=new WeakMap;md=new WeakMap;_p=new WeakMap;Ci=new WeakMap;er=new WeakMap;zy=new WeakMap;function qZ(t){return Zp(t)||Zs(t)&&Zp(t.dom)}var ph=class extends yt{constructor(){super(...arguments),this.portalContainer=new KZ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=be(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Vh(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=oA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=cn({...this.options.nodeViewComponents,...e});for(const[r,o]of n)t[r]=oA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return t}};ph=GZ([Pe({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ph);var ZZ=Object.defineProperty,QZ=Object.getOwnPropertyDescriptor,JZ=(t,e,n,r)=>{for(var o=r>1?void 0:r?QZ(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ZZ(e,n,o),o},eQ={...el.defaultOptions,...ph.defaultOptions},tQ=[...el.staticKeys,...ph.staticKeys],gh=class extends yt{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(el).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new el({emptyNodeClass:t,placeholder:e,priority:dt.Low}),new ph({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};gh=JZ([Pe({defaultOptions:eQ,staticKeys:tQ})],gh);var lL={};Object.defineProperty(lL,"__esModule",{value:!0});function nQ(){for(var t=[],e=0;e{if(!e.has(t))throw TypeError("Cannot "+n)},B1=(t,e,n)=>(cL(t,e,"read from private field"),n?n.call(t):e.get(t)),rQ=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},oQ=(t,e,n,r)=>(cL(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function iQ(){const[,t]=P.useState(be());return P.useCallback(()=>{t(be())},[])}var uL=P.createContext(null);function vi(t){const e=P.useContext(uL),n=P.useRef(iQ());we(e,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return P.useEffect(()=>{let o=t;if(o){if(Zs(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(tt(o))return r("updated",o)}},[r,t]),e}function hr(t=!0){return vi({autoUpdate:t}).active}function sQ(t=!1){return vi(t?{autoUpdate:!0}:void 0).attrs}function gu(){return vi().chain.new()}function kn(){return vi().commands}function ax(){return vi({autoUpdate:!0}).getState().selection}function Jh(t,e=void 0,n){const{getExtension:r}=vi(),o=P.useMemo(()=>r(t),[t,r]);let i;if(tt(e)?i=n?[o,...n]:[o,e]:i=e?[o,...Object.values(e)]:[],P.useEffect(()=>{tt(e)||!e||o.setOptions(e)},i),P.useEffect(()=>{if(tt(e))return e({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!e)return o}function aQ(t,e,n){const r=P.useCallback(({addHandler:o})=>o(e,n),[n,e]);return Jh(t,r)}function ef(t=!1){return vi(t?{autoUpdate:!0}:void 0).helpers}var[lQ,cQ]=zV(({props:t})=>{const e=t.locale??"en",n=t.i18n??Cm,r=t.supportedLocales??[e],o=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:o}});function lA(t,e={}){const{core:n,react:r,...o}=e;return tH(t)?t:eH.create(()=>[...hR(t),new gh(r),...$X(n)],o)}function uQ(t,e={}){const n=P.useRef(t),r=P.useRef(e),[o,i]=P.useState(()=>lA(t,e));return n.current=t,r.current=e,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>lA(n.current,r.current))}),[o]),o}var dQ=typeof rr=="object"&&rr.__esModule&&rr.default?rr.default:rr,Ql,hQ=class extends XB{constructor(t){if(super(t),rQ(this,Ql,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=e??be();return{[r]:dQ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),oQ(this,Ql,e),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(el).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new iz(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:o}=e;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.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:t,tr:r,transactions:o});return}!r&&!o&&(t=t.apply(t.tr.setMeta(QE,{}))),this.view.updateState(t),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:t,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:o})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(QE,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){we(B1(this,Ql),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(B1(this,Ql),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&B1(this,Ql)&&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}};Ql=new WeakMap;var dL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function fQ(t){const e=P.useRef();return dL(()=>{e.current=t}),e.current}function pQ(t){const{manager:e,state:n}=t,{placeholder:r,editable:o}=t;P.useRef(!0).current&&!Fs(r)&&e.getExtension(gh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&e.getExtension(gh).setOptions({placeholder:r})},[r,e]);const[s]=P.useState(()=>{if(n)return n;const a=e.createEmptyDoc(),[u,c]=Bt(t.initialContent)?t.initialContent:[t.initialContent??a];return e.createState({content:u,selection:c})}),l=gQ({initialEditorState:s,getProps:()=>t});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),mQ(l),l.frameworkOutput}function gQ(t){const e=P.useRef(t);e.current=t;const n=P.useMemo(()=>new hQ(e.current),[]);return n.update(t),n}function mQ(t){const{state:e}=t.props,n=P.useRef(!!e),r=fQ(e);dL(()=>{const o=e?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.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."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function vQ(t={}){const{content:e,document:n,selection:r,extensions:o,...i}=t,s=uQ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:e??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var cA={doc:!1,selection:!1,storedMark:!1};function yQ(){const[t,e]=P.useState(cA);return aQ(tg,"applyState",P.useCallback(({tr:n})=>{const r={...cA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),e(r)},[])),t}var Fy=()=>ee.createElement("div",{className:wW.EDITOR_WRAPPER,...vi().getRootProps()}),bQ=t=>(t.hook(),null);function wQ(t){const{children:e,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=t,a=pQ(l),u=XZ(a.portalContainer),c=n==="start"||n===!0||!e&&Fs(n),d=n==="end";return ee.createElement(lQ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(uL.Provider,{value:a},ee.createElement(YZ,{portals:u}),s.map((h,f)=>ee.createElement(bQ,{hook:h,key:f})),c&&ee.createElement(Fy,null),e,d&&ee.createElement(Fy,null)))}const xQ={black:"#000",white:"#fff"},mh=xQ,kQ={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"},zl=kQ,EQ={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"},Fl=EQ,SQ={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"},Bl=SQ,CQ={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"},Hl=CQ,TQ={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"},Ul=TQ,AQ={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"},Lu=AQ,_Q={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"},RQ=_Q;function K(){return K=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=hL(t[n])}),e}function Gr(t,e,n={clone:!0}){const r=n.clone?K({},t):t;return Oi(t)&&Oi(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Oi(e[o])&&o in t&&Oi(t[o])?r[o]=Gr(t[o],e[o],n):n.clone?r[o]=Oi(e[o])?hL(e[o]):e[o]:r[o]=e[o])}),r}var fL={exports:{}},MQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OQ=MQ,IQ=OQ;function pL(){}function gL(){}gL.resetWarningCache=pL;var LQ=function(){function t(r,o,i,s,l,a){if(a!==IQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:gL,resetWarningCache:pL};return n.PropTypes=n,n};fL.exports=LQ();var lx=fL.exports;function Yc(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ri]=t,e[dh]=r,YI(e,t,!1,!1),t.stateNode=e;e:{switch(s=ay(n,r),n){case"dialog":At("cancel",e),At("close",e),o=r;break;case"iframe":case"object":case"embed":At("load",e),o=r;break;case"video":case"audio":for(o=0;oqc&&(t.flags|=128,r=!0,Nu(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ag(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ot)return Un(t),null}else 2*Yt()-i.renderingStartTime>qc&&n!==1073741824&&(t.flags|=128,r=!0,Nu(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Yt(),t.sibling=null,n=Pt.current,Et(Pt,r?n&1|2:n&1),t):(Un(t),null);case 22:case 23:return ix(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Fr&1073741824&&(Un(t),t.subtreeFlags&6&&(t.flags|=8192)):Un(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function LZ(e,t){switch(Fw(t),t.tag){case 1:return Cr(t.type)&&wg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yc(),_t(Sr),_t(Xn),Yw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kw(t),null;case 13:if(_t(Pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Gc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _t(Pt),null;case 4:return Yc(),null;case 10:return Ww(t.type._context),null;case 22:case 23:return ix(),null;case 24:return null;default:return null}}var Gf=!1,Kn=!1,NZ=typeof WeakSet=="function"?WeakSet:Set,pe=null;function gc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(e,t,r)}else n.current=null}function Ny(e,t,n){try{n()}catch(r){jt(e,t,r)}}var QT=!1;function $Z(e,t){if(vy=mg,e=eI(),Pw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var f;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++c===r&&(a=s),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(yy={focusedElem:e,selectionRange:n},mg=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Lo(t.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){jt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return p=QT,QT=!1,p}function Nd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ny(t,n,i)}o=o.next}while(o!==r)}}function Fm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $y(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ZI(e){var t=e.alternate;t!==null&&(e.alternate=null,ZI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ri],delete t[dh],delete t[xy],delete t[vZ],delete t[yZ])),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 QI(e){return e.tag===5||e.tag===3||e.tag===4}function JT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QI(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 Dy(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bg));else if(r!==4&&(e=e.child,e!==null))for(Dy(e,t,n),e=e.sibling;e!==null;)Dy(e,t,n),e=e.sibling}function Py(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Py(e,t,n),e=e.sibling;e!==null;)Py(e,t,n),e=e.sibling}var On=null,No=!1;function ls(e,t,n){for(n=n.child;n!==null;)JI(e,t,n),n=n.sibling}function JI(e,t,n){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(Om,n)}catch{}switch(n.tag){case 5:Kn||gc(n,t);case 6:var r=On,o=No;On=null,ls(e,t,n),On=r,No=o,On!==null&&(No?(e=On,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):On.removeChild(n.stateNode));break;case 18:On!==null&&(No?(e=On,n=n.stateNode,e.nodeType===8?N1(e.parentNode,n):e.nodeType===1&&N1(e,n),sh(e)):N1(On,n.stateNode));break;case 4:r=On,o=No,On=n.stateNode.containerInfo,No=!0,ls(e,t,n),On=r,No=o;break;case 0:case 11:case 14:case 15:if(!Kn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ny(n,t,s),o=o.next}while(o!==r)}ls(e,t,n);break;case 1:if(!Kn&&(gc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,t,l)}ls(e,t,n);break;case 21:ls(e,t,n);break;case 22:n.mode&1?(Kn=(r=Kn)||n.memoizedState!==null,ls(e,t,n),Kn=r):ls(e,t,n);break;default:ls(e,t,n)}}function eA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new NZ),t.forEach(function(r){var o=VZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ro(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*PZ(r/1960))-r,10e?16:e,As===null)var r=!1;else{if(e=As,As=null,Ig=0,Ye&6)throw Error(ne(331));var o=Ye;for(Ye|=4,pe=e.current;pe!==null;){var i=pe,s=i.child;if(pe.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aYt()-rx?Ya(e,0):nx|=n),Tr(e,t)}function aL(e,t){t===0&&(e.mode&1?(t=Pf,Pf<<=1,!(Pf&130023424)&&(Pf=4194304)):t=1);var n=sr();e=Gi(e,t),e!==null&&(Qh(e,t,n),Tr(e,n))}function WZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aL(e,n)}function VZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),aL(e,n)}var lL;lL=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Sr.current)xr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xr=!1,OZ(e,t,n);xr=!!(e.flags&131072)}else xr=!1,Ot&&t.flags&1048576&&dI(t,Eg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ap(e,t),e=t.pendingProps;var o=jc(t,Xn.current);Ac(t,n),o=qw(null,t,r,e,o,n);var i=Zw();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,Cr(r)?(i=!0,xg(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jw(t),o.updater=Pm,t.stateNode=o,o._reactInternals=t,Ay(t,r,e,n),t=My(null,t,r,!0,i,n)):(t.tag=0,Ot&&i&&zw(t),nr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ap(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=GZ(r),e=Lo(r,e),o){case 0:t=Ry(null,t,r,e,n);break e;case 1:t=XT(null,t,r,e,n);break e;case 11:t=KT(null,t,r,e,n);break e;case 14:t=YT(null,t,r,Lo(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Lo(r,o),Ry(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Lo(r,o),XT(e,t,r,o,n);case 3:e:{if(jI(t),e===null)throw Error(ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,gI(e,t),Tg(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Xc(Error(ne(423)),t),t=qT(e,t,r,n,o);break e}else if(r!==o){o=Xc(Error(ne(424)),t),t=qT(e,t,r,n,o);break e}else for(Gr=Ds(t.stateNode.containerInfo.firstChild),Yr=t,Ot=!0,Do=null,n=bI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gc(),r===o){t=Ki(e,t,n);break e}nr(e,t,r,n)}t=t.child}return t;case 5:return wI(t),e===null&&Sy(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,by(r,o)?s=null:i!==null&&by(r,i)&&(t.flags|=32),VI(e,t),nr(e,t,s,n),t.child;case 6:return e===null&&Sy(t),null;case 13:return GI(e,t,n);case 4:return Gw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Kc(t,null,r,n):nr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Lo(r,o),KT(e,t,r,o,n);case 7:return nr(e,t,t.pendingProps,n),t.child;case 8:return nr(e,t,t.pendingProps.children,n),t.child;case 12:return nr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Et(Sg,r._currentValue),r._currentValue=s,i!==null)if(jo(i.value,s)){if(i.children===o.children&&!Sr.current){t=Ki(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Hi(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Cy(i.return,n,t),l.lanes|=n;break}a=a.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(ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Cy(s,n,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}nr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ac(t,n),o=bo(o),r=r(o),t.flags|=1,nr(e,t,r,n),t.child;case 14:return r=t.type,o=Lo(r,t.pendingProps),o=Lo(r.type,o),YT(e,t,r,o,n);case 15:return UI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Lo(r,o),Ap(e,t),t.tag=1,Cr(r)?(e=!0,xg(t)):e=!1,Ac(t,n),vI(t,r,o),Ay(t,r,o,n),My(null,t,r,!0,e,n);case 19:return KI(e,t,n);case 22:return WI(e,t,n)}throw Error(ne(156,t.tag))};function cL(e,t){return $O(e,t)}function jZ(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fo(e,t,n,r){return new jZ(e,t,n,r)}function ax(e){return e=e.prototype,!(!e||!e.isReactComponent)}function GZ(e){if(typeof e=="function")return ax(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tw)return 11;if(e===Aw)return 14}return 2}function Bs(e,t){var n=e.alternate;return n===null?(n=fo(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mp(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")ax(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case sc:return Xa(n.children,o,i,t);case Cw:s=8,o|=8;break;case Z0:return e=fo(12,n,t,o|2),e.elementType=Z0,e.lanes=i,e;case Q0:return e=fo(13,n,t,o),e.elementType=Q0,e.lanes=i,e;case J0:return e=fo(19,n,t,o),e.elementType=J0,e.lanes=i,e;case yO:return Hm(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mO:s=10;break e;case vO:s=9;break e;case Tw:s=11;break e;case Aw:s=14;break e;case ys:s=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=fo(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Xa(e,t,n,r){return e=fo(7,e,r,t),e.lanes=n,e}function Hm(e,t,n,r){return e=fo(22,e,r,t),e.elementType=yO,e.lanes=n,e.stateNode={isHidden:!1},e}function U1(e,t,n){return e=fo(6,e,null,t),e.lanes=n,e}function W1(e,t,n){return t=fo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function KZ(e,t,n,r,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=E1(0),this.expirationTimes=E1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lx(e,t,n,r,o,i,s,l,a){return e=new KZ(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=fo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jw(i),e}function YZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fL)}catch(e){console.error(e)}}fL(),dO.exports=to;var nf=dO.exports;const Xf=Ko(nf);var JZ=Object.defineProperty,eQ=Object.getOwnPropertyDescriptor,tQ=(e,t,n,r)=>{for(var o=r>1?void 0:r?eQ(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&JZ(t,n,o),o},pL=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},xe=(e,t,n)=>(pL(e,t,"read from private field"),n?n.call(e):t.get(e)),zr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Dr=(e,t,n,r)=>(pL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),gd,nQ=class{constructor(){this.portals=new Map,zr(this,gd,xm()),this.on=e=>xe(this,gd).on("update",e),this.once=e=>{const t=xe(this,gd).on("update",n=>{t(),e(n)});return t}}update(){xe(this,gd).emit("update",this.portals)}render({Component:e,container:t}){const n=this.portals.get(t);this.portals.set(t,{Component:e,key:(n==null?void 0:n.key)??Ic()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:Ic()})}remove(e){this.portals.delete(e),this.update()}};gd=new WeakMap;var rQ=e=>{const{portals:t}=e;return ee.createElement(ee.Fragment,null,t.map(([n,{Component:r,key:o}])=>nf.createPortal(ee.createElement(r,null),n,o)))};function oQ(e){const[t,n]=P.useState(()=>Array.from(e.portals.entries()));return P.useEffect(()=>e.on(r=>{n(Array.from(r.entries()))}),[e]),P.useMemo(()=>t,[t])}var Dt,md,Ta,vd,Op,yd,ec,bd,Ip,Ai,tr,Uy,gL=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:o,options:i}){zr(this,Dt,void 0),zr(this,md,[]),zr(this,Ta,void 0),zr(this,vd,void 0),zr(this,Op,void 0),zr(this,yd,void 0),zr(this,ec,void 0),zr(this,bd,!1),zr(this,Ip,void 0),zr(this,Ai,void 0),zr(this,tr,void 0),zr(this,Uy,a=>{a&&(we(xe(this,Ai),{code:re.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${xe(this,Dt).type.name}' which doesn't support content.`}),a.append(xe(this,Ai)))}),this.Component=()=>{const a=xe(this,Op);return we(a,{code:re.REACT_NODE_VIEW,message:`The custom react node view provided for ${xe(this,Dt).type.name} doesn't have a valid ReactComponent`}),ee.createElement(a,{updateAttributes:this.updateAttributes,selected:this.selected,view:xe(this,Ta),getPosition:xe(this,yd),node:xe(this,Dt),forwardRef:xe(this,Uy),decorations:xe(this,md)})},this.updateAttributes=a=>{if(!xe(this,Ta).editable)return;const u=xe(this,yd).call(this);if(u==null)return;const c=xe(this,Ta).state.tr.setNodeMarkup(u,void 0,{...xe(this,Dt).attrs,...a});xe(this,Ta).dispatch(c)},we(tt(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Dr(this,Dt,t),Dr(this,Ta,r),Dr(this,vd,n),Dr(this,Op,o),Dr(this,yd,e),Dr(this,ec,i),Dr(this,tr,this.createDom());const{contentDOM:s,wrapper:l}=this.createContentDom()??{};Dr(this,Ip,s??void 0),Dr(this,Ai,l),xe(this,Ai)&&xe(this,tr).append(xe(this,Ai)),this.setDomAttributes(xe(this,Dt),xe(this,tr)),this.Component.displayName=dR(`${xe(this,Dt).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:n,options:r}=e;return(o,i,s)=>new gL({options:r,node:o,view:i,getPosition:s,portalContainer:t,ReactComponent:n})}get selected(){return xe(this,bd)}get contentDOM(){return xe(this,Ip)}get dom(){return xe(this,tr)}renderComponent(){xe(this,vd).render({Component:this.Component,container:xe(this,tr)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=xe(this,ec),n=xe(this,Dt).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${sS(xe(this,Dt).type.name)}-node-view-wrapper`),n}createContentDom(){var e,t;if(xe(this,Dt).isLeaf)return;const n=(t=(e=xe(this,Dt).type.spec).toDOM)==null?void 0:t.call(e,xe(this,Dt));if(!n)return;const{contentDOM:r,dom:o}=jr.renderSpec(document,n);let i;if(zt(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${sS(xe(this,Dt).type.name)}-node-view-content-wrapper`),i.append(r)),zt(r),{wrapper:i,contentDOM:r}}update(e,t){return gm({types:xe(this,Dt).type,node:e})?(xe(this,Dt)===e&&xe(this,md)===t||(xe(this,Dt).sameMarkup(e)||this.setDomAttributes(e,xe(this,tr)),Dr(this,Dt,e),Dr(this,md,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:n}=xe(this,Dt).type.spec;let r=e.attrs;if(n){const o=n(e);if(ke(o)||iQ(o))return;ta(o[1])&&(r=o[1])}for(const[o,i]of cn(r))t.setAttribute(o,i)}selectNode(){Dr(this,bd,!0),xe(this,tr)&&xe(this,tr).classList.add(nS),this.renderComponent()}deselectNode(){Dr(this,bd,!1),xe(this,tr)&&xe(this,tr).classList.remove(nS),this.renderComponent()}destroy(){xe(this,vd).remove(xe(this,tr))}ignoreMutation(e){return e.type==="selection"?!xe(this,Dt).type.spec.selectable:xe(this,Ai)?!xe(this,Ai).contains(e.target):!0}stopEvent(e){var t;if(!xe(this,tr))return!1;if(tt(xe(this,ec).stopEvent))return xe(this,ec).stopEvent({event:e});const n=e.target;if(!(xe(this,tr).contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const s=!!xe(this,Dt).type.spec.draggable,l=Le.isSelectable(xe(this,Dt)),a=e.type==="copy",u=e.type==="paste",c=e.type==="cut",d=e.type==="mousedown",h=e.type.startsWith("drag");return!s&&l&&h&&e.preventDefault(),!(h||o||a||u||c||d&&l)}},lA=gL;Dt=new WeakMap;md=new WeakMap;Ta=new WeakMap;vd=new WeakMap;Op=new WeakMap;yd=new WeakMap;ec=new WeakMap;bd=new WeakMap;Ip=new WeakMap;Ai=new WeakMap;tr=new WeakMap;Uy=new WeakMap;function iQ(e){return eg(e)||ta(e)&&eg(e.dom)}var yh=class extends gt{constructor(){super(...arguments),this.portalContainer=new nQ}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=be(),t=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Yh(r)||r.reactComponentEnvironment==="ssr"||(e[r.name]=lA.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=cn({...this.options.nodeViewComponents,...t});for(const[r,o]of n)e[r]=lA.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};yh=tQ([De({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],yh);var sQ=Object.defineProperty,aQ=Object.getOwnPropertyDescriptor,lQ=(e,t,n,r)=>{for(var o=r>1?void 0:r?aQ(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&sQ(t,n,o),o},cQ={...rl.defaultOptions,...yh.defaultOptions},uQ=[...rl.staticKeys,...yh.staticKeys],bh=class extends gt{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(rl).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new rl({emptyNodeClass:e,placeholder:t,priority:st.Low}),new yh({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};bh=lQ([De({defaultOptions:cQ,staticKeys:uQ})],bh);var mL={};Object.defineProperty(mL,"__esModule",{value:!0});function dQ(){for(var e=[],t=0;t{if(!t.has(e))throw TypeError("Cannot "+n)},V1=(e,t,n)=>(vL(e,t,"read from private field"),n?n.call(e):t.get(e)),hQ=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},fQ=(e,t,n,r)=>(vL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function pQ(){const[,e]=P.useState(be());return P.useCallback(()=>{e(be())},[])}var yL=P.createContext(null);function So(e){const t=P.useContext(yL),n=P.useRef(pQ());we(t,{code:re.REACT_PROVIDER_CONTEXT});const{addHandler:r}=t;return P.useEffect(()=>{let o=e;if(o){if(ta(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(tt(o))return r("updated",o)}},[r,e]),t}function fr(e=!0){return So({autoUpdate:e}).active}function gQ(e=!1){return So(e?{autoUpdate:!0}:void 0).attrs}function yu(){return So().chain.new()}function hn(){return So().commands}function hx(){return So({autoUpdate:!0}).getState().selection}function rf(e,t=void 0,n){const{getExtension:r}=So(),o=P.useMemo(()=>r(e),[e,r]);let i;if(tt(t)?i=n?[o,...n]:[o,t]:i=t?[o,...Object.values(t)]:[],P.useEffect(()=>{tt(t)||!t||o.setOptions(t)},i),P.useEffect(()=>{if(tt(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function mQ(e,t,n){const r=P.useCallback(({addHandler:o})=>o(t,n),[n,t]);return rf(e,r)}function of(e=!1){return So(e?{autoUpdate:!0}:void 0).helpers}var[vQ,yQ]=KV(({props:e})=>{const t=e.locale??"en",n=e.i18n??Rm,r=e.supportedLocales??[t],o=n._.bind(n);return{locale:t,i18n:n,supportedLocales:r,t:o}});function hA(e,t={}){const{core:n,react:r,...o}=t;return uH(e)?e:cH.create(()=>[...wR(e),new bh(r),...VX(n)],o)}function bQ(e,t={}){const n=P.useRef(e),r=P.useRef(t),[o,i]=P.useState(()=>hA(e,t));return n.current=e,r.current=t,P.useEffect(()=>o.addHandler("destroy",()=>{i(()=>hA(n.current,r.current))}),[o]),o}var wQ=typeof or=="object"&&or.__esModule&&or.default?or.default:or,tc,xQ=class extends oH{constructor(e){if(super(e),hQ(this,tc,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=t??be();return{[r]:wQ(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,we(this.rootPropsConfig.count<=1,{code:re.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),fQ(this,tc,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(rl).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new pz(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:n=!0,tr:r,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;we(i,{code:re.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),we(n,{code:re.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:r,transactions:o});return}!r&&!o&&(e=e.apply(e.tr.setMeta(rS,{}))),this.view.updateState(e),n&&(o==null?void 0:o.length)!==0&&this.onChange({state:e,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(rS,{})),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(){we(V1(this,tc),{code:re.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(V1(this,tc),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&V1(this,tc)&&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}};tc=new WeakMap;var bL=typeof document<"u"?P.useLayoutEffect:P.useEffect;function kQ(e){const t=P.useRef();return bL(()=>{t.current=e}),t.current}function EQ(e){const{manager:t,state:n}=e,{placeholder:r,editable:o}=e;P.useRef(!0).current&&!Us(r)&&t.getExtension(bh).setOptions({placeholder:r}),P.useEffect(()=>{r!=null&&t.getExtension(bh).setOptions({placeholder:r})},[r,t]);const[s]=P.useState(()=>{if(n)return n;const a=t.createEmptyDoc(),[u,c]=Bt(e.initialContent)?e.initialContent:[e.initialContent??a];return t.createState({content:u,selection:c})}),l=SQ({initialEditorState:s,getProps:()=>e});return P.useEffect(()=>()=>{l.destroy()},[l]),P.useEffect(()=>{l.onUpdate()},[o,l]),CQ(l),l.frameworkOutput}function SQ(e){const t=P.useRef(e);t.current=e;const n=P.useMemo(()=>new xQ(t.current),[]);return n.update(e),n}function CQ(e){const{state:t}=e.props,n=P.useRef(!!t),r=kQ(t);bL(()=>{const o=t?n.current===!0:n.current===!1;we(o,{code:re.REACT_CONTROLLED,message:n.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===r)&&e.updateControlledState(t,r??void 0)},[t,r,e])}function TQ(e={}){const{content:t,document:n,selection:r,extensions:o,...i}=e,s=bQ(o??(()=>[]),i),[l,a]=P.useState(()=>s.createState({selection:r,content:t??s.createEmptyDoc()})),u=P.useCallback(({state:d})=>{a(d)},[]),c=P.useCallback(()=>s.output,[s]);return P.useMemo(()=>({state:l,setState:a,manager:s,onChange:u,getContext:c}),[c,s,u,l])}var fA={doc:!1,selection:!1,storedMark:!1};function AQ(){const[e,t]=P.useState(fA);return mQ(og,"applyState",P.useCallback(({tr:n})=>{const r={...fA};n.docChanged&&(r.doc=!0),n.selectionSet&&(r.selection=!0),n.storedMarksSet&&(r.storedMark=!0),t(r)},[])),e}var Wy=()=>ee.createElement("div",{className:RW.EDITOR_WRAPPER,...So().getRootProps()}),_Q=e=>(e.hook(),null);function RQ(e){const{children:t,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:s=[],...l}=e,a=EQ(l),u=oQ(a.portalContainer),c=n==="start"||n===!0||!t&&Us(n),d=n==="end";return ee.createElement(vQ,{i18n:r,locale:o,supportedLocales:i},ee.createElement(yL.Provider,{value:a},ee.createElement(rQ,{portals:u}),s.map((h,f)=>ee.createElement(_Q,{hook:h,key:f})),c&&ee.createElement(Wy,null),t,d&&ee.createElement(Wy,null)))}const MQ={black:"#000",white:"#fff"},wh=MQ,OQ={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"},Hl=OQ,IQ={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"},Ul=IQ,LQ={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"},Wl=LQ,NQ={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"},Vl=NQ,$Q={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"},jl=$Q,DQ={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"},Du=DQ,PQ={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"},zQ=PQ;function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=wL(e[n])}),t}function Xr(e,t,n={clone:!0}){const r=n.clone?K({},e):e;return Li(e)&&Li(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Li(t[o])&&o in e&&Li(e[o])?r[o]=Xr(e[o],t[o],n):n.clone?r[o]=Li(t[o])?wL(t[o]):t[o]:r[o]=t[o])}),r}var xL={exports:{}},FQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",BQ=FQ,HQ=BQ;function kL(){}function EL(){}EL.resetWarningCache=kL;var UQ=function(){function e(r,o,i,s,l,a){if(a!==HQ){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:EL,resetWarningCache:kL};return n.PropTypes=n,n};xL.exports=UQ();var fx=xL.exports;function Zc(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function DQ(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function Cr(t){return t&&t.ownerDocument||document}function vh(t){return Cr(t).defaultView||window}function By(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const PQ=typeof window<"u"?P.useLayoutEffect:P.useEffect,sl=PQ;let dA=0;function zQ(t){const[e,n]=P.useState(t),r=t||e;return P.useEffect(()=>{e==null&&(dA+=1,n(`mui-${dA}`))},[e]),r}const hA=l0["useId".toString()];function FQ(t){if(hA!==void 0){const e=hA();return t??e}return zQ(t)}function BQ({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=P.useRef(t!==void 0),[i,s]=P.useState(e),l=o?t:i,a=P.useCallback(u=>{o||s(u)},[]);return[l,a]}function za(t){const e=P.useRef(t);return sl(()=>{e.current=t}),P.useCallback((...n)=>(0,e.current)(...n),[])}function _r(...t){return P.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{By(n,e)})},t)}let Qm=!0,Hy=!1,fA;const HQ={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 UQ(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&HQ[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function WQ(t){t.metaKey||t.altKey||t.ctrlKey||(Qm=!0)}function H1(){Qm=!1}function VQ(){this.visibilityState==="hidden"&&Hy&&(Qm=!0)}function jQ(t){t.addEventListener("keydown",WQ,!0),t.addEventListener("mousedown",H1,!0),t.addEventListener("pointerdown",H1,!0),t.addEventListener("touchstart",H1,!0),t.addEventListener("visibilitychange",VQ,!0)}function GQ(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Qm||UQ(e)}function vL(){const t=P.useCallback(o=>{o!=null&&jQ(o.ownerDocument)},[]),e=P.useRef(!1);function n(){return e.current?(Hy=!0,window.clearTimeout(fA),fA=window.setTimeout(()=>{Hy=!1},100),e.current=!1,!0):!1}function r(o){return GQ(o)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function yL(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const KQ=t=>{const e=P.useRef({});return P.useEffect(()=>{e.current=t}),e.current},bL=KQ;function wL(t,e){const n=K({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=K({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=t[r]||{},i=e[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=K({},i),Object.keys(o).forEach(s=>{n[r][s]=wL(o[s],i[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function zn(t,e,n=void 0){const r={};return Object.keys(t).forEach(o=>{r[o]=t[o].reduce((i,s)=>{if(s){const l=e(s);l!==""&&i.push(l),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const pA=t=>t,YQ=()=>{let t=pA;return{configure(e){t=e},generate(e){return t(e)},reset(){t=pA}}},XQ=YQ(),xL=XQ,qQ={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 En(t,e,n="Mui"){const r=qQ[e];return r?`${n}-${r}`:`${xL.generate(t)}-${e}`}function Sn(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=En(t,o,n)}),r}const Xc="$$material";function Fe(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i=0)&&(n[o]=t[o]);return n}function kL(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var ZQ=/^((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)-.*))$/,QQ=kL(function(t){return ZQ.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function JQ(t){if(t.sheet)return t.sheet;for(var e=0;e0?In(mu,--Rr):0,qc--,Jt===10&&(qc=1,ev--),Jt}function Kr(){return Jt=Rr2||bh(Jt)>3?"":" "}function hJ(t,e){for(;--e&&Kr()&&!(Jt<48||Jt>102||Jt>57&&Jt<65||Jt>70&&Jt<97););return tf(t,Rp()+(e<6&&li()==32&&Kr()==32))}function Wy(t){for(;Kr();)switch(Jt){case t:return Rr;case 34:case 39:t!==34&&t!==39&&Wy(Jt);break;case 40:t===41&&Wy(t);break;case 92:Kr();break}return Rr}function fJ(t,e){for(;Kr()&&t+Jt!==47+10;)if(t+Jt===42+42&&li()===47)break;return"/*"+tf(e,Rr-1)+"*"+Jm(t===47?t:Kr())}function pJ(t){for(;!bh(li());)Kr();return tf(t,Rr)}function gJ(t){return _L(Op("",null,null,null,[""],t=AL(t),0,[0],t))}function Op(t,e,n,r,o,i,s,l,a){for(var u=0,c=0,d=s,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=o,k=i,x=r,S=b;m;)switch(p=y,y=Kr()){case 40:if(p!=108&&In(S,d-1)==58){Uy(S+=Je(Mp(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Mp(y);break;case 9:case 10:case 13:case 32:S+=dJ(p);break;case 92:S+=hJ(Rp()-1,7);continue;case 47:switch(li()){case 42:case 47:Gf(mJ(fJ(Kr(),Rp()),e,n),a);break;default:S+="/"}break;case 123*g:l[u++]=Qo(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:v==-1&&(S=Je(S,/\f/g,"")),f>0&&Qo(S)-d&&Gf(f>32?mA(S+";",r,n,d-1):mA(Je(S," ","")+";",r,n,d-2),a);break;case 59:S+=";";default:if(Gf(x=gA(S,e,n,u,c,o,l,b,w=[],k=[],d),i),y===123)if(c===0)Op(S,e,x,x,w,i,d,l,k);else switch(h===99&&In(S,3)===110?100:h){case 100:case 108:case 109:case 115:Op(t,x,x,r&&Gf(gA(t,x,x,0,0,o,l,b,o,w=[],d),k),o,k,d,l,r?w:k);break;default:Op(S,x,x,x,[""],k,0,l,k)}}u=c=f=0,g=v=1,b=S="",d=s;break;case 58:d=1+Qo(S),f=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&uJ()==125)continue}switch(S+=Jm(y),y*g){case 38:v=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(Qo(S)-1)*v,v=1;break;case 64:li()===45&&(S+=Mp(Kr())),h=li(),c=d=Qo(b=S+=pJ(Rp())),y++;break;case 45:p===45&&Qo(S)==2&&(g=0)}}return i}function gA(t,e,n,r,o,i,s,l,a,u,c){for(var d=o-1,h=o===0?i:[""],f=fx(h),p=0,g=0,m=0;p0?h[v]+" "+y:Je(y,/&\f/g,h[v])))&&(a[m++]=b);return tv(t,e,n,o===0?dx:l,a,u,c)}function mJ(t,e,n){return tv(t,e,n,EL,Jm(cJ()),yh(t,2,-2),0)}function mA(t,e,n,r){return tv(t,e,n,hx,yh(t,0,r),yh(t,r+1,-1),r)}function Tc(t,e){for(var n="",r=fx(t),o=0;o6)switch(In(t,e+1)){case 109:if(In(t,e+4)!==45)break;case 102:return Je(t,/(.+:)(.+)-([^]+)/,"$1"+Qe+"$2-$3$1"+Ig+(In(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Uy(t,"stretch")?RL(Je(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(In(t,e+1)!==115)break;case 6444:switch(In(t,Qo(t)-3-(~Uy(t,"!important")&&10))){case 107:return Je(t,":",":"+Qe)+t;case 101:return Je(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qe+(In(t,14)===45?"inline-":"")+"box$3$1"+Qe+"$2$3$1"+Un+"$2box$3")+t}break;case 5936:switch(In(t,e+11)){case 114:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Qe+t+Un+Je(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Qe+t+Un+t+t}return t}var CJ=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case hx:e.return=RL(e.value,e.length);break;case SL:return Tc([Nu(e,{value:Je(e.value,"@","@"+Qe)})],o);case dx:if(e.length)return lJ(e.props,function(i){switch(aJ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tc([Nu(e,{props:[Je(i,/:(read-\w+)/,":"+Ig+"$1")]})],o);case"::placeholder":return Tc([Nu(e,{props:[Je(i,/:(plac\w+)/,":"+Qe+"input-$1")]}),Nu(e,{props:[Je(i,/:(plac\w+)/,":"+Ig+"$1")]}),Nu(e,{props:[Je(i,/:(plac\w+)/,Un+"input-$1")]})],o)}return""})}},TJ=[CJ],AJ=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=e.stylisPlugins||TJ,i={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;vn==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function jQ(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Ar(e){return e&&e.ownerDocument||document}function xh(e){return Ar(e).defaultView||window}function Vy(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const GQ=typeof window<"u"?P.useLayoutEffect:P.useEffect,cl=GQ;let gA=0;function KQ(e){const[t,n]=P.useState(e),r=e||t;return P.useEffect(()=>{t==null&&(gA+=1,n(`mui-${gA}`))},[t]),r}const mA=h0["useId".toString()];function YQ(e){if(mA!==void 0){const t=mA();return e??t}return KQ(e)}function XQ({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),l=o?e:i,a=P.useCallback(u=>{o||s(u)},[]);return[l,a]}function Ua(e){const t=P.useRef(e);return cl(()=>{t.current=e}),P.useCallback((...n)=>(0,t.current)(...n),[])}function Or(...e){return P.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Vy(n,t)})},e)}let nv=!0,jy=!1,vA;const qQ={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 ZQ(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&qQ[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function QQ(e){e.metaKey||e.altKey||e.ctrlKey||(nv=!0)}function j1(){nv=!1}function JQ(){this.visibilityState==="hidden"&&jy&&(nv=!0)}function eJ(e){e.addEventListener("keydown",QQ,!0),e.addEventListener("mousedown",j1,!0),e.addEventListener("pointerdown",j1,!0),e.addEventListener("touchstart",j1,!0),e.addEventListener("visibilitychange",JQ,!0)}function tJ(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return nv||ZQ(t)}function CL(){const e=P.useCallback(o=>{o!=null&&eJ(o.ownerDocument)},[]),t=P.useRef(!1);function n(){return t.current?(jy=!0,window.clearTimeout(vA),vA=window.setTimeout(()=>{jy=!1},100),t.current=!1,!0):!1}function r(o){return tJ(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function TL(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const nJ=e=>{const t=P.useRef({});return P.useEffect(()=>{t.current=e}),t.current},AL=nJ;function _L(e,t){const n=K({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=K({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=K({},i),Object.keys(o).forEach(s=>{n[r][s]=_L(o[s],i[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Fn(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,s)=>{if(s){const l=t(s);l!==""&&i.push(l),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const yA=e=>e,rJ=()=>{let e=yA;return{configure(t){e=t},generate(t){return e(t)},reset(){e=yA}}},oJ=rJ(),RL=oJ,iJ={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 En(e,t,n="Mui"){const r=iJ[t];return r?`${n}-${r}`:`${RL.generate(e)}-${t}`}function Sn(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=En(e,o,n)}),r}const Qc="$$material";function Fe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function ML(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var sJ=/^((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)-.*))$/,aJ=ML(function(e){return sJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function lJ(e){if(e.sheet)return e.sheet;for(var t=0;t0?In(bu,--Ir):0,Jc--,Jt===10&&(Jc=1,ov--),Jt}function qr(){return Jt=Ir2||Eh(Jt)>3?"":" "}function xJ(e,t){for(;--t&&qr()&&!(Jt<48||Jt>102||Jt>57&&Jt<65||Jt>70&&Jt<97););return sf(e,Lp()+(t<6&&di()==32&&qr()==32))}function Ky(e){for(;qr();)switch(Jt){case e:return Ir;case 34:case 39:e!==34&&e!==39&&Ky(Jt);break;case 40:e===41&&Ky(e);break;case 92:qr();break}return Ir}function kJ(e,t){for(;qr()&&e+Jt!==47+10;)if(e+Jt===42+42&&di()===47)break;return"/*"+sf(t,Ir-1)+"*"+rv(e===47?e:qr())}function EJ(e){for(;!Eh(di());)qr();return sf(e,Ir)}function SJ(e){return DL($p("",null,null,null,[""],e=$L(e),0,[0],e))}function $p(e,t,n,r,o,i,s,l,a){for(var u=0,c=0,d=s,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=o,k=i,x=r,S=b;m;)switch(p=y,y=qr()){case 40:if(p!=108&&In(S,d-1)==58){Gy(S+=Je(Np(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Np(y);break;case 9:case 10:case 13:case 32:S+=wJ(p);break;case 92:S+=xJ(Lp()-1,7);continue;case 47:switch(di()){case 42:case 47:qf(CJ(kJ(qr(),Lp()),t,n),a);break;default:S+="/"}break;case 123*g:l[u++]=ei(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:v==-1&&(S=Je(S,/\f/g,"")),f>0&&ei(S)-d&&qf(f>32?wA(S+";",r,n,d-1):wA(Je(S," ","")+";",r,n,d-2),a);break;case 59:S+=";";default:if(qf(x=bA(S,t,n,u,c,o,l,b,w=[],k=[],d),i),y===123)if(c===0)$p(S,t,x,x,w,i,d,l,k);else switch(h===99&&In(S,3)===110?100:h){case 100:case 108:case 109:case 115:$p(e,x,x,r&&qf(bA(e,x,x,0,0,o,l,b,o,w=[],d),k),o,k,d,l,r?w:k);break;default:$p(S,x,x,x,[""],k,0,l,k)}}u=c=f=0,g=v=1,b=S="",d=s;break;case 58:d=1+ei(S),f=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&bJ()==125)continue}switch(S+=rv(y),y*g){case 38:v=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(ei(S)-1)*v,v=1;break;case 64:di()===45&&(S+=Np(qr())),h=di(),c=d=ei(b=S+=EJ(Lp())),y++;break;case 45:p===45&&ei(S)==2&&(g=0)}}return i}function bA(e,t,n,r,o,i,s,l,a,u,c){for(var d=o-1,h=o===0?i:[""],f=yx(h),p=0,g=0,m=0;p0?h[v]+" "+y:Je(y,/&\f/g,h[v])))&&(a[m++]=b);return iv(e,t,n,o===0?mx:l,a,u,c)}function CJ(e,t,n){return iv(e,t,n,OL,rv(yJ()),kh(e,2,-2),0)}function wA(e,t,n,r){return iv(e,t,n,vx,kh(e,0,r),kh(e,r+1,-1),r)}function Rc(e,t){for(var n="",r=yx(e),o=0;o6)switch(In(e,t+1)){case 109:if(In(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Qe+"$2-$3$1"+$g+(In(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gy(e,"stretch")?PL(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(In(e,t+1)!==115)break;case 6444:switch(In(e,ei(e)-3-(~Gy(e,"!important")&&10))){case 107:return Je(e,":",":"+Qe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qe+(In(e,14)===45?"inline-":"")+"box$3$1"+Qe+"$2$3$1"+Wn+"$2box$3")+e}break;case 5936:switch(In(e,t+11)){case 114:return Qe+e+Wn+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qe+e+Wn+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qe+e+Wn+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qe+e+Wn+e+e}return e}var NJ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case vx:t.return=PL(t.value,t.length);break;case IL:return Rc([Pu(t,{value:Je(t.value,"@","@"+Qe)})],o);case mx:if(t.length)return vJ(t.props,function(i){switch(mJ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rc([Pu(t,{props:[Je(i,/:(read-\w+)/,":"+$g+"$1")]})],o);case"::placeholder":return Rc([Pu(t,{props:[Je(i,/:(plac\w+)/,":"+Qe+"input-$1")]}),Pu(t,{props:[Je(i,/:(plac\w+)/,":"+$g+"$1")]}),Pu(t,{props:[Je(i,/:(plac\w+)/,Wn+"input-$1")]})],o)}return""})}},$J=[NJ],DJ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||$J,i={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var BJ={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},HJ=/[A-Z]|^ms/g,UJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$L=function(e){return e.charCodeAt(1)===45},yA=function(e){return e!=null&&typeof e!="boolean"},U1=kL(function(t){return $L(t)?t:t.replace(HJ,"-$&").toLowerCase()}),bA=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(UJ,function(r,o,i){return Jo={name:o,styles:i,next:Jo},o})}return BJ[e]!==1&&!$L(e)&&typeof n=="number"&&n!==0?n+"px":n};function wh(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Jo={name:n.name,styles:n.styles,next:Jo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Jo={name:r.name,styles:r.styles,next:Jo},r=r.next;var o=n.styles+";";return o}return WJ(t,e,n)}case"function":{if(t!==void 0){var i=Jo,s=n(t);return Jo=i,wh(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function WJ(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o96?YJ:XJ},kA=function(e,n,r){var o;if(n){var i=n.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},qJ=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return NL(n,r,o),GJ(function(){return zJ(n,r,o)}),null},ZJ=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,i,s;n!==void 0&&(i=n.label,s=n.target);var l=kA(e,n,r),a=l||xA(o),u=!a("as");return function(){var c=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,f=1;f=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var XJ={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},qJ=/[A-Z]|^ms/g,ZJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,WL=function(t){return t.charCodeAt(1)===45},kA=function(t){return t!=null&&typeof t!="boolean"},G1=ML(function(e){return WL(e)?e:e.replace(qJ,"-$&").toLowerCase()}),EA=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ZJ,function(r,o,i){return ti={name:o,styles:i,next:ti},o})}return XJ[t]!==1&&!WL(t)&&typeof n=="number"&&n!==0?n+"px":n};function Sh(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ti={name:n.name,styles:n.styles,next:ti},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ti={name:r.name,styles:r.styles,next:ti},r=r.next;var o=n.styles+";";return o}return QJ(e,t,n)}case"function":{if(e!==void 0){var i=ti,s=n(e);return ti=i,Sh(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function QJ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?ree:oee},TA=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},iee=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return UL(n,r,o),tee(function(){return KJ(n,r,o)}),null},see=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var l=TA(t,n,r),a=l||CA(o),u=!a("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var h=c.length,f=1;f{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},eee=["values","unit","step"],tee=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>K({},n,{[r.key]:r.val}),{})};function nee(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,o=Fe(t,eee),i=tee(e),s=Object.keys(i);function l(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function a(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function u(h,f){const p=s.indexOf(f);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:f)-r/100}${n})`}function c(h){return s.indexOf(h)+1`@media (min-width:${bx[t]}px)`};function Vo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||EA;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(e[a]),s),{})}if(typeof e=="object"){const i=r.breakpoints||EA;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||bx).indexOf(l)!==-1){const a=i.up(l);s[a]=n(e[l],l)}else{const a=l;s[a]=e[a]}return s},{})}return n(e)}function FL(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function BL(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function iee(t,...e){const n=FL(t),r=[n,...e].reduce((o,i)=>Gr(o,i),{});return BL(Object.keys(n),r)}function see(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((o,i)=>{i{t[o]!=null&&(n[o]=!0)}),n}function W1({values:t,breakpoints:e,base:n}){const r=n||see(t,e),o=Object.keys(r);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function hv(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Ng(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=hv(t,n)||r,e&&(o=e(o,r,t)),o}function lt(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const l=s[e],a=s.theme,u=hv(a,r)||{};return Vo(s,l,d=>{let h=Ng(u,o,d);return d===h&&typeof d=="string"&&(h=Ng(u,o,`${e}${d==="default"?"":pt(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[e],i}function aee(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const lee={m:"margin",p:"padding"},cee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},SA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uee=aee(t=>{if(t.length>2)if(SA[t])t=SA[t];else return[t];const[e,n]=t.split(""),r=lee[e],o=cee[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),wx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],xx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wx,...xx];function nf(t,e,n,r){var o;const i=(o=hv(t,e,!1))!=null?o:n;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 kx(t){return nf(t,"spacing",8)}function al(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function dee(t,e){return n=>t.reduce((r,o)=>(r[o]=al(e,n),r),{})}function hee(t,e,n,r){if(e.indexOf(n)===-1)return null;const o=uee(n),i=dee(o,r),s=t[n];return Vo(t,s,i)}function HL(t,e){const n=kx(t.theme);return Object.keys(t).map(r=>hee(t,e,r,n)).reduce(Nd,{})}function Wt(t){return HL(t,wx)}Wt.propTypes={};Wt.filterProps=wx;function Vt(t){return HL(t,xx)}Vt.propTypes={};Vt.filterProps=xx;function fee(t=8){if(t.mui)return t;const e=kx({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function fv(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?Nd(o,e[i](r)):o,{});return n.propTypes={},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function ni(t){return typeof t!="number"?t:`${t}px solid`}const pee=lt({prop:"border",themeKey:"borders",transform:ni}),gee=lt({prop:"borderTop",themeKey:"borders",transform:ni}),mee=lt({prop:"borderRight",themeKey:"borders",transform:ni}),vee=lt({prop:"borderBottom",themeKey:"borders",transform:ni}),yee=lt({prop:"borderLeft",themeKey:"borders",transform:ni}),bee=lt({prop:"borderColor",themeKey:"palette"}),wee=lt({prop:"borderTopColor",themeKey:"palette"}),xee=lt({prop:"borderRightColor",themeKey:"palette"}),kee=lt({prop:"borderBottomColor",themeKey:"palette"}),Eee=lt({prop:"borderLeftColor",themeKey:"palette"}),pv=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=nf(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:al(e,r)});return Vo(t,t.borderRadius,n)}return null};pv.propTypes={};pv.filterProps=["borderRadius"];fv(pee,gee,mee,vee,yee,bee,wee,xee,kee,Eee,pv);const gv=t=>{if(t.gap!==void 0&&t.gap!==null){const e=nf(t.theme,"spacing",8),n=r=>({gap:al(e,r)});return Vo(t,t.gap,n)}return null};gv.propTypes={};gv.filterProps=["gap"];const mv=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=nf(t.theme,"spacing",8),n=r=>({columnGap:al(e,r)});return Vo(t,t.columnGap,n)}return null};mv.propTypes={};mv.filterProps=["columnGap"];const vv=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=nf(t.theme,"spacing",8),n=r=>({rowGap:al(e,r)});return Vo(t,t.rowGap,n)}return null};vv.propTypes={};vv.filterProps=["rowGap"];const See=lt({prop:"gridColumn"}),Cee=lt({prop:"gridRow"}),Tee=lt({prop:"gridAutoFlow"}),Aee=lt({prop:"gridAutoColumns"}),_ee=lt({prop:"gridAutoRows"}),Ree=lt({prop:"gridTemplateColumns"}),Mee=lt({prop:"gridTemplateRows"}),Oee=lt({prop:"gridTemplateAreas"}),Iee=lt({prop:"gridArea"});fv(gv,mv,vv,See,Cee,Tee,Aee,_ee,Ree,Mee,Oee,Iee);function Ac(t,e){return e==="grey"?e:t}const Lee=lt({prop:"color",themeKey:"palette",transform:Ac}),Nee=lt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ac}),$ee=lt({prop:"backgroundColor",themeKey:"palette",transform:Ac});fv(Lee,Nee,$ee);function Hr(t){return t<=1&&t!==0?`${t*100}%`:t}const Dee=lt({prop:"width",transform:Hr}),Ex=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,o;const i=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||bx[n];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Hr(n)}};return Vo(t,t.maxWidth,e)}return null};Ex.filterProps=["maxWidth"];const Pee=lt({prop:"minWidth",transform:Hr}),zee=lt({prop:"height",transform:Hr}),Fee=lt({prop:"maxHeight",transform:Hr}),Bee=lt({prop:"minHeight",transform:Hr});lt({prop:"size",cssProperty:"width",transform:Hr});lt({prop:"size",cssProperty:"height",transform:Hr});const Hee=lt({prop:"boxSizing"});fv(Dee,Ex,Pee,zee,Fee,Bee,Hee);const Uee={border:{themeKey:"borders",transform:ni},borderTop:{themeKey:"borders",transform:ni},borderRight:{themeKey:"borders",transform:ni},borderBottom:{themeKey:"borders",transform:ni},borderLeft:{themeKey:"borders",transform:ni},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pv},color:{themeKey:"palette",transform:Ac},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ac},backgroundColor:{themeKey:"palette",transform:Ac},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:Wt},mt:{style:Wt},mr:{style:Wt},mb:{style:Wt},ml:{style:Wt},mx:{style:Wt},my:{style:Wt},margin:{style:Wt},marginTop:{style:Wt},marginRight:{style:Wt},marginBottom:{style:Wt},marginLeft:{style:Wt},marginX:{style:Wt},marginY:{style:Wt},marginInline:{style:Wt},marginInlineStart:{style:Wt},marginInlineEnd:{style:Wt},marginBlock:{style:Wt},marginBlockStart:{style:Wt},marginBlockEnd:{style:Wt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gv},rowGap:{style:vv},columnGap:{style:mv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Hr},maxWidth:{style:Ex},minWidth:{transform:Hr},height:{transform:Hr},maxHeight:{transform:Hr},minHeight:{transform:Hr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},yv=Uee;function Wee(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Vee(t,e){return typeof t=="function"?t(e):t}function jee(){function t(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=hv(o,u)||{};return d?d(s):Vo(s,r,p=>{let g=Ng(h,c,p);return p===g&&typeof p=="string"&&(g=Ng(h,c,`${n}${p==="default"?"":pt(p)}`,p)),a===!1?g:{[a]:g}})}function e(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:yv;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=FL(i.breakpoints),d=Object.keys(c);let h=c;return Object.keys(u).forEach(f=>{const p=Vee(u[f],i);if(p!=null)if(typeof p=="object")if(s[f])h=Nd(h,t(f,p,i,s));else{const g=Vo({theme:i},p,m=>({[f]:m}));Wee(g,p)?h[f]=e({sx:p,theme:i}):h=Nd(h,g)}else h=Nd(h,t(f,p,i,s))}),BL(d,h)}return Array.isArray(o)?o.map(l):l(o)}return e}const UL=jee();UL.filterProps=["sx"];const bv=UL,Gee=["breakpoints","palette","spacing","shape"];function wv(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=t,s=Fe(t,Gee),l=nee(n),a=fee(o);let u=Gr({breakpoints:l,direction:"ltr",components:{},palette:K({mode:"light"},r),spacing:a,shape:K({},oee,i)},s);return u=e.reduce((c,d)=>Gr(c,d),u),u.unstable_sxConfig=K({},yv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return bv({sx:d,theme:this})},u}function Kee(t){return Object.keys(t).length===0}function Sx(t=null){const e=P.useContext(vx);return!e||Kee(e)?t:e}const Yee=wv();function Cx(t=Yee){return Sx(t)}const Xee=["sx"],qee=t=>{var e,n;const r={systemProps:{},otherProps:{}},o=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:yv;return Object.keys(t).forEach(i=>{o[i]?r.systemProps[i]=t[i]:r.otherProps[i]=t[i]}),r};function Tx(t){const{sx:e}=t,n=Fe(t,Xee),{systemProps:r,otherProps:o}=qee(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const l=e(...s);return Oi(l)?K({},r,l):r}:i=K({},r,e),K({},o,{sx:i})}function WL(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;el!=="theme"&&l!=="sx"&&l!=="as"})(bv);return P.forwardRef(function(a,u){const c=Cx(n),d=Tx(a),{className:h,component:f="div"}=d,p=Fe(d,Zee);return j.jsx(i,K({as:f,ref:u,className:Ge(h,o?o(r):r),theme:e&&c[e]||c},p))})}const Jee=["variant"];function CA(t){return t.length===0}function VL(t){const{variant:e}=t,n=Fe(t,Jee);let r=e||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=CA(r)?t[o]:pt(t[o]):r+=`${CA(r)?o:pt(o)}${pt(t[o].toString())}`}),r}const ete=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function tte(t){return Object.keys(t).length===0}function nte(t){return typeof t=="string"&&t.charCodeAt(0)>96}const rte=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,$g=t=>{const e={};return t&&t.forEach(n=>{const r=VL(n.props);e[r]=n.style}),e},ote=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),$g(n)},Dg=(t,e,n)=>{const{ownerState:r={}}=t,o=[];return n&&n.forEach(i=>{let s=!0;Object.keys(i.props).forEach(l=>{r[l]!==i.props[l]&&t[l]!==i.props[l]&&(s=!1)}),s&&o.push(e[VL(i.props)])}),o},ite=(t,e,n,r)=>{var o;const i=n==null||(o=n.components)==null||(o=o[r])==null?void 0:o.variants;return Dg(t,e,i)};function Ip(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ste=wv(),ate=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Lp({defaultTheme:t,theme:e,themeId:n}){return tte(e)?t:e[n]||e}function lte(t){return t?(e,n)=>n[t]:null}const TA=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const o=t(K({},e,{theme:Lp(K({},e,{defaultTheme:n,themeId:r}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=Dg(e,$g(i),i);return[o,...s]}return o};function jL(t={}){const{themeId:e,defaultTheme:n=ste,rootShouldForwardProp:r=Ip,slotShouldForwardProp:o=Ip}=t,i=s=>bv(K({},s,{theme:Lp(K({},s,{defaultTheme:n,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{JJ(s,w=>w.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:a,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:h=lte(ate(u))}=l,f=Fe(l,ete),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let m,v=Ip;u==="Root"||u==="root"?v=r:u?v=o:nte(s)&&(v=void 0);const y=zL(s,K({shouldForwardProp:v,label:m},f)),b=(w,...k)=>{const x=k?k.map(O=>{if(typeof O=="function"&&O.__emotion_real!==O)return _=>TA({styledArg:O,props:_,defaultTheme:n,themeId:e});if(Oi(O)){let _=O,R;return O&&O.variants&&(R=O.variants,delete _.variants,_=A=>{let E=O;return Dg(A,$g(R),R).forEach(I=>{E=Gr(E,I)}),E}),_}return O}):[];let S=w;if(Oi(w)){let O;w&&w.variants&&(O=w.variants,delete S.variants,S=_=>{let R=w;return Dg(_,$g(O),O).forEach(E=>{R=Gr(R,E)}),R})}else typeof w=="function"&&w.__emotion_real!==w&&(S=O=>TA({styledArg:w,props:O,defaultTheme:n,themeId:e}));a&&h&&x.push(O=>{const _=Lp(K({},O,{defaultTheme:n,themeId:e})),R=rte(a,_);if(R){const A={};return Object.entries(R).forEach(([E,M])=>{A[E]=typeof M=="function"?M(K({},O,{theme:_})):M}),h(O,A)}return null}),a&&!p&&x.push(O=>{const _=Lp(K({},O,{defaultTheme:n,themeId:e}));return ite(O,ote(a,_),_,a)}),g||x.push(i);const T=x.length-k.length;if(Array.isArray(w)&&T>0){const O=new Array(T).fill("");S=[...w,...O],S.raw=[...w.raw,...O]}const C=y(S,...x);return s.muiName&&(C.muiName=s.muiName),C};return y.withConfig&&(b.withConfig=y.withConfig),b}}const cte=jL(),ute=cte;function dte(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:wL(e.components[n].defaultProps,r)}function GL({props:t,name:e,defaultTheme:n,themeId:r}){let o=Cx(n);return r&&(o=o[r]||o),dte({theme:o,name:e,props:t})}function Ax(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function hte(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function ll(t){if(t.type)return t;if(t.charAt(0)==="#")return ll(hte(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Yc(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Yc(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function xv(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function fte(t){t=ll(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",a.push(e[3])),xv({type:l,values:a})}function AA(t){t=ll(t);let e=t.type==="hsl"||t.type==="hsla"?ll(fte(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function pte(t,e){const n=AA(t),r=AA(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wr(t,e){return t=ll(t),e=Ax(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,xv(t)}function gte(t,e){if(t=ll(t),e=Ax(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return xv(t)}function mte(t,e){if(t=ll(t),e=Ax(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return xv(t)}const vte=P.createContext(null),KL=vte;function YL(){return P.useContext(KL)}const yte=typeof Symbol=="function"&&Symbol.for,bte=yte?Symbol.for("mui.nested"):"__THEME_NESTED__";function wte(t,e){return typeof e=="function"?e(t):K({},t,e)}function xte(t){const{children:e,theme:n}=t,r=YL(),o=P.useMemo(()=>{const i=r===null?n:wte(r,n);return i!=null&&(i[bte]=r!==null),i},[n,r]);return j.jsx(KL.Provider,{value:o,children:e})}const _A={};function RA(t,e,n,r=!1){return P.useMemo(()=>{const o=t&&e[t]||e;if(typeof n=="function"){const i=n(o),s=t?K({},e,{[t]:i}):i;return r?()=>s:s}return t?K({},e,{[t]:n}):K({},e,n)},[t,e,n,r])}function kte(t){const{children:e,theme:n,themeId:r}=t,o=Sx(_A),i=YL()||_A,s=RA(r,o,n),l=RA(r,i,n,!0);return j.jsx(xte,{theme:l,children:j.jsx(vx.Provider,{value:s,children:e})})}const Ete=["component","direction","spacing","divider","children","className","useFlexGap"],Ste=wv(),Cte=ute("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Tte(t){return GL({props:t,name:"MuiStack",defaultTheme:Ste})}function Ate(t,e){const n=P.Children.toArray(t).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Rte=({ownerState:t,theme:e})=>{let n=K({display:"flex",flexDirection:"column"},Vo({theme:e},W1({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=kx(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=W1({values:t.direction,base:o}),s=W1({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,c)=>{if(!i[a]){const h=u>0?i[c[u-1]]:"column";i[a]=h}}),n=Gr(n,Vo({theme:e},s,(a,u)=>t.useFlexGap?{gap:al(r,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${_te(u?i[u]:t.direction)}`]:al(r,a)}}))}return n=iee(e.breakpoints,n),n};function Mte(t={}){const{createStyledComponent:e=Cte,useThemeProps:n=Tte,componentName:r="MuiStack"}=t,o=()=>zn({root:["root"]},a=>En(r,a),{}),i=e(Rte);return P.forwardRef(function(a,u){const c=n(a),d=Tx(c),{component:h="div",direction:f="column",spacing:p=0,divider:g,children:m,className:v,useFlexGap:y=!1}=d,b=Fe(d,Ete),w={direction:f,spacing:p,useFlexGap:y},k=o();return j.jsx(i,K({as:h,ownerState:w,ref:u,className:Ge(k.root,v)},b,{children:g?Ate(m,g):m}))})}function Ote(t,e){return K({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Ite=["mode","contrastThreshold","tonalOffset"],MA={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:mh.white,default:mh.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}},V1={text:{primary:mh.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:mh.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 OA(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=mte(t.main,o):e==="dark"&&(t.dark=gte(t.main,i)))}function Lte(t="light"){return t==="dark"?{main:Bl[200],light:Bl[50],dark:Bl[400]}:{main:Bl[700],light:Bl[400],dark:Bl[800]}}function Nte(t="light"){return t==="dark"?{main:Fl[200],light:Fl[50],dark:Fl[400]}:{main:Fl[500],light:Fl[300],dark:Fl[700]}}function $te(t="light"){return t==="dark"?{main:zl[500],light:zl[300],dark:zl[700]}:{main:zl[700],light:zl[400],dark:zl[800]}}function Dte(t="light"){return t==="dark"?{main:Hl[400],light:Hl[300],dark:Hl[700]}:{main:Hl[700],light:Hl[500],dark:Hl[900]}}function Pte(t="light"){return t==="dark"?{main:Ul[400],light:Ul[300],dark:Ul[700]}:{main:Ul[800],light:Ul[500],dark:Ul[900]}}function zte(t="light"){return t==="dark"?{main:Lu[400],light:Lu[300],dark:Lu[700]}:{main:"#ed6c02",light:Lu[500],dark:Lu[900]}}function Fte(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,o=Fe(t,Ite),i=t.primary||Lte(e),s=t.secondary||Nte(e),l=t.error||$te(e),a=t.info||Dte(e),u=t.success||Pte(e),c=t.warning||zte(e);function d(g){return pte(g,V1.text.primary)>=n?V1.text.primary:MA.text.primary}const h=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=K({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(Yc(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(Yc(12,m?` (${m})`:"",JSON.stringify(g.main)));return OA(g,"light",y,r),OA(g,"dark",b,r),g.contrastText||(g.contrastText=d(g.main)),g},f={dark:V1,light:MA};return Gr(K({common:K({},mh),mode:e,primary:h({color:i,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:c,name:"warning"}),info:h({color:a,name:"info"}),success:h({color:u,name:"success"}),grey:RQ,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},f[e]),o)}const Bte=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Hte(t){return Math.round(t*1e5)/1e5}const IA={textTransform:"uppercase"},LA='"Roboto", "Helvetica", "Arial", sans-serif';function Ute(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=LA,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,h=Fe(n,Bte),f=o/14,p=d||(v=>`${v/u*f}rem`),g=(v,y,b,w,k)=>K({fontFamily:r,fontWeight:v,fontSize:p(y),lineHeight:b},r===LA?{letterSpacing:`${Hte(w/y)}em`}:{},k,c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(l,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(l,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(l,14,1.75,.4,IA),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,IA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Gr(K({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:a},m),h,{clone:!1})}const Wte=.2,Vte=.14,jte=.12;function Rt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Wte})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Vte})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${jte})`].join(",")}const Gte=["none",Rt(0,2,1,-1,0,1,1,0,0,1,3,0),Rt(0,3,1,-2,0,2,2,0,0,1,5,0),Rt(0,3,3,-2,0,3,4,0,0,1,8,0),Rt(0,2,4,-1,0,4,5,0,0,1,10,0),Rt(0,3,5,-1,0,5,8,0,0,1,14,0),Rt(0,3,5,-1,0,6,10,0,0,1,18,0),Rt(0,4,5,-2,0,7,10,1,0,2,16,1),Rt(0,5,5,-3,0,8,10,1,0,3,14,2),Rt(0,5,6,-3,0,9,12,1,0,3,16,2),Rt(0,6,6,-3,0,10,14,1,0,4,18,3),Rt(0,6,7,-4,0,11,15,1,0,4,20,3),Rt(0,7,8,-4,0,12,17,2,0,5,22,4),Rt(0,7,8,-4,0,13,19,2,0,5,24,4),Rt(0,7,9,-4,0,14,21,2,0,5,26,4),Rt(0,8,9,-5,0,15,22,2,0,6,28,5),Rt(0,8,10,-5,0,16,24,2,0,6,30,5),Rt(0,8,11,-5,0,17,26,2,0,6,32,5),Rt(0,9,11,-5,0,18,28,2,0,7,34,6),Rt(0,9,12,-6,0,19,29,2,0,7,36,6),Rt(0,10,13,-6,0,20,31,3,0,8,38,7),Rt(0,10,13,-6,0,21,33,3,0,8,40,7),Rt(0,10,14,-6,0,22,35,3,0,8,42,7),Rt(0,11,14,-7,0,23,36,3,0,9,44,8),Rt(0,11,15,-7,0,24,38,3,0,9,46,8)],Kte=Gte,Yte=["duration","easing","delay"],Xte={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)"},qte={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function NA(t){return`${Math.round(t)}ms`}function Zte(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Qte(t){const e=K({},Xte,t.easing),n=K({},qte,t.duration);return K({getAutoHeightDuration:Zte,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=e.easeInOut,delay:a=0}=i;return Fe(i,Yte),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:NA(s)} ${l} ${typeof a=="string"?a:NA(a)}`).join(",")}},t,{easing:e,duration:n})}const Jte={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ene=Jte,tne=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function _x(t={},...e){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=t,s=Fe(t,tne);if(t.vars)throw new Error(Yc(18));const l=Fte(r),a=wv(t);let u=Gr(a,{mixins:Ote(a.breakpoints,n),palette:l,shadows:Kte.slice(),typography:Ute(l,i),transitions:Qte(o),zIndex:K({},ene)});return u=Gr(u,s),u=e.reduce((c,d)=>Gr(c,d),u),u.unstable_sxConfig=K({},yv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return bv({sx:d,theme:this})},u}const nne=_x(),Rx=nne;function kv(){const t=Cx(Rx);return t[Xc]||t}function Tn({props:t,name:e}){return GL({props:t,name:e,defaultTheme:Rx,themeId:Xc})}const Mx=t=>Ip(t)&&t!=="classes",rne=jL({themeId:Xc,defaultTheme:Rx,rootShouldForwardProp:Mx}),St=rne,one=["theme"];function ine(t){let{theme:e}=t,n=Fe(t,one);const r=e[Xc];return j.jsx(kte,K({},n,{themeId:r?Xc:void 0,theme:r||e}))}const sne=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},$A=sne;function Vy(t,e){return Vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Vy(t,e)}function XL(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Vy(t,e)}const DA={disabled:!1},Pg=ee.createContext(null);var ane=function(e){return e.scrollTop},vd="unmounted",Ea="exited",Sa="entering",Jl="entered",jy="exiting",Zi=function(t){XL(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Ea,i.appearStatus=Sa):a=Jl:r.unmountOnExit||r.mountOnEnter?a=vd:a=Ea,i.state={status:a},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===vd?{status:Ea}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Sa&&s!==Jl&&(i=Sa):(s===Sa||s===Jl)&&(i=jy)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Sa){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:jf.findDOMNode(this);s&&ane(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ea&&this.setState({status:vd})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[jf.findDOMNode(this),l],u=a[0],c=a[1],d=this.getTimeouts(),h=l?d.appear:d.enter;if(!o&&!s||DA.disabled){this.safeSetState({status:Jl},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Sa},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:Jl},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:jf.findDOMNode(this);if(!i||DA.disabled){this.safeSetState({status:Ea},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:jy},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ea},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:jf.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===vd)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 l=Fe(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ee.createElement(Pg.Provider,{value:null},typeof s=="function"?s(o,l):ee.cloneElement(ee.Children.only(s),l))},e}(ee.Component);Zi.contextType=Pg;Zi.propTypes={};function Wl(){}Zi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wl,onEntering:Wl,onEntered:Wl,onExit:Wl,onExiting:Wl,onExited:Wl};Zi.UNMOUNTED=vd;Zi.EXITED=Ea;Zi.ENTERING=Sa;Zi.ENTERED=Jl;Zi.EXITING=jy;const qL=Zi;function lne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ox(t,e){var n=function(i){return e&&P.isValidElement(i)?e(i):i},r=Object.create(null);return t&&P.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function cne(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in e){if(r[a])for(s=0;st.scrollTop;function zg(t,e){var n,r;const{timeout:o,easing:i,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[e.mode]:i,delay:s.transitionDelay}}function gne(t){return En("MuiPaper",t)}Sn("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 mne=["className","component","elevation","square","variant"],vne=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return zn(i,gne,o)},yne=St("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return K({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&K({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${wr("#fff",$A(e.elevation))}, ${wr("#fff",$A(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),bne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:a="elevation"}=r,u=Fe(r,mne),c=K({},r,{component:i,elevation:s,square:l,variant:a}),d=vne(c);return j.jsx(yne,K({as:i,ownerState:c,className:Ge(d.root,o),ref:n},u))}),wne=bne;function xne(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=t,[c,d]=P.useState(!1),h=Ge(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},p=Ge(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),P.useEffect(()=>{if(!l&&a!=null){const g=setTimeout(a,u);return()=>{clearTimeout(g)}}},[a,l,u]),j.jsx("span",{className:h,style:f,children:j.jsx("span",{className:p})})}const kne=Sn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),io=kne,Ene=["center","classes","className"];let Ev=t=>t,PA,zA,FA,BA;const Gy=550,Sne=80,Cne=yx(PA||(PA=Ev` + */function GL(e,t){return Dg(e,t)}const lee=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},cee=["values","unit","step"],uee=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>K({},n,{[r.key]:r.val}),{})};function dee(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=Fe(e,cee),i=uee(t),s=Object.keys(i);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function a(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,f){const p=s.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(p!==-1&&typeof t[s[p]]=="number"?t[s[p]]:f)-r/100}${n})`}function c(h){return s.indexOf(h)+1`@media (min-width:${Sx[e]}px)`};function Go(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||AA;return t.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(t[a]),s),{})}if(typeof t=="object"){const i=r.breakpoints||AA;return Object.keys(t).reduce((s,l)=>{if(Object.keys(i.values||Sx).indexOf(l)!==-1){const a=i.up(l);s[a]=n(t[l],l)}else{const a=l;s[a]=t[a]}return s},{})}return n(t)}function KL(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function YL(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function pee(e,...t){const n=KL(e),r=[n,...t].reduce((o,i)=>Xr(o,i),{});return YL(Object.keys(n),r)}function gee(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function K1({values:e,breakpoints:t,base:n}){const r=n||gee(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((s,l,a)=>(Array.isArray(e)?(s[l]=e[a]!=null?e[a]:e[i],i=a):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[i],i=l):s[l]=e,s),{})}function mv(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Pg(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=mv(e,n)||r,t&&(o=t(o,r,e)),o}function ut(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=s=>{if(s[t]==null)return null;const l=s[t],a=s.theme,u=mv(a,r)||{};return Go(s,l,d=>{let h=Pg(u,o,d);return d===h&&typeof d=="string"&&(h=Pg(u,o,`${t}${d==="default"?"":pt(d)}`,d)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function mee(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const vee={m:"margin",p:"padding"},yee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},_A={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},bee=mee(e=>{if(e.length>2)if(_A[e])e=_A[e];else return[e];const[t,n]=e.split(""),r=vee[t],o=yee[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Cx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Tx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Cx,...Tx];function af(e,t,n,r){var o;const i=(o=mv(e,t,!1))!=null?o:n;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 Ax(e){return af(e,"spacing",8)}function ul(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function wee(e,t){return n=>e.reduce((r,o)=>(r[o]=ul(t,n),r),{})}function xee(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=bee(n),i=wee(o,r),s=e[n];return Go(e,s,i)}function XL(e,t){const n=Ax(e.theme);return Object.keys(e).map(r=>xee(e,t,r,n)).reduce(Pd,{})}function Wt(e){return XL(e,Cx)}Wt.propTypes={};Wt.filterProps=Cx;function Vt(e){return XL(e,Tx)}Vt.propTypes={};Vt.filterProps=Tx;function kee(e=8){if(e.mui)return e;const t=Ax({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function vv(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?Pd(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function oi(e){return typeof e!="number"?e:`${e}px solid`}const Eee=ut({prop:"border",themeKey:"borders",transform:oi}),See=ut({prop:"borderTop",themeKey:"borders",transform:oi}),Cee=ut({prop:"borderRight",themeKey:"borders",transform:oi}),Tee=ut({prop:"borderBottom",themeKey:"borders",transform:oi}),Aee=ut({prop:"borderLeft",themeKey:"borders",transform:oi}),_ee=ut({prop:"borderColor",themeKey:"palette"}),Ree=ut({prop:"borderTopColor",themeKey:"palette"}),Mee=ut({prop:"borderRightColor",themeKey:"palette"}),Oee=ut({prop:"borderBottomColor",themeKey:"palette"}),Iee=ut({prop:"borderLeftColor",themeKey:"palette"}),yv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=af(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ul(t,r)});return Go(e,e.borderRadius,n)}return null};yv.propTypes={};yv.filterProps=["borderRadius"];vv(Eee,See,Cee,Tee,Aee,_ee,Ree,Mee,Oee,Iee,yv);const bv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=af(e.theme,"spacing",8),n=r=>({gap:ul(t,r)});return Go(e,e.gap,n)}return null};bv.propTypes={};bv.filterProps=["gap"];const wv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=af(e.theme,"spacing",8),n=r=>({columnGap:ul(t,r)});return Go(e,e.columnGap,n)}return null};wv.propTypes={};wv.filterProps=["columnGap"];const xv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=af(e.theme,"spacing",8),n=r=>({rowGap:ul(t,r)});return Go(e,e.rowGap,n)}return null};xv.propTypes={};xv.filterProps=["rowGap"];const Lee=ut({prop:"gridColumn"}),Nee=ut({prop:"gridRow"}),$ee=ut({prop:"gridAutoFlow"}),Dee=ut({prop:"gridAutoColumns"}),Pee=ut({prop:"gridAutoRows"}),zee=ut({prop:"gridTemplateColumns"}),Fee=ut({prop:"gridTemplateRows"}),Bee=ut({prop:"gridTemplateAreas"}),Hee=ut({prop:"gridArea"});vv(bv,wv,xv,Lee,Nee,$ee,Dee,Pee,zee,Fee,Bee,Hee);function Mc(e,t){return t==="grey"?t:e}const Uee=ut({prop:"color",themeKey:"palette",transform:Mc}),Wee=ut({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Mc}),Vee=ut({prop:"backgroundColor",themeKey:"palette",transform:Mc});vv(Uee,Wee,Vee);function Vr(e){return e<=1&&e!==0?`${e*100}%`:e}const jee=ut({prop:"width",transform:Vr}),_x=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const i=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Sx[n];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Vr(n)}};return Go(e,e.maxWidth,t)}return null};_x.filterProps=["maxWidth"];const Gee=ut({prop:"minWidth",transform:Vr}),Kee=ut({prop:"height",transform:Vr}),Yee=ut({prop:"maxHeight",transform:Vr}),Xee=ut({prop:"minHeight",transform:Vr});ut({prop:"size",cssProperty:"width",transform:Vr});ut({prop:"size",cssProperty:"height",transform:Vr});const qee=ut({prop:"boxSizing"});vv(jee,_x,Gee,Kee,Yee,Xee,qee);const Zee={border:{themeKey:"borders",transform:oi},borderTop:{themeKey:"borders",transform:oi},borderRight:{themeKey:"borders",transform:oi},borderBottom:{themeKey:"borders",transform:oi},borderLeft:{themeKey:"borders",transform:oi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:yv},color:{themeKey:"palette",transform:Mc},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Mc},backgroundColor:{themeKey:"palette",transform:Mc},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:Wt},mt:{style:Wt},mr:{style:Wt},mb:{style:Wt},ml:{style:Wt},mx:{style:Wt},my:{style:Wt},margin:{style:Wt},marginTop:{style:Wt},marginRight:{style:Wt},marginBottom:{style:Wt},marginLeft:{style:Wt},marginX:{style:Wt},marginY:{style:Wt},marginInline:{style:Wt},marginInlineStart:{style:Wt},marginInlineEnd:{style:Wt},marginBlock:{style:Wt},marginBlockStart:{style:Wt},marginBlockEnd:{style:Wt},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:bv},rowGap:{style:xv},columnGap:{style:wv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Vr},maxWidth:{style:_x},minWidth:{transform:Vr},height:{transform:Vr},maxHeight:{transform:Vr},minHeight:{transform:Vr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},kv=Zee;function Qee(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Jee(e,t){return typeof e=="function"?e(t):e}function ete(){function e(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=mv(o,u)||{};return d?d(s):Go(s,r,p=>{let g=Pg(h,c,p);return p===g&&typeof p=="string"&&(g=Pg(h,c,`${n}${p==="default"?"":pt(p)}`,p)),a===!1?g:{[a]:g}})}function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:kv;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=KL(i.breakpoints),d=Object.keys(c);let h=c;return Object.keys(u).forEach(f=>{const p=Jee(u[f],i);if(p!=null)if(typeof p=="object")if(s[f])h=Pd(h,e(f,p,i,s));else{const g=Go({theme:i},p,m=>({[f]:m}));Qee(g,p)?h[f]=t({sx:p,theme:i}):h=Pd(h,g)}else h=Pd(h,e(f,p,i,s))}),YL(d,h)}return Array.isArray(o)?o.map(l):l(o)}return t}const qL=ete();qL.filterProps=["sx"];const Ev=qL,tte=["breakpoints","palette","spacing","shape"];function Sv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,s=Fe(e,tte),l=dee(n),a=kee(o);let u=Xr({breakpoints:l,direction:"ltr",components:{},palette:K({mode:"light"},r),spacing:a,shape:K({},fee,i)},s);return u=t.reduce((c,d)=>Xr(c,d),u),u.unstable_sxConfig=K({},kv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return Ev({sx:d,theme:this})},u}function nte(e){return Object.keys(e).length===0}function Rx(e=null){const t=P.useContext(kx);return!t||nte(t)?e:t}const rte=Sv();function Mx(e=rte){return Rx(e)}const ote=["sx"],ite=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:kv;return Object.keys(e).forEach(i=>{o[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function Ox(e){const{sx:t}=e,n=Fe(e,ote),{systemProps:r,otherProps:o}=ite(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...s)=>{const l=t(...s);return Li(l)?K({},r,l):r}:i=K({},r,t),K({},o,{sx:i})}function ZL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(Ev);return P.forwardRef(function(a,u){const c=Mx(n),d=Ox(a),{className:h,component:f="div"}=d,p=Fe(d,ste);return V.jsx(i,K({as:f,ref:u,className:Ge(h,o?o(r):r),theme:t&&c[t]||c},p))})}const lte=["variant"];function RA(e){return e.length===0}function QL(e){const{variant:t}=e,n=Fe(e,lte);let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=RA(r)?e[o]:pt(e[o]):r+=`${RA(r)?o:pt(o)}${pt(e[o].toString())}`}),r}const cte=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ute(e){return Object.keys(e).length===0}function dte(e){return typeof e=="string"&&e.charCodeAt(0)>96}const hte=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,zg=e=>{const t={};return e&&e.forEach(n=>{const r=QL(n.props);t[r]=n.style}),t},fte=(e,t)=>{let n=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants),zg(n)},Fg=(e,t,n)=>{const{ownerState:r={}}=e,o=[];return n&&n.forEach(i=>{let s=!0;Object.keys(i.props).forEach(l=>{r[l]!==i.props[l]&&e[l]!==i.props[l]&&(s=!1)}),s&&o.push(t[QL(i.props)])}),o},pte=(e,t,n,r)=>{var o;const i=n==null||(o=n.components)==null||(o=o[r])==null?void 0:o.variants;return Fg(e,t,i)};function Dp(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gte=Sv(),mte=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Pp({defaultTheme:e,theme:t,themeId:n}){return ute(t)?e:t[n]||t}function vte(e){return e?(t,n)=>n[e]:null}const MA=({styledArg:e,props:t,defaultTheme:n,themeId:r})=>{const o=e(K({},t,{theme:Pp(K({},t,{defaultTheme:n,themeId:r}))}));let i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){const s=Fg(t,zg(i),i);return[o,...s]}return o};function JL(e={}){const{themeId:t,defaultTheme:n=gte,rootShouldForwardProp:r=Dp,slotShouldForwardProp:o=Dp}=e,i=s=>Ev(K({},s,{theme:Pp(K({},s,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(s,l={})=>{lee(s,w=>w.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:a,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:h=vte(mte(u))}=l,f=Fe(l,cte),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let m,v=Dp;u==="Root"||u==="root"?v=r:u?v=o:dte(s)&&(v=void 0);const y=GL(s,K({shouldForwardProp:v,label:m},f)),b=(w,...k)=>{const x=k?k.map(I=>{if(typeof I=="function"&&I.__emotion_real!==I)return _=>MA({styledArg:I,props:_,defaultTheme:n,themeId:t});if(Li(I)){let _=I,R;return I&&I.variants&&(R=I.variants,delete _.variants,_=A=>{let E=I;return Fg(A,zg(R),R).forEach(O=>{E=Xr(E,O)}),E}),_}return I}):[];let S=w;if(Li(w)){let I;w&&w.variants&&(I=w.variants,delete S.variants,S=_=>{let R=w;return Fg(_,zg(I),I).forEach(E=>{R=Xr(R,E)}),R})}else typeof w=="function"&&w.__emotion_real!==w&&(S=I=>MA({styledArg:w,props:I,defaultTheme:n,themeId:t}));a&&h&&x.push(I=>{const _=Pp(K({},I,{defaultTheme:n,themeId:t})),R=hte(a,_);if(R){const A={};return Object.entries(R).forEach(([E,M])=>{A[E]=typeof M=="function"?M(K({},I,{theme:_})):M}),h(I,A)}return null}),a&&!p&&x.push(I=>{const _=Pp(K({},I,{defaultTheme:n,themeId:t}));return pte(I,fte(a,_),_,a)}),g||x.push(i);const T=x.length-k.length;if(Array.isArray(w)&&T>0){const I=new Array(T).fill("");S=[...w,...I],S.raw=[...w.raw,...I]}const C=y(S,...x);return s.muiName&&(C.muiName=s.muiName),C};return y.withConfig&&(b.withConfig=y.withConfig),b}}const yte=JL(),bte=yte;function wte(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:_L(t.components[n].defaultProps,r)}function eN({props:e,name:t,defaultTheme:n,themeId:r}){let o=Mx(n);return r&&(o=o[r]||o),wte({theme:o,name:t,props:e})}function Ix(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function xte(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function dl(e){if(e.type)return e;if(e.charAt(0)==="#")return dl(xte(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zc(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Zc(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function Cv(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function kte(e){e=dl(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",a.push(t[3])),Cv({type:l,values:a})}function OA(e){e=dl(e);let t=e.type==="hsl"||e.type==="hsla"?dl(kte(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ete(e,t){const n=OA(e),r=OA(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kr(e,t){return e=dl(e),t=Ix(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Cv(e)}function Ste(e,t){if(e=dl(e),t=Ix(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 n=0;n<3;n+=1)e.values[n]*=1-t;return Cv(e)}function Cte(e,t){if(e=dl(e),t=Ix(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Cv(e)}const Tte=P.createContext(null),tN=Tte;function nN(){return P.useContext(tN)}const Ate=typeof Symbol=="function"&&Symbol.for,_te=Ate?Symbol.for("mui.nested"):"__THEME_NESTED__";function Rte(e,t){return typeof t=="function"?t(e):K({},e,t)}function Mte(e){const{children:t,theme:n}=e,r=nN(),o=P.useMemo(()=>{const i=r===null?n:Rte(r,n);return i!=null&&(i[_te]=r!==null),i},[n,r]);return V.jsx(tN.Provider,{value:o,children:t})}const IA={};function LA(e,t,n,r=!1){return P.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),s=e?K({},t,{[e]:i}):i;return r?()=>s:s}return e?K({},t,{[e]:n}):K({},t,n)},[e,t,n,r])}function Ote(e){const{children:t,theme:n,themeId:r}=e,o=Rx(IA),i=nN()||IA,s=LA(r,o,n),l=LA(r,i,n,!0);return V.jsx(Mte,{theme:l,children:V.jsx(kx.Provider,{value:s,children:t})})}const Ite=["component","direction","spacing","divider","children","className","useFlexGap"],Lte=Sv(),Nte=bte("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function $te(e){return eN({props:e,name:"MuiStack",defaultTheme:Lte})}function Dte(e,t){const n=P.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],zte=({ownerState:e,theme:t})=>{let n=K({display:"flex",flexDirection:"column"},Go({theme:t},K1({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=Ax(t),o=Object.keys(t.breakpoints.values).reduce((a,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(a[u]=!0),a),{}),i=K1({values:e.direction,base:o}),s=K1({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,c)=>{if(!i[a]){const h=u>0?i[c[u-1]]:"column";i[a]=h}}),n=Xr(n,Go({theme:t},s,(a,u)=>e.useFlexGap?{gap:ul(r,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Pte(u?i[u]:e.direction)}`]:ul(r,a)}}))}return n=pee(t.breakpoints,n),n};function Fte(e={}){const{createStyledComponent:t=Nte,useThemeProps:n=$te,componentName:r="MuiStack"}=e,o=()=>Fn({root:["root"]},a=>En(r,a),{}),i=t(zte);return P.forwardRef(function(a,u){const c=n(a),d=Ox(c),{component:h="div",direction:f="column",spacing:p=0,divider:g,children:m,className:v,useFlexGap:y=!1}=d,b=Fe(d,Ite),w={direction:f,spacing:p,useFlexGap:y},k=o();return V.jsx(i,K({as:h,ownerState:w,ref:u,className:Ge(k.root,v)},b,{children:g?Dte(m,g):m}))})}function Bte(e,t){return K({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Hte=["mode","contrastThreshold","tonalOffset"],NA={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:wh.white,default:wh.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}},Y1={text:{primary:wh.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:wh.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 $A(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Cte(e.main,o):t==="dark"&&(e.dark=Ste(e.main,i)))}function Ute(e="light"){return e==="dark"?{main:Wl[200],light:Wl[50],dark:Wl[400]}:{main:Wl[700],light:Wl[400],dark:Wl[800]}}function Wte(e="light"){return e==="dark"?{main:Ul[200],light:Ul[50],dark:Ul[400]}:{main:Ul[500],light:Ul[300],dark:Ul[700]}}function Vte(e="light"){return e==="dark"?{main:Hl[500],light:Hl[300],dark:Hl[700]}:{main:Hl[700],light:Hl[400],dark:Hl[800]}}function jte(e="light"){return e==="dark"?{main:Vl[400],light:Vl[300],dark:Vl[700]}:{main:Vl[700],light:Vl[500],dark:Vl[900]}}function Gte(e="light"){return e==="dark"?{main:jl[400],light:jl[300],dark:jl[700]}:{main:jl[800],light:jl[500],dark:jl[900]}}function Kte(e="light"){return e==="dark"?{main:Du[400],light:Du[300],dark:Du[700]}:{main:"#ed6c02",light:Du[500],dark:Du[900]}}function Yte(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=Fe(e,Hte),i=e.primary||Ute(t),s=e.secondary||Wte(t),l=e.error||Vte(t),a=e.info||jte(t),u=e.success||Gte(t),c=e.warning||Kte(t);function d(g){return Ete(g,Y1.text.primary)>=n?Y1.text.primary:NA.text.primary}const h=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=K({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(Zc(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(Zc(12,m?` (${m})`:"",JSON.stringify(g.main)));return $A(g,"light",y,r),$A(g,"dark",b,r),g.contrastText||(g.contrastText=d(g.main)),g},f={dark:Y1,light:NA};return Xr(K({common:K({},wh),mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:c,name:"warning"}),info:h({color:a,name:"info"}),success:h({color:u,name:"success"}),grey:zQ,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},f[t]),o)}const Xte=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function qte(e){return Math.round(e*1e5)/1e5}const DA={textTransform:"uppercase"},PA='"Roboto", "Helvetica", "Arial", sans-serif';function Zte(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=PA,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,h=Fe(n,Xte),f=o/14,p=d||(v=>`${v/u*f}rem`),g=(v,y,b,w,k)=>K({fontFamily:r,fontWeight:v,fontSize:p(y),lineHeight:b},r===PA?{letterSpacing:`${qte(w/y)}em`}:{},k,c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(l,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(l,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(l,14,1.75,.4,DA),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,DA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Xr(K({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:a},m),h,{clone:!1})}const Qte=.2,Jte=.14,ene=.12;function Mt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Qte})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Jte})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ene})`].join(",")}const tne=["none",Mt(0,2,1,-1,0,1,1,0,0,1,3,0),Mt(0,3,1,-2,0,2,2,0,0,1,5,0),Mt(0,3,3,-2,0,3,4,0,0,1,8,0),Mt(0,2,4,-1,0,4,5,0,0,1,10,0),Mt(0,3,5,-1,0,5,8,0,0,1,14,0),Mt(0,3,5,-1,0,6,10,0,0,1,18,0),Mt(0,4,5,-2,0,7,10,1,0,2,16,1),Mt(0,5,5,-3,0,8,10,1,0,3,14,2),Mt(0,5,6,-3,0,9,12,1,0,3,16,2),Mt(0,6,6,-3,0,10,14,1,0,4,18,3),Mt(0,6,7,-4,0,11,15,1,0,4,20,3),Mt(0,7,8,-4,0,12,17,2,0,5,22,4),Mt(0,7,8,-4,0,13,19,2,0,5,24,4),Mt(0,7,9,-4,0,14,21,2,0,5,26,4),Mt(0,8,9,-5,0,15,22,2,0,6,28,5),Mt(0,8,10,-5,0,16,24,2,0,6,30,5),Mt(0,8,11,-5,0,17,26,2,0,6,32,5),Mt(0,9,11,-5,0,18,28,2,0,7,34,6),Mt(0,9,12,-6,0,19,29,2,0,7,36,6),Mt(0,10,13,-6,0,20,31,3,0,8,38,7),Mt(0,10,13,-6,0,21,33,3,0,8,40,7),Mt(0,10,14,-6,0,22,35,3,0,8,42,7),Mt(0,11,14,-7,0,23,36,3,0,9,44,8),Mt(0,11,15,-7,0,24,38,3,0,9,46,8)],nne=tne,rne=["duration","easing","delay"],one={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)"},ine={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zA(e){return`${Math.round(e)}ms`}function sne(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function ane(e){const t=K({},one,e.easing),n=K({},ine,e.duration);return K({getAutoHeightDuration:sne,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:a=0}=i;return Fe(i,rne),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:zA(s)} ${l} ${typeof a=="string"?a:zA(a)}`).join(",")}},e,{easing:t,duration:n})}const lne={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},cne=lne,une=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Lx(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,s=Fe(e,une);if(e.vars)throw new Error(Zc(18));const l=Yte(r),a=Sv(e);let u=Xr(a,{mixins:Bte(a.breakpoints,n),palette:l,shadows:nne.slice(),typography:Zte(l,i),transitions:ane(o),zIndex:K({},cne)});return u=Xr(u,s),u=t.reduce((c,d)=>Xr(c,d),u),u.unstable_sxConfig=K({},kv,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return Ev({sx:d,theme:this})},u}const dne=Lx(),Nx=dne;function Tv(){const e=Mx(Nx);return e[Qc]||e}function Tn({props:e,name:t}){return eN({props:e,name:t,defaultTheme:Nx,themeId:Qc})}const $x=e=>Dp(e)&&e!=="classes",hne=JL({themeId:Qc,defaultTheme:Nx,rootShouldForwardProp:$x}),St=hne,fne=["theme"];function pne(e){let{theme:t}=e,n=Fe(e,fne);const r=t[Qc];return V.jsx(Ote,K({},n,{themeId:r?Qc:void 0,theme:r||t}))}const gne=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},FA=gne;function Yy(e,t){return Yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Yy(e,t)}function rN(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yy(e,t)}const BA={disabled:!1},Bg=ee.createContext(null);var mne=function(t){return t.scrollTop},wd="unmounted",Aa="exited",_a="entering",nc="entered",Xy="exiting",Ji=function(e){rN(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Aa,i.appearStatus=_a):a=nc:r.unmountOnExit||r.mountOnEnter?a=wd:a=Aa,i.state={status:a},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===wd?{status:Aa}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==_a&&s!==nc&&(i=_a):(s===_a||s===nc)&&(i=Xy)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===_a){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Xf.findDOMNode(this);s&&mne(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Aa&&this.setState({status:wd})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[Xf.findDOMNode(this),l],u=a[0],c=a[1],d=this.getTimeouts(),h=l?d.appear:d.enter;if(!o&&!s||BA.disabled){this.safeSetState({status:nc},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:_a},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:nc},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Xf.findDOMNode(this);if(!i||BA.disabled){this.safeSetState({status:Aa},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Xy},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Aa},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Xf.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===wd)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 l=Fe(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ee.createElement(Bg.Provider,{value:null},typeof s=="function"?s(o,l):ee.cloneElement(ee.Children.only(s),l))},t}(ee.Component);Ji.contextType=Bg;Ji.propTypes={};function Gl(){}Ji.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Gl,onEntering:Gl,onEntered:Gl,onExit:Gl,onExiting:Gl,onExited:Gl};Ji.UNMOUNTED=wd;Ji.EXITED=Aa;Ji.ENTERING=_a;Ji.ENTERED=nc;Ji.EXITING=Xy;const oN=Ji;function vne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dx(e,t){var n=function(i){return t&&P.isValidElement(i)?t(i):i},r=Object.create(null);return e&&P.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function yne(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in t){if(r[a])for(s=0;se.scrollTop;function Hg(e,t){var n,r;const{timeout:o,easing:i,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function Sne(e){return En("MuiPaper",e)}Sn("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 Cne=["className","component","elevation","square","variant"],Tne=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Fn(i,Sne,o)},Ane=St("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return K({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"&&K({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${kr("#fff",FA(t.elevation))}, ${kr("#fff",FA(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),_ne=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:l=!1,variant:a="elevation"}=r,u=Fe(r,Cne),c=K({},r,{component:i,elevation:s,square:l,variant:a}),d=Tne(c);return V.jsx(Ane,K({as:i,ownerState:c,className:Ge(d.root,o),ref:n},u))}),Rne=_ne;function Mne(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=e,[c,d]=P.useState(!1),h=Ge(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},p=Ge(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),P.useEffect(()=>{if(!l&&a!=null){const g=setTimeout(a,u);return()=>{clearTimeout(g)}}},[a,l,u]),V.jsx("span",{className:h,style:f,children:V.jsx("span",{className:p})})}const One=Sn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),co=One,Ine=["center","classes","className"];let Av=e=>e,HA,UA,WA,VA;const qy=550,Lne=80,Nne=Ex(HA||(HA=Av` 0% { transform: scale(0); opacity: 0.1; @@ -135,7 +135,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`)),Tne=yx(zA||(zA=Ev` +`)),$ne=Ex(UA||(UA=Av` 0% { opacity: 1; } @@ -143,7 +143,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`)),Ane=yx(FA||(FA=Ev` +`)),Dne=Ex(WA||(WA=Av` 0% { transform: scale(1); } @@ -155,7 +155,7 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`)),_ne=St("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Rne=St(xne,{name:"MuiTouchRipple",slot:"Ripple"})(BA||(BA=Ev` +`)),Pne=St("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),zne=St(Mne,{name:"MuiTouchRipple",slot:"Ripple"})(VA||(VA=Av` opacity: 0; position: absolute; @@ -198,7 +198,7 @@ Error generating stack: `+i.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),io.rippleVisible,Cne,Gy,({theme:t})=>t.transitions.easing.easeInOut,io.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,io.child,io.childLeaving,Tne,Gy,({theme:t})=>t.transitions.easing.easeInOut,io.childPulsate,Ane,({theme:t})=>t.transitions.easing.easeInOut),Mne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,l=Fe(r,Ene),[a,u]=P.useState([]),c=P.useRef(0),d=P.useRef(null);P.useEffect(()=>{d.current&&(d.current(),d.current=null)},[a]);const h=P.useRef(!1),f=P.useRef(0),p=P.useRef(null),g=P.useRef(null);P.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const m=P.useCallback(w=>{const{pulsate:k,rippleX:x,rippleY:S,rippleSize:T,cb:C}=w;u(O=>[...O,j.jsx(Rne,{classes:{ripple:Ge(i.ripple,io.ripple),rippleVisible:Ge(i.rippleVisible,io.rippleVisible),ripplePulsate:Ge(i.ripplePulsate,io.ripplePulsate),child:Ge(i.child,io.child),childLeaving:Ge(i.childLeaving,io.childLeaving),childPulsate:Ge(i.childPulsate,io.childPulsate)},timeout:Gy,pulsate:k,rippleX:x,rippleY:S,rippleSize:T},c.current)]),c.current+=1,d.current=C},[i]),v=P.useCallback((w={},k={},x=()=>{})=>{const{pulsate:S=!1,center:T=o||k.pulsate,fakeElement:C=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&h.current){h.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(h.current=!0);const O=C?null:g.current,_=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let R,A,E;if(T||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)R=Math.round(_.width/2),A=Math.round(_.height/2);else{const{clientX:M,clientY:I}=w.touches&&w.touches.length>0?w.touches[0]:w;R=Math.round(M-_.left),A=Math.round(I-_.top)}if(T)E=Math.sqrt((2*_.width**2+_.height**2)/3),E%2===0&&(E+=1);else{const M=Math.max(Math.abs((O?O.clientWidth:0)-R),R)*2+2,I=Math.max(Math.abs((O?O.clientHeight:0)-A),A)*2+2;E=Math.sqrt(M**2+I**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},f.current=setTimeout(()=>{p.current&&(p.current(),p.current=null)},Sne)):m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},[o,m]),y=P.useCallback(()=>{v({},{pulsate:!0})},[v]),b=P.useCallback((w,k)=>{if(clearTimeout(f.current),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,f.current=setTimeout(()=>{b(w,k)});return}p.current=null,u(x=>x.length>0?x.slice(1):x),d.current=k},[]);return P.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),j.jsx(_ne,K({className:Ge(io.root,i.root,s),ref:g},l,{children:j.jsx(pne,{component:null,exit:!0,children:a})}))}),One=Mne;function Ine(t){return En("MuiButtonBase",t)}const Lne=Sn("MuiButtonBase",["root","disabled","focusVisible"]),Nne=Lne,$ne=["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"],Dne=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=zn({root:["root",e&&"disabled",n&&"focusVisible"]},Ine,o);return n&&r&&(s.root+=` ${r}`),s},Pne=St("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${Nne.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),zne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:f="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:k,onMouseDown:x,onMouseLeave:S,onMouseUp:T,onTouchEnd:C,onTouchMove:O,onTouchStart:_,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:E,type:M}=r,I=Fe(r,$ne),N=P.useRef(null),L=P.useRef(null),$=_r(L,E),{isFocusVisibleRef:D,onFocus:F,onBlur:U,ref:W}=vL(),[B,H]=P.useState(!1);u&&B&&H(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{H(!0),N.current.focus()}}),[]);const[V,Y]=P.useState(!1);P.useEffect(()=>{Y(!0)},[]);const X=V&&!c&&!u;P.useEffect(()=>{B&&h&&!c&&V&&L.current.pulsate()},[c,h,B,V]);function Z(ie,Te,Ze=d){return za(Xe=>(Te&&Te(Xe),!Ze&&L.current&&L.current[ie](Xe),!0))}const te=Z("start",x),ce=Z("stop",m),Ne=Z("stop",v),ye=Z("stop",T),Me=Z("stop",ie=>{B&&ie.preventDefault(),S&&S(ie)}),Ce=Z("start",_),mt=Z("stop",C),Lt=Z("stop",O),wt=Z("stop",ie=>{U(ie),D.current===!1&&H(!1),p&&p(ie)},!1),qn=za(ie=>{N.current||(N.current=ie.currentTarget),F(ie),D.current===!0&&(H(!0),b&&b(ie)),y&&y(ie)}),Nt=()=>{const ie=N.current;return a&&a!=="button"&&!(ie.tagName==="A"&&ie.href)},An=P.useRef(!1),hn=za(ie=>{h&&!An.current&&B&&L.current&&ie.key===" "&&(An.current=!0,L.current.stop(ie,()=>{L.current.start(ie)})),ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&ie.preventDefault(),w&&w(ie),ie.target===ie.currentTarget&&Nt()&&ie.key==="Enter"&&!u&&(ie.preventDefault(),g&&g(ie))}),fn=za(ie=>{h&&ie.key===" "&&L.current&&B&&!ie.defaultPrevented&&(An.current=!1,L.current.stop(ie,()=>{L.current.pulsate(ie)})),k&&k(ie),g&&ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&!ie.defaultPrevented&&g(ie)});let qe=a;qe==="button"&&(I.href||I.to)&&(qe=f);const _n={};qe==="button"?(_n.type=M===void 0?"button":M,_n.disabled=u):(!I.href&&!I.to&&(_n.role="button"),u&&(_n["aria-disabled"]=u));const q=_r(n,W,N),he=K({},r,{centerRipple:i,component:a,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:h,tabIndex:R,focusVisible:B}),ve=Dne(he);return j.jsxs(Pne,K({as:qe,className:Ge(ve.root,l),ownerState:he,onBlur:wt,onClick:g,onContextMenu:ce,onFocus:qn,onKeyDown:hn,onKeyUp:fn,onMouseDown:te,onMouseLeave:Me,onMouseUp:ye,onDragLeave:Ne,onTouchEnd:mt,onTouchMove:Lt,onTouchStart:Ce,ref:q,tabIndex:u?-1:R,type:M},_n,I,{children:[s,X?j.jsx(One,K({ref:$,center:i},A)):null]}))}),Lx=zne;function Fne(t){return En("MuiIconButton",t)}const Bne=Sn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Hne=Bne,Une=["edge","children","className","color","disabled","disableFocusRipple","size"],Wne=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,s={root:["root",n&&"disabled",r!=="default"&&`color${pt(r)}`,o&&`edge${pt(o)}`,`size${pt(i)}`]};return zn(s,Fne,e)},Vne=St(Lx,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${pt(n.color)}`],n.edge&&e[`edge${pt(n.edge)}`],e[`size${pt(n.size)}`]]}})(({theme:t,ownerState:e})=>K({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return K({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&K({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":K({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${Hne.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),jne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:l="default",disabled:a=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=Fe(r,Une),h=K({},r,{edge:o,color:l,disabled:a,disableFocusRipple:u,size:c}),f=Wne(h);return j.jsx(Vne,K({className:Ge(f.root,s),centerRipple:!0,focusRipple:!u,disabled:a,ref:n,ownerState:h},d,{children:i}))}),Gne=jne;function Kne(t){return En("MuiTypography",t)}Sn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Yne=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Xne=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,l={root:["root",i,t.align!=="inherit"&&`align${pt(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return zn(l,Kne,s)},qne=St("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${pt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>K({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),HA={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zne={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Qne=t=>Zne[t]||t,Jne=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiTypography"}),o=Qne(r.color),i=Tx(K({},r,{color:o})),{align:s="inherit",className:l,component:a,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:h="body1",variantMapping:f=HA}=i,p=Fe(i,Yne),g=K({},i,{align:s,color:o,className:l,component:a,gutterBottom:u,noWrap:c,paragraph:d,variant:h,variantMapping:f}),m=a||(d?"p":f[h]||HA[h])||"span",v=Xne(g);return j.jsx(qne,K({as:m,ref:n,ownerState:g,className:Ge(v.root,l)},p))}),yd=Jne;function QL(t){return typeof t=="string"}function bd(t,e,n){return t===void 0||QL(t)?e:K({},e,{ownerState:K({},e.ownerState,n)})}const ere={disableDefaultClasses:!1},tre=P.createContext(ere);function nre(t){const{disableDefaultClasses:e}=P.useContext(tre);return n=>e?"":t(n)}function JL(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function rre(t,e,n){return typeof t=="function"?t(e,n):t}function UA(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function ore(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const f=Ge(o==null?void 0:o.className,r==null?void 0:r.className,i,n==null?void 0:n.className),p=K({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=K({},n,o,r);return f.length>0&&(g.className=f),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const s=JL(K({},o,r)),l=UA(r),a=UA(o),u=e(s),c=Ge(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=K({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=K({},u,n,a,l);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}const ire=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Gi(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,s=Fe(t,ire),l=i?{}:rre(r,o),{props:a,internalRef:u}=ore(K({},s,{externalSlotProps:l})),c=_r(u,l==null?void 0:l.ref,(e=t.additionalProps)==null?void 0:e.ref);return bd(n,K({},a,{ref:c}),o)}function sre(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=bL({badgeContent:e,max:r});let s=n;n===!1&&e===0&&!o&&(s=!0);const{badgeContent:l,max:a=r}=s?i:t,u=l&&Number(l)>a?`${a}+`:l;return{badgeContent:l,invisible:s,max:a,displayValue:u}}const are=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function lre(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function cre(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function ure(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||cre(t))}function dre(t){const e=[],n=[];return Array.from(t.querySelectorAll(are)).forEach((r,o)=>{const i=lre(r);i===-1||!ure(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function hre(){return!0}function fre(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=dre,isEnabled:s=hre,open:l}=t,a=P.useRef(!1),u=P.useRef(null),c=P.useRef(null),d=P.useRef(null),h=P.useRef(null),f=P.useRef(!1),p=P.useRef(null),g=_r(e.ref,p),m=P.useRef(null);P.useEffect(()=>{!l||!p.current||(f.current=!n)},[n,l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Cr(p.current);return p.current.contains(b.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),f.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Cr(p.current),w=S=>{m.current=S,!(r||!s()||S.key!=="Tab")&&b.activeElement===p.current&&S.shiftKey&&(a.current=!0,c.current&&c.current.focus())},k=()=>{const S=p.current;if(S===null)return;if(!b.hasFocus()||!s()||a.current){a.current=!1;return}if(S.contains(b.activeElement)||r&&b.activeElement!==u.current&&b.activeElement!==c.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let T=[];if((b.activeElement===u.current||b.activeElement===c.current)&&(T=i(p.current)),T.length>0){var C,O;const _=!!((C=m.current)!=null&&C.shiftKey&&((O=m.current)==null?void 0:O.key)==="Tab"),R=T[0],A=T[T.length-1];typeof R!="string"&&typeof A!="string"&&(_?A.focus():R.focus())}else S.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",w,!0);const x=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),b.removeEventListener("focusin",k),b.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0,h.current=b.target;const w=e.props.onFocus;w&&w(b)},y=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0};return j.jsxs(P.Fragment,{children:[j.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:g,onFocus:v}),j.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}var Tr="top",bo="bottom",wo="right",Ar="left",Nx="auto",rf=[Tr,bo,wo,Ar],Zc="start",xh="end",pre="clippingParents",eN="viewport",$u="popper",gre="reference",WA=rf.reduce(function(t,e){return t.concat([e+"-"+Zc,e+"-"+xh])},[]),tN=[].concat(rf,[Nx]).reduce(function(t,e){return t.concat([e,e+"-"+Zc,e+"-"+xh])},[]),mre="beforeRead",vre="read",yre="afterRead",bre="beforeMain",wre="main",xre="afterMain",kre="beforeWrite",Ere="write",Sre="afterWrite",Cre=[mre,vre,yre,bre,wre,xre,kre,Ere,Sre];function pi(t){return t?(t.nodeName||"").toLowerCase():null}function qr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function cl(t){var e=qr(t).Element;return t instanceof e||t instanceof Element}function fo(t){var e=qr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function $x(t){if(typeof ShadowRoot>"u")return!1;var e=qr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Tre(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!fo(i)||!pi(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Are(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!fo(o)||!pi(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const _re={name:"applyStyles",enabled:!0,phase:"write",fn:Tre,effect:Are,requires:["computeStyles"]};function ci(t){return t.split("-")[0]}var Ga=Math.max,Fg=Math.min,Qc=Math.round;function Ky(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nN(){return!/^((?!chrome|android).)*safari/i.test(Ky())}function Jc(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&fo(t)&&(o=t.offsetWidth>0&&Qc(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Qc(r.height)/t.offsetHeight||1);var s=cl(t)?qr(t):window,l=s.visualViewport,a=!nN()&&n,u=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Dx(t){var e=Jc(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function rN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&$x(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ki(t){return qr(t).getComputedStyle(t)}function Rre(t){return["table","td","th"].indexOf(pi(t))>=0}function sa(t){return((cl(t)?t.ownerDocument:t.document)||window.document).documentElement}function Sv(t){return pi(t)==="html"?t:t.assignedSlot||t.parentNode||($x(t)?t.host:null)||sa(t)}function VA(t){return!fo(t)||Ki(t).position==="fixed"?null:t.offsetParent}function Mre(t){var e=/firefox/i.test(Ky()),n=/Trident/i.test(Ky());if(n&&fo(t)){var r=Ki(t);if(r.position==="fixed")return null}var o=Sv(t);for($x(o)&&(o=o.host);fo(o)&&["html","body"].indexOf(pi(o))<0;){var i=Ki(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function of(t){for(var e=qr(t),n=VA(t);n&&Rre(n)&&Ki(n).position==="static";)n=VA(n);return n&&(pi(n)==="html"||pi(n)==="body"&&Ki(n).position==="static")?e:n||Mre(t)||e}function Px(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $d(t,e,n){return Ga(t,Fg(e,n))}function Ore(t,e,n){var r=$d(t,e,n);return r>n?n:r}function oN(){return{top:0,right:0,bottom:0,left:0}}function iN(t){return Object.assign({},oN(),t)}function sN(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Ire=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,iN(typeof e!="number"?e:sN(e,rf))};function Lre(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ci(n.placement),a=Px(l),u=[Ar,wo].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Ire(o.padding,n),h=Dx(i),f=a==="y"?Tr:Ar,p=a==="y"?bo:wo,g=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],m=s[a]-n.rects.reference[a],v=of(i),y=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=d[f],k=y-h[c]-d[p],x=y/2-h[c]/2+b,S=$d(w,x,k),T=a;n.modifiersData[r]=(e={},e[T]=S,e.centerOffset=S-x,e)}}function Nre(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||rN(e.elements.popper,o)&&(e.elements.arrow=o))}const $re={name:"arrow",enabled:!0,phase:"main",fn:Lre,effect:Nre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function eu(t){return t.split("-")[1]}var Dre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pre(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Qc(n*o)/o||0,y:Qc(r*o)/o||0}}function jA(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,f=h===void 0?0:h,p=s.y,g=p===void 0?0:p,m=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Ar,w=Tr,k=window;if(u){var x=of(n),S="clientHeight",T="clientWidth";if(x===qr(n)&&(x=sa(n),Ki(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",T="scrollWidth")),x=x,o===Tr||(o===Ar||o===wo)&&i===xh){w=bo;var C=d&&x===k&&k.visualViewport?k.visualViewport.height:x[S];g-=C-r.height,g*=a?1:-1}if(o===Ar||(o===Tr||o===bo)&&i===xh){b=wo;var O=d&&x===k&&k.visualViewport?k.visualViewport.width:x[T];f-=O-r.width,f*=a?1:-1}}var _=Object.assign({position:l},u&&Dre),R=c===!0?Pre({x:f,y:g},qr(n)):{x:f,y:g};if(f=R.x,g=R.y,a){var A;return Object.assign({},_,(A={},A[w]=y?"0":"",A[b]=v?"0":"",A.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",A))}return Object.assign({},_,(e={},e[w]=y?g+"px":"",e[b]=v?f+"px":"",e.transform="",e))}function zre(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:ci(e.placement),variation:eu(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,jA(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,jA(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Fre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zre,data:{}};var Kf={passive:!0};function Bre(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=qr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Kf)}),l&&a.addEventListener("resize",n.update,Kf),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Kf)}),l&&a.removeEventListener("resize",n.update,Kf)}}const Hre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bre,data:{}};var Ure={left:"right",right:"left",bottom:"top",top:"bottom"};function Np(t){return t.replace(/left|right|bottom|top/g,function(e){return Ure[e]})}var Wre={start:"end",end:"start"};function GA(t){return t.replace(/start|end/g,function(e){return Wre[e]})}function zx(t){var e=qr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Fx(t){return Jc(sa(t)).left+zx(t).scrollLeft}function Vre(t,e){var n=qr(t),r=sa(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var u=nN();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Fx(t),y:a}}function jre(t){var e,n=sa(t),r=zx(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Ga(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ga(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Fx(t),a=-r.scrollTop;return Ki(o||n).direction==="rtl"&&(l+=Ga(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function Bx(t){var e=Ki(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function aN(t){return["html","body","#document"].indexOf(pi(t))>=0?t.ownerDocument.body:fo(t)&&Bx(t)?t:aN(Sv(t))}function Dd(t,e){var n;e===void 0&&(e=[]);var r=aN(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=qr(r),s=o?[i].concat(i.visualViewport||[],Bx(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Dd(Sv(s)))}function Yy(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Gre(t,e){var n=Jc(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function KA(t,e,n){return e===eN?Yy(Vre(t,n)):cl(e)?Gre(e,n):Yy(jre(sa(t)))}function Kre(t){var e=Dd(Sv(t)),n=["absolute","fixed"].indexOf(Ki(t).position)>=0,r=n&&fo(t)?of(t):t;return cl(r)?e.filter(function(o){return cl(o)&&rN(o,r)&&pi(o)!=="body"}):[]}function Yre(t,e,n,r){var o=e==="clippingParents"?Kre(t):[].concat(e),i=[].concat(o,[n]),s=i[0],l=i.reduce(function(a,u){var c=KA(t,u,r);return a.top=Ga(c.top,a.top),a.right=Fg(c.right,a.right),a.bottom=Fg(c.bottom,a.bottom),a.left=Ga(c.left,a.left),a},KA(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function lN(t){var e=t.reference,n=t.element,r=t.placement,o=r?ci(r):null,i=r?eu(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(o){case Tr:a={x:s,y:e.y-n.height};break;case bo:a={x:s,y:e.y+e.height};break;case wo:a={x:e.x+e.width,y:l};break;case Ar:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?Px(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Zc:a[u]=a[u]-(e[c]/2-n[c]/2);break;case xh:a[u]=a[u]+(e[c]/2-n[c]/2);break}}return a}function kh(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,l=n.boundary,a=l===void 0?pre:l,u=n.rootBoundary,c=u===void 0?eN:u,d=n.elementContext,h=d===void 0?$u:d,f=n.altBoundary,p=f===void 0?!1:f,g=n.padding,m=g===void 0?0:g,v=iN(typeof m!="number"?m:sN(m,rf)),y=h===$u?gre:$u,b=t.rects.popper,w=t.elements[p?y:h],k=Yre(cl(w)?w:w.contextElement||sa(t.elements.popper),a,c,s),x=Jc(t.elements.reference),S=lN({reference:x,element:b,strategy:"absolute",placement:o}),T=Yy(Object.assign({},b,S)),C=h===$u?T:x,O={top:k.top-C.top+v.top,bottom:C.bottom-k.bottom+v.bottom,left:k.left-C.left+v.left,right:C.right-k.right+v.right},_=t.modifiersData.offset;if(h===$u&&_){var R=_[o];Object.keys(O).forEach(function(A){var E=[wo,bo].indexOf(A)>=0?1:-1,M=[Tr,bo].indexOf(A)>=0?"y":"x";O[A]+=R[M]*E})}return O}function Xre(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?tN:a,c=eu(r),d=c?l?WA:WA.filter(function(p){return eu(p)===c}):rf,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,g){return p[g]=kh(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[ci(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}function qre(t){if(ci(t)===Nx)return[];var e=Np(t);return[GA(t),e,GA(e)]}function Zre(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,g=n.allowedAutoPlacements,m=e.options.placement,v=ci(m),y=v===m,b=a||(y||!p?[Np(m)]:qre(m)),w=[m].concat(b).reduce(function(B,H){return B.concat(ci(H)===Nx?Xre(e,{placement:H,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}):H)},[]),k=e.rects.reference,x=e.rects.popper,S=new Map,T=!0,C=w[0],O=0;O=0,M=E?"width":"height",I=kh(e,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=E?A?wo:Ar:A?bo:Tr;k[M]>x[M]&&(N=Np(N));var L=Np(N),$=[];if(i&&$.push(I[R]<=0),l&&$.push(I[N]<=0,I[L]<=0),$.every(function(B){return B})){C=_,T=!1;break}S.set(_,$)}if(T)for(var D=p?3:1,F=function(H){var V=w.find(function(Y){var X=S.get(Y);if(X)return X.slice(0,H).every(function(Z){return Z})});if(V)return C=V,"break"},U=D;U>0;U--){var W=F(U);if(W==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const Qre={name:"flip",enabled:!0,phase:"main",fn:Zre,requiresIfExists:["offset"],data:{_skip:!1}};function YA(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function XA(t){return[Tr,wo,bo,Ar].some(function(e){return t[e]>=0})}function Jre(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=kh(e,{elementContext:"reference"}),l=kh(e,{altBoundary:!0}),a=YA(s,r),u=YA(l,o,i),c=XA(a),d=XA(u);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const eoe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Jre};function toe(t,e,n){var r=ci(t),o=[Ar,Tr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[Ar,wo].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function noe(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=tN.reduce(function(c,d){return c[d]=toe(d,e.rects,i),c},{}),l=s[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const roe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:noe};function ooe(t){var e=t.state,n=t.name;e.modifiersData[n]=lN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const ioe={name:"popperOffsets",enabled:!0,phase:"read",fn:ooe,data:{}};function soe(t){return t==="x"?"y":"x"}function aoe(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,g=p===void 0?0:p,m=kh(e,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=ci(e.placement),y=eu(e.placement),b=!y,w=Px(v),k=soe(w),x=e.modifiersData.popperOffsets,S=e.rects.reference,T=e.rects.popper,C=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,O=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),_=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(x){if(i){var A,E=w==="y"?Tr:Ar,M=w==="y"?bo:wo,I=w==="y"?"height":"width",N=x[w],L=N+m[E],$=N-m[M],D=f?-T[I]/2:0,F=y===Zc?S[I]:T[I],U=y===Zc?-T[I]:-S[I],W=e.elements.arrow,B=f&&W?Dx(W):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:oN(),V=H[E],Y=H[M],X=$d(0,S[I],B[I]),Z=b?S[I]/2-D-X-V-O.mainAxis:F-X-V-O.mainAxis,te=b?-S[I]/2+D+X+Y+O.mainAxis:U+X+Y+O.mainAxis,ce=e.elements.arrow&&of(e.elements.arrow),Ne=ce?w==="y"?ce.clientTop||0:ce.clientLeft||0:0,ye=(A=_==null?void 0:_[w])!=null?A:0,Me=N+Z-ye-Ne,Ce=N+te-ye,mt=$d(f?Fg(L,Me):L,N,f?Ga($,Ce):$);x[w]=mt,R[w]=mt-N}if(l){var Lt,wt=w==="x"?Tr:Ar,qn=w==="x"?bo:wo,Nt=x[k],An=k==="y"?"height":"width",hn=Nt+m[wt],fn=Nt-m[qn],qe=[Tr,Ar].indexOf(v)!==-1,_n=(Lt=_==null?void 0:_[k])!=null?Lt:0,q=qe?hn:Nt-S[An]-T[An]-_n+O.altAxis,he=qe?Nt+S[An]+T[An]-_n-O.altAxis:fn,ve=f&&qe?Ore(q,Nt,he):$d(f?q:hn,Nt,f?he:fn);x[k]=ve,R[k]=ve-Nt}e.modifiersData[r]=R}}const loe={name:"preventOverflow",enabled:!0,phase:"main",fn:aoe,requiresIfExists:["offset"]};function coe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function uoe(t){return t===qr(t)||!fo(t)?zx(t):coe(t)}function doe(t){var e=t.getBoundingClientRect(),n=Qc(e.width)/t.offsetWidth||1,r=Qc(e.height)/t.offsetHeight||1;return n!==1||r!==1}function hoe(t,e,n){n===void 0&&(n=!1);var r=fo(e),o=fo(e)&&doe(e),i=sa(e),s=Jc(t,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((pi(e)!=="body"||Bx(i))&&(l=uoe(e)),fo(e)?(a=Jc(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=Fx(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function foe(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function poe(t){var e=foe(t);return Cre.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function goe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function moe(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function ZA(){for(var t=arguments.length,e=new Array(t),n=0;n{i||l(woe(o)||document.body)},[o,i]),sl(()=>{if(s&&!i)return By(n,s),()=>{By(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:a};return P.cloneElement(r,u)}return j.jsx(P.Fragment,{children:r})}return j.jsx(P.Fragment,{children:s&&Qh.createPortal(r,s)})});function xoe(t){return En("MuiPopper",t)}Sn("MuiPopper",["root"]);const koe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Eoe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Soe(t,e){if(e==="ltr")return t;switch(t){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 t}}function Xy(t){return typeof t=="function"?t():t}function Coe(t){return t.nodeType!==void 0}const Toe=()=>zn({root:["root"]},nre(xoe)),Aoe={},_oe=P.forwardRef(function(e,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:l,modifiers:a,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:f={},slots:p={},TransitionProps:g}=e,m=Fe(e,koe),v=P.useRef(null),y=_r(v,n),b=P.useRef(null),w=_r(b,h),k=P.useRef(w);sl(()=>{k.current=w},[w]),P.useImperativeHandle(h,()=>b.current,[]);const x=Soe(c,s),[S,T]=P.useState(x),[C,O]=P.useState(Xy(o));P.useEffect(()=>{b.current&&b.current.forceUpdate()}),P.useEffect(()=>{o&&O(Xy(o))},[o]),sl(()=>{if(!C||!u)return;const M=L=>{T(L.placement)};let I=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{M(L)}}];a!=null&&(I=I.concat(a)),d&&d.modifiers!=null&&(I=I.concat(d.modifiers));const N=boe(C,v.current,K({placement:x},d,{modifiers:I}));return k.current(N),()=>{N.destroy(),k.current(null)}},[C,l,a,u,d,x]);const _={placement:S};g!==null&&(_.TransitionProps=g);const R=Toe(),A=(r=p.root)!=null?r:"div",E=Gi({elementType:A,externalSlotProps:f.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:R.root});return j.jsx(A,K({},E,{children:typeof i=="function"?i(_):i}))}),Roe=P.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:l=!1,keepMounted:a=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:h=Aoe,popperRef:f,style:p,transition:g=!1,slotProps:m={},slots:v={}}=e,y=Fe(e,Eoe),[b,w]=P.useState(!0),k=()=>{w(!1)},x=()=>{w(!0)};if(!a&&!c&&(!g||b))return null;let S;if(i)S=i;else if(r){const O=Xy(r);S=O&&Coe(O)?Cr(O).body:Cr(null).body}const T=!c&&a&&(!g||b)?"none":void 0,C=g?{in:c,onEnter:k,onExited:x}:void 0;return j.jsx(cN,{disablePortal:l,container:S,children:j.jsx(_oe,K({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:g?!b:c,placement:d,popperOptions:h,popperRef:f,slotProps:m,slots:v},y,{style:K({position:"fixed",top:0,left:0,display:T},p),TransitionProps:C,children:o}))})});function Moe(t){const e=Cr(t);return e.body===t?vh(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Pd(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function QA(t){return parseInt(vh(t).getComputedStyle(t).paddingRight,10)||0}function Ooe(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function JA(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const l=i.indexOf(s)===-1,a=!Ooe(s);l&&a&&Pd(s,o)})}function j1(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function Ioe(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Moe(r)){const s=yL(Cr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${QA(r)+s}px`;const l=Cr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${QA(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Cr(r).body;else{const s=r.parentElement,l=vh(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.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()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function Loe(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Noe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Pd(e.modalRef,!1);const o=Loe(n);JA(n,e.mount,e.modalRef,o,!0);const i=j1(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=j1(this.containers,i=>i.modals.indexOf(e)!==-1),o=this.containers[r];o.restore||(o.restore=Ioe(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=j1(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Pd(e.modalRef,n),JA(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Pd(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function $oe(t){return typeof t=="function"?t():t}function Doe(t){return t?t.props.hasOwnProperty("in"):!1}const Poe=new Noe;function zoe(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Poe,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:c,rootRef:d}=t,h=P.useRef({}),f=P.useRef(null),p=P.useRef(null),g=_r(p,d),[m,v]=P.useState(!c),y=Doe(a);let b=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(b=!1);const w=()=>Cr(f.current),k=()=>(h.current.modalRef=p.current,h.current.mount=f.current,h.current),x=()=>{o.mount(k(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=za(()=>{const I=$oe(e)||w().body;o.add(k(),I),p.current&&x()}),T=P.useCallback(()=>o.isTopModal(k()),[o]),C=za(I=>{f.current=I,I&&(c&&T()?x():p.current&&Pd(p.current,b))}),O=P.useCallback(()=>{o.remove(k(),b)},[b,o]);P.useEffect(()=>()=>{O()},[O]),P.useEffect(()=>{c?S():(!y||!i)&&O()},[c,O,y,i,S]);const _=I=>N=>{var L;(L=I.onKeyDown)==null||L.call(I,N),!(N.key!=="Escape"||!T())&&(n||(N.stopPropagation(),u&&u(N,"escapeKeyDown")))},R=I=>N=>{var L;(L=I.onClick)==null||L.call(I,N),N.target===N.currentTarget&&u&&u(N,"backdropClick")};return{getRootProps:(I={})=>{const N=JL(t);delete N.onTransitionEnter,delete N.onTransitionExited;const L=K({},N,I);return K({role:"presentation"},L,{onKeyDown:_(L),ref:g})},getBackdropProps:(I={})=>{const N=I;return K({"aria-hidden":!0},N,{onClick:R(N),open:c})},getTransitionProps:()=>{const I=()=>{v(!1),s&&s()},N=()=>{v(!0),l&&l(),i&&O()};return{onEnter:uA(I,a==null?void 0:a.props.onEnter),onExited:uA(N,a==null?void 0:a.props.onExited)}},rootRef:g,portalRef:C,isTopModal:T,exited:m,hasTransition:y}}const Foe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Boe=St(Roe,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Hoe=P.forwardRef(function(e,n){var r;const o=Sx(),i=Tn({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:a,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,k=Fe(i,Foe),x=(r=b==null?void 0:b.root)!=null?r:a==null?void 0:a.Root,S=K({anchorEl:s,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y},k);return j.jsx(Boe,K({as:l,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:w??u},S,{ref:n}))}),Hx=Hoe,Uoe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Woe={entering:{opacity:1},entered:{opacity:1}},Voe=P.forwardRef(function(e,n){const r=kv(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:f,onExited:p,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=qL}=e,b=Fe(e,Uoe),w=P.useRef(null),k=_r(w,l.ref,n),x=E=>M=>{if(E){const I=w.current;M===void 0?E(I):E(I,M)}},S=x(h),T=x((E,M)=>{ZL(E);const I=zg({style:m,timeout:v,easing:a},{mode:"enter"});E.style.webkitTransition=r.transitions.create("opacity",I),E.style.transition=r.transitions.create("opacity",I),c&&c(E,M)}),C=x(d),O=x(g),_=x(E=>{const M=zg({style:m,timeout:v,easing:a},{mode:"exit"});E.style.webkitTransition=r.transitions.create("opacity",M),E.style.transition=r.transitions.create("opacity",M),f&&f(E)}),R=x(p),A=E=>{i&&i(w.current,E)};return j.jsx(y,K({appear:s,in:u,nodeRef:w,onEnter:T,onEntered:C,onEntering:S,onExit:_,onExited:R,onExiting:O,addEndListener:A,timeout:v},b,{children:(E,M)=>P.cloneElement(l,K({style:K({opacity:0,visibility:E==="exited"&&!u?"hidden":void 0},Woe[E],m,l.props.style),ref:k},M))}))}),joe=Voe;function Goe(t){return En("MuiBackdrop",t)}Sn("MuiBackdrop",["root","invisible"]);const Koe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Yoe=t=>{const{classes:e,invisible:n}=t;return zn({root:["root",n&&"invisible"]},Goe,e)},Xoe=St("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>K({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"},t.invisible&&{backgroundColor:"transparent"})),qoe=P.forwardRef(function(e,n){var r,o,i;const s=Tn({props:e,name:"MuiBackdrop"}),{children:l,className:a,component:u="div",components:c={},componentsProps:d={},invisible:h=!1,open:f,slotProps:p={},slots:g={},TransitionComponent:m=joe,transitionDuration:v}=s,y=Fe(s,Koe),b=K({},s,{component:u,invisible:h}),w=Yoe(b),k=(r=p.root)!=null?r:d.root;return j.jsx(m,K({in:f,timeout:v},y,{children:j.jsx(Xoe,K({"aria-hidden":!0},k,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:Ge(w.root,a,k==null?void 0:k.className),ownerState:K({},b,k==null?void 0:k.ownerState),classes:w,ref:n,children:l}))}))}),Zoe=qoe;function Qoe(t){return En("MuiBadge",t)}const Joe=Sn("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"]),ss=Joe,eie=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],G1=10,K1=4,tie=t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=t,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}`,`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}${pt(o)}`,`overlap${pt(o)}`,e!=="default"&&`color${pt(e)}`]};return zn(l,Qoe,s)},nie=St("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),rie=St("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${pt(n.anchorOrigin.vertical)}${pt(n.anchorOrigin.horizontal)}${pt(n.overlap)}`],n.color!=="default"&&e[`color${pt(n.color)}`],n.invisible&&e.invisible]}})(({theme:t,ownerState:e})=>K({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:G1*2,lineHeight:1,padding:"0 6px",height:G1*2,borderRadius:G1,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.variant==="dot"&&{borderRadius:K1,height:K1*2,minWidth:K1*2,padding:0},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular"&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular"&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular"&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular"&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ss.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},e.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})),oie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Tn({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:h,components:f={},componentsProps:p={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:k,slotProps:x,showZero:S=!1,variant:T="standard"}=u,C=Fe(u,eie),{badgeContent:O,invisible:_,max:R,displayValue:A}=sre({max:b,invisible:y,badgeContent:w,showZero:S}),E=bL({anchorOrigin:c,color:v,overlap:m,variant:T,badgeContent:w}),M=_||O==null&&T!=="dot",{color:I=v,overlap:N=m,anchorOrigin:L=c,variant:$=T}=M?E:u,D=$!=="dot"?A:void 0,F=K({},u,{badgeContent:O,invisible:M,max:R,displayValue:D,showZero:S,anchorOrigin:L,color:I,overlap:N,variant:$}),U=tie(F),W=(r=(o=k==null?void 0:k.root)!=null?o:f.Root)!=null?r:nie,B=(i=(s=k==null?void 0:k.badge)!=null?s:f.Badge)!=null?i:rie,H=(l=x==null?void 0:x.root)!=null?l:p.root,V=(a=x==null?void 0:x.badge)!=null?a:p.badge,Y=Gi({elementType:W,externalSlotProps:H,externalForwardedProps:C,additionalProps:{ref:n,as:h},ownerState:F,className:Ge(H==null?void 0:H.className,U.root,d)}),X=Gi({elementType:B,externalSlotProps:V,ownerState:F,className:Ge(U.badge,V==null?void 0:V.className)});return j.jsxs(W,K({},Y,{children:[g,j.jsx(B,K({},X,{children:D}))]}))}),iie=oie,sie=_x(),aie=Qee({themeId:Xc,defaultTheme:sie,defaultClassName:"MuiBox-root",generateClassName:xL.generate}),uN=aie;function lie(t){return En("MuiModal",t)}Sn("MuiModal",["root","hidden","backdrop"]);const cie=["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"],uie=t=>{const{open:e,exited:n,classes:r}=t;return zn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},lie,r)},die=St("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>K({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),hie=St(Zoe,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),fie=P.forwardRef(function(e,n){var r,o,i,s,l,a;const u=Tn({name:"MuiModal",props:e}),{BackdropComponent:c=hie,BackdropProps:d,className:h,closeAfterTransition:f=!1,children:p,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:S=!1,disableScrollLock:T=!1,hideBackdrop:C=!1,keepMounted:O=!1,onBackdropClick:_,open:R,slotProps:A,slots:E}=u,M=Fe(u,cie),I=K({},u,{closeAfterTransition:f,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:S,disableScrollLock:T,hideBackdrop:C,keepMounted:O}),{getRootProps:N,getBackdropProps:L,getTransitionProps:$,portalRef:D,isTopModal:F,exited:U,hasTransition:W}=zoe(K({},I,{rootRef:n})),B=K({},I,{exited:U}),H=uie(B),V={};if(p.props.tabIndex===void 0&&(V.tabIndex="-1"),W){const{onEnter:ye,onExited:Me}=$();V.onEnter=ye,V.onExited=Me}const Y=(r=(o=E==null?void 0:E.root)!=null?o:v.Root)!=null?r:die,X=(i=(s=E==null?void 0:E.backdrop)!=null?s:v.Backdrop)!=null?i:c,Z=(l=A==null?void 0:A.root)!=null?l:y.root,te=(a=A==null?void 0:A.backdrop)!=null?a:y.backdrop,ce=Gi({elementType:Y,externalSlotProps:Z,externalForwardedProps:M,getSlotProps:N,additionalProps:{ref:n,as:m},ownerState:B,className:Ge(h,Z==null?void 0:Z.className,H==null?void 0:H.root,!B.open&&B.exited&&(H==null?void 0:H.hidden))}),Ne=Gi({elementType:X,externalSlotProps:te,additionalProps:d,getSlotProps:ye=>L(K({},ye,{onClick:Me=>{_&&_(Me),ye!=null&&ye.onClick&&ye.onClick(Me)}})),className:Ge(te==null?void 0:te.className,d==null?void 0:d.className,H==null?void 0:H.backdrop),ownerState:B});return!O&&!R&&(!W||U)?null:j.jsx(cN,{ref:D,container:g,disablePortal:x,children:j.jsxs(Y,K({},ce,{children:[!C&&c?j.jsx(X,K({},Ne)):null,j.jsx(fre,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:R,children:P.cloneElement(p,V)})]}))})}),pie=fie,gie=Sn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),e_=gie,mie=Mte({createStyledComponent:St("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Tn({props:t,name:"MuiStack"})}),vie=mie,yie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qy(t){return`scale(${t}, ${t**2})`}const bie={entering:{opacity:1,transform:qy(1)},entered:{opacity:1,transform:"none"}},Y1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),dN=P.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:f,style:p,timeout:g="auto",TransitionComponent:m=qL}=e,v=Fe(e,yie),y=P.useRef(),b=P.useRef(),w=kv(),k=P.useRef(null),x=_r(k,i.ref,n),S=M=>I=>{if(M){const N=k.current;I===void 0?M(N):M(N,I)}},T=S(c),C=S((M,I)=>{ZL(M);const{duration:N,delay:L,easing:$}=zg({style:p,timeout:g,easing:s},{mode:"enter"});let D;g==="auto"?(D=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=D):D=N,M.style.transition=[w.transitions.create("opacity",{duration:D,delay:L}),w.transitions.create("transform",{duration:Y1?D:D*.666,delay:L,easing:$})].join(","),a&&a(M,I)}),O=S(u),_=S(f),R=S(M=>{const{duration:I,delay:N,easing:L}=zg({style:p,timeout:g,easing:s},{mode:"exit"});let $;g==="auto"?($=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=$):$=I,M.style.transition=[w.transitions.create("opacity",{duration:$,delay:N}),w.transitions.create("transform",{duration:Y1?$:$*.666,delay:Y1?N:N||$*.333,easing:L})].join(","),M.style.opacity=0,M.style.transform=qy(.75),d&&d(M)}),A=S(h),E=M=>{g==="auto"&&(y.current=setTimeout(M,b.current||0)),r&&r(k.current,M)};return P.useEffect(()=>()=>{clearTimeout(y.current)},[]),j.jsx(m,K({appear:o,in:l,nodeRef:k,onEnter:C,onEntered:O,onEntering:T,onExit:R,onExited:A,onExiting:_,addEndListener:E,timeout:g==="auto"?null:g},v,{children:(M,I)=>P.cloneElement(i,K({style:K({opacity:0,transform:qy(.75),visibility:M==="exited"&&!l?"hidden":void 0},bie[M],p,i.props.style),ref:x},I))}))});dN.muiSupportAuto=!0;const Zy=dN,wie=P.createContext({}),Eh=wie;function xie(t){return En("MuiList",t)}Sn("MuiList",["root","padding","dense","subheader"]);const kie=["children","className","component","dense","disablePadding","subheader"],Eie=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return zn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},xie,e)},Sie=St("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>K({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Cie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u}=r,c=Fe(r,kie),d=P.useMemo(()=>({dense:l}),[l]),h=K({},r,{component:s,dense:l,disablePadding:a}),f=Eie(h);return j.jsx(Eh.Provider,{value:d,children:j.jsxs(Sie,K({as:s,className:Ge(f.root,i),ref:n,ownerState:h},c,{children:[u,o]}))})}),Tie=Cie;function Aie(t){return En("MuiListItemIcon",t)}const _ie=Sn("MuiListItemIcon",["root","alignItemsFlexStart"]),t_=_ie,Rie=["className"],Mie=t=>{const{alignItems:e,classes:n}=t;return zn({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},Aie,n)},Oie=St("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>K({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),Iie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiListItemIcon"}),{className:o}=r,i=Fe(r,Rie),s=P.useContext(Eh),l=K({},r,{alignItems:s.alignItems}),a=Mie(l);return j.jsx(Oie,K({className:Ge(a.root,o),ownerState:l,ref:n},i))}),Lie=Iie;function Nie(t){return En("MuiListItemText",t)}const $ie=Sn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bg=$ie,Die=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Pie=t=>{const{classes:e,inset:n,primary:r,secondary:o,dense:i}=t;return zn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Nie,e)},zie=St("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Bg.primary}`]:e.primary},{[`& .${Bg.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>K({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),Fie=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:l=!1,primary:a,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,h=Fe(r,Die),{dense:f}=P.useContext(Eh);let p=a??o,g=c;const m=K({},r,{disableTypography:s,inset:l,primary:!!p,secondary:!!g,dense:f}),v=Pie(m);return p!=null&&p.type!==yd&&!s&&(p=j.jsx(yd,K({variant:f?"body2":"body1",className:v.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:p}))),g!=null&&g.type!==yd&&!s&&(g=j.jsx(yd,K({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),j.jsxs(zie,K({className:Ge(v.root,i),ownerState:m,ref:n},h,{children:[p,g]}))}),Bie=Fie,Hie=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function X1(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function n_(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function hN(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Du(t,e,n,r,o,i){let s=!1,l=o(t,e,e?n:!1);for(;l;){if(l===t.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!hN(l,i)||a)l=o(t,l,n);else return l.focus(),!0}return!1}const Uie=P.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=e,h=Fe(e,Hie),f=P.useRef(null),p=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});sl(()=>{o&&f.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,w)=>{const k=!f.current.style.width;if(b.clientHeight{const w=f.current,k=b.key,x=Cr(w).activeElement;if(k==="ArrowDown")b.preventDefault(),Du(w,x,u,a,X1);else if(k==="ArrowUp")b.preventDefault(),Du(w,x,u,a,n_);else if(k==="Home")b.preventDefault(),Du(w,null,u,a,X1);else if(k==="End")b.preventDefault(),Du(w,null,u,a,n_);else if(k.length===1){const S=p.current,T=k.toLowerCase(),C=performance.now();S.keys.length>0&&(C-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&T!==S.keys[0]&&(S.repeating=!1)),S.lastTime=C,S.keys.push(T);const O=x&&!S.repeating&&hN(x,S);S.previousKeyMatched&&(O||Du(w,x,!1,a,X1,S))?b.preventDefault():S.previousKeyMatched=!1}c&&c(b)},m=_r(f,n);let v=-1;P.Children.forEach(s,(b,w)=>{if(!P.isValidElement(b)){v===w&&(v+=1,v>=s.length&&(v=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const y=P.Children.map(s,(b,w)=>{if(w===v){const k={};return i&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),P.cloneElement(b,k)}return b});return j.jsx(Tie,K({role:"menu",ref:m,className:l,onKeyDown:g,tabIndex:o?0:-1},h,{children:y}))}),Wie=Uie;function Vie(t){return En("MuiPopover",t)}Sn("MuiPopover",["root","paper"]);const jie=["onEntering"],Gie=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Kie=["slotProps"];function r_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function o_(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function i_(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function q1(t){return typeof t=="function"?t():t}const Yie=t=>{const{classes:e}=t;return zn({root:["root"],paper:["paper"]},Vie,e)},Xie=St(pie,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),fN=St(wne,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qie=P.forwardRef(function(e,n){var r,o,i;const s=Tn({props:e,name:"MuiPopover"}),{action:l,anchorEl:a,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:f,container:p,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=Zy,transitionDuration:S="auto",TransitionProps:{onEntering:T}={},disableScrollLock:C=!1}=s,O=Fe(s.TransitionProps,jie),_=Fe(s,Gie),R=(r=w==null?void 0:w.paper)!=null?r:y,A=P.useRef(),E=_r(A,R.ref),M=K({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:R,transformOrigin:k,TransitionComponent:x,transitionDuration:S,TransitionProps:O}),I=Yie(M),N=P.useCallback(()=>{if(d==="anchorPosition")return c;const ye=q1(a),Ce=(ye&&ye.nodeType===1?ye:Cr(A.current).body).getBoundingClientRect();return{top:Ce.top+r_(Ce,u.vertical),left:Ce.left+o_(Ce,u.horizontal)}},[a,u.horizontal,u.vertical,c,d]),L=P.useCallback(ye=>({vertical:r_(ye,k.vertical),horizontal:o_(ye,k.horizontal)}),[k.horizontal,k.vertical]),$=P.useCallback(ye=>{const Me={width:ye.offsetWidth,height:ye.offsetHeight},Ce=L(Me);if(d==="none")return{top:null,left:null,transformOrigin:i_(Ce)};const mt=N();let Lt=mt.top-Ce.vertical,wt=mt.left-Ce.horizontal;const qn=Lt+Me.height,Nt=wt+Me.width,An=vh(q1(a)),hn=An.innerHeight-m,fn=An.innerWidth-m;if(m!==null&&Lthn){const qe=qn-hn;Lt-=qe,Ce.vertical+=qe}if(m!==null&&wtfn){const qe=Nt-fn;wt-=qe,Ce.horizontal+=qe}return{top:`${Math.round(Lt)}px`,left:`${Math.round(wt)}px`,transformOrigin:i_(Ce)}},[a,d,N,L,m]),[D,F]=P.useState(v),U=P.useCallback(()=>{const ye=A.current;if(!ye)return;const Me=$(ye);Me.top!==null&&(ye.style.top=Me.top),Me.left!==null&&(ye.style.left=Me.left),ye.style.transformOrigin=Me.transformOrigin,F(!0)},[$]);P.useEffect(()=>(C&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[a,C,U]);const W=(ye,Me)=>{T&&T(ye,Me),U()},B=()=>{F(!1)};P.useEffect(()=>{v&&U()}),P.useImperativeHandle(l,()=>v?{updatePosition:()=>{U()}}:null,[v,U]),P.useEffect(()=>{if(!v)return;const ye=DQ(()=>{U()}),Me=vh(a);return Me.addEventListener("resize",ye),()=>{ye.clear(),Me.removeEventListener("resize",ye)}},[a,v,U]);let H=S;S==="auto"&&!x.muiSupportAuto&&(H=void 0);const V=p||(a?Cr(q1(a)).body:void 0),Y=(o=b==null?void 0:b.root)!=null?o:Xie,X=(i=b==null?void 0:b.paper)!=null?i:fN,Z=Gi({elementType:X,externalSlotProps:K({},R,{style:D?R.style:K({},R.style,{opacity:0})}),additionalProps:{elevation:g,ref:E},ownerState:M,className:Ge(I.paper,R==null?void 0:R.className)}),te=Gi({elementType:Y,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:_,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:V,open:v},ownerState:M,className:Ge(I.root,f)}),{slotProps:ce}=te,Ne=Fe(te,Kie);return j.jsx(Y,K({},Ne,!QL(Y)&&{slotProps:ce,disableScrollLock:C},{children:j.jsx(x,K({appear:!0,in:v,onEntering:W,onExited:B,timeout:H},O,{children:j.jsx(X,K({},Z,{children:h}))}))}))}),Zie=qie;function Qie(t){return En("MuiMenu",t)}Sn("MuiMenu",["root","paper","list"]);const Jie=["onEntering"],ese=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tse={vertical:"top",horizontal:"right"},nse={vertical:"top",horizontal:"left"},rse=t=>{const{classes:e}=t;return zn({root:["root"],paper:["paper"],list:["list"]},Qie,e)},ose=St(Zie,{shouldForwardProp:t=>Mx(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ise=St(fN,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),sse=St(Wie,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),ase=P.forwardRef(function(e,n){var r,o;const i=Tn({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:a,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:h,PaperProps:f={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=Fe(i.TransitionProps,Jie),k=Fe(i,ese),x=kv(),S=x.direction==="rtl",T=K({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:m,PaperProps:f,transitionDuration:g,TransitionProps:w,variant:v}),C=rse(T),O=s&&!u&&h,_=P.useRef(null),R=($,D)=>{_.current&&_.current.adjustStyleForScrollbar($,x),m&&m($,D)},A=$=>{$.key==="Tab"&&($.preventDefault(),d&&d($,"tabKeyDown"))};let E=-1;P.Children.map(l,($,D)=>{P.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||E===-1)&&(E=D))});const M=(r=y.paper)!=null?r:ise,I=(o=b.paper)!=null?o:f,N=Gi({elementType:y.root,externalSlotProps:b.root,ownerState:T,className:[C.root,a]}),L=Gi({elementType:M,externalSlotProps:I,ownerState:T,className:C.paper});return j.jsx(ose,K({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?tse:nse,slots:{paper:M,root:y.root},slotProps:{root:N,paper:L},open:h,ref:n,transitionDuration:g,TransitionProps:K({onEntering:R},w),ownerState:T},k,{classes:p,children:j.jsx(sse,K({onKeyDown:A,actions:_,autoFocus:s&&(E===-1||u),autoFocusItem:O,variant:v},c,{className:Ge(C.list,c.className),children:l}))}))}),lse=ase;function cse(t){return En("MuiMenuItem",t)}const use=Sn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Pu=use,dse=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],hse=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},fse=t=>{const{disabled:e,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=t,a=zn({root:["root",n&&"dense",e&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},cse,s);return K({},s,a)},pse=St(Lx,{shouldForwardProp:t=>Mx(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:hse})(({theme:t,ownerState:e})=>K({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pu.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:wr(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Pu.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:wr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Pu.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:wr(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:wr(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Pu.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Pu.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${e_.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${e_.inset}`]:{marginLeft:52},[`& .${Bg.root}`]:{marginTop:0,marginBottom:0},[`& .${Bg.inset}`]:{paddingLeft:36},[`& .${t_.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&K({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${t_.root} svg`]:{fontSize:"1.25rem"}}))),gse=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h}=r,f=Fe(r,dse),p=P.useContext(Eh),g=P.useMemo(()=>({dense:s||p.dense||!1,disableGutters:a}),[p.dense,s,a]),m=P.useRef(null);sl(()=>{o&&m.current&&m.current.focus()},[o]);const v=K({},r,{dense:g.dense,divider:l,disableGutters:a}),y=fse(r),b=_r(m,n);let w;return r.disabled||(w=d!==void 0?d:-1),j.jsx(Eh.Provider,{value:g,children:j.jsx(pse,K({ref:b,role:c,tabIndex:w,component:i,focusVisibleClassName:Ge(y.focusVisible,u),className:Ge(y.root,h)},f,{ownerState:v,classes:y}))})}),mse=gse;function vse(t){return En("MuiTooltip",t)}const yse=Sn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Cs=yse,bse=["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 wse(t){return Math.round(t*1e5)/1e5}const xse=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:o,placement:i}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${pt(i.split("-")[0])}`],arrow:["arrow"]};return zn(s,vse,e)},kse=St(Hx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>K({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Cs.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Cs.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Cs.arrow}`]:K({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Cs.arrow}`]:K({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Ese=St("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${pt(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>K({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:wr(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${wse(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Cs.popper}[data-popper-placement*="left"] &`]:K({transformOrigin:"right center"},e.isRtl?K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):K({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Cs.popper}[data-popper-placement*="right"] &`]:K({transformOrigin:"left center"},e.isRtl?K({marginRight:"14px"},e.touch&&{marginRight:"24px"}):K({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Cs.popper}[data-popper-placement*="top"] &`]:K({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Cs.popper}[data-popper-placement*="bottom"] &`]:K({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Sse=St("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:wr(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Yf=!1,Z1=null,zu={x:0,y:0};function Xf(t,e){return n=>{e&&e(n),t(n)}}const Cse=P.forwardRef(function(e,n){var r,o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k;const x=Tn({props:e,name:"MuiTooltip"}),{arrow:S=!1,children:T,components:C={},componentsProps:O={},describeChild:_=!1,disableFocusListener:R=!1,disableHoverListener:A=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:I=100,enterNextDelay:N=0,enterTouchDelay:L=700,followCursor:$=!1,id:D,leaveDelay:F=0,leaveTouchDelay:U=1500,onClose:W,onOpen:B,open:H,placement:V="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Z={},slots:te={},title:ce,TransitionComponent:Ne=Zy,TransitionProps:ye}=x,Me=Fe(x,bse),Ce=P.isValidElement(T)?T:j.jsx("span",{children:T}),mt=kv(),Lt=mt.direction==="rtl",[wt,qn]=P.useState(),[Nt,An]=P.useState(null),hn=P.useRef(!1),fn=E||$,qe=P.useRef(),_n=P.useRef(),q=P.useRef(),he=P.useRef(),[ve,ie]=BQ({controlled:H,default:!1,name:"Tooltip",state:"open"});let Te=ve;const Ze=FQ(D),Xe=P.useRef(),nt=P.useCallback(()=>{Xe.current!==void 0&&(document.body.style.WebkitUserSelect=Xe.current,Xe.current=void 0),clearTimeout(he.current)},[]);P.useEffect(()=>()=>{clearTimeout(qe.current),clearTimeout(_n.current),clearTimeout(q.current),nt()},[nt]);const rt=$e=>{clearTimeout(Z1),Yf=!0,ie(!0),B&&!Te&&B($e)},Be=za($e=>{clearTimeout(Z1),Z1=setTimeout(()=>{Yf=!1},800+F),ie(!1),W&&Te&&W($e),clearTimeout(qe.current),qe.current=setTimeout(()=>{hn.current=!1},mt.transitions.duration.shortest)}),Kt=$e=>{hn.current&&$e.type!=="touchstart"||(wt&&wt.removeAttribute("title"),clearTimeout(_n.current),clearTimeout(q.current),I||Yf&&N?_n.current=setTimeout(()=>{rt($e)},Yf?N:I):rt($e))},Co=$e=>{clearTimeout(_n.current),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},F)},{isFocusVisibleRef:la,onBlur:yi,onFocus:uf,ref:Iv}=vL(),[,df]=P.useState(!1),Tl=$e=>{yi($e),la.current===!1&&(df(!1),Co($e))},Qi=$e=>{wt||qn($e.currentTarget),uf($e),la.current===!0&&(df(!0),Kt($e))},Al=$e=>{hn.current=!0;const Qn=Ce.props;Qn.onTouchStart&&Qn.onTouchStart($e)},_l=Kt,Rl=Co,ca=$e=>{Al($e),clearTimeout(q.current),clearTimeout(qe.current),nt(),Xe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",he.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Xe.current,Kt($e)},L)},Lv=$e=>{Ce.props.onTouchEnd&&Ce.props.onTouchEnd($e),nt(),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},U)};P.useEffect(()=>{if(!Te)return;function $e(Qn){(Qn.key==="Escape"||Qn.key==="Esc")&&Be(Qn)}return document.addEventListener("keydown",$e),()=>{document.removeEventListener("keydown",$e)}},[Be,Te]);const Nv=_r(Ce.ref,Iv,qn,n);!ce&&ce!==0&&(Te=!1);const bu=P.useRef(),$v=$e=>{const Qn=Ce.props;Qn.onMouseMove&&Qn.onMouseMove($e),zu={x:$e.clientX,y:$e.clientY},bu.current&&bu.current.update()},ua={},Ml=typeof ce=="string";_?(ua.title=!Te&&Ml&&!A?ce:null,ua["aria-describedby"]=Te?Ze:null):(ua["aria-label"]=Ml?ce:null,ua["aria-labelledby"]=Te&&!Ml?Ze:null);const Zn=K({},ua,Me,Ce.props,{className:Ge(Me.className,Ce.props.className),onTouchStart:Al,ref:Nv},$?{onMouseMove:$v}:{}),Or={};M||(Zn.onTouchStart=ca,Zn.onTouchEnd=Lv),A||(Zn.onMouseOver=Xf(_l,Zn.onMouseOver),Zn.onMouseLeave=Xf(Rl,Zn.onMouseLeave),fn||(Or.onMouseOver=_l,Or.onMouseLeave=Rl)),R||(Zn.onFocus=Xf(Qi,Zn.onFocus),Zn.onBlur=Xf(Tl,Zn.onBlur),fn||(Or.onFocus=Qi,Or.onBlur=Tl));const Dv=P.useMemo(()=>{var $e;let Qn=[{name:"arrow",enabled:!!Nt,options:{element:Nt,padding:4}}];return($e=X.popperOptions)!=null&&$e.modifiers&&(Qn=Qn.concat(X.popperOptions.modifiers)),K({},X.popperOptions,{modifiers:Qn})},[Nt,X]),da=K({},x,{isRtl:Lt,arrow:S,disableInteractive:fn,placement:V,PopperComponentProp:Y,touch:hn.current}),wu=xse(da),hf=(r=(o=te.popper)!=null?o:C.Popper)!=null?r:kse,ff=(i=(s=(l=te.transition)!=null?l:C.Transition)!=null?s:Ne)!=null?i:Zy,eo=(a=(u=te.tooltip)!=null?u:C.Tooltip)!=null?a:Ese,pf=(c=(d=te.arrow)!=null?d:C.Arrow)!=null?c:Sse,Pv=bd(hf,K({},X,(h=Z.popper)!=null?h:O.popper,{className:Ge(wu.popper,X==null?void 0:X.className,(f=(p=Z.popper)!=null?p:O.popper)==null?void 0:f.className)}),da),zv=bd(ff,K({},ye,(g=Z.transition)!=null?g:O.transition),da),Fv=bd(eo,K({},(m=Z.tooltip)!=null?m:O.tooltip,{className:Ge(wu.tooltip,(v=(y=Z.tooltip)!=null?y:O.tooltip)==null?void 0:v.className)}),da),Bv=bd(pf,K({},(b=Z.arrow)!=null?b:O.arrow,{className:Ge(wu.arrow,(w=(k=Z.arrow)!=null?k:O.arrow)==null?void 0:w.className)}),da);return j.jsxs(P.Fragment,{children:[P.cloneElement(Ce,Zn),j.jsx(hf,K({as:Y??Hx,placement:V,anchorEl:$?{getBoundingClientRect:()=>({top:zu.y,left:zu.x,right:zu.x,bottom:zu.y,width:0,height:0})}:wt,popperRef:bu,open:wt?Te:!1,id:Ze,transition:!0},Or,Pv,{popperOptions:Dv,children:({TransitionProps:$e})=>j.jsx(ff,K({timeout:mt.transitions.duration.shorter},$e,zv,{children:j.jsxs(eo,K({},Fv,{children:[ce,S?j.jsx(pf,K({},Bv,{ref:An})):null]}))}))}))]})}),pN=Cse;function Tse(t){return En("MuiToggleButton",t)}const Ase=Sn("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),s_=Ase,_se=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Rse=t=>{const{classes:e,fullWidth:n,selected:r,disabled:o,size:i,color:s}=t,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${pt(i)}`,s]};return zn(l,Tse,e)},Mse=St(Lx,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${pt(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),K({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${s_.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:wr(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${s_.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:wr(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:wr(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:wr(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),Ose=P.forwardRef(function(e,n){const r=Tn({props:e,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:l=!1,disableFocusRipple:a=!1,fullWidth:u=!1,onChange:c,onClick:d,selected:h,size:f="medium",value:p}=r,g=Fe(r,_se),m=K({},r,{color:s,disabled:l,disableFocusRipple:a,fullWidth:u,size:f}),v=Rse(m),y=b=>{d&&(d(b,p),b.defaultPrevented)||c&&c(b,p)};return j.jsx(Mse,K({className:Ge(v.root,i),disabled:l,focusRipple:!a,ref:n,onClick:y,onChange:c,value:p,ownerState:m,"aria-pressed":h},g,{children:o}))}),Ise=Ose;var Lse=[{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"}}],Nse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],$se=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],Dse=[{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"}}],Pse=[{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"}}],zse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],Fse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],Bse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],Hse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],Use=[{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"}}],Wse=[{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"}}],Vse=[{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"}}],jse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],Gse=[{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"}}],Kse=[{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"}}],Yse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],Xse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],qse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],Zse=[{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"}}],Qse=[{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"}}],Jse=[{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"}}],eae=[{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"}}],tae=[{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"}}],nae=[{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"}}],rae=[{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"}}],oae=[{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"}}],iae=[{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"}}],sae=[{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"}}],aae=[{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"}}],lae=[{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"}}],cae=[{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"}}],uae=[{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"}}],dae=[{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"}}],hae=[{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"}}],fae=[{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"}}],pae=[{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"}}],gae=[{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"}}],mae=[{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"}}],vae=[{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"}}],yae=[{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"}}],bae=[{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"}}],wae=[{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"}}],xae=[{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"}}],kae=[{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"}}],Eae=[{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"}}],Sae=[{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"}}],Cae=[{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"}}],Tae=[{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"}}],Aae=[{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"}}],_ae=[{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"}}],Rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],Mae=[{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"}}],Oae=[{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"}}],Iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],Lae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],Nae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],$ae=[{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"}}],Dae=[{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"}}],Pae=[{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"}}],zae=[{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"}}],Fae=[{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"}}],Bae=[{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"}}],Hae=[{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"}}],Uae=[{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"}}],Wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],Vae=[{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"}}],jae=[{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"}}],Gae=[{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"}}],Kae=[{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"}}],Yae=[{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"}}],Xae=[{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"}}],qae=[{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"}}],Zae=[{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"}}],Qae=[{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"}}],Jae=[{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"}}],ele=[{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"}}],tle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],nle=[{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"}}],rle=[{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"}}],ole=[{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"}}],ile=[{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"}}],sle=[{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"}}],ale=[{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"}}],lle=[{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"}}],cle=[{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"}}],ule=[{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"}}],dle=[{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"}}],hle=[{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"}}],fle=[{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"}}],ple=[{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"}}],gle=[{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"}}],mle=[{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"}}],vle=[{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"}}],yle=[{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"}}],ble=[{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"}}],wle=[{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"}}],xle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],kle=[{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"}}],Ele=[{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"}}],Sle=[{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"}}],Cle=[{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"}}],Tle=[{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"}}],Ale=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],_le=[{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"}}],Rle=[{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"}}],Mle=[{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"}}],Ole=[{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"}}],Ile=[{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"}}],Lle=[{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"}}],Nle=[{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"}}],$le=[{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"}}],Dle=[{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"}}],Ple=[{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"}}],zle=[{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"}}],Fle=[{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"}}],Ble=[{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"}}],Hle=[{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"}}],Ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],Wle=[{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"}}],Vle=[{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"}}],jle=[{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"}}],Gle=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],Kle=[{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"}}],Yle=[{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"}}],Xle=[{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"}}],qle=[{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"}}],Zle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],Qle=[{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"}}],Jle=[{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"}}],ece=[{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"}}],tce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],nce=[{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"}}],rce=[{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"}}],oce=[{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"}}],ice=[{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"}}],sce=[{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"}}],lce=[{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"}}],cce=[{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"}}],uce=[{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"}}],dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],hce=[{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"}}],fce=[{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"}}],pce=[{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"}}],gce=[{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"}}],mce=[{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"}}],vce=[{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 yce=Object.freeze(Object.defineProperty({__proto__:null,ab:Lse,addFill:Nse,addLine:$se,alertLine:Dse,alignBottom:Pse,alignCenter:zse,alignJustify:Fse,alignLeft:Bse,alignRight:Hse,alignTop:Use,alignVertically:Wse,appsLine:Vse,arrowDownSFill:jse,arrowGoBackFill:Gse,arrowGoForwardFill:Kse,arrowLeftSFill:Yse,arrowRightSFill:Xse,arrowUpSFill:qse,asterisk:Zse,attachment2:Qse,bold:Jse,bracesLine:eae,bringForward:tae,bringToFront:nae,chatNewLine:rae,checkboxCircleLine:oae,checkboxMultipleLine:iae,clipboardFill:sae,clipboardLine:aae,closeCircleLine:lae,closeFill:cae,closeLine:uae,codeLine:dae,codeView:hae,deleteBinFill:fae,deleteBinLine:pae,deleteColumn:gae,deleteRow:mae,doubleQuotesL:vae,doubleQuotesR:yae,download2Fill:bae,dragDropLine:wae,emphasis:kae,emphasisCn:xae,englishInput:Eae,errorWarningLine:Sae,externalLinkFill:Cae,fileCopyLine:Tae,flowChart:Aae,fontColor:_ae,fontSize:Mae,fontSize2:Rae,formatClear:Oae,fullscreenExitLine:Iae,fullscreenLine:Lae,functions:Nae,galleryUploadLine:$ae,h1:Dae,h2:Pae,h3:zae,h4:Fae,h5:Bae,h6:Hae,hashtag:Uae,heading:Wae,imageAddLine:Vae,imageEditLine:jae,imageLine:Gae,indentDecrease:Kae,indentIncrease:Yae,informationLine:Xae,inputCursorMove:qae,insertColumnLeft:Zae,insertColumnRight:Qae,insertRowBottom:Jae,insertRowTop:ele,italic:tle,layoutColumnLine:nle,lineHeight:rle,link:ale,linkM:ole,linkUnlink:sle,linkUnlinkM:ile,listCheck:cle,listCheck2:lle,listOrdered:ule,listUnordered:dle,markPenLine:hle,markdownFill:fle,markdownLine:ple,mergeCellsHorizontal:gle,mergeCellsVertical:mle,mindMap:vle,moreFill:yle,nodeTree:ble,number0:wle,number1:xle,number2:kle,number3:Ele,number4:Sle,number5:Cle,number6:Tle,number7:Ale,number8:_le,number9:Rle,omega:Mle,organizationChart:Ole,pageSeparator:Ile,paragraph:Lle,pencilFill:Nle,pencilLine:$le,pinyinInput:Dle,questionMark:Ple,roundedCorner:zle,scissorsFill:Fle,sendBackward:Ble,sendToBack:Hle,separator:Ule,singleQuotesL:Wle,singleQuotesR:Vle,sortAsc:jle,sortDesc:Gle,space:Kle,spamLine:Yle,splitCellsHorizontal:Xle,splitCellsVertical:qle,strikethrough:Qle,strikethrough2:Zle,subscript:ece,subscript2:Jle,subtractLine:tce,superscript:rce,superscript2:nce,table2:oce,tableLine:ice,text:dce,textDirectionL:sce,textDirectionR:lce,textSpacing:cce,textWrap:uce,translate:fce,translate2:hce,underline:pce,upload2Fill:gce,videoLine:mce,wubiInput:vce},Symbol.toStringTag,{value:"Module"}));function bce(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let c=n.doc.resolve(s.start-2);a=new Ya(c,c,s.depth),s.endIndex=0;c--)i=Q.from(n[c].type.create(n[c].attrs,i));t.step(new qt(e.start-(r?2:0),e.end,e.start,e.end,new ae(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?kce(e,n,t,i):Ece(e,n,i):!0:!1}}function kce(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);ig;p--)f-=o.child(p).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?Q.empty:Q.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new qt(d-(l?1:0),h+(a?1:0),d+1,h-1,new ae((l?Q.empty:Q.from(o.copy(Q.empty))).append(a?Q.empty:Q.from(o.copy(Q.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}var Sce=Object.defineProperty,Cce=Object.getOwnPropertyDescriptor,So=(t,e,n,r)=>{for(var o=r>1?void 0:r?Cce(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Sce(e,n,o),o};function Qy(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Ee.ListContainerNode))}function Tce(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Ee.ListItemNode))}function Ys(t){return Qy(t.type)}function zs(t){return Tce(t.type)}function Ux(t,e){return n=>{const{dispatch:r,tr:o}=n,i=Mb(o,n.state),{$from:s,$to:l}=o.selection,a=s.blockRange(l);if(!a)return!1;const u=Hh({predicate:c=>Qy(c.type),selection:o.selection});if(u&&a.depth-u.depth<=1&&a.startIndex===0){if(u.node.type===t)return vN(e)(n);if(Qy(u.node.type))return t.validContent(u.node.content)?(r==null||r(o.setNodeMarkup(u.pos,t)),!0):Ace(o,u,t,e)?(r==null||r(o.scrollIntoView()),!0):!1}return bce(t)(i,r)}}function gN(t,e=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const l=Kz(t,o.schema),{$from:a,$to:u}=n.selection;if(Wh(n.selection)&&n.selection.node.isBlock||a.depth<2||!a.sameParent(u))return!1;const c=a.node(-1);if(c.type!==l)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){const g=a.index(-1)>0;let m=Q.empty;for(let b=a.depth-(g?1:2);b>=a.depth-3;b--)m=Q.from(a.node(b).copy(m));const v=((i=l.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;m=m.append(Q.from(l.createAndFill(null,v)||void 0));const y=a.indexAfter(-1)!e.includes(g))),h=u.pos===a.end()?c.contentMatchAt(0).defaultType:null,f={...a.node().attrs};n.delete(a.pos,u.pos);const p=h?[{type:l,attrs:d},{type:h,attrs:f}]:[{type:l,attrs:d}];return gc(n.doc,a.pos,2)?(r&&r(n.split(a.pos,2,p).scrollIntoView()),!0):!1}}function Ace(t,e,n,r){const o=e.node,i=t.doc.resolve(e.start),s=i.node(-1),l=i.index(-1);if(!s||!s.canReplace(l,l+1,Q.from(n.create())))return!1;const a=[];for(let f=0;fm;g--)p-=o.child(g).nodeSize,r.delete(p-1,p+1);const s=r.doc.resolve(n.start),l=s.nodeAfter;if(!l||r.mapping.slice(i).map(n.end)!==n.start+l.nodeSize)return!1;const a=n.startIndex===0,u=n.endIndex===o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,l.content.append(u?Q.empty:Q.from(o))))return!1;const h=s.pos,f=h+l.nodeSize;return r.step(new qt(h-(a?1:0),f+(u?1:0),h+1,f-1,new ae((a?Q.empty:Q.from(o.copy(Q.empty))).append(u?Q.empty:Q.from(o.copy(Q.empty))),a?0:1,u?0:1),a?0:1)),e(r.scrollIntoView()),!0}function mN(t,e){const n=e||t.selection.$from;let r=[],o,i,s,l;for(let u=n.depth;u>=0;u--){if(i=n.node(u),o=n.index(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Ys(s)){const c=n.before(u+1);r.push(c)}if(o=n.indexAfter(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Ys(s)){const c=n.after(u+1);r.push(c)}}r=[...new Set(r)].sort((u,c)=>c-u);let a=!1;for(const u of r)zh(t.doc,u)&&(t.join(u),a=!0);return a}function vN(t){return e=>{const{dispatch:n,tr:r}=e,o=Mb(r,e.state),i=Mce(t,r.selection);return i?(n&&Rce(o,n,i),!0):!1}}function Mce(t,e){const{$from:n,$to:r}=e;return n.blockRange(r,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===t})}function Hg(t){const{$from:e,$to:n}=t;return e.blockRange(n,Ys)}function Oce(t){const e=t.selection.$from,n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1;const r=e.node(n.depth-2),o=e.index(n.depth),i=e.index(n.depth-1),s=e.index(n.depth-2),l=r.maybeChild(s-1),a=l==null?void 0:l.lastChild;if(o!==0||i!==0)return!1;if(l&&Ys(l)&&a&&zs(a))return tu({listType:l.type,itemType:a.type,tr:t});if(zs(r)){const u=r,c=e.node(n.depth-3);if(Ys(c))return tu({listType:c.type,itemType:u.type,tr:t})}return!1}function a_({view:t}){if(!t)return!1;{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1}{const e=t.state.tr;Oce(e)&&t.dispatch(e)}{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!zs(n.parent)||n.startIndex!==0)return!1;const r=e.index(n.depth),o=e.index(n.depth-1),i=e.index(n.depth-2),s=n.depth-2>=1&&zs(e.node(n.depth-2));r===0&&o===0&&i<=1&&s&&xce(n.parent.type)(t.state,t.dispatch)}return X2(t.state,t.dispatch,t),!0}function yN({node:t,mark:e,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(js.LIST_ITEM_MARKER_CONTAINER),o.append(e);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(js.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const l=a=>a.type!==t.type?!1:(t=a,n(t,s),r(t,e),!0);return l(t),{dom:s,contentDOM:i,update:l}}function Ice(t,e){const n=t.node(e.depth-1),r=t.node(e.depth-2);return!zs(n)||!Ys(r)?!1:{parentItem:n,parentList:r}}function Lce(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),o=e.end,i=e.$to.end(e.depth);return oDce(t)?(e==null||e(t.scrollIntoView()),!0):!1;function zce(t,e,n){let r,o,i,s;const l=e.doc;if(n.startIndex>=1){r=t.child(n.startIndex-1),o=t,s=l.resolve(n.start).start(n.depth),i=s+1;for(let a=0;a=1){const u=e.node(n.depth-1),c=e.start(n.depth-1);if(o=u.child(a-1),!Ys(o))return!1;s=c+1;for(let d=0;d=n.depth+2?e.end(n.depth+2):n.end-1,l=n.end;return s+1>=l?(r=t.slice(i,l),o=null):(r=t.slice(i,s),o=t.slice(s+1,l-1)),{selectedSlice:r,unselectedSlice:o}}function Bce(t){const{$from:e,$to:n}=t.selection,r=Hg(t.selection);if(!r)return!1;const o=t.doc.resolve(r.start).node();if(!Ys(o))return!1;const i=zce(o,e,r);if(!i)return!1;const{previousItem:s,previousList:l,previousItemStart:a}=i,{selectedSlice:u,unselectedSlice:c}=Fce(t.doc,n,r),d=s.content.append(Q.fromArray([o.copy(u.content)])).append(c?c.content:Q.empty);t.deleteRange(r.start,r.end);const h=a+s.nodeSize-2,f=s.copy(d);return f.check(),t.replaceRangeWith(a-1,h+1,f),t.setSelection(l===o?Ie.between(t.doc.resolve(e.pos),t.doc.resolve(n.pos)):Ie.between(t.doc.resolve(e.pos-2),t.doc.resolve(n.pos-2))),!0}var Hce=({tr:t,dispatch:e})=>Bce(t)?(e==null||e(t.scrollIntoView()),!0):!1,bN=class extends yt{get name(){return"listItemShared"}createKeymap(){const t={Tab:Hce,"Shift-Tab":Pce,Backspace:a_,"Mod-Backspace":a_};if(Br.isMac){const e={"Ctrl-h":t.Backspace,"Alt-Backspace":t["Mod-Backspace"]};return{...t,...e}}return t}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr;return mN(r)?r:null}}}},ul=class extends Pn{get name(){return"listItem"}createTags(){return[Ee.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:t.parse,priority:dt.Lowest},...e.parseDOM??[]],toDOM:n=>["li",t.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(t,e,n)=>{const r=document.createElement("div");return r.classList.add(js.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=Le.create(e.state.doc,o);return e.dispatch(e.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),yN({mark:r,node:t,updateDOM:Uce,updateMark:Wce})}:{}}createKeymap(){return{Enter:gN(this.type)}}createExtensions(){return[new bN]}toggleListItemClosed(t){return({state:{tr:e,selection:n},dispatch:r})=>{if(!Wh(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return t=h0(t)?t:!o.attrs.closed,r==null||r(e.setNodeMarkup(i,void 0,{...o.attrs,closed:t})),!0}}liftListItemOutOfList(t){return vN(t??this.type)}};So([de()],ul.prototype,"toggleListItemClosed",1);So([de()],ul.prototype,"liftListItemOutOfList",1);ul=So([Pe({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],ul);function Uce(t,e){t.attrs.closed?e.classList.add(js.COLLAPSIBLE_LIST_ITEM_CLOSED):e.classList.remove(js.COLLAPSIBLE_LIST_ITEM_CLOSED)}function Wce(t,e){t.childCount<=1?e.classList.add("disabled"):e.classList.remove("disabled")}var Sh=class extends Pn{get name(){return"bulletList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["ul",t.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(t,e,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=e.state.doc.resolve(i+1),l=s.node(s.depth-1);if(!(((r=l==null?void 0:l.type)==null?void 0:r.name)!=="listItem")){const c=document.createElement("div");c.contentEditable="false",c.classList.add(js.LIST_SPINE),c.addEventListener("click",d=>{const h=n(),f=e.state.doc.resolve(h+1),p=f.start(f.depth-1),g=Le.create(e.state.doc,p-1);e.dispatch(e.state.tr.setSelection(g)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(c)}const u=document.createElement("ul");return u.classList.add(js.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new ul({priority:dt.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Ux(this.type,Ot(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleBulletList()(t)}createInputRules(){const t=/^\s*([*+-])\s$/;return[am(t,this.type),new ml(t,(e,n,r,o)=>{const i=e.tr;return i.deleteRange(r,o),tu({listType:this.type,itemType:Ot(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};So([de({icon:"listUnordered",label:({t})=>t(bb.BULLET_LIST_LABEL)})],Sh.prototype,"toggleBulletList",1);So([nn({shortcut:oe.BulletList,command:"toggleBulletList"})],Sh.prototype,"listShortcut",1);Sh=So([Pe({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Sh);var Ch=class extends Pn{get name(){return"orderedList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:{...t.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>zt(n)?{...t.parse(n),order:+(n.getAttribute("start")??1)}:{}},...e.parseDOM??[]],toDOM:n=>{const r=t.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new ul({priority:dt.Low})]}toggleOrderedList(){return Ux(this.type,Ot(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleOrderedList()(t)}createInputRules(){const t=/^(\d+)\.\s$/;return[am(t,this.type,e=>({order:+Ot(e,1)}),(e,n)=>n.childCount+n.attrs.order===+Ot(e,1)),new ml(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!tu({listType:this.type,itemType:Ot(this.store.schema.nodes,"listItem"),tr:i}))return null;const l=+Ot(n,1);if(l!==1){const a=hi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{order:l})}return i})]}};So([de({icon:"listOrdered",label:({t})=>t(bb.ORDERED_LIST_LABEL)})],Ch.prototype,"toggleOrderedList",1);So([nn({shortcut:oe.OrderedList,command:"toggleOrderedList"})],Ch.prototype,"listShortcut",1);Ch=So([Pe({})],Ch);var wN=class extends Pn{get name(){return"taskListItem"}createTags(){return[Ee.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return zt(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...t.parse(n)}},priority:dt.Medium},...e.parseDOM??[]],toDOM:n=>["li",{...t.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(t,e,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(js.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{e.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=e.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=t.attrs.checked,yN({node:t,mark:r,updateDOM:Vce,updateMark:jce})}}createKeymap(){return{Enter:gN(this.type)}}createExtensions(){return[new bN]}toggleCheckboxChecked(t){let e,n;return typeof t=="boolean"?e=t:t&&(e=t.checked,n=t.$pos),({tr:r,dispatch:o})=>{const i=hi({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:l}=i,a={...s.attrs,checked:e??!s.attrs.checked};return o==null||o(r.setNodeMarkup(l,void 0,a)),!0}}createInputRules(){const t=/^\s*(\[( ?|x|X)]\s)$/;return[am(t,this.type,e=>({checked:["x","X"].includes(yc(e,2))})),new ml(t,(e,n,r,o)=>{const i=e.tr;if(i.deleteRange(r,o),!tu({listType:Ot(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const l=["x","X"].includes(yc(n,2));if(l){const a=hi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{checked:l})}return i})]}};So([de()],wN.prototype,"toggleCheckboxChecked",1);function Vce(t,e){t.attrs.checked?e.setAttribute("data-checked",""):e.removeAttribute("data-checked"),e.setAttribute("data-task-list-item","")}function jce(t,e){e.checked=!!t.attrs.checked}var xN=class extends Pn{get name(){return"taskList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(t,e){return{content:"taskListItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:t.parse,priority:dt.Medium},...e.parseDOM??[]],toDOM:n=>["ul",{...t.dom(n),"data-task-list":""},0]}}createExtensions(){return[new wN({})]}toggleTaskList(){return Ux(this.type,Ot(this.store.schema.nodes,"taskListItem"))}listShortcut(t){return this.toggleTaskList()(t)}};So([de({icon:"checkboxMultipleLine",label:({t})=>t(bb.TASK_LIST_LABEL)})],xN.prototype,"toggleTaskList",1);So([nn({shortcut:oe.TaskList,command:"toggleTaskList"})],xN.prototype,"listShortcut",1);var Ko,Gce=(t=document)=>Ko||(Ko=t.createElement("div"),Ko.setAttribute("id","a11y-status-message"),Ko.setAttribute("role","status"),Ko.setAttribute("aria-live","polite"),Ko.setAttribute("aria-relevant","additions text"),Object.assign(Ko.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.append(Ko),Ko);rR(500,()=>{Gce().textContent=""});function l_(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function c_(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function Q1(t,e){if(t.clientHeighte||i>t&&s=e&&l>=n?i-t-r:s>e&&ln?s-e+o:0}var Kce=function(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,s=e.boundary,l=e.skipOverflowHiddenElements,a=typeof s=="function"?s:function(Me){return Me!==s};if(!l_(t))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,h=[],f=t;l_(f)&&a(f);){if((f=(c=(u=f).parentElement)==null?u.getRootNode().host||null:c)===d){h.push(f);break}f!=null&&f===document.body&&Q1(f)&&!Q1(document.documentElement)||f!=null&&Q1(f,l)&&h.push(f)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=t.getBoundingClientRect(),b=y.height,w=y.width,k=y.top,x=y.right,S=y.bottom,T=y.left,C=o==="start"||o==="nearest"?k:o==="end"?S:k+b/2,O=i==="center"?T+w/2:i==="end"?x:T,_=[],R=0;R=0&&T>=0&&S<=g&&x<=p&&k>=N&&S<=$&&T>=D&&x<=L)return _;var F=getComputedStyle(A),U=parseInt(F.borderLeftWidth,10),W=parseInt(F.borderTopWidth,10),B=parseInt(F.borderRightWidth,10),H=parseInt(F.borderBottomWidth,10),V=0,Y=0,X="offsetWidth"in A?A.offsetWidth-A.clientWidth-U-B:0,Z="offsetHeight"in A?A.offsetHeight-A.clientHeight-W-H:0,te="offsetWidth"in A?A.offsetWidth===0?0:I/A.offsetWidth:0,ce="offsetHeight"in A?A.offsetHeight===0?0:M/A.offsetHeight:0;if(d===A)V=o==="start"?C:o==="end"?C-g:o==="nearest"?qf(v,v+g,g,W,H,v+C,v+C+b,b):C-g/2,Y=i==="start"?O:i==="center"?O-p/2:i==="end"?O-p:qf(m,m+p,p,U,B,m+O,m+O+w,w),V=Math.max(0,V+v),Y=Math.max(0,Y+m);else{V=o==="start"?C-N-W:o==="end"?C-$+H+Z:o==="nearest"?qf(N,$,M,W,H+Z,C,C+b,b):C-(N+M/2)+Z/2,Y=i==="start"?O-D-U:i==="center"?O-(D+I/2)+X/2:i==="end"?O-L+B+X:qf(D,L,I,U,B+X,O,O+w,w);var Ne=A.scrollLeft,ye=A.scrollTop;C+=ye-(V=Math.max(0,Math.min(ye+V/ce,A.scrollHeight-M/ce+Z))),O+=Ne-(Y=Math.max(0,Math.min(Ne+Y/te,A.scrollWidth-I/te+X)))}_.push({el:A,top:V,left:Y})}return _};typeof rr=="object"&&rr.__esModule&&rr.default&&rr.default;im(Kce);var Yce=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Xce(t){const e=P.useRef();return Yce(()=>{e.current=t}),e.current}function qce(t,e){const[n,r]=P.useState([]),[o,i]=P.useState(()=>H0(t)),[s,l]=P.useState([]),a=P.useRef(t),u=Xce(o);return a.current=t,Jh(Fc,({addCustomHandler:c})=>{const d=H0(a.current),h=c("positioner",d);return i(d),h},e),P.useLayoutEffect(()=>{const c=o.addListener("update",h=>{const f=[];for(const{id:p,data:g,setElement:m}of h){const v=y=>{y&&m(y)};f.push({id:p,data:g,ref:v})}l(f)}),d=o.addListener("done",h=>{r(h)});return u!=null&&u.recentUpdate&&o.onActiveChanged(u==null?void 0:u.recentUpdate),()=>{c(),d()}},[o,u]),P.useMemo(()=>{const c=[];for(const[d,{ref:h,data:f,id:p}]of s.entries()){const g=n[d],{element:m,position:v={}}=g??{},y={...Sm,...aR(v)};c.push({ref:h,element:m,data:f,key:p,...y})}return c},[s,n])}function kN(t,e){const n=e==null||h0(e)?[t]:e,r=h0(e)?e:!0,o=P.useRef(Rc()),s=qce(t,n)[0];return P.useMemo(()=>s&&r?{...s,active:!0}:{...Sm,ref:void 0,data:{},active:!1,key:o.current},[r,s])}function J1(t,e){return tt(t)?t(e):t}function Zce(t){return ke(t[0])}function Qce(t,e){var n;return ke(t)?t:Bt(t)?Zce(t)?t[0]??"":((n=t.find(r=>lR(r.attrs,e))??t[0])==null?void 0:n.shortcut)??"":t.shortcut}var Jce={title:t=>cD(t),upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase()};function eue(t,e){const{casing:n="title",namedAsSymbol:r=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=e,l=CF(t),a=[],u=Jce[n];for(const c of l){if(c.type==="char"){a.push(u(c.key));continue}if(c.type==="named"){const h=r===!0||Bt(r)&&sr(r,c.key)?c.symbol??s(c.i18n):s(c.i18n);a.push(u(h));continue}const d=o===!0||Bt(o)&&sr(o,c.key)?c.symbol:s(c.i18n);a.push(u(d))}return a.join(i)}var EN=({commandName:t,active:e,enabled:n,attrs:r})=>{const{t:o}=cQ(),{getCommandOptions:i}=ef(),s=i(t),{description:l,label:a,icon:u,shortcut:c}=s||{},d=P.useMemo(()=>({active:e,attrs:r,enabled:n,t:o}),[e,r,n,o]),h=P.useMemo(()=>{if(c)return eue(Qce(c,r??{}),{t:o,separator:""})},[c,r,o]);return P.useMemo(()=>({description:J1(l,d),label:J1(a,d),icon:J1(u,d),shortcut:h}),[d,l,a,u,h])},tue={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},SN=P.createContext(tue);SN.Provider;function CN(t){return t.map((e,n)=>P.createElement(e.tag,{key:n,...e.attr},CN(e.child??[])))}var Cv=t=>{const{name:e}=t;return ee.createElement(nue,{...t},CN(yce[e]))},nue=t=>{const e=n=>{const r=t.size??n.size??"1em";let o;n.className&&(o=n.className),t.className&&(o=(o?`${o} `:"")+t.className);const{title:i,...s}=t;return ee.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...n.attr,...s,className:o,style:{color:t.color??n.color,...n.style,...t.style},height:r,width:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&ee.createElement("title",null,i),t.children)};return ee.createElement(SN.Consumer,null,e)},rue=t=>Zs(t)?!!t.name:!1,oue=({icon:t})=>ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):t,iue=({icon:t,children:e})=>{if(!rue(t))return ee.createElement(ee.Fragment,null,e);const{sub:n,sup:r}=t,o=n??r,i=n!==void 0;return o===void 0?ee.createElement(ee.Fragment,null,e):ee.createElement(iie,{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"}}},e)},It=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onChange:i,icon:s,displayShortcut:l=!0,"aria-label":a,label:u,...c})=>{const d=P.useCallback((y,b)=>{o(),i==null||i(y,b)},[o,i]),h=P.useCallback(y=>{y.preventDefault()},[]),f=EN({commandName:t,active:e,enabled:n,attrs:r});let p=null;f.icon&&(p=ke(f.icon)?f.icon:f.icon.name);const g=a??f.label??"",m=u??g,v=l&&f.shortcut?` (${f.shortcut})`:"";return ee.createElement(pN,{title:`${m}${v}`},ee.createElement(uN,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},ee.createElement(Ise,{"aria-label":g,selected:e,disabled:!n,onMouseDown:h,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}},...c,value:t,onChange:d},ee.createElement(iue,{icon:f.icon},ee.createElement(oue,{icon:s??p})))))},sue=({icon:t})=>ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):t,TN=({label:t,"aria-label":e,icon:n,children:r,onClose:o,...i})=>{const s=P.useRef(Rc()),[l,a]=P.useState(null),u=!!l,c=P.useCallback(f=>{f.preventDefault()},[]),d=P.useCallback(f=>{a(f.currentTarget)},[]),h=P.useCallback((f,p)=>{a(null),o==null||o(f,p)},[o]);return ee.createElement(ee.Fragment,null,ee.createElement(pN,{title:t??e},ee.createElement(Gne,{"aria-label":e,"aria-controls":u?s.current:void 0,"aria-haspopup":!0,"aria-expanded":u?"true":void 0,onMouseDown:c,onClick:d,size:"small",sx:f=>({border:`1px solid ${f.palette.divider}`,borderRadius:`${f.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}})},n&&ee.createElement(sue,{icon:n}),ee.createElement(Cv,{name:"arrowDownSFill",size:"1rem"}))),ee.createElement(lse,{...i,id:s.current,anchorEl:l,open:u,onClose:h},r))},aue=t=>{const{insertHorizontalRule:e}=kn();ax();const n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=e.enabled();return ee.createElement(It,{...t,commandName:"insertHorizontalRule",enabled:r,onSelect:n})},lue=t=>{const{redo:e}=kn(),{redoDepth:n}=ef(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(It,{...t,commandName:"redo",active:!1,enabled:o,onSelect:r})},cue=t=>{const{toggleBlockquote:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().blockquote(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBlockquote",active:r,enabled:o,onSelect:n})},Wx=t=>{const{toggleBold:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bold(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBold",active:r,enabled:o,onSelect:n})},uue=t=>{const{toggleBulletList:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().bulletList(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleBulletList",active:r,enabled:o,onSelect:n})},due=({attrs:t={},...e})=>{const{toggleCodeBlock:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().codeBlock(),i=n.enabled(t);return ee.createElement(It,{...e,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:t,onSelect:r})},Vx=t=>{const{toggleCode:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().code(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleCode",active:r,enabled:o,onSelect:n})},e0=({attrs:t,...e})=>{const{toggleHeading:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(It,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},jx=t=>{const{toggleItalic:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().italic(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleItalic",active:r,enabled:o,onSelect:n})},hue=t=>{const{toggleOrderedList:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().orderedList(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleOrderedList",active:r,enabled:o,onSelect:n})},fue=t=>{const{toggleStrike:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().strike(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleStrike",active:r,enabled:o,onSelect:n})},Gx=t=>{const{toggleUnderline:e}=kn(),n=P.useCallback(()=>{e.enabled()&&e()},[e]),r=hr().underline(),o=e.enabled();return ee.createElement(It,{...t,commandName:"toggleUnderline",active:r,enabled:o,onSelect:n})},pue=t=>{const{undo:e}=kn(),{undoDepth:n}=ef(!0),r=P.useCallback(()=>{e.enabled()&&e()},[e]),o=n()>0;return ee.createElement(It,{...t,commandName:"undo",active:!1,enabled:o,onSelect:r})},so=t=>ee.createElement(uN,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...t}),gue=({children:t})=>ee.createElement(so,null,ee.createElement(Wx,null),ee.createElement(jx,null),ee.createElement(Gx,null),ee.createElement(fue,null),ee.createElement(Vx,null),t),mue=({icon:t})=>t?ee.createElement(Lie,null,ke(t)?ee.createElement(Cv,{name:t,size:"1rem"}):ee.createElement(ee.Fragment,null,t)):null,Kx=({commandName:t,active:e=!1,enabled:n,attrs:r,onSelect:o,onClick:i,icon:s,displayShortcut:l=!0,label:a,description:u,displayDescription:c=!0,...d})=>{const h=P.useCallback(y=>{o(),i==null||i(y)},[o,i]),f=P.useCallback(y=>{y.preventDefault()},[]),p=EN({commandName:t,active:e,enabled:n,attrs:r});let g=null;p.icon&&(g=ke(p.icon)?p.icon:p.icon.name);const m=a??p.label??"",v=c&&(u??p.description);return ee.createElement(mse,{selected:e,disabled:!n,onMouseDown:f,...d,onClick:h},s!==null&&ee.createElement(mue,{icon:s??g}),ee.createElement(Bie,{primary:m,secondary:v}),l&&p.shortcut&&ee.createElement(yd,{variant:"body2",color:"text.secondary",sx:{ml:2}},p.shortcut))},Zf=({attrs:t,...e})=>{const{toggleHeading:n}=kn(),r=P.useCallback(()=>{n.enabled(t)&&n(t)},[n,t]),o=hr().heading(t),i=n.enabled(t);return ee.createElement(Kx,{...e,commandName:"toggleHeading",active:o,enabled:i,attrs:t,onSelect:r})},vue={level:1},yue={level:2},u_={level:3},bue={level:4},wue={level:5},xue={level:6},kue=({showAll:t=!1,children:e})=>ee.createElement(so,null,ee.createElement(e0,{attrs:vue}),ee.createElement(e0,{attrs:yue}),t?ee.createElement(TN,{"aria-label":"More heading options"},ee.createElement(Zf,{attrs:u_}),ee.createElement(Zf,{attrs:bue}),ee.createElement(Zf,{attrs:wue}),ee.createElement(Zf,{attrs:xue})):ee.createElement(e0,{attrs:u_}),e),Eue=({children:t})=>ee.createElement(so,null,ee.createElement(pue,null),ee.createElement(lue,null),t);typeof rr=="object"&&rr.__esModule&&rr.default&&rr.default;var Sue=t=>{const e=ef().getPositionerWidget();return Qh.createPortal(ee.createElement(ee.Fragment,null,t.children),e)},AN=P.createContext({});function Cue(t={}){const e=P.useContext(AN),n=P.useMemo(()=>dR(e,t.theme??{}),[e,t.theme]),r=P.useMemo(()=>oV(n).styles,[n]),o=Pc(rV,t.className);return P.useMemo(()=>({style:r,className:o,theme:n}),[r,o,n])}var Tue=t=>{var e,n,r,o,i,s,l,a;const{children:u,as:c="div"}=t,{theme:d,style:h,className:f}=Cue({theme:t.theme??ga}),p=_x({palette:{primary:{main:((e=d.color)==null?void 0:e.primary)??ga.color.primary,dark:((r=(n=d.color)==null?void 0:n.hover)==null?void 0:r.primary)??ga.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??ga.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??ga.color.secondary,dark:((l=(s=d.color)==null?void 0:s.hover)==null?void 0:l.secondary)??ga.color.hover.secondary,contrastText:((a=d.color)==null?void 0:a.secondaryText)??ga.color.secondaryText}}});return ee.createElement(ine,{theme:p},ee.createElement(AN.Provider,{value:d},ee.createElement(c,{style:h,className:f},u)))},_N=t=>ee.createElement(vie,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...t}),Aue=[{name:"offset",options:{offset:[0,8]}}],_ue=({positioner:t="selection",children:e,...n})=>{const{ref:r,x:o,y:i,width:s,height:l,active:a}=kN(()=>H0(t),[t]),[u,c]=P.useState(null),d=P.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:l}),[o,i,s,l]),h=P.useCallback(f=>{c(f),r==null||r(f)},[r]);return ee.createElement(ee.Fragment,null,ee.createElement("div",{ref:h,style:d}),ee.createElement(Hx,{placement:"top",modifiers:Aue,...n,open:a,anchorEl:u},ee.createElement(_N,null,e?ee.createElement(ee.Fragment,null,e):ee.createElement(gue,null))))},Rue=({languages:t=[],className:e="",offset:n={x:0,y:0},onLanguageChange:r,onPointerDownSelect:o,onSelectChange:i})=>{var s;const l=kN(Oue,[]),{getExtension:a,getState:u}=vi(),{focus:c,updateCodeBlock:d}=kn(),h=a(mo).options,[f]=P.useState(()=>{const w=new Map;return h.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!t.some(S=>S.displayName===x)&&w.set(x,k.displayName))}),w}),[p]=P.useState([...t,{displayName:h.defaultLanguage},...h.supportedLanguages]),{selection:g}=u(),[m,v]=P.useState("auto"),y=(s=hi({selection:g,types:"codeBlock"}))==null?void 0:s.node.attrs.language,b=P.useMemo(()=>{const w=f.get(y);return w||(h.supportedLanguages.some(k=>y===k.displayName)?y:h.defaultLanguage)},[f,h.defaultLanguage,h.supportedLanguages,y]);return P.useEffect(()=>{var w;const k=l.element;if(r!=null&&r(b,k,v))return;if((S=>S&&S.nodeName==="SELECT"||!1)(k)){const S=(w=k.options[k.selectedIndex])==null?void 0:w.dataset.width;v(S?`${S}px`:"auto")}},[l.element,b,r]),ee.createElement(Sue,null,ee.createElement("select",{ref:l.ref,className:e,onBlur:()=>c(),onChange:w=>{var k;i!=null&&i(w,v)||(v(`${(k=w.target.options[w.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:w.target.dataset.value||w.target.value}))},onPointerDown:o,style:{"--w":m,"--x":`${l.x+n.x}px`,"--y":`${l.y+n.y}px`,display:y?"block":"none"},value:b},y?Mue(p):null))},Mue=WH(t=>hb(t.map(({displayName:n,value:r})=>({displayName:n,value:r||n})),"displayName").sort((n,r)=>n.displayName>r.displayName?1:n.displayName{const r=document.createElement("select"),o=document.createElement("option");let i="0px";return r.append(o),document.body.append(r),o.textContent=n.displayName,i=String(r.getBoundingClientRect().width),r.remove(),{...n,width:i}}).map(({displayName:n,value:r,width:o})=>ee.createElement("option",{key:n,"data-value":r,"data-width":o,value:n},n)));function Oue(){return Vr.create({getActive(t){const{selection:e}=t.state,n=hi({selection:e,types:"codeBlock"});return n?[{codeBlockResult:n}]:Vr.EMPTY},getPosition(t){const{data:e,view:n}=t,{pos:r}=e.codeBlockResult,o=n.nodeDOM(r);if(!o||!zt(o))return Sm;const i=o.getBoundingClientRect(),s=n.dom.getBoundingClientRect(),l=n.dom.scrollLeft+i.left-s.left,a=n.dom.scrollTop+i.top-s.top,u=dw(i,n.dom);return{height:0,rect:i,visible:u,width:0,x:l,y:a}},hasChanged:uw})}var rn=im(Lg),Yx=Zt` +`),co.rippleVisible,Nne,qy,({theme:e})=>e.transitions.easing.easeInOut,co.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,co.child,co.childLeaving,$ne,qy,({theme:e})=>e.transitions.easing.easeInOut,co.childPulsate,Dne,({theme:e})=>e.transitions.easing.easeInOut),Fne=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,l=Fe(r,Ine),[a,u]=P.useState([]),c=P.useRef(0),d=P.useRef(null);P.useEffect(()=>{d.current&&(d.current(),d.current=null)},[a]);const h=P.useRef(!1),f=P.useRef(0),p=P.useRef(null),g=P.useRef(null);P.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const m=P.useCallback(w=>{const{pulsate:k,rippleX:x,rippleY:S,rippleSize:T,cb:C}=w;u(I=>[...I,V.jsx(zne,{classes:{ripple:Ge(i.ripple,co.ripple),rippleVisible:Ge(i.rippleVisible,co.rippleVisible),ripplePulsate:Ge(i.ripplePulsate,co.ripplePulsate),child:Ge(i.child,co.child),childLeaving:Ge(i.childLeaving,co.childLeaving),childPulsate:Ge(i.childPulsate,co.childPulsate)},timeout:qy,pulsate:k,rippleX:x,rippleY:S,rippleSize:T},c.current)]),c.current+=1,d.current=C},[i]),v=P.useCallback((w={},k={},x=()=>{})=>{const{pulsate:S=!1,center:T=o||k.pulsate,fakeElement:C=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&h.current){h.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(h.current=!0);const I=C?null:g.current,_=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let R,A,E;if(T||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)R=Math.round(_.width/2),A=Math.round(_.height/2);else{const{clientX:M,clientY:O}=w.touches&&w.touches.length>0?w.touches[0]:w;R=Math.round(M-_.left),A=Math.round(O-_.top)}if(T)E=Math.sqrt((2*_.width**2+_.height**2)/3),E%2===0&&(E+=1);else{const M=Math.max(Math.abs((I?I.clientWidth:0)-R),R)*2+2,O=Math.max(Math.abs((I?I.clientHeight:0)-A),A)*2+2;E=Math.sqrt(M**2+O**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},f.current=setTimeout(()=>{p.current&&(p.current(),p.current=null)},Lne)):m({pulsate:S,rippleX:R,rippleY:A,rippleSize:E,cb:x})},[o,m]),y=P.useCallback(()=>{v({},{pulsate:!0})},[v]),b=P.useCallback((w,k)=>{if(clearTimeout(f.current),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,f.current=setTimeout(()=>{b(w,k)});return}p.current=null,u(x=>x.length>0?x.slice(1):x),d.current=k},[]);return P.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),V.jsx(Pne,K({className:Ge(co.root,i.root,s),ref:g},l,{children:V.jsx(Ene,{component:null,exit:!0,children:a})}))}),Bne=Fne;function Hne(e){return En("MuiButtonBase",e)}const Une=Sn("MuiButtonBase",["root","disabled","focusVisible"]),Wne=Une,Vne=["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"],jne=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Fn({root:["root",t&&"disabled",n&&"focusVisible"]},Hne,o);return n&&r&&(s.root+=` ${r}`),s},Gne=St("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"},[`&.${Wne.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Kne=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:f="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:k,onMouseDown:x,onMouseLeave:S,onMouseUp:T,onTouchEnd:C,onTouchMove:I,onTouchStart:_,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:E,type:M}=r,O=Fe(r,Vne),N=P.useRef(null),L=P.useRef(null),$=Or(L,E),{isFocusVisibleRef:D,onFocus:F,onBlur:U,ref:W}=CL(),[B,H]=P.useState(!1);u&&B&&H(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{H(!0),N.current.focus()}}),[]);const[j,Y]=P.useState(!1);P.useEffect(()=>{Y(!0)},[]);const X=j&&!c&&!u;P.useEffect(()=>{B&&h&&!c&&j&&L.current.pulsate()},[c,h,B,j]);function Z(ie,Te,Ze=d){return Ua(Xe=>(Te&&Te(Xe),!Ze&&L.current&&L.current[ie](Xe),!0))}const te=Z("start",x),ue=Z("stop",m),Ne=Z("stop",v),ye=Z("stop",T),Me=Z("stop",ie=>{B&&ie.preventDefault(),S&&S(ie)}),Ce=Z("start",_),vt=Z("stop",C),Lt=Z("stop",I),wt=Z("stop",ie=>{U(ie),D.current===!1&&H(!1),p&&p(ie)},!1),Zn=Ua(ie=>{N.current||(N.current=ie.currentTarget),F(ie),D.current===!0&&(H(!0),b&&b(ie)),y&&y(ie)}),Nt=()=>{const ie=N.current;return a&&a!=="button"&&!(ie.tagName==="A"&&ie.href)},An=P.useRef(!1),fn=Ua(ie=>{h&&!An.current&&B&&L.current&&ie.key===" "&&(An.current=!0,L.current.stop(ie,()=>{L.current.start(ie)})),ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&ie.preventDefault(),w&&w(ie),ie.target===ie.currentTarget&&Nt()&&ie.key==="Enter"&&!u&&(ie.preventDefault(),g&&g(ie))}),pn=Ua(ie=>{h&&ie.key===" "&&L.current&&B&&!ie.defaultPrevented&&(An.current=!1,L.current.stop(ie,()=>{L.current.pulsate(ie)})),k&&k(ie),g&&ie.target===ie.currentTarget&&Nt()&&ie.key===" "&&!ie.defaultPrevented&&g(ie)});let qe=a;qe==="button"&&(O.href||O.to)&&(qe=f);const _n={};qe==="button"?(_n.type=M===void 0?"button":M,_n.disabled=u):(!O.href&&!O.to&&(_n.role="button"),u&&(_n["aria-disabled"]=u));const q=Or(n,W,N),he=K({},r,{centerRipple:i,component:a,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:h,tabIndex:R,focusVisible:B}),ve=jne(he);return V.jsxs(Gne,K({as:qe,className:Ge(ve.root,l),ownerState:he,onBlur:wt,onClick:g,onContextMenu:ue,onFocus:Zn,onKeyDown:fn,onKeyUp:pn,onMouseDown:te,onMouseLeave:Me,onMouseUp:ye,onDragLeave:Ne,onTouchEnd:vt,onTouchMove:Lt,onTouchStart:Ce,ref:q,tabIndex:u?-1:R,type:M},_n,O,{children:[s,X?V.jsx(Bne,K({ref:$,center:i},A)):null]}))}),zx=Kne;function Yne(e){return En("MuiIconButton",e)}const Xne=Sn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),qne=Xne,Zne=["edge","children","className","color","disabled","disableFocusRipple","size"],Qne=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${pt(r)}`,o&&`edge${pt(o)}`,`size${pt(i)}`]};return Fn(s,Yne,t)},Jne=St(zx,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${pt(n.color)}`],n.edge&&t[`edge${pt(n.edge)}`],t[`size${pt(n.size)}`]]}})(({theme:e,ownerState:t})=>K({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})`:kr(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 n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return K({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&K({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":K({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:kr(r.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)},{[`&.${qne.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),ere=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:l="default",disabled:a=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=Fe(r,Zne),h=K({},r,{edge:o,color:l,disabled:a,disableFocusRipple:u,size:c}),f=Qne(h);return V.jsx(Jne,K({className:Ge(f.root,s),centerRipple:!0,focusRipple:!u,disabled:a,ref:n,ownerState:h},d,{children:i}))}),tre=ere;function nre(e){return En("MuiTypography",e)}Sn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const rre=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ore=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,l={root:["root",i,e.align!=="inherit"&&`align${pt(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Fn(l,nre,s)},ire=St("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${pt(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>K({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})),jA={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},sre={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},are=e=>sre[e]||e,lre=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiTypography"}),o=are(r.color),i=Ox(K({},r,{color:o})),{align:s="inherit",className:l,component:a,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:h="body1",variantMapping:f=jA}=i,p=Fe(i,rre),g=K({},i,{align:s,color:o,className:l,component:a,gutterBottom:u,noWrap:c,paragraph:d,variant:h,variantMapping:f}),m=a||(d?"p":f[h]||jA[h])||"span",v=ore(g);return V.jsx(ire,K({as:m,ref:n,ownerState:g,className:Ge(v.root,l)},p))}),xd=lre;function sN(e){return typeof e=="string"}function kd(e,t,n){return e===void 0||sN(e)?t:K({},t,{ownerState:K({},t.ownerState,n)})}const cre={disableDefaultClasses:!1},ure=P.createContext(cre);function dre(e){const{disableDefaultClasses:t}=P.useContext(ure);return n=>t?"":e(n)}function aN(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function hre(e,t,n){return typeof e=="function"?e(t,n):e}function GA(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function fre(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const f=Ge(o==null?void 0:o.className,r==null?void 0:r.className,i,n==null?void 0:n.className),p=K({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=K({},n,o,r);return f.length>0&&(g.className=f),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const s=aN(K({},o,r)),l=GA(r),a=GA(o),u=t(s),c=Ge(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=K({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=K({},u,n,a,l);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}const pre=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Yi(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,s=Fe(e,pre),l=i?{}:hre(r,o),{props:a,internalRef:u}=fre(K({},s,{externalSlotProps:l})),c=Or(u,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return kd(n,K({},a,{ref:c}),o)}function gre(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=AL({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:l,max:a=r}=s?i:e,u=l&&Number(l)>a?`${a}+`:l;return{badgeContent:l,invisible:s,max:a,displayValue:u}}const mre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function vre(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 yre(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function bre(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||yre(e))}function wre(e){const t=[],n=[];return Array.from(e.querySelectorAll(mre)).forEach((r,o)=>{const i=vre(r);i===-1||!bre(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function xre(){return!0}function kre(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=wre,isEnabled:s=xre,open:l}=e,a=P.useRef(!1),u=P.useRef(null),c=P.useRef(null),d=P.useRef(null),h=P.useRef(null),f=P.useRef(!1),p=P.useRef(null),g=Or(t.ref,p),m=P.useRef(null);P.useEffect(()=>{!l||!p.current||(f.current=!n)},[n,l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Ar(p.current);return p.current.contains(b.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),f.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[l]),P.useEffect(()=>{if(!l||!p.current)return;const b=Ar(p.current),w=S=>{m.current=S,!(r||!s()||S.key!=="Tab")&&b.activeElement===p.current&&S.shiftKey&&(a.current=!0,c.current&&c.current.focus())},k=()=>{const S=p.current;if(S===null)return;if(!b.hasFocus()||!s()||a.current){a.current=!1;return}if(S.contains(b.activeElement)||r&&b.activeElement!==u.current&&b.activeElement!==c.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let T=[];if((b.activeElement===u.current||b.activeElement===c.current)&&(T=i(p.current)),T.length>0){var C,I;const _=!!((C=m.current)!=null&&C.shiftKey&&((I=m.current)==null?void 0:I.key)==="Tab"),R=T[0],A=T[T.length-1];typeof R!="string"&&typeof A!="string"&&(_?A.focus():R.focus())}else S.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",w,!0);const x=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(x),b.removeEventListener("focusin",k),b.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0,h.current=b.target;const w=t.props.onFocus;w&&w(b)},y=b=>{d.current===null&&(d.current=b.relatedTarget),f.current=!0};return V.jsxs(P.Fragment,{children:[V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(t,{ref:g,onFocus:v}),V.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}var _r="top",xo="bottom",ko="right",Rr="left",Fx="auto",lf=[_r,xo,ko,Rr],eu="start",Ch="end",Ere="clippingParents",lN="viewport",zu="popper",Sre="reference",KA=lf.reduce(function(e,t){return e.concat([t+"-"+eu,t+"-"+Ch])},[]),cN=[].concat(lf,[Fx]).reduce(function(e,t){return e.concat([t,t+"-"+eu,t+"-"+Ch])},[]),Cre="beforeRead",Tre="read",Are="afterRead",_re="beforeMain",Rre="main",Mre="afterMain",Ore="beforeWrite",Ire="write",Lre="afterWrite",Nre=[Cre,Tre,Are,_re,Rre,Mre,Ore,Ire,Lre];function vi(e){return e?(e.nodeName||"").toLowerCase():null}function Jr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function hl(e){var t=Jr(e).Element;return e instanceof t||e instanceof Element}function mo(e){var t=Jr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Bx(e){if(typeof ShadowRoot>"u")return!1;var t=Jr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function $re(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!mo(i)||!vi(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Dre(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!mo(o)||!vi(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const Pre={name:"applyStyles",enabled:!0,phase:"write",fn:$re,effect:Dre,requires:["computeStyles"]};function hi(e){return e.split("-")[0]}var qa=Math.max,Ug=Math.min,tu=Math.round;function Zy(){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 uN(){return!/^((?!chrome|android).)*safari/i.test(Zy())}function nu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&mo(e)&&(o=e.offsetWidth>0&&tu(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&tu(r.height)/e.offsetHeight||1);var s=hl(e)?Jr(e):window,l=s.visualViewport,a=!uN()&&n,u=(r.left+(a&&l?l.offsetLeft:0))/o,c=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Hx(e){var t=nu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dN(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Bx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Xi(e){return Jr(e).getComputedStyle(e)}function zre(e){return["table","td","th"].indexOf(vi(e))>=0}function ua(e){return((hl(e)?e.ownerDocument:e.document)||window.document).documentElement}function _v(e){return vi(e)==="html"?e:e.assignedSlot||e.parentNode||(Bx(e)?e.host:null)||ua(e)}function YA(e){return!mo(e)||Xi(e).position==="fixed"?null:e.offsetParent}function Fre(e){var t=/firefox/i.test(Zy()),n=/Trident/i.test(Zy());if(n&&mo(e)){var r=Xi(e);if(r.position==="fixed")return null}var o=_v(e);for(Bx(o)&&(o=o.host);mo(o)&&["html","body"].indexOf(vi(o))<0;){var i=Xi(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 cf(e){for(var t=Jr(e),n=YA(e);n&&zre(n)&&Xi(n).position==="static";)n=YA(n);return n&&(vi(n)==="html"||vi(n)==="body"&&Xi(n).position==="static")?t:n||Fre(e)||t}function Ux(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zd(e,t,n){return qa(e,Ug(t,n))}function Bre(e,t,n){var r=zd(e,t,n);return r>n?n:r}function hN(){return{top:0,right:0,bottom:0,left:0}}function fN(e){return Object.assign({},hN(),e)}function pN(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Hre=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,fN(typeof t!="number"?t:pN(t,lf))};function Ure(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=hi(n.placement),a=Ux(l),u=[Rr,ko].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Hre(o.padding,n),h=Hx(i),f=a==="y"?_r:Rr,p=a==="y"?xo:ko,g=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],m=s[a]-n.rects.reference[a],v=cf(i),y=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=d[f],k=y-h[c]-d[p],x=y/2-h[c]/2+b,S=zd(w,x,k),T=a;n.modifiersData[r]=(t={},t[T]=S,t.centerOffset=S-x,t)}}function Wre(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||dN(t.elements.popper,o)&&(t.elements.arrow=o))}const Vre={name:"arrow",enabled:!0,phase:"main",fn:Ure,effect:Wre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ru(e){return e.split("-")[1]}var jre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gre(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:tu(n*o)/o||0,y:tu(r*o)/o||0}}function XA(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,l=e.position,a=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,h=s.x,f=h===void 0?0:h,p=s.y,g=p===void 0?0:p,m=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Rr,w=_r,k=window;if(u){var x=cf(n),S="clientHeight",T="clientWidth";if(x===Jr(n)&&(x=ua(n),Xi(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",T="scrollWidth")),x=x,o===_r||(o===Rr||o===ko)&&i===Ch){w=xo;var C=d&&x===k&&k.visualViewport?k.visualViewport.height:x[S];g-=C-r.height,g*=a?1:-1}if(o===Rr||(o===_r||o===xo)&&i===Ch){b=ko;var I=d&&x===k&&k.visualViewport?k.visualViewport.width:x[T];f-=I-r.width,f*=a?1:-1}}var _=Object.assign({position:l},u&&jre),R=c===!0?Gre({x:f,y:g},Jr(n)):{x:f,y:g};if(f=R.x,g=R.y,a){var A;return Object.assign({},_,(A={},A[w]=y?"0":"",A[b]=v?"0":"",A.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",A))}return Object.assign({},_,(t={},t[w]=y?g+"px":"",t[b]=v?f+"px":"",t.transform="",t))}function Kre(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:hi(t.placement),variation:ru(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,XA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,XA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Yre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kre,data:{}};var Zf={passive:!0};function Xre(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=Jr(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Zf)}),l&&a.addEventListener("resize",n.update,Zf),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Zf)}),l&&a.removeEventListener("resize",n.update,Zf)}}const qre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Xre,data:{}};var Zre={left:"right",right:"left",bottom:"top",top:"bottom"};function zp(e){return e.replace(/left|right|bottom|top/g,function(t){return Zre[t]})}var Qre={start:"end",end:"start"};function qA(e){return e.replace(/start|end/g,function(t){return Qre[t]})}function Wx(e){var t=Jr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Vx(e){return nu(ua(e)).left+Wx(e).scrollLeft}function Jre(e,t){var n=Jr(e),r=ua(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var u=uN();(u||!u&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Vx(e),y:a}}function eoe(e){var t,n=ua(e),r=Wx(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=qa(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=qa(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Vx(e),a=-r.scrollTop;return Xi(o||n).direction==="rtl"&&(l+=qa(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function jx(e){var t=Xi(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function gN(e){return["html","body","#document"].indexOf(vi(e))>=0?e.ownerDocument.body:mo(e)&&jx(e)?e:gN(_v(e))}function Fd(e,t){var n;t===void 0&&(t=[]);var r=gN(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Jr(r),s=o?[i].concat(i.visualViewport||[],jx(r)?r:[]):r,l=t.concat(s);return o?l:l.concat(Fd(_v(s)))}function Qy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function toe(e,t){var n=nu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function ZA(e,t,n){return t===lN?Qy(Jre(e,n)):hl(t)?toe(t,n):Qy(eoe(ua(e)))}function noe(e){var t=Fd(_v(e)),n=["absolute","fixed"].indexOf(Xi(e).position)>=0,r=n&&mo(e)?cf(e):e;return hl(r)?t.filter(function(o){return hl(o)&&dN(o,r)&&vi(o)!=="body"}):[]}function roe(e,t,n,r){var o=t==="clippingParents"?noe(e):[].concat(t),i=[].concat(o,[n]),s=i[0],l=i.reduce(function(a,u){var c=ZA(e,u,r);return a.top=qa(c.top,a.top),a.right=Ug(c.right,a.right),a.bottom=Ug(c.bottom,a.bottom),a.left=qa(c.left,a.left),a},ZA(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function mN(e){var t=e.reference,n=e.element,r=e.placement,o=r?hi(r):null,i=r?ru(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,a;switch(o){case _r:a={x:s,y:t.y-n.height};break;case xo:a={x:s,y:t.y+t.height};break;case ko:a={x:t.x+t.width,y:l};break;case Rr:a={x:t.x-n.width,y:l};break;default:a={x:t.x,y:t.y}}var u=o?Ux(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case eu:a[u]=a[u]-(t[c]/2-n[c]/2);break;case Ch:a[u]=a[u]+(t[c]/2-n[c]/2);break}}return a}function Th(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,l=n.boundary,a=l===void 0?Ere:l,u=n.rootBoundary,c=u===void 0?lN:u,d=n.elementContext,h=d===void 0?zu:d,f=n.altBoundary,p=f===void 0?!1:f,g=n.padding,m=g===void 0?0:g,v=fN(typeof m!="number"?m:pN(m,lf)),y=h===zu?Sre:zu,b=e.rects.popper,w=e.elements[p?y:h],k=roe(hl(w)?w:w.contextElement||ua(e.elements.popper),a,c,s),x=nu(e.elements.reference),S=mN({reference:x,element:b,strategy:"absolute",placement:o}),T=Qy(Object.assign({},b,S)),C=h===zu?T:x,I={top:k.top-C.top+v.top,bottom:C.bottom-k.bottom+v.bottom,left:k.left-C.left+v.left,right:C.right-k.right+v.right},_=e.modifiersData.offset;if(h===zu&&_){var R=_[o];Object.keys(I).forEach(function(A){var E=[ko,xo].indexOf(A)>=0?1:-1,M=[_r,xo].indexOf(A)>=0?"y":"x";I[A]+=R[M]*E})}return I}function ooe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?cN:a,c=ru(r),d=c?l?KA:KA.filter(function(p){return ru(p)===c}):lf,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,g){return p[g]=Th(e,{placement:g,boundary:o,rootBoundary:i,padding:s})[hi(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}function ioe(e){if(hi(e)===Fx)return[];var t=zp(e);return[qA(e),t,qA(t)]}function soe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,g=n.allowedAutoPlacements,m=t.options.placement,v=hi(m),y=v===m,b=a||(y||!p?[zp(m)]:ioe(m)),w=[m].concat(b).reduce(function(B,H){return B.concat(hi(H)===Fx?ooe(t,{placement:H,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}):H)},[]),k=t.rects.reference,x=t.rects.popper,S=new Map,T=!0,C=w[0],I=0;I=0,M=E?"width":"height",O=Th(t,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=E?A?ko:Rr:A?xo:_r;k[M]>x[M]&&(N=zp(N));var L=zp(N),$=[];if(i&&$.push(O[R]<=0),l&&$.push(O[N]<=0,O[L]<=0),$.every(function(B){return B})){C=_,T=!1;break}S.set(_,$)}if(T)for(var D=p?3:1,F=function(H){var j=w.find(function(Y){var X=S.get(Y);if(X)return X.slice(0,H).every(function(Z){return Z})});if(j)return C=j,"break"},U=D;U>0;U--){var W=F(U);if(W==="break")break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}}const aoe={name:"flip",enabled:!0,phase:"main",fn:soe,requiresIfExists:["offset"],data:{_skip:!1}};function QA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function JA(e){return[_r,ko,xo,Rr].some(function(t){return e[t]>=0})}function loe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Th(t,{elementContext:"reference"}),l=Th(t,{altBoundary:!0}),a=QA(s,r),u=QA(l,o,i),c=JA(a),d=JA(u);t.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const coe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:loe};function uoe(e,t,n){var r=hi(e),o=[Rr,_r].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[Rr,ko].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function doe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=cN.reduce(function(c,d){return c[d]=uoe(d,t.rects,i),c},{}),l=s[t.placement],a=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const hoe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:doe};function foe(e){var t=e.state,n=e.name;t.modifiersData[n]=mN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const poe={name:"popperOffsets",enabled:!0,phase:"read",fn:foe,data:{}};function goe(e){return e==="x"?"y":"x"}function moe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,g=p===void 0?0:p,m=Th(t,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=hi(t.placement),y=ru(t.placement),b=!y,w=Ux(v),k=goe(w),x=t.modifiersData.popperOffsets,S=t.rects.reference,T=t.rects.popper,C=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(x){if(i){var A,E=w==="y"?_r:Rr,M=w==="y"?xo:ko,O=w==="y"?"height":"width",N=x[w],L=N+m[E],$=N-m[M],D=f?-T[O]/2:0,F=y===eu?S[O]:T[O],U=y===eu?-T[O]:-S[O],W=t.elements.arrow,B=f&&W?Hx(W):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:hN(),j=H[E],Y=H[M],X=zd(0,S[O],B[O]),Z=b?S[O]/2-D-X-j-I.mainAxis:F-X-j-I.mainAxis,te=b?-S[O]/2+D+X+Y+I.mainAxis:U+X+Y+I.mainAxis,ue=t.elements.arrow&&cf(t.elements.arrow),Ne=ue?w==="y"?ue.clientTop||0:ue.clientLeft||0:0,ye=(A=_==null?void 0:_[w])!=null?A:0,Me=N+Z-ye-Ne,Ce=N+te-ye,vt=zd(f?Ug(L,Me):L,N,f?qa($,Ce):$);x[w]=vt,R[w]=vt-N}if(l){var Lt,wt=w==="x"?_r:Rr,Zn=w==="x"?xo:ko,Nt=x[k],An=k==="y"?"height":"width",fn=Nt+m[wt],pn=Nt-m[Zn],qe=[_r,Rr].indexOf(v)!==-1,_n=(Lt=_==null?void 0:_[k])!=null?Lt:0,q=qe?fn:Nt-S[An]-T[An]-_n+I.altAxis,he=qe?Nt+S[An]+T[An]-_n-I.altAxis:pn,ve=f&&qe?Bre(q,Nt,he):zd(f?q:fn,Nt,f?he:pn);x[k]=ve,R[k]=ve-Nt}t.modifiersData[r]=R}}const voe={name:"preventOverflow",enabled:!0,phase:"main",fn:moe,requiresIfExists:["offset"]};function yoe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function boe(e){return e===Jr(e)||!mo(e)?Wx(e):yoe(e)}function woe(e){var t=e.getBoundingClientRect(),n=tu(t.width)/e.offsetWidth||1,r=tu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xoe(e,t,n){n===void 0&&(n=!1);var r=mo(t),o=mo(t)&&woe(t),i=ua(t),s=nu(e,o,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((vi(t)!=="body"||jx(i))&&(l=boe(t)),mo(t)?(a=nu(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):i&&(a.x=Vx(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function koe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=t.get(l);a&&o(a)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function Eoe(e){var t=koe(e);return Nre.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Soe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Coe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var e_={placement:"bottom",modifiers:[],strategy:"absolute"};function t_(){for(var e=arguments.length,t=new Array(e),n=0;n{i||l(Roe(o)||document.body)},[o,i]),cl(()=>{if(s&&!i)return Vy(n,s),()=>{Vy(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:a};return P.cloneElement(r,u)}return V.jsx(P.Fragment,{children:r})}return V.jsx(P.Fragment,{children:s&&nf.createPortal(r,s)})});function Moe(e){return En("MuiPopper",e)}Sn("MuiPopper",["root"]);const Ooe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Ioe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Loe(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 Jy(e){return typeof e=="function"?e():e}function Noe(e){return e.nodeType!==void 0}const $oe=()=>Fn({root:["root"]},dre(Moe)),Doe={},Poe=P.forwardRef(function(t,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:l,modifiers:a,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:f={},slots:p={},TransitionProps:g}=t,m=Fe(t,Ooe),v=P.useRef(null),y=Or(v,n),b=P.useRef(null),w=Or(b,h),k=P.useRef(w);cl(()=>{k.current=w},[w]),P.useImperativeHandle(h,()=>b.current,[]);const x=Loe(c,s),[S,T]=P.useState(x),[C,I]=P.useState(Jy(o));P.useEffect(()=>{b.current&&b.current.forceUpdate()}),P.useEffect(()=>{o&&I(Jy(o))},[o]),cl(()=>{if(!C||!u)return;const M=L=>{T(L.placement)};let O=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{M(L)}}];a!=null&&(O=O.concat(a)),d&&d.modifiers!=null&&(O=O.concat(d.modifiers));const N=_oe(C,v.current,K({placement:x},d,{modifiers:O}));return k.current(N),()=>{N.destroy(),k.current(null)}},[C,l,a,u,d,x]);const _={placement:S};g!==null&&(_.TransitionProps=g);const R=$oe(),A=(r=p.root)!=null?r:"div",E=Yi({elementType:A,externalSlotProps:f.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:t,className:R.root});return V.jsx(A,K({},E,{children:typeof i=="function"?i(_):i}))}),zoe=P.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:l=!1,keepMounted:a=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:h=Doe,popperRef:f,style:p,transition:g=!1,slotProps:m={},slots:v={}}=t,y=Fe(t,Ioe),[b,w]=P.useState(!0),k=()=>{w(!1)},x=()=>{w(!0)};if(!a&&!c&&(!g||b))return null;let S;if(i)S=i;else if(r){const I=Jy(r);S=I&&Noe(I)?Ar(I).body:Ar(null).body}const T=!c&&a&&(!g||b)?"none":void 0,C=g?{in:c,onEnter:k,onExited:x}:void 0;return V.jsx(vN,{disablePortal:l,container:S,children:V.jsx(Poe,K({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:g?!b:c,placement:d,popperOptions:h,popperRef:f,slotProps:m,slots:v},y,{style:K({position:"fixed",top:0,left:0,display:T},p),TransitionProps:C,children:o}))})});function Foe(e){const t=Ar(e);return t.body===e?xh(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Bd(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function n_(e){return parseInt(xh(e).getComputedStyle(e).paddingRight,10)||0}function Boe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function r_(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,s=>{const l=i.indexOf(s)===-1,a=!Boe(s);l&&a&&Bd(s,o)})}function X1(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function Hoe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Foe(r)){const s=TL(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${n_(r)+s}px`;const l=Ar(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${n_(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Ar(r).body;else{const s=r.parentElement,l=xh(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.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()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function Uoe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Woe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Bd(t.modalRef,!1);const o=Uoe(n);r_(n,t.mount,t.modalRef,o,!0);const i=X1(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=X1(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=Hoe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=X1(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Bd(t.modalRef,n),r_(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&&Bd(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Voe(e){return typeof e=="function"?e():e}function joe(e){return e?e.props.hasOwnProperty("in"):!1}const Goe=new Woe;function Koe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Goe,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:c,rootRef:d}=e,h=P.useRef({}),f=P.useRef(null),p=P.useRef(null),g=Or(p,d),[m,v]=P.useState(!c),y=joe(a);let b=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(b=!1);const w=()=>Ar(f.current),k=()=>(h.current.modalRef=p.current,h.current.mount=f.current,h.current),x=()=>{o.mount(k(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Ua(()=>{const O=Voe(t)||w().body;o.add(k(),O),p.current&&x()}),T=P.useCallback(()=>o.isTopModal(k()),[o]),C=Ua(O=>{f.current=O,O&&(c&&T()?x():p.current&&Bd(p.current,b))}),I=P.useCallback(()=>{o.remove(k(),b)},[b,o]);P.useEffect(()=>()=>{I()},[I]),P.useEffect(()=>{c?S():(!y||!i)&&I()},[c,I,y,i,S]);const _=O=>N=>{var L;(L=O.onKeyDown)==null||L.call(O,N),!(N.key!=="Escape"||!T())&&(n||(N.stopPropagation(),u&&u(N,"escapeKeyDown")))},R=O=>N=>{var L;(L=O.onClick)==null||L.call(O,N),N.target===N.currentTarget&&u&&u(N,"backdropClick")};return{getRootProps:(O={})=>{const N=aN(e);delete N.onTransitionEnter,delete N.onTransitionExited;const L=K({},N,O);return K({role:"presentation"},L,{onKeyDown:_(L),ref:g})},getBackdropProps:(O={})=>{const N=O;return K({"aria-hidden":!0},N,{onClick:R(N),open:c})},getTransitionProps:()=>{const O=()=>{v(!1),s&&s()},N=()=>{v(!0),l&&l(),i&&I()};return{onEnter:pA(O,a==null?void 0:a.props.onEnter),onExited:pA(N,a==null?void 0:a.props.onExited)}},rootRef:g,portalRef:C,isTopModal:T,exited:m,hasTransition:y}}const Yoe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Xoe=St(zoe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),qoe=P.forwardRef(function(t,n){var r;const o=Rx(),i=Tn({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:a,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,k=Fe(i,Yoe),x=(r=b==null?void 0:b.root)!=null?r:a==null?void 0:a.Root,S=K({anchorEl:s,container:c,disablePortal:d,keepMounted:h,modifiers:f,open:p,placement:g,popperOptions:m,popperRef:v,transition:y},k);return V.jsx(Xoe,K({as:l,direction:o==null?void 0:o.direction,slots:{root:x},slotProps:w??u},S,{ref:n}))}),Gx=qoe,Zoe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Qoe={entering:{opacity:1},entered:{opacity:1}},Joe=P.forwardRef(function(t,n){const r=Tv(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:f,onExited:p,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=oN}=t,b=Fe(t,Zoe),w=P.useRef(null),k=Or(w,l.ref,n),x=E=>M=>{if(E){const O=w.current;M===void 0?E(O):E(O,M)}},S=x(h),T=x((E,M)=>{iN(E);const O=Hg({style:m,timeout:v,easing:a},{mode:"enter"});E.style.webkitTransition=r.transitions.create("opacity",O),E.style.transition=r.transitions.create("opacity",O),c&&c(E,M)}),C=x(d),I=x(g),_=x(E=>{const M=Hg({style:m,timeout:v,easing:a},{mode:"exit"});E.style.webkitTransition=r.transitions.create("opacity",M),E.style.transition=r.transitions.create("opacity",M),f&&f(E)}),R=x(p),A=E=>{i&&i(w.current,E)};return V.jsx(y,K({appear:s,in:u,nodeRef:w,onEnter:T,onEntered:C,onEntering:S,onExit:_,onExited:R,onExiting:I,addEndListener:A,timeout:v},b,{children:(E,M)=>P.cloneElement(l,K({style:K({opacity:0,visibility:E==="exited"&&!u?"hidden":void 0},Qoe[E],m,l.props.style),ref:k},M))}))}),eie=Joe;function tie(e){return En("MuiBackdrop",e)}Sn("MuiBackdrop",["root","invisible"]);const nie=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],rie=e=>{const{classes:t,invisible:n}=e;return Fn({root:["root",n&&"invisible"]},tie,t)},oie=St("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>K({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"})),iie=P.forwardRef(function(t,n){var r,o,i;const s=Tn({props:t,name:"MuiBackdrop"}),{children:l,className:a,component:u="div",components:c={},componentsProps:d={},invisible:h=!1,open:f,slotProps:p={},slots:g={},TransitionComponent:m=eie,transitionDuration:v}=s,y=Fe(s,nie),b=K({},s,{component:u,invisible:h}),w=rie(b),k=(r=p.root)!=null?r:d.root;return V.jsx(m,K({in:f,timeout:v},y,{children:V.jsx(oie,K({"aria-hidden":!0},k,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:Ge(w.root,a,k==null?void 0:k.className),ownerState:K({},b,k==null?void 0:k.ownerState),classes:w,ref:n,children:l}))}))}),sie=iie;function aie(e){return En("MuiBadge",e)}const lie=Sn("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"]),cs=lie,cie=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],q1=10,Z1=4,uie=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}`,`anchorOrigin${pt(n.vertical)}${pt(n.horizontal)}${pt(o)}`,`overlap${pt(o)}`,t!=="default"&&`color${pt(t)}`]};return Fn(l,aie,s)},die=St("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),hie=St("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${pt(n.anchorOrigin.vertical)}${pt(n.anchorOrigin.horizontal)}${pt(n.overlap)}`],n.color!=="default"&&t[`color${pt(n.color)}`],n.invisible&&t.invisible]}})(({theme:e,ownerState:t})=>K({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:q1*2,lineHeight:1,padding:"0 6px",height:q1*2,borderRadius:q1,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:Z1,height:Z1*2,minWidth:Z1*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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.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%",[`&.${cs.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})})),fie=P.forwardRef(function(t,n){var r,o,i,s,l,a;const u=Tn({props:t,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:h,components:f={},componentsProps:p={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:k,slotProps:x,showZero:S=!1,variant:T="standard"}=u,C=Fe(u,cie),{badgeContent:I,invisible:_,max:R,displayValue:A}=gre({max:b,invisible:y,badgeContent:w,showZero:S}),E=AL({anchorOrigin:c,color:v,overlap:m,variant:T,badgeContent:w}),M=_||I==null&&T!=="dot",{color:O=v,overlap:N=m,anchorOrigin:L=c,variant:$=T}=M?E:u,D=$!=="dot"?A:void 0,F=K({},u,{badgeContent:I,invisible:M,max:R,displayValue:D,showZero:S,anchorOrigin:L,color:O,overlap:N,variant:$}),U=uie(F),W=(r=(o=k==null?void 0:k.root)!=null?o:f.Root)!=null?r:die,B=(i=(s=k==null?void 0:k.badge)!=null?s:f.Badge)!=null?i:hie,H=(l=x==null?void 0:x.root)!=null?l:p.root,j=(a=x==null?void 0:x.badge)!=null?a:p.badge,Y=Yi({elementType:W,externalSlotProps:H,externalForwardedProps:C,additionalProps:{ref:n,as:h},ownerState:F,className:Ge(H==null?void 0:H.className,U.root,d)}),X=Yi({elementType:B,externalSlotProps:j,ownerState:F,className:Ge(U.badge,j==null?void 0:j.className)});return V.jsxs(W,K({},Y,{children:[g,V.jsx(B,K({},X,{children:D}))]}))}),pie=fie,gie=Lx(),mie=ate({themeId:Qc,defaultTheme:gie,defaultClassName:"MuiBox-root",generateClassName:RL.generate}),yN=mie;function vie(e){return En("MuiModal",e)}Sn("MuiModal",["root","hidden","backdrop"]);const yie=["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"],bie=e=>{const{open:t,exited:n,classes:r}=e;return Fn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},vie,r)},wie=St("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>K({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),xie=St(sie,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kie=P.forwardRef(function(t,n){var r,o,i,s,l,a;const u=Tn({name:"MuiModal",props:t}),{BackdropComponent:c=xie,BackdropProps:d,className:h,closeAfterTransition:f=!1,children:p,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:k=!1,disablePortal:x=!1,disableRestoreFocus:S=!1,disableScrollLock:T=!1,hideBackdrop:C=!1,keepMounted:I=!1,onBackdropClick:_,open:R,slotProps:A,slots:E}=u,M=Fe(u,yie),O=K({},u,{closeAfterTransition:f,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:k,disablePortal:x,disableRestoreFocus:S,disableScrollLock:T,hideBackdrop:C,keepMounted:I}),{getRootProps:N,getBackdropProps:L,getTransitionProps:$,portalRef:D,isTopModal:F,exited:U,hasTransition:W}=Koe(K({},O,{rootRef:n})),B=K({},O,{exited:U}),H=bie(B),j={};if(p.props.tabIndex===void 0&&(j.tabIndex="-1"),W){const{onEnter:ye,onExited:Me}=$();j.onEnter=ye,j.onExited=Me}const Y=(r=(o=E==null?void 0:E.root)!=null?o:v.Root)!=null?r:wie,X=(i=(s=E==null?void 0:E.backdrop)!=null?s:v.Backdrop)!=null?i:c,Z=(l=A==null?void 0:A.root)!=null?l:y.root,te=(a=A==null?void 0:A.backdrop)!=null?a:y.backdrop,ue=Yi({elementType:Y,externalSlotProps:Z,externalForwardedProps:M,getSlotProps:N,additionalProps:{ref:n,as:m},ownerState:B,className:Ge(h,Z==null?void 0:Z.className,H==null?void 0:H.root,!B.open&&B.exited&&(H==null?void 0:H.hidden))}),Ne=Yi({elementType:X,externalSlotProps:te,additionalProps:d,getSlotProps:ye=>L(K({},ye,{onClick:Me=>{_&&_(Me),ye!=null&&ye.onClick&&ye.onClick(Me)}})),className:Ge(te==null?void 0:te.className,d==null?void 0:d.className,H==null?void 0:H.backdrop),ownerState:B});return!I&&!R&&(!W||U)?null:V.jsx(vN,{ref:D,container:g,disablePortal:x,children:V.jsxs(Y,K({},ue,{children:[!C&&c?V.jsx(X,K({},Ne)):null,V.jsx(kre,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:R,children:P.cloneElement(p,j)})]}))})}),Eie=kie,Sie=Sn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),o_=Sie,Cie=Fte({createStyledComponent:St("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Tn({props:e,name:"MuiStack"})}),Tie=Cie,Aie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function eb(e){return`scale(${e}, ${e**2})`}const _ie={entering:{opacity:1,transform:eb(1)},entered:{opacity:1,transform:"none"}},Q1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bN=P.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:f,style:p,timeout:g="auto",TransitionComponent:m=oN}=t,v=Fe(t,Aie),y=P.useRef(),b=P.useRef(),w=Tv(),k=P.useRef(null),x=Or(k,i.ref,n),S=M=>O=>{if(M){const N=k.current;O===void 0?M(N):M(N,O)}},T=S(c),C=S((M,O)=>{iN(M);const{duration:N,delay:L,easing:$}=Hg({style:p,timeout:g,easing:s},{mode:"enter"});let D;g==="auto"?(D=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=D):D=N,M.style.transition=[w.transitions.create("opacity",{duration:D,delay:L}),w.transitions.create("transform",{duration:Q1?D:D*.666,delay:L,easing:$})].join(","),a&&a(M,O)}),I=S(u),_=S(f),R=S(M=>{const{duration:O,delay:N,easing:L}=Hg({style:p,timeout:g,easing:s},{mode:"exit"});let $;g==="auto"?($=w.transitions.getAutoHeightDuration(M.clientHeight),b.current=$):$=O,M.style.transition=[w.transitions.create("opacity",{duration:$,delay:N}),w.transitions.create("transform",{duration:Q1?$:$*.666,delay:Q1?N:N||$*.333,easing:L})].join(","),M.style.opacity=0,M.style.transform=eb(.75),d&&d(M)}),A=S(h),E=M=>{g==="auto"&&(y.current=setTimeout(M,b.current||0)),r&&r(k.current,M)};return P.useEffect(()=>()=>{clearTimeout(y.current)},[]),V.jsx(m,K({appear:o,in:l,nodeRef:k,onEnter:C,onEntered:I,onEntering:T,onExit:R,onExited:A,onExiting:_,addEndListener:E,timeout:g==="auto"?null:g},v,{children:(M,O)=>P.cloneElement(i,K({style:K({opacity:0,transform:eb(.75),visibility:M==="exited"&&!l?"hidden":void 0},_ie[M],p,i.props.style),ref:x},O))}))});bN.muiSupportAuto=!0;const tb=bN,Rie=P.createContext({}),Ah=Rie;function Mie(e){return En("MuiList",e)}Sn("MuiList",["root","padding","dense","subheader"]);const Oie=["children","className","component","dense","disablePadding","subheader"],Iie=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Fn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Mie,t)},Lie=St("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>K({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Nie=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u}=r,c=Fe(r,Oie),d=P.useMemo(()=>({dense:l}),[l]),h=K({},r,{component:s,dense:l,disablePadding:a}),f=Iie(h);return V.jsx(Ah.Provider,{value:d,children:V.jsxs(Lie,K({as:s,className:Ge(f.root,i),ref:n,ownerState:h},c,{children:[u,o]}))})}),$ie=Nie;function Die(e){return En("MuiListItemIcon",e)}const Pie=Sn("MuiListItemIcon",["root","alignItemsFlexStart"]),i_=Pie,zie=["className"],Fie=e=>{const{alignItems:t,classes:n}=e;return Fn({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Die,n)},Bie=St("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>K({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),Hie=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiListItemIcon"}),{className:o}=r,i=Fe(r,zie),s=P.useContext(Ah),l=K({},r,{alignItems:s.alignItems}),a=Fie(l);return V.jsx(Bie,K({className:Ge(a.root,o),ownerState:l,ref:n},i))}),Uie=Hie;function Wie(e){return En("MuiListItemText",e)}const Vie=Sn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Wg=Vie,jie=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Gie=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Fn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Wie,t)},Kie=St("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Wg.primary}`]:t.primary},{[`& .${Wg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>K({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Yie=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:l=!1,primary:a,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,h=Fe(r,jie),{dense:f}=P.useContext(Ah);let p=a??o,g=c;const m=K({},r,{disableTypography:s,inset:l,primary:!!p,secondary:!!g,dense:f}),v=Gie(m);return p!=null&&p.type!==xd&&!s&&(p=V.jsx(xd,K({variant:f?"body2":"body1",className:v.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:p}))),g!=null&&g.type!==xd&&!s&&(g=V.jsx(xd,K({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),V.jsxs(Kie,K({className:Ge(v.root,i),ownerState:m,ref:n},h,{children:[p,g]}))}),Xie=Yie,qie=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function J1(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function s_(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function wN(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Fu(e,t,n,r,o,i){let s=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!wN(l,i)||a)l=o(e,l,n);else return l.focus(),!0}return!1}const Zie=P.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=t,h=Fe(t,qie),f=P.useRef(null),p=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});cl(()=>{o&&f.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,w)=>{const k=!f.current.style.width;if(b.clientHeight{const w=f.current,k=b.key,x=Ar(w).activeElement;if(k==="ArrowDown")b.preventDefault(),Fu(w,x,u,a,J1);else if(k==="ArrowUp")b.preventDefault(),Fu(w,x,u,a,s_);else if(k==="Home")b.preventDefault(),Fu(w,null,u,a,J1);else if(k==="End")b.preventDefault(),Fu(w,null,u,a,s_);else if(k.length===1){const S=p.current,T=k.toLowerCase(),C=performance.now();S.keys.length>0&&(C-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&T!==S.keys[0]&&(S.repeating=!1)),S.lastTime=C,S.keys.push(T);const I=x&&!S.repeating&&wN(x,S);S.previousKeyMatched&&(I||Fu(w,x,!1,a,J1,S))?b.preventDefault():S.previousKeyMatched=!1}c&&c(b)},m=Or(f,n);let v=-1;P.Children.forEach(s,(b,w)=>{if(!P.isValidElement(b)){v===w&&(v+=1,v>=s.length&&(v=-1));return}b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=s.length&&(v=-1))});const y=P.Children.map(s,(b,w)=>{if(w===v){const k={};return i&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),P.cloneElement(b,k)}return b});return V.jsx($ie,K({role:"menu",ref:m,className:l,onKeyDown:g,tabIndex:o?0:-1},h,{children:y}))}),Qie=Zie;function Jie(e){return En("MuiPopover",e)}Sn("MuiPopover",["root","paper"]);const ese=["onEntering"],tse=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],nse=["slotProps"];function a_(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function l_(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function c_(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function e0(e){return typeof e=="function"?e():e}const rse=e=>{const{classes:t}=e;return Fn({root:["root"],paper:["paper"]},Jie,t)},ose=St(Eie,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xN=St(Rne,{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}),ise=P.forwardRef(function(t,n){var r,o,i;const s=Tn({props:t,name:"MuiPopover"}),{action:l,anchorEl:a,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:f,container:p,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:x=tb,transitionDuration:S="auto",TransitionProps:{onEntering:T}={},disableScrollLock:C=!1}=s,I=Fe(s.TransitionProps,ese),_=Fe(s,tse),R=(r=w==null?void 0:w.paper)!=null?r:y,A=P.useRef(),E=Or(A,R.ref),M=K({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:R,transformOrigin:k,TransitionComponent:x,transitionDuration:S,TransitionProps:I}),O=rse(M),N=P.useCallback(()=>{if(d==="anchorPosition")return c;const ye=e0(a),Ce=(ye&&ye.nodeType===1?ye:Ar(A.current).body).getBoundingClientRect();return{top:Ce.top+a_(Ce,u.vertical),left:Ce.left+l_(Ce,u.horizontal)}},[a,u.horizontal,u.vertical,c,d]),L=P.useCallback(ye=>({vertical:a_(ye,k.vertical),horizontal:l_(ye,k.horizontal)}),[k.horizontal,k.vertical]),$=P.useCallback(ye=>{const Me={width:ye.offsetWidth,height:ye.offsetHeight},Ce=L(Me);if(d==="none")return{top:null,left:null,transformOrigin:c_(Ce)};const vt=N();let Lt=vt.top-Ce.vertical,wt=vt.left-Ce.horizontal;const Zn=Lt+Me.height,Nt=wt+Me.width,An=xh(e0(a)),fn=An.innerHeight-m,pn=An.innerWidth-m;if(m!==null&&Ltfn){const qe=Zn-fn;Lt-=qe,Ce.vertical+=qe}if(m!==null&&wtpn){const qe=Nt-pn;wt-=qe,Ce.horizontal+=qe}return{top:`${Math.round(Lt)}px`,left:`${Math.round(wt)}px`,transformOrigin:c_(Ce)}},[a,d,N,L,m]),[D,F]=P.useState(v),U=P.useCallback(()=>{const ye=A.current;if(!ye)return;const Me=$(ye);Me.top!==null&&(ye.style.top=Me.top),Me.left!==null&&(ye.style.left=Me.left),ye.style.transformOrigin=Me.transformOrigin,F(!0)},[$]);P.useEffect(()=>(C&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[a,C,U]);const W=(ye,Me)=>{T&&T(ye,Me),U()},B=()=>{F(!1)};P.useEffect(()=>{v&&U()}),P.useImperativeHandle(l,()=>v?{updatePosition:()=>{U()}}:null,[v,U]),P.useEffect(()=>{if(!v)return;const ye=jQ(()=>{U()}),Me=xh(a);return Me.addEventListener("resize",ye),()=>{ye.clear(),Me.removeEventListener("resize",ye)}},[a,v,U]);let H=S;S==="auto"&&!x.muiSupportAuto&&(H=void 0);const j=p||(a?Ar(e0(a)).body:void 0),Y=(o=b==null?void 0:b.root)!=null?o:ose,X=(i=b==null?void 0:b.paper)!=null?i:xN,Z=Yi({elementType:X,externalSlotProps:K({},R,{style:D?R.style:K({},R.style,{opacity:0})}),additionalProps:{elevation:g,ref:E},ownerState:M,className:Ge(O.paper,R==null?void 0:R.className)}),te=Yi({elementType:Y,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:_,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:j,open:v},ownerState:M,className:Ge(O.root,f)}),{slotProps:ue}=te,Ne=Fe(te,nse);return V.jsx(Y,K({},Ne,!sN(Y)&&{slotProps:ue,disableScrollLock:C},{children:V.jsx(x,K({appear:!0,in:v,onEntering:W,onExited:B,timeout:H},I,{children:V.jsx(X,K({},Z,{children:h}))}))}))}),sse=ise;function ase(e){return En("MuiMenu",e)}Sn("MuiMenu",["root","paper","list"]);const lse=["onEntering"],cse=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],use={vertical:"top",horizontal:"right"},dse={vertical:"top",horizontal:"left"},hse=e=>{const{classes:t}=e;return Fn({root:["root"],paper:["paper"],list:["list"]},ase,t)},fse=St(sse,{shouldForwardProp:e=>$x(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),pse=St(xN,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),gse=St(Qie,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),mse=P.forwardRef(function(t,n){var r,o;const i=Tn({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:a,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:h,PaperProps:f={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=Fe(i.TransitionProps,lse),k=Fe(i,cse),x=Tv(),S=x.direction==="rtl",T=K({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:m,PaperProps:f,transitionDuration:g,TransitionProps:w,variant:v}),C=hse(T),I=s&&!u&&h,_=P.useRef(null),R=($,D)=>{_.current&&_.current.adjustStyleForScrollbar($,x),m&&m($,D)},A=$=>{$.key==="Tab"&&($.preventDefault(),d&&d($,"tabKeyDown"))};let E=-1;P.Children.map(l,($,D)=>{P.isValidElement($)&&($.props.disabled||(v==="selectedMenu"&&$.props.selected||E===-1)&&(E=D))});const M=(r=y.paper)!=null?r:pse,O=(o=b.paper)!=null?o:f,N=Yi({elementType:y.root,externalSlotProps:b.root,ownerState:T,className:[C.root,a]}),L=Yi({elementType:M,externalSlotProps:O,ownerState:T,className:C.paper});return V.jsx(fse,K({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?use:dse,slots:{paper:M,root:y.root},slotProps:{root:N,paper:L},open:h,ref:n,transitionDuration:g,TransitionProps:K({onEntering:R},w),ownerState:T},k,{classes:p,children:V.jsx(gse,K({onKeyDown:A,actions:_,autoFocus:s&&(E===-1||u),autoFocusItem:I,variant:v},c,{className:Ge(C.list,c.className),children:l}))}))}),vse=mse;function yse(e){return En("MuiMenuItem",e)}const bse=Sn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Bu=bse,wse=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],xse=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},kse=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=e,a=Fn({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},yse,s);return K({},s,a)},Ese=St(zx,{shouldForwardProp:e=>$x(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:xse})(({theme:e,ownerState:t})=>K({},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"}},[`&.${Bu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:kr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Bu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:kr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Bu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:kr(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})`:kr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Bu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Bu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${o_.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${o_.inset}`]:{marginLeft:52},[`& .${Wg.root}`]:{marginTop:0,marginBottom:0},[`& .${Wg.inset}`]:{paddingLeft:36},[`& .${i_.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&K({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${i_.root} svg`]:{fontSize:"1.25rem"}}))),Sse=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h}=r,f=Fe(r,wse),p=P.useContext(Ah),g=P.useMemo(()=>({dense:s||p.dense||!1,disableGutters:a}),[p.dense,s,a]),m=P.useRef(null);cl(()=>{o&&m.current&&m.current.focus()},[o]);const v=K({},r,{dense:g.dense,divider:l,disableGutters:a}),y=kse(r),b=Or(m,n);let w;return r.disabled||(w=d!==void 0?d:-1),V.jsx(Ah.Provider,{value:g,children:V.jsx(Ese,K({ref:b,role:c,tabIndex:w,component:i,focusVisibleClassName:Ge(y.focusVisible,u),className:Ge(y.root,h)},f,{ownerState:v,classes:y}))})}),Cse=Sse;function Tse(e){return En("MuiTooltip",e)}const Ase=Sn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),_s=Ase,_se=["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 Rse(e){return Math.round(e*1e5)/1e5}const Mse=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${pt(i.split("-")[0])}`],arrow:["arrow"]};return Fn(s,Tse,t)},Ose=St(Gx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>K({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${_s.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${_s.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${_s.arrow}`]:K({},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"] .${_s.arrow}`]:K({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Ise=St("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${pt(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>K({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:kr(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:`${Rse(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${_s.popper}[data-popper-placement*="left"] &`]:K({transformOrigin:"right center"},t.isRtl?K({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):K({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${_s.popper}[data-popper-placement*="right"] &`]:K({transformOrigin:"left center"},t.isRtl?K({marginRight:"14px"},t.touch&&{marginRight:"24px"}):K({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${_s.popper}[data-popper-placement*="top"] &`]:K({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${_s.popper}[data-popper-placement*="bottom"] &`]:K({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),Lse=St("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:kr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Qf=!1,t0=null,Hu={x:0,y:0};function Jf(e,t){return n=>{t&&t(n),e(n)}}const Nse=P.forwardRef(function(t,n){var r,o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k;const x=Tn({props:t,name:"MuiTooltip"}),{arrow:S=!1,children:T,components:C={},componentsProps:I={},describeChild:_=!1,disableFocusListener:R=!1,disableHoverListener:A=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:O=100,enterNextDelay:N=0,enterTouchDelay:L=700,followCursor:$=!1,id:D,leaveDelay:F=0,leaveTouchDelay:U=1500,onClose:W,onOpen:B,open:H,placement:j="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Z={},slots:te={},title:ue,TransitionComponent:Ne=tb,TransitionProps:ye}=x,Me=Fe(x,_se),Ce=P.isValidElement(T)?T:V.jsx("span",{children:T}),vt=Tv(),Lt=vt.direction==="rtl",[wt,Zn]=P.useState(),[Nt,An]=P.useState(null),fn=P.useRef(!1),pn=E||$,qe=P.useRef(),_n=P.useRef(),q=P.useRef(),he=P.useRef(),[ve,ie]=XQ({controlled:H,default:!1,name:"Tooltip",state:"open"});let Te=ve;const Ze=YQ(D),Xe=P.useRef(),nt=P.useCallback(()=>{Xe.current!==void 0&&(document.body.style.WebkitUserSelect=Xe.current,Xe.current=void 0),clearTimeout(he.current)},[]);P.useEffect(()=>()=>{clearTimeout(qe.current),clearTimeout(_n.current),clearTimeout(q.current),nt()},[nt]);const rt=$e=>{clearTimeout(t0),Qf=!0,ie(!0),B&&!Te&&B($e)},Be=Ua($e=>{clearTimeout(t0),t0=setTimeout(()=>{Qf=!1},800+F),ie(!1),W&&Te&&W($e),clearTimeout(qe.current),qe.current=setTimeout(()=>{fn.current=!1},vt.transitions.duration.shortest)}),Kt=$e=>{fn.current&&$e.type!=="touchstart"||(wt&&wt.removeAttribute("title"),clearTimeout(_n.current),clearTimeout(q.current),O||Qf&&N?_n.current=setTimeout(()=>{rt($e)},Qf?N:O):rt($e))},Ao=$e=>{clearTimeout(_n.current),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},F)},{isFocusVisibleRef:ha,onBlur:wi,onFocus:pf,ref:Dv}=CL(),[,gf]=P.useState(!1),Rl=$e=>{wi($e),ha.current===!1&&(gf(!1),Ao($e))},ts=$e=>{wt||Zn($e.currentTarget),pf($e),ha.current===!0&&(gf(!0),Kt($e))},Ml=$e=>{fn.current=!0;const Jn=Ce.props;Jn.onTouchStart&&Jn.onTouchStart($e)},Ol=Kt,Il=Ao,fa=$e=>{Ml($e),clearTimeout(q.current),clearTimeout(qe.current),nt(),Xe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",he.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Xe.current,Kt($e)},L)},Pv=$e=>{Ce.props.onTouchEnd&&Ce.props.onTouchEnd($e),nt(),clearTimeout(q.current),q.current=setTimeout(()=>{Be($e)},U)};P.useEffect(()=>{if(!Te)return;function $e(Jn){(Jn.key==="Escape"||Jn.key==="Esc")&&Be(Jn)}return document.addEventListener("keydown",$e),()=>{document.removeEventListener("keydown",$e)}},[Be,Te]);const zv=Or(Ce.ref,Dv,Zn,n);!ue&&ue!==0&&(Te=!1);const ku=P.useRef(),Fv=$e=>{const Jn=Ce.props;Jn.onMouseMove&&Jn.onMouseMove($e),Hu={x:$e.clientX,y:$e.clientY},ku.current&&ku.current.update()},pa={},Ll=typeof ue=="string";_?(pa.title=!Te&&Ll&&!A?ue:null,pa["aria-describedby"]=Te?Ze:null):(pa["aria-label"]=Ll?ue:null,pa["aria-labelledby"]=Te&&!Ll?Ze:null);const Qn=K({},pa,Me,Ce.props,{className:Ge(Me.className,Ce.props.className),onTouchStart:Ml,ref:zv},$?{onMouseMove:Fv}:{}),Nr={};M||(Qn.onTouchStart=fa,Qn.onTouchEnd=Pv),A||(Qn.onMouseOver=Jf(Ol,Qn.onMouseOver),Qn.onMouseLeave=Jf(Il,Qn.onMouseLeave),pn||(Nr.onMouseOver=Ol,Nr.onMouseLeave=Il)),R||(Qn.onFocus=Jf(ts,Qn.onFocus),Qn.onBlur=Jf(Rl,Qn.onBlur),pn||(Nr.onFocus=ts,Nr.onBlur=Rl));const Bv=P.useMemo(()=>{var $e;let Jn=[{name:"arrow",enabled:!!Nt,options:{element:Nt,padding:4}}];return($e=X.popperOptions)!=null&&$e.modifiers&&(Jn=Jn.concat(X.popperOptions.modifiers)),K({},X.popperOptions,{modifiers:Jn})},[Nt,X]),ga=K({},x,{isRtl:Lt,arrow:S,disableInteractive:pn,placement:j,PopperComponentProp:Y,touch:fn.current}),Eu=Mse(ga),mf=(r=(o=te.popper)!=null?o:C.Popper)!=null?r:Ose,vf=(i=(s=(l=te.transition)!=null?l:C.Transition)!=null?s:Ne)!=null?i:tb,oo=(a=(u=te.tooltip)!=null?u:C.Tooltip)!=null?a:Ise,yf=(c=(d=te.arrow)!=null?d:C.Arrow)!=null?c:Lse,Hv=kd(mf,K({},X,(h=Z.popper)!=null?h:I.popper,{className:Ge(Eu.popper,X==null?void 0:X.className,(f=(p=Z.popper)!=null?p:I.popper)==null?void 0:f.className)}),ga),Uv=kd(vf,K({},ye,(g=Z.transition)!=null?g:I.transition),ga),Wv=kd(oo,K({},(m=Z.tooltip)!=null?m:I.tooltip,{className:Ge(Eu.tooltip,(v=(y=Z.tooltip)!=null?y:I.tooltip)==null?void 0:v.className)}),ga),Vv=kd(yf,K({},(b=Z.arrow)!=null?b:I.arrow,{className:Ge(Eu.arrow,(w=(k=Z.arrow)!=null?k:I.arrow)==null?void 0:w.className)}),ga);return V.jsxs(P.Fragment,{children:[P.cloneElement(Ce,Qn),V.jsx(mf,K({as:Y??Gx,placement:j,anchorEl:$?{getBoundingClientRect:()=>({top:Hu.y,left:Hu.x,right:Hu.x,bottom:Hu.y,width:0,height:0})}:wt,popperRef:ku,open:wt?Te:!1,id:Ze,transition:!0},Nr,Hv,{popperOptions:Bv,children:({TransitionProps:$e})=>V.jsx(vf,K({timeout:vt.transitions.duration.shorter},$e,Uv,{children:V.jsxs(oo,K({},Wv,{children:[ue,S?V.jsx(yf,K({},Vv,{ref:An})):null]}))}))}))]})}),kN=Nse;function $se(e){return En("MuiToggleButton",e)}const Dse=Sn("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),u_=Dse,Pse=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],zse=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:s}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${pt(i)}`,s]};return Fn(l,$se,t)},Fse=St(zx,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${pt(n.size)}`]]}})(({theme:e,ownerState:t})=>{let n=t.color==="standard"?e.palette.text.primary:e.palette[t.color].main,r;return e.vars&&(n=t.color==="standard"?e.vars.palette.text.primary:e.vars.palette[t.color].main,r=t.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),K({},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%"},{[`&.${u_.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})`:kr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${u_.selected}`]:{color:n,backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:kr(n,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${r} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:kr(n,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:kr(n,e.palette.action.selectedOpacity)}}}},t.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},t.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),Bse=P.forwardRef(function(t,n){const r=Tn({props:t,name:"MuiToggleButton"}),{children:o,className:i,color:s="standard",disabled:l=!1,disableFocusRipple:a=!1,fullWidth:u=!1,onChange:c,onClick:d,selected:h,size:f="medium",value:p}=r,g=Fe(r,Pse),m=K({},r,{color:s,disabled:l,disableFocusRipple:a,fullWidth:u,size:f}),v=zse(m),y=b=>{d&&(d(b,p),b.defaultPrevented)||c&&c(b,p)};return V.jsx(Fse,K({className:Ge(v.root,i),disabled:l,focusRipple:!a,ref:n,onClick:y,onChange:c,value:p,ownerState:m,"aria-pressed":h},g,{children:o}))}),Hse=Bse;var Use=[{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"}}],Wse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],Vse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"}}],jse=[{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"}}],Gse=[{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"}}],Kse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"}}],Yse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm0-5h18v2H3v-2zm0-5h18v2H3V9z"}}],Xse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"}}],qse=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"}}],Zse=[{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"}}],Qse=[{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"}}],Jse=[{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"}}],eae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 16l-6-6h12z"}}],tae=[{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"}}],nae=[{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"}}],rae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 12l6-6v12z"}}],oae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 12l-6 6V6z"}}],iae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l6 6H6z"}}],sae=[{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"}}],aae=[{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"}}],lae=[{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"}}],cae=[{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"}}],uae=[{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"}}],dae=[{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"}}],hae=[{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"}}],fae=[{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"}}],pae=[{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"}}],gae=[{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"}}],mae=[{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"}}],vae=[{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"}}],yae=[{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"}}],bae=[{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"}}],wae=[{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"}}],xae=[{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"}}],kae=[{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"}}],Eae=[{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"}}],Sae=[{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"}}],Cae=[{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"}}],Tae=[{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"}}],Aae=[{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"}}],_ae=[{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"}}],Rae=[{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"}}],Mae=[{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"}}],Oae=[{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"}}],Iae=[{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"}}],Lae=[{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"}}],Nae=[{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"}}],$ae=[{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"}}],Dae=[{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"}}],Pae=[{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"}}],zae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v15H8V6H2V4h14v2h-6zm8 8v7h-2v-7h-3v-2h8v2h-3z"}}],Fae=[{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"}}],Bae=[{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"}}],Hae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z"}}],Uae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z"}}],Wae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 18l7.68-6L5 6V4h14v2H8.263L16 12l-7.737 6H19v2H5v-2z"}}],Vae=[{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"}}],jae=[{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"}}],Gae=[{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"}}],Kae=[{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"}}],Yae=[{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"}}],Xae=[{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"}}],qae=[{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"}}],Zae=[{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"}}],Qae=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"}}],Jae=[{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"}}],ele=[{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"}}],tle=[{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"}}],nle=[{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"}}],rle=[{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"}}],ole=[{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"}}],ile=[{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"}}],sle=[{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"}}],ale=[{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"}}],lle=[{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"}}],cle=[{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"}}],ule=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}],dle=[{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"}}],hle=[{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"}}],fle=[{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"}}],ple=[{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"}}],gle=[{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"}}],mle=[{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"}}],vle=[{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"}}],yle=[{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"}}],ble=[{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"}}],wle=[{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"}}],xle=[{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"}}],kle=[{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"}}],Ele=[{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"}}],Sle=[{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"}}],Cle=[{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"}}],Tle=[{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"}}],Ale=[{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"}}],_le=[{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"}}],Rle=[{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"}}],Mle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14 1.5V22h-2V3.704L7.5 4.91V2.839l5-1.339z"}}],Ole=[{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"}}],Ile=[{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"}}],Lle=[{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"}}],Nle=[{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"}}],$le=[{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"}}],Dle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 2v1.5L10.763 22H8.574l8.013-18H6V2z"}}],Ple=[{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"}}],zle=[{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"}}],Fle=[{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"}}],Ble=[{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"}}],Hle=[{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"}}],Ule=[{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"}}],Wle=[{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"}}],Vle=[{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"}}],jle=[{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"}}],Gle=[{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"}}],Kle=[{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"}}],Yle=[{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"}}],Xle=[{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"}}],qle=[{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"}}],Zle=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"}}],Qle=[{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"}}],Jle=[{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"}}],ece=[{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"}}],tce=[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M20 4v12h3l-4 5-4-5h3V4h2zm-8 14v2H3v-2h9zm2-7v2H3v-2h11zm0-7v2H3V4h11z"}}],nce=[{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"}}],rce=[{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"}}],oce=[{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"}}],ice=[{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"}}],sce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 9h-2V6H5V4h14v2h-6v3zm0 6v5h-2v-5h2zM3 11h18v2H3v-2z"}}],lce=[{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"}}],cce=[{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"}}],uce=[{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"}}],dce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M5 11h14v2H5z"}}],hce=[{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"}}],fce=[{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"}}],pce=[{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"}}],gce=[{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"}}],mce=[{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"}}],vce=[{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"}}],yce=[{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"}}],bce=[{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"}}],wce=[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}],xce=[{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"}}],kce=[{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"}}],Ece=[{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"}}],Sce=[{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"}}],Cce=[{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"}}],Tce=[{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 Ace=Object.freeze(Object.defineProperty({__proto__:null,ab:Use,addFill:Wse,addLine:Vse,alertLine:jse,alignBottom:Gse,alignCenter:Kse,alignJustify:Yse,alignLeft:Xse,alignRight:qse,alignTop:Zse,alignVertically:Qse,appsLine:Jse,arrowDownSFill:eae,arrowGoBackFill:tae,arrowGoForwardFill:nae,arrowLeftSFill:rae,arrowRightSFill:oae,arrowUpSFill:iae,asterisk:sae,attachment2:aae,bold:lae,bracesLine:cae,bringForward:uae,bringToFront:dae,chatNewLine:hae,checkboxCircleLine:fae,checkboxMultipleLine:pae,clipboardFill:gae,clipboardLine:mae,closeCircleLine:vae,closeFill:yae,closeLine:bae,codeLine:wae,codeView:xae,deleteBinFill:kae,deleteBinLine:Eae,deleteColumn:Sae,deleteRow:Cae,doubleQuotesL:Tae,doubleQuotesR:Aae,download2Fill:_ae,dragDropLine:Rae,emphasis:Oae,emphasisCn:Mae,englishInput:Iae,errorWarningLine:Lae,externalLinkFill:Nae,fileCopyLine:$ae,flowChart:Dae,fontColor:Pae,fontSize:Fae,fontSize2:zae,formatClear:Bae,fullscreenExitLine:Hae,fullscreenLine:Uae,functions:Wae,galleryUploadLine:Vae,h1:jae,h2:Gae,h3:Kae,h4:Yae,h5:Xae,h6:qae,hashtag:Zae,heading:Qae,imageAddLine:Jae,imageEditLine:ele,imageLine:tle,indentDecrease:nle,indentIncrease:rle,informationLine:ole,inputCursorMove:ile,insertColumnLeft:sle,insertColumnRight:ale,insertRowBottom:lle,insertRowTop:cle,italic:ule,layoutColumnLine:dle,lineHeight:hle,link:mle,linkM:fle,linkUnlink:gle,linkUnlinkM:ple,listCheck:yle,listCheck2:vle,listOrdered:ble,listUnordered:wle,markPenLine:xle,markdownFill:kle,markdownLine:Ele,mergeCellsHorizontal:Sle,mergeCellsVertical:Cle,mindMap:Tle,moreFill:Ale,nodeTree:_le,number0:Rle,number1:Mle,number2:Ole,number3:Ile,number4:Lle,number5:Nle,number6:$le,number7:Dle,number8:Ple,number9:zle,omega:Fle,organizationChart:Ble,pageSeparator:Hle,paragraph:Ule,pencilFill:Wle,pencilLine:Vle,pinyinInput:jle,questionMark:Gle,roundedCorner:Kle,scissorsFill:Yle,sendBackward:Xle,sendToBack:qle,separator:Zle,singleQuotesL:Qle,singleQuotesR:Jle,sortAsc:ece,sortDesc:tce,space:nce,spamLine:rce,splitCellsHorizontal:oce,splitCellsVertical:ice,strikethrough:lce,strikethrough2:sce,subscript:uce,subscript2:cce,subtractLine:dce,superscript:fce,superscript2:hce,table2:pce,tableLine:gce,text:wce,textDirectionL:mce,textDirectionR:vce,textSpacing:yce,textWrap:bce,translate:kce,translate2:xce,underline:Ece,upload2Fill:Sce,videoLine:Cce,wubiInput:Tce},Symbol.toStringTag,{value:"Module"}));function _ce(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=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 c=n.doc.resolve(s.start-2);a=new Za(c,c,s.depth),s.endIndex=0;c--)i=Q.from(n[c].type.create(n[c].attrs,i));e.step(new qt(t.start-(r?2:0),t.end,t.start,t.end,new ae(i,0,0),n.length,!0));let s=0;for(let c=0;cs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?Oce(t,n,e,i):Ice(t,n,i):!0:!1}}function Oce(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);ig;p--)f-=o.child(p).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?Q.empty:Q.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new qt(d-(l?1:0),h+(a?1:0),d+1,h-1,new ae((l?Q.empty:Q.from(o.copy(Q.empty))).append(a?Q.empty:Q.from(o.copy(Q.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}var Lce=Object.defineProperty,Nce=Object.getOwnPropertyDescriptor,To=(e,t,n,r)=>{for(var o=r>1?void 0:r?Nce(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Lce(t,n,o),o};function nb(e){var t;return!!((t=e.spec.group)!=null&&t.includes(Ee.ListContainerNode))}function $ce(e){var t;return!!((t=e.spec.group)!=null&&t.includes(Ee.ListItemNode))}function Qs(e){return nb(e.type)}function Hs(e){return $ce(e.type)}function Kx(e,t){return n=>{const{dispatch:r,tr:o}=n,i=$b(o,n.state),{$from:s,$to:l}=o.selection,a=s.blockRange(l);if(!a)return!1;const u=jh({predicate:c=>nb(c.type),selection:o.selection});if(u&&a.depth-u.depth<=1&&a.startIndex===0){if(u.node.type===e)return CN(t)(n);if(nb(u.node.type))return e.validContent(u.node.content)?(r==null||r(o.setNodeMarkup(u.pos,e)),!0):Dce(o,u,e,t)?(r==null||r(o.scrollIntoView()),!0):!1}return _ce(e)(i,r)}}function EN(e,t=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,s;const l=nF(e,o.schema),{$from:a,$to:u}=n.selection;if(Kh(n.selection)&&n.selection.node.isBlock||a.depth<2||!a.sameParent(u))return!1;const c=a.node(-1);if(c.type!==l)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){const g=a.index(-1)>0;let m=Q.empty;for(let b=a.depth-(g?1:2);b>=a.depth-3;b--)m=Q.from(a.node(b).copy(m));const v=((i=l.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;m=m.append(Q.from(l.createAndFill(null,v)||void 0));const y=a.indexAfter(-1)!t.includes(g))),h=u.pos===a.end()?c.contentMatchAt(0).defaultType:null,f={...a.node().attrs};n.delete(a.pos,u.pos);const p=h?[{type:l,attrs:d},{type:h,attrs:f}]:[{type:l,attrs:d}];return yc(n.doc,a.pos,2)?(r&&r(n.split(a.pos,2,p).scrollIntoView()),!0):!1}}function Dce(e,t,n,r){const o=t.node,i=e.doc.resolve(t.start),s=i.node(-1),l=i.index(-1);if(!s||!s.canReplace(l,l+1,Q.from(n.create())))return!1;const a=[];for(let f=0;fm;g--)p-=o.child(g).nodeSize,r.delete(p-1,p+1);const s=r.doc.resolve(n.start),l=s.nodeAfter;if(!l||r.mapping.slice(i).map(n.end)!==n.start+l.nodeSize)return!1;const a=n.startIndex===0,u=n.endIndex===o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,l.content.append(u?Q.empty:Q.from(o))))return!1;const h=s.pos,f=h+l.nodeSize;return r.step(new qt(h-(a?1:0),f+(u?1:0),h+1,f-1,new ae((a?Q.empty:Q.from(o.copy(Q.empty))).append(u?Q.empty:Q.from(o.copy(Q.empty))),a?0:1,u?0:1),a?0:1)),t(r.scrollIntoView()),!0}function SN(e,t){const n=t||e.selection.$from;let r=[],o,i,s,l;for(let u=n.depth;u>=0;u--){if(i=n.node(u),o=n.index(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Qs(s)){const c=n.before(u+1);r.push(c)}if(o=n.indexAfter(u),s=i.maybeChild(o-1),l=i.maybeChild(o),s&&l&&s.type.name===l.type.name&&Qs(s)){const c=n.after(u+1);r.push(c)}}r=[...new Set(r)].sort((u,c)=>c-u);let a=!1;for(const u of r)Uh(e.doc,u)&&(e.join(u),a=!0);return a}function CN(e){return t=>{const{dispatch:n,tr:r}=t,o=$b(r,t.state),i=Fce(e,r.selection);return i?(n&&zce(o,n,i),!0):!1}}function Fce(e,t){const{$from:n,$to:r}=t;return n.blockRange(r,i=>{var s;return((s=i.firstChild)==null?void 0:s.type)===e})}function Vg(e){const{$from:t,$to:n}=e;return t.blockRange(n,Qs)}function Bce(e){const t=e.selection.$from,n=t.blockRange();if(!n||!Hs(n.parent)||n.startIndex!==0)return!1;const r=t.node(n.depth-2),o=t.index(n.depth),i=t.index(n.depth-1),s=t.index(n.depth-2),l=r.maybeChild(s-1),a=l==null?void 0:l.lastChild;if(o!==0||i!==0)return!1;if(l&&Qs(l)&&a&&Hs(a))return ou({listType:l.type,itemType:a.type,tr:e});if(Hs(r)){const u=r,c=t.node(n.depth-3);if(Qs(c))return ou({listType:c.type,itemType:u.type,tr:e})}return!1}function d_({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Hs(n.parent)||n.startIndex!==0)return!1}{const t=e.state.tr;Bce(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Hs(n.parent)||n.startIndex!==0)return!1;const r=t.index(n.depth),o=t.index(n.depth-1),i=t.index(n.depth-2),s=n.depth-2>=1&&Hs(t.node(n.depth-2));r===0&&o===0&&i<=1&&s&&Mce(n.parent.type)(e.state,e.dispatch)}return rM(e.state,e.dispatch,e),!0}function TN({node:e,mark:t,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(Xs.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),s=document.createElement("li");s.classList.add(Xs.LIST_ITEM_WITH_CUSTOM_MARKER),s.append(o),s.append(i);const l=a=>a.type!==e.type?!1:(e=a,n(e,s),r(e,t),!0);return l(e),{dom:s,contentDOM:i,update:l}}function Hce(e,t){const n=e.node(t.depth-1),r=e.node(t.depth-2);return!Hs(n)||!Qs(r)?!1:{parentItem:n,parentList:r}}function Uce(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return ojce(e)?(t==null||t(e.scrollIntoView()),!0):!1;function Kce(e,t,n){let r,o,i,s;const l=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),o=e,s=l.resolve(n.start).start(n.depth),i=s+1;for(let a=0;a=1){const u=t.node(n.depth-1),c=t.start(n.depth-1);if(o=u.child(a-1),!Qs(o))return!1;s=c+1;for(let d=0;d=n.depth+2?t.end(n.depth+2):n.end-1,l=n.end;return s+1>=l?(r=e.slice(i,l),o=null):(r=e.slice(i,s),o=e.slice(s+1,l-1)),{selectedSlice:r,unselectedSlice:o}}function Xce(e){const{$from:t,$to:n}=e.selection,r=Vg(e.selection);if(!r)return!1;const o=e.doc.resolve(r.start).node();if(!Qs(o))return!1;const i=Kce(o,t,r);if(!i)return!1;const{previousItem:s,previousList:l,previousItemStart:a}=i,{selectedSlice:u,unselectedSlice:c}=Yce(e.doc,n,r),d=s.content.append(Q.fromArray([o.copy(u.content)])).append(c?c.content:Q.empty);e.deleteRange(r.start,r.end);const h=a+s.nodeSize-2,f=s.copy(d);return f.check(),e.replaceRangeWith(a-1,h+1,f),e.setSelection(l===o?Ie.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):Ie.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var qce=({tr:e,dispatch:t})=>Xce(e)?(t==null||t(e.scrollIntoView()),!0):!1,AN=class extends gt{get name(){return"listItemShared"}createKeymap(){const e={Tab:qce,"Shift-Tab":Gce,Backspace:d_,"Mod-Backspace":d_};if(br.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr;return SN(r)?r:null}}}},fl=class extends zn{get name(){return"listItem"}createTags(){return[Ee.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:st.Lowest},...t.parseDOM??[]],toDOM:n=>["li",e.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{const r=document.createElement("div");return r.classList.add(Xs.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=Le.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),TN({mark:r,node:e,updateDOM:Zce,updateMark:Qce})}:{}}createKeymap(){return{Enter:EN(this.type)}}createExtensions(){return[new AN]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>{if(!Kh(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return e=m0(e)?e:!o.attrs.closed,r==null||r(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return CN(e??this.type)}};To([le()],fl.prototype,"toggleListItemClosed",1);To([le()],fl.prototype,"liftListItemOutOfList",1);fl=To([De({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],fl);function Zce(e,t){e.attrs.closed?t.classList.add(Xs.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(Xs.COLLAPSIBLE_LIST_ITEM_CLOSED)}function Qce(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var _h=class extends zn{get name(){return"bulletList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["ul",e.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),s=t.state.doc.resolve(i+1),l=s.node(s.depth-1);if(!(((r=l==null?void 0:l.type)==null?void 0:r.name)!=="listItem")){const c=document.createElement("div");c.contentEditable="false",c.classList.add(Xs.LIST_SPINE),c.addEventListener("click",d=>{const h=n(),f=t.state.doc.resolve(h+1),p=f.start(f.depth-1),g=Le.create(t.state.doc,p-1);t.dispatch(t.state.tr.setSelection(g)),this.store.commands.toggleListItemClosed(),d.preventDefault(),d.stopPropagation()}),o.append(c)}const u=document.createElement("ul");return u.classList.add(Xs.UL_LIST_CONTENT),o.append(u),{dom:o,contentDOM:u}}:{}}createExtensions(){return[new fl({priority:st.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Kx(this.type,It(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[dm(e,this.type),new bl(e,(t,n,r,o)=>{const i=t.tr;return i.deleteRange(r,o),ou({listType:this.type,itemType:It(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};To([le({icon:"listUnordered",label:({t:e})=>e(Sb.BULLET_LIST_LABEL)})],_h.prototype,"toggleBulletList",1);To([nn({shortcut:oe.BulletList,command:"toggleBulletList"})],_h.prototype,"listShortcut",1);_h=To([De({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],_h);var Rh=class extends zn{get name(){return"orderedList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>zt(n)?{...e.parse(n),order:+(n.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:n=>{const r=e.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new fl({priority:st.Low})]}toggleOrderedList(){return Kx(this.type,It(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[dm(e,this.type,t=>({order:+It(t,1)}),(t,n)=>n.childCount+n.attrs.order===+It(t,1)),new bl(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!ou({listType:this.type,itemType:It(this.store.schema.nodes,"listItem"),tr:i}))return null;const l=+It(n,1);if(l!==1){const a=gi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{order:l})}return i})]}};To([le({icon:"listOrdered",label:({t:e})=>e(Sb.ORDERED_LIST_LABEL)})],Rh.prototype,"toggleOrderedList",1);To([nn({shortcut:oe.OrderedList,command:"toggleOrderedList"})],Rh.prototype,"listShortcut",1);Rh=To([De({})],Rh);var _N=class extends zn{get name(){return"taskListItem"}createTags(){return[Ee.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:n=>{let r=!1;return zt(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...e.parse(n)}},priority:st.Medium},...t.parseDOM??[]],toDOM:n=>["li",{...e.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(Xs.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{t.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=e.attrs.checked,TN({node:e,mark:r,updateDOM:Jce,updateMark:eue})}}createKeymap(){return{Enter:EN(this.type)}}createExtensions(){return[new AN]}toggleCheckboxChecked(e){let t,n;return typeof e=="boolean"?t=e:e&&(t=e.checked,n=e.$pos),({tr:r,dispatch:o})=>{const i=gi({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:s,pos:l}=i,a={...s.attrs,checked:t??!s.attrs.checked};return o==null||o(r.setNodeMarkup(l,void 0,a)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[dm(e,this.type,t=>({checked:["x","X"].includes(xc(t,2))})),new bl(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!ou({listType:It(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const l=["x","X"].includes(xc(n,2));if(l){const a=gi({selection:i.selection,types:this.type});a&&i.setNodeMarkup(a.pos,void 0,{checked:l})}return i})]}};To([le()],_N.prototype,"toggleCheckboxChecked",1);function Jce(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function eue(e,t){t.checked=!!e.attrs.checked}var RN=class extends zn{get name(){return"taskList"}createTags(){return[Ee.Block,Ee.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:st.Medium},...t.parseDOM??[]],toDOM:n=>["ul",{...e.dom(n),"data-task-list":""},0]}}createExtensions(){return[new _N({})]}toggleTaskList(){return Kx(this.type,It(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};To([le({icon:"checkboxMultipleLine",label:({t:e})=>e(Sb.TASK_LIST_LABEL)})],RN.prototype,"toggleTaskList",1);To([nn({shortcut:oe.TaskList,command:"toggleTaskList"})],RN.prototype,"listShortcut",1);var Xo,tue=(e=document)=>Xo||(Xo=e.createElement("div"),Xo.setAttribute("id","a11y-status-message"),Xo.setAttribute("role","status"),Xo.setAttribute("aria-live","polite"),Xo.setAttribute("aria-relevant","additions text"),Object.assign(Xo.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(Xo),Xo);hR(500,()=>{tue().textContent=""});function h_(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function f_(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function n0(e,t){if(e.clientHeightt||i>e&&s=t&&l>=n?i-e-r:s>t&&ln?s-t+o:0}var nue=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,a=typeof s=="function"?s:function(Me){return Me!==s};if(!h_(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,h=[],f=e;h_(f)&&a(f);){if((f=(c=(u=f).parentElement)==null?u.getRootNode().host||null:c)===d){h.push(f);break}f!=null&&f===document.body&&n0(f)&&!n0(document.documentElement)||f!=null&&n0(f,l)&&h.push(f)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),b=y.height,w=y.width,k=y.top,x=y.right,S=y.bottom,T=y.left,C=o==="start"||o==="nearest"?k:o==="end"?S:k+b/2,I=i==="center"?T+w/2:i==="end"?x:T,_=[],R=0;R=0&&T>=0&&S<=g&&x<=p&&k>=N&&S<=$&&T>=D&&x<=L)return _;var F=getComputedStyle(A),U=parseInt(F.borderLeftWidth,10),W=parseInt(F.borderTopWidth,10),B=parseInt(F.borderRightWidth,10),H=parseInt(F.borderBottomWidth,10),j=0,Y=0,X="offsetWidth"in A?A.offsetWidth-A.clientWidth-U-B:0,Z="offsetHeight"in A?A.offsetHeight-A.clientHeight-W-H:0,te="offsetWidth"in A?A.offsetWidth===0?0:O/A.offsetWidth:0,ue="offsetHeight"in A?A.offsetHeight===0?0:M/A.offsetHeight:0;if(d===A)j=o==="start"?C:o==="end"?C-g:o==="nearest"?ep(v,v+g,g,W,H,v+C,v+C+b,b):C-g/2,Y=i==="start"?I:i==="center"?I-p/2:i==="end"?I-p:ep(m,m+p,p,U,B,m+I,m+I+w,w),j=Math.max(0,j+v),Y=Math.max(0,Y+m);else{j=o==="start"?C-N-W:o==="end"?C-$+H+Z:o==="nearest"?ep(N,$,M,W,H+Z,C,C+b,b):C-(N+M/2)+Z/2,Y=i==="start"?I-D-U:i==="center"?I-(D+O/2)+X/2:i==="end"?I-L+B+X:ep(D,L,O,U,B+X,I,I+w,w);var Ne=A.scrollLeft,ye=A.scrollTop;C+=ye-(j=Math.max(0,Math.min(ye+j/ue,A.scrollHeight-M/ue+Z))),I+=Ne-(Y=Math.max(0,Math.min(Ne+Y/te,A.scrollWidth-O/te+X)))}_.push({el:A,top:j,left:Y})}return _};typeof or=="object"&&or.__esModule&&or.default&&or.default;cm(nue);var rue=typeof document<"u"?P.useLayoutEffect:P.useEffect;function oue(e){const t=P.useRef();return rue(()=>{t.current=e}),t.current}function iue(e,t){const[n,r]=P.useState([]),[o,i]=P.useState(()=>j0(e)),[s,l]=P.useState([]),a=P.useRef(e),u=oue(o);return a.current=e,rf(Uc,({addCustomHandler:c})=>{const d=j0(a.current),h=c("positioner",d);return i(d),h},t),P.useLayoutEffect(()=>{const c=o.addListener("update",h=>{const f=[];for(const{id:p,data:g,setElement:m}of h){const v=y=>{y&&m(y)};f.push({id:p,data:g,ref:v})}l(f)}),d=o.addListener("done",h=>{r(h)});return u!=null&&u.recentUpdate&&o.onActiveChanged(u==null?void 0:u.recentUpdate),()=>{c(),d()}},[o,u]),P.useMemo(()=>{const c=[];for(const[d,{ref:h,data:f,id:p}]of s.entries()){const g=n[d],{element:m,position:v={}}=g??{},y={..._m,...gR(v)};c.push({ref:h,element:m,data:f,key:p,...y})}return c},[s,n])}function MN(e,t){const n=t==null||m0(t)?[e]:t,r=m0(t)?t:!0,o=P.useRef(Ic()),s=iue(e,n)[0];return P.useMemo(()=>s&&r?{...s,active:!0}:{..._m,ref:void 0,data:{},active:!1,key:o.current},[r,s])}function r0(e,t){return tt(e)?e(t):e}function sue(e){return ke(e[0])}function aue(e,t){var n;return ke(e)?e:Bt(e)?sue(e)?e[0]??"":((n=e.find(r=>mR(r.attrs,t))??e[0])==null?void 0:n.shortcut)??"":e.shortcut}var lue={title:e=>yD(e),upper:e=>e.toLocaleUpperCase(),lower:e=>e.toLocaleLowerCase()};function cue(e,t){const{casing:n="title",namedAsSymbol:r=!1,modifierAsSymbol:o=!0,separator:i=" ",t:s}=t,l=NF(e),a=[],u=lue[n];for(const c of l){if(c.type==="char"){a.push(u(c.key));continue}if(c.type==="named"){const h=r===!0||Bt(r)&&ar(r,c.key)?c.symbol??s(c.i18n):s(c.i18n);a.push(u(h));continue}const d=o===!0||Bt(o)&&ar(o,c.key)?c.symbol:s(c.i18n);a.push(u(d))}return a.join(i)}var ON=({commandName:e,active:t,enabled:n,attrs:r})=>{const{t:o}=yQ(),{getCommandOptions:i}=of(),s=i(e),{description:l,label:a,icon:u,shortcut:c}=s||{},d=P.useMemo(()=>({active:t,attrs:r,enabled:n,t:o}),[t,r,n,o]),h=P.useMemo(()=>{if(c)return cue(aue(c,r??{}),{t:o,separator:""})},[c,r,o]);return P.useMemo(()=>({description:r0(l,d),label:r0(a,d),icon:r0(u,d),shortcut:h}),[d,l,a,u,h])},uue={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IN=P.createContext(uue);IN.Provider;function LN(e){return e.map((t,n)=>P.createElement(t.tag,{key:n,...t.attr},LN(t.child??[])))}var Rv=e=>{const{name:t}=e;return ee.createElement(due,{...e},LN(Ace[t]))},due=e=>{const t=n=>{const r=e.size??n.size??"1em";let o;n.className&&(o=n.className),e.className&&(o=(o?`${o} `:"")+e.className);const{title:i,...s}=e;return ee.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",...n.attr,...s,className:o,style:{color:e.color??n.color,...n.style,...e.style},height:r,width:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},i&&ee.createElement("title",null,i),e.children)};return ee.createElement(IN.Consumer,null,t)},hue=e=>ta(e)?!!e.name:!1,fue=({icon:e})=>ke(e)?ee.createElement(Rv,{name:e,size:"1rem"}):e,pue=({icon:e,children:t})=>{if(!hue(e))return ee.createElement(ee.Fragment,null,t);const{sub:n,sup:r}=e,o=n??r,i=n!==void 0;return o===void 0?ee.createElement(ee.Fragment,null,t):ee.createElement(pie,{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)},Rt=({commandName:e,active:t=!1,enabled:n,attrs:r,onSelect:o,onChange:i,icon:s,displayShortcut:l=!0,"aria-label":a,label:u,...c})=>{const d=P.useCallback((y,b)=>{o(),i==null||i(y,b)},[o,i]),h=P.useCallback(y=>{y.preventDefault()},[]),f=ON({commandName:e,active:t,enabled:n,attrs:r});let p=null;f.icon&&(p=ke(f.icon)?f.icon:f.icon.name);const g=a??f.label??"",m=u??g,v=l&&f.shortcut?` (${f.shortcut})`:"";return ee.createElement(kN,{title:`${m}${v}`},ee.createElement(yN,{component:"span",sx:{"&:not(:first-of-type)":{marginLeft:"-1px"}}},ee.createElement(Hse,{"aria-label":g,selected:t,disabled:!n,onMouseDown:h,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}},...c,value:e,onChange:d},ee.createElement(pue,{icon:f.icon},ee.createElement(fue,{icon:s??p})))))},gue=({icon:e})=>ke(e)?ee.createElement(Rv,{name:e,size:"1rem"}):e,NN=({label:e,"aria-label":t,icon:n,children:r,onClose:o,...i})=>{const s=P.useRef(Ic()),[l,a]=P.useState(null),u=!!l,c=P.useCallback(f=>{f.preventDefault()},[]),d=P.useCallback(f=>{a(f.currentTarget)},[]),h=P.useCallback((f,p)=>{a(null),o==null||o(f,p)},[o]);return ee.createElement(ee.Fragment,null,ee.createElement(kN,{title:e??t},ee.createElement(tre,{"aria-label":t,"aria-controls":u?s.current:void 0,"aria-haspopup":!0,"aria-expanded":u?"true":void 0,onMouseDown:c,onClick:d,size:"small",sx:f=>({border:`1px solid ${f.palette.divider}`,borderRadius:`${f.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}})},n&&ee.createElement(gue,{icon:n}),ee.createElement(Rv,{name:"arrowDownSFill",size:"1rem"}))),ee.createElement(vse,{...i,id:s.current,anchorEl:l,open:u,onClose:h},r))},mue=e=>{const{insertHorizontalRule:t}=hn();hx();const n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=t.enabled();return ee.createElement(Rt,{...e,commandName:"insertHorizontalRule",enabled:r,onSelect:n})},vue=e=>{const{redo:t}=hn(),{redoDepth:n}=of(!0),r=P.useCallback(()=>{t.enabled()&&t()},[t]),o=n()>0;return ee.createElement(Rt,{...e,commandName:"redo",active:!1,enabled:o,onSelect:r})},yue=e=>{const{toggleBlockquote:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().blockquote(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleBlockquote",active:r,enabled:o,onSelect:n})},Yx=e=>{const{toggleBold:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().bold(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleBold",active:r,enabled:o,onSelect:n})},bue=e=>{const{toggleBulletList:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().bulletList(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleBulletList",active:r,enabled:o,onSelect:n})},wue=({attrs:e={},...t})=>{const{toggleCodeBlock:n}=hn(),r=P.useCallback(()=>{n.enabled(e)&&n(e)},[n,e]),o=fr().codeBlock(),i=n.enabled(e);return ee.createElement(Rt,{...t,commandName:"toggleCodeBlock",active:o,enabled:i,attrs:e,onSelect:r})},Xx=e=>{const{toggleCode:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().code(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleCode",active:r,enabled:o,onSelect:n})},o0=({attrs:e,...t})=>{const{toggleHeading:n}=hn(),r=P.useCallback(()=>{n.enabled(e)&&n(e)},[n,e]),o=fr().heading(e),i=n.enabled(e);return ee.createElement(Rt,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:r})},qx=e=>{const{toggleItalic:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().italic(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleItalic",active:r,enabled:o,onSelect:n})},xue=e=>{const{toggleOrderedList:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().orderedList(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleOrderedList",active:r,enabled:o,onSelect:n})},kue=e=>{const{toggleStrike:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().strike(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleStrike",active:r,enabled:o,onSelect:n})},Zx=e=>{const{toggleUnderline:t}=hn(),n=P.useCallback(()=>{t.enabled()&&t()},[t]),r=fr().underline(),o=t.enabled();return ee.createElement(Rt,{...e,commandName:"toggleUnderline",active:r,enabled:o,onSelect:n})},Eue=e=>{const{undo:t}=hn(),{undoDepth:n}=of(!0),r=P.useCallback(()=>{t.enabled()&&t()},[t]),o=n()>0;return ee.createElement(Rt,{...e,commandName:"undo",active:!1,enabled:o,onSelect:r})},Br=e=>ee.createElement(yN,{sx:{display:"flex",alignItems:"center",width:"fit-content",bgcolor:"background.paper",color:"text.secondary"},...e}),Sue=({children:e})=>ee.createElement(Br,null,ee.createElement(Yx,null),ee.createElement(qx,null),ee.createElement(Zx,null),ee.createElement(kue,null),ee.createElement(Xx,null),e),Cue=({icon:e})=>e?ee.createElement(Uie,null,ke(e)?ee.createElement(Rv,{name:e,size:"1rem"}):ee.createElement(ee.Fragment,null,e)):null,Qx=({commandName:e,active:t=!1,enabled:n,attrs:r,onSelect:o,onClick:i,icon:s,displayShortcut:l=!0,label:a,description:u,displayDescription:c=!0,...d})=>{const h=P.useCallback(y=>{o(),i==null||i(y)},[o,i]),f=P.useCallback(y=>{y.preventDefault()},[]),p=ON({commandName:e,active:t,enabled:n,attrs:r});let g=null;p.icon&&(g=ke(p.icon)?p.icon:p.icon.name);const m=a??p.label??"",v=c&&(u??p.description);return ee.createElement(Cse,{selected:t,disabled:!n,onMouseDown:f,...d,onClick:h},s!==null&&ee.createElement(Cue,{icon:s??g}),ee.createElement(Xie,{primary:m,secondary:v}),l&&p.shortcut&&ee.createElement(xd,{variant:"body2",color:"text.secondary",sx:{ml:2}},p.shortcut))},tp=({attrs:e,...t})=>{const{toggleHeading:n}=hn(),r=P.useCallback(()=>{n.enabled(e)&&n(e)},[n,e]),o=fr().heading(e),i=n.enabled(e);return ee.createElement(Qx,{...t,commandName:"toggleHeading",active:o,enabled:i,attrs:e,onSelect:r})},Tue={level:1},Aue={level:2},p_={level:3},_ue={level:4},Rue={level:5},Mue={level:6},Oue=({showAll:e=!1,children:t})=>ee.createElement(Br,null,ee.createElement(o0,{attrs:Tue}),ee.createElement(o0,{attrs:Aue}),e?ee.createElement(NN,{"aria-label":"More heading options"},ee.createElement(tp,{attrs:p_}),ee.createElement(tp,{attrs:_ue}),ee.createElement(tp,{attrs:Rue}),ee.createElement(tp,{attrs:Mue})):ee.createElement(o0,{attrs:p_}),t),Iue=({children:e})=>ee.createElement(Br,null,ee.createElement(Eue,null),ee.createElement(vue,null),e);typeof or=="object"&&or.__esModule&&or.default&&or.default;var Lue=e=>{const t=of().getPositionerWidget();return nf.createPortal(ee.createElement(ee.Fragment,null,e.children),t)},$N=P.createContext({});function Nue(e={}){const t=P.useContext($N),n=P.useMemo(()=>bR(t,e.theme??{}),[t,e.theme]),r=P.useMemo(()=>fV(n).styles,[n]),o=Bc(hV,e.className);return P.useMemo(()=>({style:r,className:o,theme:n}),[r,o,n])}var $ue=e=>{var t,n,r,o,i,s,l,a;const{children:u,as:c="div"}=e,{theme:d,style:h,className:f}=Nue({theme:e.theme??ba}),p=Lx({palette:{primary:{main:((t=d.color)==null?void 0:t.primary)??ba.color.primary,dark:((r=(n=d.color)==null?void 0:n.hover)==null?void 0:r.primary)??ba.color.hover.primary,contrastText:((o=d.color)==null?void 0:o.primaryText)??ba.color.primaryText},secondary:{main:((i=d.color)==null?void 0:i.secondary)??ba.color.secondary,dark:((l=(s=d.color)==null?void 0:s.hover)==null?void 0:l.secondary)??ba.color.hover.secondary,contrastText:((a=d.color)==null?void 0:a.secondaryText)??ba.color.secondaryText}}});return ee.createElement(pne,{theme:p},ee.createElement($N.Provider,{value:d},ee.createElement(c,{style:h,className:f},u)))},DN=e=>ee.createElement(Tie,{direction:"row",spacing:1,sx:{backgroundColor:"background.paper",overflowX:"auto"},...e}),Due=[{name:"offset",options:{offset:[0,8]}}],Pue=({positioner:e="selection",children:t,...n})=>{const{ref:r,x:o,y:i,width:s,height:l,active:a}=MN(()=>j0(e),[e]),[u,c]=P.useState(null),d=P.useMemo(()=>({position:"absolute",pointerEvents:"none",left:o,top:i,width:s,height:l}),[o,i,s,l]),h=P.useCallback(f=>{c(f),r==null||r(f)},[r]);return ee.createElement(ee.Fragment,null,ee.createElement("div",{ref:h,style:d}),ee.createElement(Gx,{placement:"top",modifiers:Due,...n,open:a,anchorEl:u},ee.createElement(DN,null,t?ee.createElement(ee.Fragment,null,t):ee.createElement(Sue,null))))},zue=({languages:e=[],className:t="",offset:n={x:0,y:0},onLanguageChange:r,onPointerDownSelect:o,onSelectChange:i})=>{var s;const l=MN(Bue,[]),{getExtension:a,getState:u}=So(),{focus:c,updateCodeBlock:d}=hn(),h=a(yo).options,[f]=P.useState(()=>{const w=new Map;return h.supportedLanguages.forEach(k=>{k.aliases.forEach(x=>!e.some(S=>S.displayName===x)&&w.set(x,k.displayName))}),w}),[p]=P.useState([...e,{displayName:h.defaultLanguage},...h.supportedLanguages]),{selection:g}=u(),[m,v]=P.useState("auto"),y=(s=gi({selection:g,types:"codeBlock"}))==null?void 0:s.node.attrs.language,b=P.useMemo(()=>{const w=f.get(y);return w||(h.supportedLanguages.some(k=>y===k.displayName)?y:h.defaultLanguage)},[f,h.defaultLanguage,h.supportedLanguages,y]);return P.useEffect(()=>{var w;const k=l.element;if(r!=null&&r(b,k,v))return;if((S=>S&&S.nodeName==="SELECT"||!1)(k)){const S=(w=k.options[k.selectedIndex])==null?void 0:w.dataset.width;v(S?`${S}px`:"auto")}},[l.element,b,r]),ee.createElement(Lue,null,ee.createElement("select",{ref:l.ref,className:t,onBlur:()=>c(),onChange:w=>{var k;i!=null&&i(w,v)||(v(`${(k=w.target.options[w.target.selectedIndex])==null?void 0:k.dataset.width}px`),d({language:w.target.dataset.value||w.target.value}))},onPointerDown:o,style:{"--w":m,"--x":`${l.x+n.x}px`,"--y":`${l.y+n.y}px`,display:y?"block":"none"},value:b},y?Fue(p):null))},Fue=QH(e=>vb(e.map(({displayName:n,value:r})=>({displayName:n,value:r||n})),"displayName").sort((n,r)=>n.displayName>r.displayName?1:n.displayName{const r=document.createElement("select"),o=document.createElement("option");let i="0px";return r.append(o),document.body.append(r),o.textContent=n.displayName,i=String(r.getBoundingClientRect().width),r.remove(),{...n,width:i}}).map(({displayName:n,value:r,width:o})=>ee.createElement("option",{key:n,"data-value":r,"data-width":o,value:n},n)));function Bue(){return Kr.create({getActive(e){const{selection:t}=e.state,n=gi({selection:t,types:"codeBlock"});return n?[{codeBlockResult:n}]:Kr.EMPTY},getPosition(e){const{data:t,view:n}=e,{pos:r}=t.codeBlockResult,o=n.nodeDOM(r);if(!o||!zt(o))return _m;const i=o.getBoundingClientRect(),s=n.dom.getBoundingClientRect(),l=n.dom.scrollLeft+i.left-s.left,a=n.dom.scrollTop+i.top-s.top,u=mw(i,n.dom);return{height:0,rect:i,visible:u,width:0,x:l,y:a}},hasChanged:gw})}var rn=cm(Dg),Jx=Zt` /** * Styles extracted from: packages/remirror__theme/src/components-theme.ts */ @@ -778,8 +778,8 @@ Error generating stack: `+i.message+` .remirror-color-picker-cell-selected { } `;rn.div` - ${Yx} -`;var Xx=Zt` + ${Jx} +`;var ek=Zt` /** * Styles extracted from: packages/remirror__theme/src/core-theme.ts */ @@ -845,8 +845,8 @@ Error generating stack: `+i.message+` pointer-events: none; } `;rn.div` - ${Xx} -`;var qx=Zt` + ${ek} +`;var tk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-blockquote-theme.ts */ @@ -861,8 +861,8 @@ Error generating stack: `+i.message+` color: #888; } `;rn.div` - ${qx} -`;var Zx=Zt` + ${tk} +`;var nk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-callout-theme.ts */ @@ -898,8 +898,8 @@ Error generating stack: `+i.message+` background: #f8f8f8; } `;rn.div` - ${Zx} -`;var Qx=Zt` + ${nk} +`;var rk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-code-block-theme.ts */ @@ -3696,8 +3696,8 @@ Error generating stack: `+i.message+` bottom: 0.4em; } `;rn.div` - ${Qx} -`;var Jx=Zt` + ${rk} +`;var ok=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-count-theme.ts */ @@ -3705,8 +3705,8 @@ Error generating stack: `+i.message+` background-color: var(--rmr-hue-red-4); } `;rn.div` - ${Jx} -`;var ek=Zt` + ${ok} +`;var ik=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-emoji-theme.ts */ @@ -3764,8 +3764,8 @@ Error generating stack: `+i.message+` padding-right: 5px; } `;rn.div` - ${ek} -`;var tk=Zt` + ${ik} +`;var sk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-file-theme.ts */ @@ -3817,8 +3817,8 @@ Error generating stack: `+i.message+` color: #000; } `;rn.div` - ${tk} -`;var nk=Zt` + ${sk} +`;var ak=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-gap-cursor-theme.ts */ @@ -3846,8 +3846,8 @@ Error generating stack: `+i.message+` display: block; } `;rn.div` - ${nk} -`;var rk=Zt` + ${ak} +`;var lk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-image-theme.ts */ @@ -3869,8 +3869,8 @@ Error generating stack: `+i.message+` } } `;rn.div` - ${rk} -`;var ok=Zt` + ${lk} +`;var ck=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-list-theme.ts */ @@ -3965,8 +3965,8 @@ Error generating stack: `+i.message+` border-left-color: var(--rmr-color-primary); } `;rn.div` - ${ok} -`;var ik=Zt` + ${ck} +`;var uk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-mention-atom-theme.ts */ @@ -4031,16 +4031,16 @@ Error generating stack: `+i.message+` padding-right: 5px; } `;rn.div` - ${ik} -`;var sk=Zt` + ${uk} +`;var dk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-node-formatting-theme.ts */ .remirror-editor.ProseMirror { } `;rn.div` - ${sk} -`;var ak=Zt` + ${dk} +`;var hk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-placeholder-theme.ts */ @@ -4053,8 +4053,8 @@ Error generating stack: `+i.message+` content: attr(data-placeholder); } `;rn.div` - ${ak} -`;var lk=Zt` + ${hk} +`;var fk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-positioner-theme.ts */ @@ -4081,8 +4081,8 @@ Error generating stack: `+i.message+` position: absolute; } `;rn.div` - ${lk} -`;var ck=Zt` + ${fk} +`;var pk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-tables-theme.ts */ @@ -4449,8 +4449,8 @@ Error generating stack: `+i.message+` background-color: var(--rmr-color-table-predelete-controller) !important; } `;rn.div` - ${ck} -`;var uk=Zt` + ${pk} +`;var gk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-whitespace-theme.ts */ @@ -4480,8 +4480,8 @@ Error generating stack: `+i.message+` content: '¶'; } `;rn.div` - ${uk} -`;var dk=Zt` + ${gk} +`;var mk=Zt` /** * Styles extracted from: packages/remirror__theme/src/extension-yjs-theme.ts */ @@ -4525,8 +4525,8 @@ Error generating stack: `+i.message+` display: inline-block; } `;rn.div` - ${dk} -`;var hk=Zt` + ${mk} +`;var vk=Zt` /** * Styles extracted from: packages/remirror__theme/src/theme.ts */ @@ -4828,13 +4828,8 @@ Error generating stack: `+i.message+` /* margin-bottom: var(--rmr-space-2); */ } `;rn.div` - ${hk} + ${vk} `;Zt` - ${Yx} - ${Xx} - ${qx} - ${Zx} - ${Qx} ${Jx} ${ek} ${tk} @@ -4849,12 +4844,12 @@ Error generating stack: `+i.message+` ${uk} ${dk} ${hk} -`;var Iue=rn.div` - ${Yx} - ${Xx} - ${qx} - ${Zx} - ${Qx} + ${fk} + ${pk} + ${gk} + ${mk} + ${vk} +`;var Hue=rn.div` ${Jx} ${ek} ${tk} @@ -4869,56 +4864,61 @@ Error generating stack: `+i.message+` ${uk} ${dk} ${hk} -`,Lue=Object.defineProperty,Nue=Object.getOwnPropertyDescriptor,RN=(t,e,n,r)=>{for(var o=r>1?void 0:r?Nue(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Lue(e,n,o),o},fk=class extends Pn{get name(){return"blockquote"}createTags(){return[Ee.Block,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"block+",defining:!0,draggable:!1,...e,attrs:t.defaults(),parseDOM:[{tag:"blockquote",getAttrs:t.parse,priority:100},...e.parseDOM??[]],toDOM:n=>["blockquote",t.dom(n),0]}}toggleBlockquote(){return W2(this.type)}shortcut(t){return this.toggleBlockquote()(t)}createInputRules(){return[am(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};RN([de({icon:"doubleQuotesL",description:({t})=>t(bS.DESCRIPTION),label:({t})=>t(bS.LABEL)})],fk.prototype,"toggleBlockquote",1);RN([nn({shortcut:"Ctrl->",command:"toggleBlockquote"})],fk.prototype,"shortcut",1);var $ue=Object.defineProperty,Due=Object.getOwnPropertyDescriptor,sf=(t,e,n,r)=>{for(var o=r>1?void 0:r?Due(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&$ue(e,n,o),o},Pue={icon:"bold",label:({t})=>t(wS.LABEL),description:({t})=>t(wS.DESCRIPTION)},dl=class extends ea{get name(){return"bold"}createTags(){return[Ee.FormattingMark,Ee.FontStyle]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"strong",getAttrs:t.parse},{tag:"b",getAttrs:n=>zt(n)&&n.style.fontWeight!=="normal"?t.parse(n):!1},{style:"font-weight",getAttrs:n=>ke(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...e.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",t.dom(n),0]}}}createInputRules(){return[Kd({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(t){return Ws({type:this.type,selection:t})}setBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=po(t??e.selection,e.doc);return n==null||n(e.addMark(r,o,this.type.create())),!0}}removeBold(t){return({tr:e,dispatch:n})=>{const{from:r,to:o}=po(t??e.selection,e.doc);return e.doc.rangeHasMark(r,o,this.type)?(n==null||n(e.removeMark(r,o,this.type)),!0):!1}}shortcut(t){return this.toggleBold()(t)}};sf([de(Pue)],dl.prototype,"toggleBold",1);sf([de()],dl.prototype,"setBold",1);sf([de()],dl.prototype,"removeBold",1);sf([nn({shortcut:oe.Bold,command:"toggleBold"})],dl.prototype,"shortcut",1);dl=sf([Pe({defaultOptions:{weight:void 0},staticKeys:["weight"]})],dl);var zue=Object.defineProperty,Fue=Object.getOwnPropertyDescriptor,pk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Fue(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&zue(e,n,o),o},{DESCRIPTION:Bue,LABEL:Hue}=o5,Uue={icon:"codeLine",description:({t})=>t(Bue),label:({t})=>t(Hue)},Th=class extends ea{get name(){return"code"}createTags(){return[Ee.Code,Ee.ExcludeInputRules]}createMarkSpec(t,e){return{excludes:"_",...e,attrs:t.defaults(),parseDOM:[{tag:"code",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["code",{spellcheck:"false",...t.dom(n)},0]}}createKeymap(){return{"Mod-`":Ws({type:this.type})}}keyboardShortcut(t){return this.toggleCode()(t)}toggleCode(){return Ws({type:this.type})}createInputRules(){return[Kd({regexp:new RegExp(`(?:\`)([^\`${cb}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};pk([nn({shortcut:oe.Code,command:"toggleCode"})],Th.prototype,"keyboardShortcut",1);pk([de(Uue)],Th.prototype,"toggleCode",1);Th=pk([Pe({})],Th);var MN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},et=(t,e,n)=>(MN(t,e,"read from private field"),n?n.call(t):e.get(t)),ec=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},hs=(t,e,n,r)=>(MN(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Wue='',Vue='',jue=encodeURIComponent(Wue),Gue=encodeURIComponent(Vue),gr,Kue=class{constructor(t){ec(this,gr,void 0);const e=document.createElement("div"),n=document.createElement("div");this.dom=e,hs(this,gr,n),this.type=t,this.createHandle(t)}createHandle(t){switch(Wn(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Wn(et(this,gr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),et(this,gr).dataset.dragging="",t){case 0:Wn(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Wn(et(this,gr),{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:Wn(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Wn(et(this,gr),{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:Wn(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Wn(et(this,gr),{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:Wn(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Wn(et(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${Gue}") `});break;case 4:Wn(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Wn(et(this,gr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${jue}") `});break}this.dom.append(et(this,gr))}setHandleVisibility(t){const e=t||!!et(this,gr).dataset.dragging;et(this,gr).style.opacity=e?"1":"0"}dataSetDragging(t){et(this,gr).dataset.dragging=t?"true":""}};gr=new WeakMap;var Qf=50,ON=(t=>(t[t.Fixed=0]="Fixed",t[t.Flexible=1]="Flexible",t))(ON||{}),Ca,Ta,Aa,Ti,_a,Yue=class{constructor({node:t,view:e,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){ec(this,Ca,void 0),ec(this,Ta,void 0),ec(this,Aa,[]),ec(this,Ti,void 0),ec(this,_a,void 0);const s=this.createWrapper(t,i),l=this.createElement({node:t,view:e,getPos:n,options:o}),u=(r===1?[0,1,2,3,4]:[0,1]).map(h=>new Kue(h));for(const h of u){const f=p=>{this.startResizing(p,e,n,h)};h.dom.addEventListener("mousedown",f),et(this,Aa).push(()=>h.dom.removeEventListener("mousedown",f)),s.append(h.dom)}const c=()=>{u.forEach(h=>h.setHandleVisibility(!0))},d=()=>{u.forEach(h=>h.setHandleVisibility(!1))};s.addEventListener("mouseover",c),s.addEventListener("mouseout",d),et(this,Aa).push(()=>s.removeEventListener("mouseover",c),()=>s.removeEventListener("mouseout",d)),s.append(l),this.dom=s,hs(this,Ta,t),hs(this,Ca,l),this.aspectRatio=r}createWrapper(t,e){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",e?Wn(n,{width:d_(e.width),aspectRatio:`${e.width} / ${e.height}`}):Wn(n,{width:d_(t.attrs.width),aspectRatio:`${t.attrs.width} / ${t.attrs.height}`}),Wn(n,{maxWidth:"100%",minWidth:`${Qf}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(t,e,n,r){var o,i;t.preventDefault(),r.dataSetDragging(!0),et(this,Ca).style.pointerEvents="none";const s=t.pageX,l=t.pageY,a=((o=et(this,Ca))==null?void 0:o.getBoundingClientRect().width)||0,u=((i=et(this,Ca))==null?void 0:i.getBoundingClientRect().height)||0,c=d0(100,!1,h=>{const f=h.pageX,p=h.pageY,g=f-s,m=p-l;let v=null,y=null;if(this.aspectRatio===0&&a&&u)switch(r.type){case 0:case 3:v=a+g,y=u/a*v;break;case 1:case 4:v=a-g,y=u/a*v;break;case 2:y=u+m,v=a/u*y;break}else if(this.aspectRatio===1)switch(r.type){case 0:v=a+g;break;case 1:v=a-g;break;case 2:y=u+m;break;case 3:v=a+g,y=u+m;break;case 4:v=a-g,y=u+m;break}typeof v=="number"&&v{h.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),et(this,Ca).style.pointerEvents="auto",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d);const f=n(),p=e.state.tr.setNodeMarkup(f,void 0,{...et(this,Ta).attrs,width:et(this,Ti),height:et(this,_a)});e.dispatch(p)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d),et(this,Aa).push(()=>document.removeEventListener("mousemove",c)),et(this,Aa).push(()=>document.removeEventListener("mouseup",d))}update(t){return t.type!==et(this,Ta).type||this.aspectRatio===0&&t.attrs.width&&t.attrs.width!==et(this,Ti)||this.aspectRatio===1&&t.attrs.width&&t.attrs.height&&t.attrs.width!==et(this,Ti)&&t.attrs.height!==et(this,_a)||!Xue(et(this,Ta),t,["width","height"])?!1:(hs(this,Ta,t),hs(this,Ti,t.attrs.width),hs(this,_a,t.attrs.height),!0)}destroy(){et(this,Aa).forEach(t=>t())}};Ca=new WeakMap;Ta=new WeakMap;Aa=new WeakMap;Ti=new WeakMap;_a=new WeakMap;function Xue(t,e,n){return t===e||que(t,e,n)&&t.content.eq(e.content)}function que(t,e,n){const r=t.attrs,o=e.attrs,i={};for(const l of n)i[l]=null;t.attrs={...r,...i},e.attrs={...o,...i};const s=t.sameMarkup(e);return t.attrs=r,e.attrs=o,s}function d_(t){return typeof t=="number"?`${t}px`:t||void 0}var Zue=Object.defineProperty,Que=Object.getOwnPropertyDescriptor,IN=(t,e,n,r)=>{for(var o=r>1?void 0:r?Que(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Zue(e,n,o),o},Ug=class extends Pn{get name(){return"hardBreak"}createTags(){return[Ee.InlineNode]}createNodeSpec(t,e){return{inline:!0,selectable:!1,atom:!0,leafText:()=>` -`,...e,attrs:t.defaults(),parseDOM:[{tag:"br",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["br",t.dom(n)]}}createKeymap(){const t=Nz(Sd(Q2),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":t,"Shift-Enter":t}}insertHardBreak(){return t=>{const{tr:e,dispatch:n}=t;return n==null||n(e.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};IN([de()],Ug.prototype,"insertHardBreak",1);Ug=IN([Pe({defaultPriority:dt.Low})],Ug);var Jue=Object.defineProperty,ede=Object.getOwnPropertyDescriptor,LN=(t,e,n,r)=>{for(var o=r>1?void 0:r?ede(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Jue(e,n,o),o},{LABEL:tde}=s5,nde={icon:({attrs:t})=>`h${(t==null?void 0:t.level)??"1"}`,label:({t,attrs:e})=>t({...tde,values:{level:e==null?void 0:e.level}})},rde=[oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6],Wg=class extends Pn{get name(){return"heading"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...t.parse(r),level:n})})),...e.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,t.dom(n),0]:[`h${this.options.defaultLevel}`,t.dom(n),0]}}toggleHeading(t={}){return $b({type:this.type,toggleType:"paragraph",attrs:t})}createKeymap(t){const e=this.store.getExtension(We),n=be(),r=[];for(const o of this.options.levels){const i=rde[o-1]??oe.H1;n[i]=Gd(this.type,{level:o}),r.push({attrs:{level:o},shortcut:t(i)[0]})}return e.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(t=>M5(new RegExp(`^(#{1,${t}})\\s$`),this.type,()=>({level:t})))}createPasteRules(){return this.options.levels.map(t=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${t}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:t}),startOfTextBlock:!0}))}};LN([de(nde)],Wg.prototype,"toggleHeading",1);Wg=LN([Pe({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Wg);var ode=Object.defineProperty,ide=Object.getOwnPropertyDescriptor,NN=(t,e,n,r)=>{for(var o=r>1?void 0:r?ide(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ode(e,n,o),o},sde={icon:"separator",label:({t})=>t(xS.LABEL),description:({t})=>t(xS.DESCRIPTION)},Vg=class extends Pn{get name(){return"horizontalRule"}createTags(){return[Ee.Block]}createNodeSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"hr",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["hr",t.dom(n)]}}insertHorizontalRule(){return t=>{const{tr:e,dispatch:n}=t,r=e.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(e.selection.empty&&fm(o)&&e.insert(r.pos+1,o),e.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(e),n(e.scrollIntoView())),!0)}}createInputRules(){return[G2({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:t})=>{this.updateFromNodeSelection(t)}})]}updateFromNodeSelection(t){if(!Wh(t.selection)||t.selection.node.type.name!==this.name)return;const e=t.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];we(r,{code:re.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();t.insert(e,o),t.setSelection(Ie.near(t.doc.resolve(e+1)))}};NN([de(sde)],Vg.prototype,"insertHorizontalRule",1);Vg=NN([Pe({defaultOptions:{insertionNode:"paragraph"}})],Vg);var ade=Object.defineProperty,lde=Object.getOwnPropertyDescriptor,gk=(t,e,n,r)=>{for(var o=r>1?void 0:r?lde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ade(e,n,o),o},cde=class extends Yue{constructor(t,e,n){super({node:t,view:e,getPos:n,aspectRatio:ON.Fixed})}createElement({node:t}){const e=document.createElement("img");return e.setAttribute("src",t.attrs.src),Wn(e,{width:"100%",minWidth:"50px",objectFit:"contain"}),e}},Ah=class extends Pn{get name(){return"image"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(t,e){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...e,attrs:{...t.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:r=>{var o;if(zt(r)){const i=dde({element:r,parse:t.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...e.parseDOM??[]],toDOM:r=>{const o=gm(r.attrs,t);return["img",{...t.dom(r),...o}]}}}insertImage(t,e){return({tr:n,dispatch:r})=>{const{from:o,to:i}=po(e??n.selection,n.doc),s=this.type.create(t);return r==null||r(n.replaceRangeWith(o,i,s)),!0}}uploadImage(t,e){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let l=s.selection.from;return this.store.createPlaceholderCommand({promise:t,placeholder:{type:"widget",get pos(){return l},createElement:(a,u)=>{const c=o(a,u);return e==null||e(c),c},onUpdate:(a,u,c,d)=>{n(a,u,c,d)},onDestroy:(a,u)=>{r(a,u)}},onSuccess:(a,u,c)=>this.insertImage(a,u)(c)}).validate(({tr:a,dispatch:u})=>{const c=DR(a.doc,l,this.type);return c==null?!1:(l=c,a.selection.empty||u==null||u(a.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(t,e,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&pde(e)&&((r=e.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,a=t.map((c,d)=>({file:c,progress:h=>{s.updatePlaceholder(u[d],h)}})),u=i(a);Yr(n)&&l.selectText(n);for(const c of u)l.uploadImage(c);return l.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:t=>{const e=t.type==="drop"?t.pos:void 0;return this.fileUploadFileHandler(t.files,t.event,e)}}]}createNodeViews(){return this.options.enableResizing?(t,e,n)=>new cde(t,e,n):{}}};gk([de()],Ah.prototype,"insertImage",1);gk([de()],Ah.prototype,"uploadImage",1);Ah=gk([Pe({defaultOptions:{createPlaceholder:hde,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:fde,enableResizing:!1,preferPastedTextContent:!0}})],Ah);function ude(t){let{width:e,height:n}=t.style;return e=e||t.getAttribute("width")||"",n=n||t.getAttribute("height")||"",{width:e,height:n}}function dde({element:t,parse:e}){const{width:n,height:r}=ude(t);return{...e(t),alt:t.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:t.getAttribute("src")??null,title:t.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:t.getAttribute("data-file-name")??null}}function hde(t,e){const n=document.createElement("div");return n.classList.add(UW.IMAGE_LOADER),n}function fde(t){we(t.length>0,{code:re.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let e=0;const n=[];for(const{file:r,progress:o}of t)n.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",l=>{var a;e+=1,o(e/t.length),i({src:(a=l.target)==null?void 0:a.result,fileName:r.name})},{once:!0}),s.readAsDataURL(r)}));return n}function pde(t){return t.clipboardData!==void 0}var gde=Object.defineProperty,mde=Object.getOwnPropertyDescriptor,mk=(t,e,n,r)=>{for(var o=r>1?void 0:r?mde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&gde(e,n,o),o},vde={icon:"italic",label:({t})=>t(kS.LABEL),description:({t})=>t(kS.DESCRIPTION)},_h=class extends ea{get name(){return"italic"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"i",getAttrs:t.parse},{tag:"em",getAttrs:t.parse},{style:"font-style=italic"},...e.parseDOM??[]],toDOM:n=>["em",t.dom(n),0]}}createKeymap(){return{"Mod-i":Ws({type:this.type})}}createInputRules(){return[Kd({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:e+1}}),Kd({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:t,start:e})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:e+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(t){return Ws({type:this.type,selection:t})}shortcut(t){return this.toggleItalic()(t)}};mk([de(vde)],_h.prototype,"toggleItalic",1);mk([nn({shortcut:oe.Italic,command:"toggleItalic"})],_h.prototype,"shortcut",1);_h=mk([Pe({})],_h);var $N={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:ut,function(){return function(n){function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return n[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var o={};return r.m=n,r.c=o,r.d=function(i,s,l){r.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(u){typeof u!="string"&&i();for(var c=0,d=0,h=0,f=u.length,p=0;f--&&++p&&!(c&&-1h?"":u.slice(h,c)}var l=["/",":","?","#"],a=[".","/","@"];n.exports=function(u){if(typeof u=="string")return s(u);if(Array.isArray(u)){var c=[],d,h=0;for(d=u.length;h{for(var o=r>1?void 0:r?xde(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&wde(e,n,o),o},kde=["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"],h_="updateLink",Ede=/(?:(?:(?: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,hl=class extends ea{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[Ee.Link,Ee.ExcludeInputRules]}createMarkSpec(t,e){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,l=i?[...s,i]:s;return o&&sr(l,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...e,attrs:{...t.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!zt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,l=this.options.autoLink&&(o.hasAttribute(n)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...t.parse(o),href:i,auto:l,...r(o.getAttribute("target"))}}},...e.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...l}=gm(o.attrs,t),a=o.attrs.auto?{[n]:""}:{},u="noopener noreferrer nofollow";return["a",{...t.dom(o),...l,rel:u,...a,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:t}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${t.source}$`,t.flags.replace("g",""))}shortcut({tr:t}){let e="",{from:n,to:r,empty:o,$from:i}=t.selection,s=!1;const l=Hi(i,this.type);if(o){const a=l??z2(t);if(!a)return!1;({text:e,from:n,to:r}=a),s=!0}return n===r?!1:(s||(e=t.doc.textBetween(n,r)),this.options.onActivateLink(e),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:e,from:n,to:r}),!0)}updateLink(t,e){return n=>{const{tr:r}=n;return!(Js(r.selection)&&!Ob(r.selection)||Zz(r.selection)||Jp({trState:r,type:this.type}))&&!e?!1:(r.setMeta(this.name,{command:h_,attrs:t,range:e}),yF({type:this.type,attrs:t,range:e})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(t){return e=>{const{tr:n}=e;return Jp({trState:n,type:this.type,...t})?j2({type:this.type,expand:!0,range:t})(e):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(t,e)=>({href:this.buildHref(yc(t)),auto:!e}),transformMatch:t=>{const e=yc(t);return!e||!this.isValidUrl(e)?!1:e}}]}createEventHandlers(){return{clickMark:(t,e)=>{const n=e.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(t,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const s=r.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(t,e,n)=>{if(t.filter(f=>!!f.getMeta(this.name)).forEach(f=>{const p=f.getMeta(this.name);if(p.command===h_){const{range:g,attrs:m}=p,{selection:v,doc:y}=n,b={range:g,selection:v,doc:y,attrs:m},{from:w,to:k}=g??v;this.options.onUpdateLink(y.textBetween(w,k),b)}}),!this.options.autoLink||V0(e)-V0(n)===1||!t.some(f=>f.docChanged))return;const s=Dz(t,e),l=P2(s,[qt,yn]),{mapping:a}=s,{tr:u,doc:c}=n,{updateLink:d,removeLink:h}=this.store.chain(u);if(l.forEach(({prevFrom:f,prevTo:p,from:g,to:m})=>{const v=[],y=m-g===2,b=this.getLinkMarksInRange(e.doc,f,p,!0).filter(w=>w.mark.type===this.type).map(({from:w,to:k,text:x})=>({mappedFrom:a.map(w),mappedTo:a.map(k),text:x,from:w,to:k}));b.forEach(({mappedFrom:w,mappedTo:k,from:x,to:S},T)=>this.getLinkMarksInRange(c,w,k,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const O=e.doc.textBetween(x,S,void 0," "),_=c.textBetween(C.from,C.to+1,void 0," ").trim(),R=this.isValidUrl(O);this.isValidUrl(_)||(R&&(h({from:C.from,to:C.to}).tr(),b.splice(T,1)),!y&&g===m&&this.findAutoLinks(_).map(E=>this.addLinkProperties({...E,from:w+E.start,to:w+E.end})).forEach(({attrs:E,range:M,text:I})=>{d(E,M).tr(),v.push({attrs:E,range:M,text:I})}))})),this.findTextBlocksInRange(c,{from:g,to:m}).forEach(({text:w,positionStart:k})=>{this.findAutoLinks(w).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const S=g>=x.from&&g<=x.to,T=m>=x.from&&m<=x.to;return S||T||y}).filter(({range:x})=>this.getLinkMarksInRange(u.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:S})=>!b.some(({text:T,mappedFrom:C})=>C===x&&T===S)).forEach(({attrs:x,text:S,range:T})=>{d(x,T).tr(),v.push({attrs:x,range:T,text:S})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:w,range:k,text:x})=>{const{doc:S,selection:T}=u;this.options.onUpdateLink(x,{attrs:w,doc:S,range:k,selection:T})})})}),u.steps.length!==0)return u}}}buildHref(t){return this.options.extractHref({url:t,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(t,e,n,r){const o=[];if(e===n){const i=Math.max(e-1,0),s=t.resolve(i),l=Hi(s,this.type);(l==null?void 0:l.mark.attrs.auto)===r&&o.push(l)}else t.nodesBetween(e,n,(i,s)=>{const a=(i.marks??[]).find(({type:u,attrs:c})=>u===this.type&&c.auto===r);a&&o.push({from:s,to:s+i.nodeSize,mark:a,text:i.textContent})});return o}findTextBlocksInRange(t,e){const n=[];return t.nodesBetween(e.from,e.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:t.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:t,to:e,href:n,...r}){return{...r,range:{from:t,to:e},attrs:{href:n,auto:!0}}}findAutoLinks(t){if(this.options.findAutoLinks)return this.options.findAutoLinks(t,this.options.defaultProtocol);const e=[];for(const n of su(t,this.options.autoLinkRegex)){const r=yc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||e.push({text:r,href:o,start:n.index,end:n.index+r.length})}return e}isValidUrl(t){var e;return this.options.isValidUrl?this.options.isValidUrl(t,this.options.defaultProtocol):this.isValidTLD(this.buildHref(t))&&!!((e=this._autoLinkRegexNonGlobal)!=null&&e.test(t))}isValidTLD(t){const{autoLinkAllowedTLDs:e}=this.options;if(e.length===0)return!0;const n=bde(t);if(n==="")return!0;const r=hD(n.split("."));return e.includes(r)}};af([nn({shortcut:oe.InsertLink})],hl.prototype,"shortcut",1);af([de()],hl.prototype,"updateLink",1);af([de()],hl.prototype,"selectLink",1);af([de()],hl.prototype,"removeLink",1);hl=af([Pe({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Ede,autoLinkAllowedTLDs:kde,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:Sde},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:dt.Medium})],hl);function Sde({url:t,defaultProtocol:e}){const n=/^((?:https?|ftp)?:)\/\//.test(t);return!n&&t.includes("@")?`mailto:${t}`:n?t:`${e}//${t}`}function Cde(t){for(var e=1;e0&&t[e-1]===` -`;)e--;return t.substring(0,e)}var _de=["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 vk(t){return yk(t,_de)}var DN=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function PN(t){return yk(t,DN)}function Rde(t){return FN(t,DN)}var zN=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Mde(t){return yk(t,zN)}function Ode(t){return FN(t,zN)}function yk(t,e){return e.indexOf(t.nodeName)>=0}function FN(t,e){return t.getElementsByTagName&&e.some(function(n){return t.getElementsByTagName(n).length})}var Xn={};Xn.paragraph={filter:"p",replacement:function(t){return` + ${fk} + ${pk} + ${gk} + ${mk} + ${vk} +`,Uue=Object.defineProperty,Wue=Object.getOwnPropertyDescriptor,es=(e,t,n,r)=>{for(var o=r>1?void 0:r?Wue(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Uue(t,n,o),o};function Vue(e){const t=[],n=new Map;for(const s of e){const l=n.get(s.from)??[],a=n.get(s.to)??[];n.set(s.from,[...l,{type:"start",annotation:s}]),n.set(s.to,[...a,{type:"end",annotation:s}])}const r=Vs([...n.entries()],([s],[l])=>s-l);let o=[],i=0;for(const[s,l]of r){const a=l.filter(c=>c.type==="start").map(c=>c.annotation),u=new Set(l.filter(c=>c.type==="end").map(c=>c.annotation.id));o.length>0&&t.push({from:i,to:s,annotations:o}),i=s,o=[...o,...a].filter(c=>!u.has(c.id))}return t}var jue=class{constructor(e,t){this.getStyle=e,this.store=t,this.annotations=[],this.decorationSet=We.empty}addAnnotation(e){const t={from:e.from,to:e.to,...e.annotationData};this.store.addAnnotation(t)}updateAnnotation(e){this.store.updateAnnotation(e.annotationId,e.annotationData)}removeAnnotations(e){this.store.removeAnnotations(e.annotationIds)}setAnnotations(e){this.store.setAnnotations(e.annotations)}formatAnnotations(){return this.store.formatAnnotations()}createDecorations(e,t=[]){const n=Vue(t).map(r=>{const o=r.annotations.map(s=>s.className).filter(s=>s),i=this.getStyle(r.annotations);return yt.inline(r.from,r.to,{class:o.length>0?o.join(" "):void 0,style:i})});return We.create(e.doc,n)}apply({tr:e,action:t}){const n=t==null?void 0:t.type;return!t&&!e.docChanged?this:(n!==void 0?(n===0&&this.addAnnotation(t),n===4&&this.updateAnnotation(t),n===2&&this.removeAnnotations(t),n===3&&this.setAnnotations(t),this.annotations=this.formatAnnotations(),this.decorationSet=this.createDecorations(e,this.annotations)):(this.annotations=this.annotations.map(r=>({...r,from:e.mapping.map(r.from,1),to:e.mapping.map(r.to,-1)})).filter(r=>r.to!==r.from),this.store.setAnnotations(this.annotations),this.decorationSet=this.decorationSet.map(e.mapping,e.doc)),this)}},PN=class{constructor(e=new Map,t=r=>r,n=r=>r){this.map=e,this.positionToStored=t,this.positionFromStored=n}addAnnotation({from:e,to:t,...n}){const r={from:this.positionToStored(e),to:this.positionToStored(t),...n};this.map.set(n.id,r)}updateAnnotation(e,t){const n=this.map.get(e);n&&this.map.set(e,{...n,...t})}removeAnnotations(e){e.forEach(t=>{this.map.delete(t)})}setAnnotations(e){typeof this.map.clear=="function"?this.map.clear():this.map.forEach(t=>this.map.delete(t.id)),e.forEach(t=>{this.addAnnotation(t)})}formatAnnotations(){const e=[];return this.map.forEach(({from:t,to:n,...r})=>{const o=this.positionFromStored(t),i=this.positionFromStored(n);if(!o||!i)return;const s={from:o,to:i,...r};e.push(s)}),e}};function Gue(e){const n=200*(1-Math.min(e.length,5)/5)+55;return`background: rgb(${n}, ${n}, 255);`}var Nn=class extends gt{constructor(){super(...arguments),this.enrichText=e=>{const{doc:t}=this.store.getState(),n=e.to<=t.content.size?t.textBetween(e.from,e.to,this.options.blockSeparator):void 0;return{...e,text:n}}}get name(){return"annotation"}onSetOptions(e){const{pickChanged:t}=e,n=t(["getStore","getMap","transformPosition","transformPositionBeforeRender"]);Vd(n)||this.store.updateExtensionPlugins(this)}createPlugin(){let e;this.options.getMap?(gb(br.isProduction,'Must not provide both "getMap" and "getStore"'),e=new PN(this.options.getMap(),this.options.transformPosition,this.options.transformPositionBeforeRender)):e=this.options.getStore();const t=new jue(this.options.getStyle,e);return{state:{init(){return t},apply(n){const r=n.getMeta(Nn.name);return t.apply({tr:n,action:r})}},props:{decorations(n){var r;return(r=this.getState(n))==null?void 0:r.decorationSet}}}}addAnnotation(e){return({tr:t,dispatch:n})=>{const{empty:r,from:o,to:i}=t.selection;return r?!1:(n==null||n(t.setMeta(Nn.name,{type:0,from:o,to:i,annotationData:e})),!0)}}updateAnnotation(e,t){return({tr:n,dispatch:r})=>{if(r){const o={...t,id:e},i={type:4,annotationId:e,annotationData:o};r(n.setMeta(Nn.name,i))}return!0}}removeAnnotations(e){return({tr:t,dispatch:n})=>(n==null||n(t.setMeta(Nn.name,{type:2,annotationIds:e})),!0)}setAnnotations(e){return({tr:t,dispatch:n})=>(n==null||n(t.setMeta(Nn.name,{type:3,annotations:e})),!0)}redrawAnnotations(){return({tr:e,dispatch:t})=>(t==null||t(e.setMeta(Nn.name,{type:1})),!0)}getAnnotations(){return this.getPluginState().annotations.map(this.enrichText)}getAnnotationsAt(e,t=!0){const n=[],{doc:r,selection:o}=this.store.getState(),i=this.getPluginState(),{from:s,to:l}=Mr(e??o,r);for(const a of i.annotations)(ii(s,a.from,a.to)||ii(l,a.from,a.to)||ii(a.from,s,l)||ii(a.to,s,l))&&(t?n.push(this.enrichText(a)):a.from!==s&&a.to!==l&&n.push(this.enrichText(a)));return n}selectionHasAnnotation(e){return this.getAnnotationsAt(e).length>0}};es([le()],Nn.prototype,"addAnnotation",1);es([le()],Nn.prototype,"updateAnnotation",1);es([le()],Nn.prototype,"removeAnnotations",1);es([le()],Nn.prototype,"setAnnotations",1);es([le()],Nn.prototype,"redrawAnnotations",1);es([lt()],Nn.prototype,"getAnnotations",1);es([lt()],Nn.prototype,"getAnnotationsAt",1);es([lt()],Nn.prototype,"selectionHasAnnotation",1);Nn=es([De({defaultOptions:{getStyle:Gue,blockSeparator:void 0,getStore:()=>new PN,getMap:void 0,transformPosition:void 0,transformPositionBeforeRender:void 0},defaultPriority:st.Low})],Nn);var Kue=Object.defineProperty,Yue=Object.getOwnPropertyDescriptor,zN=(e,t,n,r)=>{for(var o=r>1?void 0:r?Yue(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Kue(t,n,o),o},yk=class extends zn{get name(){return"blockquote"}createTags(){return[Ee.Block,Ee.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:n=>["blockquote",e.dom(n),0]}}toggleBlockquote(){return Z2(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[dm(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};zN([le({icon:"doubleQuotesL",description:({t:e})=>e(ES.DESCRIPTION),label:({t:e})=>e(ES.LABEL)})],yk.prototype,"toggleBlockquote",1);zN([nn({shortcut:"Ctrl->",command:"toggleBlockquote"})],yk.prototype,"shortcut",1);var Xue=Object.defineProperty,que=Object.getOwnPropertyDescriptor,uf=(e,t,n,r)=>{for(var o=r>1?void 0:r?que(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Xue(t,n,o),o},Zue={icon:"bold",label:({t:e})=>e(SS.LABEL),description:({t:e})=>e(SS.DESCRIPTION)},pl=class extends oa{get name(){return"bold"}createTags(){return[Ee.FormattingMark,Ee.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:n=>zt(n)&&n.style.fontWeight!=="normal"?e.parse(n):!1},{style:"font-weight",getAttrs:n=>ke(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...t.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",e.dom(n),0]}}}createInputRules(){return[Zd({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return Ks({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Mr(e??t.selection,t.doc);return n==null||n(t.addMark(r,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Mr(e??t.selection,t.doc);return t.doc.rangeHasMark(r,o,this.type)?(n==null||n(t.removeMark(r,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};uf([le(Zue)],pl.prototype,"toggleBold",1);uf([le()],pl.prototype,"setBold",1);uf([le()],pl.prototype,"removeBold",1);uf([nn({shortcut:oe.Bold,command:"toggleBold"})],pl.prototype,"shortcut",1);pl=uf([De({defaultOptions:{weight:void 0},staticKeys:["weight"]})],pl);var Que=Object.defineProperty,Jue=Object.getOwnPropertyDescriptor,bk=(e,t,n,r)=>{for(var o=r>1?void 0:r?Jue(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Que(t,n,o),o},{DESCRIPTION:ede,LABEL:tde}=f5,nde={icon:"codeLine",description:({t:e})=>e(ede),label:({t:e})=>e(tde)},Mh=class extends oa{get name(){return"code"}createTags(){return[Ee.Code,Ee.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:"_",...t,attrs:e.defaults(),parseDOM:[{tag:"code",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["code",{spellcheck:"false",...e.dom(n)},0]}}createKeymap(){return{"Mod-`":Ks({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return Ks({type:this.type})}createInputRules(){return[Zd({regexp:new RegExp(`(?:\`)([^\`${fb}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:"mark",regexp:/`([^`]+)`/g,markType:this.type}]}};bk([nn({shortcut:oe.Code,command:"toggleCode"})],Mh.prototype,"keyboardShortcut",1);bk([le(nde)],Mh.prototype,"toggleCode",1);Mh=bk([De({})],Mh);var FN=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},et=(e,t,n)=>(FN(e,t,"read from private field"),n?n.call(e):t.get(e)),rc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},gs=(e,t,n,r)=>(FN(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rde='',ode='',ide=encodeURIComponent(rde),sde=encodeURIComponent(ode),mr,ade=class{constructor(e){rc(this,mr,void 0);const t=document.createElement("div"),n=document.createElement("div");this.dom=t,gs(this,mr,n),this.type=e,this.createHandle(e)}createHandle(e){switch(Vn(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Vn(et(this,mr),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),et(this,mr).dataset.dragging="",e){case 0:Vn(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Vn(et(this,mr),{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:Vn(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Vn(et(this,mr),{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:Vn(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Vn(et(this,mr),{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:Vn(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Vn(et(this,mr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${sde}") `});break;case 4:Vn(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Vn(et(this,mr),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${ide}") `});break}this.dom.append(et(this,mr))}setHandleVisibility(e){const t=e||!!et(this,mr).dataset.dragging;et(this,mr).style.opacity=t?"1":"0"}dataSetDragging(e){et(this,mr).dataset.dragging=e?"true":""}};mr=new WeakMap;var np=50,BN=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(BN||{}),Ra,Ma,Oa,_i,Ia,lde=class{constructor({node:e,view:t,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){rc(this,Ra,void 0),rc(this,Ma,void 0),rc(this,Oa,[]),rc(this,_i,void 0),rc(this,Ia,void 0);const s=this.createWrapper(e,i),l=this.createElement({node:e,view:t,getPos:n,options:o}),u=(r===1?[0,1,2,3,4]:[0,1]).map(h=>new ade(h));for(const h of u){const f=p=>{this.startResizing(p,t,n,h)};h.dom.addEventListener("mousedown",f),et(this,Oa).push(()=>h.dom.removeEventListener("mousedown",f)),s.append(h.dom)}const c=()=>{u.forEach(h=>h.setHandleVisibility(!0))},d=()=>{u.forEach(h=>h.setHandleVisibility(!1))};s.addEventListener("mouseover",c),s.addEventListener("mouseout",d),et(this,Oa).push(()=>s.removeEventListener("mouseover",c),()=>s.removeEventListener("mouseout",d)),s.append(l),this.dom=s,gs(this,Ma,e),gs(this,Ra,l),this.aspectRatio=r}createWrapper(e,t){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",t?Vn(n,{width:g_(t.width),aspectRatio:`${t.width} / ${t.height}`}):Vn(n,{width:g_(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),Vn(n,{maxWidth:"100%",minWidth:`${np}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(e,t,n,r){var o,i;e.preventDefault(),r.dataSetDragging(!0),et(this,Ra).style.pointerEvents="none";const s=e.pageX,l=e.pageY,a=((o=et(this,Ra))==null?void 0:o.getBoundingClientRect().width)||0,u=((i=et(this,Ra))==null?void 0:i.getBoundingClientRect().height)||0,c=g0(100,!1,h=>{const f=h.pageX,p=h.pageY,g=f-s,m=p-l;let v=null,y=null;if(this.aspectRatio===0&&a&&u)switch(r.type){case 0:case 3:v=a+g,y=u/a*v;break;case 1:case 4:v=a-g,y=u/a*v;break;case 2:y=u+m,v=a/u*y;break}else if(this.aspectRatio===1)switch(r.type){case 0:v=a+g;break;case 1:v=a-g;break;case 2:y=u+m;break;case 3:v=a+g,y=u+m;break;case 4:v=a-g,y=u+m;break}typeof v=="number"&&v{h.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),et(this,Ra).style.pointerEvents="auto",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d);const f=n(),p=t.state.tr.setNodeMarkup(f,void 0,{...et(this,Ma).attrs,width:et(this,_i),height:et(this,Ia)});t.dispatch(p)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d),et(this,Oa).push(()=>document.removeEventListener("mousemove",c)),et(this,Oa).push(()=>document.removeEventListener("mouseup",d))}update(e){return e.type!==et(this,Ma).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==et(this,_i)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==et(this,_i)&&e.attrs.height!==et(this,Ia)||!cde(et(this,Ma),e,["width","height"])?!1:(gs(this,Ma,e),gs(this,_i,e.attrs.width),gs(this,Ia,e.attrs.height),!0)}destroy(){et(this,Oa).forEach(e=>e())}};Ra=new WeakMap;Ma=new WeakMap;Oa=new WeakMap;_i=new WeakMap;Ia=new WeakMap;function cde(e,t,n){return e===t||ude(e,t,n)&&e.content.eq(t.content)}function ude(e,t,n){const r=e.attrs,o=t.attrs,i={};for(const l of n)i[l]=null;e.attrs={...r,...i},t.attrs={...o,...i};const s=e.sameMarkup(t);return e.attrs=r,t.attrs=o,s}function g_(e){return typeof e=="number"?`${e}px`:e||void 0}var dde=Object.defineProperty,hde=Object.getOwnPropertyDescriptor,HN=(e,t,n,r)=>{for(var o=r>1?void 0:r?hde(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&dde(t,n,o),o},jg=class extends zn{get name(){return"hardBreak"}createTags(){return[Ee.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:n=>["br",e.dom(n)]}}createKeymap(){const e=Wz(Ad(sM),()=>(this.store.commands.insertHardBreak(),!0));return{"Mod-Enter":e,"Shift-Enter":e}}insertHardBreak(){return e=>{const{tr:t,dispatch:n}=e;return n==null||n(t.replaceSelectionWith(this.type.create()).scrollIntoView()),!0}}};HN([le()],jg.prototype,"insertHardBreak",1);jg=HN([De({defaultPriority:st.Low})],jg);var fde=Object.defineProperty,pde=Object.getOwnPropertyDescriptor,UN=(e,t,n,r)=>{for(var o=r>1?void 0:r?pde(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&fde(t,n,o),o},{LABEL:gde}=g5,mde={icon:({attrs:e})=>`h${(e==null?void 0:e.level)??"1"}`,label:({t:e,attrs:t})=>e({...gde,values:{level:t==null?void 0:t.level}})},vde=[oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6],Gg=class extends zn{get name(){return"heading"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.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(n=>({tag:`h${n}`,getAttrs:r=>({...e.parse(r),level:n})})),...t.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,e.dom(n),0]:[`h${this.options.defaultLevel}`,e.dom(n),0]}}toggleHeading(e={}){return Bb({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(Ve),n=be(),r=[];for(const o of this.options.levels){const i=vde[o-1]??oe.H1;n[i]=qd(this.type,{level:o}),r.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(e=>F5(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}))}};UN([le(mde)],Gg.prototype,"toggleHeading",1);Gg=UN([De({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Gg);var yde=Object.defineProperty,bde=Object.getOwnPropertyDescriptor,WN=(e,t,n,r)=>{for(var o=r>1?void 0:r?bde(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&yde(t,n,o),o},wde={icon:"separator",label:({t:e})=>e(CS.LABEL),description:({t:e})=>e(CS.DESCRIPTION)},Kg=class extends zn{get name(){return"horizontalRule"}createTags(){return[Ee.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["hr",e.dom(n)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:n}=e,r=t.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(t.selection.empty&&vm(o)&&t.insert(r.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),n(t.scrollIntoView())),!0)}}createInputRules(){return[eM({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Kh(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];we(r,{code:re.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();e.insert(t,o),e.setSelection(Ie.near(e.doc.resolve(t+1)))}};WN([le(wde)],Kg.prototype,"insertHorizontalRule",1);Kg=WN([De({defaultOptions:{insertionNode:"paragraph"}})],Kg);var xde=Object.defineProperty,kde=Object.getOwnPropertyDescriptor,wk=(e,t,n,r)=>{for(var o=r>1?void 0:r?kde(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&xde(t,n,o),o},Ede=class extends lde{constructor(e,t,n){super({node:e,view:t,getPos:n,aspectRatio:BN.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),Vn(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},Oh=class extends zn{get name(){return"image"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(e,t){const{preferPastedTextContent:n}=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:r=>{var o;if(zt(r)){const i=Cde({element:r,parse:e.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:r=>{const o=bm(r.attrs,e);return["img",{...e.dom(r),...o}]}}}insertImage(e,t){return({tr:n,dispatch:r})=>{const{from:o,to:i}=Mr(t??n.selection,n.doc),s=this.type.create(e);return r==null||r(n.replaceRangeWith(o,i,s)),!0}}uploadImage(e,t){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:s}=i;let l=s.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return l},createElement:(a,u)=>{const c=o(a,u);return t==null||t(c),c},onUpdate:(a,u,c,d)=>{n(a,u,c,d)},onDestroy:(a,u)=>{r(a,u)}},onSuccess:(a,u,c)=>this.insertImage(a,u)(c)}).validate(({tr:a,dispatch:u})=>{const c=VR(a.doc,l,this.type);return c==null?!1:(l=c,a.selection.empty||u==null||u(a.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&_de(t)&&((r=t.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:s,chain:l}=this.store,a=e.map((c,d)=>({file:c,progress:h=>{s.updatePlaceholder(u[d],h)}})),u=i(a);Zr(n)&&l.selectText(n);for(const c of u)l.uploadImage(c);return l.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,n)=>new Ede(e,t,n):{}}};wk([le()],Oh.prototype,"insertImage",1);wk([le()],Oh.prototype,"uploadImage",1);Oh=wk([De({defaultOptions:{createPlaceholder:Tde,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:Ade,enableResizing:!1,preferPastedTextContent:!0}})],Oh);function Sde(e){let{width:t,height:n}=e.style;return t=t||e.getAttribute("width")||"",n=n||e.getAttribute("height")||"",{width:t,height:n}}function Cde({element:e,parse:t}){const{width:n,height:r}=Sde(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function Tde(e,t){const n=document.createElement("div");return n.classList.add(ZW.IMAGE_LOADER),n}function Ade(e){we(e.length>0,{code:re.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const n=[];for(const{file:r,progress:o}of e)n.push(()=>new Promise(i=>{const s=new FileReader;s.addEventListener("load",l=>{var a;t+=1,o(t/e.length),i({src:(a=l.target)==null?void 0:a.result,fileName:r.name})},{once:!0}),s.readAsDataURL(r)}));return n}function _de(e){return e.clipboardData!==void 0}var Rde=Object.defineProperty,Mde=Object.getOwnPropertyDescriptor,xk=(e,t,n,r)=>{for(var o=r>1?void 0:r?Mde(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Rde(t,n,o),o},Ode={icon:"italic",label:({t:e})=>e(TS.LABEL),description:({t:e})=>e(TS.DESCRIPTION)},Ih=class extends oa{get name(){return"italic"}createTags(){return[Ee.FontStyle,Ee.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:n=>["em",e.dom(n),0]}}createKeymap(){return{"Mod-i":Ks({type:this.type})}}createInputRules(){return[Zd({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Zd({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 Ks({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};xk([le(Ode)],Ih.prototype,"toggleItalic",1);xk([nn({shortcut:oe.Italic,command:"toggleItalic"})],Ih.prototype,"shortcut",1);Ih=xk([De({})],Ih);var VN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:dt,function(){return function(n){function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return n[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var o={};return r.m=n,r.c=o,r.d=function(i,s,l){r.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function s(u){typeof u!="string"&&i();for(var c=0,d=0,h=0,f=u.length,p=0;f--&&++p&&!(c&&-1h?"":u.slice(h,c)}var l=["/",":","?","#"],a=[".","/","@"];n.exports=function(u){if(typeof u=="string")return s(u);if(Array.isArray(u)){var c=[],d,h=0;for(d=u.length;h{for(var o=r>1?void 0:r?$de(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Nde(t,n,o),o},Dde=["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"],m_="updateLink",Pde=/(?:(?:(?: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,gl=class extends oa{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[Ee.Link,Ee.ExcludeInputRules]}createMarkSpec(e,t){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:s}=this.options,l=i?[...s,i]:s;return o&&ar(l,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(!zt(o))return!1;const i=o.getAttribute("href"),s=o.textContent,l=this.options.autoLink&&(o.hasAttribute(n)||i===s||(i==null?void 0:i.replace(`${this.options.defaultProtocol}//`,""))===s);return{...e.parse(o),href:i,auto:l,...r(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:s,...l}=bm(o.attrs,e),a=o.attrs.auto?{[n]:""}:{},u="noopener noreferrer nofollow";return["a",{...e.dom(o),...l,rel:u,...a,...r(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:n,to:r,empty:o,$from:i}=e.selection,s=!1;const l=Wi(i,this.type);if(o){const a=l??G2(e);if(!a)return!1;({text:t,from:n,to:r}=a),s=!0}return n===r?!1:(s||(t=e.doc.textBetween(n,r)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:l?{attrs:l.mark.attrs,from:l.from,to:l.to}:void 0,selectedText:t,from:n,to:r}),!0)}updateLink(e,t){return n=>{const{tr:r}=n;return!(ra(r.selection)&&!Db(r.selection)||sF(r.selection)||ng({trState:r,type:this.type}))&&!t?!1:(r.setMeta(this.name,{command:m_,attrs:e,range:t}),AF({type:this.type,attrs:e,range:t})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:n}=t;return ng({trState:n,type:this.type,...e})?J2({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(xc(e)),auto:!t}),transformMatch:e=>{const t=xc(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const n=t.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};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=r.href;window.open(s,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(e,t,n)=>{if(e.filter(f=>!!f.getMeta(this.name)).forEach(f=>{const p=f.getMeta(this.name);if(p.command===m_){const{range:g,attrs:m}=p,{selection:v,doc:y}=n,b={range:g,selection:v,doc:y,attrs:m},{from:w,to:k}=g??v;this.options.onUpdateLink(y.textBetween(w,k),b)}}),!this.options.autoLink||Y0(t)-Y0(n)===1||!e.some(f=>f.docChanged))return;const s=jz(e,t),l=j2(s,[qt,bn]),{mapping:a}=s,{tr:u,doc:c}=n,{updateLink:d,removeLink:h}=this.store.chain(u);if(l.forEach(({prevFrom:f,prevTo:p,from:g,to:m})=>{const v=[],y=m-g===2,b=this.getLinkMarksInRange(t.doc,f,p,!0).filter(w=>w.mark.type===this.type).map(({from:w,to:k,text:x})=>({mappedFrom:a.map(w),mappedTo:a.map(k),text:x,from:w,to:k}));b.forEach(({mappedFrom:w,mappedTo:k,from:x,to:S},T)=>this.getLinkMarksInRange(c,w,k,!0).filter(C=>C.mark.type===this.type).forEach(C=>{const I=t.doc.textBetween(x,S,void 0," "),_=c.textBetween(C.from,C.to+1,void 0," ").trim(),R=this.isValidUrl(I);this.isValidUrl(_)||(R&&(h({from:C.from,to:C.to}).tr(),b.splice(T,1)),!y&&g===m&&this.findAutoLinks(_).map(E=>this.addLinkProperties({...E,from:w+E.start,to:w+E.end})).forEach(({attrs:E,range:M,text:O})=>{d(E,M).tr(),v.push({attrs:E,range:M,text:O})}))})),this.findTextBlocksInRange(c,{from:g,to:m}).forEach(({text:w,positionStart:k})=>{this.findAutoLinks(w).map(x=>this.addLinkProperties({...x,from:k+x.start+1,to:k+x.end+1})).filter(({range:x})=>{const S=g>=x.from&&g<=x.to,T=m>=x.from&&m<=x.to;return S||T||y}).filter(({range:x})=>this.getLinkMarksInRange(u.doc,x.from,x.to,!1).length===0).filter(({range:{from:x},text:S})=>!b.some(({text:T,mappedFrom:C})=>C===x&&T===S)).forEach(({attrs:x,text:S,range:T})=>{d(x,T).tr(),v.push({attrs:x,range:T,text:S})})}),window.requestAnimationFrame(()=>{v.forEach(({attrs:w,range:k,text:x})=>{const{doc:S,selection:T}=u;this.options.onUpdateLink(x,{attrs:w,doc:S,range:k,selection:T})})})}),u.steps.length!==0)return u}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,n,r){const o=[];if(t===n){const i=Math.max(t-1,0),s=e.resolve(i),l=Wi(s,this.type);(l==null?void 0:l.mark.attrs.auto)===r&&o.push(l)}else e.nodesBetween(t,n,(i,s)=>{const a=(i.marks??[]).find(({type:u,attrs:c})=>u===this.type&&c.auto===r);a&&o.push({from:s,to:s+i.nodeSize,mark:a,text:i.textContent})});return o}findTextBlocksInRange(e,t){const n=[];return e.nodesBetween(t.from,t.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:e.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:e,to:t,href:n,...r}){return{...r,range:{from:e,to:t},attrs:{href:n,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const n of cu(e,this.options.autoLinkRegex)){const r=xc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:r,href:o,start:n.index,end:n.index+r.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 n=Lde(e);if(n==="")return!0;const r=xD(n.split("."));return t.includes(r)}};df([nn({shortcut:oe.InsertLink})],gl.prototype,"shortcut",1);df([le()],gl.prototype,"updateLink",1);df([le()],gl.prototype,"selectLink",1);df([le()],gl.prototype,"removeLink",1);gl=df([De({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:Pde,autoLinkAllowedTLDs:Dde,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:zde},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:st.Medium})],gl);function zde({url:e,defaultProtocol:t}){const n=/^((?:https?|ftp)?:)\/\//.test(e);return!n&&e.includes("@")?`mailto:${e}`:n?e:`${t}//${e}`}function Fde(e){for(var t=1;t0&&e[t-1]===` +`;)t--;return e.substring(0,t)}var Ude=["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 kk(e){return Ek(e,Ude)}var jN=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function GN(e){return Ek(e,jN)}function Wde(e){return YN(e,jN)}var KN=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Vde(e){return Ek(e,KN)}function jde(e){return YN(e,KN)}function Ek(e,t){return t.indexOf(e.nodeName)>=0}function YN(e,t){return e.getElementsByTagName&&t.some(function(n){return e.getElementsByTagName(n).length})}var qn={};qn.paragraph={filter:"p",replacement:function(e){return` -`+t+` +`+e+` -`}};Xn.lineBreak={filter:"br",replacement:function(t,e,n){return n.br+` -`}};Xn.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,n){var r=Number(e.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var o=Jy(r===1?"=":"-",t.length);return` +`}};qn.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+` +`}};qn.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var o=rb(r===1?"=":"-",e.length);return` -`+t+` +`+e+` `+o+` `}else return` -`+Jy("#",r)+" "+t+` +`+rb("#",r)+" "+e+` -`}};Xn.blockquote={filter:"blockquote",replacement:function(t){return t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^/gm,"> "),` +`}};qn.blockquote={filter:"blockquote",replacement:function(e){return e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^/gm,"> "),` -`+t+` +`+e+` -`}};Xn.list={filter:["ul","ol"],replacement:function(t,e){var n=e.parentNode;return n.nodeName==="LI"&&n.lastElementChild===e?` -`+t:` +`}};qn.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return n.nodeName==="LI"&&n.lastElementChild===t?` +`+e:` -`+t+` +`+e+` -`}};Xn.listItem={filter:"li",replacement:function(t,e,n){t=t.replace(/^\n+/,"").replace(/\n+$/,` +`}};qn.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,` `).replace(/\n/gm,` - `);var r=n.bulletListMarker+" ",o=e.parentNode;if(o.nodeName==="OL"){var i=o.getAttribute("start"),s=Array.prototype.indexOf.call(o.children,e);r=(i?Number(i)+s:s+1)+". "}return r+t+(e.nextSibling&&!/\n$/.test(t)?` -`:"")}};Xn.indentedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="indented"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){return` + `);var r=n.bulletListMarker+" ",o=t.parentNode;if(o.nodeName==="OL"){var i=o.getAttribute("start"),s=Array.prototype.indexOf.call(o.children,t);r=(i?Number(i)+s:s+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?` +`:"")}};qn.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,n){return` - `+e.firstChild.textContent.replace(/\n/g,` + `+t.firstChild.textContent.replace(/\n/g,` `)+` -`}};Xn.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){for(var r=e.firstChild.getAttribute("class")||"",o=(r.match(/language-(\S+)/)||[null,""])[1],i=e.firstChild.textContent,s=n.fence.charAt(0),l=3,a=new RegExp("^"+s+"{3,}","gm"),u;u=a.exec(i);)u[0].length>=l&&(l=u[0].length+1);var c=Jy(s,l);return` +`}};qn.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,n){for(var r=t.firstChild.getAttribute("class")||"",o=(r.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=n.fence.charAt(0),l=3,a=new RegExp("^"+s+"{3,}","gm"),u;u=a.exec(i);)u[0].length>=l&&(l=u[0].length+1);var c=rb(s,l);return` `+c+o+` `+i.replace(/\n$/,"")+` `+c+` -`}};Xn.horizontalRule={filter:"hr",replacement:function(t,e,n){return` +`}};qn.horizontalRule={filter:"hr",replacement:function(e,t,n){return` `+n.hr+` -`}};Xn.inlineLink={filter:function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e){var n=e.getAttribute("href"),r=jg(e.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+t+"]("+n+r+")"}};Xn.referenceLink={filter:function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e,n){var r=e.getAttribute("href"),o=jg(e.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(n.linkReferenceStyle){case"collapsed":i="["+t+"][]",s="["+t+"]: "+r+o;break;case"shortcut":i="["+t+"]",s="["+t+"]: "+r+o;break;default:var l=this.references.length+1;i="["+t+"]["+l+"]",s="["+l+"]: "+r+o}return this.references.push(s),i},references:[],append:function(t){var e="";return this.references.length&&(e=` +`}};qn.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href"),r=Yg(t.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+e+"]("+n+r+")"}};qn.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,n){var r=t.getAttribute("href"),o=Yg(t.getAttribute("title"));o&&(o=' "'+o+'"');var i,s;switch(n.linkReferenceStyle){case"collapsed":i="["+e+"][]",s="["+e+"]: "+r+o;break;case"shortcut":i="["+e+"]",s="["+e+"]: "+r+o;break;default:var l=this.references.length+1;i="["+e+"]["+l+"]",s="["+l+"]: "+r+o}return this.references.push(s),i},references:[],append:function(e){var t="";return this.references.length&&(t=` `+this.references.join(` `)+` -`,this.references=[]),e}};Xn.emphasis={filter:["em","i"],replacement:function(t,e,n){return t.trim()?n.emDelimiter+t+n.emDelimiter:""}};Xn.strong={filter:["strong","b"],replacement:function(t,e,n){return t.trim()?n.strongDelimiter+t+n.strongDelimiter:""}};Xn.code={filter:function(t){var e=t.previousSibling||t.nextSibling,n=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!n},replacement:function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",n="`",r=t.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+e+t+e+n}};Xn.image={filter:"img",replacement:function(t,e){var n=jg(e.getAttribute("alt")),r=e.getAttribute("src")||"",o=jg(e.getAttribute("title")),i=o?' "'+o+'"':"";return r?"!["+n+"]("+r+i+")":""}};function jg(t){return t?t.replace(/(\n+\s*)+/g,` -`):""}function BN(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}BN.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=t0(this.array,t,this.options))||(e=t0(this._keep,t,this.options))||(e=t0(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e-1)return!0}else if(typeof r=="function"){if(r.call(t,e,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function Lde(t){var e=t.element,n=t.isBlock,r=t.isVoid,o=t.isPre||function(d){return d.nodeName==="PRE"};if(!(!e.firstChild||o(e))){for(var i=null,s=!1,l=null,a=f_(l,e,o);a!==e;){if(a.nodeType===3||a.nodeType===4){var u=a.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){a=n0(a);continue}a.data=u,i=a}else if(a.nodeType===1)n(a)||a.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):r(a)||o(a)?(i=null,s=!0):i&&(s=!1);else{a=n0(a);continue}var c=f_(l,a,o);l=a,a=c}i&&(i.data=i.data.replace(/ $/,""),i.data||n0(i))}}function n0(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function f_(t,e,n){return t&&t.parentNode===e||n(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var HN=typeof window<"u"?window:{};function Nde(){var t=HN.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function $de(){var t=function(){};return Dde()?t.prototype.parseFromString=function(e){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(e),n.close(),n}:t.prototype.parseFromString=function(e){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(e),n.close(),n},t}function Dde(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(t=!0)}return t}var Pde=Nde()?HN.DOMParser:$de();function zde(t,e){var n;if(typeof t=="string"){var r=Fde().parseFromString(''+t+"","text/html");n=r.getElementById("turndown-root")}else n=t.cloneNode(!0);return Lde({element:n,isBlock:vk,isVoid:PN,isPre:e.preformattedCode?Bde:null}),n}var r0;function Fde(){return r0=r0||new Pde,r0}function Bde(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function Hde(t,e){return t.isBlock=vk(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=Ude(t),t.flankingWhitespace=Wde(t,e),t}function Ude(t){return!PN(t)&&!Mde(t)&&/^\s*$/i.test(t.textContent)&&!Rde(t)&&!Ode(t)}function Wde(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var n=Vde(t.textContent);return n.leadingAscii&&p_("left",t,e)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&p_("right",t,e)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function Vde(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function p_(t,e,n){var r,o,i;return t==="left"?(r=e.previousSibling,o=/ $/):(r=e.nextSibling,o=/^ /),r&&(r.nodeType===3?i=o.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!vk(r)&&(i=o.test(r.textContent))),i}var jde=Array.prototype.reduce,Gde=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Rh(t){if(!(this instanceof Rh))return new Rh(t);var e={rules:Xn,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?` +`,this.references=[]),t}};qn.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}};qn.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}};qn.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+t+e+t+n}};qn.image={filter:"img",replacement:function(e,t){var n=Yg(t.getAttribute("alt")),r=t.getAttribute("src")||"",o=Yg(t.getAttribute("title")),i=o?' "'+o+'"':"";return r?"!["+n+"]("+r+i+")":""}};function Yg(e){return e?e.replace(/(\n+\s*)+/g,` +`):""}function XN(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])}XN.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=i0(this.array,e,this.options))||(t=i0(this._keep,e,this.options))||(t=i0(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t-1)return!0}else if(typeof r=="function"){if(r.call(e,t,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function Kde(e){var t=e.element,n=e.isBlock,r=e.isVoid,o=e.isPre||function(d){return d.nodeName==="PRE"};if(!(!t.firstChild||o(t))){for(var i=null,s=!1,l=null,a=v_(l,t,o);a!==t;){if(a.nodeType===3||a.nodeType===4){var u=a.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!s&&u[0]===" "&&(u=u.substr(1)),!u){a=s0(a);continue}a.data=u,i=a}else if(a.nodeType===1)n(a)||a.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,s=!1):r(a)||o(a)?(i=null,s=!0):i&&(s=!1);else{a=s0(a);continue}var c=v_(l,a,o);l=a,a=c}i&&(i.data=i.data.replace(/ $/,""),i.data||s0(i))}}function s0(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function v_(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var qN=typeof window<"u"?window:{};function Yde(){var e=qN.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function Xde(){var e=function(){};return qde()?e.prototype.parseFromString=function(t){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(t),n.close(),n}:e.prototype.parseFromString=function(t){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(t),n.close(),n},e}function qde(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(e=!0)}return e}var Zde=Yde()?qN.DOMParser:Xde();function Qde(e,t){var n;if(typeof e=="string"){var r=Jde().parseFromString(''+e+"","text/html");n=r.getElementById("turndown-root")}else n=e.cloneNode(!0);return Kde({element:n,isBlock:kk,isVoid:GN,isPre:t.preformattedCode?ehe:null}),n}var a0;function Jde(){return a0=a0||new Zde,a0}function ehe(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function the(e,t){return e.isBlock=kk(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=nhe(e),e.flankingWhitespace=rhe(e,t),e}function nhe(e){return!GN(e)&&!Vde(e)&&/^\s*$/i.test(e.textContent)&&!Wde(e)&&!jde(e)}function rhe(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=ohe(e.textContent);return n.leadingAscii&&y_("left",e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&y_("right",e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function ohe(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 y_(e,t,n){var r,o,i;return e==="left"?(r=t.previousSibling,o=/ $/):(r=t.nextSibling,o=/^ /),r&&(r.nodeType===3?i=o.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!kk(r)&&(i=o.test(r.textContent))),i}var ihe=Array.prototype.reduce,she=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Lh(e){if(!(this instanceof Lh))return new Lh(e);var t={rules:qn,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?` `:""},keepReplacement:function(n,r){return r.isBlock?` @@ -4928,193 +4928,203 @@ Error generating stack: `+i.message+` `+n+` -`:n}};this.options=Cde({},e,t),this.rules=new BN(this.options)}Rh.prototype={turndown:function(t){if(!Xde(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=UN.call(this,new zde(t,this.options));return Kde.call(this,e)},use:function(t){if(Array.isArray(t))for(var e=0;e"']/,Zde=new RegExp(jN.source,"g"),GN=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Qde=new RegExp(GN.source,"g"),Jde={"&":"&","<":"<",">":">",'"':""","'":"'"},g_=t=>Jde[t];function jn(t,e){if(e){if(jN.test(t))return t.replace(Zde,g_)}else if(GN.test(t))return t.replace(Qde,g_);return t}const ehe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KN(t){return t.replace(ehe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const the=/(^|[^\[])\^/g;function vt(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=o.source||o,o=o.replace(the,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}const nhe=/[^\w:]/g,rhe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m_(t,e,n){if(t){let r;try{r=decodeURIComponent(KN(n)).replace(nhe,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!rhe.test(n)&&(n=ahe(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Jf={},ohe=/^[^:]+:\/*[^/]*$/,ihe=/^([^:]+:)[\s\S]*$/,she=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ahe(t,e){Jf[" "+t]||(ohe.test(t)?Jf[" "+t]=t+"/":Jf[" "+t]=$p(t,"/",!0)),t=Jf[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(ihe,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(she,"$1")+e:t+e}const Gg={exec:function(){}};function v_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function b_(t,e,n,r){const o=e.href,i=e.title?jn(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:jn(s)}}function uhe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(` +`.substring(0,o);return n+i+r}function che(e){return e!=null&&(typeof e=="string"||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}function JN(){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 Cl=JN();function uhe(e){Cl=e}const e$=/[&<>"']/,dhe=new RegExp(e$.source,"g"),t$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,hhe=new RegExp(t$.source,"g"),fhe={"&":"&","<":"<",">":">",'"':""","'":"'"},b_=e=>fhe[e];function Gn(e,t){if(t){if(e$.test(e))return e.replace(dhe,b_)}else if(t$.test(e))return e.replace(hhe,b_);return e}const phe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n$(e){return e.replace(phe,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const ghe=/(^|[^\[])\^/g;function bt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=o.source||o,o=o.replace(ghe,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}const mhe=/[^\w:]/g,vhe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w_(e,t,n){if(e){let r;try{r=decodeURIComponent(n$(n)).replace(mhe,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!vhe.test(n)&&(n=xhe(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const rp={},yhe=/^[^:]+:\/*[^/]*$/,bhe=/^([^:]+:)[\s\S]*$/,whe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function xhe(e,t){rp[" "+e]||(yhe.test(e)?rp[" "+e]=e+"/":rp[" "+e]=Fp(e,"/",!0)),e=rp[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(bhe,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(whe,"$1")+t:e+t}const Xg={exec:function(){}};function x_(e,t){const n=e.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function E_(e,t,n,r){const o=t.href,i=t.title?Gn(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:Gn(s)}}function She(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` -`)}class bk{constructor(e){this.options=e||kl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:$p(r,` -`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=uhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=$p(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,o,i,s,l,a,u,c,d,h,f,p,g=n[1].trim();const m=g.length>1,v={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,!(!(n=y.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),c=n[2].split(` -`,1)[0].replace(/^\t+/,w=>" ".repeat(3*w.length)),d=e.split(` +`)}class Sk{constructor(t){this.options=t||Cl}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Fp(r,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=She(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=Fp(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,o,i,s,l,a,u,c,d,h,f,p,g=n[1].trim();const m=g.length>1,v={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(p=!1,!(!(n=y.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(` +`,1)[0].replace(/^\t+/,w=>" ".repeat(3*w.length)),d=t.split(` `,1)[0],this.options.pedantic?(s=2,f=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,f=c.slice(s),s+=n[1].length),a=!1,!c&&/^ *$/.test(d)&&(r+=d+` -`,e=e.substring(d.length+1),p=!0),!p){const w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),k=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;e&&(h=e.split(` -`,1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(x.test(d)||S.test(d)||w.test(d)||k.test(e)));){if(d.search(/[^ ]/)>=s||!d.trim())f+=` +`,t=t.substring(d.length+1),p=!0),!p){const w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),k=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;t&&(h=t.split(` +`,1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(x.test(d)||S.test(d)||w.test(d)||k.test(t)));){if(d.search(/[^ ]/)>=s||!d.trim())f+=` `+d.slice(s);else{if(a||c.search(/[^ ]/)>=4||x.test(c)||S.test(c)||k.test(c))break;f+=` `+d}!a&&!d.trim()&&(a=!0),r+=h+` -`,e=e.substring(h.length+1),c=d.slice(s)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(f),o&&(i=o[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:r,task:!!o,checked:i,loose:!1,text:f}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=f.trimRight(),v.raw=v.raw.trimRight();const b=v.items.length;for(l=0;lx.type==="space"),k=w.length>0&&w.some(x=>/\n.*\n/.test(x.raw));v.loose=k}if(v.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:v_(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){r.raw=n[0];let o=r.align.length,i,s,l,a;for(i=0;i({text:u}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):jn(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=$p(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=lhe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),b_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return b_(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){const s=o[0].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=l.length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=e.slice(0,s+o.index+(o[0].length-l.length)+a);if(Math.min(s,a)%2){const p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=jn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let o,i;return r[2]==="@"?(o=jn(this.options.mangle?n(r[1]):r[1]),i="mailto:"+o):(o=jn(r[1]),i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let o,i;if(r[2]==="@")o=jn(this.options.mangle?n(r[0]):r[0]),i="mailto:"+o;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);o=jn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):jn(r[0]):r[0]:o=jn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Re={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:Gg,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Re._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Re.def=vt(Re.def).replace("label",Re._label).replace("title",Re._title).getRegex();Re.bullet=/(?:[*+-]|\d{1,9}[.)])/;Re.listItemStart=vt(/^( *)(bull) */).replace("bull",Re.bullet).getRegex();Re.list=vt(Re.list).replace(/bull/g,Re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Re.def.source+")").getRegex();Re._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";Re._comment=/|$)/;Re.html=vt(Re.html,"i").replace("comment",Re._comment).replace("tag",Re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Re.paragraph=vt(Re._paragraph).replace("hr",Re.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",Re._tag).getRegex();Re.blockquote=vt(Re.blockquote).replace("paragraph",Re.paragraph).getRegex();Re.normal={...Re};Re.gfm={...Re.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Re.gfm.table=vt(Re.gfm.table).replace("hr",Re.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",Re._tag).getRegex();Re.gfm.paragraph=vt(Re._paragraph).replace("hr",Re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Re.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",Re._tag).getRegex();Re.pedantic={...Re.normal,html:vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re._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:Gg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vt(Re.normal._paragraph).replace("hr",Re.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Gg,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:Gg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ge.punctuation=vt(ge.punctuation).replace(/punctuation/g,ge._punctuation).getRegex();ge.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ge.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;ge._comment=vt(Re._comment).replace("(?:-->|$)","-->").getRegex();ge.emStrong.lDelim=vt(ge.emStrong.lDelim).replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimAst=vt(ge.emStrong.rDelimAst,"g").replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimUnd=vt(ge.emStrong.rDelimUnd,"g").replace(/punct/g,ge._punctuation).getRegex();ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ge._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])?)+(?![-_])/;ge.autolink=vt(ge.autolink).replace("scheme",ge._scheme).replace("email",ge._email).getRegex();ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ge.tag=vt(ge.tag).replace("comment",ge._comment).replace("attribute",ge._attribute).getRegex();ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ge._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ge.link=vt(ge.link).replace("label",ge._label).replace("href",ge._href).replace("title",ge._title).getRegex();ge.reflink=vt(ge.reflink).replace("label",ge._label).replace("ref",Re._label).getRegex();ge.nolink=vt(ge.nolink).replace("ref",Re._label).getRegex();ge.reflinkSearch=vt(ge.reflinkSearch,"g").replace("reflink",ge.reflink).replace("nolink",ge.nolink).getRegex();ge.normal={...ge};ge.pedantic={...ge.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:vt(/^!?\[(label)\]\((.*?)\)/).replace("label",ge._label).getRegex(),reflink:vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge._label).getRegex()};ge.gfm={...ge.normal,escape:vt(ge.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&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class Xs{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||kl,this.options.tokenizer=this.options.tokenizer||new bk,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 n={block:Re.normal,inline:ge.normal};this.options.pedantic?(n.block=Re.pedantic,n.inline=ge.pedantic):this.options.gfm&&(n.block=Re.gfm,this.options.breaks?n.inline=ge.breaks:n.inline=ge.gfm),this.tokenizer.rules=n}static get rules(){return{block:Re,inline:ge}}static lex(e,n){return new Xs(n).lex(e)}static lexInline(e,n){return new Xs(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` -`),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(l,a,u)=>a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`,t=t.substring(h.length+1),c=d.slice(s)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(f),o&&(i=o[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:r,task:!!o,checked:i,loose:!1,text:f}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=f.trimRight(),v.raw=v.raw.trimRight();const b=v.items.length;for(l=0;lx.type==="space"),k=w.length>0&&w.some(x=>/\n.*\n/.test(x.raw));v.loose=k}if(v.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:x_(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){r.raw=n[0];let o=r.align.length,i,s,l,a;for(i=0;i({text:u}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Gn(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=Fp(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=khe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),E_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return E_(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const i=o[1]||o[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){const s=o[0].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=l.length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=t.slice(0,s+o.index+(o[0].length-l.length)+a);if(Math.min(s,a)%2){const p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Gn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let o,i;return r[2]==="@"?(o=Gn(this.options.mangle?n(r[1]):r[1]),i="mailto:"+o):(o=Gn(r[1]),i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let o,i;if(r[2]==="@")o=Gn(this.options.mangle?n(r[0]):r[0]),i="mailto:"+o;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);o=Gn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let o;return this.lexer.state.inRawBlock?o=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Gn(r[0]):r[0]:o=Gn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Re={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:Xg,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Re._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Re.def=bt(Re.def).replace("label",Re._label).replace("title",Re._title).getRegex();Re.bullet=/(?:[*+-]|\d{1,9}[.)])/;Re.listItemStart=bt(/^( *)(bull) */).replace("bull",Re.bullet).getRegex();Re.list=bt(Re.list).replace(/bull/g,Re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Re.def.source+")").getRegex();Re._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";Re._comment=/|$)/;Re.html=bt(Re.html,"i").replace("comment",Re._comment).replace("tag",Re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Re.paragraph=bt(Re._paragraph).replace("hr",Re.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",Re._tag).getRegex();Re.blockquote=bt(Re.blockquote).replace("paragraph",Re.paragraph).getRegex();Re.normal={...Re};Re.gfm={...Re.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Re.gfm.table=bt(Re.gfm.table).replace("hr",Re.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",Re._tag).getRegex();Re.gfm.paragraph=bt(Re._paragraph).replace("hr",Re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Re.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",Re._tag).getRegex();Re.pedantic={...Re.normal,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re._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:Xg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(Re.normal._paragraph).replace("hr",Re.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Xg,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:Xg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ge.punctuation=bt(ge.punctuation).replace(/punctuation/g,ge._punctuation).getRegex();ge.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ge.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;ge._comment=bt(Re._comment).replace("(?:-->|$)","-->").getRegex();ge.emStrong.lDelim=bt(ge.emStrong.lDelim).replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimAst=bt(ge.emStrong.rDelimAst,"g").replace(/punct/g,ge._punctuation).getRegex();ge.emStrong.rDelimUnd=bt(ge.emStrong.rDelimUnd,"g").replace(/punct/g,ge._punctuation).getRegex();ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ge._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])?)+(?![-_])/;ge.autolink=bt(ge.autolink).replace("scheme",ge._scheme).replace("email",ge._email).getRegex();ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ge.tag=bt(ge.tag).replace("comment",ge._comment).replace("attribute",ge._attribute).getRegex();ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ge._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ge.link=bt(ge.link).replace("label",ge._label).replace("href",ge._href).replace("title",ge._title).getRegex();ge.reflink=bt(ge.reflink).replace("label",ge._label).replace("ref",Re._label).getRegex();ge.nolink=bt(ge.nolink).replace("ref",Re._label).getRegex();ge.reflinkSearch=bt(ge.reflinkSearch,"g").replace("reflink",ge.reflink).replace("nolink",ge.nolink).getRegex();ge.normal={...ge};ge.pedantic={...ge.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:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",ge._label).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge._label).getRegex()};ge.gfm={...ge.normal,escape:bt(ge.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&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Js{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Cl,this.options.tokenizer=this.options.tokenizer||new Sk,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 n={block:Re.normal,inline:ge.normal};this.options.pedantic?(n.block=Re.pedantic,n.inline=ge.pedantic):this.options.gfm&&(n.block=Re.gfm,this.options.breaks?n.inline=ge.breaks:n.inline=ge.gfm),this.tokenizer.rules=n}static get rules(){return{block:Re,inline:ge}}static lex(t,n){return new Js(n).lex(t)}static lexInline(t,n){return new Js(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` +`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,a,u)=>a+" ".repeat(u.length));let r,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=e.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=t.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+y_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+y_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,l.index+l[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,w_)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,w_))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(function(f){h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,dhe)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class wk{constructor(e){this.options=e||kl}code(e,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(e,o);i!=null&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+` -`,o?'
'+(r?e:jn(e,!0))+`
-`:"
"+(r?e:jn(e,!0))+`
-`}blockquote(e){return`
-${e}
-`}html(e){return e}heading(e,n,r,o){if(this.options.headerIds){const i=this.options.headerPrefix+o.slug(r);return`${e} -`}return`${e} +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,s=t,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+k_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+k_("a",l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,l.index+l[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,S_)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,S_))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let h;this.options.extensions.startInline.forEach(function(f){h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,Che)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Ck{constructor(t){this.options=t||Cl}code(t,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(t,o);i!=null&&i!==t&&(r=!0,t=i)}return t=t.replace(/\n$/,"")+` +`,o?'
'+(r?t:Gn(t,!0))+`
+`:"
"+(r?t:Gn(t,!0))+`
+`}blockquote(t){return`
+${t}
+`}html(t){return t}heading(t,n,r,o){if(this.options.headerIds){const i=this.options.headerPrefix+o.slug(r);return`${t} +`}return`${t} `}hr(){return this.options.xhtml?`
`:`
-`}list(e,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+e+" -`}listitem(e){return`
  • ${e}
  • -`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    -`}table(e,n){return n&&(n=`${n}`),` +`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t){return`
  • ${t}
  • +`}checkbox(t){return" "}paragraph(t){return`

    ${t}

    +`}table(t,n){return n&&(n=`${n}`),`
    -`+e+` +`+t+` `+n+`
    -`}tablerow(e){return` -${e} -`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` -`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,n,r){if(e=m_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o='",o}image(e,n,r){if(e=m_(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let o=`${r}":">",o}text(e){return e}}class YN{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class XN{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,n){let r=e,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[e];do o++,r=e+"-"+o;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=o,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class qs{constructor(e){this.options=e||kl,this.options.renderer=this.options.renderer||new wk,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new YN,this.slugger=new XN}static parse(e,n){return new qs(n).parse(e)}static parseInline(e,n){return new qs(n).parseInline(e)}parse(e,n=!0){let r="",o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k,x;const S=e.length;for(o=0;o0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=k+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=k+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:k}):v+=k),v+=this.parse(y.tokens,m),h+=this.renderer.listitem(v,w,b);r+=this.renderer.list(h,p,g);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(h=f.tokens?this.parseInline(f.tokens):f.text;o+1{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+jn(r.message+"",!0)+"
    ";if(e)return Promise.resolve(o);if(n){n(null,o);return}return o}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function qN(t,e){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);const i={...r};r={..._e.defaults,...i};const s=hhe(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(che(r),r.hooks&&(r.hooks.options=r),o){const l=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=t(n,r)}catch(d){return s(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&_e.walkTokens(a,r.walkTokens),h=e(a,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(f){d=f}return r.highlight=l,d?s(d):o(null,h)};if(!l||l.length<3||(delete r.highlight,!a.length))return u();let c=0;_e.walkTokens(a,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(h,f){if(h)return u(h);f!=null&&f!==d.text&&(d.text=f,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(_e.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));const l=t(n,r);r.walkTokens&&_e.walkTokens(l,r.walkTokens);let a=e(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return s(l)}}}function _e(t,e,n){return qN(Xs.lex,qs.parse)(t,e,n)}_e.options=_e.setOptions=function(t){return _e.defaults={..._e.defaults,...t},qde(_e.defaults),_e};_e.getDefaults=VN;_e.defaults=kl;_e.use=function(...t){const e=_e.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=_e.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const i=e.renderers[o.name];i?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.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'");e[o.level]?e[o.level].unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){const o=_e.defaults.renderer||new wk;for(const i in n.renderer){const s=o[i];o[i]=(...l)=>{let a=n.renderer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.renderer=o}if(n.tokenizer){const o=_e.defaults.tokenizer||new bk;for(const i in n.tokenizer){const s=o[i];o[i]=(...l)=>{let a=n.tokenizer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.tokenizer=o}if(n.hooks){const o=_e.defaults.hooks||new Kg;for(const i in n.hooks){const s=o[i];Kg.passThroughHooks.has(i)?o[i]=l=>{if(_e.defaults.async)return Promise.resolve(n.hooks[i].call(o,l)).then(u=>s.call(o,u));const a=n.hooks[i].call(o,l);return s.call(o,a)}:o[i]=(...l)=>{let a=n.hooks[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.hooks=o}if(n.walkTokens){const o=_e.defaults.walkTokens;r.walkTokens=function(i){let s=[];return s.push(n.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}_e.setOptions(r)})};_e.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(_e,r)),r.type){case"table":{for(const o of r.header)n=n.concat(_e.walkTokens(o.tokens,e));for(const o of r.rows)for(const i of o)n=n.concat(_e.walkTokens(i.tokens,e));break}case"list":{n=n.concat(_e.walkTokens(r.items,e));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(o){n=n.concat(_e.walkTokens(r[o],e))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,e)))}return n};_e.parseInline=qN(Xs.lexInline,qs.parseInline);_e.Parser=qs;_e.parser=qs.parse;_e.Renderer=wk;_e.TextRenderer=YN;_e.Lexer=Xs;_e.lexer=Xs.lex;_e.Tokenizer=bk;_e.Slugger=XN;_e.Hooks=Kg;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;qs.parse;Xs.lex;var fhe=Object.defineProperty,phe=Object.getOwnPropertyDescriptor,Tv=(t,e,n,r)=>{for(var o=r>1?void 0:r?phe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&fhe(e,n,o),o},ghe=im(Rh);function mhe(t){return yhe.turndown(t)}function o0(t){const e=t.parentNode;if(!zt(e))return!1;if(e.nodeName==="THEAD")return!0;if(e.nodeName!=="TABLE"&&!ZN(e))return!1;const n=[...t.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function Yg(t){return zt(t)&&t.matches("th[data-controller-cell]")}function vhe(t){const e=t.parentNode;return!zt(e)||e.nodeName!=="TABLE"&&!ZN(e)?!1:[...t.childNodes].every(r=>Yg(r))}function ZN(t){var e;if(t.nodeName!=="TBODY")return!1;const n=t.previousSibling;return n?zt(n)&&n.nodeName==="THEAD"&&!((e=n.textContent)!=null&&e.trim()):!0}function x_(t){const e=t.closest("table");if(!e)return!1;const{parentNode:n}=e;return n?!!n.closest("table"):!0}function k_(t,e){var n;const r=[];for(const s of((n=e.parentNode)==null?void 0:n.childNodes)??[])Yg(s)||r.push(s);return`${(r.indexOf(e)===0?"| ":" ")+t.trim()} |`}var yhe=new ghe({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:t=>t.nodeName==="LI"&&t.hasAttribute("data-task-list-item"),replacement:(t,e)=>`- ${e.hasAttribute("data-checked")?"[x]":"[ ]"} ${t.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(t,e)=>Yg(e)?"":k_(t,e)}).addRule("tableRow",{filter:"tr",replacement:(t,e)=>{let n="";const r={left:":--",right:"--:",center:":-:"},o=[...e.childNodes].filter(i=>!Yg(i));if(o0(e))for(const i of o){if(!zt(i))continue;let s="---";const l=(i.getAttribute("align")??"").toLowerCase();l&&(s=r[l]||s),n+=k_(s,i)}return` -${t}${n?` -${n}`:""}`}}).addRule("table",{filter:t=>{if(t.nodeName!=="TABLE"||x_(t))return!1;const e=[...t.rows].filter(n=>!vhe(n));return o0(e[0])},replacement:t=>(t=t.replace(` +`}tablerow(t){return` +${t} +`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
    ":"
    "}del(t){return`${t}`}link(t,n,r){if(t=w_(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let o='
    ",o}image(t,n,r){if(t=w_(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let o=`${r}":">",o}text(t){return t}}class r${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,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class o${constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[t];do o++,r=t+"-"+o;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=o,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class ea{constructor(t){this.options=t||Cl,this.options.renderer=this.options.renderer||new Ck,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new r$,this.slugger=new o$}static parse(t,n){return new ea(n).parse(t)}static parseInline(t,n){return new ea(n).parseInline(t)}parse(t,n=!0){let r="",o,i,s,l,a,u,c,d,h,f,p,g,m,v,y,b,w,k,x;const S=t.length;for(o=0;o0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=k+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=k+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:k}):v+=k),v+=this.parse(y.tokens,m),h+=this.renderer.listitem(v,w,b);r+=this.renderer.list(h,p,g);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(h=f.tokens?this.parseInline(f.tokens):f.text;o+1{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+Gn(r.message+"",!0)+"
    ";if(t)return Promise.resolve(o);if(n){n(null,o);return}return o}if(t)return Promise.reject(r);if(n){n(r);return}throw r}}function i$(e,t){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);const i={...r};r={..._e.defaults,...i};const s=The(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(Ehe(r),r.hooks&&(r.hooks.options=r),o){const l=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=e(n,r)}catch(d){return s(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&_e.walkTokens(a,r.walkTokens),h=t(a,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(f){d=f}return r.highlight=l,d?s(d):o(null,h)};if(!l||l.length<3||(delete r.highlight,!a.length))return u();let c=0;_e.walkTokens(a,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(h,f){if(h)return u(h);f!=null&&f!==d.text&&(d.text=f,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>e(l,r)).then(l=>r.walkTokens?Promise.all(_e.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>t(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));const l=e(n,r);r.walkTokens&&_e.walkTokens(l,r.walkTokens);let a=t(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return s(l)}}}function _e(e,t,n){return i$(Js.lex,ea.parse)(e,t,n)}_e.options=_e.setOptions=function(e){return _e.defaults={..._e.defaults,...e},uhe(_e.defaults),_e};_e.getDefaults=JN;_e.defaults=Cl;_e.use=function(...e){const t=_e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r={...n};if(r.async=_e.defaults.async||r.async||!1,n.extensions&&(n.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 l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}: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)}),r.extensions=t),n.renderer){const o=_e.defaults.renderer||new Ck;for(const i in n.renderer){const s=o[i];o[i]=(...l)=>{let a=n.renderer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.renderer=o}if(n.tokenizer){const o=_e.defaults.tokenizer||new Sk;for(const i in n.tokenizer){const s=o[i];o[i]=(...l)=>{let a=n.tokenizer[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.tokenizer=o}if(n.hooks){const o=_e.defaults.hooks||new qg;for(const i in n.hooks){const s=o[i];qg.passThroughHooks.has(i)?o[i]=l=>{if(_e.defaults.async)return Promise.resolve(n.hooks[i].call(o,l)).then(u=>s.call(o,u));const a=n.hooks[i].call(o,l);return s.call(o,a)}:o[i]=(...l)=>{let a=n.hooks[i].apply(o,l);return a===!1&&(a=s.apply(o,l)),a}}r.hooks=o}if(n.walkTokens){const o=_e.defaults.walkTokens;r.walkTokens=function(i){let s=[];return s.push(n.walkTokens.call(this,i)),o&&(s=s.concat(o.call(this,i))),s}}_e.setOptions(r)})};_e.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(_e,r)),r.type){case"table":{for(const o of r.header)n=n.concat(_e.walkTokens(o.tokens,t));for(const o of r.rows)for(const i of o)n=n.concat(_e.walkTokens(i.tokens,t));break}case"list":{n=n.concat(_e.walkTokens(r.items,t));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(o){n=n.concat(_e.walkTokens(r[o],t))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,t)))}return n};_e.parseInline=i$(Js.lexInline,ea.parseInline);_e.Parser=ea;_e.parser=ea.parse;_e.Renderer=Ck;_e.TextRenderer=r$;_e.Lexer=Js;_e.lexer=Js.lex;_e.Tokenizer=Sk;_e.Slugger=o$;_e.Hooks=qg;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;ea.parse;Js.lex;var Ahe=Object.defineProperty,_he=Object.getOwnPropertyDescriptor,Mv=(e,t,n,r)=>{for(var o=r>1?void 0:r?_he(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Ahe(t,n,o),o},Rhe=cm(Lh);function Mhe(e){return Ihe.turndown(e)}function l0(e){const t=e.parentNode;if(!zt(t))return!1;if(t.nodeName==="THEAD")return!0;if(t.nodeName!=="TABLE"&&!s$(t))return!1;const n=[...e.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function Zg(e){return zt(e)&&e.matches("th[data-controller-cell]")}function Ohe(e){const t=e.parentNode;return!zt(t)||t.nodeName!=="TABLE"&&!s$(t)?!1:[...e.childNodes].every(r=>Zg(r))}function s$(e){var t;if(e.nodeName!=="TBODY")return!1;const n=e.previousSibling;return n?zt(n)&&n.nodeName==="THEAD"&&!((t=n.textContent)!=null&&t.trim()):!0}function C_(e){const t=e.closest("table");if(!t)return!1;const{parentNode:n}=t;return n?!!n.closest("table"):!0}function T_(e,t){var n;const r=[];for(const s of((n=t.parentNode)==null?void 0:n.childNodes)??[])Zg(s)||r.push(s);return`${(r.indexOf(t)===0?"| ":" ")+e.trim()} |`}var Ihe=new Rhe({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)=>Zg(t)?"":T_(e,t)}).addRule("tableRow",{filter:"tr",replacement:(e,t)=>{let n="";const r={left:":--",right:"--:",center:":-:"},o=[...t.childNodes].filter(i=>!Zg(i));if(l0(t))for(const i of o){if(!zt(i))continue;let s="---";const l=(i.getAttribute("align")??"").toLowerCase();l&&(s=r[l]||s),n+=T_(s,i)}return` +${e}${n?` +${n}`:""}`}}).addRule("table",{filter:e=>{if(e.nodeName!=="TABLE"||C_(e))return!1;const t=[...e.rows].filter(n=>!Ohe(n));return l0(t[0])},replacement:e=>(e=e.replace(` `,` `),` -${t} +${e} -`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(t){return t}}).keep(t=>t.nodeName==="TABLE"&&!o0(t.rows[0])).keep(t=>t.nodeName==="TABLE"&&x_(t)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return`~${t}~`}}).addRule("fencedCodeBlock",{filter:(t,e)=>!!(e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"),replacement:(t,e,n)=>{var r,o;we(zt(e.firstChild),{code:re.EXTENSION,message:`Invalid node \`${(r=e.firstChild)==null?void 0:r.nodeName}\` encountered for codeblock when converting html to markdown.`});const s=((o=(e.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:o[1])??e.firstChild.getAttribute("data-code-block-language")??"";return` +`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(e){return e}}).keep(e=>e.nodeName==="TABLE"&&!l0(e.rows[0])).keep(e=>e.nodeName==="TABLE"&&C_(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,n)=>{var r,o;we(zt(t.firstChild),{code:re.EXTENSION,message:`Invalid node \`${(r=t.firstChild)==null?void 0:r.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` ${n.fence}${s} -${e.firstChild.textContent} +${t.firstChild.textContent} ${n.fence} -`}});_e.use({renderer:{list(t,e,n){return e?`
      -${t}
    -`:`
      -${t}
    -`},listitem(t,e,n){return e?`
  • ${t}
  • -`:`
  • ${t}
  • -`}}});function bhe(t,e){return _e(t,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:e})}function whe(t){we(typeof document,{code:re.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const e=new DOMParser().parseFromString(`${t}`,"text/html");return e.normalize(),QN(e.body),e.body.innerHTML}function QN(t){if(!$z(t)){if(!zt(t)||/^(script|iframe|object|embed|svg)$/i.test(t.tagName))return t==null?void 0:t.remove();for(const{name:e}of t.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(e)||t.attributes.removeNamedItem(e);for(const e of t.childNodes)QN(e)}}var nu=class extends yt{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Ur.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let o=this.options.markdownToHtml(t,this.options.htmlSanitizer);o=!(e!=null&&e.alwaysWrapInBlock)&&o.startsWith("

    <")&&o.endsWith(`

    -`)?o.slice(3,-5):`
    ${o}
    `;const i=this.store.stringHandlers.html({content:o,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Tv([de()],nu.prototype,"insertMarkdown",1);Tv([bt()],nu.prototype,"getMarkdown",1);Tv([de()],nu.prototype,"toggleBoldMarkdown",1);nu=Tv([Pe({defaultOptions:{htmlToMarkdown:mhe,markdownToHtml:bhe,htmlSanitizer:whe,activeNodes:[Ee.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],nu);var xhe=Object.defineProperty,khe=Object.getOwnPropertyDescriptor,xk=(t,e,n,r)=>{for(var o=r>1?void 0:r?khe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&xhe(e,n,o),o},Ehe={icon:"strikethrough",label:({t})=>t(ES.LABEL),description:({t})=>t(ES.DESCRIPTION)},Mh=class extends ea{get name(){return"strike"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"s",getAttrs:t.parse},{tag:"del",getAttrs:t.parse},{tag:"strike",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...e.parseDOM??[]],toDOM:n=>["s",t.dom(n),0]}}toggleStrike(){return Ws({type:this.type})}shortcut(t){return this.toggleStrike()(t)}createInputRules(){return[Kd({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};xk([de(Ehe)],Mh.prototype,"toggleStrike",1);xk([nn({shortcut:oe.Strike,command:"toggleStrike"})],Mh.prototype,"shortcut",1);Mh=xk([Pe({})],Mh);var E_=new gl("trailingNode");function She(t){const{ignoredNodes:e=[],nodeName:n="paragraph"}=t??{},r=Mc([...e,n]);let o,i;return new gi({key:E_,appendTransaction(s,l,a){const{doc:u,tr:c}=a,d=E_.getState(a),h=u.content.size;if(d)return c.insert(h,o.create())},state:{init:(s,{doc:l,schema:a})=>{var u;const c=a.nodes[n];if(!c)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=c,i=Object.values(a.nodes).map(d=>d).filter(d=>!r.includes(d.name)),sr(i,(u=l.lastChild)==null?void 0:u.type)},apply:(s,l)=>{var a;return s.docChanged?sr(i,(a=s.doc.lastChild)==null?void 0:a.type):l}}})}var Che=Object.defineProperty,The=Object.getOwnPropertyDescriptor,Ahe=(t,e,n,r)=>{for(var o=r>1?void 0:r?The(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Che(e,n,o),o},eb=class extends yt{get name(){return"trailingNode"}onSetOptions(t){const{changes:e}=t;(e.disableTags.changed||e.ignoredNodes.changed||e.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:t}=this.store,{disableTags:e,nodeName:n}=this.options,r=e?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...t.lastNodeCompatible];return[She({ignoredNodes:r,nodeName:n})]}};eb=Ahe([Pe({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],eb);var _he=Object.defineProperty,Rhe=Object.getOwnPropertyDescriptor,kk=(t,e,n,r)=>{for(var o=r>1?void 0:r?Rhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&_he(e,n,o),o},Mhe={icon:"underline",label:({t})=>t(SS.LABEL),description:({t})=>t(SS.DESCRIPTION)},Oh=class extends ea{get name(){return"underline"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:t.defaults(),parseDOM:[{tag:"u",getAttrs:t.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...e.parseDOM??[]],toDOM:n=>["u",t.dom(n),0]}}toggleUnderline(t){return Ws({type:this.type,selection:t})}shortcut(t){return this.toggleUnderline()(t)}};kk([de(Mhe)],Oh.prototype,"toggleUnderline",1);kk([nn({shortcut:oe.Underline,command:"toggleUnderline"})],Oh.prototype,"shortcut",1);Oh=kk([Pe({})],Oh);/* +`}});_e.use({renderer:{list(e,t,n){return t?`
      +${e}
    +`:`
      +${e}
    +`},listitem(e,t,n){return t?`
  • ${e}
  • +`:`
  • ${e}
  • +`}}});function Lhe(e,t){return _e(e,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:t})}function Nhe(e){we(typeof document,{code:re.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(),a$(t.body),t.body.innerHTML}function a$(e){if(!Vz(e)){if(!zt(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)a$(t)}}var iu=class extends gt{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?t=>{const n=document.createElement("div"),r=jr.fromSchema(this.store.schema);return n.append(r.serializeFragment(t.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return n=>{const{state:r}=n;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:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...t,replaceEmptyParentBlock:!0})(n)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};Mv([le()],iu.prototype,"insertMarkdown",1);Mv([lt()],iu.prototype,"getMarkdown",1);Mv([le()],iu.prototype,"toggleBoldMarkdown",1);iu=Mv([De({defaultOptions:{htmlToMarkdown:Mhe,markdownToHtml:Lhe,htmlSanitizer:Nhe,activeNodes:[Ee.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],iu);var $he=Object.defineProperty,Dhe=Object.getOwnPropertyDescriptor,Tk=(e,t,n,r)=>{for(var o=r>1?void 0:r?Dhe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&$he(t,n,o),o},Phe={icon:"strikethrough",label:({t:e})=>e(AS.LABEL),description:({t:e})=>e(AS.DESCRIPTION)},Nh=class extends oa{get name(){return"strike"}createTags(){return[Ee.FontStyle,Ee.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:n=>n==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:n=>["s",e.dom(n),0]}}toggleStrike(){return Ks({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Zd({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};Tk([le(Phe)],Nh.prototype,"toggleStrike",1);Tk([nn({shortcut:oe.Strike,command:"toggleStrike"})],Nh.prototype,"shortcut",1);Nh=Tk([De({})],Nh);var A_=new yl("trailingNode");function zhe(e){const{ignoredNodes:t=[],nodeName:n="paragraph"}=e??{},r=Lc([...t,n]);let o,i;return new yi({key:A_,appendTransaction(s,l,a){const{doc:u,tr:c}=a,d=A_.getState(a),h=u.content.size;if(d)return c.insert(h,o.create())},state:{init:(s,{doc:l,schema:a})=>{var u;const c=a.nodes[n];if(!c)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=c,i=Object.values(a.nodes).map(d=>d).filter(d=>!r.includes(d.name)),ar(i,(u=l.lastChild)==null?void 0:u.type)},apply:(s,l)=>{var a;return s.docChanged?ar(i,(a=s.doc.lastChild)==null?void 0:a.type):l}}})}var Fhe=Object.defineProperty,Bhe=Object.getOwnPropertyDescriptor,Hhe=(e,t,n,r)=>{for(var o=r>1?void 0:r?Bhe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Fhe(t,n,o),o},ob=class extends gt{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:n}=this.options,r=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[zhe({ignoredNodes:r,nodeName:n})]}};ob=Hhe([De({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],ob);var Uhe=Object.defineProperty,Whe=Object.getOwnPropertyDescriptor,Ak=(e,t,n,r)=>{for(var o=r>1?void 0:r?Whe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Uhe(t,n,o),o},Vhe={icon:"underline",label:({t:e})=>e(_S.LABEL),description:({t:e})=>e(_S.DESCRIPTION)},$h=class extends oa{get name(){return"underline"}createTags(){return[Ee.FontStyle,Ee.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...t.parseDOM??[]],toDOM:n=>["u",e.dom(n),0]}}toggleUnderline(e){return Ks({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};Ak([le(Vhe)],$h.prototype,"toggleUnderline",1);Ak([nn({shortcut:oe.Underline,command:"toggleUnderline"})],$h.prototype,"shortcut",1);$h=Ak([De({})],$h);/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const S_={};function Ohe(t,e){if(S_[t])return;const n=document.createElement("style"),r=Ihe(t)/1e4,o=Lhe({h:Math.abs(r),s:.6,v:.6}),i=Nhe(o);n.type="text/css",n.textContent=` - .remirror-editor-wrapper .${e}${t}::before { - content: '[${t}]'; + */const __={};function jhe(e,t){if(__[e])return;const n=document.createElement("style"),r=Ghe(e)/1e4,o=Khe({h:Math.abs(r),s:.6,v:.6}),i=Yhe(o);n.type="text/css",n.textContent=` + .remirror-editor-wrapper .${t}${e}::before { + content: '[${e}]'; font-family: monospace; font-size: 90%; color: ${i}; } - .remirror-editor-wrapper .${e}${t}::after { - content: '[/${t}]'; + .remirror-editor-wrapper .${t}${e}::after { + content: '[/${e}]'; font-family: monospace; font-size: 90%; color: ${i}; } - `,document.head.appendChild(n),S_[t]=!0}function Ihe(t){let e=0;if(!t||t.length===0)return e;for(let n=0;n{for(var o=r>1?void 0:r?Dhe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&$he(e,n,o),o};const Dp="__editor_";let ru=class extends ea{get name(){return"className"}constructor(t){super(t);for(const e of t.classNames||[])Ohe(e,Dp)}createTags(){return[Ee.FormattingMark]}createMarkSpec(t,e){return{...e,attrs:{...t.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:n=>{var r;if(!zt(n))return!1;for(let o of n.classList)if(o.startsWith(Dp)&&(o=o.substring(Dp.length)),((r=this.options.classNames)==null?void 0:r.indexOf(o))>=0)return{...t.parse(n),className:o};return!1}},...e.parseDOM??[]],toDOM:n=>{const{className:r,...o}=gm(n.attrs,t),i=t.dom(n),s=i.className,l=Phe(r,s);return["span",{...o,...i,class:l},0]}}}setClassName(t,e){return this.store.commands.applyMark.original(this.type,{className:t},e)}removeClassName(t){return this.store.commands.removeMark.original({type:this.type,selection:t,expand:!0})}};Ek([de({})],ru.prototype,"setClassName",1);Ek([de({})],ru.prototype,"removeClassName",1);ru=Ek([Pe({defaultOptions:{}})],ru);function Phe(t,e){return t&&(t=`${Dp}${t}`),t&&e?`${t} ${e}`:t||e}/* + `,document.head.appendChild(n),__[e]=!0}function Ghe(e){let t=0;if(!e||e.length===0)return t;for(let n=0;n{for(var o=r>1?void 0:r?qhe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&Xhe(t,n,o),o};const Bp="__editor_";let su=class extends oa{get name(){return"className"}constructor(e){super(e);for(const t of e.classNames||[])jhe(t,Bp)}createTags(){return[Ee.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:{...e.defaults(),className:{}},parseDOM:[{tag:"*",getAttrs:n=>{var r;if(!zt(n))return!1;for(let o of n.classList)if(o.startsWith(Bp)&&(o=o.substring(Bp.length)),((r=this.options.classNames)==null?void 0:r.indexOf(o))>=0)return{...e.parse(n),className:o};return!1}},...t.parseDOM??[]],toDOM:n=>{const{className:r,...o}=bm(n.attrs,e),i=e.dom(n),s=i.className,l=Zhe(r,s);return["span",{...o,...i,class:l},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})}};_k([le({})],su.prototype,"setClassName",1);_k([le({})],su.prototype,"removeClassName",1);su=_k([De({defaultOptions:{}})],su);function Zhe(e,t){return e&&(e=`${Bp}${e}`),e&&t?`${e} ${t}`:e||t}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function JN(t){const[e,n]=P.useState(t),r=P.useRef(t);return r.current=e,[e,n,r]}Sk.displayName="abap";Sk.aliases=[];function Sk(t){t.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}fr.displayName="clike";fr.aliases=[];function fr(t){t.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:/[{}[\];(),.:]/}}aa.displayName="javascript";aa.aliases=["js"];function aa(t){t.register(fr),t.languages.javascript=t.languages.extend("clike",{"class-name":[t.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}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.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:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.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:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.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:t.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"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.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")),t.languages.js=t.languages.javascript}Ck.displayName="actionscript";Ck.aliases=[];function Ck(t){t.register(aa),t.languages.actionscript=t.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),t.languages.actionscript["class-name"].alias="function",delete t.languages.actionscript.parameter,delete t.languages.actionscript["literal-property"],t.languages.markup&&t.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:t.languages.markup}})}Tk.displayName="bash";Tk.aliases=["sh","shell"];function Tk(t){(function(e){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,l=0;l?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}_k.displayName="batch";_k.aliases=[];function _k(t){(function(e){var n=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:r,variable:n,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:r,variable:n,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:r,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(t)}lf.displayName="c";lf.aliases=[];function lf(t){t.register(fr),t.languages.c=t.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),t.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),t.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},t.languages.c.string],char:t.languages.c.char,comment:t.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:t.languages.c}}}}),t.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete t.languages.c.boolean}Rk.displayName="clojure";Rk.aliases=[];function Rk(t){t.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}Mk.displayName="cmake";Mk.aliases=[];function Mk(t){t.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}Ok.displayName="cobol";Ok.aliases=[];function Ok(t){t.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}Ik.displayName="coffeescript";Ik.aliases=["coffee"];function Ik(t){t.register(aa),function(e){var n=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(t)}Lk.displayName="cpp";Lk.aliases=[];function Lk(t){t.register(lf),function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(t)}Nk.displayName="csharp";Nk.aliases=["cs","dotnet"];function Nk(t){t.register(fr),function(e){function n(D,F){return D.replace(/<<(\d+)>>/g,function(U,W){return"(?:"+F[+W]+")"})}function r(D,F,U){return RegExp(n(D,F),U||"")}function o(D,F){for(var U=0;U>/g,function(){return"(?:"+D+")"});return D.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function s(D){return"\\b(?:"+D.trim().replace(/ /g,"|")+")\\b"}var l=s(i.typeDeclaration),a=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=s(i.typeDeclaration+" "+i.contextual+" "+i.other),c=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=o(/\((?:[^()]|<>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,p=n(/<<0>>(?:\s*<<1>>)?/.source,[f,d]),g=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,p]),m=/\[\s*(?:,\s*)*\]/.source,v=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,m]),y=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,h,m]),b=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),w=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,m]),k={keyword:a,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,w]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,p]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,c,f]),inside:k}],keyword:a,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,d]),inside:{function:r(/^<<0>>/.source,[f]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,p,f,w,a.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:a,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=S+"|"+x,O=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),_=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),R=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,A=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,_]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[R,A]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[R]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[_]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,M=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),I=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,E]),N=o(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,E]);function $(D,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[D]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:$(I,M)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:$(L,N)}],char:{pattern:RegExp(x),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(t)}cf.displayName="css";cf.aliases=[];function cf(t){(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(t)}$k.displayName="csv";$k.aliases=[];function $k(t){t.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}Dk.displayName="d";Dk.aliases=[];function Dk(t){t.register(fr),t.languages.d=t.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),t.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),t.languages.insertBefore("d","keyword",{property:/\B@\w*/}),t.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}Pk.displayName="dart";Pk.aliases=[];function Pk(t){t.register(fr),function(e){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[o,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(t)}vu.displayName="markup";vu.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function vu(t){t.languages.markup={comment:{pattern://,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"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\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:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}El.displayName="markup-templating";El.aliases=[];function El(t){t.register(vu),function(e){function n(r,o){return"___"+r.toUpperCase()+o+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,o,i,s){if(r.language===o){var l=r.tokenStack=[];r.code=r.code.replace(i,function(a){if(typeof s=="function"&&!s(a))return a;for(var u=l.length,c;r.code.indexOf(c=n(o,u))!==-1;)++u;return l[u]=a,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,o){if(r.language!==o||!r.tokenStack)return;r.grammar=e.languages[o];var i=0,s=Object.keys(r.tokenStack);function l(a){for(var u=0;u=s.length);u++){var c=a[u];if(typeof c=="string"||c.content&&typeof c.content=="string"){var d=s[i],h=r.tokenStack[d],f=typeof c=="string"?c:c.content,p=n(o,d),g=f.indexOf(p);if(g>-1){++i;var m=f.substring(0,g),v=new e.Token(o,e.tokenize(h,r.grammar),"language-"+o,h),y=f.substring(g+p.length),b=[];m&&b.push.apply(b,l([m])),b.push(v),y&&b.push.apply(b,l([y])),typeof c=="string"?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&l(c.content)}return a}l(r.tokens)}}})}(t)}zk.displayName="django";zk.aliases=["jinja2"];function zk(t){t.register(El),function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"django",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"jinja2",n)}),e.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"jinja2")})}(t)}Fk.displayName="docker";Fk.aliases=["dockerfile"];function Fk(t){(function(e){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return n}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},l={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(u,c){return u=u.replace(//g,function(){return i}).replace(//g,function(){return r}),RegExp(u,c)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:l,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:l},e.languages.dockerfile=e.languages.docker})(t)}Bk.displayName="eiffel";Bk.aliases=[];function Bk(t){t.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}Hk.displayName="ejs";Hk.aliases=["eta"];function Hk(t){t.register(aa),t.register(El),function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(n){var r=/<%(?!%)[\s\S]+?%>/g;e.languages["markup-templating"].buildPlaceholders(n,"ejs",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),e.languages.eta=e.languages.ejs}(t)}Uk.displayName="elixir";Uk.aliases=[];function Uk(t){t.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},t.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:t.languages.elixir}}}})}Wk.displayName="elm";Wk.aliases=[];function Wk(t){t.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}Vk.displayName="erlang";Vk.aliases=[];function Vk(t){t.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}jk.displayName="fortran";jk.aliases=[];function jk(t){t.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}Gk.displayName="fsharp";Gk.aliases=[];function Gk(t){t.register(fr),t.languages.fsharp=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),t.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),t.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),t.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:t.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}Kk.displayName="git";Kk.aliases=[];function Kk(t){t.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}Yk.displayName="go";Yk.aliases=[];function Yk(t){t.register(fr),t.languages.go=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),t.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete t.languages.go["class-name"]}Xk.displayName="gradle";Xk.aliases=[];function Xk(t){t.register(fr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.gradle=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.gradle}(t)}qk.displayName="graphql";qk.aliases=[];function qk(t){t.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:t.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},t.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var r=n.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),o=0;function i(m){return r[o+m]}function s(m,v){v=v||0;for(var y=0;y0)){var f=l(/^\{$/,/^\}$/);if(f===-1)continue;for(var p=o;p=0&&a(g,"variable-input")}}}}})}Zk.displayName="groovy";Zk.aliases=[];function Zk(t){t.register(fr),function(e){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=e.languages.groovy}(t)}Qk.displayName="handlebars";Qk.aliases=["hbs","mustache"];function Qk(t){t.register(El),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(n){var r=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;e.languages["markup-templating"].buildPlaceholders(n,"handlebars",r)}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),e.languages.hbs=e.languages.handlebars,e.languages.mustache=e.languages.handlebars}(t)}Jk.displayName="ignore";Jk.aliases=["gitignore","hgignore","npmignore"];function Jk(t){(function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore})(t)}Av.displayName="java";Av.aliases=[];function Av(t){t.register(fr),function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(t)}eE.displayName="json";eE.aliases=["webmanifest"];function eE(t){t.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},t.languages.webmanifest=t.languages.json}tE.displayName="jsx";tE.aliases=[];function tE(t){t.register(aa),t.register(vu),function(e){var n=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(u,c){return u=u.replace(//g,function(){return r}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(u,c)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},a=function(u){for(var c=[],d=0;d0&&c[c.length-1].tagName===l(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content==="/>"||c.push({tagName:l(h.content[0].content[1]),openedBraces:0}):c.length>0&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:f=!0),(f||typeof h=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var p=l(h);d0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(p=l(u[d-1])+p,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",p,null,p)}h.content&&typeof h.content!="string"&&a(h.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||a(u.tokens)})}(t)}nE.displayName="kotlin";nE.aliases=["kt","kts"];function nE(t){t.register(fr),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(t)}rE.displayName="latex";rE.aliases=["context","tex"];function rE(t){(function(e){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:n,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex})(t)}oE.displayName="liquid";oE.aliases=[];function oE(t){t.register(El),t.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},t.hooks.add("before-tokenize",function(e){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,r=!1;t.languages["markup-templating"].buildPlaceholders(e,"liquid",n,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!r)return r=!0,!0;if(s==="endraw")return r=!1,!0}return!r})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"liquid")})}iE.displayName="lisp";iE.aliases=["elisp","emacs","emacs-lisp"];function iE(t){(function(e){function n(p){return RegExp(/(\()/.source+"(?:"+p+")"+/(?=[\s\)])/.source)}function r(p){return RegExp(/([\s([])/.source+"(?:"+p+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",l="(?=\\))",a="(?=\\s)",u=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+u+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+u+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:c},h="\\S+(?:\\s+\\S+)*",f={pattern:RegExp(s+u+l),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+h),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+h),inside:d},keys:{pattern:RegExp("&key\\s+"+h+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=f,c.defun.inside.arguments=e.util.clone(f),c.defun.inside.arguments.inside.sublist=f,e.languages.lisp=c,e.languages.elisp=c,e.languages.emacs=c,e.languages["emacs-lisp"]=c})(t)}sE.displayName="lua";sE.aliases=[];function sE(t){t.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}aE.displayName="makefile";aE.aliases=[];function aE(t){t.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}lE.displayName="markdown";lE.aliases=["md"];function lE(t){t.register(vu),function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(a){l!==a&&(e.languages.markdown[l].inside.content.inside[a]=e.languages.markdown[a])})}),e.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var c=0,d=u.length;c]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}uE.displayName="perl";uE.aliases=[];function uE(t){(function(e){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(t)}dE.displayName="php";dE.aliases=[];function dE(t){t.register(El),function(e){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(u,"php",c)}}),e.hooks.add("after-tokenize",function(u){e.languages["markup-templating"].tokenizePlaceholders(u,"php")})}(t)}hE.displayName="sql";hE.aliases=[];function hE(t){t.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}fE.displayName="plsql";fE.aliases=[];function fE(t){t.register(hE),t.languages.plsql=t.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),t.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}pE.displayName="powershell";pE.aliases=[];function pE(t){(function(e){var n=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(t)}gE.displayName="protobuf";gE.aliases=[];function gE(t){t.register(fr),function(e){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(t)}mE.displayName="python";mE.aliases=["py"];function mE(t){t.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.python["string-interpolation"].inside.interpolation.inside.rest=t.languages.python,t.languages.py=t.languages.python}vE.displayName="regex";vE.aliases=[];function vE(t){(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+r.source+")",l=RegExp(s+"-"+s),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":i,escape:r}},"special-escape":n,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(t)}bE.displayName="rust";bE.aliases=[];function bE(t){(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(t)}wE.displayName="sass";wE.aliases=[];function wE(t){t.register(cf),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}xE.displayName="scala";xE.aliases=[];function xE(t){t.register(Av),t.languages.scala=t.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),t.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.scala}}},string:/[\s\S]+/}}}),delete t.languages.scala["class-name"],delete t.languages.scala.function,delete t.languages.scala.constant}kE.displayName="scss";kE.aliases=[];function kE(t){t.register(cf),t.languages.scss=t.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),t.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),t.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),t.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),t.languages.scss.atrule.inside.rest=t.languages.scss}EE.displayName="smalltalk";EE.aliases=[];function EE(t){t.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}SE.displayName="swift";SE.aliases=[];function SE(t){t.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},t.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=t.languages.swift})}CE.displayName="toml";CE.aliases=[];function CE(t){(function(e){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(o){return o.replace(/__/g,function(){return n})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}TE.displayName="typescript";TE.aliases=["ts"];function TE(t){t.register(aa),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(t)}AE.displayName="unrealscript";AE.aliases=["uc","uscript"];function AE(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}_E.displayName="yaml";_E.aliases=["yml"];function _E(t){(function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return a});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(s),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(t)}RE.displayName="zig";RE.aliases=[];function RE(t){(function(e){function n(u){return function(){return u}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,n(i)),l=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,n(o)),a="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+l+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(u){u.inside===null&&(u.inside=e.languages.zig)})})(t)}/* + */function l$(e){const[t,n]=P.useState(e),r=P.useRef(e);return r.current=t,[t,n,r]}function Qhe(){const{getState:e,getPluginState:t}=So({autoUpdate:!0}),{doc:n,selection:r}=e(),{from:o,to:i}=Mr(r,n),s=t("annotation");let l=R_,a=M_;for(const u of s.annotations)(ii(o,u.from,u.to)||ii(i,u.from,u.to)||ii(u.from,o,i)||ii(u.to,o,i))&&(a===M_&&(a=[]),a.push(u.id)),l===R_&&(l=[]),l.push(u);return{selected:a,available:l}}const R_=[],M_=[];Rk.displayName="abap";Rk.aliases=[];function Rk(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}pr.displayName="clike";pr.aliases=[];function pr(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:/[{}[\];(),.:]/}}da.displayName="javascript";da.aliases=["js"];function da(e){e.register(pr),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:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),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}Mk.displayName="actionscript";Mk.aliases=[];function Mk(e){e.register(da),e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}Ok.displayName="bash";Ok.aliases=["sh","shell"];function Ok(e){(function(t){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=o.variable[1].inside,l=0;l?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}Lk.displayName="batch";Lk.aliases=[];function Lk(e){(function(t){var n=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},o=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;t.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:o,parameter:r,variable:n,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:o,parameter:r,variable:n,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:o,parameter:r,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:o,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(e)}hf.displayName="c";hf.aliases=[];function hf(e){e.register(pr),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Nk.displayName="clojure";Nk.aliases=[];function Nk(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}$k.displayName="cmake";$k.aliases=[];function $k(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}Dk.displayName="cobol";Dk.aliases=[];function Dk(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}Pk.displayName="coffeescript";Pk.aliases=["coffee"];function Pk(e){e.register(da),function(t){var n=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:r}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript}(e)}zk.displayName="cpp";zk.aliases=[];function zk(e){e.register(hf),function(t){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])}(e)}Fk.displayName="csharp";Fk.aliases=["cs","dotnet"];function Fk(e){e.register(pr),function(t){function n(D,F){return D.replace(/<<(\d+)>>/g,function(U,W){return"(?:"+F[+W]+")"})}function r(D,F,U){return RegExp(n(D,F),U||"")}function o(D,F){for(var U=0;U>/g,function(){return"(?:"+D+")"});return D.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function s(D){return"\\b(?:"+D.trim().replace(/ /g,"|")+")\\b"}var l=s(i.typeDeclaration),a=RegExp(s(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=s(i.typeDeclaration+" "+i.contextual+" "+i.other),c=s(i.type+" "+i.typeDeclaration+" "+i.other),d=o(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=o(/\((?:[^()]|<>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,p=n(/<<0>>(?:\s*<<1>>)?/.source,[f,d]),g=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,p]),m=/\[\s*(?:,\s*)*\]/.source,v=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,m]),y=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,h,m]),b=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),w=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,g,m]),k={keyword:a,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,w]),lookbehind:!0,inside:k},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,p]),lookbehind:!0,inside:k},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:k},{pattern:r(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:k},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,c,f]),inside:k}],keyword:a,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,g]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,d]),inside:{function:r(/^<<0>>/.source,[f]),generic:{pattern:RegExp(d),alias:"class-name",inside:k}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,p,f,w,a.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,h]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:a,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=S+"|"+x,I=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),_=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),R=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,A=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,_]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[R,A]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[R]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[_]),inside:t.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var E=/:[^}\r\n]+/.source,M=o(n(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),O=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,E]),N=o(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[C]),2),L=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,E]);function $(D,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[D]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,E]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[O]),lookbehind:!0,greedy:!0,inside:$(O,M)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:$(L,N)}],char:{pattern:RegExp(x),greedy:!0}}),t.languages.dotnet=t.languages.cs=t.languages.csharp}(e)}ff.displayName="css";ff.aliases=[];function ff(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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 r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}Bk.displayName="csv";Bk.aliases=[];function Bk(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}Hk.displayName="d";Hk.aliases=[];function Hk(e){e.register(pr),e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}Uk.displayName="dart";Uk.aliases=[];function Uk(e){e.register(pr),function(t){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};t.languages.dart=t.languages.extend("clike",{"class-name":[o,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:o.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),t.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.dart}}},string:/[\s\S]+/}},string:void 0}),t.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),t.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(e)}wu.displayName="markup";wu.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function wu(e){e.languages.markup={comment:{pattern://,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"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},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(n,r){var o={};o["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var s={};s[n]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){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:[n,"language-"+n],inside:e.languages[n]},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}Tl.displayName="markup-templating";Tl.aliases=[];function Tl(e){e.register(wu),function(t){function n(r,o){return"___"+r.toUpperCase()+o+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,o,i,s){if(r.language===o){var l=r.tokenStack=[];r.code=r.code.replace(i,function(a){if(typeof s=="function"&&!s(a))return a;for(var u=l.length,c;r.code.indexOf(c=n(o,u))!==-1;)++u;return l[u]=a,c}),r.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(r,o){if(r.language!==o||!r.tokenStack)return;r.grammar=t.languages[o];var i=0,s=Object.keys(r.tokenStack);function l(a){for(var u=0;u=s.length);u++){var c=a[u];if(typeof c=="string"||c.content&&typeof c.content=="string"){var d=s[i],h=r.tokenStack[d],f=typeof c=="string"?c:c.content,p=n(o,d),g=f.indexOf(p);if(g>-1){++i;var m=f.substring(0,g),v=new t.Token(o,t.tokenize(h,r.grammar),"language-"+o,h),y=f.substring(g+p.length),b=[];m&&b.push.apply(b,l([m])),b.push(v),y&&b.push.apply(b,l([y])),typeof c=="string"?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&l(c.content)}return a}l(r.tokens)}}})}(e)}Wk.displayName="django";Wk.aliases=["jinja2"];function Wk(e){e.register(Tl),function(t){t.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=t.languages["markup-templating"];t.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"django",n)}),t.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"django")}),t.languages.jinja2=t.languages.django,t.hooks.add("before-tokenize",function(o){r.buildPlaceholders(o,"jinja2",n)}),t.hooks.add("after-tokenize",function(o){r.tokenizePlaceholders(o,"jinja2")})}(e)}Vk.displayName="docker";Vk.aliases=["dockerfile"];function Vk(e){(function(t){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,function(){return n}),o=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,function(){return o}),s={pattern:RegExp(o),greedy:!0},l={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(u,c){return u=u.replace(//g,function(){return i}).replace(//g,function(){return r}),RegExp(u,c)}t.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[s,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:a(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:l,string:s,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:l},t.languages.dockerfile=t.languages.docker})(e)}jk.displayName="eiffel";jk.aliases=[];function jk(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}Gk.displayName="ejs";Gk.aliases=["eta"];function Gk(e){e.register(da),e.register(Tl),function(t){t.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:t.languages.javascript}},t.hooks.add("before-tokenize",function(n){var r=/<%(?!%)[\s\S]+?%>/g;t.languages["markup-templating"].buildPlaceholders(n,"ejs",r)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),t.languages.eta=t.languages.ejs}(e)}Kk.displayName="elixir";Kk.aliases=[];function Kk(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}Yk.displayName="elm";Yk.aliases=[];function Yk(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}Xk.displayName="erlang";Xk.aliases=[];function Xk(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}qk.displayName="fortran";qk.aliases=[];function qk(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}Zk.displayName="fsharp";Zk.aliases=[];function Zk(e){e.register(pr),e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}Qk.displayName="git";Qk.aliases=[];function Qk(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}Jk.displayName="go";Jk.aliases=[];function Jk(e){e.register(pr),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}eE.displayName="gradle";eE.aliases=[];function eE(e){e.register(pr),function(t){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.gradle=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),t.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=t.languages.gradle}(e)}tE.displayName="graphql";tE.aliases=[];function tE(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var r=n.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),o=0;function i(m){return r[o+m]}function s(m,v){v=v||0;for(var y=0;y0)){var f=l(/^\{$/,/^\}$/);if(f===-1)continue;for(var p=o;p=0&&a(g,"variable-input")}}}}})}nE.displayName="groovy";nE.aliases=[];function nE(e){e.register(pr),function(t){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.groovy=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),t.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=t.languages.groovy}(e)}rE.displayName="handlebars";rE.aliases=["hbs","mustache"];function rE(e){e.register(Tl),function(t){t.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},t.hooks.add("before-tokenize",function(n){var r=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;t.languages["markup-templating"].buildPlaceholders(n,"handlebars",r)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),t.languages.hbs=t.languages.handlebars,t.languages.mustache=t.languages.handlebars}(e)}oE.displayName="ignore";oE.aliases=["gitignore","hgignore","npmignore"];function oE(e){(function(t){t.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},t.languages.gitignore=t.languages.ignore,t.languages.hgignore=t.languages.ignore,t.languages.npmignore=t.languages.ignore})(e)}Ov.displayName="java";Ov.aliases=[];function Ov(e){e.register(pr),function(t){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:n,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(e)}iE.displayName="json";iE.aliases=["webmanifest"];function iE(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}sE.displayName="jsx";sE.aliases=[];function sE(e){e.register(da),e.register(wu),function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function s(u,c){return u=u.replace(//g,function(){return r}).replace(//g,function(){return o}).replace(//g,function(){return i}),RegExp(u,c)}i=s(i).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:s(//.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},a=function(u){for(var c=[],d=0;d0&&c[c.length-1].tagName===l(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content==="/>"||c.push({tagName:l(h.content[0].content[1]),openedBraces:0}):c.length>0&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:f=!0),(f||typeof h=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var p=l(h);d0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(p=l(u[d-1])+p,u.splice(d-1,1),d--),u[d]=new t.Token("plain-text",p,null,p)}h.content&&typeof h.content!="string"&&a(h.content)}};t.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||a(u.tokens)})}(e)}aE.displayName="kotlin";aE.aliases=["kt","kts"];function aE(e){e.register(pr),function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin}(e)}lE.displayName="latex";lE.aliases=["context","tex"];function lE(e){(function(t){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:n,alias:"regex"}};t.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},t.languages.tex=t.languages.latex,t.languages.context=t.languages.latex})(e)}cE.displayName="liquid";cE.aliases=[];function cE(e){e.register(Tl),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",function(t){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,r=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",n,function(o){var i=/^\{%-?\s*(\w+)/.exec(o);if(i){var s=i[1];if(s==="raw"&&!r)return r=!0,!0;if(s==="endraw")return r=!1,!0}return!r})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")})}uE.displayName="lisp";uE.aliases=["elisp","emacs","emacs-lisp"];function uE(e){(function(t){function n(p){return RegExp(/(\()/.source+"(?:"+p+")"+/(?=[\s\)])/.source)}function r(p){return RegExp(/([\s([])/.source+"(?:"+p+")"+/(?=[\s)])/.source)}var o=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+o,s="(\\()",l="(?=\\))",a="(?=\\s)",u=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,c={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+o+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+o),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+o),alias:"property"},splice:{pattern:RegExp(",@?"+o),alias:["symbol","variable"]},keyword:[{pattern:RegExp(s+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(s+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(s+"def(?:const|custom|group|var)\\s+"+o),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(o)}},defun:{pattern:RegExp(s+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+o+/\s+\(/.source+u+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+o),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(s+"lambda\\s+\\(\\s*(?:&?"+o+"(?:\\s+&?"+o+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(s+o),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},d={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+o+/\s+(?=\S)/.source+u+/\)/.source),inside:c},argument:{pattern:RegExp(/(^|[\s(])/.source+o),lookbehind:!0,alias:"variable"},rest:c},h="\\S+(?:\\s+\\S+)*",f={pattern:RegExp(s+u+l),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+h),inside:d},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+h),inside:d},keys:{pattern:RegExp("&key\\s+"+h+"(?:\\s+&allow-other-keys)?"),inside:d},argument:{pattern:RegExp(o),alias:"variable"},punctuation:/[()]/}};c.lambda.inside.arguments=f,c.defun.inside.arguments=t.util.clone(f),c.defun.inside.arguments.inside.sublist=f,t.languages.lisp=c,t.languages.elisp=c,t.languages.emacs=c,t.languages["emacs-lisp"]=c})(e)}dE.displayName="lua";dE.aliases=[];function dE(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}hE.displayName="makefile";hE.aliases=[];function hE(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}fE.displayName="markdown";fE.aliases=["md"];function fE(e){e.register(wu),function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(a){l!==a&&(t.languages.markdown[l].inside.content.inside[a]=t.languages.markdown[a])})}),t.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var c=0,d=u.length;c]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}gE.displayName="perl";gE.aliases=[];function gE(e){(function(t){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;t.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}mE.displayName="php";mE.aliases=[];function mE(e){e.register(Tl),function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],o=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:o,operator:i,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];t.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:o,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;t.languages["markup-templating"].buildPlaceholders(u,"php",c)}}),t.hooks.add("after-tokenize",function(u){t.languages["markup-templating"].tokenizePlaceholders(u,"php")})}(e)}vE.displayName="sql";vE.aliases=[];function vE(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}yE.displayName="plsql";yE.aliases=[];function yE(e){e.register(vE),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}bE.displayName="powershell";bE.aliases=[];function bE(e){(function(t){var n=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(e)}wE.displayName="protobuf";wE.aliases=[];function wE(e){e.register(pr),function(t){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;t.languages.protobuf=t.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),t.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(e)}xE.displayName="python";xE.aliases=["py"];function xE(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}kE.displayName="regex";kE.aliases=[];function kE(e){(function(t){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,o={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},s="(?:[^\\\\-]|"+r.source+")",l=RegExp(s+"-"+s),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":i,escape:r}},"special-escape":n,"char-set":o,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete t.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",o=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;t.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+o),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+o+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),t.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete t.languages.ruby.string,t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),t.languages.rb=t.languages.ruby}(e)}SE.displayName="rust";SE.aliases=[];function SE(e){(function(t){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(e)}CE.displayName="sass";CE.aliases=[];function CE(e){e.register(ff),function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete t.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:r,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}TE.displayName="scala";TE.aliases=[];function TE(e){e.register(Ov),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function,delete e.languages.scala.constant}AE.displayName="scss";AE.aliases=[];function AE(e){e.register(ff),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}_E.displayName="smalltalk";_E.aliases=[];function _E(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}RE.displayName="swift";RE.aliases=[];function RE(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}ME.displayName="toml";ME.aliases=[];function ME(e){(function(t){var n=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(o){return o.replace(/__/g,function(){return n})}t.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(e)}OE.displayName="typescript";OE.aliases=["ts"];function OE(e){e.register(da),function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript}(e)}IE.displayName="unrealscript";IE.aliases=["uc","uscript"];function IE(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}LE.displayName="yaml";LE.aliases=["yml"];function LE(e){(function(t){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return a});return RegExp(c,u)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return o}).replace(/<>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(s),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(e)}NE.displayName="zig";NE.aliases=[];function NE(e){(function(t){function n(u){return function(){return u}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,o="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,s=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,n(i)),l=/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,n(o)),a="(?!\\s)(?:!?\\s*(?:"+s+"\\s*)*"+l+")+";t.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,n(a)).replace(//g,n(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},t.languages.zig["class-name"].forEach(function(u){u.inside===null&&(u.inside=t.languages.zig)})})(e)}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const zhe=[Sk,Ck,Tk,Ak,_k,lf,Rk,Mk,Ok,Ik,Lk,Nk,cf,$k,Dk,Pk,zk,Fk,Bk,Hk,Uk,Wk,Vk,jk,Gk,Kk,Yk,Xk,qk,Zk,Qk,Jk,Av,aa,eE,tE,nE,rE,oE,iE,sE,aE,lE,vu,cE,uE,dE,fE,pE,gE,mE,vE,yE,bE,wE,xE,kE,EE,SE,CE,TE,AE,_E,RE];/* + */const Jhe=[Rk,Mk,Ok,Ik,Lk,hf,Nk,$k,Dk,Pk,zk,Fk,ff,Bk,Hk,Uk,Wk,Vk,jk,Gk,Kk,Yk,Xk,qk,Zk,Qk,Jk,eE,tE,nE,rE,oE,Ov,da,iE,sE,aE,lE,cE,uE,dE,hE,fE,wu,pE,gE,mE,yE,bE,wE,xE,kE,EE,SE,CE,TE,AE,_E,RE,ME,OE,IE,LE,NE];/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */function Fhe(t,e,n){if(!t)return;const r=`${e}/api/assets/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<1?null:{id:o[0]}}return null}function Bhe(t,e,n){if(!t)return;const r=`${e}/api/content/${n}/`;if(t.startsWith(r)){const o=t.substring(r.length).split(/[/?]+/);return o.length<2?null:{schemaName:o[0],id:o[1]}}return null}function ME(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Sl=ME();function e$(t){Sl=t}const t$=/[&<>"']/,Hhe=new RegExp(t$.source,"g"),n$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Uhe=new RegExp(n$.source,"g"),Whe={"&":"&","<":"<",">":">",'"':""","'":"'"},C_=t=>Whe[t];function Pr(t,e){if(e){if(t$.test(t))return t.replace(Hhe,C_)}else if(n$.test(t))return t.replace(Uhe,C_);return t}const Vhe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function jhe(t){return t.replace(Vhe,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Ghe=/(^|[^\[])\^/g;function st(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(Ghe,"$1"),t=t.replace(r,o),n),getRegex:()=>new RegExp(t,e)};return n}function T_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Xg={exec:()=>null};function A_(t,e){const n=t.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length"']/,nfe=new RegExp(u$.source,"g"),d$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,rfe=new RegExp(d$.source,"g"),ofe={"&":"&","<":"<",">":">",'"':""","'":"'"},O_=e=>ofe[e];function Hr(e,t){if(t){if(u$.test(e))return e.replace(nfe,O_)}else if(d$.test(e))return e.replace(rfe,O_);return e}const ife=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function sfe(e){return e.replace(ife,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const afe=/(^|[^\[])\^/g;function at(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(afe,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function I_(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Qg={exec:()=>null};function L_(e,t){const n=e.replace(/\|/g,(i,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(` -`)}class qg{constructor(e){ct(this,"options");ct(this,"rules");ct(this,"lexer");this.options=e||Sl}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ep(r,` -`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],o=Yhe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=ep(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=ep(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const s=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",a="",u=!1;for(;e;){let c=!1;if(!(n=s.exec(e))||this.rules.block.hr.test(e))break;l=n[0],e=e.substring(l.length);let d=n[2].split(` -`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=e.split(` +`)}class Jg{constructor(t){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=t||Al}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:op(r,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=cfe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=op(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=op(n[0].replace(/^ *>[ \t]?/gm,""),` +`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const s=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",a="",u=!1;for(;t;){let c=!1;if(!(n=s.exec(t))||this.rules.block.hr.test(t))break;l=n[0],t=t.substring(l.length);let d=n[2].split(` +`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),h=t.split(` `,1)[0],f=0;this.options.pedantic?(f=2,a=d.trimStart()):(f=n[2].search(/[^ ]/),f=f>4?1:f,a=d.slice(f),f+=n[1].length);let p=!1;if(!d&&/^ *$/.test(h)&&(l+=h+` -`,e=e.substring(h.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),b=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;e;){const k=e.split(` -`,1)[0];if(h=k,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),b.test(h)||w.test(h)||v.test(h)||y.test(e))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=` +`,t=t.substring(h.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),b=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const k=t.split(` +`,1)[0];if(h=k,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),b.test(h)||w.test(h)||v.test(h)||y.test(t))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=` `+h.slice(f);else{if(p||d.search(/[^ ]/)>=4||b.test(d)||w.test(d)||y.test(d))break;a+=` `+h}!p&&!h.trim()&&(p=!0),l+=k+` -`,e=e.substring(k.length+1),d=h.slice(f)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let g=null,m;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(m=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:l,task:!!g,checked:m,loose:!1,text:a,tokens:[]}),i.raw+=l}i.items[i.items.length-1].raw=l.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;cf.type==="space"),h=d.length>0&&d.some(f=>/\n.*\n/.test(f.raw));i.loose=h}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:A_(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,s,l,a;for(i=0;i({text:u,tokens:[]}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=ep(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=Khe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),__(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return __(r,o,r[0],this.lexer)}}emStrong(e,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(e);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...o[0]].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=[...l].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...o[0]][0].length,f=e.slice(0,s+o.index+h+a);if(Math.min(s,a)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Pr(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,o;return n[2]==="@"?(r=Pr(n[1]),o="mailto:"+r):(r=Pr(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,o;if(n[2]==="@")r=Pr(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=Pr(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Pr(n[0]),{type:"text",raw:n[0],text:r}}}}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:Xg,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=st(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex();Se.bullet=/(?:[*+-]|\d{1,9}[.)])/;Se.listItemStart=st(/^( *)(bull) */).replace("bull",Se.bullet).getRegex();Se.list=st(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=st(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Se.lheading=st(Se.lheading).replace(/bull/g,Se.bullet).getRegex();Se.paragraph=st(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=st(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=st(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=st(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:st(`^ *(?: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:Xg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:st(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 ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Xg,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:Xg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";ue.punctuation=st(ue.punctuation,"u").replace(/punctuation/g,ue._punctuation).getRegex();ue.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;ue.anyPunctuation=/\\[punct]/g;ue._escapes=/\\([punct])/g;ue._comment=st(Se._comment).replace("(?:-->|$)","-->").getRegex();ue.emStrong.lDelim=st(ue.emStrong.lDelim,"u").replace(/punct/g,ue._punctuation).getRegex();ue.emStrong.rDelimAst=st(ue.emStrong.rDelimAst,"gu").replace(/punct/g,ue._punctuation).getRegex();ue.emStrong.rDelimUnd=st(ue.emStrong.rDelimUnd,"gu").replace(/punct/g,ue._punctuation).getRegex();ue.anyPunctuation=st(ue.anyPunctuation,"gu").replace(/punct/g,ue._punctuation).getRegex();ue._escapes=st(ue._escapes,"gu").replace(/punct/g,ue._punctuation).getRegex();ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ue._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])?)+(?![-_])/;ue.autolink=st(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex();ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ue.tag=st(ue.tag).replace("comment",ue._comment).replace("attribute",ue._attribute).getRegex();ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ue._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ue.link=st(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex();ue.reflink=st(ue.reflink).replace("label",ue._label).replace("ref",Se._label).getRegex();ue.nolink=st(ue.nolink).replace("ref",Se._label).getRegex();ue.reflinkSearch=st(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex();ue.normal={...ue};ue.pedantic={...ue.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:st(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()};ue.gfm={...ue.normal,escape:st(ue.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]*?(?:(?=[\\a+" ".repeat(u.length));let r,o,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`,t=t.substring(k.length+1),d=h.slice(f)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let g=null,m;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(m=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:l,task:!!g,checked:m,loose:!1,text:a,tokens:[]}),i.raw+=l}i.items[i.items.length-1].raw=l.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;cf.type==="space"),h=d.length>0&&d.some(f=>/\n.*\n/.test(f.raw));i.loose=h}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:L_(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,s,l,a;for(i=0;i({text:u,tokens:[]}));for(o=r.header.length,s=0;s/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const s=op(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=lfe(n[2],"()");if(s>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),N_(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return N_(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...o[0]].length-1;let l,a,u=s,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(o=d.exec(n))!=null;){if(l=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!l)continue;if(a=[...l].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...o[0]][0].length,f=t.slice(0,s+o.index+h+a);if(Math.min(s,a)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Hr(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=Hr(n[1]),o="mailto:"+r):(r=Hr(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=Hr(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=Hr(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Hr(n[0]),{type:"text",raw:n[0],text:r}}}}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:Qg,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=at(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex();Se.bullet=/(?:[*+-]|\d{1,9}[.)])/;Se.listItemStart=at(/^( *)(bull) */).replace("bull",Se.bullet).getRegex();Se.list=at(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=at(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Se.lheading=at(Se.lheading).replace(/bull/g,Se.bullet).getRegex();Se.paragraph=at(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=at(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=at(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=at(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:at(`^ *(?: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:Qg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:at(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 de={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Qg,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:Qg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";de.punctuation=at(de.punctuation,"u").replace(/punctuation/g,de._punctuation).getRegex();de.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;de.anyPunctuation=/\\[punct]/g;de._escapes=/\\([punct])/g;de._comment=at(Se._comment).replace("(?:-->|$)","-->").getRegex();de.emStrong.lDelim=at(de.emStrong.lDelim,"u").replace(/punct/g,de._punctuation).getRegex();de.emStrong.rDelimAst=at(de.emStrong.rDelimAst,"gu").replace(/punct/g,de._punctuation).getRegex();de.emStrong.rDelimUnd=at(de.emStrong.rDelimUnd,"gu").replace(/punct/g,de._punctuation).getRegex();de.anyPunctuation=at(de.anyPunctuation,"gu").replace(/punct/g,de._punctuation).getRegex();de._escapes=at(de._escapes,"gu").replace(/punct/g,de._punctuation).getRegex();de._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;de._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])?)+(?![-_])/;de.autolink=at(de.autolink).replace("scheme",de._scheme).replace("email",de._email).getRegex();de._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;de.tag=at(de.tag).replace("comment",de._comment).replace("attribute",de._attribute).getRegex();de._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;de._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;de._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;de.link=at(de.link).replace("label",de._label).replace("href",de._href).replace("title",de._title).getRegex();de.reflink=at(de.reflink).replace("label",de._label).replace("ref",Se._label).getRegex();de.nolink=at(de.nolink).replace("ref",Se._label).getRegex();de.reflinkSearch=at(de.reflinkSearch,"g").replace("reflink",de.reflink).replace("nolink",de.nolink).getRegex();de.normal={...de};de.pedantic={...de.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:at(/^!?\[(label)\]\((.*?)\)/).replace("label",de._label).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",de._label).getRegex()};de.gfm={...de.normal,escape:at(de.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]*?(?:(?=[\\a+" ".repeat(u.length));let r,o,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` +`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` `+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=e.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` +`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(i=t.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],s&&o.type==="paragraph"?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),s=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` `+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,o,i,s=e,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,s,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Zg{constructor(e){ct(this,"options");this.options=e||Sl}code(e,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return e=e.replace(/\n$/,"")+` -`,o?'
    '+(r?e:Pr(e,!0))+`
    -`:"
    "+(r?e:Pr(e,!0))+`
    -`}blockquote(e){return`
    -${e}
    -`}html(e,n){return e}heading(e,n,r){return`${e} +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,s=t,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class em{constructor(t){xt(this,"options");this.options=t||Al}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` +`,o?'
    '+(r?t:Hr(t,!0))+`
    +`:"
    "+(r?t:Hr(t,!0))+`
    +`}blockquote(t){return`
    +${t}
    +`}html(t,n){return t}heading(t,n,r){return`${t} `}hr(){return`
    -`}list(e,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+e+" -`}listitem(e,n,r){return`
  • ${e}
  • -`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    -`}table(e,n){return n&&(n=`${n}`),` +`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> +`+t+" +`}listitem(t,n,r){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,n){return n&&(n=`${n}`),`
    -`+e+` +`+t+` `+n+`
    -`}tablerow(e){return` -${e} -`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` -`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,n,r){const o=T_(e);if(o===null)return r;e=o;let i='
    ",i}image(e,n,r){const o=T_(e);if(o===null)return r;e=o;let i=`${r}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=m+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=m+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:m+" "}):g+=m+" "}g+=this.parse(h.tokens,u),c+=this.renderer.listitem(g,p,!!f)}r+=this.renderer.list(c,l,a);continue}case"html":{const s=i;r+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;r+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,l=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{r=r.concat(this.walkTokens(l[a],n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:n.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=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Zg(this.defaults);for(const s in r.renderer){const l=r.renderer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new qg(this.defaults);for(const s in r.tokenizer){const l=r.tokenizer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zd;for(const s in r.hooks){const l=r.hooks[s],a=s,u=i[a];zd.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(h=>u.call(i,h));const d=l.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return ri.lex(e,n??this.defaults)}parser(e,n){return oi.parse(e,n??this.defaults)}}Nh=new WeakSet,tb=function(e,n){return(r,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 l=xf(this,tm,r$).call(this,!!s.silent,!!s.async);if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(a=>e(a,s)).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>n(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(r=s.hooks.preprocess(r));const a=e(r,s);s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=n(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},tm=new WeakSet,r$=function(e,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const o="

    An error occurred:

    "+Pr(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const fl=new Xhe;function it(t,e){return fl.parse(t,e)}it.options=it.setOptions=function(t){return fl.setOptions(t),it.defaults=fl.defaults,e$(it.defaults),it};it.getDefaults=ME;it.defaults=Sl;it.use=function(...t){return fl.use(...t),it.defaults=fl.defaults,e$(it.defaults),it};it.walkTokens=function(t,e){return fl.walkTokens(t,e)};it.parseInline=fl.parseInline;it.Parser=oi;it.parser=oi.parse;it.Renderer=Zg;it.TextRenderer=OE;it.Lexer=ri;it.lexer=ri.lex;it.Tokenizer=qg;it.Hooks=zd;it.parse=it;it.options;it.setOptions;it.use;it.walkTokens;it.parseInline;oi.parse;ri.lex;/* +`}tablerow(t){return` +${t} +`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=I_(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=I_(t);if(o===null)return r;t=o;let i=`${r}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=m+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=m+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:m+" "}):g+=m+" "}g+=this.parse(h.tokens,u),c+=this.renderer.listitem(g,p,!!f)}r+=this.renderer.list(c,l,a);continue}case"html":{const s=i;r+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;r+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,l=s.tokens?this.parseInline(s.tokens):s.text;for(;o+1{r=r.concat(this.walkTokens(l[a],n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:n.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=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new em(this.defaults);for(const s in r.renderer){const l=r.renderer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Jg(this.defaults);for(const s in r.tokenizer){const l=r.tokenizer[s],a=s,u=i[a];i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Hd;for(const s in r.hooks){const l=r.hooks[s],a=s,u=i[a];Hd.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(h=>u.call(i,h));const d=l.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return si.lex(t,n??this.defaults)}parser(t,n){return ai.parse(t,n??this.defaults)}}zh=new WeakSet,ib=function(t,n){return(r,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 l=Cf(this,im,h$).call(this,!!s.silent,!!s.async);if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(a=>t(a,s)).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>n(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(r=s.hooks.preprocess(r));const a=t(r,s);s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=n(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},im=new WeakSet,h$=function(t,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+Hr(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const ml=new ufe;function it(e,t){return ml.parse(e,t)}it.options=it.setOptions=function(e){return ml.setOptions(e),it.defaults=ml.defaults,c$(it.defaults),it};it.getDefaults=$E;it.defaults=Al;it.use=function(...e){return ml.use(...e),it.defaults=ml.defaults,c$(it.defaults),it};it.walkTokens=function(e,t){return ml.walkTokens(e,t)};it.parseInline=ml.parseInline;it.Parser=ai;it.parser=ai.parse;it.Renderer=em;it.TextRenderer=DE;it.Lexer=si;it.lexer=si.lex;it.Tokenizer=Jg;it.Hooks=Hd;it.parse=it;it.options;it.setOptions;it.use;it.walkTokens;it.parseInline;ai.parse;si.lex;/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const o$=/[&<>"']/,qhe=new RegExp(o$.source,"g"),i$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zhe=new RegExp(i$.source,"g"),Qhe={"&":"&","<":"<",">":">",'"':""","'":"'"},R_=t=>Qhe[t];function M_(t,e){if(e){if(o$.test(t))return t.replace(qhe,R_)}else if(i$.test(t))return t.replace(Zhe,R_);return t}/* + */const f$=/[&<>"']/,dfe=new RegExp(f$.source,"g"),p$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,hfe=new RegExp(p$.source,"g"),ffe={"&":"&","<":"<",">":">",'"':""","'":"'"},$_=e=>ffe[e];function D_(e,t){if(t){if(f$.test(e))return e.replace(dfe,$_)}else if(p$.test(e))return e.replace(hfe,$_);return e}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const Jhe=im(Rh),_v=new Jhe({hr:"---",codeBlockStyle:"fenced"});_v.addRule("link2",{filter:(t,e)=>e.linkStyle==="inlined"&&t.nodeName==="A"&&!!t.getAttribute("href"),replacement:function(t,e){const n=e,r=n.getAttribute("href");if(!r)return"";const o=nb(n.getAttribute("title"));return o?`[${t}](${r} '${o}')`:`[${t}](${r})`}});_v.addRule("img2",{filter:"img",replacement:(t,e)=>{const n=e,r=n.getAttribute("src")||"";if(!r)return"";const o=nb(n.getAttribute("alt")),i=nb(n.getAttribute("title"));return i?`![${o}](${r} '${i}')`:`![${o}](${r})`}});const efe="data-code-block-language";_v.addRule("code2",{filter:(t,e)=>e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild!==null&&t.firstChild.nodeName==="CODE",replacement:function(t,e,n){const r=e.firstChild.getAttribute(efe),o=e.firstChild.textContent,i=n.fence.charAt(0);let s=3;const l=new RegExp("^"+i+"{3,}","gm");let a;for(;a=l.exec(o);)a[0].length>=s&&(s=a[0].length+1);const u=rfe(i,s);return` + */const pfe=cm(Lh),Iv=new pfe({hr:"---",codeBlockStyle:"fenced"});Iv.addRule("link2",{filter:(e,t)=>t.linkStyle==="inlined"&&e.nodeName==="A"&&!!e.getAttribute("href"),replacement:function(e,t){const n=t,r=n.getAttribute("href");if(!r)return"";const o=sb(n.getAttribute("title"));return o?`[${e}](${r} '${o}')`:`[${e}](${r})`}});Iv.addRule("img2",{filter:"img",replacement:(e,t)=>{const n=t,r=n.getAttribute("src")||"";if(!r)return"";const o=sb(n.getAttribute("alt")),i=sb(n.getAttribute("title"));return i?`![${o}](${r} '${i}')`:`![${o}](${r})`}});const gfe="data-code-block-language";Iv.addRule("code2",{filter:(e,t)=>t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild!==null&&e.firstChild.nodeName==="CODE",replacement:function(e,t,n){const r=t.firstChild.getAttribute(gfe),o=t.firstChild.textContent,i=n.fence.charAt(0);let s=3;const l=new RegExp("^"+i+"{3,}","gm");let a;for(;a=l.exec(o);)a[0].length>=s&&(s=a[0].length+1);const u=yfe(i,s);return` ${u}${r} ${o.replace(/\n$/,"")} ${u} -`}});function nb(t){return(t==null?void 0:t.replace(/(\n+\s*)+/g,` -`))||""}it.use({renderer:{code:(t,e,n)=>{var o;const r=(o=(e||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,""),n||(t=M_(t,!0)),r?`
    ${t}
    -`:`
    ${t}
    -`}}});function tfe(t){return _v.turndown(t)}function nfe(t){return it(t,{gfm:!0})}function rfe(t,e){return Array(e+1).join(t)}/* +`}});function sb(e){return(e==null?void 0:e.replace(/(\n+\s*)+/g,` +`))||""}it.use({renderer:{code:(e,t,n)=>{var o;const r=(o=(t||"").match(/^\S*/))==null?void 0:o[0];return e=e.replace(/\n$/,""),n||(e=D_(e,!0)),r?`
    ${e}
    +`:`
    ${e}
    +`}}});function mfe(e){return Iv.turndown(e)}function vfe(e){return it(e,{gfm:!0})}function yfe(e,t){return Array(t+1).join(e)}/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */function P_(e){return Array.isArray(e)}function z_(e){return!!e&&typeof e=="object"&&e.constructor===Object}function tm(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(P_(e)&&P_(t)){if(e.length!==t.length)return!1;for(let n=0;n{const{type:e}=t;return e==="Assets"?j.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:[j.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"}),j.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"}),j.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"})]}):e==="Contents"?j.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:[j.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"}),j.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"}),j.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"}),j.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"})]}):e==="Check"?j.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:j.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):e==="Cancel"?j.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:j.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"})}):e==="Edit"?j.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:j.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"})}):e==="Preview"?j.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"200 200 724 724",width:"1.2rem",height:"1rem",children:[j.jsx("path",{d:"M545 793.6H243.8c-11 0-20-9-20-20V250.4c0-11 9-20 20-20h432.4c11 0 20 9 20 20v131.8c0 11 9 20 20 20s20-9 20-20V250.4c0-33.1-26.9-60-60-60H243.8c-33.1 0-60 26.9-60 60v523.2c0 33.1 26.9 60 60 60H545c11 0 20-9 20-20s-8.9-20-20-20z"}),j.jsx("path",{d:"M834.6 789.8l-88.8-91.7c23.4-28.7 37.5-65.4 37.5-105.3 0-92.1-74.9-167-167-167s-167 74.9-167 167 74.9 167 167 167c37.8 0 72.7-12.6 100.7-33.9l89 91.8c3.9 4 9.1 6 14.3 6 5 0 10.1-1.9 14-5.7 7.8-7.6 8-20.3 0.3-28.2z m-218.4-69.9c-70 0-127-57-127-127s57-127 127-127 127 57 127 127-57 127-127 127zM565 382.2c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20H545c11.1 0 20-9 20-20zM443.5 493.5c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20h114.8c11.1 0 20-8.9 20-20zM308.7 584.8c-11 0-20 9-20 20s9 20 20 20h61.7c11 0 20-9 20-20s-9-20-20-20h-61.7z"})]}):j.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:e})},ofe=({node:t})=>{const e=Jh(Ih),n=t.attrs.contentId,r=t.attrs.contentTitle,o=t.attrs.schemaName,i=e.options.onEditContent;return j.jsxs("div",{className:"squidex-editor-content-link",children:[j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,n),children:j.jsx(xo,{type:"Contents"})}),j.jsx("div",{className:"squidex-editor-content-schema",children:o}),j.jsx("div",{className:"squidex-editor-content-name",children:r})]})};var ife=Object.defineProperty,sfe=Object.getOwnPropertyDescriptor,s$=(t,e,n,r)=>{for(var o=r>1?void 0:r?sfe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&ife(e,n,o),o};let Ih=class extends Pn{constructor(e){super({...e,disableExtraAttributes:!0});ct(this,"ReactComponent",ofe)}get name(){return"contentLink"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:e=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${e.attrs.schemaName}/${e.attrs.contentId}`},e.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:e=>{const n=e.getAttribute("href");if(!n)return!1;const r=Bhe(n,this.options.baseUrl,this.options.appName);return r?{contentId:r.id,contentTitle:e.innerText,schemaName:r.schemaName}:!1},priority:1e5}]}}addContent(e,n){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:e.id,contentTitle:e.title,schemaName:e.schemaName},selection:n})}};s$([de({})],Ih.prototype,"addContent",1);Ih=s$([Pe({defaultOptions:{}})],Ih);const afe=t=>{const{appName:e,baseUrl:n,onEditNode:r,onEditAsset:o,node:i,getPosition:s}=t,l=Fhe(i.attrs.src,n,e);return j.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[j.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),j.jsxs("div",{className:"squidex-editor-image-buttons",children:[j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>r({node:i,getPos:s}),children:j.jsx(xo,{type:"Edit"})}),l&&j.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(l.id),children:j.jsx(xo,{type:"Assets"})})]}),l&&j.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* + */const eo=e=>{const{type:t}=e;return t==="Assets"?V.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:[V.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"}),V.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"}),V.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"?V.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:[V.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"}),V.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"}),V.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"}),V.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==="Comment"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.jsx("path",{d:"M20.016 15.984v-12h-16.031v14.016l2.016-2.016h14.016zM20.016 2.016c1.078 0 1.969 0.891 1.969 1.969v12c0 1.078-0.891 2.016-1.969 2.016h-14.016l-3.984 3.984v-18c0-1.078 0.891-1.969 1.969-1.969h16.031z"})}):t==="Check"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})}):t==="Cancel"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 -960 960 960",children:V.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"?V.jsx("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",children:V.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"})}):t==="Preview"?V.jsxs("svg",{className:"custom-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"200 200 724 724",children:[V.jsx("path",{d:"M545 793.6H243.8c-11 0-20-9-20-20V250.4c0-11 9-20 20-20h432.4c11 0 20 9 20 20v131.8c0 11 9 20 20 20s20-9 20-20V250.4c0-33.1-26.9-60-60-60H243.8c-33.1 0-60 26.9-60 60v523.2c0 33.1 26.9 60 60 60H545c11 0 20-9 20-20s-8.9-20-20-20z"}),V.jsx("path",{d:"M834.6 789.8l-88.8-91.7c23.4-28.7 37.5-65.4 37.5-105.3 0-92.1-74.9-167-167-167s-167 74.9-167 167 74.9 167 167 167c37.8 0 72.7-12.6 100.7-33.9l89 91.8c3.9 4 9.1 6 14.3 6 5 0 10.1-1.9 14-5.7 7.8-7.6 8-20.3 0.3-28.2z m-218.4-69.9c-70 0-127-57-127-127s57-127 127-127 127 57 127 127-57 127-127 127zM565 382.2c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20H545c11.1 0 20-9 20-20zM443.5 493.5c0-11-9-20-20-20H308.7c-11 0-20 9-20 20s9 20 20 20h114.8c11.1 0 20-8.9 20-20zM308.7 584.8c-11 0-20 9-20 20s9 20 20 20h61.7c11 0 20-9 20-20s-9-20-20-20h-61.7z"})]}):V.jsx("span",{style:{height:"16px",lineHeight:"16px"},children:t})},bfe=({node:e})=>{const t=rf(Dh),n=e.attrs.contentId,r=e.attrs.contentTitle,o=e.attrs.schemaName,i=t.options.onEditContent;return V.jsxs("div",{className:"squidex-editor-content-link",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>i(o,n),children:V.jsx(eo,{type:"Contents"})}),V.jsx("div",{className:"squidex-editor-content-schema",children:o}),V.jsx("div",{className:"squidex-editor-content-name",children:r})]})};var wfe=Object.defineProperty,xfe=Object.getOwnPropertyDescriptor,g$=(e,t,n,r)=>{for(var o=r>1?void 0:r?xfe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&wfe(t,n,o),o};let Dh=class extends zn{constructor(e){super({...e,disableExtraAttributes:!0}),this.ReactComponent=bfe}get name(){return"contentLink"}createTags(){return[Ee.InlineNode,Ee.Media]}createNodeSpec(){return{inline:!0,attrs:{contentId:{default:""},contentTitle:{default:""},schemaName:{default:""}},toDOM:e=>["a",{href:`${this.options.baseUrl}/api/content/${this.options.appName}/${e.attrs.schemaName}/${e.attrs.contentId}`},e.attrs.contentTitle],parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");if(!t)return!1;const n=tfe(t,this.options.baseUrl,this.options.appName);return n?{contentId:n.id,contentTitle:e.innerText,schemaName:n.schemaName}:!1},priority:1e5}]}}addContent(e,t){return this.store.commands.insertNode.original(this.type,{attrs:{contentId:e.id,contentTitle:e.title,schemaName:e.schemaName},selection:t})}};g$([le({})],Dh.prototype,"addContent",1);Dh=g$([De({defaultOptions:{}})],Dh);const kfe=e=>{const{appName:t,baseUrl:n,onEditNode:r,onEditAsset:o,node:i,getPosition:s}=e,l=efe(i.attrs.src,n,t);return V.jsxs("div",{style:{position:"relative"},className:"squidex-editor-image-view",children:[V.jsx("img",{className:"squidex-editor-image-element",src:i.attrs.src}),V.jsxs("div",{className:"squidex-editor-image-buttons",children:[V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>r({node:i,getPos:s}),children:V.jsx(eo,{type:"Edit"})}),l&&V.jsx("button",{type:"button",className:"squidex-editor-button",onClick:()=>o(l.id),children:V.jsx(eo,{type:"Assets"})})]}),l&&V.jsx("div",{className:"squidex-editor-image-info",children:"Asset"})]})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */class lfe extends yt{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?n=>{const r=document.createElement("div");return r.append(Ur.fromSchema(this.store.schema).serializeFragment(n.content)),r.innerHTML}:void 0}}}}/* + */class Efe extends gt{get name(){return"htmlCopy"}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsHtml?n=>{const r=document.createElement("div");return r.append(jr.fromSchema(this.store.schema).serializeFragment(n.content)),r.innerHTML}:void 0}}}}/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const cfe=({mode:t,onChange:e,state:n,value:r})=>{const{setContent:o}=vi(),{getMarkdown:i,getHTML:s}=ef(),l=P.useRef(null),a=P.useRef(!1),u=P.useRef(0),c=yQ();return P.useEffect(()=>{u.current+=1},[c]),P.useEffect(()=>{a.current=!!r&&r.length>0,l.current!==r&&(l.current=r,o(r||""),u.current=-1)},[o,r]),P.useEffect(()=>{if(!e)return;function d(){switch(t){case"Markdown":return i(n);default:return s(n)}}if(u.current<=0)return;let h=d().trim();h&&h.length>0&&ufe.indexOf(h)>=0&&(h=""),l.current!==h&&(!a.current&&h.length===0?e(void 0):e(h),l.current=h,a.current=!!h&&h.length>0)},[s,i,t,e,n]),null},ufe=["

    ",'

    ','

    '],dfe=({node:t,getPosition:e,view:n})=>{const r=P.useCallback(o=>{const i=n.state.tr.setNodeAttribute(e(),"html",o.target.value);n.dispatch(i)},[e,n]);return j.jsxs("div",{className:"squidex-editor-html",children:[j.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),j.jsx("textarea",{spellCheck:"false",value:t.attrs.content,onChange:r})]})};var hfe=Object.defineProperty,ffe=Object.getOwnPropertyDescriptor,a$=(t,e,n,r)=>{for(var o=r>1?void 0:r?ffe(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&hfe(e,n,o),o};let Qg=class extends Pn{constructor(){super({disableExtraAttributes:!0});ct(this,"ReactComponent",dfe)}get name(){return"plainHtml"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:e=>{const n=e.attrs.html;return["div",{class:"__editor_html"},...pfe(n)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:e=>({content:e.innerHTML}),priority:1e4}]}}insertPlainHtml(e){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:e})}};a$([de({})],Qg.prototype,"insertPlainHtml",1);Qg=a$([Pe({defaultOptions:{}})],Qg);function pfe(t){if(!t)return[""];const e=document.createElement("div");return e.innerHTML=t,l$(e)}function gfe(t){const e={};for(let n=0;n{const e=P.useRef(null);return P.useEffect(()=>{const n=window.requestAnimationFrame(()=>{var r;(r=e.current)==null||r.focus()});return()=>{window.cancelAnimationFrame(n)}},[]),j.jsx("input",{className:"squidex-editor-input",ref:e,...t})};/* + */const Sfe=e=>{const{mode:t,onChange:n,value:r}=e,{setContent:o,getState:i}=So(),{getMarkdown:s,getHTML:l}=of(),a=P.useRef(null),u=P.useRef(!1),c=P.useRef(0),d=AQ(),{doc:h}=i();return P.useEffect(()=>{c.current+=1},[d]),P.useEffect(()=>{u.current=!!r&&r.length>0,a.current!==r&&(a.current=r,o(r||""),c.current=-1)},[o,r]),P.useEffect(()=>{if(!n)return;function f(){switch(t){case"Markdown":return s({doc:h});default:return l({doc:h})}}if(c.current<=0)return;const p=Cfe(f());a.current!==p&&(!u.current&&p.length===0?n(void 0):n(p),a.current=p,u.current=!!p&&p.length>0)},[h,t,l,s,n]),null};function Cfe(e){return e=e.trim(),e&&e.length>0&&Tfe.indexOf(e)>=0&&(e=""),e}const Tfe=["

    ",'

    ','

    '],Afe=({node:e,getPosition:t,view:n})=>{const r=P.useCallback(o=>{const i=n.state.tr.setNodeAttribute(t(),"html",o.target.value);n.dispatch(i)},[t,n]);return V.jsxs("div",{className:"squidex-editor-html",children:[V.jsx("div",{className:"squidex-editor-html-label",children:"Plain HTML"}),V.jsx("textarea",{spellCheck:"false",value:e.attrs.content,onChange:r})]})};var _fe=Object.defineProperty,Rfe=Object.getOwnPropertyDescriptor,m$=(e,t,n,r)=>{for(var o=r>1?void 0:r?Rfe(t,n):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(r?s(t,n,o):s(o))||o);return r&&o&&_fe(t,n,o),o};let nm=class extends zn{constructor(){super({disableExtraAttributes:!0}),this.ReactComponent=Afe}get name(){return"plainHtml"}createTags(){return[Ee.Block,Ee.TextBlock,Ee.FormattingNode]}createNodeSpec(){return{attrs:{html:{default:""}},toDOM:e=>{const t=e.attrs.html;return["div",{class:"__editor_html"},...Mfe(t)]},parseDOM:[{tag:"div[class~=__editor_html]",getAttrs:e=>({content:e.innerHTML}),priority:1e4}]}}insertPlainHtml(e){return this.store.commands.insertNode.original(this.type,{attrs:{content:""},selection:e})}};m$([le({})],nm.prototype,"insertPlainHtml",1);nm=m$([De({defaultOptions:{}})],nm);function Mfe(e){if(!e)return[""];const t=document.createElement("div");return t.innerHTML=e,v$(t)}function Ofe(e){const t={};for(let n=0;n{const t=P.useRef(null);return P.useEffect(()=>{const n=window.requestAnimationFrame(()=>{var r;(r=t.current)==null||r.focus()});return()=>{window.cancelAnimationFrame(n)}},[]),V.jsx("input",{className:"squidex-editor-input",ref:t,...e})};/* * Squidex Headless CMS * * @license * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */const u$=({children:t,title:e})=>j.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[j.jsx("div",{className:"squidex-editor-modal-backdrop"}),j.jsxs("div",{className:"squidex-editor-modal-window",children:[e&&j.jsx("div",{className:"squidex-editor-modal-title",children:e}),j.jsx("div",{className:"squidex-editor-modal-body",children:t})]})]}),mfe=({onSelectAIText:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();vfe(r)&&r.length>0&&e.insertText(r),e.run()},[e,t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:n,label:"Add AI generated Text",icon:j.jsx(xo,{type:"AI"})})};function vfe(t){return typeof t=="string"||t instanceof String}const yfe=({onSelectAssets:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();for(const o of r){if(o.mimeType.startsWith("image/")){const i={src:o.src,alt:o.alt,title:o.fileName};e.insertImage(i)}else e.insertText(o.fileName,{marks:{link:{href:o.src}}});e.insertText(" ")}e.run()},[e,t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:n,label:"Add Asset",icon:j.jsx(xo,{type:"Assets"})})},bfe=({onSelectContents:t})=>{const e=gu(),n=P.useCallback(async()=>{const r=await t();for(const o of r)e.addContent(o);e.run()},[e,t]);return j.jsx(It,{commandName:"addContent",enabled:!0,onSelect:n,label:"Add Content",icon:j.jsx(xo,{type:"Contents"})})},wfe=()=>{const t=gu(),e=P.useCallback(async()=>{t.insertPlainHtml().run()},[t]);return j.jsx(It,{commandName:"addImage",enabled:!0,onSelect:e,label:"Add HTML",icon:j.jsx(xo,{type:"HTML"})})},xfe=({attrs:t,...e})=>{const{setClassName:n}=kn(),r=P.useCallback(()=>{n(t.className)},[t.className,n]),o=hr().className(t);return j.jsx(Kx,{...e,commandName:"toggleClass",active:o,attrs:t,enabled:!0,onSelect:r,label:(t==null?void 0:t.className)||"No Class"})},kfe=({...t})=>{const{removeClassName:e}=kn(),n=P.useCallback(()=>{e()},[e]),r=!hr().className();return j.jsx(Kx,{...t,commandName:"removeClass",active:r,attrs:{},enabled:!0,onSelect:n,label:"No Class"})},Efe=()=>{const t=Jh(ru);return!t.options.classNames||t.options.classNames.length===0?null:j.jsxs(TN,{"aria-label":"Class Name",icon:j.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[j.jsx(kfe,{}),t.options.classNames.map(e=>j.jsx(xfe,{attrs:{className:e}},e))]})},Sfe=()=>{const t=Jh(Vs);return j.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",j.jsx("strong",{children:t.getWordCount()}),", Characters: ",j.jsx("strong",{children:t.getCharacterCount()})]})},d$=({onEdit:t})=>{const e=gu(),r=hr().link(),o=ax(),i=P.useCallback(()=>{e.removeLink().focus().run()},[e]);return j.jsxs(j.Fragment,{children:[j.jsx(It,{commandName:"updateLink",enabled:!o.empty,label:"Add or Edit Link",onSelect:t,icon:"link"}),j.jsx(It,{commandName:"removeLink",enabled:r,label:"Remove Link",onSelect:i,icon:"linkUnlink"})]})},Cfe=({onClose:t})=>{const[e,n,r]=JN(""),o=gu(),i=sQ(!0).link(),s=(i==null?void 0:i.href)??"",l=ax();P.useEffect(()=>{n(s)},[s,l,n]);const a=P.useCallback(()=>{const d=r.current;d?o.updateLink({href:d,auto:!1}):o.removeLink(),o.focus(l.to).run(),t()},[o,r,t,l.to]),u=P.useCallback(d=>{n(d.target.value)},[n]),c=P.useCallback(d=>{const{code:h}=d;h==="Enter"&&a(),h==="Escape"&&t()},[t,a]);return j.jsxs(u$,{title:"Change Link",children:[j.jsx(c$,{value:e,onChange:u,onKeyDown:c,placeholder:"Enter Link..."}),j.jsxs(so,{children:[j.jsx(It,{commandName:"submitLink",enabled:!0,onSelect:a,icon:j.jsx(xo,{type:"Check"})}),j.jsx(It,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:j.jsx(xo,{type:"Cancel"})})]})]})};var ou={},IE={},h$={exports:{}};(function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var o=function(c,d,h){if(typeof c!="string"){o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=d),o.modules[c]||(o.payloads[c]=h,o.modules[c]=null)};o.modules={},o.payloads={};var i=function(c,d,h){if(typeof d=="string"){var f=a(c,d);if(f!=null)return h&&h(),f}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var p=[],g=0,m=d.length;ga.length)&&(l=a.length),l-=s.length;var u=a.indexOf(s,l);return u!==-1&&u===l}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var l="",a=this;s>0;)s&1&&(l+=a),(s>>=1)&&(a+=a);return l}),String.prototype.includes||i(String.prototype,"includes",function(s,l){return this.indexOf(s,l)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(s),a=1;a>>0,u=arguments[1],c=u>>0,d=c<0?Math.max(a+c,0):Math.min(c,a),h=arguments[2],f=h===void 0?a:h>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);d0;)a&1&&(u+=l),(a>>=1)&&(l+=l);return u};var i=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(l){return l.replace(i,"")},r.stringTrimRight=function(l){return l.replace(s,"")},r.copyObject=function(l){var a={};for(var u in l)a[u]=l[u];return a},r.copyArray=function(l){for(var a=[],u=0,c=l.length;u=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=l.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,r.isAIR=l.indexOf("AdobeAIR")>=0,r.isAndroid=l.indexOf("Android")>=0,r.isChromeOS=l.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(f,p,g){if(typeof f=="string"&&f){var m=document.createTextNode(f);return p&&p.appendChild(m),m}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var v=[],y=0;y"u")){if(a){if(p)u();else if(p===!1)return a.push([h,f])}if(!l){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var m=g.ownerDocument||g;if(f&&r.hasCssString(f,g))return null;f&&(h+=` + */const b$=e=>{const{children:t,title:n}=e;return V.jsxs("div",{className:"squidex-editor-modal-wrapper",children:[V.jsx("div",{className:"squidex-editor-modal-backdrop"}),V.jsxs("div",{className:"squidex-editor-modal-window",children:[n&&V.jsx("div",{className:"squidex-editor-modal-title",children:n}),V.jsx("div",{className:"squidex-editor-modal-body",children:t})]})]})},Ife=e=>{const{onSelectAIText:t}=e,n=yu(),r=P.useCallback(async()=>{const o=await t();Lfe(o)&&o.length>0&&n.insertText(o),n.run()},[n,t]);return V.jsx(Rt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add AI generated Text",icon:V.jsx(eo,{type:"AI"})})};function Lfe(e){return typeof e=="string"||e instanceof String}const Nfe=e=>{const{onSelectAssets:t}=e,n=yu(),r=P.useCallback(async()=>{const o=await t();for(const i of o){if(i.mimeType.startsWith("image/")){const s={src:i.src,alt:i.alt,title:i.fileName};n.insertImage(s)}else n.insertText(i.fileName,{marks:{link:{href:i.src}}});n.insertText(" ")}n.run()},[n,t]);return V.jsx(Rt,{commandName:"addImage",enabled:!0,onSelect:r,label:"Add Asset",icon:V.jsx(eo,{type:"Assets"})})},$fe=e=>{const{onSelectContents:t}=e,n=yu(),r=P.useCallback(async()=>{const o=await t();for(const i of o)n.addContent(i);n.run()},[n,t]);return V.jsx(Rt,{commandName:"addContent",enabled:!0,onSelect:r,label:"Add Content",icon:V.jsx(eo,{type:"Contents"})})},Dfe=()=>{const e=yu(),t=P.useCallback(async()=>{e.insertPlainHtml().run()},[e]);return V.jsx(Rt,{commandName:"addImage",enabled:!0,onSelect:t,label:"Add HTML",icon:V.jsx(eo,{type:"HTML"})})},Pfe=e=>{const{onAnnotationCreate:t}=e,{selection:n}=So({autoUpdate:!0}).getState(),r=P.useCallback(async()=>{const{from:o,to:i}=n;t({from:o,to:i})},[t,n]);return V.jsx(Rt,{commandName:"addComment",enabled:!0,onSelect:r,label:"Create Comment",icon:V.jsx(eo,{type:"Comment"})})};/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */const zfe=e=>{const{annotations:t,onAnnotationsFocus:n,onAnnotationsUpdate:r}=e,o=hn(),i=P.useRef(F_),s=P.useRef(F_),l=Qhe();return P.useEffect(()=>{i.current=t||[]},[t]),P.useEffect(()=>{const a=setTimeout(()=>{const u=l.selected;tm(s.current,u)||(s.current=u,n==null||n(u))},200);return()=>{clearTimeout(a)}},[n,l.selected]),P.useEffect(()=>{const a=setTimeout(()=>{const u=l.available;tm(i.current,u)||(i.current=u,r==null||r(u))},200);return()=>{clearTimeout(a)}},[r,l.available]),P.useEffect(()=>{o.setAnnotations(t||[])},[t,o]),null},F_=[],Ffe=e=>{const{attrs:t,...n}=e,{setClassName:r}=hn(),o=P.useCallback(()=>{r(t.className)},[t.className,r]),i=fr().className(t);return V.jsx(Qx,{...n,commandName:"toggleClass",active:i,attrs:t,enabled:!0,onSelect:o,label:(t==null?void 0:t.className)||"No Class"})},Bfe=e=>{const{removeClassName:t}=hn(),n=P.useCallback(()=>{t()},[t]),r=!fr().className();return V.jsx(Qx,{...e,commandName:"removeClass",active:r,attrs:{},enabled:!0,onSelect:n,label:"No Class"})},Hfe=()=>{const e=rf(su);return!e.options.classNames||e.options.classNames.length===0?null:V.jsxs(NN,{"aria-label":"Class Name",icon:V.jsx("span",{style:{height:"14px",lineHeight:"14px",fontSize:"14px"},children:"Class"}),children:[V.jsx(Bfe,{}),e.options.classNames.map(t=>V.jsx(Ffe,{attrs:{className:t}},t))]})},Ufe=()=>{const e=rf(Ys);return V.jsxs("div",{className:"squidex-editor-counter",children:["Words: ",V.jsx("strong",{children:e.getWordCount()}),", Characters: ",V.jsx("strong",{children:e.getCharacterCount()})]})},w$=e=>{const{onEdit:t}=e,n=yu(),o=fr().link(),i=hx(),s=P.useCallback(()=>{n.removeLink().focus().run()},[n]);return V.jsxs(V.Fragment,{children:[V.jsx(Rt,{commandName:"updateLink",enabled:!i.empty,label:"Add or Edit Link",onSelect:t,icon:"link"}),V.jsx(Rt,{commandName:"removeLink",enabled:o,label:"Remove Link",onSelect:s,icon:"linkUnlink"})]})},Wfe=e=>{const{onClose:t}=e,n=yu(),r=gQ(!0).link(),o=(r==null?void 0:r.href)??"",i=hx(),[s,l,a]=l$("");P.useEffect(()=>{l(o)},[o,i,l]);const u=P.useCallback(()=>{const h=a.current;h?n.updateLink({href:h,auto:!1}):n.removeLink(),n.focus(i.to).run(),t()},[n,a,t,i.to]),c=P.useCallback(h=>{l(h.target.value)},[l]),d=P.useCallback(h=>{const{code:f}=h;f==="Enter"&&u(),f==="Escape"&&t()},[t,u]);return V.jsxs(b$,{title:"Change Link",children:[V.jsx(y$,{value:s,onChange:c,onKeyDown:d,placeholder:"Enter Link..."}),V.jsxs(Br,{children:[V.jsx(Rt,{commandName:"submitLink",enabled:!0,onSelect:u,icon:V.jsx(eo,{type:"Check"})}),V.jsx(Rt,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:V.jsx(eo,{type:"Cancel"})})]})]})};var au={},PE={},x$={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var o=function(c,d,h){if(typeof c!="string"){o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=d),o.modules[c]||(o.payloads[c]=h,o.modules[c]=null)};o.modules={},o.payloads={};var i=function(c,d,h){if(typeof d=="string"){var f=a(c,d);if(f!=null)return h&&h(),f}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var p=[],g=0,m=d.length;ga.length)&&(l=a.length),l-=s.length;var u=a.indexOf(s,l);return u!==-1&&u===l}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var l="",a=this;s>0;)s&1&&(l+=a),(s>>=1)&&(a+=a);return l}),String.prototype.includes||i(String.prototype,"includes",function(s,l){return this.indexOf(s,l)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(s),a=1;a>>0,u=arguments[1],c=u>>0,d=c<0?Math.max(a+c,0):Math.min(c,a),h=arguments[2],f=h===void 0?a:h>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);d0;)a&1&&(u+=l),(a>>=1)&&(l+=l);return u};var i=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(l){return l.replace(i,"")},r.stringTrimRight=function(l){return l.replace(s,"")},r.copyObject=function(l){var a={};for(var u in l)a[u]=l[u];return a},r.copyArray=function(l){for(var a=[],u=0,c=l.length;u=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=l.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,r.isAIR=l.indexOf("AdobeAIR")>=0,r.isAndroid=l.indexOf("Android")>=0,r.isChromeOS=l.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(f,p,g){if(typeof f=="string"&&f){var m=document.createTextNode(f);return p&&p.appendChild(m),m}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var v=[],y=0;y"u")){if(a){if(p)u();else if(p===!1)return a.push([h,f])}if(!l){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var m=g.ownerDocument||g;if(f&&r.hasCssString(f,g))return null;f&&(h+=` /*# sourceURL=ace/css/`+f+" */");var v=r.createElement("style");v.appendChild(m.createTextNode(h)),f&&(v.id=f),g==m&&(g=r.getDocumentHead(m)),g.insertBefore(v,g.firstChild)}}}if(r.importCssString=c,r.importCssStylsheet=function(h,f){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(f))},r.scrollbarWidth=function(h){var f=r.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=r.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var m=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(p);var v=f.offsetWidth;g.overflow="scroll";var y=f.offsetWidth;return v===y&&(y=p.clientWidth),m.removeChild(p),v-y},r.computedStyle=function(h,f){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,f,p){h[f]!==p&&(h[f]=p)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=i.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,i.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var d=document.createElement("div");r.HI_DPI&&d.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof d.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),d=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,f,p){h.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:r.translate=function(h,f,p){h.style.top=Math.round(p)+"px",h.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,o){/* * based on code from: * @@ -5308,49 +5318,49 @@ ${u} ========================================================================== - @license */var i=n("./oop"),s=function(){var l={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};l.PRINTABLE_KEYS[173]="-";var a,u;for(u in l.FUNCTION_KEYS)a=l.FUNCTION_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);for(u in l.PRINTABLE_KEYS)a=l.PRINTABLE_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);return i.mixin(l,l.MODIFIER_KEYS),i.mixin(l,l.PRINTABLE_KEYS),i.mixin(l,l.FUNCTION_KEYS),l.enter=l.return,l.escape=l.esc,l.del=l.delete,function(){for(var c=["cmd","ctrl","alt","shift"],d=Math.pow(2,c.length);d--;)l.KEY_MODS[d]=c.filter(function(h){return d&l.KEY_MODS[h]}).join("-")+"-"}(),l.KEY_MODS[0]="",l.KEY_MODS[-1]="input-",l}();i.mixin(r,s),r.default=r,r.keyCodeToString=function(l){var a=s[l];return typeof a!="string"&&(a=String.fromCharCode(l)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=n("./keys"),s=n("./useragent"),l=null,a=0,u;function c(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){u={passive:!1}}})}catch{}}function d(){return u==null&&c(),u}function h(b,w,k){this.elem=b,this.type=w,this.callback=k}h.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var f=r.addListener=function(b,w,k,x){b.addEventListener(w,k,d()),x&&x.$toDestroy.push(new h(b,w,k))},p=r.removeListener=function(b,w,k){b.removeEventListener(w,k,d())};r.stopEvent=function(b){return r.stopPropagation(b),r.preventDefault(b),!1},r.stopPropagation=function(b){b.stopPropagation&&b.stopPropagation()},r.preventDefault=function(b){b.preventDefault&&b.preventDefault()},r.getButton=function(b){return b.type=="dblclick"?0:b.type=="contextmenu"||s.isMac&&b.ctrlKey&&!b.altKey&&!b.shiftKey?2:b.button},r.capture=function(b,w,k){var x=b&&b.ownerDocument||document;function S(T){w&&w(T),k&&k(T),p(x,"mousemove",w),p(x,"mouseup",S),p(x,"dragstart",S)}return f(x,"mousemove",w),f(x,"mouseup",S),f(x,"dragstart",S),S},r.addMouseWheelListener=function(b,w,k){f(b,"wheel",function(x){var S=.15,T=x.deltaX||0,C=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=T*S,x.wheelY=C*S;break;case x.DOM_DELTA_LINE:var O=15;x.wheelX=T*O,x.wheelY=C*O;break;case x.DOM_DELTA_PAGE:var _=150;x.wheelX=T*_,x.wheelY=C*_;break}w(x)},k)},r.addMultiMouseDownListener=function(b,w,k,x,S){var T=0,C,O,_,R={2:"dblclick",3:"tripleclick",4:"quadclick"};function A(E){if(r.getButton(E)!==0?T=0:E.detail>1?(T++,T>4&&(T=1)):T=1,s.isIE){var M=Math.abs(E.clientX-C)>5||Math.abs(E.clientY-O)>5;(!_||M)&&(T=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},w[T-1]||600),T==1&&(C=E.clientX,O=E.clientY)}if(E._clicks=T,k[x]("mousedown",E),T>4)T=0;else if(T>1)return k[x](R[T],E)}Array.isArray(b)||(b=[b]),b.forEach(function(E){f(E,"mousedown",A,S)})};var g=function(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)};r.getModifierString=function(b){return i.KEY_MODS[g(b)]};function m(b,w,k){var x=g(w);if(!s.isMac&&l){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(x|=8),l.altGr)if((3&x)!=3)l.altGr=0;else return;if(k===18||k===17){var S="location"in w?w.location:w.keyLocation;if(k===17&&S===1)l[k]==1&&(a=w.timeStamp);else if(k===18&&x===3&&S===2){var T=w.timeStamp-a;T<50&&(l.altGr=!0)}}}if(k in i.MODIFIER_KEYS&&(k=-1),!x&&k===13){var S="location"in w?w.location:w.keyLocation;if(S===3&&(b(w,x,-k),w.defaultPrevented))return}if(s.isChromeOS&&x&8){if(b(w,x,k),w.defaultPrevented)return;x&=-9}return!x&&!(k in i.FUNCTION_KEYS)&&!(k in i.PRINTABLE_KEYS)?!1:b(w,x,k)}r.addCommandKeyListener=function(b,w,k){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var x=null;f(b,"keydown",function(T){x=T.keyCode},k),f(b,"keypress",function(T){return m(w,T,x)},k)}else{var S=null;f(b,"keydown",function(T){l[T.keyCode]=(l[T.keyCode]||0)+1;var C=m(w,T,T.keyCode);return S=T.defaultPrevented,C},k),f(b,"keypress",function(T){S&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(r.stopEvent(T),S=null)},k),f(b,"keyup",function(T){l[T.keyCode]=null},k),l||(v(),f(window,"focus",v))}};function v(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var y=1;r.nextTick=function(b,w){w=w||window;var k="zero-timeout-message-"+y++,x=function(S){S.data==k&&(r.stopPropagation(S),p(w,"message",x),b())};f(w,"message",x),w.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(b,w){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):b()},w)},r.$idleBlockId=null,r.blockIdle=function(b){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},b||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,o){var i;o.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,o){var i=n("../lib/event"),s=n("../config").nls,l=n("../lib/useragent"),a=n("../lib/dom"),u=n("../lib/lang"),c=n("../clipboard"),d=l.isChrome<18,h=l.isIE,f=l.isChrome>63,p=400,g=n("../lib/keys"),m=g.KEY_MODS,v=l.isIOS,y=v?/\s/:/\n/,b=l.isMobile,w=function(k,x){var S=a.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck",!1),S.style.opacity="0",k.insertBefore(S,k.firstChild);var T=!1,C=!1,O=!1,_=!1,R="";b||(S.style.fontSize="1px");var A=!1,E=!1,M="",I=0,N=0,L=0,$=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,F=0;try{var U=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(q){if($=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,q<0){F=0;return}F=q},this.setAriaOptions=function(q){if(q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",q.inline?"both":"list"),S.setAttribute("aria-activedescendant",q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),q.role&&S.setAttribute("role",q.role),q.setLabel&&(S.setAttribute("aria-roledescription",s("editor")),x.session)){var he=x.session.selection.cursor.row;S.setAttribute("aria-label",s("Cursor at row $0",[he+1]))}},this.setAriaOptions({role:"textbox"}),i.addListener(S,"blur",function(q){E||(x.onBlur(q),U=!1)},x),i.addListener(S,"focus",function(q){if(!E){if(U=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(q),l.isEdge?setTimeout(B):B()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),R||f||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var he=S.getBoundingClientRect().top!=0}catch{return}var ve=[];if(he)for(var ie=S.parentElement;ie&&ie.nodeType==1;)ve.push(ie),ie.setAttribute("ace_nocontext",!0),!ie.parentElement&&ie.getRootNode?ie=ie.getRootNode().host:ie=ie.parentElement;S.focus({preventScroll:!0}),he&&ve.forEach(function(Te){Te.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return U},x.on("beforeEndOperation",function(){var q=x.curOp,he=q&&q.command&&q.command.name;if(he!="insertstring"){var ve=he&&(q.docChanged||q.selectionChanged);O&&ve&&(M=S.value="",wt()),B()}});var W=function(q,he){for(var ve=he,ie=1;ie<=q-$&&ie<2*F+1;ie++)ve+=x.session.getLine(q-ie).length+1;return ve},B=v?function(q){if(!(!U||T&&!q||_)){q||(q="");var he=` + @license */var i=n("./oop"),s=function(){var l={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};l.PRINTABLE_KEYS[173]="-";var a,u;for(u in l.FUNCTION_KEYS)a=l.FUNCTION_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);for(u in l.PRINTABLE_KEYS)a=l.PRINTABLE_KEYS[u].toLowerCase(),l[a]=parseInt(u,10);return i.mixin(l,l.MODIFIER_KEYS),i.mixin(l,l.PRINTABLE_KEYS),i.mixin(l,l.FUNCTION_KEYS),l.enter=l.return,l.escape=l.esc,l.del=l.delete,function(){for(var c=["cmd","ctrl","alt","shift"],d=Math.pow(2,c.length);d--;)l.KEY_MODS[d]=c.filter(function(h){return d&l.KEY_MODS[h]}).join("-")+"-"}(),l.KEY_MODS[0]="",l.KEY_MODS[-1]="input-",l}();i.mixin(r,s),r.default=r,r.keyCodeToString=function(l){var a=s[l];return typeof a!="string"&&(a=String.fromCharCode(l)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=n("./keys"),s=n("./useragent"),l=null,a=0,u;function c(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){u={passive:!1}}})}catch{}}function d(){return u==null&&c(),u}function h(b,w,k){this.elem=b,this.type=w,this.callback=k}h.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var f=r.addListener=function(b,w,k,x){b.addEventListener(w,k,d()),x&&x.$toDestroy.push(new h(b,w,k))},p=r.removeListener=function(b,w,k){b.removeEventListener(w,k,d())};r.stopEvent=function(b){return r.stopPropagation(b),r.preventDefault(b),!1},r.stopPropagation=function(b){b.stopPropagation&&b.stopPropagation()},r.preventDefault=function(b){b.preventDefault&&b.preventDefault()},r.getButton=function(b){return b.type=="dblclick"?0:b.type=="contextmenu"||s.isMac&&b.ctrlKey&&!b.altKey&&!b.shiftKey?2:b.button},r.capture=function(b,w,k){var x=b&&b.ownerDocument||document;function S(T){w&&w(T),k&&k(T),p(x,"mousemove",w),p(x,"mouseup",S),p(x,"dragstart",S)}return f(x,"mousemove",w),f(x,"mouseup",S),f(x,"dragstart",S),S},r.addMouseWheelListener=function(b,w,k){f(b,"wheel",function(x){var S=.15,T=x.deltaX||0,C=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=T*S,x.wheelY=C*S;break;case x.DOM_DELTA_LINE:var I=15;x.wheelX=T*I,x.wheelY=C*I;break;case x.DOM_DELTA_PAGE:var _=150;x.wheelX=T*_,x.wheelY=C*_;break}w(x)},k)},r.addMultiMouseDownListener=function(b,w,k,x,S){var T=0,C,I,_,R={2:"dblclick",3:"tripleclick",4:"quadclick"};function A(E){if(r.getButton(E)!==0?T=0:E.detail>1?(T++,T>4&&(T=1)):T=1,s.isIE){var M=Math.abs(E.clientX-C)>5||Math.abs(E.clientY-I)>5;(!_||M)&&(T=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},w[T-1]||600),T==1&&(C=E.clientX,I=E.clientY)}if(E._clicks=T,k[x]("mousedown",E),T>4)T=0;else if(T>1)return k[x](R[T],E)}Array.isArray(b)||(b=[b]),b.forEach(function(E){f(E,"mousedown",A,S)})};var g=function(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)};r.getModifierString=function(b){return i.KEY_MODS[g(b)]};function m(b,w,k){var x=g(w);if(!s.isMac&&l){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(x|=8),l.altGr)if((3&x)!=3)l.altGr=0;else return;if(k===18||k===17){var S="location"in w?w.location:w.keyLocation;if(k===17&&S===1)l[k]==1&&(a=w.timeStamp);else if(k===18&&x===3&&S===2){var T=w.timeStamp-a;T<50&&(l.altGr=!0)}}}if(k in i.MODIFIER_KEYS&&(k=-1),!x&&k===13){var S="location"in w?w.location:w.keyLocation;if(S===3&&(b(w,x,-k),w.defaultPrevented))return}if(s.isChromeOS&&x&8){if(b(w,x,k),w.defaultPrevented)return;x&=-9}return!x&&!(k in i.FUNCTION_KEYS)&&!(k in i.PRINTABLE_KEYS)?!1:b(w,x,k)}r.addCommandKeyListener=function(b,w,k){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var x=null;f(b,"keydown",function(T){x=T.keyCode},k),f(b,"keypress",function(T){return m(w,T,x)},k)}else{var S=null;f(b,"keydown",function(T){l[T.keyCode]=(l[T.keyCode]||0)+1;var C=m(w,T,T.keyCode);return S=T.defaultPrevented,C},k),f(b,"keypress",function(T){S&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(r.stopEvent(T),S=null)},k),f(b,"keyup",function(T){l[T.keyCode]=null},k),l||(v(),f(window,"focus",v))}};function v(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var y=1;r.nextTick=function(b,w){w=w||window;var k="zero-timeout-message-"+y++,x=function(S){S.data==k&&(r.stopPropagation(S),p(w,"message",x),b())};f(w,"message",x),w.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(b,w){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):b()},w)},r.$idleBlockId=null,r.blockIdle=function(b){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},b||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,o){var i;o.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,o){var i=n("../lib/event"),s=n("../config").nls,l=n("../lib/useragent"),a=n("../lib/dom"),u=n("../lib/lang"),c=n("../clipboard"),d=l.isChrome<18,h=l.isIE,f=l.isChrome>63,p=400,g=n("../lib/keys"),m=g.KEY_MODS,v=l.isIOS,y=v?/\s/:/\n/,b=l.isMobile,w=function(k,x){var S=a.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck",!1),S.style.opacity="0",k.insertBefore(S,k.firstChild);var T=!1,C=!1,I=!1,_=!1,R="";b||(S.style.fontSize="1px");var A=!1,E=!1,M="",O=0,N=0,L=0,$=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,F=0;try{var U=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(q){if($=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,q<0){F=0;return}F=q},this.setAriaOptions=function(q){if(q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",q.inline?"both":"list"),S.setAttribute("aria-activedescendant",q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),q.role&&S.setAttribute("role",q.role),q.setLabel&&(S.setAttribute("aria-roledescription",s("editor")),x.session)){var he=x.session.selection.cursor.row;S.setAttribute("aria-label",s("Cursor at row $0",[he+1]))}},this.setAriaOptions({role:"textbox"}),i.addListener(S,"blur",function(q){E||(x.onBlur(q),U=!1)},x),i.addListener(S,"focus",function(q){if(!E){if(U=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(q),l.isEdge?setTimeout(B):B()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),R||f||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var he=S.getBoundingClientRect().top!=0}catch{return}var ve=[];if(he)for(var ie=S.parentElement;ie&&ie.nodeType==1;)ve.push(ie),ie.setAttribute("ace_nocontext",!0),!ie.parentElement&&ie.getRootNode?ie=ie.getRootNode().host:ie=ie.parentElement;S.focus({preventScroll:!0}),he&&ve.forEach(function(Te){Te.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return U},x.on("beforeEndOperation",function(){var q=x.curOp,he=q&&q.command&&q.command.name;if(he!="insertstring"){var ve=he&&(q.docChanged||q.selectionChanged);I&&ve&&(M=S.value="",wt()),B()}});var W=function(q,he){for(var ve=he,ie=1;ie<=q-$&&ie<2*F+1;ie++)ve+=x.session.getLine(q-ie).length+1;return ve},B=v?function(q){if(!(!U||T&&!q||_)){q||(q="");var he=` ab`+q+`cde fg -`;he!=S.value&&(S.value=M=he);var ve=4,ie=4+(q.length||(x.selection.isEmpty()?0:1));(I!=ve||N!=ie)&&S.setSelectionRange(ve,ie),I=ve,N=ie}}:function(){if(!(O||_)&&!(!U&&!X)){O=!0;var q=0,he=0,ve="";if(x.session){var ie=x.selection,Te=ie.getRange(),Ze=ie.cursor.row;Ze===D+1?($=D+1,D=$+2*F):Ze===$-1?(D=$-1,$=D-2*F):(Ze<$-1||Ze>D+1)&&($=Ze>F?Ze-F:0,D=Ze>F?Ze+F:2*F);for(var Xe=[],nt=$;nt<=D;nt++)Xe.push(x.session.getLine(nt));if(ve=Xe.join(` +`;he!=S.value&&(S.value=M=he);var ve=4,ie=4+(q.length||(x.selection.isEmpty()?0:1));(O!=ve||N!=ie)&&S.setSelectionRange(ve,ie),O=ve,N=ie}}:function(){if(!(I||_)&&!(!U&&!X)){I=!0;var q=0,he=0,ve="";if(x.session){var ie=x.selection,Te=ie.getRange(),Ze=ie.cursor.row;Ze===D+1?($=D+1,D=$+2*F):Ze===$-1?(D=$-1,$=D-2*F):(Ze<$-1||Ze>D+1)&&($=Ze>F?Ze-F:0,D=Ze>F?Ze+F:2*F);for(var Xe=[],nt=$;nt<=D;nt++)Xe.push(x.session.getLine(nt));if(ve=Xe.join(` `),q=W(Te.start.row,Te.start.column),he=W(Te.end.row,Te.end.column),Te.start.row<$){var rt=x.session.getLine($-1);q=Te.start.row<$-1?0:q,he+=rt.length+1,ve=rt+` `+ve}else if(Te.end.row>D){var Be=x.session.getLine(D+1);he=Te.end.row>D+1?Be.length:Te.end.column,he+=ve.length+1,ve=ve+` `+Be}else b&&Ze>0&&(ve=` `+ve,he+=1,q+=1);ve.length>p&&(q=M.length&&q.value===M&&M&&q.selectionEnd!==N},V=function(q){O||(T?T=!1:H(S)?(x.selectAll(),B()):b&&S.selectionStart!=I&&B())},Y=null;this.setInputHandler=function(q){Y=q},this.getInputHandler=function(){return Y};var X=!1,Z=function(q,he){if(X&&(X=!1),C)return B(),q&&x.onPaste(q),C=!1,"";for(var ve=S.selectionStart,ie=S.selectionEnd,Te=I,Ze=M.length-N,Xe=q,nt=q.length-ve,rt=q.length-ie,Be=0;Te>0&&M[Be]==q[Be];)Be++,Te--;for(Xe=Xe.slice(Be),Be=1;Ze>0&&M.length-Be>I-1&&M[M.length-Be]==q[q.length-Be];)Be++,Ze--;nt-=Be-1,rt-=Be-1;var Kt=Xe.length-Be+1;if(Kt<0&&(Te=-Kt,Kt=0),Xe=Xe.slice(0,Kt),!he&&!Xe&&!nt&&!Te&&!Ze&&!rt)return"";_=!0;var Co=!1;return l.isAndroid&&Xe==". "&&(Xe=" ",Co=!0),Xe&&!Te&&!Ze&&!nt&&!rt||A?x.onTextInput(Xe):x.onTextInput(Xe,{extendLeft:Te,extendRight:Ze,restoreStart:nt,restoreEnd:rt}),_=!1,M=q,I=ve,N=ie,L=rt,Co?` -`:Xe},te=function(q){if(O)return Lt();if(q&&q.inputType){if(q.inputType=="historyUndo")return x.execCommand("undo");if(q.inputType=="historyRedo")return x.execCommand("redo")}var he=S.value,ve=Z(he,!0);(he.length>p+100||y.test(ve)||b&&I<1&&I==N)&&B()},ce=function(q,he,ve){var ie=q.clipboardData||window.clipboardData;if(!(!ie||d)){var Te=h||ve?"Text":"text/plain";try{return he?ie.setData(Te,he)!==!1:ie.getData(Te)}catch(Ze){if(!ve)return ce(Ze,he,!0)}}},Ne=function(q,he){var ve=x.getCopyText();if(!ve)return i.preventDefault(q);ce(q,ve)?(v&&(B(ve),T=ve,setTimeout(function(){T=!1},10)),he?x.onCut():x.onCopy(),i.preventDefault(q)):(T=!0,S.value=ve,S.select(),setTimeout(function(){T=!1,B(),he?x.onCut():x.onCopy()}))},ye=function(q){Ne(q,!0)},Me=function(q){Ne(q,!1)},Ce=function(q){var he=ce(q);c.pasteCancelled()||(typeof he=="string"?(he&&x.onPaste(he,q),l.isIE&&setTimeout(B),i.preventDefault(q)):(S.value="",C=!0))};i.addCommandKeyListener(S,x.onCommandKey.bind(x),x),i.addListener(S,"select",V,x),i.addListener(S,"input",te,x),i.addListener(S,"cut",ye,x),i.addListener(S,"copy",Me,x),i.addListener(S,"paste",Ce,x),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&i.addListener(k,"keydown",function(q){if(!(l.isMac&&!q.metaKey||!q.ctrlKey))switch(q.keyCode){case 67:Me(q);break;case 86:Ce(q);break;case 88:ye(q);break}},x);var mt=function(q){if(!(O||!x.onCompositionStart||x.$readOnly)&&(O={},!A)){q.data&&(O.useTextareaForIME=!1),setTimeout(Lt,0),x._signal("compositionStart"),x.on("mousedown",qn);var he=x.getSelectionRange();he.end.row=he.start.row,he.end.column=he.start.column,O.markerRange=he,O.selectionStart=I,x.onCompositionStart(O),O.useTextareaForIME?(M=S.value="",I=0,N=0):(S.msGetInputContext&&(O.context=S.msGetInputContext()),S.getInputContext&&(O.context=S.getInputContext()))}},Lt=function(){if(!(!O||!x.onCompositionUpdate||x.$readOnly)){if(A)return qn();if(O.useTextareaForIME)x.onCompositionUpdate(S.value);else{var q=S.value;Z(q),O.markerRange&&(O.context&&(O.markerRange.start.column=O.selectionStart=O.context.compositionStartOffset),O.markerRange.end.column=O.markerRange.start.column+N-O.selectionStart+L)}}},wt=function(q){!x.onCompositionEnd||x.$readOnly||(O=!1,x.onCompositionEnd(),x.off("mousedown",qn),q&&te())};function qn(){E=!0,S.blur(),S.focus(),E=!1}var Nt=u.delayedCall(Lt,50).schedule.bind(null,null);function An(q){q.keyCode==27&&S.value.lengthN&&M[rt]==` -`?Be=g.end:ntN&&M.slice(0,rt).split(` -`).length>2?Be=g.down:rt>N&&M[rt-1]==" "?(Be=g.right,Kt=m.option):(rt>N||rt==N&&N!=I&&nt==rt)&&(Be=g.right),nt!==rt&&(Kt|=m.shift),Be){var Co=he.onCommandKey({},Kt,Be);if(!Co&&he.commands){Be=g.keyCodeToString(Be);var la=he.commands.findKeyCommand(Kt,Be);la&&he.execCommand(la)}I=nt,N=rt,B("")}}};document.addEventListener("selectionchange",Ze),he.on("destroy",function(){document.removeEventListener("selectionchange",Ze)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}};r.TextInput=w,r.$setUserAgentForTests=function(k,x){b=k,v=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("../lib/useragent"),s=0,l=550,a=function(){function d(h){h.$clickSelection=null;var f=h.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return d.prototype.onMouseDown=function(h){var f=h.inSelection(),p=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,m=h.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(p),m==2&&(g.textInput.onContextMenu(h.domEvent),i.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(p,h.domEvent._clicks>1),h.preventDefault()},d.prototype.startSelect=function(h,f){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(h):f||p.selection.moveToPosition(h),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var m=c(this.$clickSelection,p);p=m.cursor,h=m.anchor}f.selection.setSelectionAnchor(h.row,h.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(h){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),m=p.selection[h](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)f=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)f=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,f=m.start;else{var b=c(this.$clickSelection,g);g=b.cursor,f=b.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){var h=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(h>s||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(h){var f=h.getDocumentPosition(),p=this.editor,g=p.session,m=g.getBracketRange(f);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},d.prototype.onTripleClick=function(h){var f=h.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},d.prototype.onQuadClick=function(h){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=h.domEvent.timeStamp,m=g-p.t,v=m?h.wheelX/m:p.vx,y=m?h.wheelY/m:p.vy;m=1&&f.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(w=!0),b<=1&&f.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(w=!0),w)p.allowed=g;else if(g-p.allowed=p.length&&(p=void 0),{value:p&&p[v++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/dom"),a=n("./range").Range,u="ace_tooltip",c=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,m){this.getElement().style.left=g+"px",this.getElement().style.top=m+"px"},p.prototype.setClassName=function(g){l.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=u+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,m,v){g!=null&&this.setText(g),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),d=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var m=this.popups.indexOf(g);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,m,v,y;this.popups.sort(function(_,R){return R.priority-_.priority});var b=[];try{for(var w=s(this.popups),k=w.next();!k.done;k=w.next()){var x=k.value,S=!0;try{for(var T=(v=void 0,s(b)),C=T.next();!C.done;C=T.next()){var O=C.value;if(this.doPopupsOverlap(O,x)){S=!1;break}}}catch(_){v={error:_}}finally{try{C&&!C.done&&(y=T.return)&&y.call(T)}finally{if(v)throw v.error}}S?b.push(x):x.hide()}}catch(_){g={error:_}}finally{try{k&&!k.done&&(m=w.return)&&m.call(w)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,m){var v=g.getElement().getBoundingClientRect(),y=m.getElement().getBoundingClientRect();return v.lefty.left&&v.topy.top},p}(),h=new d;r.popupManager=h,r.Tooltip=c;var f=function(p){i(g,p);function g(m){m===void 0&&(m=document.body);var v=p.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var y=v.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",v.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(v)),v}return g.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var y=v.$mouseHandler.isMousePressed;if(this.isOpen){var b=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(b.row,b.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(m){var v=m.editor,y=m.getDocumentPosition(),b=v.session.getLine(y.row);if(y.column==b.length){var w=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),k=v.session.documentToScreenPosition(y.row,y.column);if(k.column!=w.column||k.row!=w.row)return!0}return!1},g.prototype.setDataProvider=function(m){this.$gatherData=m},g.prototype.showForRange=function(m,v,y,b){if(!(b&&b!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=m.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=a.fromPoints(v.start,v.end);var k=this.getElement();k.innerHTML="",k.appendChild(y),k.style.display="block";var x=w.textToScreenCoordinates(v.start.row,v.start.column),S=k.clientHeight,T=w.scroller.getBoundingClientRect(),C=!0;x.pageY-S<0&&(C=!1),C?x.pageY-=S:x.pageY+=w.lineHeight,k.style.maxWidth=T.width-(x.pageX-T.left)+"px",this.setPosition(x.pageX,x.pageY)}},g.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},g.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||m.relatedTarget==this.getElement()||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},g}(c);r.HoverTooltip=f}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=this&&this.__values||function(f){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&f[p],m=0;if(g)return g.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&m>=f.length&&(f=void 0),{value:f&&f[m++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("../lib/dom"),a=n("../lib/event"),u=n("../tooltip").Tooltip,c=n("../config").nls;function d(f){var p=f.editor,g=p.renderer.$gutterLayer,m=new h(p);f.editor.setDefaultHandler("guttermousedown",function(x){if(!(!p.isFocused()||x.getButton()!=0)){var S=g.getRegion(x);if(S!="foldWidgets"){var T=x.getDocumentPosition().row,C=p.session.selection;if(x.getShiftKey())C.selectTo(T,0);else{if(x.domEvent.detail==2)return p.selectAll(),x.preventDefault();f.$clickSelection=p.selection.getLineRange(T)}return f.setState("selectByLines"),f.captureMouse(x),x.preventDefault()}}});var v,y;function b(){var x=y.getDocumentPosition().row,S=p.session.getLength();if(x==S){var T=p.renderer.pixelToScreenCoordinates(0,y.y).row,C=y.$pos;if(T>p.session.documentToScreenRow(C.row,C.column))return w()}if(m.showTooltip(x),!!m.isOpen)if(p.on("mousewheel",w),f.$tooltipFollowsMouse)k(y);else{var O=y.getGutterRow(),_=g.$lines.get(O);if(_){var R=_.element.querySelector(".ace_gutter_annotation"),A=R.getBoundingClientRect(),E=m.getElement().style;E.left=A.right+"px",E.top=A.bottom+"px"}else k(y)}}function w(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),p.off("mousewheel",w))}function k(x){m.setPosition(x.x,x.y)}f.editor.setDefaultHandler("guttermousemove",function(x){var S=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(S,"ace_fold-widget"))return w();m.isOpen&&f.$tooltipFollowsMouse&&k(x),y=x,!v&&(v=setTimeout(function(){v=null,y&&!f.isMousePressed?b():w()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(x){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,w()},50))},p),p.on("changeSession",w),p.on("input",w)}r.GutterHandler=d;var h=function(f){i(p,f);function p(g){var m=f.call(this,g.container)||this;return m.editor=g,m}return p.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),w=this.getHeight();g+=15,m+=15,g+b>v&&(g-=g+b-v),m+w>y&&(m-=20+w),u.prototype.setPosition.call(this,g,m)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var b=m.session.getFoldLine(g);if(b&&m.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},k,x=g+1;x<=b.end.row;x++)if(m.$annotations[x])for(var S=0;S ").concat(y.text[x]);O[y.type[x].replace("_fold","")].push(R)}var A=[].concat(O.error,O.warning,O.info).join("
    ");this.setHtml(A),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(g){var m,v,y=[],b=["error","warning","info"];try{for(var w=s(b),k=w.next();!k.done;k=w.next()){var x=k.value;if(g[x].length){var S=g[x].length===1?p.annotationLabels[x].singular:p.annotationLabels[x].plural;y.push("".concat(g[x].length," ").concat(S))}}}catch(T){m={error:T}}finally{try{k&&!k.done&&(v=w.return)&&v.call(w)}finally{if(m)throw m.error}}return y.join(", ")},p}(u);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/event"),s=n("../lib/useragent"),l=function(){function a(u,c){this.domEvent=u,this.editor=c,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,c=this.editor.session.documentToScreenRow(u,0),d=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return c-d},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,c=u.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},a.prototype.getButton=function(){return i.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/event"),l=n("../lib/useragent"),a=200,u=200,c=5;function d(f){var p=f.editor,g=i.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(W){f[W]=this[W]},this),p.on("mousedown",this.onMouseDown.bind(f));var v=p.container,y,b,w,k,x,S,T=0,C,O,_,R,A;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(W)},0),W.preventDefault()}x=p.getSelectionRange();var H=W.dataTransfer;H.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),H.setDragImage&&H.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),H.clearData(),H.setData("Text",p.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,O=!1,this.setState(null),!p.getReadOnly()){var B=W.dataTransfer.dropEffect;!C&&B=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||N(),T++,W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||(N(),T++),$!==null&&($=null),W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragLeave=function(W){if(T--,T<=0&&y)return L(),C=null,s.preventDefault(W)},this.onDrop=function(W){if(S){var B=W.dataTransfer;if(O)switch(C){case"move":x.contains(S.row,S.column)?x={start:S,end:S}:x=p.moveText(x,S);break;case"copy":x=p.moveText(x,S,!0);break}else{var H=B.getData("Text");x={start:S,end:p.session.insert(S,H)},p.focus(),C=null}return L(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(f),p),s.addListener(v,"dragend",this.onDragEnd.bind(f),p),s.addListener(v,"dragenter",this.onDragEnter.bind(f),p),s.addListener(v,"dragover",this.onDragOver.bind(f),p),s.addListener(v,"dragleave",this.onDragLeave.bind(f),p),s.addListener(v,"drop",this.onDrop.bind(f),p);function E(W,B){var H=Date.now(),V=!B||W.row!=B.row,Y=!B||W.column!=B.column;if(!R||V||Y)p.moveCursorToPosition(W),R=H,A={x:b,y:w};else{var X=h(A.x,A.y,b,w);X>c?R=null:H-R>=u&&(p.renderer.scrollCursorIntoView(),R=null)}}function M(W,B){var H=Date.now(),V=p.renderer.layerConfig.lineHeight,Y=p.renderer.layerConfig.characterWidth,X=p.renderer.scroller.getBoundingClientRect(),Z={x:{left:b-X.left,right:X.right-b},y:{top:w-X.top,bottom:X.bottom-w}},te=Math.min(Z.x.left,Z.x.right),ce=Math.min(Z.y.top,Z.y.bottom),Ne={row:W.row,column:W.column};te/Y<=2&&(Ne.column+=Z.x.left=a&&p.renderer.scrollCursorIntoView(Ne):_=H:_=null}function I(){var W=S;S=p.renderer.screenToTextCoordinates(b,w),E(S,W),M(S,W)}function N(){x=p.selection.toOrientedRange(),y=p.session.addMarker(x,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),I(),k=setInterval(I,20),T=0,s.addListener(document,"mousemove",D)}function L(){clearInterval(k),p.session.removeMarker(y),y=null,p.selection.fromOrientedRange(x),p.isFocused()&&!O&&p.$resetCursorStyle(),x=null,S=null,T=0,_=null,R=null,s.removeListener(document,"mousemove",D)}var $=null;function D(){$==null&&($=setTimeout(function(){$!=null&&y&&L()},20))}function F(W){var B=W.types;return!B||Array.prototype.some.call(B,function(H){return H=="text/plain"||H=="Text"})}function U(W){var B=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],V=l.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return V&&B.indexOf(Y)>=0?X="copy":H.indexOf(Y)>=0?X="move":B.indexOf(Y)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=l.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),m=f.getButton(),v=f.domEvent.detail||1;if(v===1&&m===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),p.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var b=p.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(d.prototype);function h(f,p,g,m){return Math.sqrt(Math.pow(g-f,2)+Math.pow(m-p,2))}r.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,o){var i=n("./mouse_event").MouseEvent,s=n("../lib/event"),l=n("../lib/dom");r.addTouchListeners=function(a,u){var c="scroll",d,h,f,p,g,m,v=0,y,b=0,w=0,k=0,x,S;function T(){var E=window.navigator&&window.navigator.clipboard,M=!1,I=function(){var L=u.getCopyText(),$=u.session.getUndoManager().hasUndo();S.replaceChild(l.buildDom(M?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],$&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},N=function(L){var $=L.target.getAttribute("action");if($=="more"||!M)return M=!M,I();$=="paste"?E.readText().then(function(D){u.execCommand($,D)}):$&&(($=="cut"||$=="copy")&&(E?E.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand($)),S.firstChild.style.display="none",M=!1,$!="openCommandPalette"&&u.focus()};S=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){c="menu",L.stopPropagation(),L.preventDefault(),u.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),N(L)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function C(){S||T();var E=u.selection.cursor,M=u.renderer.textToScreenCoordinates(E.row,E.column),I=u.renderer.textToScreenCoordinates(0,0).pageX,N=u.renderer.scrollLeft,L=u.container.getBoundingClientRect();S.style.top=M.pageY-L.top-3+"px",M.pageX-L.left=2?u.selection.getLineRange(y.row):u.session.getBracketRange(y);E&&!E.isEmpty()?u.selection.setRange(E):u.selection.selectWord(),c="wait"}s.addListener(a,"contextmenu",function(E){if(x){var M=u.textInput.getElement();M.focus()}},u),s.addListener(a,"touchstart",function(E){var M=E.touches;if(g||M.length>1){clearTimeout(g),g=null,f=-1,c="zoom";return}x=u.$mouseHandler.isMousePressed=!0;var I=u.renderer.layerConfig.lineHeight,N=u.renderer.layerConfig.lineHeight,L=E.timeStamp;p=L;var $=M[0],D=$.clientX,F=$.clientY;Math.abs(d-D)+Math.abs(h-F)>I&&(f=-1),d=E.clientX=D,h=E.clientY=F,w=k=0;var U=new i(E,u);if(y=U.getDocumentPosition(),L-f<500&&M.length==1&&!v)b++,E.preventDefault(),E.button=0,R();else{b=0;var W=u.selection.cursor,B=u.selection.isEmpty()?W:u.selection.anchor,H=u.renderer.$cursorLayer.getPixelPosition(W,!0),V=u.renderer.$cursorLayer.getPixelPosition(B,!0),Y=u.renderer.scroller.getBoundingClientRect(),X=u.renderer.layerConfig.offset,Z=u.renderer.scrollLeft,te=function(ye,Me){return ye=ye/N,Me=Me/I-.75,ye*ye+Me*Me};if(E.clientXNe?"cursor":"anchor"),Ne<3.5?c="anchor":ce<3.5?c="cursor":c="scroll",g=setTimeout(_,450)}f=L},u),s.addListener(a,"touchend",function(E){x=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(u.selection.moveToPosition(y),v=0,C()):c=="scroll"?(A(),O()):C(),clearTimeout(g),g=null},u),s.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var M=E.touches;if(!(M.length>1||c=="zoom")){var I=M[0],N=d-I.clientX,L=h-I.clientY;if(c=="wait")if(N*N+L*L>4)c="cursor";else return E.preventDefault();d=I.clientX,h=I.clientY,E.clientX=I.clientX,E.clientY=I.clientY;var $=E.timeStamp,D=$-p;if(p=$,c=="scroll"){var F=new i(E,u);F.speed=1,F.wheelX=N,F.wheelY=L,10*Math.abs(N)0)if(Ne==16){for(Ce=Me;Ce-1){for(Ce=Me;Ce=0&&V[wt]==x;wt--)B[wt]=i}}}function D(W,B,H){if(!(s=W){for(X=Y+1;X=W;)X++;for(Z=Y,te=X-1;Z=B.length||(X=H[V-1])!=m&&X!=v||(Z=B[V+1])!=m&&Z!=v?y:(l&&(Z=v),Z==X?Z:y);case T:return X=V>0?H[V-1]:b,X==m&&V+10&&H[V-1]==m)return m;if(l)return y;for(ce=V+1,te=B.length;ce=1425&&Ne<=2303||Ne==64286;if(X=B[ce],ye&&(X==g||X==k))return g}return V<1||(X=B[V-1])==b?y:H[V-1];case b:return l=!1,a=!0,i;case w:return u=!0,y;case _:case R:case E:case M:case A:l=!1;case I:return y}}function U(W){var B=W.charCodeAt(0),H=B>>8;return H==0?B>191?p:N[B]:H==5?/[\u0591-\u05f4]/.test(W)?g:p:H==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?O:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:B==1642?C:/[\u06f0-\u06f9]/.test(W)?m:k:H==32&&B<=8287?L[B&255]:H==254&&B>=65136?k:y}r.L=p,r.R=g,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,B,H){if(W.length<2)return{};var V=W.split(""),Y=new Array(V.length),X=new Array(V.length),Z=[];i=H?f:h,$(V,Z,V.length,B);for(var te=0;tek&&B[te]<_||B[te]===y||B[te]===I)?Z[te]=r.ON_R:te>0&&V[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(V[te])&&(Z[te-1]=Z[te]=r.R_H,te++);V[V.length-1]===r.DOT&&(Z[V.length-1]=r.B),V[0]==="‫"&&(Z[0]=r.RLE);for(var te=0;te=0&&(c=this.session.$docRowCache[h])}return c},u.prototype.getSplitIndex=function(){var c=0,d=this.session.$screenRowCache;if(d.length)for(var h,f=this.session.$getRowCacheIndex(d,this.currentRow);this.currentRow-c>0&&(h=this.session.$getRowCacheIndex(d,this.currentRow-c-1),h===f);)f=h,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,d){c===void 0&&(c=this.getDocumentRow());var h=c===this.session.getLength()-1,f=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(d===void 0&&(d=this.getSplitIndex()),d>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=dd?this.session.getOverwrite()?c:c-1:d,f=i.getVisualFromLogicalIdx(h,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&c<=d&&p[f]%2!==0&&f++;for(var m=0;md&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},u.prototype.getSelections=function(c,d){var h=this.bidiMap,f=h.bidiLevels,p,g=[],m=0,v=Math.min(c,d)-this.wrapIndent,y=Math.max(c,d)-this.wrapIndent,b=!1,w=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,S=0;S=v&&xf+m/2;){if(f+=m,p===g.length-1){m=0;break}m=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(h0&&g[p-1]%2===0&&g[p]%2!==0?d=1+(h>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&m===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?d=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&m!==0&&p--,d=this.bidiMap.logicalFromVisual[p]),d===0&&this.isRtlDir&&d++,d+this.wrapIndent},u}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/lang"),l=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,u=function(){function c(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(f){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(d,h){this.$isEmpty=!1,this.anchor.setPosition(d,h)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var d=this.anchor,h=this.lead;return d.row>h.row||d.row==h.row&&d.column>h.column},c.prototype.getRange=function(){var d=this.anchor,h=this.lead;return this.$isEmpty?a.fromPoints(h,h):this.isBackwards()?a.fromPoints(h,d):a.fromPoints(d,h)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(d,h){var f=h?d.end:d.start,p=h?d.start:d.end;this.$setSelection(f.row,f.column,p.row,p.column)},c.prototype.$setSelection=function(d,h,f,p){if(!this.$silent){var g=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(d,h),this.cursor.setPosition(f,p),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||m)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(d){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),d.call(this)},c.prototype.selectTo=function(d,h){this.$moveSelection(function(){this.moveCursorTo(d,h)})},c.prototype.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},c.prototype.moveTo=function(d,h){this.clearSelection(),this.moveCursorTo(d,h)},c.prototype.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(d,h){if(typeof h>"u"){var f=d||this.lead;d=f.row,h=f.column}return this.session.getWordRange(d,h)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var d=this.getCursor(),h=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(h)},c.prototype.getLineRange=function(d,h){var f=typeof d=="number"?d:this.lead.row,p,g=this.session.getFoldLine(f);return g?(f=g.start.row,p=g.end.row):p=f,h===!0?new a(f,0,p,this.session.getLine(p).length):new a(f,0,p+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(d,h,f){var p=d.column,g=d.column+h;return f<0&&(p=d.column-h,g=d.column),this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(p,g).split(" ").length-1==h},c.prototype.moveCursorLeft=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(d,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(h.end.row,h.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(h.column=p)}}this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,h=this.doc.getLine(d).length;this.moveCursorTo(d,h)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(d,h,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(p)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(h)),h>=f.length){this.moveCursorTo(d,f.length),this.moveCursorRight(),d0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,h)},c.prototype.$shortWordEndIndex=function(d){var h=0,f,p=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(d))h=this.session.tokenRe.lastIndex;else{for(;(f=d[h])&&p.test(f);)h++;if(h<1){for(g.lastIndex=0;(f=d[h])&&!g.test(f);)if(g.lastIndex=0,h++,p.test(f))if(h>2){h--;break}else{for(;(f=d[h])&&p.test(f);)h++;if(h>2)break}}}return g.lastIndex=0,h},c.prototype.moveCursorShortWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h),g=this.session.getFoldAt(d,h,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(h==f.length){var m=this.doc.getLength();do d++,p=this.doc.getLine(d);while(d0&&/^\s*$/.test(p));h=p.length,/\s+$/.test(p)||(p="")}var g=s.stringReverse(p),m=this.$shortWordEndIndex(g);return this.moveCursorTo(d,h-m)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(d,h){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(h===0&&(d!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),d!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];d<0?d-=g.rowsAbove||0:d>0&&(d+=g.rowCount-(g.rowsAbove||0))}var m=this.session.screenToDocumentPosition(f.row+d,f.column,p);d!==0&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},c.prototype.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorTo=function(d,h,f){var p=this.session.getFoldAt(d,h,1);p&&(d=p.start.row,h=p.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(d);/[\uDC00-\uDFFF]/.test(g.charAt(h))&&g.charAt(h-1)&&(this.lead.row==d&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(d,h),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(d,h,f){var p=this.session.screenToDocumentPosition(d,h);this.moveCursorTo(p.row,p.column,f)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(d){var h=this.getRange();return d?(d.start.column=h.start.column,d.start.row=h.start.row,d.end.column=h.end.column,d.end.row=h.end.row):d=h,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},c.prototype.getRangeOfMovements=function(d){var h=this.getCursor();try{d(this);var f=this.getCursor();return a.fromPoints(h,f)}catch{return a.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},c.prototype.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(h){var f=h.clone();return f.isBackwards=h.cursor==h.start,f});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},c.prototype.fromJSON=function(d){if(d.start==null)if(this.rangeList&&d.length>1){this.toSingleRange(d[0]);for(var h=d.length;h--;){var f=a.fromPoints(d[h].start,d[h].end);d[h].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},c.prototype.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(d[h]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,i.implement(u.prototype,l),r.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,o){var i=n("./lib/report_error").reportError,s=2e3,l=function(){function a(u){this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var d=this.states[c],h=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},g="g",m=[],v=0;v1?y.onMatch=this.$applyToken:y.onMatch=y.token),w>1&&(/\\\d/.test(y.regex)?b=y.regex.replace(/\\([0-9]+)/g,function(k,x){return"\\"+(parseInt(x,10)+f+1)}):(w=1,b=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),p[f]=v,f+=w,h.push(b),y.onMatch||(y.onMatch=null)}}h.length||(p[0]=0,h.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,g)},this),this.regExps[c]=new RegExp("("+h.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(u){s=u|0},a.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),d=this.token.apply(this,c);if(typeof d=="string")return[{type:d,value:u}];for(var h=[],f=0,p=d.length;fy){var C=u.substring(y,T-S.length);w.type==k?w.value+=C:(w.type&&v.push(w),w={type:k,value:C})}for(var O=0;Os){for(b>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});y1&&d[0]!==h&&d.unshift("#tmp",h),{tokens:v,state:d.length?d:h}},a}();l.prototype.reportError=i,r.Tokenizer=l}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,o){var i=n("../lib/deep_copy").deepCopy,s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(u,c){if(!c){for(var d in u)this.$rules[d]=u[d];return}for(var d in u){for(var h=u[d],f=0;f=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentTokenRow=function(){return this.$row},l.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,c=a[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=a[u].value.length;return c},l.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},l.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new i(this.$row,u,this.$row,u+a.value.length)},l}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d,h={},f={'"':'"',"'":"'"},p=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,h.rangeCount!=v.multiSelect.rangeCount&&(h={rangeCount:v.multiSelect.rangeCount})),h[y])return d=h[y];d=h[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,b,w){var k=v.end.row-v.start.row;return{text:b+y+w,selection:[0,v.start.column+1,k,v.end.column+(k?0:1)]}},m=function(v){v=v||{},this.add("braces","insertion",function(y,b,w,k,x){var S=w.getCursorPosition(),T=k.doc.getLine(S.row);if(x=="{"){p(w);var C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&O!=="{"&&w.getWrapBehavioursEnabled())return g(C,O,"{","}");if(m.isSaneInsertion(w,k))return/[\]\}\)]/.test(T[S.column])||w.inMultiSelectMode||v.braces?(m.recordAutoInsert(w,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(w,k,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){p(w);var _=T.substring(S.column,S.column+1);if(_=="}"){var R=k.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(R!==null&&m.isAutoInsertedClosing(S,T,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==` +`;Kt!=M&&(S.value=M=Kt,O=N=Kt.length)}if(X&&(O=S.selectionStart,N=S.selectionEnd),N!=he||O!=q||S.selectionEnd!=N)try{S.setSelectionRange(q,he),O=q,N=he}catch{}I=!1}};this.resetSelection=B,U&&x.onFocus();var H=function(q){return q.selectionStart===0&&q.selectionEnd>=M.length&&q.value===M&&M&&q.selectionEnd!==N},j=function(q){I||(T?T=!1:H(S)?(x.selectAll(),B()):b&&S.selectionStart!=O&&B())},Y=null;this.setInputHandler=function(q){Y=q},this.getInputHandler=function(){return Y};var X=!1,Z=function(q,he){if(X&&(X=!1),C)return B(),q&&x.onPaste(q),C=!1,"";for(var ve=S.selectionStart,ie=S.selectionEnd,Te=O,Ze=M.length-N,Xe=q,nt=q.length-ve,rt=q.length-ie,Be=0;Te>0&&M[Be]==q[Be];)Be++,Te--;for(Xe=Xe.slice(Be),Be=1;Ze>0&&M.length-Be>O-1&&M[M.length-Be]==q[q.length-Be];)Be++,Ze--;nt-=Be-1,rt-=Be-1;var Kt=Xe.length-Be+1;if(Kt<0&&(Te=-Kt,Kt=0),Xe=Xe.slice(0,Kt),!he&&!Xe&&!nt&&!Te&&!Ze&&!rt)return"";_=!0;var Ao=!1;return l.isAndroid&&Xe==". "&&(Xe=" ",Ao=!0),Xe&&!Te&&!Ze&&!nt&&!rt||A?x.onTextInput(Xe):x.onTextInput(Xe,{extendLeft:Te,extendRight:Ze,restoreStart:nt,restoreEnd:rt}),_=!1,M=q,O=ve,N=ie,L=rt,Ao?` +`:Xe},te=function(q){if(I)return Lt();if(q&&q.inputType){if(q.inputType=="historyUndo")return x.execCommand("undo");if(q.inputType=="historyRedo")return x.execCommand("redo")}var he=S.value,ve=Z(he,!0);(he.length>p+100||y.test(ve)||b&&O<1&&O==N)&&B()},ue=function(q,he,ve){var ie=q.clipboardData||window.clipboardData;if(!(!ie||d)){var Te=h||ve?"Text":"text/plain";try{return he?ie.setData(Te,he)!==!1:ie.getData(Te)}catch(Ze){if(!ve)return ue(Ze,he,!0)}}},Ne=function(q,he){var ve=x.getCopyText();if(!ve)return i.preventDefault(q);ue(q,ve)?(v&&(B(ve),T=ve,setTimeout(function(){T=!1},10)),he?x.onCut():x.onCopy(),i.preventDefault(q)):(T=!0,S.value=ve,S.select(),setTimeout(function(){T=!1,B(),he?x.onCut():x.onCopy()}))},ye=function(q){Ne(q,!0)},Me=function(q){Ne(q,!1)},Ce=function(q){var he=ue(q);c.pasteCancelled()||(typeof he=="string"?(he&&x.onPaste(he,q),l.isIE&&setTimeout(B),i.preventDefault(q)):(S.value="",C=!0))};i.addCommandKeyListener(S,x.onCommandKey.bind(x),x),i.addListener(S,"select",j,x),i.addListener(S,"input",te,x),i.addListener(S,"cut",ye,x),i.addListener(S,"copy",Me,x),i.addListener(S,"paste",Ce,x),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&i.addListener(k,"keydown",function(q){if(!(l.isMac&&!q.metaKey||!q.ctrlKey))switch(q.keyCode){case 67:Me(q);break;case 86:Ce(q);break;case 88:ye(q);break}},x);var vt=function(q){if(!(I||!x.onCompositionStart||x.$readOnly)&&(I={},!A)){q.data&&(I.useTextareaForIME=!1),setTimeout(Lt,0),x._signal("compositionStart"),x.on("mousedown",Zn);var he=x.getSelectionRange();he.end.row=he.start.row,he.end.column=he.start.column,I.markerRange=he,I.selectionStart=O,x.onCompositionStart(I),I.useTextareaForIME?(M=S.value="",O=0,N=0):(S.msGetInputContext&&(I.context=S.msGetInputContext()),S.getInputContext&&(I.context=S.getInputContext()))}},Lt=function(){if(!(!I||!x.onCompositionUpdate||x.$readOnly)){if(A)return Zn();if(I.useTextareaForIME)x.onCompositionUpdate(S.value);else{var q=S.value;Z(q),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+N-I.selectionStart+L)}}},wt=function(q){!x.onCompositionEnd||x.$readOnly||(I=!1,x.onCompositionEnd(),x.off("mousedown",Zn),q&&te())};function Zn(){E=!0,S.blur(),S.focus(),E=!1}var Nt=u.delayedCall(Lt,50).schedule.bind(null,null);function An(q){q.keyCode==27&&S.value.lengthN&&M[rt]==` +`?Be=g.end:ntN&&M.slice(0,rt).split(` +`).length>2?Be=g.down:rt>N&&M[rt-1]==" "?(Be=g.right,Kt=m.option):(rt>N||rt==N&&N!=O&&nt==rt)&&(Be=g.right),nt!==rt&&(Kt|=m.shift),Be){var Ao=he.onCommandKey({},Kt,Be);if(!Ao&&he.commands){Be=g.keyCodeToString(Be);var ha=he.commands.findKeyCommand(Kt,Be);ha&&he.execCommand(ha)}O=nt,N=rt,B("")}}};document.addEventListener("selectionchange",Ze),he.on("destroy",function(){document.removeEventListener("selectionchange",Ze)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}};r.TextInput=w,r.$setUserAgentForTests=function(k,x){b=k,v=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,o){var i=n("../lib/useragent"),s=0,l=550,a=function(){function d(h){h.$clickSelection=null;var f=h.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return d.prototype.onMouseDown=function(h){var f=h.inSelection(),p=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,m=h.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(p),m==2&&(g.textInput.onContextMenu(h.domEvent),i.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(p,h.domEvent._clicks>1),h.preventDefault()},d.prototype.startSelect=function(h,f){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(h):f||p.selection.moveToPosition(h),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var m=c(this.$clickSelection,p);p=m.cursor,h=m.anchor}f.selection.setSelectionAnchor(h.row,h.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(h){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),m=p.selection[h](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)f=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)f=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,f=m.start;else{var b=c(this.$clickSelection,g);g=b.cursor,f=b.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){var h=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(h>s||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(h){var f=h.getDocumentPosition(),p=this.editor,g=p.session,m=g.getBracketRange(f);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},d.prototype.onTripleClick=function(h){var f=h.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},d.prototype.onQuadClick=function(h){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=h.domEvent.timeStamp,m=g-p.t,v=m?h.wheelX/m:p.vx,y=m?h.wheelY/m:p.vy;m=1&&f.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(w=!0),b<=1&&f.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(w=!0),w)p.allowed=g;else if(g-p.allowed=p.length&&(p=void 0),{value:p&&p[v++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/dom"),a=n("./range").Range,u="ace_tooltip",c=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,m){this.getElement().style.left=g+"px",this.getElement().style.top=m+"px"},p.prototype.setClassName=function(g){l.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=u+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,m,v){g!=null&&this.setText(g),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),d=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var m=this.popups.indexOf(g);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,m,v,y;this.popups.sort(function(_,R){return R.priority-_.priority});var b=[];try{for(var w=s(this.popups),k=w.next();!k.done;k=w.next()){var x=k.value,S=!0;try{for(var T=(v=void 0,s(b)),C=T.next();!C.done;C=T.next()){var I=C.value;if(this.doPopupsOverlap(I,x)){S=!1;break}}}catch(_){v={error:_}}finally{try{C&&!C.done&&(y=T.return)&&y.call(T)}finally{if(v)throw v.error}}S?b.push(x):x.hide()}}catch(_){g={error:_}}finally{try{k&&!k.done&&(m=w.return)&&m.call(w)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,m){var v=g.getElement().getBoundingClientRect(),y=m.getElement().getBoundingClientRect();return v.lefty.left&&v.topy.top},p}(),h=new d;r.popupManager=h,r.Tooltip=c;var f=function(p){i(g,p);function g(m){m===void 0&&(m=document.body);var v=p.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var y=v.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",v.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(v)),v}return g.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var y=v.$mouseHandler.isMousePressed;if(this.isOpen){var b=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(b.row,b.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(m){var v=m.editor,y=m.getDocumentPosition(),b=v.session.getLine(y.row);if(y.column==b.length){var w=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),k=v.session.documentToScreenPosition(y.row,y.column);if(k.column!=w.column||k.row!=w.row)return!0}return!1},g.prototype.setDataProvider=function(m){this.$gatherData=m},g.prototype.showForRange=function(m,v,y,b){if(!(b&&b!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=m.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=a.fromPoints(v.start,v.end);var k=this.getElement();k.innerHTML="",k.appendChild(y),k.style.display="block";var x=w.textToScreenCoordinates(v.start.row,v.start.column),S=k.clientHeight,T=w.scroller.getBoundingClientRect(),C=!0;x.pageY-S<0&&(C=!1),C?x.pageY-=S:x.pageY+=w.lineHeight,k.style.maxWidth=T.width-(x.pageX-T.left)+"px",this.setPosition(x.pageX,x.pageY)}},g.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},g.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||m.relatedTarget==this.getElement()||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},g}(c);r.HoverTooltip=f}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=this&&this.__values||function(f){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&f[p],m=0;if(g)return g.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&m>=f.length&&(f=void 0),{value:f&&f[m++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("../lib/dom"),a=n("../lib/event"),u=n("../tooltip").Tooltip,c=n("../config").nls;function d(f){var p=f.editor,g=p.renderer.$gutterLayer,m=new h(p);f.editor.setDefaultHandler("guttermousedown",function(x){if(!(!p.isFocused()||x.getButton()!=0)){var S=g.getRegion(x);if(S!="foldWidgets"){var T=x.getDocumentPosition().row,C=p.session.selection;if(x.getShiftKey())C.selectTo(T,0);else{if(x.domEvent.detail==2)return p.selectAll(),x.preventDefault();f.$clickSelection=p.selection.getLineRange(T)}return f.setState("selectByLines"),f.captureMouse(x),x.preventDefault()}}});var v,y;function b(){var x=y.getDocumentPosition().row,S=p.session.getLength();if(x==S){var T=p.renderer.pixelToScreenCoordinates(0,y.y).row,C=y.$pos;if(T>p.session.documentToScreenRow(C.row,C.column))return w()}if(m.showTooltip(x),!!m.isOpen)if(p.on("mousewheel",w),f.$tooltipFollowsMouse)k(y);else{var I=y.getGutterRow(),_=g.$lines.get(I);if(_){var R=_.element.querySelector(".ace_gutter_annotation"),A=R.getBoundingClientRect(),E=m.getElement().style;E.left=A.right+"px",E.top=A.bottom+"px"}else k(y)}}function w(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),p.off("mousewheel",w))}function k(x){m.setPosition(x.x,x.y)}f.editor.setDefaultHandler("guttermousemove",function(x){var S=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(S,"ace_fold-widget"))return w();m.isOpen&&f.$tooltipFollowsMouse&&k(x),y=x,!v&&(v=setTimeout(function(){v=null,y&&!f.isMousePressed?b():w()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(x){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,w()},50))},p),p.on("changeSession",w),p.on("input",w)}r.GutterHandler=d;var h=function(f){i(p,f);function p(g){var m=f.call(this,g.container)||this;return m.editor=g,m}return p.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),w=this.getHeight();g+=15,m+=15,g+b>v&&(g-=g+b-v),m+w>y&&(m-=20+w),u.prototype.setPosition.call(this,g,m)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var b=m.session.getFoldLine(g);if(b&&m.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},k,x=g+1;x<=b.end.row;x++)if(m.$annotations[x])for(var S=0;S ").concat(y.text[x]);I[y.type[x].replace("_fold","")].push(R)}var A=[].concat(I.error,I.warning,I.info).join("
    ");this.setHtml(A),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(g){var m,v,y=[],b=["error","warning","info"];try{for(var w=s(b),k=w.next();!k.done;k=w.next()){var x=k.value;if(g[x].length){var S=g[x].length===1?p.annotationLabels[x].singular:p.annotationLabels[x].plural;y.push("".concat(g[x].length," ").concat(S))}}}catch(T){m={error:T}}finally{try{k&&!k.done&&(v=w.return)&&v.call(w)}finally{if(m)throw m.error}}return y.join(", ")},p}(u);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/event"),s=n("../lib/useragent"),l=function(){function a(u,c){this.domEvent=u,this.editor=c,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,c=this.editor.session.documentToScreenRow(u,0),d=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return c-d},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,c=u.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},a.prototype.getButton=function(){return i.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/event"),l=n("../lib/useragent"),a=200,u=200,c=5;function d(f){var p=f.editor,g=i.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(W){f[W]=this[W]},this),p.on("mousedown",this.onMouseDown.bind(f));var v=p.container,y,b,w,k,x,S,T=0,C,I,_,R,A;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(W)},0),W.preventDefault()}x=p.getSelectionRange();var H=W.dataTransfer;H.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),H.setDragImage&&H.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),H.clearData(),H.setData("Text",p.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,I=!1,this.setState(null),!p.getReadOnly()){var B=W.dataTransfer.dropEffect;!C&&B=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||N(),T++,W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(p.getReadOnly()||!F(W.dataTransfer)))return b=W.clientX,w=W.clientY,y||(N(),T++),$!==null&&($=null),W.dataTransfer.dropEffect=C=U(W),s.preventDefault(W)},this.onDragLeave=function(W){if(T--,T<=0&&y)return L(),C=null,s.preventDefault(W)},this.onDrop=function(W){if(S){var B=W.dataTransfer;if(I)switch(C){case"move":x.contains(S.row,S.column)?x={start:S,end:S}:x=p.moveText(x,S);break;case"copy":x=p.moveText(x,S,!0);break}else{var H=B.getData("Text");x={start:S,end:p.session.insert(S,H)},p.focus(),C=null}return L(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(f),p),s.addListener(v,"dragend",this.onDragEnd.bind(f),p),s.addListener(v,"dragenter",this.onDragEnter.bind(f),p),s.addListener(v,"dragover",this.onDragOver.bind(f),p),s.addListener(v,"dragleave",this.onDragLeave.bind(f),p),s.addListener(v,"drop",this.onDrop.bind(f),p);function E(W,B){var H=Date.now(),j=!B||W.row!=B.row,Y=!B||W.column!=B.column;if(!R||j||Y)p.moveCursorToPosition(W),R=H,A={x:b,y:w};else{var X=h(A.x,A.y,b,w);X>c?R=null:H-R>=u&&(p.renderer.scrollCursorIntoView(),R=null)}}function M(W,B){var H=Date.now(),j=p.renderer.layerConfig.lineHeight,Y=p.renderer.layerConfig.characterWidth,X=p.renderer.scroller.getBoundingClientRect(),Z={x:{left:b-X.left,right:X.right-b},y:{top:w-X.top,bottom:X.bottom-w}},te=Math.min(Z.x.left,Z.x.right),ue=Math.min(Z.y.top,Z.y.bottom),Ne={row:W.row,column:W.column};te/Y<=2&&(Ne.column+=Z.x.left=a&&p.renderer.scrollCursorIntoView(Ne):_=H:_=null}function O(){var W=S;S=p.renderer.screenToTextCoordinates(b,w),E(S,W),M(S,W)}function N(){x=p.selection.toOrientedRange(),y=p.session.addMarker(x,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),O(),k=setInterval(O,20),T=0,s.addListener(document,"mousemove",D)}function L(){clearInterval(k),p.session.removeMarker(y),y=null,p.selection.fromOrientedRange(x),p.isFocused()&&!I&&p.$resetCursorStyle(),x=null,S=null,T=0,_=null,R=null,s.removeListener(document,"mousemove",D)}var $=null;function D(){$==null&&($=setTimeout(function(){$!=null&&y&&L()},20))}function F(W){var B=W.types;return!B||Array.prototype.some.call(B,function(H){return H=="text/plain"||H=="Text"})}function U(W){var B=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],j=l.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return j&&B.indexOf(Y)>=0?X="copy":H.indexOf(Y)>=0?X="move":B.indexOf(Y)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=l.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),m=f.getButton(),v=f.domEvent.detail||1;if(v===1&&m===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),p.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var b=p.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(d.prototype);function h(f,p,g,m){return Math.sqrt(Math.pow(g-f,2)+Math.pow(m-p,2))}r.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,o){var i=n("./mouse_event").MouseEvent,s=n("../lib/event"),l=n("../lib/dom");r.addTouchListeners=function(a,u){var c="scroll",d,h,f,p,g,m,v=0,y,b=0,w=0,k=0,x,S;function T(){var E=window.navigator&&window.navigator.clipboard,M=!1,O=function(){var L=u.getCopyText(),$=u.session.getUndoManager().hasUndo();S.replaceChild(l.buildDom(M?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],$&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},N=function(L){var $=L.target.getAttribute("action");if($=="more"||!M)return M=!M,O();$=="paste"?E.readText().then(function(D){u.execCommand($,D)}):$&&(($=="cut"||$=="copy")&&(E?E.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand($)),S.firstChild.style.display="none",M=!1,$!="openCommandPalette"&&u.focus()};S=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){c="menu",L.stopPropagation(),L.preventDefault(),u.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),N(L)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function C(){S||T();var E=u.selection.cursor,M=u.renderer.textToScreenCoordinates(E.row,E.column),O=u.renderer.textToScreenCoordinates(0,0).pageX,N=u.renderer.scrollLeft,L=u.container.getBoundingClientRect();S.style.top=M.pageY-L.top-3+"px",M.pageX-L.left=2?u.selection.getLineRange(y.row):u.session.getBracketRange(y);E&&!E.isEmpty()?u.selection.setRange(E):u.selection.selectWord(),c="wait"}s.addListener(a,"contextmenu",function(E){if(x){var M=u.textInput.getElement();M.focus()}},u),s.addListener(a,"touchstart",function(E){var M=E.touches;if(g||M.length>1){clearTimeout(g),g=null,f=-1,c="zoom";return}x=u.$mouseHandler.isMousePressed=!0;var O=u.renderer.layerConfig.lineHeight,N=u.renderer.layerConfig.lineHeight,L=E.timeStamp;p=L;var $=M[0],D=$.clientX,F=$.clientY;Math.abs(d-D)+Math.abs(h-F)>O&&(f=-1),d=E.clientX=D,h=E.clientY=F,w=k=0;var U=new i(E,u);if(y=U.getDocumentPosition(),L-f<500&&M.length==1&&!v)b++,E.preventDefault(),E.button=0,R();else{b=0;var W=u.selection.cursor,B=u.selection.isEmpty()?W:u.selection.anchor,H=u.renderer.$cursorLayer.getPixelPosition(W,!0),j=u.renderer.$cursorLayer.getPixelPosition(B,!0),Y=u.renderer.scroller.getBoundingClientRect(),X=u.renderer.layerConfig.offset,Z=u.renderer.scrollLeft,te=function(ye,Me){return ye=ye/N,Me=Me/O-.75,ye*ye+Me*Me};if(E.clientXNe?"cursor":"anchor"),Ne<3.5?c="anchor":ue<3.5?c="cursor":c="scroll",g=setTimeout(_,450)}f=L},u),s.addListener(a,"touchend",function(E){x=u.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(u.selection.moveToPosition(y),v=0,C()):c=="scroll"?(A(),I()):C(),clearTimeout(g),g=null},u),s.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var M=E.touches;if(!(M.length>1||c=="zoom")){var O=M[0],N=d-O.clientX,L=h-O.clientY;if(c=="wait")if(N*N+L*L>4)c="cursor";else return E.preventDefault();d=O.clientX,h=O.clientY,E.clientX=O.clientX,E.clientY=O.clientY;var $=E.timeStamp,D=$-p;if(p=$,c=="scroll"){var F=new i(E,u);F.speed=1,F.wheelX=N,F.wheelY=L,10*Math.abs(N)0)if(Ne==16){for(Ce=Me;Ce-1){for(Ce=Me;Ce=0&&j[wt]==x;wt--)B[wt]=i}}}function D(W,B,H){if(!(s=W){for(X=Y+1;X=W;)X++;for(Z=Y,te=X-1;Z=B.length||(X=H[j-1])!=m&&X!=v||(Z=B[j+1])!=m&&Z!=v?y:(l&&(Z=v),Z==X?Z:y);case T:return X=j>0?H[j-1]:b,X==m&&j+10&&H[j-1]==m)return m;if(l)return y;for(ue=j+1,te=B.length;ue=1425&&Ne<=2303||Ne==64286;if(X=B[ue],ye&&(X==g||X==k))return g}return j<1||(X=B[j-1])==b?y:H[j-1];case b:return l=!1,a=!0,i;case w:return u=!0,y;case _:case R:case E:case M:case A:l=!1;case O:return y}}function U(W){var B=W.charCodeAt(0),H=B>>8;return H==0?B>191?p:N[B]:H==5?/[\u0591-\u05f4]/.test(W)?g:p:H==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?I:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:B==1642?C:/[\u06f0-\u06f9]/.test(W)?m:k:H==32&&B<=8287?L[B&255]:H==254&&B>=65136?k:y}r.L=p,r.R=g,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,B,H){if(W.length<2)return{};var j=W.split(""),Y=new Array(j.length),X=new Array(j.length),Z=[];i=H?f:h,$(j,Z,j.length,B);for(var te=0;tek&&B[te]<_||B[te]===y||B[te]===O)?Z[te]=r.ON_R:te>0&&j[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(j[te])&&(Z[te-1]=Z[te]=r.R_H,te++);j[j.length-1]===r.DOT&&(Z[j.length-1]=r.B),j[0]==="‫"&&(Z[0]=r.RLE);for(var te=0;te=0&&(c=this.session.$docRowCache[h])}return c},u.prototype.getSplitIndex=function(){var c=0,d=this.session.$screenRowCache;if(d.length)for(var h,f=this.session.$getRowCacheIndex(d,this.currentRow);this.currentRow-c>0&&(h=this.session.$getRowCacheIndex(d,this.currentRow-c-1),h===f);)f=h,c++;else c=this.currentRow;return c},u.prototype.updateRowLine=function(c,d){c===void 0&&(c=this.getDocumentRow());var h=c===this.session.getLength()-1,f=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(d===void 0&&(d=this.getSplitIndex()),d>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=dd?this.session.getOverwrite()?c:c-1:d,f=i.getVisualFromLogicalIdx(h,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&c<=d&&p[f]%2!==0&&f++;for(var m=0;md&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},u.prototype.getSelections=function(c,d){var h=this.bidiMap,f=h.bidiLevels,p,g=[],m=0,v=Math.min(c,d)-this.wrapIndent,y=Math.max(c,d)-this.wrapIndent,b=!1,w=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,S=0;S=v&&xf+m/2;){if(f+=m,p===g.length-1){m=0;break}m=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(h0&&g[p-1]%2===0&&g[p]%2!==0?d=1+(h>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&m===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?d=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&m!==0&&p--,d=this.bidiMap.logicalFromVisual[p]),d===0&&this.isRtlDir&&d++,d+this.wrapIndent},u}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/lang"),l=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,u=function(){function c(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(f){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return c.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},c.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},c.prototype.getCursor=function(){return this.lead.getPosition()},c.prototype.setAnchor=function(d,h){this.$isEmpty=!1,this.anchor.setPosition(d,h)},c.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},c.prototype.getSelectionLead=function(){return this.lead.getPosition()},c.prototype.isBackwards=function(){var d=this.anchor,h=this.lead;return d.row>h.row||d.row==h.row&&d.column>h.column},c.prototype.getRange=function(){var d=this.anchor,h=this.lead;return this.$isEmpty?a.fromPoints(h,h):this.isBackwards()?a.fromPoints(h,d):a.fromPoints(d,h)},c.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},c.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},c.prototype.setRange=function(d,h){var f=h?d.end:d.start,p=h?d.start:d.end;this.$setSelection(f.row,f.column,p.row,p.column)},c.prototype.$setSelection=function(d,h,f,p){if(!this.$silent){var g=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(d,h),this.cursor.setPosition(f,p),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||m)&&this._emit("changeSelection")}},c.prototype.$moveSelection=function(d){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),d.call(this)},c.prototype.selectTo=function(d,h){this.$moveSelection(function(){this.moveCursorTo(d,h)})},c.prototype.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},c.prototype.moveTo=function(d,h){this.clearSelection(),this.moveCursorTo(d,h)},c.prototype.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},c.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},c.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},c.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},c.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},c.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},c.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},c.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},c.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},c.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},c.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},c.prototype.getWordRange=function(d,h){if(typeof h>"u"){var f=d||this.lead;d=f.row,h=f.column}return this.session.getWordRange(d,h)},c.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},c.prototype.selectAWord=function(){var d=this.getCursor(),h=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(h)},c.prototype.getLineRange=function(d,h){var f=typeof d=="number"?d:this.lead.row,p,g=this.session.getFoldLine(f);return g?(f=g.start.row,p=g.end.row):p=f,h===!0?new a(f,0,p,this.session.getLine(p).length):new a(f,0,p+1,0)},c.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},c.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},c.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},c.prototype.wouldMoveIntoSoftTab=function(d,h,f){var p=d.column,g=d.column+h;return f<0&&(p=d.column-h,g=d.column),this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(p,g).split(" ").length-1==h},c.prototype.moveCursorLeft=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(d,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},c.prototype.moveCursorRight=function(){var d=this.lead.getPosition(),h;if(h=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(h.end.row,h.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(h.column=p)}}this.moveCursorTo(h.row,h.column)},c.prototype.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,h=this.doc.getLine(d).length;this.moveCursorTo(d,h)},c.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},c.prototype.moveCursorLongWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(d,h,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(p)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(h)),h>=f.length){this.moveCursorTo(d,f.length),this.moveCursorRight(),d0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,h)},c.prototype.$shortWordEndIndex=function(d){var h=0,f,p=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(d))h=this.session.tokenRe.lastIndex;else{for(;(f=d[h])&&p.test(f);)h++;if(h<1){for(g.lastIndex=0;(f=d[h])&&!g.test(f);)if(g.lastIndex=0,h++,p.test(f))if(h>2){h--;break}else{for(;(f=d[h])&&p.test(f);)h++;if(h>2)break}}}return g.lastIndex=0,h},c.prototype.moveCursorShortWordRight=function(){var d=this.lead.row,h=this.lead.column,f=this.doc.getLine(d),p=f.substring(h),g=this.session.getFoldAt(d,h,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(h==f.length){var m=this.doc.getLength();do d++,p=this.doc.getLine(d);while(d0&&/^\s*$/.test(p));h=p.length,/\s+$/.test(p)||(p="")}var g=s.stringReverse(p),m=this.$shortWordEndIndex(g);return this.moveCursorTo(d,h-m)},c.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},c.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},c.prototype.moveCursorBy=function(d,h){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(h===0&&(d!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),d!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];d<0?d-=g.rowsAbove||0:d>0&&(d+=g.rowCount-(g.rowsAbove||0))}var m=this.session.screenToDocumentPosition(f.row+d,f.column,p);d!==0&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},c.prototype.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},c.prototype.moveCursorTo=function(d,h,f){var p=this.session.getFoldAt(d,h,1);p&&(d=p.start.row,h=p.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(d);/[\uDC00-\uDFFF]/.test(g.charAt(h))&&g.charAt(h-1)&&(this.lead.row==d&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(d,h),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},c.prototype.moveCursorToScreen=function(d,h,f){var p=this.session.screenToDocumentPosition(d,h);this.moveCursorTo(p.row,p.column,f)},c.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},c.prototype.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},c.prototype.toOrientedRange=function(d){var h=this.getRange();return d?(d.start.column=h.start.column,d.start.row=h.start.row,d.end.column=h.end.column,d.end.row=h.end.row):d=h,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},c.prototype.getRangeOfMovements=function(d){var h=this.getCursor();try{d(this);var f=this.getCursor();return a.fromPoints(h,f)}catch{return a.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},c.prototype.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(h){var f=h.clone();return f.isBackwards=h.cursor==h.start,f});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},c.prototype.fromJSON=function(d){if(d.start==null)if(this.rangeList&&d.length>1){this.toSingleRange(d[0]);for(var h=d.length;h--;){var f=a.fromPoints(d[h].start,d[h].end);d[h].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},c.prototype.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(d[h]))return!1;return!0},c}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,i.implement(u.prototype,l),r.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,o){var i=n("./lib/report_error").reportError,s=2e3,l=function(){function a(u){this.states=u,this.regExps={},this.matchMappings={};for(var c in this.states){for(var d=this.states[c],h=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},g="g",m=[],v=0;v1?y.onMatch=this.$applyToken:y.onMatch=y.token),w>1&&(/\\\d/.test(y.regex)?b=y.regex.replace(/\\([0-9]+)/g,function(k,x){return"\\"+(parseInt(x,10)+f+1)}):(w=1,b=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),p[f]=v,f+=w,h.push(b),y.onMatch||(y.onMatch=null)}}h.length||(p[0]=0,h.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,g)},this),this.regExps[c]=new RegExp("("+h.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(u){s=u|0},a.prototype.$applyToken=function(u){var c=this.splitRegex.exec(u).slice(1),d=this.token.apply(this,c);if(typeof d=="string")return[{type:d,value:u}];for(var h=[],f=0,p=d.length;fy){var C=u.substring(y,T-S.length);w.type==k?w.value+=C:(w.type&&v.push(w),w={type:k,value:C})}for(var I=0;Is){for(b>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:u});y1&&d[0]!==h&&d.unshift("#tmp",h),{tokens:v,state:d.length?d:h}},a}();l.prototype.reportError=i,r.Tokenizer=l}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,o){var i=n("../lib/deep_copy").deepCopy,s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(u,c){if(!c){for(var d in u)this.$rules[d]=u[d];return}for(var d in u){for(var h=u[d],f=0;f=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentTokenRow=function(){return this.$row},l.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,c=a[u].start;if(c!==void 0)return c;for(c=0;u>0;)u-=1,c+=a[u].value.length;return c},l.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},l.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new i(this.$row,u,this.$row,u+a.value.length)},l}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d,h={},f={'"':'"',"'":"'"},p=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,h.rangeCount!=v.multiSelect.rangeCount&&(h={rangeCount:v.multiSelect.rangeCount})),h[y])return d=h[y];d=h[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,b,w){var k=v.end.row-v.start.row;return{text:b+y+w,selection:[0,v.start.column+1,k,v.end.column+(k?0:1)]}},m=function(v){v=v||{},this.add("braces","insertion",function(y,b,w,k,x){var S=w.getCursorPosition(),T=k.doc.getLine(S.row);if(x=="{"){p(w);var C=w.getSelectionRange(),I=k.doc.getTextRange(C);if(I!==""&&I!=="{"&&w.getWrapBehavioursEnabled())return g(C,I,"{","}");if(m.isSaneInsertion(w,k))return/[\]\}\)]/.test(T[S.column])||w.inMultiSelectMode||v.braces?(m.recordAutoInsert(w,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(w,k,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){p(w);var _=T.substring(S.column,S.column+1);if(_=="}"){var R=k.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(R!==null&&m.isAutoInsertedClosing(S,T,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==` `||x==`\r -`){p(w);var A="";m.isMaybeInsertedClosing(S,T)&&(A=a.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var _=T.substring(S.column,S.column+1);if(_==="}"){var E=k.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!E)return null;var M=this.$getIndent(k.getLine(E.row))}else if(A)var M=this.$getIndent(T);else{m.clearMaybeInsertedClosing();return}var I=M+k.getTabString();return{text:` -`+I+` -`+M+A,selection:[1,I.length,1,I.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="{"){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.end.column,x.end.column+1);if(C=="}")return x.end.column++,x;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,b,w,k,x){if(x=="("){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"(",")");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){p(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),_=O.substring(C.column,C.column+1);if(_==")"){var R=k.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="("){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C==")")return x.end.column++,x}}),this.add("brackets","insertion",function(y,b,w,k,x){if(x=="["){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"[","]");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){p(w);var C=w.getCursorPosition(),O=k.doc.getLine(C.row),_=O.substring(C.column,C.column+1);if(_=="]"){var R=k.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="["){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(y,b,w,k,x){var S=k.$mode.$quotes||f;if(x.length==1&&S[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;p(w);var T=x,C=w.getSelectionRange(),O=k.doc.getTextRange(C);if(O!==""&&(O.length!=1||!S[O])&&w.getWrapBehavioursEnabled())return g(C,O,T,T);if(!O){var _=w.getCursorPosition(),R=k.doc.getLine(_.row),A=R.substring(_.column-1,_.column),E=R.substring(_.column,_.column+1),M=k.getTokenAt(_.row,_.column),I=k.getTokenAt(_.row,_.column+1);if(A=="\\"&&M&&/escape/.test(M.type))return null;var N=M&&/string|escape/.test(M.type),L=!I||/string|escape/.test(I.type),$;if(E==T)$=N!==L,$&&/string\.end/.test(I.type)&&($=!1);else{if(N&&!L||N&&L)return null;var D=k.$mode.tokenRe;D.lastIndex=0;var F=D.test(A);D.lastIndex=0;var U=D.test(E),W=k.$mode.$pairQuotesAfter,B=W&&W[T]&&W[T].test(A);if(!B&&F||U||E&&!/[\s;,.})\]\\]/.test(E))return null;var H=R[_.column-2];if(A==T&&(H==T||D.test(H)))return null;$=!0}return{text:$?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,b,w,k,x){var S=k.$mode.$quotes||f,T=k.doc.getTextRange(x);if(!x.isMultiLine()&&S.hasOwnProperty(T)){p(w);var C=k.doc.getLine(x.start.row),O=C.substring(x.start.column+1,x.start.column+2);if(O==T)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,b,w,k,x){if(y==="doc-start"&&(x===` +`){p(w);var A="";m.isMaybeInsertedClosing(S,T)&&(A=a.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var _=T.substring(S.column,S.column+1);if(_==="}"){var E=k.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!E)return null;var M=this.$getIndent(k.getLine(E.row))}else if(A)var M=this.$getIndent(T);else{m.clearMaybeInsertedClosing();return}var O=M+k.getTabString();return{text:` +`+O+` +`+M+A,selection:[1,O.length,1,O.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="{"){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.end.column,x.end.column+1);if(C=="}")return x.end.column++,x;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,b,w,k,x){if(x=="("){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"(",")");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){p(w);var C=w.getCursorPosition(),I=k.doc.getLine(C.row),_=I.substring(C.column,C.column+1);if(_==")"){var R=k.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,I,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="("){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C==")")return x.end.column++,x}}),this.add("brackets","insertion",function(y,b,w,k,x){if(x=="["){p(w);var S=w.getSelectionRange(),T=k.doc.getTextRange(S);if(T!==""&&w.getWrapBehavioursEnabled())return g(S,T,"[","]");if(m.isSaneInsertion(w,k))return m.recordAutoInsert(w,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){p(w);var C=w.getCursorPosition(),I=k.doc.getLine(C.row),_=I.substring(C.column,C.column+1);if(_=="]"){var R=k.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(R!==null&&m.isAutoInsertedClosing(C,I,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,b,w,k,x){var S=k.doc.getTextRange(x);if(!x.isMultiLine()&&S=="["){p(w);var T=k.doc.getLine(x.start.row),C=T.substring(x.start.column+1,x.start.column+2);if(C=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(y,b,w,k,x){var S=k.$mode.$quotes||f;if(x.length==1&&S[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;p(w);var T=x,C=w.getSelectionRange(),I=k.doc.getTextRange(C);if(I!==""&&(I.length!=1||!S[I])&&w.getWrapBehavioursEnabled())return g(C,I,T,T);if(!I){var _=w.getCursorPosition(),R=k.doc.getLine(_.row),A=R.substring(_.column-1,_.column),E=R.substring(_.column,_.column+1),M=k.getTokenAt(_.row,_.column),O=k.getTokenAt(_.row,_.column+1);if(A=="\\"&&M&&/escape/.test(M.type))return null;var N=M&&/string|escape/.test(M.type),L=!O||/string|escape/.test(O.type),$;if(E==T)$=N!==L,$&&/string\.end/.test(O.type)&&($=!1);else{if(N&&!L||N&&L)return null;var D=k.$mode.tokenRe;D.lastIndex=0;var F=D.test(A);D.lastIndex=0;var U=D.test(E),W=k.$mode.$pairQuotesAfter,B=W&&W[T]&&W[T].test(A);if(!B&&F||U||E&&!/[\s;,.})\]\\]/.test(E))return null;var H=R[_.column-2];if(A==T&&(H==T||D.test(H)))return null;$=!0}return{text:$?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,b,w,k,x){var S=k.$mode.$quotes||f,T=k.doc.getTextRange(x);if(!x.isMultiLine()&&S.hasOwnProperty(T)){p(w);var C=k.doc.getLine(x.start.row),I=C.substring(x.start.column+1,x.start.column+2);if(I==T)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,b,w,k,x){if(y==="doc-start"&&(x===` `||x===`\r -`)&&w.selection.isEmpty()){var S=w.getCursorPosition(),T=k.doc.getLine(S.row),C=k.doc.getLine(S.row+1),O=this.$getIndent(T);if(/\s*\*/.test(C))return/^\s*\*/.test(T)?{text:x+O+"* ",selection:[1,3+O.length,1,3+O.length]}:{text:x+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(T.substring(0,S.column)))return{text:x+O+" * "+x+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})};m.isSaneInsertion=function(v,y){var b=v.getCursorPosition(),w=new l(y,b.row,b.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",u)){if(/[)}\]]/.test(v.session.getLine(b.row)[b.column]))return!0;var k=new l(y,b.row,b.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",u))return!1}return w.stepForward(),w.getCurrentTokenRow()!==b.row||this.$matchTokenType(w.getCurrentToken()||"text",c)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isAutoInsertedClosing(w,k,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=w.row,d.autoInsertedLineEnd=b+k.substr(w.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isMaybeInsertedClosing(w,k)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=w.row,d.maybeInsertedLineStart=k.substr(0,w.column)+b,d.maybeInsertedLineEnd=k.substr(w.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,b){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&b===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},i.inherits(m,s),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,o){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,l=[],a=0;a2?H%x!=x-1:H%x==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,C=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+c.escapeRegExp(T)+")"),_=new RegExp("(?:"+c.escapeRegExp(C)+")\\s*$"),R=function($,D){E($,D)||(!b||/\S/.test($))&&(y.insertInLine({row:D,column:$.length},C),y.insertInLine({row:D,column:k},T))},A=function($,D){var F;(F=$.match(_))&&y.removeInLine(D,$.length-F[0].length,$.length),(F=$.match(O))&&y.removeInLine(D,F[1].length,F[0].length)},E=function($,D){if(O.test($))return!0;for(var F=g.getTokens(D),U=0;U$.length&&(L=$.length)}),k==1/0&&(k=L,b=!1,w=!1),S&&k%x!=0&&(k=Math.floor(k/x)*x),N(w?A:R)},this.toggleBlockComment=function(p,g,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var b=new d(g,v.row,v.column),w=b.getCurrentToken();g.selection;var k=g.selection.toOrientedRange(),x,S;if(w&&/comment/.test(w.type)){for(var T,C;w&&/comment/.test(w.type);){var O=w.value.indexOf(y.start);if(O!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+O;T=new h(_,R,_,R+y.start.length);break}w=b.stepBackward()}for(var b=new d(g,v.row,v.column),w=b.getCurrentToken();w&&/comment/.test(w.type);){var O=w.value.indexOf(y.end);if(O!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+O;C=new h(_,R,_,R+y.end.length);break}w=b.stepForward()}C&&g.remove(C),T&&(g.remove(T),x=T.start.row,S=-y.start.length)}else S=y.start.length,x=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);k.start.row==x&&(k.start.column+=S),k.end.row==x&&(k.end.column+=S),g.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(p,g,m){return this.$getIndent(g)},this.checkOutdent=function(p,g,m){return!1},this.autoOutdent=function(p,g,m){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var m=p[g],v=m.prototype.$id,y=i.$modes[v];y||(i.$modes[v]=y=new m),i.$modes[g]||(i.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g"u"?this.setPosition(h.row,h.column):this.setPosition(h,f)}return c.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},c.prototype.getDocument=function(){return this.document},c.prototype.onChange=function(d){if(!(d.start.row==d.end.row&&d.start.row!=this.row)&&!(d.start.row>this.row)){var h=u(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},c.prototype.setPosition=function(d,h,f){var p;if(f?p={row:d,column:h}:p=this.$clipPositionToDocument(d,h),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(d,h){var f={};return d>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):d<0?(f.row=0,f.column=0):(f.row=d,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,h))),h<0&&(f.column=0),f},c}();l.prototype.$insertRight=!1,i.implement(l.prototype,s);function a(c,d,h){var f=h?c.column<=d.column:c.column-1},m.recordAutoInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isAutoInsertedClosing(w,k,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=w.row,d.autoInsertedLineEnd=b+k.substr(w.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,b){var w=v.getCursorPosition(),k=y.doc.getLine(w.row);this.isMaybeInsertedClosing(w,k)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=w.row,d.maybeInsertedLineStart=k.substr(0,w.column)+b,d.maybeInsertedLineEnd=k.substr(w.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,b){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&b===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},i.inherits(m,s),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,o){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,l=[],a=0;a2?H%x!=x-1:H%x==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,C=this.blockComment.end,I=new RegExp("^(\\s*)(?:"+c.escapeRegExp(T)+")"),_=new RegExp("(?:"+c.escapeRegExp(C)+")\\s*$"),R=function($,D){E($,D)||(!b||/\S/.test($))&&(y.insertInLine({row:D,column:$.length},C),y.insertInLine({row:D,column:k},T))},A=function($,D){var F;(F=$.match(_))&&y.removeInLine(D,$.length-F[0].length,$.length),(F=$.match(I))&&y.removeInLine(D,F[1].length,F[0].length)},E=function($,D){if(I.test($))return!0;for(var F=g.getTokens(D),U=0;U$.length&&(L=$.length)}),k==1/0&&(k=L,b=!1,w=!1),S&&k%x!=0&&(k=Math.floor(k/x)*x),N(w?A:R)},this.toggleBlockComment=function(p,g,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var b=new d(g,v.row,v.column),w=b.getCurrentToken();g.selection;var k=g.selection.toOrientedRange(),x,S;if(w&&/comment/.test(w.type)){for(var T,C;w&&/comment/.test(w.type);){var I=w.value.indexOf(y.start);if(I!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+I;T=new h(_,R,_,R+y.start.length);break}w=b.stepBackward()}for(var b=new d(g,v.row,v.column),w=b.getCurrentToken();w&&/comment/.test(w.type);){var I=w.value.indexOf(y.end);if(I!=-1){var _=b.getCurrentTokenRow(),R=b.getCurrentTokenColumn()+I;C=new h(_,R,_,R+y.end.length);break}w=b.stepForward()}C&&g.remove(C),T&&(g.remove(T),x=T.start.row,S=-y.start.length)}else S=y.start.length,x=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);k.start.row==x&&(k.start.column+=S),k.end.row==x&&(k.end.column+=S),g.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(p,g,m){return this.$getIndent(g)},this.checkOutdent=function(p,g,m){return!1},this.autoOutdent=function(p,g,m){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var m=p[g],v=m.prototype.$id,y=i.$modes[v];y||(i.$modes[v]=y=new m),i.$modes[g]||(i.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g"u"?this.setPosition(h.row,h.column):this.setPosition(h,f)}return c.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},c.prototype.getDocument=function(){return this.document},c.prototype.onChange=function(d){if(!(d.start.row==d.end.row&&d.start.row!=this.row)&&!(d.start.row>this.row)){var h=u(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},c.prototype.setPosition=function(d,h,f){var p;if(f?p={row:d,column:h}:p=this.$clipPositionToDocument(d,h),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(d,h){var f={};return d>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):d<0?(f.row=0,f.column=0):(f.row=d,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,h))),h<0&&(f.column=0),f},c}();l.prototype.$insertRight=!1,i.implement(l.prototype,s);function a(c,d,h){var f=h?c.column<=d.column:c.column=p&&(h=p-1,f=void 0);var g=this.getLine(h);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:h,column:f}},d.prototype.clonePos=function(h){return{row:h.row,column:h.column}},d.prototype.pos=function(h,f){return{row:h,column:f}},d.prototype.$clipPosition=function(h){var f=this.getLength();return h.row>=f?(h.row=Math.max(0,f-1),h.column=this.getLine(f-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},d.prototype.insertFullLines=function(h,f){h=Math.min(Math.max(h,0),this.getLength());var p=0;h0,g=f=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},d.prototype.replace=function(h,f){if(h instanceof a||(h=a.fromPoints(h.start,h.end)),f.length===0&&h.isEmpty())return h.start;if(f==this.getTextRange(h))return h.end;this.remove(h);var p;return f?p=this.insert(h.start,f):p=h.start,p},d.prototype.applyDeltas=function(h){for(var f=0;f=0;f--)this.revertDelta(h[f])},d.prototype.applyDelta=function(h,f){var p=h.action=="insert";(p?h.lines.length<=1&&!h.lines[0]:!a.comparePoints(h.start,h.end))||(p&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(s(this.$lines,h,f),this._signal("change",h)))},d.prototype.$safeApplyDelta=function(h){var f=this.$lines.length;(h.action=="remove"&&h.start.row20){d.running=setTimeout(d.$worker,20);break}}d.currentLine=f,p==-1&&(p=f),m<=p&&d.fireUpdateEvent(m,p)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,c){var d={first:u,last:c};this._signal("update",{data:d})},a.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var c=u.start.row,d=u.end.row-c;if(d===0)this.lines[c]=null;else if(u.action=="remove")this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var h=Array(d+1);h.unshift(c,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var c=this.doc.getLine(u),d=this.states[u-1],h=this.tokenizer.getLineTokens(c,d,u);return this.states[u]+""!=h.state+""?(this.states[u]=h.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=h.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();i.implement(l.prototype,s),r.BackgroundTokenizer=l}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./range").Range,l=function(){function a(u,c,d){d===void 0&&(d="text"),this.setRegexp(u),this.clazz=c,this.type=d}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,c,d,h){if(this.regExp)for(var f=h.firstRow,p=h.lastRow,g={},m=f;m<=p;m++){var v=this.cache[m];v==null&&(v=i.getMatchOffsets(d.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(k){return new s(m,k.offset,m,k.offset+k.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var b=v[y].toScreenRange(d),w=b.toString();g[w]||(g[w]=!0,c.drawSingleLineMarker(u,b,this.clazz,h))}}},a}();l.prototype.MAX_RANGES=500,r.SearchHighlight=l}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,o){var i=function(){function k(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(x){this.$session=x},k.prototype.add=function(x,S,T){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var C=this.$undoStack.length;C>this.$undoDepth-1&&this.$undoStack.splice(0,C-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},k.prototype.addSelection=function(x,S){this.selections.push({value:x,rev:S||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(x,S){S==null&&(S=this.$rev+1);for(var T=this.$undoStack,C=T.length;C--;){var O=T[C][0];if(O.id<=x)break;O.id0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},k.prototype.$prettyPrint=function(x){return x?d(x):d(this.$undoStack)+` +`},d.prototype.getLine=function(h){return this.$lines[h]||""},d.prototype.getLines=function(h,f){return this.$lines.slice(h,f+1)},d.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},d.prototype.getLength=function(){return this.$lines.length},d.prototype.getTextRange=function(h){return this.getLinesForRange(h).join(this.getNewLineCharacter())},d.prototype.getLinesForRange=function(h){var f;if(h.start.row===h.end.row)f=[this.getLine(h.start.row).substring(h.start.column,h.end.column)];else{f=this.getLines(h.start.row,h.end.row),f[0]=(f[0]||"").substring(h.start.column);var p=f.length-1;h.end.row-h.start.row==p&&(f[p]=f[p].substring(0,h.end.column))}return f},d.prototype.insertLines=function(h,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(h,f)},d.prototype.removeLines=function(h,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(h,f)},d.prototype.insertNewLine=function(h){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(h,["",""])},d.prototype.insert=function(h,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(h,this.$split(f))},d.prototype.insertInLine=function(h,f){var p=this.clippedPos(h.row,h.column),g=this.pos(h.row,h.column+f.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[f]},!0),this.clonePos(g)},d.prototype.clippedPos=function(h,f){var p=this.getLength();h===void 0?h=p:h<0?h=0:h>=p&&(h=p-1,f=void 0);var g=this.getLine(h);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:h,column:f}},d.prototype.clonePos=function(h){return{row:h.row,column:h.column}},d.prototype.pos=function(h,f){return{row:h,column:f}},d.prototype.$clipPosition=function(h){var f=this.getLength();return h.row>=f?(h.row=Math.max(0,f-1),h.column=this.getLine(f-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},d.prototype.insertFullLines=function(h,f){h=Math.min(Math.max(h,0),this.getLength());var p=0;h0,g=f=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},d.prototype.replace=function(h,f){if(h instanceof a||(h=a.fromPoints(h.start,h.end)),f.length===0&&h.isEmpty())return h.start;if(f==this.getTextRange(h))return h.end;this.remove(h);var p;return f?p=this.insert(h.start,f):p=h.start,p},d.prototype.applyDeltas=function(h){for(var f=0;f=0;f--)this.revertDelta(h[f])},d.prototype.applyDelta=function(h,f){var p=h.action=="insert";(p?h.lines.length<=1&&!h.lines[0]:!a.comparePoints(h.start,h.end))||(p&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(s(this.$lines,h,f),this._signal("change",h)))},d.prototype.$safeApplyDelta=function(h){var f=this.$lines.length;(h.action=="remove"&&h.start.row20){d.running=setTimeout(d.$worker,20);break}}d.currentLine=f,p==-1&&(p=f),m<=p&&d.fireUpdateEvent(m,p)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,c){var d={first:u,last:c};this._signal("update",{data:d})},a.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var c=u.start.row,d=u.end.row-c;if(d===0)this.lines[c]=null;else if(u.action=="remove")this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var h=Array(d+1);h.unshift(c,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var c=this.doc.getLine(u),d=this.states[u-1],h=this.tokenizer.getLineTokens(c,d,u);return this.states[u]+""!=h.state+""?(this.states[u]=h.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=h.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();i.implement(l.prototype,s),r.BackgroundTokenizer=l}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./range").Range,l=function(){function a(u,c,d){d===void 0&&(d="text"),this.setRegexp(u),this.clazz=c,this.type=d}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,c,d,h){if(this.regExp)for(var f=h.firstRow,p=h.lastRow,g={},m=f;m<=p;m++){var v=this.cache[m];v==null&&(v=i.getMatchOffsets(d.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(k){return new s(m,k.offset,m,k.offset+k.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var b=v[y].toScreenRange(d),w=b.toString();g[w]||(g[w]=!0,c.drawSingleLineMarker(u,b,this.clazz,h))}}},a}();l.prototype.MAX_RANGES=500,r.SearchHighlight=l}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,o){var i=function(){function k(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(x){this.$session=x},k.prototype.add=function(x,S,T){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var C=this.$undoStack.length;C>this.$undoDepth-1&&this.$undoStack.splice(0,C-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},k.prototype.addSelection=function(x,S){this.selections.push({value:x,rev:S||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(x,S){S==null&&(S=this.$rev+1);for(var T=this.$undoStack,C=T.length;C--;){var I=T[C][0];if(I.id<=x)break;I.id0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},k.prototype.$prettyPrint=function(x){return x?d(x):d(this.$undoStack)+` --- `+d(this.$redoStack)},k}();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;function s(k,x){for(var S=x;S--;){var T=k[S];if(T&&!T[0].ignore){for(;S"+k.end.row+":"+k.end.column}function f(k,x){var S=k.action=="insert",T=x.action=="insert";if(S&&T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;else if(!S&&T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(!S&&!T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;return[x,k]}function p(k,x){for(var S=k.length;S--;)for(var T=0;T=0?m(k,x,-1):(a(k.start,x.start)<=0||m(k,l.fromPoints(x.start,k.start),-1),m(x,k,1));else if(!S&&T)a(x.start,k.end)>=0?m(x,k,-1):(a(x.start,k.start)<=0||m(x,l.fromPoints(k.start,x.start),-1),m(k,x,1));else if(!S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else{var C,O;return a(k.start,x.start)<0&&(C=k,k=y(k,x.start)),a(k.end,x.end)>0&&(O=y(k,x.end)),v(x.end,k.start,k.end,-1),O&&!C&&(k.lines=O.lines,k.start=O.start,k.end=O.end,O=k),[x,C,O].filter(Boolean)}return[x,k]}function m(k,x,S){v(k.start,x.start,x.end,S),v(k.end,x.start,x.end,S)}function v(k,x,S,T){k.row==(T==1?x:S).row&&(k.column+=T*(S.column-x.column)),k.row+=T*(S.row-x.row)}function y(k,x){var S=k.lines,T=k.end;k.end=u(x);var C=k.end.row-k.start.row,O=S.splice(C,S.length),_=C?x.column:x.column-k.start.column;S.push(O[0].substring(0,_)),O[0]=O[0].substr(_);var R={start:u(x),end:T,lines:O,action:k.action};return R}function b(k,x){x=c(x);for(var S=k.length;S--;){for(var T=k[S],C=0;Cthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},l.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},l.prototype.walk=function(a,u,c){var d=0,h=this.folds,f,p,g,m=!0;u==null&&(u=this.end.row,c=this.end.column);for(var v=0;v0)){var m=s(u,p.start);return g===0?c&&m!==0?-f-2:f:m>0||m===0&&!c?f:-f-1}}return-f-1},a.prototype.add=function(u){var c=!u.isEmpty(),d=this.pointIndex(u.start,c);d<0&&(d=-d-1);var h=this.pointIndex(u.end,c,d);return h<0?h=-h-1:h++,this.ranges.splice(d,h-d,u)},a.prototype.addList=function(u){for(var c=[],d=u.length;d--;)c.push.apply(c,this.add(u[d]));return c},a.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},a.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(g,m){return s(g.start,m.start)});for(var d=c[0],h,f=1;f=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},a.prototype.clipRows=function(u,c){var d=this.ranges;if(d[0].start.row>c||d[d.length-1].start.row=h)break}if(u.action=="insert")for(var y=f-h,b=-c.column+d.column;gh)break;if(v.start.row==h&&v.start.column>=c.column&&(v.start.column==c.column&&this.$bias<=0||(v.start.column+=b,v.start.row+=y)),v.end.row==h&&v.end.column>=c.column){if(v.end.column==c.column&&this.$bias<0)continue;v.end.column==c.column&&b>0&&gv.start.column&&v.end.column==p[g+1].start.column&&(v.end.column-=b),v.end.column+=b,v.end.row+=y}}else for(var y=h-f,b=c.column-d.column;gf)break;v.end.rowc.column)&&(v.end.column=c.column,v.end.row=c.row):(v.end.column+=b,v.end.row+=y):v.end.row>f&&(v.end.row+=y),v.start.rowc.column)&&(v.start.column=c.column,v.start.row=c.row):(v.start.column+=b,v.start.row+=y):v.start.row>f&&(v.start.row+=y)}if(y!=0&&g=d)return g;if(g.end.row>d)return null}return null},this.getNextFoldLine=function(d,h){var f=this.$foldData,p=0;for(h&&(p=f.indexOf(h)),p==-1&&(p=0),p;p=d)return g}return null},this.getFoldedRowCount=function(d,h){for(var f=this.$foldData,p=h-d+1,g=0;g=h){y=d?p-=h-y:p=0);break}else v>=d&&(y>=d?p-=v-y:p-=v-d+1)}return p},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(h,f){return h.start.row-f.start.row}),d},this.addFold=function(d,h){var f=this.$foldData,p=!1,g;d instanceof l?g=d:(g=new l(h,d),g.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,b=g.end.column,w=this.getFoldAt(m,v,1),k=this.getFoldAt(y,b,-1);if(w&&k==w)return w.addSubFold(g);w&&!w.range.isStart(m,v)&&this.removeFold(w),k&&!k.range.isEnd(y,b)&&this.removeFold(k);var x=this.getFoldsInRange(g.range);x.length>0&&(this.removeFolds(x),g.collapseChildren||x.forEach(function(O){g.addSubFold(O)}));for(var S=0;S0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(d,h){var f,p;if(d==null)f=new i(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof d=="number")f=new i(d,0,d,this.getLine(d).length);else if("row"in d)f=i.fromPoints(d,d);else{if(Array.isArray(d))return p=[],d.forEach(function(m){p=p.concat(this.unfold(m))},this),p;f=d}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&i.comparePoints(p[0].start,f.start)<0&&i.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(h!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(d,h){return!!this.getFoldLine(d,h)},this.getRowFoldEnd=function(d,h){var f=this.getFoldLine(d,h);return f?f.end.row:d},this.getRowFoldStart=function(d,h){var f=this.getFoldLine(d,h);return f?f.start.row:d},this.getFoldDisplayLine=function(d,h,f,p,g){p==null&&(p=d.start.row),g==null&&(g=0),h==null&&(h=d.end.row),f==null&&(f=this.getLine(h).length);var m=this.doc,v="";return d.walk(function(y,b,w,k){if(!(bb)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return y.end.row=p.getCurrentTokenRow(),y.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(d,h,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){h=h||this.getLength(),d=d||0;for(var m=d;m=d&&(m=v.end.row,v.collapseChildren=f,this.addFold("...",v))}}},this.foldToLevel=function(d){for(this.foldAll();d-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var d=this;this.foldAll(null,null,null,function(h){for(var f=d.getTokens(h),p=0;p=0;){var m=f[p];if(m==null&&(m=f[p]=this.getFoldWidget(p)),m=="start"){var v=this.getFoldWidgetRange(p);if(g||(g=v),v&&v.end.row>=d)break}p--}return{range:p!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(d,h){h instanceof u&&(h=h.domEvent);var f={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},p=this.$toggleFoldWidget(d,f);if(!p){var g=h.target||h.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,h){if(this.getFoldWidget){var f=this.getFoldWidget(d),p=this.getLine(d),g=f==="end"?-1:1,m=this.getFoldAt(d,g===-1?0:p.length,g);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(d,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var y=this.getParentFoldRangeData(d);if(y.range)var b=y.range.start.row+1,w=y.range.end.row;this.foldAll(b,w,h.all?1e4:0)}else h.children?(w=v?v.end.row:this.getLength(),this.foldAll(d+1,w,h.all?1e4:0)):v&&(h.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(d){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var f=this.$toggleFoldWidget(h,{});if(!f){var p=this.getParentFoldRangeData(h,!0);if(f=p.range||p.firstRange,f){h=f.start.row;var g=this.getFoldAt(h,this.getLine(h).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(d){var h=d.start.row,f=d.end.row-h;if(f===0)this.foldWidgets[h]=null;else if(d.action=="remove")this.foldWidgets.splice(h,f+1,null);else{var p=Array(f+1);p.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(d){var h=d.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,o){var i=n("../token_iterator").TokenIterator,s=n("../range").Range;function l(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var c=u||this.getLine(a.row).charAt(a.column-1);if(c=="")return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),c=!0,d,h=u.charAt(a.column-1),f=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(f||(h=u.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;d=s.fromPoints(a,p),c||(d.end.column++,d.start.column--),d.cursor=d.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;d=s.fromPoints(p,a),c||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.getMatchingBracketRanges=function(a,u){var c=this.getLine(a.row),d=/([\(\[\{])|([\)\]\}])/,h=!u&&c.charAt(a.column-1),f=h&&h.match(d);if(f||(h=(u===void 0||u)&&c.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(d)),!f)return null;var p=new s(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var m=new s(g.row,g.column,g.row,g.column+1);return[p,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn()-2,m=p.value;;){for(;g>=0;){var v=m.charAt(g);if(v==d){if(h-=1,h==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else v==a&&(h+=1);g-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;m=p.value,g=m.length-1}return null}},this.$findClosingBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn();;){for(var m=p.value,v=m.length;g"?d=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(a,u){var c,d=u.value,h=u.value,f=0,p=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),m=!1;do if(c=u,u=a.stepForward(),u){if(u.value===">"&&!m){var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(u.type.indexOf("tag-name")!==-1){if(d=u.value,h===d){if(c.value==="<")f++;else if(c.value==="")var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(h===d&&u.value==="/>"&&(f--,f<0))var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=y,w=b,v=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(u&&f>=0);if(p&&v&&y&&w&&g&&b)return{openTag:new s(p.start.row,p.start.column,v.end.row,v.end.column),closeTag:new s(y.start.row,y.start.column,w.end.row,w.end.column),openTagName:g,closeTagName:b}},this.$findOpeningTag=function(a,u){var c=a.getCurrentToken(),d=u.value,h=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,m=new s(f,p,f,g);a.stepForward();var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u=a.stepForward(),!(!u||u.value!==">")){var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=c,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+u.value.length,c=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(d===u.value)if(c.value==="<"){if(h++,h>0){var b=new s(f,p,f,g),w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var k=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else c.value===""){for(var x=0,S=c;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===d){h--;break}else if(S.value==="<")break;S=a.stepBackward(),x++}for(var T=0;TE&&(this.$docRowCache.splice(E,A),this.$screenRowCache.splice(E,A))},_.prototype.$getRowCacheIndex=function(R,A){for(var E=0,M=R.length-1;E<=M;){var I=E+M>>1,N=R[I];if(A>N)E=I+1;else if(A=A));N++);return M=E[N],M?(M.index=N,M.start=I-M.value.length,M):null},_.prototype.setUndoManager=function(R){if(this.$undoManager=R,this.$informUndoManager&&this.$informUndoManager.cancel(),R){var A=this;R.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},_.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},_.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},_.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},_.prototype.setUseSoftTabs=function(R){this.setOption("useSoftTabs",R)},_.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},_.prototype.setTabSize=function(R){this.setOption("tabSize",R)},_.prototype.getTabSize=function(){return this.$tabSize},_.prototype.isTabStop=function(R){return this.$useSoftTabs&&R.column%this.$tabSize===0},_.prototype.setNavigateWithinSoftTabs=function(R){this.setOption("navigateWithinSoftTabs",R)},_.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},_.prototype.setOverwrite=function(R){this.setOption("overwrite",R)},_.prototype.getOverwrite=function(){return this.$overwrite},_.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},_.prototype.addGutterDecoration=function(R,A){this.$decorations[R]||(this.$decorations[R]=""),this.$decorations[R]+=" "+A,this._signal("changeBreakpoint",{})},_.prototype.removeGutterDecoration=function(R,A){this.$decorations[R]=(this.$decorations[R]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},_.prototype.getBreakpoints=function(){return this.$breakpoints},_.prototype.setBreakpoints=function(R){this.$breakpoints=[];for(var A=0;A0&&(M=!!E.charAt(A-1).match(this.tokenRe)),M||(M=!!E.charAt(A).match(this.tokenRe)),M)var I=this.tokenRe;else if(/^\s+$/.test(E.slice(A-1,A+1)))var I=/\s/;else var I=this.nonTokenRe;var N=A;if(N>0){do N--;while(N>=0&&E.charAt(N).match(I));N++}for(var L=A;LR&&(R=A.screenWidth)}),this.lineWidgetWidth=R},_.prototype.$computeWidth=function(R){if(this.$modified||R){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),E=this.$rowLengthCache,M=0,I=0,N=this.$foldData[I],L=N?N.start.row:1/0,$=A.length,D=0;D<$;D++){if(D>L){if(D=N.end.row+1,D>=$)break;N=this.$foldData[I++],L=N?N.start.row:1/0}E[D]==null&&(E[D]=this.$getStringScreenWidth(A[D])[0]),E[D]>M&&(M=E[D])}this.screenWidth=M}},_.prototype.getLine=function(R){return this.doc.getLine(R)},_.prototype.getLines=function(R,A){return this.doc.getLines(R,A)},_.prototype.getLength=function(){return this.doc.getLength()},_.prototype.getTextRange=function(R){return this.doc.getTextRange(R||this.selection.getRange())},_.prototype.insert=function(R,A){return this.doc.insert(R,A)},_.prototype.remove=function(R){return this.doc.remove(R)},_.prototype.removeFullLines=function(R,A){return this.doc.removeFullLines(R,A)},_.prototype.undoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=R.length-1;E!=-1;E--){var M=R[E];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!A&&this.$undoSelect&&(R.selectionBefore?this.selection.fromJSON(R.selectionBefore):this.selection.setRange(this.$getUndoSelection(R,!0))),this.$fromUndo=!1}},_.prototype.redoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=0;ER.end.column&&(N.start.column+=$),N.end.row==R.end.row&&N.end.column>R.end.column&&(N.end.column+=$)),L&&N.start.row>=R.end.row&&(N.start.row+=L,N.end.row+=L)}if(N.end=this.insert(N.start,M),I.length){var D=R.start,F=N.start,L=F.row-D.row,$=F.column-D.column;this.addFolds(I.map(function(B){return B=B.clone(),B.start.row==D.row&&(B.start.column+=$),B.end.row==D.row&&(B.end.column+=$),B.start.row+=L,B.end.row+=L,B}))}return N},_.prototype.indentRows=function(R,A,E){E=E.replace(/\t/g,this.getTabString());for(var M=R;M<=A;M++)this.doc.insertInLine({row:M,column:0},E)},_.prototype.outdentRows=function(R){for(var A=R.collapseRows(),E=new h(0,0,0,0),M=this.getTabSize(),I=A.start.row;I<=A.end.row;++I){var N=this.getLine(I);E.start.row=I,E.end.row=I;for(var L=0;L0){var M=this.getRowFoldEnd(A+E);if(M>this.doc.getLength()-1)return 0;var I=M-A}else{R=this.$clipRowToDocument(R),A=this.$clipRowToDocument(A);var I=A-R+1}var N=new h(R,0,A,Number.MAX_VALUE),L=this.getFoldsInRange(N).map(function(D){return D=D.clone(),D.start.row+=I,D.end.row+=I,D}),$=E==0?this.doc.getLines(R,A):this.doc.removeFullLines(R,A);return this.doc.insertFullLines(R+I,$),L.length&&this.addFolds(L),I},_.prototype.moveLinesUp=function(R,A){return this.$moveLines(R,A,-1)},_.prototype.moveLinesDown=function(R,A){return this.$moveLines(R,A,1)},_.prototype.duplicateLines=function(R,A){return this.$moveLines(R,A,0)},_.prototype.$clipRowToDocument=function(R){return Math.max(0,Math.min(R,this.doc.getLength()-1))},_.prototype.$clipColumnToRow=function(R,A){return A<0?0:Math.min(this.doc.getLine(R).length,A)},_.prototype.$clipPositionToDocument=function(R,A){if(A=Math.max(0,A),R<0)R=0,A=0;else{var E=this.doc.getLength();R>=E?(R=E-1,A=this.doc.getLine(E-1).length):A=Math.min(this.doc.getLine(R).length,A)}return{row:R,column:A}},_.prototype.$clipRangeToDocument=function(R){R.start.row<0?(R.start.row=0,R.start.column=0):R.start.column=this.$clipColumnToRow(R.start.row,R.start.column);var A=this.doc.getLength()-1;return R.end.row>A?(R.end.row=A,R.end.column=this.doc.getLine(A).length):R.end.column=this.$clipColumnToRow(R.end.row,R.end.column),R},_.prototype.setUseWrapMode=function(R){if(R!=this.$useWrapMode){if(this.$useWrapMode=R,this.$modified=!0,this.$resetRowCache(0),R){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},_.prototype.getUseWrapMode=function(){return this.$useWrapMode},_.prototype.setWrapLimitRange=function(R,A){(this.$wrapLimitRange.min!==R||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:R,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},_.prototype.adjustWrapLimit=function(R,A){var E=this.$wrapLimitRange;E.max<0&&(E={min:A,max:A});var M=this.$constrainWrapLimit(R,E.min,E.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},_.prototype.$constrainWrapLimit=function(R,A,E){return A&&(R=Math.max(A,R)),E&&(R=Math.min(E,R)),R},_.prototype.getWrapLimit=function(){return this.$wrapLimit},_.prototype.setWrapLimit=function(R){this.setWrapLimitRange(R,R)},_.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},_.prototype.$updateInternalDataOnChange=function(R){var A=this.$useWrapMode,E=R.action,M=R.start,I=R.end,N=M.row,L=I.row,$=L-N,D=null;if(this.$updating=!0,$!=0)if(E==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(N,$);var F=this.$foldData;D=this.getFoldsInRange(R),this.removeFolds(D);var U=this.getFoldLine(I.row),W=0;if(U){U.addRemoveChars(I.row,I.column,M.column-I.column),U.shiftRow(-$);var B=this.getFoldLine(N);B&&B!==U&&(B.merge(U),U=B),W=F.indexOf(U)+1}for(W;W=I.row&&U.shiftRow(-$)}L=N}else{var H=Array($);H.unshift(N,0);var V=A?this.$wrapData:this.$rowLengthCache;V.splice.apply(V,H);var F=this.$foldData,U=this.getFoldLine(N),W=0;if(U){var Y=U.range.compareInside(M.row,M.column);Y==0?(U=U.split(M.row,M.column),U&&(U.shiftRow($),U.addRemoveChars(L,0,I.column-M.column))):Y==-1&&(U.addRemoveChars(N,0,I.column-M.column),U.shiftRow($)),W=F.indexOf(U)+1}for(W;W=N&&U.shiftRow($)}}else{$=Math.abs(R.start.column-R.end.column),E==="remove"&&(D=this.getFoldsInRange(R),this.removeFolds(D),$=-$);var U=this.getFoldLine(N);U&&U.addRemoveChars(N,M.column,$)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(N,L):this.$updateRowLengthCache(N,L),D},_.prototype.$updateRowLengthCache=function(R,A,E){this.$rowLengthCache[R]=null,this.$rowLengthCache[A]=null},_.prototype.$updateWrapData=function(R,A){var E=this.doc.getAllLines(),M=this.getTabSize(),I=this.$wrapData,N=this.$wrapLimit,L,$,D=R;for(A=Math.min(A,E.length-1);D<=A;)$=this.getFoldLine(D,$),$?(L=[],$.walk((function(F,U,W,B){var H;if(F!=null){H=this.$getDisplayTokens(F,L.length),H[0]=w;for(var V=1;VA-B;){var H=N+A-B;if(R[H-1]>=S&&R[H]>=S){W(H);continue}if(R[H]==w||R[H]==k){for(H;H!=N-1&&R[H]!=w;H--);if(H>N){W(H);continue}for(H=N+A,H;H>2)),N-1);H>V&&R[H]V&&R[H]V&&R[H]==x;)H--}else for(;H>V&&R[H]V){W(++H);continue}H=N+A,R[H]==b&&H--,W(H-B)}return M},_.prototype.$getDisplayTokens=function(R,A){var E=[],M;A=A||0;for(var I=0;I39&&N<48||N>57&&N<64?E.push(x):N>=4352&&O(N)?E.push(y,b):E.push(y)}return E},_.prototype.$getStringScreenWidth=function(R,A,E){if(A==0)return[0,0];A==null&&(A=1/0),E=E||0;var M,I;for(I=0;I=4352&&O(M)?E+=2:E+=1,!(E>A));I++);return[E,I]},_.prototype.getRowLength=function(R){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[R]&&this.lineWidgets[R].rowCount||0),!this.$useWrapMode||!this.$wrapData[R]?A:this.$wrapData[R].length+A},_.prototype.getRowLineCount=function(R){return!this.$useWrapMode||!this.$wrapData[R]?1:this.$wrapData[R].length+1},_.prototype.getRowWrapIndent=function(R){if(this.$useWrapMode){var A=this.screenToDocumentPosition(R,Number.MAX_VALUE),E=this.$wrapData[A.row];return E.length&&E[0]=0)var $=F[U],I=this.$docRowCache[U],B=R>F[W-1];else var B=!W;for(var H=this.getLength()-1,V=this.getNextFoldLine(I),Y=V?V.start.row:1/0;$<=R&&(D=this.getRowLength(I),!($+D>R||I>=H));)$+=D,I++,I>Y&&(I=V.end.row+1,V=this.getNextFoldLine(I,V),Y=V?V.start.row:1/0),B&&(this.$docRowCache.push(I),this.$screenRowCache.push($));if(V&&V.start.row<=I)M=this.getFoldDisplayLine(V),I=V.start.row;else{if($+D<=R||I>H)return{row:H,column:this.getLine(H).length};M=this.getLine(I),V=null}var X=0,Z=Math.floor(R-$);if(this.$useWrapMode){var te=this.$wrapData[I];te&&(L=te[Z],Z>0&&te.length&&(X=te.indent,N=te[Z-1]||te[te.length-1],M=M.substring(N)))}return E!==void 0&&this.$bidiHandler.isBidiRow($+Z,I,Z)&&(A=this.$bidiHandler.offsetToCol(E)),N+=this.$getStringScreenWidth(M,A-X)[1],this.$useWrapMode&&N>=L&&(N=L-1),V?V.idxToPosition(N):{row:I,column:N}},_.prototype.documentToScreenPosition=function(R,A){if(typeof A>"u")var E=this.$clipPositionToDocument(R.row,R.column);else E=this.$clipPositionToDocument(R,A);R=E.row,A=E.column;var M=0,I=null,N=null;N=this.getFoldAt(R,A,1),N&&(R=N.start.row,A=N.start.column);var L,$=0,D=this.$docRowCache,F=this.$getRowCacheIndex(D,R),U=D.length;if(U&&F>=0)var $=D[F],M=this.$screenRowCache[F],W=R>D[U-1];else var W=!U;for(var B=this.getNextFoldLine($),H=B?B.start.row:1/0;$=H){if(L=B.end.row+1,L>R)break;B=this.getNextFoldLine(L,B),H=B?B.start.row:1/0}else L=$+1;M+=this.getRowLength($),$=L,W&&(this.$docRowCache.push($),this.$screenRowCache.push(M))}var V="";B&&$>=H?(V=this.getFoldDisplayLine(B,R,A),I=B.start.row):(V=this.getLine(R).substring(0,A),I=R);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var Z=0;V.length>=X[Z];)M++,Z++;V=V.substring(X[Z-1]||0,V.length),Y=Z>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[$]&&this.lineWidgets[$].rowsAbove&&(M+=this.lineWidgets[$].rowsAbove),{row:M,column:Y+this.$getStringScreenWidth(V)[0]}},_.prototype.documentToScreenColumn=function(R,A){return this.documentToScreenPosition(R,A).column},_.prototype.documentToScreenRow=function(R,A){return this.documentToScreenPosition(R,A).row},_.prototype.getScreenLength=function(){var R=0,A=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,N=0,M=0,A=this.$foldData[M++],L=A?A.start.row:1/0;NL&&(N=A.end.row+1,A=this.$foldData[M++],L=A?A.start.row:1/0)}else{R=this.getLength();for(var E=this.$foldData,M=0;ME));N++);return[M,N]})},_.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},_}();v.$uid=0,v.prototype.$modes=a.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=O,i.implement(v.prototype,u);var y=1,b=2,w=3,k=4,x=9,S=10,T=11,C=12;function O(_){return _<4352?!1:_>=4352&&_<=4447||_>=4515&&_<=4519||_>=4602&&_<=4607||_>=9001&&_<=9002||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12283||_>=12288&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12589||_>=12593&&_<=12686||_>=12688&&_<=12730||_>=12736&&_<=12771||_>=12784&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=13054||_>=13056&&_<=19903||_>=19968&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=55216&&_<=55238||_>=55243&&_<=55291||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=65281&&_<=65376||_>=65504&&_<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),a.defineOptions(v.prototype,"session",{wrap:{set:function(_){if(!_||_=="off"?_=!1:_=="free"?_=!0:_=="printMargin"?_=-1:typeof _=="string"&&(_=parseInt(_,10)||!1),this.$wrap!=_)if(this.$wrap=_,!_)this.setUseWrapMode(!1);else{var R=typeof _=="number"?_:null;this.setWrapLimitRange(R,R),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(_){_=_=="auto"?this.$mode.type!="text":_!="text",_!=this.$wrapAsCode&&(this.$wrapAsCode=_,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(_){this.$useWorker=_,this.$stopWorker(),_&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(_){_=parseInt(_),_>0&&this.$tabSize!==_&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=_,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(_){this.setFoldStyle(_)},handlesSet:!0},overwrite:{set:function(_){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(_){this.doc.setNewLineMode(_)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(_){this.setMode(_)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./lib/oop"),l=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(d){return s.mixin(this.$options,d),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(d){this.$options=d},c.prototype.find=function(d){var h=this.$options,f=this.$matchIterator(d,h);if(!f)return!1;var p=null;return f.forEach(function(g,m,v,y){return p=new l(g,m,v,y),m==y&&h.start&&h.start.start&&h.skipCurrent!=!1&&p.isEqual(h.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(d){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var f=h.range,p=f?d.getLines(f.start.row,f.end.row):d.doc.getAllLines(),g=[],m=h.re;if(h.$isMultiLine){var v=m.length,y=p.length-v,b;e:for(var w=m.offset||0;w<=y;w++){for(var k=0;kT||(g.push(b=new l(w,T,w+v-1,C)),v>2&&(w=w+v-2))}}else for(var O=0;OE&&g[k].end.row==M;)k--;for(g=g.slice(O,k+1),O=0,k=g.length;O"+k.end.row+":"+k.end.column}function f(k,x){var S=k.action=="insert",T=x.action=="insert";if(S&&T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;else if(!S&&T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.start,k.start)<=0)m(k,x,1);else return null;else if(!S&&!T)if(a(x.start,k.start)>=0)m(x,k,1);else if(a(x.end,k.start)<=0)m(k,x,-1);else return null;return[x,k]}function p(k,x){for(var S=k.length;S--;)for(var T=0;T=0?m(k,x,-1):(a(k.start,x.start)<=0||m(k,l.fromPoints(x.start,k.start),-1),m(x,k,1));else if(!S&&T)a(x.start,k.end)>=0?m(x,k,-1):(a(x.start,k.start)<=0||m(x,l.fromPoints(k.start,x.start),-1),m(k,x,1));else if(!S&&!T)if(a(x.start,k.end)>=0)m(x,k,-1);else if(a(x.end,k.start)<=0)m(k,x,-1);else{var C,I;return a(k.start,x.start)<0&&(C=k,k=y(k,x.start)),a(k.end,x.end)>0&&(I=y(k,x.end)),v(x.end,k.start,k.end,-1),I&&!C&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[x,C,I].filter(Boolean)}return[x,k]}function m(k,x,S){v(k.start,x.start,x.end,S),v(k.end,x.start,x.end,S)}function v(k,x,S,T){k.row==(T==1?x:S).row&&(k.column+=T*(S.column-x.column)),k.row+=T*(S.row-x.row)}function y(k,x){var S=k.lines,T=k.end;k.end=u(x);var C=k.end.row-k.start.row,I=S.splice(C,S.length),_=C?x.column:x.column-k.start.column;S.push(I[0].substring(0,_)),I[0]=I[0].substr(_);var R={start:u(x),end:T,lines:I,action:k.action};return R}function b(k,x){x=c(x);for(var S=k.length;S--;){for(var T=k[S],C=0;Cthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,c){return-u.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},l.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},l.prototype.walk=function(a,u,c){var d=0,h=this.folds,f,p,g,m=!0;u==null&&(u=this.end.row,c=this.end.column);for(var v=0;v0)){var m=s(u,p.start);return g===0?c&&m!==0?-f-2:f:m>0||m===0&&!c?f:-f-1}}return-f-1},a.prototype.add=function(u){var c=!u.isEmpty(),d=this.pointIndex(u.start,c);d<0&&(d=-d-1);var h=this.pointIndex(u.end,c,d);return h<0?h=-h-1:h++,this.ranges.splice(d,h-d,u)},a.prototype.addList=function(u){for(var c=[],d=u.length;d--;)c.push.apply(c,this.add(u[d]));return c},a.prototype.substractPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges.splice(c,1)},a.prototype.merge=function(){var u=[],c=this.ranges;c=c.sort(function(g,m){return s(g.start,m.start)});for(var d=c[0],h,f=1;f=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var c=this.pointIndex(u);if(c>=0)return this.ranges[c]},a.prototype.clipRows=function(u,c){var d=this.ranges;if(d[0].start.row>c||d[d.length-1].start.row=h)break}if(u.action=="insert")for(var y=f-h,b=-c.column+d.column;gh)break;if(v.start.row==h&&v.start.column>=c.column&&(v.start.column==c.column&&this.$bias<=0||(v.start.column+=b,v.start.row+=y)),v.end.row==h&&v.end.column>=c.column){if(v.end.column==c.column&&this.$bias<0)continue;v.end.column==c.column&&b>0&&gv.start.column&&v.end.column==p[g+1].start.column&&(v.end.column-=b),v.end.column+=b,v.end.row+=y}}else for(var y=h-f,b=c.column-d.column;gf)break;v.end.rowc.column)&&(v.end.column=c.column,v.end.row=c.row):(v.end.column+=b,v.end.row+=y):v.end.row>f&&(v.end.row+=y),v.start.rowc.column)&&(v.start.column=c.column,v.start.row=c.row):(v.start.column+=b,v.start.row+=y):v.start.row>f&&(v.start.row+=y)}if(y!=0&&g=d)return g;if(g.end.row>d)return null}return null},this.getNextFoldLine=function(d,h){var f=this.$foldData,p=0;for(h&&(p=f.indexOf(h)),p==-1&&(p=0),p;p=d)return g}return null},this.getFoldedRowCount=function(d,h){for(var f=this.$foldData,p=h-d+1,g=0;g=h){y=d?p-=h-y:p=0);break}else v>=d&&(y>=d?p-=v-y:p-=v-d+1)}return p},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(h,f){return h.start.row-f.start.row}),d},this.addFold=function(d,h){var f=this.$foldData,p=!1,g;d instanceof l?g=d:(g=new l(h,d),g.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,b=g.end.column,w=this.getFoldAt(m,v,1),k=this.getFoldAt(y,b,-1);if(w&&k==w)return w.addSubFold(g);w&&!w.range.isStart(m,v)&&this.removeFold(w),k&&!k.range.isEnd(y,b)&&this.removeFold(k);var x=this.getFoldsInRange(g.range);x.length>0&&(this.removeFolds(x),g.collapseChildren||x.forEach(function(I){g.addSubFold(I)}));for(var S=0;S0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(d,h){var f,p;if(d==null)f=new i(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof d=="number")f=new i(d,0,d,this.getLine(d).length);else if("row"in d)f=i.fromPoints(d,d);else{if(Array.isArray(d))return p=[],d.forEach(function(m){p=p.concat(this.unfold(m))},this),p;f=d}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&i.comparePoints(p[0].start,f.start)<0&&i.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(h!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(d,h){return!!this.getFoldLine(d,h)},this.getRowFoldEnd=function(d,h){var f=this.getFoldLine(d,h);return f?f.end.row:d},this.getRowFoldStart=function(d,h){var f=this.getFoldLine(d,h);return f?f.start.row:d},this.getFoldDisplayLine=function(d,h,f,p,g){p==null&&(p=d.start.row),g==null&&(g=0),h==null&&(h=d.end.row),f==null&&(f=this.getLine(h).length);var m=this.doc,v="";return d.walk(function(y,b,w,k){if(!(bb)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return y.end.row=p.getCurrentTokenRow(),y.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(d,h,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){h=h||this.getLength(),d=d||0;for(var m=d;m=d&&(m=v.end.row,v.collapseChildren=f,this.addFold("...",v))}}},this.foldToLevel=function(d){for(this.foldAll();d-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var d=this;this.foldAll(null,null,null,function(h){for(var f=d.getTokens(h),p=0;p=0;){var m=f[p];if(m==null&&(m=f[p]=this.getFoldWidget(p)),m=="start"){var v=this.getFoldWidgetRange(p);if(g||(g=v),v&&v.end.row>=d)break}p--}return{range:p!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(d,h){h instanceof u&&(h=h.domEvent);var f={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},p=this.$toggleFoldWidget(d,f);if(!p){var g=h.target||h.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,h){if(this.getFoldWidget){var f=this.getFoldWidget(d),p=this.getLine(d),g=f==="end"?-1:1,m=this.getFoldAt(d,g===-1?0:p.length,g);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(d,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var y=this.getParentFoldRangeData(d);if(y.range)var b=y.range.start.row+1,w=y.range.end.row;this.foldAll(b,w,h.all?1e4:0)}else h.children?(w=v?v.end.row:this.getLength(),this.foldAll(d+1,w,h.all?1e4:0)):v&&(h.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(d){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var f=this.$toggleFoldWidget(h,{});if(!f){var p=this.getParentFoldRangeData(h,!0);if(f=p.range||p.firstRange,f){h=f.start.row;var g=this.getFoldAt(h,this.getLine(h).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(d){var h=d.start.row,f=d.end.row-h;if(f===0)this.foldWidgets[h]=null;else if(d.action=="remove")this.foldWidgets.splice(h,f+1,null);else{var p=Array(f+1);p.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(d){var h=d.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,o){var i=n("../token_iterator").TokenIterator,s=n("../range").Range;function l(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var c=u||this.getLine(a.row).charAt(a.column-1);if(c=="")return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),c=!0,d,h=u.charAt(a.column-1),f=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(f||(h=u.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;d=s.fromPoints(a,p),c||(d.end.column++,d.start.column--),d.cursor=d.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;d=s.fromPoints(p,a),c||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.getMatchingBracketRanges=function(a,u){var c=this.getLine(a.row),d=/([\(\[\{])|([\)\]\}])/,h=!u&&c.charAt(a.column-1),f=h&&h.match(d);if(f||(h=(u===void 0||u)&&c.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(d)),!f)return null;var p=new s(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var m=new s(g.row,g.column,g.row,g.column+1);return[p,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn()-2,m=p.value;;){for(;g>=0;){var v=m.charAt(g);if(v==d){if(h-=1,h==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else v==a&&(h+=1);g-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;m=p.value,g=m.length-1}return null}},this.$findClosingBracket=function(a,u,c){var d=this.$brackets[a],h=1,f=new i(this,u.row,u.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=u.column-f.getCurrentTokenColumn();;){for(var m=p.value,v=m.length;g"?d=!0:u.type.indexOf("tag-name")!==-1&&(c=!0));while(u&&!c);return u},this.$findClosingTag=function(a,u){var c,d=u.value,h=u.value,f=0,p=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),m=!1;do if(c=u,u=a.stepForward(),u){if(u.value===">"&&!m){var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(u.type.indexOf("tag-name")!==-1){if(d=u.value,h===d){if(c.value==="<")f++;else if(c.value==="")var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(h===d&&u.value==="/>"&&(f--,f<0))var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=y,w=b,v=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(u&&f>=0);if(p&&v&&y&&w&&g&&b)return{openTag:new s(p.start.row,p.start.column,v.end.row,v.end.column),closeTag:new s(y.start.row,y.start.column,w.end.row,w.end.column),openTagName:g,closeTagName:b}},this.$findOpeningTag=function(a,u){var c=a.getCurrentToken(),d=u.value,h=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,m=new s(f,p,f,g);a.stepForward();var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u=a.stepForward(),!(!u||u.value!==">")){var y=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=c,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+u.value.length,c=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(d===u.value)if(c.value==="<"){if(h++,h>0){var b=new s(f,p,f,g),w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var k=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else c.value===""){for(var x=0,S=c;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===d){h--;break}else if(S.value==="<")break;S=a.stepBackward(),x++}for(var T=0;TE&&(this.$docRowCache.splice(E,A),this.$screenRowCache.splice(E,A))},_.prototype.$getRowCacheIndex=function(R,A){for(var E=0,M=R.length-1;E<=M;){var O=E+M>>1,N=R[O];if(A>N)E=O+1;else if(A=A));N++);return M=E[N],M?(M.index=N,M.start=O-M.value.length,M):null},_.prototype.setUndoManager=function(R){if(this.$undoManager=R,this.$informUndoManager&&this.$informUndoManager.cancel(),R){var A=this;R.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},_.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},_.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},_.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},_.prototype.setUseSoftTabs=function(R){this.setOption("useSoftTabs",R)},_.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},_.prototype.setTabSize=function(R){this.setOption("tabSize",R)},_.prototype.getTabSize=function(){return this.$tabSize},_.prototype.isTabStop=function(R){return this.$useSoftTabs&&R.column%this.$tabSize===0},_.prototype.setNavigateWithinSoftTabs=function(R){this.setOption("navigateWithinSoftTabs",R)},_.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},_.prototype.setOverwrite=function(R){this.setOption("overwrite",R)},_.prototype.getOverwrite=function(){return this.$overwrite},_.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},_.prototype.addGutterDecoration=function(R,A){this.$decorations[R]||(this.$decorations[R]=""),this.$decorations[R]+=" "+A,this._signal("changeBreakpoint",{})},_.prototype.removeGutterDecoration=function(R,A){this.$decorations[R]=(this.$decorations[R]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},_.prototype.getBreakpoints=function(){return this.$breakpoints},_.prototype.setBreakpoints=function(R){this.$breakpoints=[];for(var A=0;A0&&(M=!!E.charAt(A-1).match(this.tokenRe)),M||(M=!!E.charAt(A).match(this.tokenRe)),M)var O=this.tokenRe;else if(/^\s+$/.test(E.slice(A-1,A+1)))var O=/\s/;else var O=this.nonTokenRe;var N=A;if(N>0){do N--;while(N>=0&&E.charAt(N).match(O));N++}for(var L=A;LR&&(R=A.screenWidth)}),this.lineWidgetWidth=R},_.prototype.$computeWidth=function(R){if(this.$modified||R){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),E=this.$rowLengthCache,M=0,O=0,N=this.$foldData[O],L=N?N.start.row:1/0,$=A.length,D=0;D<$;D++){if(D>L){if(D=N.end.row+1,D>=$)break;N=this.$foldData[O++],L=N?N.start.row:1/0}E[D]==null&&(E[D]=this.$getStringScreenWidth(A[D])[0]),E[D]>M&&(M=E[D])}this.screenWidth=M}},_.prototype.getLine=function(R){return this.doc.getLine(R)},_.prototype.getLines=function(R,A){return this.doc.getLines(R,A)},_.prototype.getLength=function(){return this.doc.getLength()},_.prototype.getTextRange=function(R){return this.doc.getTextRange(R||this.selection.getRange())},_.prototype.insert=function(R,A){return this.doc.insert(R,A)},_.prototype.remove=function(R){return this.doc.remove(R)},_.prototype.removeFullLines=function(R,A){return this.doc.removeFullLines(R,A)},_.prototype.undoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=R.length-1;E!=-1;E--){var M=R[E];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!A&&this.$undoSelect&&(R.selectionBefore?this.selection.fromJSON(R.selectionBefore):this.selection.setRange(this.$getUndoSelection(R,!0))),this.$fromUndo=!1}},_.prototype.redoChanges=function(R,A){if(R.length){this.$fromUndo=!0;for(var E=0;ER.end.column&&(N.start.column+=$),N.end.row==R.end.row&&N.end.column>R.end.column&&(N.end.column+=$)),L&&N.start.row>=R.end.row&&(N.start.row+=L,N.end.row+=L)}if(N.end=this.insert(N.start,M),O.length){var D=R.start,F=N.start,L=F.row-D.row,$=F.column-D.column;this.addFolds(O.map(function(B){return B=B.clone(),B.start.row==D.row&&(B.start.column+=$),B.end.row==D.row&&(B.end.column+=$),B.start.row+=L,B.end.row+=L,B}))}return N},_.prototype.indentRows=function(R,A,E){E=E.replace(/\t/g,this.getTabString());for(var M=R;M<=A;M++)this.doc.insertInLine({row:M,column:0},E)},_.prototype.outdentRows=function(R){for(var A=R.collapseRows(),E=new h(0,0,0,0),M=this.getTabSize(),O=A.start.row;O<=A.end.row;++O){var N=this.getLine(O);E.start.row=O,E.end.row=O;for(var L=0;L0){var M=this.getRowFoldEnd(A+E);if(M>this.doc.getLength()-1)return 0;var O=M-A}else{R=this.$clipRowToDocument(R),A=this.$clipRowToDocument(A);var O=A-R+1}var N=new h(R,0,A,Number.MAX_VALUE),L=this.getFoldsInRange(N).map(function(D){return D=D.clone(),D.start.row+=O,D.end.row+=O,D}),$=E==0?this.doc.getLines(R,A):this.doc.removeFullLines(R,A);return this.doc.insertFullLines(R+O,$),L.length&&this.addFolds(L),O},_.prototype.moveLinesUp=function(R,A){return this.$moveLines(R,A,-1)},_.prototype.moveLinesDown=function(R,A){return this.$moveLines(R,A,1)},_.prototype.duplicateLines=function(R,A){return this.$moveLines(R,A,0)},_.prototype.$clipRowToDocument=function(R){return Math.max(0,Math.min(R,this.doc.getLength()-1))},_.prototype.$clipColumnToRow=function(R,A){return A<0?0:Math.min(this.doc.getLine(R).length,A)},_.prototype.$clipPositionToDocument=function(R,A){if(A=Math.max(0,A),R<0)R=0,A=0;else{var E=this.doc.getLength();R>=E?(R=E-1,A=this.doc.getLine(E-1).length):A=Math.min(this.doc.getLine(R).length,A)}return{row:R,column:A}},_.prototype.$clipRangeToDocument=function(R){R.start.row<0?(R.start.row=0,R.start.column=0):R.start.column=this.$clipColumnToRow(R.start.row,R.start.column);var A=this.doc.getLength()-1;return R.end.row>A?(R.end.row=A,R.end.column=this.doc.getLine(A).length):R.end.column=this.$clipColumnToRow(R.end.row,R.end.column),R},_.prototype.setUseWrapMode=function(R){if(R!=this.$useWrapMode){if(this.$useWrapMode=R,this.$modified=!0,this.$resetRowCache(0),R){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},_.prototype.getUseWrapMode=function(){return this.$useWrapMode},_.prototype.setWrapLimitRange=function(R,A){(this.$wrapLimitRange.min!==R||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:R,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},_.prototype.adjustWrapLimit=function(R,A){var E=this.$wrapLimitRange;E.max<0&&(E={min:A,max:A});var M=this.$constrainWrapLimit(R,E.min,E.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},_.prototype.$constrainWrapLimit=function(R,A,E){return A&&(R=Math.max(A,R)),E&&(R=Math.min(E,R)),R},_.prototype.getWrapLimit=function(){return this.$wrapLimit},_.prototype.setWrapLimit=function(R){this.setWrapLimitRange(R,R)},_.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},_.prototype.$updateInternalDataOnChange=function(R){var A=this.$useWrapMode,E=R.action,M=R.start,O=R.end,N=M.row,L=O.row,$=L-N,D=null;if(this.$updating=!0,$!=0)if(E==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(N,$);var F=this.$foldData;D=this.getFoldsInRange(R),this.removeFolds(D);var U=this.getFoldLine(O.row),W=0;if(U){U.addRemoveChars(O.row,O.column,M.column-O.column),U.shiftRow(-$);var B=this.getFoldLine(N);B&&B!==U&&(B.merge(U),U=B),W=F.indexOf(U)+1}for(W;W=O.row&&U.shiftRow(-$)}L=N}else{var H=Array($);H.unshift(N,0);var j=A?this.$wrapData:this.$rowLengthCache;j.splice.apply(j,H);var F=this.$foldData,U=this.getFoldLine(N),W=0;if(U){var Y=U.range.compareInside(M.row,M.column);Y==0?(U=U.split(M.row,M.column),U&&(U.shiftRow($),U.addRemoveChars(L,0,O.column-M.column))):Y==-1&&(U.addRemoveChars(N,0,O.column-M.column),U.shiftRow($)),W=F.indexOf(U)+1}for(W;W=N&&U.shiftRow($)}}else{$=Math.abs(R.start.column-R.end.column),E==="remove"&&(D=this.getFoldsInRange(R),this.removeFolds(D),$=-$);var U=this.getFoldLine(N);U&&U.addRemoveChars(N,M.column,$)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(N,L):this.$updateRowLengthCache(N,L),D},_.prototype.$updateRowLengthCache=function(R,A,E){this.$rowLengthCache[R]=null,this.$rowLengthCache[A]=null},_.prototype.$updateWrapData=function(R,A){var E=this.doc.getAllLines(),M=this.getTabSize(),O=this.$wrapData,N=this.$wrapLimit,L,$,D=R;for(A=Math.min(A,E.length-1);D<=A;)$=this.getFoldLine(D,$),$?(L=[],$.walk((function(F,U,W,B){var H;if(F!=null){H=this.$getDisplayTokens(F,L.length),H[0]=w;for(var j=1;jA-B;){var H=N+A-B;if(R[H-1]>=S&&R[H]>=S){W(H);continue}if(R[H]==w||R[H]==k){for(H;H!=N-1&&R[H]!=w;H--);if(H>N){W(H);continue}for(H=N+A,H;H>2)),N-1);H>j&&R[H]j&&R[H]j&&R[H]==x;)H--}else for(;H>j&&R[H]j){W(++H);continue}H=N+A,R[H]==b&&H--,W(H-B)}return M},_.prototype.$getDisplayTokens=function(R,A){var E=[],M;A=A||0;for(var O=0;O39&&N<48||N>57&&N<64?E.push(x):N>=4352&&I(N)?E.push(y,b):E.push(y)}return E},_.prototype.$getStringScreenWidth=function(R,A,E){if(A==0)return[0,0];A==null&&(A=1/0),E=E||0;var M,O;for(O=0;O=4352&&I(M)?E+=2:E+=1,!(E>A));O++);return[E,O]},_.prototype.getRowLength=function(R){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[R]&&this.lineWidgets[R].rowCount||0),!this.$useWrapMode||!this.$wrapData[R]?A:this.$wrapData[R].length+A},_.prototype.getRowLineCount=function(R){return!this.$useWrapMode||!this.$wrapData[R]?1:this.$wrapData[R].length+1},_.prototype.getRowWrapIndent=function(R){if(this.$useWrapMode){var A=this.screenToDocumentPosition(R,Number.MAX_VALUE),E=this.$wrapData[A.row];return E.length&&E[0]=0)var $=F[U],O=this.$docRowCache[U],B=R>F[W-1];else var B=!W;for(var H=this.getLength()-1,j=this.getNextFoldLine(O),Y=j?j.start.row:1/0;$<=R&&(D=this.getRowLength(O),!($+D>R||O>=H));)$+=D,O++,O>Y&&(O=j.end.row+1,j=this.getNextFoldLine(O,j),Y=j?j.start.row:1/0),B&&(this.$docRowCache.push(O),this.$screenRowCache.push($));if(j&&j.start.row<=O)M=this.getFoldDisplayLine(j),O=j.start.row;else{if($+D<=R||O>H)return{row:H,column:this.getLine(H).length};M=this.getLine(O),j=null}var X=0,Z=Math.floor(R-$);if(this.$useWrapMode){var te=this.$wrapData[O];te&&(L=te[Z],Z>0&&te.length&&(X=te.indent,N=te[Z-1]||te[te.length-1],M=M.substring(N)))}return E!==void 0&&this.$bidiHandler.isBidiRow($+Z,O,Z)&&(A=this.$bidiHandler.offsetToCol(E)),N+=this.$getStringScreenWidth(M,A-X)[1],this.$useWrapMode&&N>=L&&(N=L-1),j?j.idxToPosition(N):{row:O,column:N}},_.prototype.documentToScreenPosition=function(R,A){if(typeof A>"u")var E=this.$clipPositionToDocument(R.row,R.column);else E=this.$clipPositionToDocument(R,A);R=E.row,A=E.column;var M=0,O=null,N=null;N=this.getFoldAt(R,A,1),N&&(R=N.start.row,A=N.start.column);var L,$=0,D=this.$docRowCache,F=this.$getRowCacheIndex(D,R),U=D.length;if(U&&F>=0)var $=D[F],M=this.$screenRowCache[F],W=R>D[U-1];else var W=!U;for(var B=this.getNextFoldLine($),H=B?B.start.row:1/0;$=H){if(L=B.end.row+1,L>R)break;B=this.getNextFoldLine(L,B),H=B?B.start.row:1/0}else L=$+1;M+=this.getRowLength($),$=L,W&&(this.$docRowCache.push($),this.$screenRowCache.push(M))}var j="";B&&$>=H?(j=this.getFoldDisplayLine(B,R,A),O=B.start.row):(j=this.getLine(R).substring(0,A),O=R);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[O];if(X){for(var Z=0;j.length>=X[Z];)M++,Z++;j=j.substring(X[Z-1]||0,j.length),Y=Z>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[$]&&this.lineWidgets[$].rowsAbove&&(M+=this.lineWidgets[$].rowsAbove),{row:M,column:Y+this.$getStringScreenWidth(j)[0]}},_.prototype.documentToScreenColumn=function(R,A){return this.documentToScreenPosition(R,A).column},_.prototype.documentToScreenRow=function(R,A){return this.documentToScreenPosition(R,A).row},_.prototype.getScreenLength=function(){var R=0,A=null;if(this.$useWrapMode)for(var O=this.$wrapData.length,N=0,M=0,A=this.$foldData[M++],L=A?A.start.row:1/0;NL&&(N=A.end.row+1,A=this.$foldData[M++],L=A?A.start.row:1/0)}else{R=this.getLength();for(var E=this.$foldData,M=0;ME));N++);return[M,N]})},_.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},_}();v.$uid=0,v.prototype.$modes=a.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=I,i.implement(v.prototype,u);var y=1,b=2,w=3,k=4,x=9,S=10,T=11,C=12;function I(_){return _<4352?!1:_>=4352&&_<=4447||_>=4515&&_<=4519||_>=4602&&_<=4607||_>=9001&&_<=9002||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12283||_>=12288&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12589||_>=12593&&_<=12686||_>=12688&&_<=12730||_>=12736&&_<=12771||_>=12784&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=13054||_>=13056&&_<=19903||_>=19968&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=55216&&_<=55238||_>=55243&&_<=55291||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=65281&&_<=65376||_>=65504&&_<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),a.defineOptions(v.prototype,"session",{wrap:{set:function(_){if(!_||_=="off"?_=!1:_=="free"?_=!0:_=="printMargin"?_=-1:typeof _=="string"&&(_=parseInt(_,10)||!1),this.$wrap!=_)if(this.$wrap=_,!_)this.setUseWrapMode(!1);else{var R=typeof _=="number"?_:null;this.setWrapLimitRange(R,R),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(_){_=_=="auto"?this.$mode.type!="text":_!="text",_!=this.$wrapAsCode&&(this.$wrapAsCode=_,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(_){this.$useWorker=_,this.$stopWorker(),_&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(_){_=parseInt(_),_>0&&this.$tabSize!==_&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=_,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(_){this.setFoldStyle(_)},handlesSet:!0},overwrite:{set:function(_){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(_){this.doc.setNewLineMode(_)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(_){this.setMode(_)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,o){var i=n("./lib/lang"),s=n("./lib/oop"),l=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(d){return s.mixin(this.$options,d),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(d){this.$options=d},c.prototype.find=function(d){var h=this.$options,f=this.$matchIterator(d,h);if(!f)return!1;var p=null;return f.forEach(function(g,m,v,y){return p=new l(g,m,v,y),m==y&&h.start&&h.start.start&&h.skipCurrent!=!1&&p.isEqual(h.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(d){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var f=h.range,p=f?d.getLines(f.start.row,f.end.row):d.doc.getAllLines(),g=[],m=h.re;if(h.$isMultiLine){var v=m.length,y=p.length-v,b;e:for(var w=m.offset||0;w<=y;w++){for(var k=0;kT||(g.push(b=new l(w,T,w+v-1,C)),v>2&&(w=w+v-2))}}else for(var I=0;IE&&g[k].end.row==M;)k--;for(g=g.slice(I,k+1),I=0,k=g.length;I=y;T--)if(x(T,Number.MAX_VALUE,S))return;if(h.wrap!=!1){for(T=b,y=v.row;T>=y;T--)if(x(T,Number.MAX_VALUE,S))return}}};else var w=function(T){var C=v.row;if(!x(C,v.column,T)){for(C=C+1;C<=b;C++)if(x(C,0,T))return;if(h.wrap!=!1){for(C=y,b=v.row;C<=b;C++)if(x(C,0,T))return}}};if(h.$isMultiLine)var k=f.length,x=function(S,T,C){var O=p?S-k+1:S;if(!(O<0||O+k>d.getLength())){var _=d.getLine(O),R=_.search(f[0]);if(!(!p&&RT)&&C(O,R,O+k-1,E))return!0}}};else if(p)var x=function(T,C,O){var _=d.getLine(T),R=[],A,E=0;for(f.lastIndex=0;A=f.exec(_);){var M=A[0].length;if(E=A.index,!M){if(E>=_.length)break;f.lastIndex=E+=1}if(A.index+M>C)break;R.push(A.index,M)}for(var I=R.length-1;I>=0;I-=2){var N=R[I-1],M=R[I];if(O(T,N,T,N+M))return!0}};else var x=function(T,C,O){var _=d.getLine(T),R,A;for(f.lastIndex=C;A=f.exec(_);){var E=A[0].length;if(R=A.index,O(T,R,T,R+E))return!0;if(!E&&(f.lastIndex=R+=1,R>=_.length))return!1}};return{forEach:w}},c}();function u(c,d){var h=i.supportsLookbehind();function f(v,y){y===void 0&&(y=!0);var b=h&&d.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(v)||d.regExp?h&&d.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),g=p[0],m=p[p.length-1];return f(g)+c+f(m,!1)}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=this&&this.__extends||function(){var h=function(f,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},h(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");h(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),s=n("../lib/keys"),l=n("../lib/useragent"),a=s.KEY_MODS,u=function(){function h(f,p){this.$init(f,p,!1)}return h.prototype.$init=function(f,p,g){this.platform=p||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},h.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},h.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==f)delete m[v];else if(Array.isArray(y)){var b=y.indexOf(f);b!=-1&&(y.splice(b,1),y.length==1&&(m[v]=y[0]))}}},h.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(k){var x=this.parseKeys(k),S=a[x.hashId]+x.key;v+=(v?" ":"")+S,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var b=this.parseKeys(m),w=a[b.hashId]+b.key;this._addCommandToBinding(v+w,p,g)},this)}},h.prototype._addCommandToBinding=function(f,p,g){var m=this.commandKeyBinding,v;if(!p)delete m[f];else if(!m[f]||this.$singleCommand)m[f]=p;else{Array.isArray(m[f])?(v=m[f].indexOf(p))!=-1&&m[f].splice(v,1):m[f]=[m[f]],typeof g!="number"&&(g=c(p));var y=m[f];for(v=0;vg)break}y.splice(v,0,p)}},h.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},h.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},h.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},h.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},h.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),g=p.pop(),m=s[g];if(s.FUNCTION_KEYS[m])g=s.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=p.length;y--;){var b=s.KEY_MODS[p[y]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+p[y]+" in "+f),!1;v|=b}return{key:g,hashId:v}},h.prototype.findKeyCommand=function(f,p){var g=a[f]+p;return this.commandKeyBinding[g]},h.prototype.handleKeyboard=function(f,p,g,m){if(!(m<0)){var v=a[p]+g,y=this.commandKeyBinding[v];return f.$keyChain&&(f.$keyChain+=" "+v,y=this.commandKeyBinding[f.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||v,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(f.$keyChain="")),{command:y})}},h.prototype.getStatusText=function(f,p){return p.$keyChain||""},h}();function c(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var d=function(h){i(f,h);function f(p,g){var m=h.call(this,p,g)||this;return m.$singleCommand=!0,m}return f}(u);d.call=function(h,f,p){u.prototype.$init.call(h,f,p,!0)},u.call=function(h,f,p){u.prototype.$init.call(h,f,p,!1)},r.HashHandler=d,r.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var c=function(d,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},c(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");c(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),s=n("../lib/oop"),l=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,u=function(c){i(d,c);function d(h,f){var p=c.call(this,f,h)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return d.prototype.exec=function(h,f,p){if(Array.isArray(h)){for(var g=h.length;g--;)if(this.exec(h[g],f,p))return!0;return!1}if(typeof h=="string"&&(h=this.commands[h]),!h||f&&f.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(f))return!1;var m={editor:f,command:h,args:p};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},d.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},d.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,h):this.exec(f[0],h,f[1])},this)}finally{this.$inReplay=!1}}},d.prototype.trimMacro=function(h){return h.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},d}(l);s.implement(u.prototype,a),r.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,o){var i=n("../lib/lang"),s=n("../config"),l=n("../range").Range;function a(c,d){return{win:c,mac:d}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(c){s.loadModule("ace/ext/settings_menu",function(d){d.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(c,d){typeof d=="number"&&!isNaN(d)&&c.gotoLine(d),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(c,d){c.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(c,d){c.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(c,d){c.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(c,d){c.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var d=c.$copyWithEmptySelection&&c.selection.isEmpty(),h=d?c.selection.getLineRange():c.selection.getRange();c._emit("cut",h),h.isEmpty()||c.session.remove(h),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,d){c.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(c){var d=c.selection.getRange();d.start.column=0,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(c){var d=c.selection.getRange();d.end.column=Number.MAX_VALUE,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,d){c.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,d){c.insert(i.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(c){c.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var d=c.selection.getRange();d.start.column=d.end.column=0,d.end.row++,c.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(c){for(var d=c.selection.isBackwards(),h=d?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=d?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(h.row).length,g=c.session.doc.getTextRange(c.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=c.session.doc.getLine(h.row),y=h.row+1;y<=f.row+1;y++){var b=i.stringTrimLeft(i.stringTrimRight(c.session.doc.getLine(y)));b.length!==0&&(b=" "+b),v+=b}f.row+10?(c.selection.moveCursorTo(h.row,h.column),c.selection.selectTo(h.row,h.column+m)):(p=c.session.doc.getLine(h.row).length>p?p+1:p,c.selection.moveCursorTo(h.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(c){var d=c.session.doc.getLength()-1,h=c.session.doc.getLine(d).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var g=0;g=y;T--)if(x(T,Number.MAX_VALUE,S))return;if(h.wrap!=!1){for(T=b,y=v.row;T>=y;T--)if(x(T,Number.MAX_VALUE,S))return}}};else var w=function(T){var C=v.row;if(!x(C,v.column,T)){for(C=C+1;C<=b;C++)if(x(C,0,T))return;if(h.wrap!=!1){for(C=y,b=v.row;C<=b;C++)if(x(C,0,T))return}}};if(h.$isMultiLine)var k=f.length,x=function(S,T,C){var I=p?S-k+1:S;if(!(I<0||I+k>d.getLength())){var _=d.getLine(I),R=_.search(f[0]);if(!(!p&&RT)&&C(I,R,I+k-1,E))return!0}}};else if(p)var x=function(T,C,I){var _=d.getLine(T),R=[],A,E=0;for(f.lastIndex=0;A=f.exec(_);){var M=A[0].length;if(E=A.index,!M){if(E>=_.length)break;f.lastIndex=E+=1}if(A.index+M>C)break;R.push(A.index,M)}for(var O=R.length-1;O>=0;O-=2){var N=R[O-1],M=R[O];if(I(T,N,T,N+M))return!0}};else var x=function(T,C,I){var _=d.getLine(T),R,A;for(f.lastIndex=C;A=f.exec(_);){var E=A[0].length;if(R=A.index,I(T,R,T,R+E))return!0;if(!E&&(f.lastIndex=R+=1,R>=_.length))return!1}};return{forEach:w}},c}();function u(c,d){var h=i.supportsLookbehind();function f(v,y){y===void 0&&(y=!0);var b=h&&d.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(v)||d.regExp?h&&d.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),g=p[0],m=p[p.length-1];return f(g)+c+f(m,!1)}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,o){var i=this&&this.__extends||function(){var h=function(f,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},h(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");h(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),s=n("../lib/keys"),l=n("../lib/useragent"),a=s.KEY_MODS,u=function(){function h(f,p){this.$init(f,p,!1)}return h.prototype.$init=function(f,p,g){this.platform=p||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},h.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},h.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==f)delete m[v];else if(Array.isArray(y)){var b=y.indexOf(f);b!=-1&&(y.splice(b,1),y.length==1&&(m[v]=y[0]))}}},h.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(k){var x=this.parseKeys(k),S=a[x.hashId]+x.key;v+=(v?" ":"")+S,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var b=this.parseKeys(m),w=a[b.hashId]+b.key;this._addCommandToBinding(v+w,p,g)},this)}},h.prototype._addCommandToBinding=function(f,p,g){var m=this.commandKeyBinding,v;if(!p)delete m[f];else if(!m[f]||this.$singleCommand)m[f]=p;else{Array.isArray(m[f])?(v=m[f].indexOf(p))!=-1&&m[f].splice(v,1):m[f]=[m[f]],typeof g!="number"&&(g=c(p));var y=m[f];for(v=0;vg)break}y.splice(v,0,p)}},h.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},h.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},h.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},h.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},h.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),g=p.pop(),m=s[g];if(s.FUNCTION_KEYS[m])g=s.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=p.length;y--;){var b=s.KEY_MODS[p[y]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+p[y]+" in "+f),!1;v|=b}return{key:g,hashId:v}},h.prototype.findKeyCommand=function(f,p){var g=a[f]+p;return this.commandKeyBinding[g]},h.prototype.handleKeyboard=function(f,p,g,m){if(!(m<0)){var v=a[p]+g,y=this.commandKeyBinding[v];return f.$keyChain&&(f.$keyChain+=" "+v,y=this.commandKeyBinding[f.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||v,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(f.$keyChain="")),{command:y})}},h.prototype.getStatusText=function(f,p){return p.$keyChain||""},h}();function c(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var d=function(h){i(f,h);function f(p,g){var m=h.call(this,p,g)||this;return m.$singleCommand=!0,m}return f}(u);d.call=function(h,f,p){u.prototype.$init.call(h,f,p,!0)},u.call=function(h,f,p){u.prototype.$init.call(h,f,p,!1)},r.HashHandler=d,r.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var c=function(d,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},c(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");c(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),s=n("../lib/oop"),l=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,u=function(c){i(d,c);function d(h,f){var p=c.call(this,f,h)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return d.prototype.exec=function(h,f,p){if(Array.isArray(h)){for(var g=h.length;g--;)if(this.exec(h[g],f,p))return!0;return!1}if(typeof h=="string"&&(h=this.commands[h]),!h||f&&f.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(f))return!1;var m={editor:f,command:h,args:p};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},d.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},d.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,h):this.exec(f[0],h,f[1])},this)}finally{this.$inReplay=!1}}},d.prototype.trimMacro=function(h){return h.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},d}(l);s.implement(u.prototype,a),r.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,o){var i=n("../lib/lang"),s=n("../config"),l=n("../range").Range;function a(c,d){return{win:c,mac:d}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(c){s.loadModule("ace/ext/settings_menu",function(d){d.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(c){s.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(c,d){typeof d=="number"&&!isNaN(d)&&c.gotoLine(d),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(c,d){c.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(c,d){c.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(c,d){c.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(c,d){c.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var d=c.$copyWithEmptySelection&&c.selection.isEmpty(),h=d?c.selection.getLineRange():c.selection.getRange();c._emit("cut",h),h.isEmpty()||c.session.remove(h),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,d){c.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(c){s.loadModule("ace/ext/searchbox",function(d){d.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(c){var d=c.selection.getRange();d.start.column=0,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(c){var d=c.selection.getRange();d.end.column=Number.MAX_VALUE,c.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,d){c.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,d){c.insert(i.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(c){c.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var d=c.selection.getRange();d.start.column=d.end.column=0,d.end.row++,c.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(c){for(var d=c.selection.isBackwards(),h=d?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=d?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(h.row).length,g=c.session.doc.getTextRange(c.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=c.session.doc.getLine(h.row),y=h.row+1;y<=f.row+1;y++){var b=i.stringTrimLeft(i.stringTrimRight(c.session.doc.getLine(y)));b.length!==0&&(b=" "+b),v+=b}f.row+10?(c.selection.moveCursorTo(h.row,h.column),c.selection.selectTo(h.row,h.column+m)):(p=c.session.doc.getLine(h.row).length>p?p+1:p,c.selection.moveCursorTo(h.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(c){var d=c.session.doc.getLength()-1,h=c.session.doc.getLine(d).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var g=0;gu[c].column&&c++,f.unshift(c,0),u.splice.apply(u,f),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(c,d){if(c)for(u=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=i.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=i.createElement("div"),a.el.textContent=a.text),a.el&&(i.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&i.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var d=this.session.lineWidgets;a.row==c.end.row&&!d[c.start.row]?d[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,c=u&&u[a],d=[];c;)d.push(c),c=c.$oldWidget;return d},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,u){var c=this.session._changedWidgets,d=u.layerConfig;if(!(!c||!c.length)){for(var h=1/0,f=0;f0&&!d[h];)h--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var p=h;p<=f;p++){var g=d[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,u.container.appendChild(g.el));var m=u.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:u.gutterWidth;g.fixedWidth||(v-=u.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=u.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,o){var i=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,l=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===i.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=i.enter)return;c.preventDefault();var d=this.editor.getCursorPosition().row;this.editor.isRowVisible(d)||this.editor.scrollToLine(d,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(h),p=this.$findNearestAnnotation(h);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-h)0||c+d=0&&this.$isFoldWidgetVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+d))return c+d}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var d=0;c-d>0||c+d=0&&this.$isAnnotationVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+d))return c+d}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var d=this.$getFoldWidget(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var d=this.$getAnnotation(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$blurFoldWidget=function(c){var d=this.$getFoldWidget(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$blurAnnotation=function(c){var d=this.$getAnnotation(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=A.length&&(A=void 0),{value:A&&A[I++],done:!A}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/lang"),u=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,d=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,f=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,b=n("./commands/default_commands").commands,w=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./line_widgets").LineWidgets,S=n("./keyboard/gutter_handler").GutterKeyboardHandler,T=n("./config").nls,C=n("./clipboard"),O=n("./lib/keys"),_=function(){function A(E,M,I){this.$toDestroy=[];var N=E.getContainerElement();this.container=N,this.renderer=E,this.id="editor"+ ++A.$uid,this.commands=new y(u.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new h(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(L,$){$._$emitInputEvent.schedule(31)}),this.setSession(M||I&&I.session||new p("")),w.resetOptions(this),I&&this.setOptions(I),w._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},A.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(this.previousCommand=null,E={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:E.command||{},args:E.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},A.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var M=this.curOp.command,I=M&&M.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),L=this.renderer.layerConfig;(N.start.row>=L.lastRow||N.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection($),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(E){if(this.$mergeUndoDeltas){var M=this.prevOp,I=this.$mergeableCommands,N=M.command&&E.command.name==M.command.name;if(E.command.name=="insertstring"){var L=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&I.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:I.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(E,M){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var I=this;w.loadModule(["keybinding",E],function(N){I.$keybindingId==E&&I.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),M&&M()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=E,E?(this.$onDocumentChange=this.onDocumentChange.bind(this),E.on("change",this.$onDocumentChange),this.renderer.setSession(E),this.$onChangeMode=this.onChangeMode.bind(this),E.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),E.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),E.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),E.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),E.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),E.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=E.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(E)),this._signal("changeSession",{session:E,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(E,M){return this.session.doc.setValue(E),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),E},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(E){this.renderer.onResize(E)},A.prototype.setTheme=function(E,M){this.renderer.setTheme(E,M)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(E){this.renderer.setStyle(E)},A.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(E){this.setOption("fontSize",E)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var M=E.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(B){M.removeMarker(B)}),M.$bracketHighlight=null);var I=E.getCursorPosition(),N=E.getKeyboardHandler(),L=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(E),$=M.getMatchingBracketRanges(I,L);if(!$){var D=new k(M,I.row,I.column),F=D.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var U=M.getMatchingTags(I);U&&($=[U.openTagName,U.closeTagName])}}if(!$&&M.$mode.getMatching&&($=M.$mode.getMatching(E.session)),!$){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray($)?$.length==1&&(W="ace_error_bracket"):$=[$],$.length==2&&(m.comparePoints($[0].end,$[1].start)==0?$=[m.fromPoints($[0].start,$[1].end)]:m.comparePoints($[0].start,$[1].end)==0&&($=[m.fromPoints($[1].start,$[0].end)])),M.$bracketHighlight={ranges:$,markerIds:$.map(function(B){return M.addMarker(B,W,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},A.prototype.onBlur=function(E){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(E){var M=this.session.$useWrapMode,I=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,I,M),this._signal("change",E),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(E){var M=E.data;this.renderer.updateLines(M.first,M.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),E.$highlightLineMarker&&!M)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&M){var I=new m(M.row,M.column,M.row,1/0);I.id=E.addMarker(I,"ace_active-line","screenLine"),E.$highlightLineMarker=I}else M&&(E.$highlightLineMarker.start.row=M.row,E.$highlightLineMarker.end.row=M.row,E.$highlightLineMarker.start.column=M.column,E._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(E){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(I,"ace_selection",N)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var I=M.start.column,N=M.end.column,L=E.getLine(M.start.row),$=L.substring(I,N);if(!($.length>5e3||!/[\w\d]/.test($))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:$}),F=L.substring(I-1,N+1);if(D.test(F))return D}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var E=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),I=!1;if(!E&&this.$copyWithEmptySelection){I=!0;for(var N=this.selection.getAllRanges(),L=0;Lu[c].column&&c++,f.unshift(c,0),u.splice.apply(u,f),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(c,d){if(c)for(u=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),u&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=i.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=i.createElement("div"),a.el.textContent=a.text),a.el&&(i.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&i.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var d=this.session.lineWidgets;a.row==c.end.row&&!d[c.start.row]?d[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,c=u&&u[a],d=[];c;)d.push(c),c=c.$oldWidget;return d},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,u){var c=this.session._changedWidgets,d=u.layerConfig;if(!(!c||!c.length)){for(var h=1/0,f=0;f0&&!d[h];)h--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,u.$cursorLayer.config=c;for(var p=h;p<=f;p++){var g=d[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,u.container.appendChild(g.el));var m=u.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:u.gutterWidth;g.fixedWidth||(v-=u.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=u.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,o){var i=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,l=function(){function u(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===i.escape&&this.annotationTooltip.hideTooltip();return}if(c.target===this.element){if(c.keyCode!=i.enter)return;c.preventDefault();var d=this.editor.getCursorPosition().row;this.editor.isRowVisible(d)||this.editor.scrollToLine(d,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(h),p=this.$findNearestAnnotation(h);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-h)0||c+d=0&&this.$isFoldWidgetVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+d))return c+d}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var d=0;c-d>0||c+d=0&&this.$isAnnotationVisible(c-d))return c-d;if(c+d<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+d))return c+d}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var d=this.$getFoldWidget(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$focusAnnotation=function(c){if(c!=null){var d=this.$getAnnotation(c);d.classList.add(this.editor.renderer.keyboardFocusClassName),d.focus()}},u.prototype.$blurFoldWidget=function(c){var d=this.$getFoldWidget(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$blurAnnotation=function(c){var d=this.$getAnnotation(c);d.classList.remove(this.editor.renderer.keyboardFocusClassName),d.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=A.length&&(A=void 0),{value:A&&A[O++],done:!A}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/lang"),u=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,d=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,f=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,b=n("./commands/default_commands").commands,w=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./line_widgets").LineWidgets,S=n("./keyboard/gutter_handler").GutterKeyboardHandler,T=n("./config").nls,C=n("./clipboard"),I=n("./lib/keys"),_=function(){function A(E,M,O){this.$toDestroy=[];var N=E.getContainerElement();this.container=N,this.renderer=E,this.id="editor"+ ++A.$uid,this.commands=new y(u.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new h(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(L,$){$._$emitInputEvent.schedule(31)}),this.setSession(M||O&&O.session||new p("")),w.resetOptions(this),O&&this.setOptions(O),w._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},A.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(this.previousCommand=null,E={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:E.command||{},args:E.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},A.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var M=this.curOp.command,O=M&&M.scrollIntoView;if(O){switch(O){case"center-animate":O="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),L=this.renderer.layerConfig;(N.start.row>=L.lastRow||N.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}O=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection($),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(E){if(this.$mergeUndoDeltas){var M=this.prevOp,O=this.$mergeableCommands,N=M.command&&E.command.name==M.command.name;if(E.command.name=="insertstring"){var L=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&O.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:O.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(E,M){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var O=this;w.loadModule(["keybinding",E],function(N){O.$keybindingId==E&&O.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),M&&M()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var O=this.session.getSelection();O.off("changeCursor",this.$onCursorChange),O.off("changeSelection",this.$onSelectionChange)}this.session=E,E?(this.$onDocumentChange=this.onDocumentChange.bind(this),E.on("change",this.$onDocumentChange),this.renderer.setSession(E),this.$onChangeMode=this.onChangeMode.bind(this),E.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),E.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),E.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),E.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),E.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),E.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=E.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(E)),this._signal("changeSession",{session:E,oldSession:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(E,M){return this.session.doc.setValue(E),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),E},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(E){this.renderer.onResize(E)},A.prototype.setTheme=function(E,M){this.renderer.setTheme(E,M)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(E){this.renderer.setStyle(E)},A.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(E){this.setOption("fontSize",E)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var M=E.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(B){M.removeMarker(B)}),M.$bracketHighlight=null);var O=E.getCursorPosition(),N=E.getKeyboardHandler(),L=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(E),$=M.getMatchingBracketRanges(O,L);if(!$){var D=new k(M,O.row,O.column),F=D.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var U=M.getMatchingTags(O);U&&($=[U.openTagName,U.closeTagName])}}if(!$&&M.$mode.getMatching&&($=M.$mode.getMatching(E.session)),!$){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray($)?$.length==1&&(W="ace_error_bracket"):$=[$],$.length==2&&(m.comparePoints($[0].end,$[1].start)==0?$=[m.fromPoints($[0].start,$[1].end)]:m.comparePoints($[0].start,$[1].end)==0&&($=[m.fromPoints($[1].start,$[0].end)])),M.$bracketHighlight={ranges:$,markerIds:$.map(function(B){return M.addMarker(B,W,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},A.prototype.onBlur=function(E){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(E){var M=this.session.$useWrapMode,O=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,O,M),this._signal("change",E),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(E){var M=E.data;this.renderer.updateLines(M.first,M.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),E.$highlightLineMarker&&!M)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&M){var O=new m(M.row,M.column,M.row,1/0);O.id=E.addMarker(O,"ace_active-line","screenLine"),E.$highlightLineMarker=O}else M&&(E.$highlightLineMarker.start.row=M.row,E.$highlightLineMarker.end.row=M.row,E.$highlightLineMarker.start.column=M.column,E._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(E){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var O=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(O,"ace_selection",N)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var O=M.start.column,N=M.end.column,L=E.getLine(M.start.row),$=L.substring(O,N);if(!($.length>5e3||!/[\w\d]/.test($))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:$}),F=L.substring(O-1,N+1);if(D.test(F))return D}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var E=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),O=!1;if(!E&&this.$copyWithEmptySelection){O=!0;for(var N=this.selection.getAllRanges(),L=0;LB.search(/\S|$/)){var F=B.substr(L.column).search(/\S|$/);I.doc.removeInLine(L.row,L.column,L.column+F)}}this.clearSelection();var U=L.column,W=I.getState(L.row),B=I.getLine(L.row),H=N.checkOutdent(W,B,E);if(I.insert(L,E),$&&$.selection&&($.selection.length==2?this.selection.setSelectionRange(new m(L.row,U+$.selection[0],L.row,U+$.selection[1])):this.selection.setSelectionRange(new m(L.row+$.selection[0],$.selection[1],L.row+$.selection[2],$.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(E)){var V=N.getNextLineIndent(W,B.slice(0,L.column),I.getTabString());I.insert({row:L.row+1,column:0},V)}H&&N.autoOutdent(W,I,L.row)}},A.prototype.autoIndent=function(){var E=this.session,M=E.getMode(),I,N;if(this.selection.isEmpty())I=0,N=E.doc.getLength()-1;else{var L=this.getSelectionRange();I=L.start.row,N=L.end.row}for(var $="",D="",F="",U,W,B,H=E.getTabString(),V=I;V<=N;V++)V>0&&($=E.getState(V-1),D=E.getLine(V-1),F=M.getNextLineIndent($,D,H)),U=E.getLine(V),W=M.$getIndent(U),F!==W&&(W.length>0&&(B=new m(V,0,V,W.length),E.remove(B)),F.length>0&&E.insert({row:V,column:0},F)),M.autoOutdent($,E,V)},A.prototype.onTextInput=function(E,M){if(!M)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,E,M);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},A.prototype.applyComposition=function(E,M){if(M.extendLeft||M.extendRight){var I=this.selection.getRange();I.start.column-=M.extendLeft,I.end.column+=M.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!E&&!I.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),M.restoreStart||M.restoreEnd){var I=this.selection.getRange();I.start.column-=M.restoreStart,I.end.column-=M.restoreEnd,this.selection.setRange(I)}},A.prototype.onCommandKey=function(E,M,I){return this.keyBinding.onCommandKey(E,M,I)},A.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,N=I.getState(M.start.row),L=I.getMode().transformAction(N,"deletion",this,I,M);if(M.end.column===0){var $=I.getTextRange(M);if($[$.length-1]==` -`){var D=I.getLine(M.end.row);/^\s+$/.test(D)&&(M.end.column=D.length)}}L&&(M=L)}this.session.remove(M),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var E=this.getSelectionRange();E.start.column==E.end.column&&E.start.row==E.end.row&&(E.end.column=0,E.end.row++),this.session.remove(E),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(E)},A.prototype.setGhostText=function(E,M){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,M)},A.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var E=this.getCursorPosition(),M=E.column;if(M!==0){var I=this.session.getLine(E.row),N,L;MF.toLowerCase()?1:0});for(var L=new m(0,0,0,0),N=E.first;N<=E.last;N++){var $=M.getLine(N);L.start.row=N,L.end.row=N,L.end.column=$.length,M.replace(L,I[N-E.first])}},A.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,M.first,M.last)},A.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),M=this.session.getState(E.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,I,E)},A.prototype.getNumberAt=function(E,M){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var N=this.session.getLine(E);I.lastIndex=M){var $={value:L[0],start:L.index,end:L.index+L[0].length};return $}}return null},A.prototype.modifyNumber=function(E){var M=this.selection.getCursor().row,I=this.selection.getCursor().column,N=new m(M,I-1,M,I),L=this.session.getTextRange(N);if(!isNaN(parseFloat(L))&&isFinite(L)){var $=this.getNumberAt(M,I);if($){var D=$.value.indexOf(".")>=0?$.start+$.value.indexOf(".")+1:$.end,F=$.start+$.value.length-D,U=parseFloat($.value);U*=Math.pow(10,F),D!==$.end&&I=D&&$<=F&&(I=ce,U.selection.clearSelection(),U.moveCursorTo(E,D+N),U.selection.selectTo(E,F+N)),D=F});for(var W=this.$toggleWordPairs,B,H=0;H=F&&D<=U&&V.match(/((?:https?|ftp):\/\/[\S]+)/)){W=V.replace(/[\s:.,'";}\]]+$/,"");break}F=U}}catch(Y){I={error:Y}}finally{try{H&&!H.done&&(N=B.return)&&N.call(B)}finally{if(I)throw I.error}}return W},A.prototype.openLink=function(){var E=this.selection.getCursor(),M=this.findLinkAt(E.row,E.column);return M&&window.open(M,"_blank"),M!=null},A.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var E=this.selection,M=this.session,I=E.getRange(),N=E.isBackwards();if(I.isEmpty()){var L=I.start.row;M.duplicateLines(L,L)}else{var $=N?I.start:I.end,D=M.insert($,M.getTextRange(I),!1);I.start=$,I.end=D,E.setSelectionRange(I,N)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(E,M,I){return this.session.moveText(E,M,I)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(E,M){var I,N,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var $=L.toOrientedRange();I=this.$getSelectedRows($),N=this.session.$moveLines(I.first,I.last,M?0:E),M&&E==-1&&(N=0),$.moveBy(N,0),L.fromOrientedRange($)}else{var D=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,U=0,W=D.length,B=0;BY+1)break;Y=X.last}for(B--,F=this.session.$moveLines(V,Y,M?0:E),M&&E==-1&&(H=B+1);H<=B;)D[H].moveBy(F,0),H++;M||(F=0),U+=F}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},A.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},A.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(E,M){var I=this.renderer,N=this.renderer.layerConfig,L=E*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):M===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var $=I.scrollTop;I.scrollBy(0,L*N.lineHeight),M!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling($)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},A.prototype.scrollToLine=function(E,M,I,N){this.renderer.scrollToLine(E,M,I,N)},A.prototype.centerSelection=function(){var E=this.getSelectionRange(),M={row:Math.floor(E.start.row+(E.end.row-E.start.row)/2),column:Math.floor(E.start.column+(E.end.column-E.start.column)/2)};this.renderer.alignCursor(M,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(E,M){this.selection.moveCursorTo(E,M)},A.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},A.prototype.jumpToMatching=function(E,M){var I=this.getCursorPosition(),N=new k(this.session,I.row,I.column),L=N.getCurrentToken(),$=0;L&&L.type.indexOf("tag-name")!==-1&&(L=N.stepBackward());var D=L||N.stepForward();if(D){var F,U=!1,W={},B=I.column-D.start,H,V={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;B1?W[D.value]++:L.value==="=0;--$)this.$tryReplace(I[$],E)&&N++;return this.selection.setSelectionRange(L),N},A.prototype.$tryReplace=function(E,M){var I=this.session.getTextRange(E);return M=this.$search.replace(I,M),M!==null?(E.end=this.session.replace(E,M),E):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(E,M,I){M||(M={}),typeof E=="string"||E instanceof RegExp?M.needle=E:typeof E=="object"&&s.mixin(M,E);var N=this.selection.getRange();M.needle==null&&(E=this.session.getTextRange(N)||this.$search.$options.needle,E||(N=this.session.getWordRange(N.start.row,N.start.column),E=this.session.getTextRange(N)),this.$search.set({needle:E})),this.$search.set(M),M.start||this.$search.set({start:N});var L=this.$search.find(this.session);if(M.preventScroll)return L;if(L)return this.revealRange(L,I),L;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},A.prototype.findNext=function(E,M){this.find({skipCurrent:!0,backwards:!1},E,M)},A.prototype.findPrevious=function(E,M){this.find(E,{skipCurrent:!0,backwards:!0},M)},A.prototype.revealRange=function(E,M){this.session.unfold(E),this.selection.setSelectionRange(E);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),M!==!1&&this.renderer.animateScrolling(I)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(E){E.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(E){if(E){var M,I=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var $=this.on("changeSelection",function(){N=!0}),D=this.renderer.on("beforeRender",function(){N&&(M=I.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(N&&M&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var U=I.renderer,W=U.$cursorLayer.$pixelPos,B=U.layerConfig,H=W.top-B.offset;W.top>=0&&H+M.top<0?N=!0:W.topwindow.innerHeight?N=!1:N=null,N!=null&&(L.style.top=H+"px",L.style.left=W.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(U){U||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",$),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",D))}}},A.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(E)),M.isBlinking=!this.$readOnly&&E!="wide",l.setCssClass(M.element,"ace_slim-cursors",/slim/.test(E)))},A.prototype.prompt=function(E,M,I){var N=this;w.loadModule("ace/ext/prompt",function(L){L.prompt(N,E,M,I)})},A}();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(_.prototype,v),w.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){this.textInput.setReadOnly(A),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?R.attach(this):R.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?R.attach(this):R.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var M=l.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===O.enter){N.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}},I;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",T("editor")),this.renderer.$gutter.setAttribute("aria-label",T("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new S(this)),I.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",M.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var R={getText:function(A,E){return(Math.abs(A.selection.lead.row-E)||E+1+(E<9?"·":""))+""},getWidth:function(A,E,M){return Math.max(E.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(A,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){i.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,u,c){var d=u.firstRowScreen*u.lineHeight,h=Math.floor(d/this.canvasHeight),f=c.documentToScreenRow(a,0)*u.lineHeight;return f-h*this.canvasHeight},l.prototype.computeLineHeight=function(a,u,c){return u.lineHeight*c.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=i.createFragment(this.element),c=0;cb&&(x=y.end.row+1,y=g.getNextFoldLine(x,y),b=y?y.start.row:1/0),x>v){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}w=this.$lines.get(++k),w?w.row=x:(w=this.$lines.createCell(x,p,this.session,h),this.$lines.push(w)),this.$renderCell(w,p,y,x),x++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var b=m?m.getWidth(g,y,p):y.toString().length*p.characterWidth,w=this.$padding||this.$computePadding();b+=w.left+w.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var m=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();p.firstRowv&&this.$lines.push(this.$renderLines(p,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session,h);this.$renderCell(k,p,b,y),v.push(k),y++}return v},f.prototype.$renderCell=function(p,g,m,v){var y=p.element,b=this.session,w=y.childNodes[0],k=y.childNodes[1],x=y.childNodes[2],S=x.firstChild,T=b.$firstLineNumber,C=b.$breakpoints,O=b.$decorations,_=b.gutterRenderer||this.$renderer,R=this.$showFoldWidgets&&b.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(_?_.getText(b,v):v+T).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v=A&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),C[v]&&(M+=C[v]),O[v]&&(M+=O[v]),this.$annotations[v]&&v!==A&&(M+=this.$annotations[v].className),R){var L=R[v];L==null&&(L=R[v]=b.getFoldWidget(v))}if(L){var $="ace_fold-widget ace_"+L,D=L=="start"&&v==A&&vm.right-g.right)return"foldWidgets"},f}();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer="",d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,s.implement(d.prototype,a);function h(f){var p=document.createTextNode("");f.appendChild(p);var g=i.createElement("span");f.appendChild(g);var m=i.createElement("span");f.appendChild(m);var v=i.createElement("span");return m.appendChild(v),f}r.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,o){var i=n("../range").Range,s=n("../lib/dom"),l=function(){function u(c){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,d){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=d,h.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var d;for(var h in this.markers){var f=this.markers[h];if(!f.range){f.update(d,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,c),m=this.$padding+p.start.column*c.characterWidth;f.renderer(d,p,m,g,c)}else f.type=="fullLine"?this.drawFullLineMarker(d,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(d,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(d,p,f.clazz,c):this.drawMultiLineMarker(d,p,f.clazz,c):this.drawSingleLineMarker(d,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.ik,y==v),f,y==v?0:1,p)},u.prototype.drawMultiLineMarker=function(c,d,h,f,p){var g=this.$padding,m=f.lineHeight,v=this.$getTop(d.start.row,f),y=g+d.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var b=d.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(c,b,h+" ace_br1 ace_start",f,null,p)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var b=d.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(c,b,h+" ace_br12",f,null,p)}else{v=this.$getTop(d.end.row,f);var w=d.end.column*f.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+w+"px;top:"+v+"px;left:"+g+"px;"+(p||""))}if(m=(d.end.row-d.start.row-1)*f.lineHeight,!(m<=0)){v=this.$getTop(d.start.row+1,f);var k=(d.start.column?1:0)|(d.end.column?0:8);this.elt(h+(k?" ace_br"+k:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(p||""))}},u.prototype.drawSingleLineMarker=function(c,d,h,f,p,g){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(c,d,h,f,p,g);var m=f.lineHeight,v=(d.end.column+(p||0)-d.start.column)*f.characterWidth,y=this.$getTop(d.start.row,f),b=this.$padding+d.start.column*f.characterWidth;this.elt(h,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+b+"px;"+(g||""))},u.prototype.drawBidiSingleLineMarker=function(c,d,h,f,p,g){var m=f.lineHeight,v=this.$getTop(d.start.row,f),y=this.$padding,b=this.session.$bidiHandler.getSelections(d.start.column,d.end.column);b.forEach(function(w){this.elt(h,"height:"+m+"px;width:"+(w.width+(p||0))+"px;top:"+v+"px;left:"+(y+w.left)+"px;"+(g||""))},this)},u.prototype.drawFullLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;d.start.row!=d.end.row&&(m+=this.$getTop(d.end.row,f)-g),this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u.prototype.drawScreenLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u}();l.prototype.$padding=0;function a(u,c,d,h){return(u?1:0)|(c?2:0)|(d?4:0)|(h?8:0)}r.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,o){var i=new Set(["text","rparen","lparen"]);r.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("./lines").Lines,u=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,d=n("./text_util").isTextToken,h=function(){function f(p){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,g=p.getNewLineCharacter()==` -`&&p.getNewLineMode()!="windows",m=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var g=this.$tabStrings=[0],m=1;mT&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),T=S?S.start.row:1/0),!(x>y);){var C=b[w++];if(C){this.dom.removeChildren(C),this.$renderLine(C,x,x==T?S:!1),k&&(C.style.top=this.$lines.computeLineTop(x,p,this.session)+"px");var O=p.lineHeight*this.session.getRowLength(x)+"px";C.style.height!=O&&(k=!0,C.style.height=O)}x++}if(k)for(;w0;y--)this.$lines.shift();if(g.lastRow>p.lastRow)for(var y=this.session.getFoldedRowCount(p.lastRow+1,g.lastRow);y>0;y--)this.$lines.pop();p.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(p,g.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session),x=k.element;this.dom.removeChildren(x),s.setStyle(x.style,"height",this.$lines.computeLineHeight(y,p,this.session)+"px"),s.setStyle(x.style,"top",this.$lines.computeLineTop(y,p,this.session)+"px"),this.$renderLine(x,y,y==w?b:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",v.push(k),y++}return v},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var g=p.firstRow,m=p.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(p,g,m))},f.prototype.$renderToken=function(p,g,m,v){for(var y=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),k,x=0;k=b.exec(v);){var S=k[1],T=k[2],C=k[3],O=k[4],_=k[5];if(!(!y.showSpaces&&T)){var R=x!=k.index?v.slice(x,k.index):"";if(x=k.index+k[0].length,R&&w.appendChild(this.dom.createTextNode(R,this.element)),S){var A=y.session.getScreenTabSize(g+k.index);w.appendChild(y.$tabStrings[A].cloneNode(!0)),g+=A-1}else if(T)if(y.showSpaces){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space",E.textContent=l.stringRepeat(y.SPACE_CHAR,T.length),w.appendChild(E)}else w.appendChild(this.dom.createTextNode(T,this.element));else if(C){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space ace_invalid",E.textContent=l.stringRepeat(y.SPACE_CHAR,C.length),w.appendChild(E)}else if(O){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",E.textContent=y.showSpaces?y.SPACE_CHAR:O,w.appendChild(E)}else if(_){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className="ace_cjk",E.textContent=_,w.appendChild(E)}}}if(w.appendChild(this.dom.createTextNode(x?v.slice(x):v,this.element)),d(m.type))p.appendChild(w);else{var M="ace_"+m.type.replace(/\./g," ace_"),E=this.dom.createElement("span");m.type=="fold"&&(E.style.width=m.value.length*this.config.characterWidth+"px",E.setAttribute("title",c("Unfold code"))),E.className=M,E.appendChild(w),p.appendChild(E)}return g+v.length},f.prototype.renderIndentGuide=function(p,g,m){var v=g.search(this.$indentGuideRe);if(v<=0||v>=m)return g;if(g[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,b=0;bb[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[g.row]!==""&&g.column===p[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=g.row+1;w0){for(var y=0;y=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,g)}}else for(var m=p.length-1;m>=0;m--){var v=p[m];if(this.$highlightIndentGuideMarker.end&&v.row=b;)w=this.$renderToken(k,w,S,T.substring(0,b-v)),T=T.substring(b-v),v=b,k=this.$createLineElement(),p.appendChild(k),k.appendChild(this.dom.createTextNode(l.stringRepeat(" ",m.indent),this.element)),y++,w=0,b=m[y]||Number.MAX_VALUE;T.length!=0&&(v+=T.length,w=this.$renderToken(k,w,S,T))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,w,null,"",!0)},f.prototype.$renderSimpleLine=function(p,g){for(var m=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,m,y,b);m=this.$renderToken(p,m,y,b)}}},f.prototype.$renderOverflowMessage=function(p,g,m,v,y){m&&this.$renderToken(p,g,m,v.slice(0,this.MAX_LINE_LENGTH-g));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=y?"":"",p.appendChild(b)},f.prototype.$renderLine=function(p,g,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(g)),m)var v=this.$getFoldLineTokens(g,m);else var v=this.session.getTokens(g);var y=p;if(v.length){var b=this.session.getRowSplitData(g);if(b&&b.length){this.$renderWrappedLine(p,v,b);var y=p.lastChild}else{var y=p;this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y));if(this.showEOL&&y){m&&(g=m.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(w)}},f.prototype.$getFoldLineTokens=function(p,g){var m=this.session,v=[];function y(w,k,x){for(var S=0,T=0;T+w[S].value.lengthx-k&&(C=C.substring(0,x-k)),v.push({type:w[S].type,value:C}),T=k+C.length,S+=1}for(;Tx?v.push({type:w[S].type,value:C.substring(0,x-T)}):v.push(w[S]),T+=C.length,S+=1}}var b=m.getTokens(p);return g.walk(function(w,k,x,S,T){w!=null?v.push({type:"fold",value:w}):(T&&(b=m.getTokens(k)),b.length&&y(b,S,x))},g.end.row,this.session.getLine(g.end.row).length),v},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,u),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return l.prototype.$updateOpacity=function(a){for(var u=this.cursors,c=u.length;c--;)i.setStyle(u[c].style,"opacity",a?"":"0")},l.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},l.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},l.prototype.setPadding=function(a){this.$padding=a},l.prototype.setSession=function(a){this.session=a},l.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},l.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},l.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,i.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},l.prototype.addCursor=function(){var a=i.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},l.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},l.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},l.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,a.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),h=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:h}},l.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||f.top<0)&&c>1)){var p=this.cursors[d++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,u[c],this.session):this.isCursorInView(f,a)?(i.setStyle(g,"display","block"),i.translate(p,f.left,f.top),i.setStyle(g,"width",Math.round(a.characterWidth)+"px"),i.setStyle(g,"height",a.lineHeight+"px")):i.setStyle(g,"display","none")}}for(;this.cursors.length>d;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=f,this.restartTimer()},l.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},l.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},l}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(v[b]=y[b])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter,c=32768,d=function(){function p(g,m){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();s.implement(d.prototype,u);var h=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=l.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>c?(this.coeff=c/m,m=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var f=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(d);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=f,r.VScrollBar=h,r.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter;l.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ +`){var B=O.getLine(L.row);if(L.column>B.search(/\S|$/)){var F=B.substr(L.column).search(/\S|$/);O.doc.removeInLine(L.row,L.column,L.column+F)}}this.clearSelection();var U=L.column,W=O.getState(L.row),B=O.getLine(L.row),H=N.checkOutdent(W,B,E);if(O.insert(L,E),$&&$.selection&&($.selection.length==2?this.selection.setSelectionRange(new m(L.row,U+$.selection[0],L.row,U+$.selection[1])):this.selection.setSelectionRange(new m(L.row+$.selection[0],$.selection[1],L.row+$.selection[2],$.selection[3]))),this.$enableAutoIndent){if(O.getDocument().isNewLine(E)){var j=N.getNextLineIndent(W,B.slice(0,L.column),O.getTabString());O.insert({row:L.row+1,column:0},j)}H&&N.autoOutdent(W,O,L.row)}},A.prototype.autoIndent=function(){var E=this.session,M=E.getMode(),O,N;if(this.selection.isEmpty())O=0,N=E.doc.getLength()-1;else{var L=this.getSelectionRange();O=L.start.row,N=L.end.row}for(var $="",D="",F="",U,W,B,H=E.getTabString(),j=O;j<=N;j++)j>0&&($=E.getState(j-1),D=E.getLine(j-1),F=M.getNextLineIndent($,D,H)),U=E.getLine(j),W=M.$getIndent(U),F!==W&&(W.length>0&&(B=new m(j,0,j,W.length),E.remove(B)),F.length>0&&E.insert({row:j,column:0},F)),M.autoOutdent($,E,j)},A.prototype.onTextInput=function(E,M){if(!M)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var O=this.applyComposition.bind(this,E,M);this.selection.rangeCount?this.forEachSelection(O):O(),this.endOperation()},A.prototype.applyComposition=function(E,M){if(M.extendLeft||M.extendRight){var O=this.selection.getRange();O.start.column-=M.extendLeft,O.end.column+=M.extendRight,O.start.column<0&&(O.start.row--,O.start.column+=this.session.getLine(O.start.row).length+1),this.selection.setRange(O),!E&&!O.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),M.restoreStart||M.restoreEnd){var O=this.selection.getRange();O.start.column-=M.restoreStart,O.end.column-=M.restoreEnd,this.selection.setRange(O)}},A.prototype.onCommandKey=function(E,M,O){return this.keyBinding.onCommandKey(E,M,O)},A.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var O=this.session,N=O.getState(M.start.row),L=O.getMode().transformAction(N,"deletion",this,O,M);if(M.end.column===0){var $=O.getTextRange(M);if($[$.length-1]==` +`){var D=O.getLine(M.end.row);/^\s+$/.test(D)&&(M.end.column=D.length)}}L&&(M=L)}this.session.remove(M),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var E=this.getSelectionRange();E.start.column==E.end.column&&E.start.row==E.end.row&&(E.end.column=0,E.end.row++),this.session.remove(E),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(E)},A.prototype.setGhostText=function(E,M){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,M)},A.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var E=this.getCursorPosition(),M=E.column;if(M!==0){var O=this.session.getLine(E.row),N,L;MF.toLowerCase()?1:0});for(var L=new m(0,0,0,0),N=E.first;N<=E.last;N++){var $=M.getLine(N);L.start.row=N,L.end.row=N,L.end.column=$.length,M.replace(L,O[N-E.first])}},A.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,M.first,M.last)},A.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),M=this.session.getState(E.row),O=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,O,E)},A.prototype.getNumberAt=function(E,M){var O=/[\-]?[0-9]+(?:\.[0-9]+)?/g;O.lastIndex=0;for(var N=this.session.getLine(E);O.lastIndex=M){var $={value:L[0],start:L.index,end:L.index+L[0].length};return $}}return null},A.prototype.modifyNumber=function(E){var M=this.selection.getCursor().row,O=this.selection.getCursor().column,N=new m(M,O-1,M,O),L=this.session.getTextRange(N);if(!isNaN(parseFloat(L))&&isFinite(L)){var $=this.getNumberAt(M,O);if($){var D=$.value.indexOf(".")>=0?$.start+$.value.indexOf(".")+1:$.end,F=$.start+$.value.length-D,U=parseFloat($.value);U*=Math.pow(10,F),D!==$.end&&O=D&&$<=F&&(O=ue,U.selection.clearSelection(),U.moveCursorTo(E,D+N),U.selection.selectTo(E,F+N)),D=F});for(var W=this.$toggleWordPairs,B,H=0;H=F&&D<=U&&j.match(/((?:https?|ftp):\/\/[\S]+)/)){W=j.replace(/[\s:.,'";}\]]+$/,"");break}F=U}}catch(Y){O={error:Y}}finally{try{H&&!H.done&&(N=B.return)&&N.call(B)}finally{if(O)throw O.error}}return W},A.prototype.openLink=function(){var E=this.selection.getCursor(),M=this.findLinkAt(E.row,E.column);return M&&window.open(M,"_blank"),M!=null},A.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var E=this.selection,M=this.session,O=E.getRange(),N=E.isBackwards();if(O.isEmpty()){var L=O.start.row;M.duplicateLines(L,L)}else{var $=N?O.start:O.end,D=M.insert($,M.getTextRange(O),!1);O.start=$,O.end=D,E.setSelectionRange(O,N)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(E,M,O){return this.session.moveText(E,M,O)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(E,M){var O,N,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var $=L.toOrientedRange();O=this.$getSelectedRows($),N=this.session.$moveLines(O.first,O.last,M?0:E),M&&E==-1&&(N=0),$.moveBy(N,0),L.fromOrientedRange($)}else{var D=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,U=0,W=D.length,B=0;BY+1)break;Y=X.last}for(B--,F=this.session.$moveLines(j,Y,M?0:E),M&&E==-1&&(H=B+1);H<=B;)D[H].moveBy(F,0),H++;M||(F=0),U+=F}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},A.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},A.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(E,M){var O=this.renderer,N=this.renderer.layerConfig,L=E*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):M===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var $=O.scrollTop;O.scrollBy(0,L*N.lineHeight),M!=null&&O.scrollCursorIntoView(null,.5),O.animateScrolling($)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},A.prototype.scrollToLine=function(E,M,O,N){this.renderer.scrollToLine(E,M,O,N)},A.prototype.centerSelection=function(){var E=this.getSelectionRange(),M={row:Math.floor(E.start.row+(E.end.row-E.start.row)/2),column:Math.floor(E.start.column+(E.end.column-E.start.column)/2)};this.renderer.alignCursor(M,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(E,M){this.selection.moveCursorTo(E,M)},A.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},A.prototype.jumpToMatching=function(E,M){var O=this.getCursorPosition(),N=new k(this.session,O.row,O.column),L=N.getCurrentToken(),$=0;L&&L.type.indexOf("tag-name")!==-1&&(L=N.stepBackward());var D=L||N.stepForward();if(D){var F,U=!1,W={},B=O.column-D.start,H,j={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;B1?W[D.value]++:L.value==="=0;--$)this.$tryReplace(O[$],E)&&N++;return this.selection.setSelectionRange(L),N},A.prototype.$tryReplace=function(E,M){var O=this.session.getTextRange(E);return M=this.$search.replace(O,M),M!==null?(E.end=this.session.replace(E,M),E):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(E,M,O){M||(M={}),typeof E=="string"||E instanceof RegExp?M.needle=E:typeof E=="object"&&s.mixin(M,E);var N=this.selection.getRange();M.needle==null&&(E=this.session.getTextRange(N)||this.$search.$options.needle,E||(N=this.session.getWordRange(N.start.row,N.start.column),E=this.session.getTextRange(N)),this.$search.set({needle:E})),this.$search.set(M),M.start||this.$search.set({start:N});var L=this.$search.find(this.session);if(M.preventScroll)return L;if(L)return this.revealRange(L,O),L;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},A.prototype.findNext=function(E,M){this.find({skipCurrent:!0,backwards:!1},E,M)},A.prototype.findPrevious=function(E,M){this.find(E,{skipCurrent:!0,backwards:!0},M)},A.prototype.revealRange=function(E,M){this.session.unfold(E),this.selection.setSelectionRange(E);var O=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),M!==!1&&this.renderer.animateScrolling(O)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(E){E.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(E){if(E){var M,O=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var $=this.on("changeSelection",function(){N=!0}),D=this.renderer.on("beforeRender",function(){N&&(M=O.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(N&&M&&(O.isFocused()||O.searchBox&&O.searchBox.isFocused())){var U=O.renderer,W=U.$cursorLayer.$pixelPos,B=U.layerConfig,H=W.top-B.offset;W.top>=0&&H+M.top<0?N=!0:W.topwindow.innerHeight?N=!1:N=null,N!=null&&(L.style.top=H+"px",L.style.left=W.left+"px",L.style.height=B.lineHeight+"px",L.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(U){U||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",$),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",D))}}},A.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(E)),M.isBlinking=!this.$readOnly&&E!="wide",l.setCssClass(M.element,"ace_slim-cursors",/slim/.test(E)))},A.prototype.prompt=function(E,M,O){var N=this;w.loadModule("ace/ext/prompt",function(L){L.prompt(N,E,M,O)})},A}();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(_.prototype,v),w.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){this.textInput.setReadOnly(A),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?R.attach(this):R.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?R.attach(this):R.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var M=l.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===I.enter){N.preventDefault();var L=this.getCursorPosition().row;this.isRowVisible(L)||this.scrollToLine(L,!0,!0),this.focus()}},O;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",T("editor")),this.renderer.$gutter.setAttribute("aria-label",T("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),O||(O=new S(this)),O.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",M.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),O&&O.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var R={getText:function(A,E){return(Math.abs(A.selection.lead.row-E)||E+1+(E<9?"·":""))+""},getWidth:function(A,E,M){return Math.max(E.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(A,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){i.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,u,c){var d=u.firstRowScreen*u.lineHeight,h=Math.floor(d/this.canvasHeight),f=c.documentToScreenRow(a,0)*u.lineHeight;return f-h*this.canvasHeight},l.prototype.computeLineHeight=function(a,u,c){return u.lineHeight*c.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=i.createFragment(this.element),c=0;cb&&(x=y.end.row+1,y=g.getNextFoldLine(x,y),b=y?y.start.row:1/0),x>v){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}w=this.$lines.get(++k),w?w.row=x:(w=this.$lines.createCell(x,p,this.session,h),this.$lines.push(w)),this.$renderCell(w,p,y,x),x++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var b=m?m.getWidth(g,y,p):y.toString().length*p.characterWidth,w=this.$padding||this.$computePadding();b+=w.left+w.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var m=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();p.firstRowv&&this.$lines.push(this.$renderLines(p,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session,h);this.$renderCell(k,p,b,y),v.push(k),y++}return v},f.prototype.$renderCell=function(p,g,m,v){var y=p.element,b=this.session,w=y.childNodes[0],k=y.childNodes[1],x=y.childNodes[2],S=x.firstChild,T=b.$firstLineNumber,C=b.$breakpoints,I=b.$decorations,_=b.gutterRenderer||this.$renderer,R=this.$showFoldWidgets&&b.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",M=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",O=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(_?_.getText(b,v):v+T).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v=A&&this.$cursorRow<=m.end.row)&&(M+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),C[v]&&(M+=C[v]),I[v]&&(M+=I[v]),this.$annotations[v]&&v!==A&&(M+=this.$annotations[v].className),R){var L=R[v];L==null&&(L=R[v]=b.getFoldWidget(v))}if(L){var $="ace_fold-widget ace_"+L,D=L=="start"&&v==A&&vm.right-g.right)return"foldWidgets"},f}();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer="",d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,s.implement(d.prototype,a);function h(f){var p=document.createTextNode("");f.appendChild(p);var g=i.createElement("span");f.appendChild(g);var m=i.createElement("span");f.appendChild(m);var v=i.createElement("span");return m.appendChild(v),f}r.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,o){var i=n("../range").Range,s=n("../lib/dom"),l=function(){function u(c){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return u.prototype.setPadding=function(c){this.$padding=c},u.prototype.setSession=function(c){this.session=c},u.prototype.setMarkers=function(c){this.markers=c},u.prototype.elt=function(c,d){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=d,h.className=c},u.prototype.update=function(c){if(c){this.config=c,this.i=0;var d;for(var h in this.markers){var f=this.markers[h];if(!f.range){f.update(d,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,c),m=this.$padding+p.start.column*c.characterWidth;f.renderer(d,p,m,g,c)}else f.type=="fullLine"?this.drawFullLineMarker(d,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(d,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(d,p,f.clazz,c):this.drawMultiLineMarker(d,p,f.clazz,c):this.drawSingleLineMarker(d,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.ik,y==v),f,y==v?0:1,p)},u.prototype.drawMultiLineMarker=function(c,d,h,f,p){var g=this.$padding,m=f.lineHeight,v=this.$getTop(d.start.row,f),y=g+d.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var b=d.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(c,b,h+" ace_br1 ace_start",f,null,p)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var b=d.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(c,b,h+" ace_br12",f,null,p)}else{v=this.$getTop(d.end.row,f);var w=d.end.column*f.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+w+"px;top:"+v+"px;left:"+g+"px;"+(p||""))}if(m=(d.end.row-d.start.row-1)*f.lineHeight,!(m<=0)){v=this.$getTop(d.start.row+1,f);var k=(d.start.column?1:0)|(d.end.column?0:8);this.elt(h+(k?" ace_br"+k:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(p||""))}},u.prototype.drawSingleLineMarker=function(c,d,h,f,p,g){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(c,d,h,f,p,g);var m=f.lineHeight,v=(d.end.column+(p||0)-d.start.column)*f.characterWidth,y=this.$getTop(d.start.row,f),b=this.$padding+d.start.column*f.characterWidth;this.elt(h,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+b+"px;"+(g||""))},u.prototype.drawBidiSingleLineMarker=function(c,d,h,f,p,g){var m=f.lineHeight,v=this.$getTop(d.start.row,f),y=this.$padding,b=this.session.$bidiHandler.getSelections(d.start.column,d.end.column);b.forEach(function(w){this.elt(h,"height:"+m+"px;width:"+(w.width+(p||0))+"px;top:"+v+"px;left:"+(y+w.left)+"px;"+(g||""))},this)},u.prototype.drawFullLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;d.start.row!=d.end.row&&(m+=this.$getTop(d.end.row,f)-g),this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u.prototype.drawScreenLineMarker=function(c,d,h,f,p){var g=this.$getTop(d.start.row,f),m=f.lineHeight;this.elt(h,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},u}();l.prototype.$padding=0;function a(u,c,d,h){return(u?1:0)|(c?2:0)|(d?4:0)|(h?8:0)}r.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,o){var i=new Set(["text","rparen","lparen"]);r.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("./lines").Lines,u=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,d=n("./text_util").isTextToken,h=function(){function f(p){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,g=p.getNewLineCharacter()==` +`&&p.getNewLineMode()!="windows",m=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var g=this.$tabStrings=[0],m=1;mT&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),T=S?S.start.row:1/0),!(x>y);){var C=b[w++];if(C){this.dom.removeChildren(C),this.$renderLine(C,x,x==T?S:!1),k&&(C.style.top=this.$lines.computeLineTop(x,p,this.session)+"px");var I=p.lineHeight*this.session.getRowLength(x)+"px";C.style.height!=I&&(k=!0,C.style.height=I)}x++}if(k)for(;w0;y--)this.$lines.shift();if(g.lastRow>p.lastRow)for(var y=this.session.getFoldedRowCount(p.lastRow+1,g.lastRow);y>0;y--)this.$lines.pop();p.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(p,g.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,g,m){for(var v=[],y=g,b=this.session.getNextFoldLine(y),w=b?b.start.row:1/0;y>w&&(y=b.end.row+1,b=this.session.getNextFoldLine(y,b),w=b?b.start.row:1/0),!(y>m);){var k=this.$lines.createCell(y,p,this.session),x=k.element;this.dom.removeChildren(x),s.setStyle(x.style,"height",this.$lines.computeLineHeight(y,p,this.session)+"px"),s.setStyle(x.style,"top",this.$lines.computeLineTop(y,p,this.session)+"px"),this.$renderLine(x,y,y==w?b:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",v.push(k),y++}return v},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var g=p.firstRow,m=p.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(p,g,m))},f.prototype.$renderToken=function(p,g,m,v){for(var y=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),k,x=0;k=b.exec(v);){var S=k[1],T=k[2],C=k[3],I=k[4],_=k[5];if(!(!y.showSpaces&&T)){var R=x!=k.index?v.slice(x,k.index):"";if(x=k.index+k[0].length,R&&w.appendChild(this.dom.createTextNode(R,this.element)),S){var A=y.session.getScreenTabSize(g+k.index);w.appendChild(y.$tabStrings[A].cloneNode(!0)),g+=A-1}else if(T)if(y.showSpaces){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space",E.textContent=l.stringRepeat(y.SPACE_CHAR,T.length),w.appendChild(E)}else w.appendChild(this.dom.createTextNode(T,this.element));else if(C){var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_space ace_invalid",E.textContent=l.stringRepeat(y.SPACE_CHAR,C.length),w.appendChild(E)}else if(I){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",E.textContent=y.showSpaces?y.SPACE_CHAR:I,w.appendChild(E)}else if(_){g+=1;var E=this.dom.createElement("span");E.style.width=y.config.characterWidth*2+"px",E.className="ace_cjk",E.textContent=_,w.appendChild(E)}}}if(w.appendChild(this.dom.createTextNode(x?v.slice(x):v,this.element)),d(m.type))p.appendChild(w);else{var M="ace_"+m.type.replace(/\./g," ace_"),E=this.dom.createElement("span");m.type=="fold"&&(E.style.width=m.value.length*this.config.characterWidth+"px",E.setAttribute("title",c("Unfold code"))),E.className=M,E.appendChild(w),p.appendChild(E)}return g+v.length},f.prototype.renderIndentGuide=function(p,g,m){var v=g.search(this.$indentGuideRe);if(v<=0||v>=m)return g;if(g[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,b=0;bb[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[g.row]!==""&&g.column===p[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=g.row+1;w0){for(var y=0;y=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,g)}}else for(var m=p.length-1;m>=0;m--){var v=p[m];if(this.$highlightIndentGuideMarker.end&&v.row=b;)w=this.$renderToken(k,w,S,T.substring(0,b-v)),T=T.substring(b-v),v=b,k=this.$createLineElement(),p.appendChild(k),k.appendChild(this.dom.createTextNode(l.stringRepeat(" ",m.indent),this.element)),y++,w=0,b=m[y]||Number.MAX_VALUE;T.length!=0&&(v+=T.length,w=this.$renderToken(k,w,S,T))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,w,null,"",!0)},f.prototype.$renderSimpleLine=function(p,g){for(var m=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,m,y,b);m=this.$renderToken(p,m,y,b)}}},f.prototype.$renderOverflowMessage=function(p,g,m,v,y){m&&this.$renderToken(p,g,m,v.slice(0,this.MAX_LINE_LENGTH-g));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=y?"":"",p.appendChild(b)},f.prototype.$renderLine=function(p,g,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(g)),m)var v=this.$getFoldLineTokens(g,m);else var v=this.session.getTokens(g);var y=p;if(v.length){var b=this.session.getRowSplitData(g);if(b&&b.length){this.$renderWrappedLine(p,v,b);var y=p.lastChild}else{var y=p;this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),p.appendChild(y));if(this.showEOL&&y){m&&(g=m.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(w)}},f.prototype.$getFoldLineTokens=function(p,g){var m=this.session,v=[];function y(w,k,x){for(var S=0,T=0;T+w[S].value.lengthx-k&&(C=C.substring(0,x-k)),v.push({type:w[S].type,value:C}),T=k+C.length,S+=1}for(;Tx?v.push({type:w[S].type,value:C.substring(0,x-T)}):v.push(w[S]),T+=C.length,S+=1}}var b=m.getTokens(p);return g.walk(function(w,k,x,S,T){w!=null?v.push({type:"fold",value:w}):(T&&(b=m.getTokens(k)),b.length&&y(b,S,x))},g.end.row,this.session.getLine(g.end.row).length),v},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,u),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,o){var i=n("../lib/dom"),s=function(){function l(a){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return l.prototype.$updateOpacity=function(a){for(var u=this.cursors,c=u.length;c--;)i.setStyle(u[c].style,"opacity",a?"":"0")},l.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},l.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},l.prototype.setPadding=function(a){this.$padding=a},l.prototype.setSession=function(a){this.session=a},l.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},l.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},l.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,i.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},l.prototype.addCursor=function(){var a=i.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},l.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},l.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},l.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,a.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),h=(c.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:h}},l.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||f.top<0)&&c>1)){var p=this.cursors[d++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,u[c],this.session):this.isCursorInView(f,a)?(i.setStyle(g,"display","block"),i.translate(p,f.left,f.top),i.setStyle(g,"width",Math.round(a.characterWidth)+"px"),i.setStyle(g,"height",a.lineHeight+"px")):i.setStyle(g,"display","none")}}for(;this.cursors.length>d;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=f,this.restartTimer()},l.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},l.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},l}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(v[b]=y[b])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter,c=32768,d=function(){function p(g,m){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();s.implement(d.prototype,u);var h=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=l.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>c?(this.coeff=c/m,m=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var f=function(p){i(g,p);function g(m,v){var y=p.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(d);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=f,r.VScrollBar=h,r.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,o){var i=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),s=n("./lib/oop"),l=n("./lib/dom"),a=n("./lib/event"),u=n("./lib/event_emitter").EventEmitter;l.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; @@ -5388,7 +5398,7 @@ ${u} .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var c=function(){function f(p,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();s.implement(c.prototype,u);var d=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,b=function(O){y=O.clientY},w=function(){clearInterval(T)},k=m.clientY,x=this.thumbTop,S=function(){if(y!==void 0){var O=v.scrollTopFromThumbTop(x+y-k);O!==v.scrollTop&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,b=function(O){y=O.clientX},w=function(){clearInterval(T)},k=m.clientX,x=this.thumbLeft,S=function(){if(y!==void 0){var O=v.scrollLeftFromThumbLeft(x+y-k);O!==v.scrollLeft&&v._emit("scroll",{data:O})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=d,r.ScrollBarV=d,r.ScrollBarH=h,r.VScrollBar=d,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,o){var i=n("./lib/event"),s=function(){function l(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(d){c.pending=!1;var h=c.changes;if(h&&(i.blockIdle(100),c.changes=0,c.onRender(h)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},l}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("../lib/event"),u=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,d=512,h=typeof ResizeObserver=="function",f=200,p=function(){function g(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",d),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",u.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=l.stringRepeat(m,d);var v=this.$main.getBoundingClientRect();return v.width/d},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=s.buildDom([m(0,0),m(f,0),m(0,f),m(f,f)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=x(1/y,m)}function b(D,F,U){var W=D[1]*F[0]-D[0]*F[1];return[(-F[1]*U[0]+F[0]*U[1])/W,(+D[1]*U[0]-D[0]*U[1])/W]}function w(D,F){return[D[0]-F[0],D[1]-F[1]]}function k(D,F){return[D[0]+F[0],D[1]+F[1]]}function x(D,F){return[D*F[0],D*F[1]]}this.els||this.$initTransformMeasureNodes();function S(D){var F=D.getBoundingClientRect();return[F.left,F.top]}var T=S(this.els[0]),C=S(this.els[1]),O=S(this.els[2]),_=S(this.els[3]),R=b(w(_,C),w(_,O),w(k(C,O),k(_,T))),A=x(1+R[0],w(C,T)),E=x(1+R[1],w(O,T));if(v){var M=v,I=R[0]*M[0]/f+R[1]*M[1]/f+1,N=k(x(M[0],A),x(M[1],E));return k(x(1/I/f,N),T)}var L=w(m,T),$=b(w(A,x(R[0],L)),w(E,x(R[1],L)),L);return x(f,$)},g}();p.prototype.$characterSize={width:0,height:0},i.implement(p.prototype,c),r.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,o){o.exports=` +}`,"ace_scrollbar.css",!1);var c=function(){function f(p,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();s.implement(c.prototype,u);var d=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,b=function(I){y=I.clientY},w=function(){clearInterval(T)},k=m.clientY,x=this.thumbTop,S=function(){if(y!==void 0){var I=v.scrollTopFromThumbTop(x+y-k);I!==v.scrollTop&&v._emit("scroll",{data:I})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(f){i(p,f);function p(g,m){var v=f.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,b=function(I){y=I.clientX},w=function(){clearInterval(T)},k=m.clientX,x=this.thumbLeft,S=function(){if(y!==void 0){var I=v.scrollLeftFromThumbLeft(x+y-k);I!==v.scrollLeft&&v._emit("scroll",{data:I})}};a.capture(this.inner,b,w);var T=setInterval(S,20);return a.preventDefault(m)}var C=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=d,r.ScrollBarV=d,r.ScrollBarH=h,r.VScrollBar=d,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,o){var i=n("./lib/event"),s=function(){function l(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var c=this;this._flush=function(d){c.pending=!1;var h=c.changes;if(h&&(i.blockIdle(100),c.changes=0,c.onRender(h)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},l}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/dom"),l=n("../lib/lang"),a=n("../lib/event"),u=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,d=512,h=typeof ResizeObserver=="function",f=200,p=function(){function g(m){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",d),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",u.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=l.stringRepeat(m,d);var v=this.$main.getBoundingClientRect();return v.width/d},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=s.buildDom([m(0,0),m(f,0),m(0,f),m(f,f)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=x(1/y,m)}function b(D,F,U){var W=D[1]*F[0]-D[0]*F[1];return[(-F[1]*U[0]+F[0]*U[1])/W,(+D[1]*U[0]-D[0]*U[1])/W]}function w(D,F){return[D[0]-F[0],D[1]-F[1]]}function k(D,F){return[D[0]+F[0],D[1]+F[1]]}function x(D,F){return[D*F[0],D*F[1]]}this.els||this.$initTransformMeasureNodes();function S(D){var F=D.getBoundingClientRect();return[F.left,F.top]}var T=S(this.els[0]),C=S(this.els[1]),I=S(this.els[2]),_=S(this.els[3]),R=b(w(_,C),w(_,I),w(k(C,I),k(_,T))),A=x(1+R[0],w(C,T)),E=x(1+R[1],w(I,T));if(v){var M=v,O=R[0]*M[0]/f+R[1]*M[1]/f+1,N=k(x(M[0],A),x(M[1],E));return k(x(1/O/f,N),T)}var L=w(m,T),$=b(w(A,x(R[0],L)),w(E,x(R[1],L)),L);return x(f,$)},g}();p.prototype.$characterSize={width:0,height:0},i.implement(p.prototype,c),r.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,o){o.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -6039,11 +6049,11 @@ ${u} width:1px; height:1px; overflow:hidden; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/oop"),l=n("../lib/event_emitter").EventEmitter,a=function(){function u(c,d){this.canvas=i.createElement("canvas"),this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var h=(c.lastRow+1)*this.lineHeight;hR.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(_){_.priority=m[_.type]||null}),g=g.sort(p);for(var v=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(C-this.halfMinDecorationHeight),S=Math.round(C+this.halfMinDecorationHeight)}f.fillStyle=d[g[y].type]||null,f.fillRect(0,k,this.canvasWidth,S-x)}}var O=this.renderer.session.selection.getCursor();if(O){var w=this.compensateFoldRows(O.row,v),k=Math.round((O.row-w)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,k,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,d){var h=0;if(d&&d.length>0)for(var f=0;fd[f].start.row&&c=d[f].end.row&&(h+=d[f].end.row-d[f].start.row);return h},u}();s.implement(a.prototype,l),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/dom"),l=n("./lib/lang"),a=n("./config"),u=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,d=n("./layer/text").Text,h=n("./layer/cursor").Cursor,f=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,b=n("./lib/event_emitter").EventEmitter,w=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent");s.importCssString(w,"ace_editor.css",!1);var S=function(){function T(C,O){var _=this;this.container=C||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var R=this.$textLayer=new d(this.content);this.canvas=R.element,this.$markerFront=new c(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollTop(A.data-_.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollLeft(A.data-_.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){_.updateCharacterSize(),_.onResize(!0,_.gutterWidth,_.$size.width,_.$size.height),_._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return T.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},T.prototype.updateLines=function(C,O,_){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function(C,O,_,R){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var A=this.container;R||(R=A.clientHeight||A.scrollHeight),_||(_=A.clientWidth||A.scrollWidth);var E=this.$updateCachedSize(C,O,_,R);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!R)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function(C,O,_,R){R-=this.$extraHeight||0;var A=0,E=this.$size,M={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(R&&(C||E.height!=R)&&(E.height=R,A|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),_&&(C||E.width!=_)){A|=this.CHANGE_SIZE,E.width=_,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),E.scrollerWidth=Math.max(0,_-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(A|=this.CHANGE_FULL)}return E.$dirty=!_||!R,A&&this._signal("resize",M),A},T.prototype.onGutterResize=function(C){var O=this.$showGutter?C:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},T.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},T.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},T.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=s.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var _=this.$cursorLayer.$pixelPos;if(_){O&&O.markerRange&&(_=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var R=this.layerConfig,A=_.top,E=_.left;A-=R.offset;var M=O&&O.useTextareaForIME||x.isMobile?this.lineHeight:1;if(A<0||A>R.height-M){s.translate(this.textarea,0,0);return}var I=1,N=this.$size.height-M;if(!O)A+=this.lineHeight;else if(O.useTextareaForIME){var L=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(L)[0]}else A+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-I&&(E=this.$size.scrollerWidth-I),E+=this.gutterWidth+this.margin.left,s.setStyle(C,"height",M+"px"),s.setStyle(C,"width",I+"px"),s.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-I),Math.min(A,N))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,O=C.lastRow,_=this.session.documentToScreenRow(O,0)*C.lineHeight;return _-this.session.getScrollTop()>C.height-C.lineHeight?O-1:O},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function(C,O,_,R){var A=this.scrollMargin;A.top=C|0,A.bottom=O|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},T.prototype.setMargin=function(C,O,_,R){var A=this.margin;A.top=C|0,A.bottom=O|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},T.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-O&&(C=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function(C,O){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!O){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var R=this.scrollTop+(_.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;R>0&&(this.scrollTop=R,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}_=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-_.offset);var A=_.width+2*this.$padding+"px",E=_.minHeight+"px";s.setStyle(this.content.style,"width",A),s.setStyle(this.content.style,"height",E)}if(C&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-_.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(_):this.$gutterLayer.scrollLines(_)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender",C)},T.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,_=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var R=_<=2*this.lineHeight,A=!R&&C>O;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var E=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,_),this.desiredHeight=_,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var C=this.session,O=this.$size,_=O.height<=2*this.lineHeight,R=this.session.getScreenLength(),A=R*this.lineHeight,E=this.$getLongestLine(),M=!_&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-E-2*this.$padding<0),I=this.$horizScroll!==M;I&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var L=O.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=$;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,A-O.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,E+2*this.$padding-O.scrollerWidth+D.right)));var F=!_&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-A+$<0||this.scrollTop>D.top),U=N!==F;U&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(L/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),V=H+B,Y,X,Z=this.lineHeight;H=C.screenToDocumentRow(H,0);var te=C.getFoldLine(H);te&&(H=te.start.row),Y=C.documentToScreenRow(H,0),X=C.getRowLength(H)*Z,V=Math.min(C.screenToDocumentRow(V,0),C.getLength()-1),L=O.scrollerHeight+C.getRowLength(V)*Z+X,W=this.scrollTop-Y*Z;var ce=0;return(this.layerConfig.width!=E||I)&&(ce=this.CHANGE_H_SCROLL),(I||U)&&(ce|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),U&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:H,firstRowScreen:Y,lastRow:V,lineHeight:Z,characterWidth:this.characterWidth,minHeight:L,maxHeight:A,offset:W,gutterOffset:Z?Math.max(0,Math.ceil((W+O.height-O.scrollerHeight)/Z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),ce},T.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(C>_.lastRow+1)&&!(O<_.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,C,O),!0}}},T.prototype.$getLongestLine=function(){var C=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(C+=1),this.$textLayer&&C>this.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function(C,O){this.$gutterLayer.addGutterDecoration(C,O)},T.prototype.removeGutterDecoration=function(C,O){this.$gutterLayer.removeGutterDecoration(C,O)},T.prototype.updateBreakpoints=function(C){this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function(C,O,_){this.scrollCursorIntoView(C,_),this.scrollCursorIntoView(O,_)},T.prototype.scrollCursorIntoView=function(C,O,_){if(this.$size.scrollerHeight!==0){var R=this.$cursorLayer.getPixelPosition(C),A=R.left,E=R.top,M=_&&_.top||0,I=_&&_.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+M>E?(O&&N+M>E+this.lineHeight&&(E-=O*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):N+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function(C,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,O]);C=R[1]-this.gutterWidth-this.margin.left,O=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=Math.floor((O+this.scrollTop-_.top)/this.lineHeight),I=this.$blockCursor?Math.floor(E):Math.round(E);return{row:M,column:I,side:E-I>0?1:-1,offsetX:A}},T.prototype.screenToTextCoordinates=function(C,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,O]);C=R[1]-this.gutterWidth-this.margin.left,O=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=this.$blockCursor?Math.floor(E):Math.round(E),I=Math.floor((O+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(M,0),A)},T.prototype.textToScreenCoordinates=function(C,O){var _=this.scroller.getBoundingClientRect(),R=this.session.documentToScreenPosition(C,O),A=this.$padding+(this.session.$bidiHandler.isBidiRow(R.row,C)?this.session.$bidiHandler.getPosLeft(R.column):Math.round(R.column*this.characterWidth)),E=R.row*this.lineHeight;return{pageX:_.left+A-this.scrollLeft,pageY:_.top+E-this.scrollTop}},T.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function(C){var O=this.session.selection.cursor;this.addToken(C,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function(C,O){var _=this.session.selection.cursor,R=O||{row:_.row,column:_.column};this.removeGhostText();var A=C.split(` +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,o){var i=n("../lib/dom"),s=n("../lib/oop"),l=n("../lib/event_emitter").EventEmitter,a=function(){function u(c,d){this.canvas=i.createElement("canvas"),this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},c.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(c){var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var h=(c.lastRow+1)*this.lineHeight;hR.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(_){_.priority=m[_.type]||null}),g=g.sort(p);for(var v=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(C-this.halfMinDecorationHeight),S=Math.round(C+this.halfMinDecorationHeight)}f.fillStyle=d[g[y].type]||null,f.fillRect(0,k,this.canvasWidth,S-x)}}var I=this.renderer.session.selection.getCursor();if(I){var w=this.compensateFoldRows(I.row,v),k=Math.round((I.row-w)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,k,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(c,d){var h=0;if(d&&d.length>0)for(var f=0;fd[f].start.row&&c=d[f].end.row&&(h+=d[f].end.row-d[f].start.row);return h},u}();s.implement(a.prototype,l),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,o){var i=n("./lib/oop"),s=n("./lib/dom"),l=n("./lib/lang"),a=n("./config"),u=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,d=n("./layer/text").Text,h=n("./layer/cursor").Cursor,f=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,b=n("./lib/event_emitter").EventEmitter,w=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent");s.importCssString(w,"ace_editor.css",!1);var S=function(){function T(C,I){var _=this;this.container=C||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var R=this.$textLayer=new d(this.content);this.canvas=R.element,this.$markerFront=new c(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollTop(A.data-_.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){_.$scrollAnimation||_.session.setScrollLeft(A.data-_.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){_.updateCharacterSize(),_.onResize(!0,_.gutterWidth,_.$size.width,_.$size.height),_._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return T.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},T.prototype.updateLines=function(C,I,_){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function(C,I,_,R){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var A=this.container;R||(R=A.clientHeight||A.scrollHeight),_||(_=A.clientWidth||A.scrollWidth);var E=this.$updateCachedSize(C,I,_,R);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!R)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function(C,I,_,R){R-=this.$extraHeight||0;var A=0,E=this.$size,M={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(R&&(C||E.height!=R)&&(E.height=R,A|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),_&&(C||E.width!=_)){A|=this.CHANGE_SIZE,E.width=_,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,s.setStyle(this.scrollBarH.element.style,"left",I+"px"),s.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),E.scrollerWidth=Math.max(0,_-I-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var O=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",O),s.setStyle(this.scroller.style,"right",O),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(A|=this.CHANGE_FULL)}return E.$dirty=!_||!R,A&&this._signal("resize",M),A},T.prototype.onGutterResize=function(C){var I=this.$showGutter?C:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},T.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},T.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},T.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=s.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){s.translate(this.textarea,-100,0);return}var _=this.$cursorLayer.$pixelPos;if(_){I&&I.markerRange&&(_=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var R=this.layerConfig,A=_.top,E=_.left;A-=R.offset;var M=I&&I.useTextareaForIME||x.isMobile?this.lineHeight:1;if(A<0||A>R.height-M){s.translate(this.textarea,0,0);return}var O=1,N=this.$size.height-M;if(!I)A+=this.lineHeight;else if(I.useTextareaForIME){var L=this.textarea.value;O=this.characterWidth*this.session.$getStringScreenWidth(L)[0]}else A+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-O&&(E=this.$size.scrollerWidth-O),E+=this.gutterWidth+this.margin.left,s.setStyle(C,"height",M+"px"),s.setStyle(C,"width",O+"px"),s.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-O),Math.min(A,N))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,I=C.lastRow,_=this.session.documentToScreenRow(I,0)*C.lineHeight;return _-this.session.getScrollTop()>C.height-C.lineHeight?I-1:I},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function(C,I,_,R){var A=this.scrollMargin;A.top=C|0,A.bottom=I|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},T.prototype.setMargin=function(C,I,_,R){var A=this.margin;A.top=C|0,A.bottom=I|0,A.right=R|0,A.left=_|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},T.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-I&&(C=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function(C,I){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!I){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var R=this.scrollTop+(_.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;R>0&&(this.scrollTop=R,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}_=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-_.offset);var A=_.width+2*this.$padding+"px",E=_.minHeight+"px";s.setStyle(this.content.style,"width",A),s.setStyle(this.content.style,"height",E)}if(C&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-_.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(_):this.$gutterLayer.scrollLines(_)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender",C)},T.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,_=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var R=_<=2*this.lineHeight,A=!R&&C>I;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var E=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,_),this.desiredHeight=_,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var C=this.session,I=this.$size,_=I.height<=2*this.lineHeight,R=this.session.getScreenLength(),A=R*this.lineHeight,E=this.$getLongestLine(),M=!_&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-E-2*this.$padding<0),O=this.$horizScroll!==M;O&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var L=I.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=$;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,A-I.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,E+2*this.$padding-I.scrollerWidth+D.right)));var F=!_&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-A+$<0||this.scrollTop>D.top),U=N!==F;U&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(L/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),j=H+B,Y,X,Z=this.lineHeight;H=C.screenToDocumentRow(H,0);var te=C.getFoldLine(H);te&&(H=te.start.row),Y=C.documentToScreenRow(H,0),X=C.getRowLength(H)*Z,j=Math.min(C.screenToDocumentRow(j,0),C.getLength()-1),L=I.scrollerHeight+C.getRowLength(j)*Z+X,W=this.scrollTop-Y*Z;var ue=0;return(this.layerConfig.width!=E||O)&&(ue=this.CHANGE_H_SCROLL),(O||U)&&(ue|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),U&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:H,firstRowScreen:Y,lastRow:j,lineHeight:Z,characterWidth:this.characterWidth,minHeight:L,maxHeight:A,offset:W,gutterOffset:Z?Math.max(0,Math.ceil((W+I.height-I.scrollerHeight)/Z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),ue},T.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(C>_.lastRow+1)&&!(I<_.firstRow)){if(I===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,C,I),!0}}},T.prototype.$getLongestLine=function(){var C=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(C+=1),this.$textLayer&&C>this.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function(C,I){this.$gutterLayer.addGutterDecoration(C,I)},T.prototype.removeGutterDecoration=function(C,I){this.$gutterLayer.removeGutterDecoration(C,I)},T.prototype.updateBreakpoints=function(C){this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function(C,I,_){this.scrollCursorIntoView(C,_),this.scrollCursorIntoView(I,_)},T.prototype.scrollCursorIntoView=function(C,I,_){if(this.$size.scrollerHeight!==0){var R=this.$cursorLayer.getPixelPosition(C),A=R.left,E=R.top,M=_&&_.top||0,O=_&&_.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+M>E?(I&&N+M>E+this.lineHeight&&(E-=I*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):N+this.$size.scrollerHeight-O=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function(C,I){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,I]);C=R[1]-this.gutterWidth-this.margin.left,I=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=Math.floor((I+this.scrollTop-_.top)/this.lineHeight),O=this.$blockCursor?Math.floor(E):Math.round(E);return{row:M,column:O,side:E-O>0?1:-1,offsetX:A}},T.prototype.screenToTextCoordinates=function(C,I){var _;if(this.$hasCssTransforms){_={top:0,left:0};var R=this.$fontMetrics.transformCoordinates([C,I]);C=R[1]-this.gutterWidth-this.margin.left,I=R[0]}else _=this.scroller.getBoundingClientRect();var A=C+this.scrollLeft-_.left-this.$padding,E=A/this.characterWidth,M=this.$blockCursor?Math.floor(E):Math.round(E),O=Math.floor((I+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(O,Math.max(M,0),A)},T.prototype.textToScreenCoordinates=function(C,I){var _=this.scroller.getBoundingClientRect(),R=this.session.documentToScreenPosition(C,I),A=this.$padding+(this.session.$bidiHandler.isBidiRow(R.row,C)?this.session.$bidiHandler.getPosLeft(R.column):Math.round(R.column*this.characterWidth)),E=R.row*this.lineHeight;return{pageX:_.left+A-this.scrollLeft,pageY:_.top+E-this.scrollTop}},T.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function(C){var I=this.session.selection.cursor;this.addToken(C,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function(C,I){var _=this.session.selection.cursor,R=I||{row:_.row,column:_.column};this.removeGhostText();var A=C.split(` `);this.addToken(A[0],"ghost_text",R.row,R.column),this.$ghostText={text:C,position:{row:R.row,column:R.column}},A.length>1&&(this.$ghostTextWidget={text:A.slice(1).join(` -`),row:R.row,column:R.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},T.prototype.removeGhostText=function(){if(this.$ghostText){var C=this.$ghostText.position;this.removeExtraToken(C.row,C.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function(C,O,_,R){var A=this.session;A.bgTokenizer.lines[_]=null;var E={type:O,value:C},M=A.getTokens(_);if(R==null||!M.length)M.push(E);else for(var I=0,N=0;N1||Math.abs(C.$size.height-R)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,i.implement(S.prototype,b),a.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},showFoldedAnnotations:{set:function(T){this.$gutterLayer.$showFoldedAnnotations=T},initialValue:!1},fadeFoldWidgets:{set:function(T){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/net"),l=n("../lib/event_emitter").EventEmitter,a=n("../config");function u(f){var p="importScripts('"+s.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(p),m.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=u(f),g=window.URL||window.webkitURL,m=g.createObjectURL(p);return new Worker(m)}return new Worker(f)}var d=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,l),this.$createWorkerFromOldConfig=function(f,p,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(p,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var b={};f.forEach(function(w){b[w]=y(n.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:b,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return s.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,p.push(m)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(d.prototype);var h=function(f,p,g){var m=null,v=!1,y=Object.create(l),b=[],w=new d({messageBuffer:b,terminate:function(){},postMessage:function(x){b.push(x),m&&(v?setTimeout(k):k())}});w.setEmitSync=function(x){v=x};var k=function(){var x=b.shift();x.command?m[x.command].apply(m,x.args):x.event&&y._signal(x.event,x.data)};return y.postMessage=function(x){w.onMessage({data:x})},y.callback=function(x,S){this.postMessage({type:"call",id:S,data:x})},y.emit=function(x,S){this.postMessage({type:"event",name:x,data:S})},a.loadModule(["worker",p],function(x){for(m=new x[g](y);b.length;)k()}),w};r.UIWorkerClient=h,r.WorkerClient=d,r.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,o){var i=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,l=n("./lib/oop"),a=function(){function u(c,d,h,f,p,g){var m=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,d=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=h.addMarker(new i(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=d.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),h.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=c.addMarker(new i(h.row,h.column,h.row,h.column+d.length),d.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&d.start.column<=this.pos.column+this.length+1,p=d.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=h),f&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.remove(new i(v.row,v.column,v.row,v.column-h))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,h=function(p,g){d.removeMarker(p.markerId),p.markerId=d.addMarker(new i(p.row,p.column,p.row,p.column+c.length),g,null,!1)};h(this.pos,this.mainClass);for(var f=this.others.length;f--;)h(this.others[f],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,h=0;h1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new i(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,o){var i=n("./range_list").RangeList,s=n("./range").Range,l=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,u=n("./lib/event"),c=n("./lib/lang"),d=n("./commands/multi_select_commands");r.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=n("./search").Search,f=new h;function p(w,k,x){return f.$options.wrap=!0,f.$options.needle=k,f.$options.backwards=x==-1,f.find(w)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,k){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}w.cursor||(w.cursor=w.end);var S=this.rangeList.add(w);return this.$onAddRange(w),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var k=this.rangeList.substractPoint(w);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();w.push(k),this.rangeCount=0}for(var x=w.length;x--;){var S=this.ranges.indexOf(w[x]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x1){var w=this.rangeList.ranges,k=w[w.length-1],x=s.fromPoints(w[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var S=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(S,T);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,k,x){var S=[],T=w.column0;)$--;if($>0)for(var D=0;S[D].isEmpty();)D++;for(var F=$;F>=D;F--)S[F].isEmpty()&&S.splice(F,1)}return S}}).call(l.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var k=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",k),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var k=this.session.$selectionMarkers.indexOf(w);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var k=this.session.$selectionMarkers,x=w.length;x--;){var S=w[x];if(S.marker){this.session.removeMarker(S.marker);var T=k.indexOf(S);T!=-1&&k.splice(T,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var k=w.command,x=w.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?S=x.forEachSelection(k,w.args):k.multiSelectAction=="forEachLine"?S=x.forEachSelection(k,w.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),S=k.exec(x,w.args||{})):S=k.multiSelectAction(x,w.args||{});else{var S=k.exec(x,w.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(w,k,x){if(!this.inVirtualSelectionMode){var S=x&&x.keepOrder,T=x==!0||x&&x.$byLines,C=this.session,O=this.selection,_=O.rangeList,R=(S?O:_).ranges,A;if(!R.length)return w.exec?w.exec(this,k||{}):w(this,k||{});var E=O._eventRegistry;O._eventRegistry={};var M=new l(C);this.inVirtualSelectionMode=!0;for(var I=R.length;I--;){if(T)for(;I>0&&R[I].start.row==R[I-1].end.row;)I--;M.fromOrientedRange(R[I]),M.index=I,this.selection=C.selection=M;var N=w.exec?w.exec(this,k||{}):w(this,k||{});!A&&N!==void 0&&(A=N),M.toOrientedRange(R[I])}M.detach(),this.selection=C.selection=O,this.inVirtualSelectionMode=!1,O._eventRegistry=E,O.mergeOverlappingRanges(),O.ranges[0]&&O.fromOrientedRange(O.ranges[0]);var L=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),L&&L.from==L.to&&this.renderer.animateScrolling(L.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],S=0;S0);O<0&&(O=0),_>=A&&(_=A-1)}var M=this.session.removeFullLines(O,_);M=this.$reAlignText(M,R),this.session.insert({row:O,column:0},M.join(` +`),row:R.row,column:R.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},T.prototype.removeGhostText=function(){if(this.$ghostText){var C=this.$ghostText.position;this.removeExtraToken(C.row,C.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function(C,I,_,R){var A=this.session;A.bgTokenizer.lines[_]=null;var E={type:I,value:C},M=A.getTokens(_);if(R==null||!M.length)M.push(E);else for(var O=0,N=0;N1||Math.abs(C.$size.height-R)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,i.implement(S.prototype,b),a.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},showFoldedAnnotations:{set:function(T){this.$gutterLayer.$showFoldedAnnotations=T},initialValue:!1},fadeFoldWidgets:{set:function(T){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/net"),l=n("../lib/event_emitter").EventEmitter,a=n("../config");function u(f){var p="importScripts('"+s.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(p),m.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=u(f),g=window.URL||window.webkitURL,m=g.createObjectURL(p);return new Worker(m)}return new Worker(f)}var d=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,l),this.$createWorkerFromOldConfig=function(f,p,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(p,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var b={};f.forEach(function(w){b[w]=y(n.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:b,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return s.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,p.push(m)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(d.prototype);var h=function(f,p,g){var m=null,v=!1,y=Object.create(l),b=[],w=new d({messageBuffer:b,terminate:function(){},postMessage:function(x){b.push(x),m&&(v?setTimeout(k):k())}});w.setEmitSync=function(x){v=x};var k=function(){var x=b.shift();x.command?m[x.command].apply(m,x.args):x.event&&y._signal(x.event,x.data)};return y.postMessage=function(x){w.onMessage({data:x})},y.callback=function(x,S){this.postMessage({type:"call",id:S,data:x})},y.emit=function(x,S){this.postMessage({type:"event",name:x,data:S})},a.loadModule(["worker",p],function(x){for(m=new x[g](y);b.length;)k()}),w};r.UIWorkerClient=h,r.WorkerClient=d,r.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,o){var i=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,l=n("./lib/oop"),a=function(){function u(c,d,h,f,p,g){var m=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var c=this,d=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=h.addMarker(new i(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=d.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),h.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=c.addMarker(new i(h.row,h.column,h.row,h.column+d.length),d.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c=this.pos.column&&d.start.column<=this.pos.column+this.length+1,p=d.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=h),f&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.remove(new i(v.row,v.column,v.row,v.column-h))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,h=function(p,g){d.removeMarker(p.markerId),p.markerId=d.addMarker(new i(p.row,p.column,p.row,p.column+c.length),g,null,!1)};h(this.pos,this.mainClass);for(var f=this.others.length;f--;)h(this.others[f],this.othersClass)}},u.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,h=0;h1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new i(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,o){var i=n("./range_list").RangeList,s=n("./range").Range,l=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,u=n("./lib/event"),c=n("./lib/lang"),d=n("./commands/multi_select_commands");r.commands=d.defaultCommands.concat(d.multiSelectCommands);var h=n("./search").Search,f=new h;function p(w,k,x){return f.$options.wrap=!0,f.$options.needle=k,f.$options.backwards=x==-1,f.find(w)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,k){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}w.cursor||(w.cursor=w.end);var S=this.rangeList.add(w);return this.$onAddRange(w),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var k=this.rangeList.substractPoint(w);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();w.push(k),this.rangeCount=0}for(var x=w.length;x--;){var S=this.ranges.indexOf(w[x]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x1){var w=this.rangeList.ranges,k=w[w.length-1],x=s.fromPoints(w[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var S=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(S,T);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,k,x){var S=[],T=w.column0;)$--;if($>0)for(var D=0;S[D].isEmpty();)D++;for(var F=$;F>=D;F--)S[F].isEmpty()&&S.splice(F,1)}return S}}).call(l.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var k=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",k),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var k=this.session.$selectionMarkers.indexOf(w);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var k=this.session.$selectionMarkers,x=w.length;x--;){var S=w[x];if(S.marker){this.session.removeMarker(S.marker);var T=k.indexOf(S);T!=-1&&k.splice(T,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var k=w.command,x=w.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?S=x.forEachSelection(k,w.args):k.multiSelectAction=="forEachLine"?S=x.forEachSelection(k,w.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),S=k.exec(x,w.args||{})):S=k.multiSelectAction(x,w.args||{});else{var S=k.exec(x,w.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(w,k,x){if(!this.inVirtualSelectionMode){var S=x&&x.keepOrder,T=x==!0||x&&x.$byLines,C=this.session,I=this.selection,_=I.rangeList,R=(S?I:_).ranges,A;if(!R.length)return w.exec?w.exec(this,k||{}):w(this,k||{});var E=I._eventRegistry;I._eventRegistry={};var M=new l(C);this.inVirtualSelectionMode=!0;for(var O=R.length;O--;){if(T)for(;O>0&&R[O].start.row==R[O-1].end.row;)O--;M.fromOrientedRange(R[O]),M.index=O,this.selection=C.selection=M;var N=w.exec?w.exec(this,k||{}):w(this,k||{});!A&&N!==void 0&&(A=N),M.toOrientedRange(R[O])}M.detach(),this.selection=C.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=E,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var L=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),L&&L.from==L.to&&this.renderer.animateScrolling(L.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],S=0;S0);I<0&&(I=0),_>=A&&(_=A-1)}var M=this.session.removeFullLines(I,_);M=this.$reAlignText(M,R),this.session.insert({row:I,column:0},M.join(` `)+` -`),R||(C.start.column=0,C.end.column=M[M.length-1].length),this.selection.setRange(C)}else{T.forEach(function($){k.substractPoint($.cursor)});var I=0,N=1/0,L=x.map(function($){var D=$.cursor,F=w.getLine(D.row),U=F.substr(D.column).search(/\S/g);return U==-1&&(U=0),D.column>I&&(I=D.column),UW?w.insert(F,c.stringRepeat(" ",U-W)):w.remove(new s(F.row,F.column,F.row,F.column-U+W)),$.start.column=$.end.column=I,$.start.row=$.end.row=F.row,$.cursor=$.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,k){var x=!0,S=!0,T,C,O;return w.map(function(M){var I=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?T==null?(T=I[1].length,C=I[2].length,O=I[3].length,I):(T+C+O!=I[1].length+I[2].length+I[3].length&&(S=!1),T!=I[1].length&&(x=!1),T>I[1].length&&(T=I[1].length),CI[3].length&&(O=I[3].length),I):[M]}).map(k?R:x?S?A:R:E);function _(M){return c.stringRepeat(" ",M)}function R(M){return M[2]?_(T)+M[2]+_(C-M[2].length+O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function A(M){return M[2]?_(T+C-M[2].length)+M[2]+_(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function E(M){return M[2]?_(T)+M[2]+_(O)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(m.prototype);function v(w,k){return w.row==k.row&&w.column==k.column}r.onSessionChange=function(w){var k=w.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=w.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=r.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(d.defaultCommands),b(w))}function b(w){if(!w.textInput)return;var k=w.textInput.getElement(),x=!1;u.addListener(k,"keydown",function(T){var C=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);w.$blockSelectEnabled&&C?x||(w.renderer.setMouseCursor("crosshair"),x=!0):x&&S()},w),u.addListener(k,"keyup",S,w),u.addListener(k,"blur",S,w);function S(T){x&&(w.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(w){y(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,o){var i=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,u){var c=l.getLine(u);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(l,a,u){return null},this.indentationBlock=function(l,a,u){var c=/\S/,d=l.getLine(a),h=d.search(c);if(h!=-1){for(var f=u||d.length,p=l.getLength(),g=a,m=a;++ag){var b=l.getLine(m).length;return new i(g,f,m,b)}}},this.openingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c+1},f=l.$findClosingBracket(a,h,d);if(f){var p=l.foldWidgets[f.row];return p==null&&(p=l.getFoldWidget(f.row)),p=="start"&&f.row>h.row&&(f.row--,f.column=l.getLine(f.row).length),i.fromPoints(h,f)}},this.closingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c},f=l.$findOpeningBracket(a,h);if(f)return f.column++,h.column--,i.fromPoints(f,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,o){var i=n("../line_widgets").LineWidgets,s=n("../lib/dom"),l=n("../range").Range,a=n("../config").nls;function u(d,h,f){for(var p=0,g=d.length-1;p<=g;){var m=p+g>>1,v=f(h,d[m]);if(v>0)p=m+1;else if(v<0)g=m-1;else return m}return-(p+1)}function c(d,h,f){var p=d.getAnnotations().sort(l.comparePoints);if(p.length){var g=u(p,{row:h,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var m=p[g];if(!(!m||!f)){if(m.row===h){do m=p[g+=f];while(m&&m.row===h);if(!m)return p.slice()}var v=[];h=m.row;do v[f<0?"unshift":"push"](m),m=p[g+=f];while(m&&m.row==h);return v.length&&v}}}r.showErrorMarker=function(d,h){var f=d.session;f.widgetManager||(f.widgetManager=new i(f),f.widgetManager.attach(d));var p=d.getCursorPosition(),g=p.row,m=f.widgetManager.getWidgetsAtRow(g).filter(function(C){return C.type=="errorMarker"})[0];m?m.destroy():g-=h;var v=c(f,g,h),y;if(v){var b=v[0];p.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,p.row=b.row,y=d.renderer.$gutterLayer.$annotations[p.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}d.session.unfold(p.row),d.selection.moveToPosition(p);var w={row:p.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},k=w.el.appendChild(s.createElement("div")),x=w.el.appendChild(s.createElement("div"));x.className="error_widget_arrow "+y.className;var S=d.renderer.$cursorLayer.getPixelPosition(p).left;x.style.left=S+d.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",k.className="error_widget "+y.className,k.innerHTML=y.text.join("
    "),k.appendChild(s.createElement("div"));var T=function(C,O,_){if(O===0&&(_==="esc"||_==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(T),f.widgetManager.removeLineWidget(w),d.off("changeSelection",w.destroy),d.off("changeSession",w.destroy),d.off("mouseup",w.destroy),d.off("change",w.destroy))},d.keyBinding.addKeyboardHandler(T),d.on("changeSelection",w.destroy),d.on("changeSession",w.destroy),d.on("mouseup",w.destroy),d.on("change",w.destroy),d.session.widgetManager.addLineWidget(w),w.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},s.importCssString(` +`),R||(C.start.column=0,C.end.column=M[M.length-1].length),this.selection.setRange(C)}else{T.forEach(function($){k.substractPoint($.cursor)});var O=0,N=1/0,L=x.map(function($){var D=$.cursor,F=w.getLine(D.row),U=F.substr(D.column).search(/\S/g);return U==-1&&(U=0),D.column>O&&(O=D.column),UW?w.insert(F,c.stringRepeat(" ",U-W)):w.remove(new s(F.row,F.column,F.row,F.column-U+W)),$.start.column=$.end.column=O,$.start.row=$.end.row=F.row,$.cursor=$.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,k){var x=!0,S=!0,T,C,I;return w.map(function(M){var O=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return O?T==null?(T=O[1].length,C=O[2].length,I=O[3].length,O):(T+C+I!=O[1].length+O[2].length+O[3].length&&(S=!1),T!=O[1].length&&(x=!1),T>O[1].length&&(T=O[1].length),CO[3].length&&(I=O[3].length),O):[M]}).map(k?R:x?S?A:R:E);function _(M){return c.stringRepeat(" ",M)}function R(M){return M[2]?_(T)+M[2]+_(C-M[2].length+I)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function A(M){return M[2]?_(T+C-M[2].length)+M[2]+_(I)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}function E(M){return M[2]?_(T)+M[2]+_(I)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(m.prototype);function v(w,k){return w.row==k.row&&w.column==k.column}r.onSessionChange=function(w){var k=w.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=w.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=r.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(d.defaultCommands),b(w))}function b(w){if(!w.textInput)return;var k=w.textInput.getElement(),x=!1;u.addListener(k,"keydown",function(T){var C=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);w.$blockSelectEnabled&&C?x||(w.renderer.setMouseCursor("crosshair"),x=!0):x&&S()},w),u.addListener(k,"keyup",S,w),u.addListener(k,"blur",S,w);function S(T){x&&(w.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(w){y(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,o){var i=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,u){var c=l.getLine(u);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(l,a,u){return null},this.indentationBlock=function(l,a,u){var c=/\S/,d=l.getLine(a),h=d.search(c);if(h!=-1){for(var f=u||d.length,p=l.getLength(),g=a,m=a;++ag){var b=l.getLine(m).length;return new i(g,f,m,b)}}},this.openingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c+1},f=l.$findClosingBracket(a,h,d);if(f){var p=l.foldWidgets[f.row];return p==null&&(p=l.getFoldWidget(f.row)),p=="start"&&f.row>h.row&&(f.row--,f.column=l.getLine(f.row).length),i.fromPoints(h,f)}},this.closingBracketBlock=function(l,a,u,c,d){var h={row:u,column:c},f=l.$findOpeningBracket(a,h);if(f)return f.column++,h.column--,i.fromPoints(f,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,o){var i=n("../line_widgets").LineWidgets,s=n("../lib/dom"),l=n("../range").Range,a=n("../config").nls;function u(d,h,f){for(var p=0,g=d.length-1;p<=g;){var m=p+g>>1,v=f(h,d[m]);if(v>0)p=m+1;else if(v<0)g=m-1;else return m}return-(p+1)}function c(d,h,f){var p=d.getAnnotations().sort(l.comparePoints);if(p.length){var g=u(p,{row:h,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var m=p[g];if(!(!m||!f)){if(m.row===h){do m=p[g+=f];while(m&&m.row===h);if(!m)return p.slice()}var v=[];h=m.row;do v[f<0?"unshift":"push"](m),m=p[g+=f];while(m&&m.row==h);return v.length&&v}}}r.showErrorMarker=function(d,h){var f=d.session;f.widgetManager||(f.widgetManager=new i(f),f.widgetManager.attach(d));var p=d.getCursorPosition(),g=p.row,m=f.widgetManager.getWidgetsAtRow(g).filter(function(C){return C.type=="errorMarker"})[0];m?m.destroy():g-=h;var v=c(f,g,h),y;if(v){var b=v[0];p.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,p.row=b.row,y=d.renderer.$gutterLayer.$annotations[p.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}d.session.unfold(p.row),d.selection.moveToPosition(p);var w={row:p.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},k=w.el.appendChild(s.createElement("div")),x=w.el.appendChild(s.createElement("div"));x.className="error_widget_arrow "+y.className;var S=d.renderer.$cursorLayer.getPixelPosition(p).left;x.style.left=S+d.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",k.className="error_widget "+y.className,k.innerHTML=y.text.join("
    "),k.appendChild(s.createElement("div"));var T=function(C,I,_){if(I===0&&(_==="esc"||_==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(T),f.widgetManager.removeLineWidget(w),d.off("changeSelection",w.destroy),d.off("changeSession",w.destroy),d.off("mouseup",w.destroy),d.off("change",w.destroy))},d.keyBinding.addKeyboardHandler(T),d.on("changeSelection",w.destroy),d.on("changeSession",w.destroy),d.on("mouseup",w.destroy),d.on("change",w.destroy),d.session.widgetManager.addLineWidget(w),w.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},s.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; @@ -6076,26 +6086,26 @@ ${u} border-left-color: transparent!important; top: -5px; } -`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,o){n("./loader_build")(r);var i=n("./lib/dom"),s=n("./range").Range,l=n("./editor").Editor,a=n("./edit_session").EditSession,u=n("./undomanager").UndoManager,c=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(d,h){if(typeof d=="string"){var f=d;if(d=document.getElementById(f),!d)throw new Error("ace.edit can't find div #"+f)}if(d&&d.env&&d.env.editor instanceof l)return d.env.editor;var p="";if(d&&/input|textarea/i.test(d.tagName)){var g=d;p=g.value,d=i.createElement("pre"),g.parentNode.replaceChild(d,g)}else d&&(p=d.textContent,d.innerHTML="");var m=r.createEditSession(p),v=new l(new c(d),m,h),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return g&&(y.textarea=g),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},r.createEditSession=function(d,h){var f=new a(d,h);return f.setUndoManager(new u),f},r.Range=s,r.Editor=l,r.EditSession=a,r.UndoManager=u,r.VirtualRenderer=c,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var o in n)n.hasOwnProperty(o)&&(r.ace[o]=n[o]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()})(h$);var Jg=h$.exports,em={exports:{}};em.exports;(function(t,e){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,l="[object Arguments]",a="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",k="[object RegExp]",x="[object Set]",S="[object String]",T="[object Symbol]",C="[object Undefined]",O="[object WeakMap]",_="[object ArrayBuffer]",R="[object DataView]",A="[object Float32Array]",E="[object Float64Array]",M="[object Int8Array]",I="[object Int16Array]",N="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",F="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,H={};H[A]=H[E]=H[M]=H[I]=H[N]=H[L]=H[$]=H[D]=H[F]=!0,H[l]=H[a]=H[_]=H[c]=H[R]=H[d]=H[h]=H[f]=H[g]=H[m]=H[y]=H[k]=H[x]=H[S]=H[O]=!1;var V=typeof ut=="object"&&ut&&ut.Object===Object&&ut,Y=typeof self=="object"&&self&&self.Object===Object&&self,X=V||Y||Function("return this")(),Z=e&&!e.nodeType&&e,te=Z&&!0&&t&&!t.nodeType&&t,ce=te&&te.exports===Z,Ne=ce&&V.process,ye=function(){try{return Ne&&Ne.binding&&Ne.binding("util")}catch{}}(),Me=ye&&ye.isTypedArray;function Ce(z,G){for(var J=-1,fe=z==null?0:z.length,Ct=0,De=[];++J-1}function Bv(z,G){var J=this.__data__,fe=mf(J,z);return fe<0?(++this.size,J.push([z,G])):J[fe][1]=G,this}eo.prototype.clear=pf,eo.prototype.delete=Pv,eo.prototype.get=zv,eo.prototype.has=Fv,eo.prototype.set=Bv;function $e(z){var G=-1,J=z==null?0:z.length;for(this.clear();++Gpn))return!1;var $t=De.get(z);if($t&&De.get(G))return $t==G;var Ir=-1,To=!0,Fn=J&i?new gf:void 0;for(De.set(z,G),De.set(G,z);++Ir-1&&z%1==0&&z-1&&z%1==0&&z<=s}function jE(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function ku(z){return z!=null&&typeof z=="object"}var GE=Me?qn(Me):B$;function e4(z){return Q$(z)?D$(z):H$(z)}function t4(){return[]}function n4(){return!1}t.exports=J$})(em,em.exports);var f$=em.exports,zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.getAceInstance=zo.debounce=zo.editorEvents=zo.editorOptions=void 0;var Tfe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];zo.editorOptions=Tfe;var Afe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];zo.editorEvents=Afe;var _fe=function(){var t;return typeof window>"u"?(ut.window={},t=Jg,delete ut.window):window.ace?(t=window.ace,t.acequire=window.ace.require||window.ace.acequire):t=Jg,t};zo.getAceInstance=_fe;var Rfe=function(t,e){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){t.apply(r,o)},e)}};zo.debounce=Rfe;var Mfe=ut&&ut.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rb=ut&&ut.__assign||function(){return rb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&this.handleMarkers(x);var O=this.editor.$options;tc.editorOptions.forEach(function(_){O.hasOwnProperty(_)?n.editor.setOption(_,n.props[_]):n.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(_){typeof _.exec=="string"?n.editor.commands.bindKey(_.bindKey,_.exec):n.editor.commands.addCommand(_)}),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),o&&(this.refEditor.className+=" "+o),b&&b(this.editor),this.editor.resize(),a&&this.editor.focus()},e.prototype.componentDidUpdate=function(n){for(var r=n,o=this.props,i=0;i 0!";if(d!=this.$splits){if(d>this.$splits){for(;this.$splitsd;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(d){return this.$editors[d]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(d){this.$editors.forEach(function(h){h.setTheme(d)})},this.setKeyboardHandler=function(d){this.$editors.forEach(function(h){h.setKeyboardHandler(d)})},this.forEach=function(d,h){this.$editors.forEach(d,h)},this.$fontSize="",this.setFontSize=function(d){this.$fontSize=d,this.forEach(function(h){h.setFontSize(d)})},this.$cloneSession=function(d){var h=new u(d.getDocument(),d.getMode()),f=d.getUndoManager();return h.setUndoManager(f),h.setTabSize(d.getTabSize()),h.setUseSoftTabs(d.getUseSoftTabs()),h.setOverwrite(d.getOverwrite()),h.setBreakpoints(d.getBreakpoints()),h.setUseWrapMode(d.getUseWrapMode()),h.setUseWorker(d.getUseWorker()),h.setWrapLimitRange(d.$wrapLimitRange.min,d.$wrapLimitRange.max),h.$foldData=d.$cloneFoldData(),h},this.setSession=function(d,h){var f;h==null?f=this.$cEditor:f=this.$editors[h];var p=this.$editors.some(function(g){return g.session===d});return p&&(d=this.$cloneSession(d)),f.setSession(d),d},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(d){this.$orientation!=d&&(this.$orientation=d,this.resize())},this.resize=function(){var d=this.$container.clientWidth,h=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=d/this.$splits,g=0;g-1}function cpe(t,e){var n=this.__data__,r=Mv(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}yu.prototype.clear=ipe;yu.prototype.delete=spe;yu.prototype.get=ape;yu.prototype.has=lpe;yu.prototype.set=cpe;function Cl(t){var e=-1,n=t?t.length:0;for(this.clear();++e0&&n.handleMarkers(L,R);for(var E=0;E"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(o,i)]:[];typeof l>"u"&&(l=!0);var c=l,d=this.diff_commonPrefix(i,s),h=i.substring(0,d);i=i.substring(d),s=s.substring(d),d=this.diff_commonSuffix(i,s);var f=i.substring(i.length-d);i=i.substring(0,i.length-d),s=s.substring(0,s.length-d);var p=this.diff_compute_(i,s,c,u);return h&&p.unshift(new e.Diff(o,h)),f&&p.push(new e.Diff(o,f)),this.diff_cleanupMerge(p),p},e.prototype.diff_compute_=function(i,s,l,a){var u;if(!i)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,i)];var c=i.length>s.length?i:s,d=i.length>s.length?s:i,h=c.indexOf(d);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(o,d),new e.Diff(r,c.substring(h+d.length))],i.length>s.length&&(u[0][0]=u[2][0]=n),u;if(d.length==1)return[new e.Diff(n,i),new e.Diff(r,s)];var f=this.diff_halfMatch_(i,s);if(f){var p=f[0],g=f[1],m=f[2],v=f[3],y=f[4],b=this.diff_main(p,m,l,a),w=this.diff_main(g,v,l,a);return b.concat([new e.Diff(o,y)],w)}return l&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,a):this.diff_bisect_(i,s,a)},e.prototype.diff_lineMode_=function(i,s,l){var a=this.diff_linesToChars_(i,s);i=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(i,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(o,""));for(var d=0,h=0,f=0,p="",g="";d=1&&f>=1){c.splice(d-h-f,h+f),d=d-h-f;for(var m=this.diff_main(p,g,!1,l),v=m.length-1;v>=0;v--)c.splice(d,0,m[v]);d=d+m.length}f=0,h=0,p="",g="";break}d++}return c.pop(),c},e.prototype.diff_bisect_=function(i,s,l){for(var a=i.length,u=s.length,c=Math.ceil((a+u)/2),d=c,h=2*c,f=new Array(h),p=new Array(h),g=0;gl);x++){for(var S=-x+y;S<=x-b;S+=2){var T=d+S,C;S==-x||S!=x&&f[T-1]a)b+=2;else if(O>u)y+=2;else if(v){var _=d+m-S;if(_>=0&&_=R)return this.diff_bisectSplit_(i,s,C,O,l)}}}for(var A=-x+w;A<=x-k;A+=2){var _=d+A,R;A==-x||A!=x&&p[_-1]a)k+=2;else if(E>u)w+=2;else if(!v){var T=d+m-A;if(T>=0&&T=R)return this.diff_bisectSplit_(i,s,C,O,l)}}}}return[new e.Diff(n,i),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(i,s,l,a,u){var c=i.substring(0,l),d=s.substring(0,a),h=i.substring(l),f=s.substring(a),p=this.diff_main(c,d,!1,u),g=this.diff_main(h,f,!1,u);return p.concat(g)},e.prototype.diff_linesToChars_=function(i,s){var l=[],a={};l[0]="";function u(f){for(var p="",g=0,m=-1,v=l.length;ma?i=i.substring(l-a):ls.length?i:s,a=i.length>s.length?s:i;if(l.length<4||a.length*2=b.length?[C,O,_,R,T]:null}var d=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),f;if(!d&&!h)return null;h?d?f=d[4].length>h[4].length?d:h:f=h:f=d;var p,g,m,v;i.length>s.length?(p=f[0],g=f[1],m=f[2],v=f[3]):(m=f[0],v=f[1],p=f[2],g=f[3]);var y=f[4];return[p,g,m,v,y]},e.prototype.diff_cleanupSemantic=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=0,h=0,f=0,p=0;c0?l[a-1]:-1,d=0,h=0,f=0,p=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),c=1;c=y?(v>=g.length/2||v>=m.length/2)&&(i.splice(c,0,new e.Diff(o,m.substring(0,v))),i[c-1][1]=g.substring(0,g.length-v),i[c+1][1]=m.substring(v),c++):(y>=g.length/2||y>=m.length/2)&&(i.splice(c,0,new e.Diff(o,g.substring(0,y))),i[c-1][0]=r,i[c-1][1]=m.substring(0,m.length-y),i[c+1][0]=n,i[c+1][1]=g.substring(y),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(i){function s(y,b){if(!y||!b)return 6;var w=y.charAt(y.length-1),k=b.charAt(0),x=w.match(e.nonAlphaNumericRegex_),S=k.match(e.nonAlphaNumericRegex_),T=x&&w.match(e.whitespaceRegex_),C=S&&k.match(e.whitespaceRegex_),O=T&&w.match(e.linebreakRegex_),_=C&&k.match(e.linebreakRegex_),R=O&&y.match(e.blanklineEndRegex_),A=_&&b.match(e.blanklineStartRegex_);return R||A?5:O||_?4:x&&!T&&C?3:T||C?2:x||S?1:0}for(var l=1;l=m&&(m=v,f=a,p=u,g=c)}i[l-1][1]!=f&&(f?i[l-1][1]=f:(i.splice(l-1,1),l--),i[l][1]=p,g?i[l+1][1]=g:(i.splice(l+1,1),l--))}l++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=!1,h=!1,f=!1,p=!1;c0?l[a-1]:-1,f=p=!1),s=!0)),c++;s&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(o,""));for(var s=0,l=0,a=0,u="",c="",d;s1?(l!==0&&a!==0&&(d=this.diff_commonPrefix(c,u),d!==0&&(s-l-a>0&&i[s-l-a-1][0]==o?i[s-l-a-1][1]+=c.substring(0,d):(i.splice(0,0,new e.Diff(o,c.substring(0,d))),s++),c=c.substring(d),u=u.substring(d)),d=this.diff_commonSuffix(c,u),d!==0&&(i[s][1]=c.substring(c.length-d)+i[s][1],c=c.substring(0,c.length-d),u=u.substring(0,u.length-d))),s-=l+a,i.splice(s,l+a),u.length&&(i.splice(s,0,new e.Diff(n,u)),s++),c.length&&(i.splice(s,0,new e.Diff(r,c)),s++),s++):s!==0&&i[s-1][0]==o?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,a=0,l=0,u="",c="";break}i[i.length-1][1]===""&&i.pop();var h=!1;for(s=1;ss));d++)u=l,c=a;return i.length!=d&&i[d][0]===n?c:c+(s-u)},e.prototype.diff_prettyHtml=function(i){for(var s=[],l=/&/g,a=//g,c=/\n/g,d=0;d");switch(h){case r:s[d]=''+p+"";break;case n:s[d]=''+p+"";break;case o:s[d]=""+p+"";break}}return s.join("")},e.prototype.diff_text1=function(i){for(var s=[],l=0;lthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(C,O){var _=C/s.length,R=Math.abs(l-O);return u.Match_Distance?_+R/u.Match_Distance:R?1:_}var d=this.Match_Threshold,h=i.indexOf(s,l);h!=-1&&(d=Math.min(c(0,h),d),h=i.lastIndexOf(s,l+s.length),h!=-1&&(d=Math.min(c(0,h),d)));var f=1<=b;x--){var S=a[i.charAt(x-1)];if(y===0?k[x]=(k[x+1]<<1|1)&S:k[x]=(k[x+1]<<1|1)&S|((v[x+1]|v[x])<<1|1)|v[x+1],k[x]&f){var T=c(y,x-1);if(T<=d)if(d=T,h=x-1,h>l)b=Math.max(1,2*l-h);else break}}if(c(y+1,l)>d)break;v=k}return h},e.prototype.match_alphabet_=function(i){for(var s={},l=0;l"u")a=i,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof l>"u")u=i,a=this.diff_text1(u);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof l>"u")a=i,u=s;else if(typeof i=="string"&&typeof s=="string"&&l&&typeof l=="object")a=i,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],d=new e.patch_obj,h=0,f=0,p=0,g=a,m=a,v=0;v=2*this.Patch_Margin&&h&&(this.patch_addContext_(d,g),c.push(d),d=new e.patch_obj,h=0,g=m,f=p);break}y!==r&&(f+=b.length),y!==n&&(p+=b.length)}return h&&(this.patch_addContext_(d,g),c.push(d)),c},e.prototype.patch_deepCopy=function(i){for(var s=[],l=0;lthis.Match_MaxBits?(f=this.match_main(s,h.substring(0,this.Match_MaxBits),d),f!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),d+h.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(s,h,d),f==-1)u[c]=!1,a-=i[c].length2-i[c].length1;else{u[c]=!0,a=f-d;var g;if(p==-1?g=s.substring(f,f+h.length):g=s.substring(f,p+this.Match_MaxBits),h==g)s=s.substring(0,f)+this.diff_text2(i[c].diffs)+s.substring(f+h.length);else{var m=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(m)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var v=0,y,b=0;bc[0][1].length){var d=s-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=d,u.start2-=d,u.length1+=d,u.length2+=d}if(u=i[i.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=o)c.push(new e.Diff(o,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var d=s-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,d),u.length1+=d,u.length2+=d}return l},e.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,l=0;l2*s?(h.length1+=g.length,u+=g.length,f=!1,h.diffs.push(new e.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,p===o?(h.length2+=g.length,c+=g.length):f=!1,h.diffs.push(new e.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}d=this.diff_text2(h.diffs),d=d.substring(d.length-this.Patch_Margin);var m=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);m!==""&&(h.length1+=m.length,h.length2+=m.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===o?h.diffs[h.diffs.length-1][1]+=m:h.diffs.push(new e.Diff(o,m))),f||i.splice(++l,0,h)}}},e.prototype.patch_toText=function(i){for(var s=[],l=0;l-1}function Vv(z,G){var J=this.__data__,fe=wf(J,z);return fe<0?(++this.size,J.push([z,G])):J[fe][1]=G,this}oo.prototype.clear=yf,oo.prototype.delete=Hv,oo.prototype.get=Uv,oo.prototype.has=Wv,oo.prototype.set=Vv;function $e(z){var G=-1,J=z==null?0:z.length;for(this.clear();++Ggn))return!1;var $t=Pe.get(z);if($t&&Pe.get(G))return $t==G;var $r=-1,_o=!0,Bn=J&i?new bf:void 0;for(Pe.set(z,G),Pe.set(G,z);++$r-1&&z%1==0&&z-1&&z%1==0&&z<=s}function qE(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function Cu(z){return z!=null&&typeof z=="object"}var ZE=Me?Zn(Me):X$;function c4(z){return a4(z)?j$(z):q$(z)}function u4(){return[]}function d4(){return!1}e.exports=l4})(om,om.exports);var k$=om.exports,Bo={};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.getAceInstance=Bo.debounce=Bo.editorEvents=Bo.editorOptions=void 0;var Vfe=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Bo.editorOptions=Vfe;var jfe=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Bo.editorEvents=jfe;var Gfe=function(){var e;return typeof window>"u"?(dt.window={},e=rm,delete dt.window):window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=rm,e};Bo.getAceInstance=Gfe;var Kfe=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}};Bo.debounce=Kfe;var Yfe=dt&&dt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ab=dt&&dt.__assign||function(){return ab=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&this.handleMarkers(x);var I=this.editor.$options;oc.editorOptions.forEach(function(_){I.hasOwnProperty(_)?n.editor.setOption(_,n.props[_]):n.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(_){typeof _.exec=="string"?n.editor.commands.bindKey(_.bindKey,_.exec):n.editor.commands.addCommand(_)}),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),o&&(this.refEditor.className+=" "+o),b&&b(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(n){for(var r=n,o=this.props,i=0;i 0!";if(d!=this.$splits){if(d>this.$splits){for(;this.$splitsd;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(d){return this.$editors[d]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(d){this.$editors.forEach(function(h){h.setTheme(d)})},this.setKeyboardHandler=function(d){this.$editors.forEach(function(h){h.setKeyboardHandler(d)})},this.forEach=function(d,h){this.$editors.forEach(d,h)},this.$fontSize="",this.setFontSize=function(d){this.$fontSize=d,this.forEach(function(h){h.setFontSize(d)})},this.$cloneSession=function(d){var h=new u(d.getDocument(),d.getMode()),f=d.getUndoManager();return h.setUndoManager(f),h.setTabSize(d.getTabSize()),h.setUseSoftTabs(d.getUseSoftTabs()),h.setOverwrite(d.getOverwrite()),h.setBreakpoints(d.getBreakpoints()),h.setUseWrapMode(d.getUseWrapMode()),h.setUseWorker(d.getUseWorker()),h.setWrapLimitRange(d.$wrapLimitRange.min,d.$wrapLimitRange.max),h.$foldData=d.$cloneFoldData(),h},this.setSession=function(d,h){var f;h==null?f=this.$cEditor:f=this.$editors[h];var p=this.$editors.some(function(g){return g.session===d});return p&&(d=this.$cloneSession(d)),f.setSession(d),d},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(d){this.$orientation!=d&&(this.$orientation=d,this.resize())},this.resize=function(){var d=this.$container.clientWidth,h=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=d/this.$splits,g=0;g-1}function Ape(e,t){var n=this.__data__,r=Nv(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}xu.prototype.clear=Epe;xu.prototype.delete=Spe;xu.prototype.get=Cpe;xu.prototype.has=Tpe;xu.prototype.set=Ape;function _l(e){var t=-1,n=e?e.length:0;for(this.clear();++t0&&n.handleMarkers(L,R);for(var E=0;E"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new t.Diff(o,i)]:[];typeof l>"u"&&(l=!0);var c=l,d=this.diff_commonPrefix(i,s),h=i.substring(0,d);i=i.substring(d),s=s.substring(d),d=this.diff_commonSuffix(i,s);var f=i.substring(i.length-d);i=i.substring(0,i.length-d),s=s.substring(0,s.length-d);var p=this.diff_compute_(i,s,c,u);return h&&p.unshift(new t.Diff(o,h)),f&&p.push(new t.Diff(o,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(i,s,l,a){var u;if(!i)return[new t.Diff(r,s)];if(!s)return[new t.Diff(n,i)];var c=i.length>s.length?i:s,d=i.length>s.length?s:i,h=c.indexOf(d);if(h!=-1)return u=[new t.Diff(r,c.substring(0,h)),new t.Diff(o,d),new t.Diff(r,c.substring(h+d.length))],i.length>s.length&&(u[0][0]=u[2][0]=n),u;if(d.length==1)return[new t.Diff(n,i),new t.Diff(r,s)];var f=this.diff_halfMatch_(i,s);if(f){var p=f[0],g=f[1],m=f[2],v=f[3],y=f[4],b=this.diff_main(p,m,l,a),w=this.diff_main(g,v,l,a);return b.concat([new t.Diff(o,y)],w)}return l&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,a):this.diff_bisect_(i,s,a)},t.prototype.diff_lineMode_=function(i,s,l){var a=this.diff_linesToChars_(i,s);i=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(i,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new t.Diff(o,""));for(var d=0,h=0,f=0,p="",g="";d=1&&f>=1){c.splice(d-h-f,h+f),d=d-h-f;for(var m=this.diff_main(p,g,!1,l),v=m.length-1;v>=0;v--)c.splice(d,0,m[v]);d=d+m.length}f=0,h=0,p="",g="";break}d++}return c.pop(),c},t.prototype.diff_bisect_=function(i,s,l){for(var a=i.length,u=s.length,c=Math.ceil((a+u)/2),d=c,h=2*c,f=new Array(h),p=new Array(h),g=0;gl);x++){for(var S=-x+y;S<=x-b;S+=2){var T=d+S,C;S==-x||S!=x&&f[T-1]a)b+=2;else if(I>u)y+=2;else if(v){var _=d+m-S;if(_>=0&&_=R)return this.diff_bisectSplit_(i,s,C,I,l)}}}for(var A=-x+w;A<=x-k;A+=2){var _=d+A,R;A==-x||A!=x&&p[_-1]a)k+=2;else if(E>u)w+=2;else if(!v){var T=d+m-A;if(T>=0&&T=R)return this.diff_bisectSplit_(i,s,C,I,l)}}}}return[new t.Diff(n,i),new t.Diff(r,s)]},t.prototype.diff_bisectSplit_=function(i,s,l,a,u){var c=i.substring(0,l),d=s.substring(0,a),h=i.substring(l),f=s.substring(a),p=this.diff_main(c,d,!1,u),g=this.diff_main(h,f,!1,u);return p.concat(g)},t.prototype.diff_linesToChars_=function(i,s){var l=[],a={};l[0]="";function u(f){for(var p="",g=0,m=-1,v=l.length;ma?i=i.substring(l-a):ls.length?i:s,a=i.length>s.length?s:i;if(l.length<4||a.length*2=b.length?[C,I,_,R,T]:null}var d=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),f;if(!d&&!h)return null;h?d?f=d[4].length>h[4].length?d:h:f=h:f=d;var p,g,m,v;i.length>s.length?(p=f[0],g=f[1],m=f[2],v=f[3]):(m=f[0],v=f[1],p=f[2],g=f[3]);var y=f[4];return[p,g,m,v,y]},t.prototype.diff_cleanupSemantic=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=0,h=0,f=0,p=0;c0?l[a-1]:-1,d=0,h=0,f=0,p=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),c=1;c=y?(v>=g.length/2||v>=m.length/2)&&(i.splice(c,0,new t.Diff(o,m.substring(0,v))),i[c-1][1]=g.substring(0,g.length-v),i[c+1][1]=m.substring(v),c++):(y>=g.length/2||y>=m.length/2)&&(i.splice(c,0,new t.Diff(o,g.substring(0,y))),i[c-1][0]=r,i[c-1][1]=m.substring(0,m.length-y),i[c+1][0]=n,i[c+1][1]=g.substring(y),c++),c++}c++}},t.prototype.diff_cleanupSemanticLossless=function(i){function s(y,b){if(!y||!b)return 6;var w=y.charAt(y.length-1),k=b.charAt(0),x=w.match(t.nonAlphaNumericRegex_),S=k.match(t.nonAlphaNumericRegex_),T=x&&w.match(t.whitespaceRegex_),C=S&&k.match(t.whitespaceRegex_),I=T&&w.match(t.linebreakRegex_),_=C&&k.match(t.linebreakRegex_),R=I&&y.match(t.blanklineEndRegex_),A=_&&b.match(t.blanklineStartRegex_);return R||A?5:I||_?4:x&&!T&&C?3:T||C?2:x||S?1:0}for(var l=1;l=m&&(m=v,f=a,p=u,g=c)}i[l-1][1]!=f&&(f?i[l-1][1]=f:(i.splice(l-1,1),l--),i[l][1]=p,g?i[l+1][1]=g:(i.splice(l+1,1),l--))}l++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,l=[],a=0,u=null,c=0,d=!1,h=!1,f=!1,p=!1;c0?l[a-1]:-1,f=p=!1),s=!0)),c++;s&&this.diff_cleanupMerge(i)},t.prototype.diff_cleanupMerge=function(i){i.push(new t.Diff(o,""));for(var s=0,l=0,a=0,u="",c="",d;s1?(l!==0&&a!==0&&(d=this.diff_commonPrefix(c,u),d!==0&&(s-l-a>0&&i[s-l-a-1][0]==o?i[s-l-a-1][1]+=c.substring(0,d):(i.splice(0,0,new t.Diff(o,c.substring(0,d))),s++),c=c.substring(d),u=u.substring(d)),d=this.diff_commonSuffix(c,u),d!==0&&(i[s][1]=c.substring(c.length-d)+i[s][1],c=c.substring(0,c.length-d),u=u.substring(0,u.length-d))),s-=l+a,i.splice(s,l+a),u.length&&(i.splice(s,0,new t.Diff(n,u)),s++),c.length&&(i.splice(s,0,new t.Diff(r,c)),s++),s++):s!==0&&i[s-1][0]==o?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,a=0,l=0,u="",c="";break}i[i.length-1][1]===""&&i.pop();var h=!1;for(s=1;ss));d++)u=l,c=a;return i.length!=d&&i[d][0]===n?c:c+(s-u)},t.prototype.diff_prettyHtml=function(i){for(var s=[],l=/&/g,a=//g,c=/\n/g,d=0;d");switch(h){case r:s[d]=''+p+"";break;case n:s[d]=''+p+"";break;case o:s[d]=""+p+"";break}}return s.join("")},t.prototype.diff_text1=function(i){for(var s=[],l=0;lthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(C,I){var _=C/s.length,R=Math.abs(l-I);return u.Match_Distance?_+R/u.Match_Distance:R?1:_}var d=this.Match_Threshold,h=i.indexOf(s,l);h!=-1&&(d=Math.min(c(0,h),d),h=i.lastIndexOf(s,l+s.length),h!=-1&&(d=Math.min(c(0,h),d)));var f=1<=b;x--){var S=a[i.charAt(x-1)];if(y===0?k[x]=(k[x+1]<<1|1)&S:k[x]=(k[x+1]<<1|1)&S|((v[x+1]|v[x])<<1|1)|v[x+1],k[x]&f){var T=c(y,x-1);if(T<=d)if(d=T,h=x-1,h>l)b=Math.max(1,2*l-h);else break}}if(c(y+1,l)>d)break;v=k}return h},t.prototype.match_alphabet_=function(i){for(var s={},l=0;l"u")a=i,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof l>"u")u=i,a=this.diff_text1(u);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof l>"u")a=i,u=s;else if(typeof i=="string"&&typeof s=="string"&&l&&typeof l=="object")a=i,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],d=new t.patch_obj,h=0,f=0,p=0,g=a,m=a,v=0;v=2*this.Patch_Margin&&h&&(this.patch_addContext_(d,g),c.push(d),d=new t.patch_obj,h=0,g=m,f=p);break}y!==r&&(f+=b.length),y!==n&&(p+=b.length)}return h&&(this.patch_addContext_(d,g),c.push(d)),c},t.prototype.patch_deepCopy=function(i){for(var s=[],l=0;lthis.Match_MaxBits?(f=this.match_main(s,h.substring(0,this.Match_MaxBits),d),f!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),d+h.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(s,h,d),f==-1)u[c]=!1,a-=i[c].length2-i[c].length1;else{u[c]=!0,a=f-d;var g;if(p==-1?g=s.substring(f,f+h.length):g=s.substring(f,p+this.Match_MaxBits),h==g)s=s.substring(0,f)+this.diff_text2(i[c].diffs)+s.substring(f+h.length);else{var m=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(m)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var v=0,y,b=0;bc[0][1].length){var d=s-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=d,u.start2-=d,u.length1+=d,u.length2+=d}if(u=i[i.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=o)c.push(new t.Diff(o,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var d=s-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,d),u.length1+=d,u.length2+=d}return l},t.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,l=0;l2*s?(h.length1+=g.length,u+=g.length,f=!1,h.diffs.push(new t.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,p===o?(h.length2+=g.length,c+=g.length):f=!1,h.diffs.push(new t.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}d=this.diff_text2(h.diffs),d=d.substring(d.length-this.Patch_Margin);var m=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);m!==""&&(h.length1+=m.length,h.length2+=m.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===o?h.diffs[h.diffs.length-1][1]+=m:h.diffs.push(new t.Diff(o,m))),f||i.splice(++l,0,h)}}},t.prototype.patch_toText=function(i){for(var s=[],l=0;l/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,o){var i=n("../config").$modes,s=n("../lib/oop"),l=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,u=n("./html_highlight_rules").HtmlHighlightRules,c=function(h){return"(?:[^"+l.escapeRegExp(h)+"\\\\]|\\\\.)*"},d=function(){u.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(p,g,m,v){var y=p.match(/^(\s*)([`~]+)(.*)/),b=/[\w-]+|$/.exec(y[3])[0];return i[b]||(b=""),m.unshift("githubblock",[],[y[1],y[2],b],g),this.token},next:"githubblock"},f=[{token:"support.function",regex:".*",onMatch:function(p,g,m,v){var y=m[1],b=m[2][0],w=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(p);if(x&&x[1].length=w.length&&x[2][0]==w[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&i[k]){var S=i[k].getTokenizer().getLineTokens(p,y.slice(0));return m[1]=S.state,S.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(p){return"markup.heading."+p.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:f}),this.normalizeRules()};s.inherits(d,a),r.MarkdownHighlightRules=d}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=n("../../range").Range,a=r.FoldMode=function(){};i.inherits(a,s),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);return this.foldingStartMarker.test(h)?h[0]=="`"&&u.bgTokenizer.getState(d)=="start"?"end":"start":""},this.getFoldWidgetRange=function(u,c,d){var h=u.getLine(d),f=h.length,p=u.getLength(),g=d,m=d;if(!h.match(this.foldingStartMarker))return;if(h[0]=="`")if(u.bgTokenizer.getState(d)!=="start"){for(;++d0&&(h=u.getLine(d),!(h[0]=="`"&h.substring(0,3)=="```")););return new l(d,h.length,g,0)}var v;function y(T){return v=u.getTokens(T)[0],v&&v.type.lastIndexOf(b,0)===0}var b="markup.heading";function w(){var T=v.value[0];return T=="="?6:T=="-"?5:7-v.value.search(/[^#]|$/)}if(y(d)){for(var k=w();++d=k)break}if(m=d-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(u.getLine(m));)m--;if(m>g){var S=u.getLine(m).length;return new l(g,f,m,S)}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` +`&&(h-=1),o.right.push({startLine:i.right,endLine:i.right+h}),i.right+=u;break;default:throw new Error("Diff type was not defined.")}}}),o},t.prototype.setCodeMarkers=function(n){n===void 0&&(n={left:[],right:[]});for(var r=[],o={left:[],right:[]},i=0;i/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,o){var i=n("../config").$modes,s=n("../lib/oop"),l=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,u=n("./html_highlight_rules").HtmlHighlightRules,c=function(h){return"(?:[^"+l.escapeRegExp(h)+"\\\\]|\\\\.)*"},d=function(){u.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(p,g,m,v){var y=p.match(/^(\s*)([`~]+)(.*)/),b=/[\w-]+|$/.exec(y[3])[0];return i[b]||(b=""),m.unshift("githubblock",[],[y[1],y[2],b],g),this.token},next:"githubblock"},f=[{token:"support.function",regex:".*",onMatch:function(p,g,m,v){var y=m[1],b=m[2][0],w=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(p);if(x&&x[1].length=w.length&&x[2][0]==w[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&i[k]){var S=i[k].getTokenizer().getLineTokens(p,y.slice(0));return m[1]=S.state,S.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(p){return"markup.heading."+p.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:f}),this.normalizeRules()};s.inherits(d,a),r.MarkdownHighlightRules=d}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=n("../../range").Range,a=r.FoldMode=function(){};i.inherits(a,s),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);return this.foldingStartMarker.test(h)?h[0]=="`"&&u.bgTokenizer.getState(d)=="start"?"end":"start":""},this.getFoldWidgetRange=function(u,c,d){var h=u.getLine(d),f=h.length,p=u.getLength(),g=d,m=d;if(!h.match(this.foldingStartMarker))return;if(h[0]=="`")if(u.bgTokenizer.getState(d)!=="start"){for(;++d0&&(h=u.getLine(d),!(h[0]=="`"&h.substring(0,3)=="```")););return new l(d,h.length,g,0)}var v;function y(T){return v=u.getTokens(T)[0],v&&v.type.lastIndexOf(b,0)===0}var b="markup.heading";function w(){var T=v.value[0];return T=="="?6:T=="-"?5:7-v.value.search(/[^#]|$/)}if(y(d)){for(var k=w();++d=k)break}if(m=d-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(u.getLine(m));)m--;if(m>g){var S=u.getLine(m).length;return new l(g,f,m,S)}}}}).call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` `){var g=h.getCursorPosition(),m=f.getLine(g.row),v=new l(f,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=f.getTokenAt(g.row,g.column+1),m=f.getLine(w),x=this.$getIndent(m),S=x+f.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",a=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var c=this.createKeywordMapper({keyword:l,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),d="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",f="(?:\\d+)",p="(?:(?:"+f+"?"+h+")|(?:"+f+"\\.))",g="(?:(?:"+p+"|"+f+"))",m="(?:"+g+"|"+p+")",v="(?:&"+f+")",y="[a-zA-Z_][a-zA-Z0-9_]*",b="(?:"+y+"(?==))",w="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(x,S,T){var C=x[2]=="-"?"indentedHeredoc":"heredoc",O=x.split(this.splitRegex);return T.push(C,O[4]),[{type:"constant",value:O[1]},{type:"text",value:O[2]},{type:"string",value:O[3]},{type:"support.class",value:O[4]},{type:"string",value:O[5]}]},rules:{heredoc:[{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,S){return S[0]==="heredoc"||S[0]==="indentedHeredoc"?S[0]:x}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:w},{token:"variable",regex:b},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:d+"\\b"},{token:c,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(u,s),r.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./sh_highlight_rules").ShHighlightRules,a=n("../range").Range,u=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=l,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};i.inherits(c,s),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,f,p){var g=this.$getIndent(f),m=this.getTokenizer().getLineTokens(f,h),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(h=="start"){var y=f.match(/^.*[\{\(\[:]\s*$/);y&&(g+=p)}return g};var d={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,f,p){if(p!==`\r +`+S}}}}})};i.inherits(u,s),r.XmlBehaviour=u}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=r.FoldMode=function(a,u){this.defaultMode=a,this.subModes=u};i.inherits(l,s),(function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var u in this.subModes)if(a.indexOf(u)===0)return this.subModes[u];return null},this.$tryMode=function(a,u,c,d){var h=this.$getMode(a);return h?h.getFoldWidget(u,c,d):""},this.getFoldWidget=function(a,u,c){return this.$tryMode(a.getState(c-1),a,u,c)||this.$tryMode(a.getState(c),a,u,c)||this.defaultMode.getFoldWidget(a,u,c)},this.getFoldWidgetRange=function(a,u,c){var d=this.$getMode(a.getState(c-1));return(!d||!d.getFoldWidget(a,u,c))&&(d=this.$getMode(a.getState(c))),(!d||!d.getFoldWidget(a,u,c))&&(d=this.defaultMode),d.getFoldWidgetRange(a,u,c)}}).call(l.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(d,h){l.call(this),this.voidElements=d||{},this.optionalEndTags=i.mixin({},this.voidElements),h&&i.mixin(this.optionalEndTags,h)};i.inherits(a,l);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(d,h){return d.type.lastIndexOf(h+".xml")>-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",a=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var c=this.createKeywordMapper({keyword:l,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),d="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",f="(?:\\d+)",p="(?:(?:"+f+"?"+h+")|(?:"+f+"\\.))",g="(?:(?:"+p+"|"+f+"))",m="(?:"+g+"|"+p+")",v="(?:&"+f+")",y="[a-zA-Z_][a-zA-Z0-9_]*",b="(?:"+y+"(?==))",w="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(x,S,T){var C=x[2]=="-"?"indentedHeredoc":"heredoc",I=x.split(this.splitRegex);return T.push(C,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,S,T){return x===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,S){return S[0]==="heredoc"||S[0]==="indentedHeredoc"?S[0]:x}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:w},{token:"variable",regex:b},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:d+"\\b"},{token:c,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};i.inherits(u,s),r.ShHighlightRules=u}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./sh_highlight_rules").ShHighlightRules,a=n("../range").Range,u=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=l,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};i.inherits(c,s),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,f,p){var g=this.$getIndent(f),m=this.getTokenizer().getLineTokens(f,h),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(h=="start"){var y=f.match(/^.*[\{\(\[:]\s*$/);y&&(g+=p)}return g};var d={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,f,p){if(p!==`\r `&&p!=="\r"&&p!==` -`)return!1;var g=this.getTokenizer().getLineTokens(f.trim(),h).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&d[m.value]:!1},this.autoOutdent=function(h,f,p){p+=1;var g=this.$getIndent(f.getLine(p)),m=f.getTabString();g.slice(-m.length)==m&&f.remove(new a(p,g.length-m.length,p,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,u=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,d=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=a,this.$behaviour=new u,this.foldingRules=new c};i.inherits(h,l),(function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(f){var p=new d(["ace"],"ace/mode/xml_worker","Worker");return p.attachToDocument(f.getDocument()),p.on("error",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,o){var i=n("../lib/oop"),s=n("./behaviour/cstyle").CstyleBehaviour,l=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,u=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new u,this.$behaviour=new s({braces:!0})};i.inherits(c,l),(function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(d,h,f){if(d=="listblock"){var p=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!p)return"";var g=p[2];return g||(g=parseInt(p[3],10)+1+"."),p[1]+g+p[4]}else return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()})(Vpe);var jpe={exports:{}};(function(t,e){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var f=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:f,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` +`)return!1;var g=this.getTokenizer().getLineTokens(f.trim(),h).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&d[m.value]:!1},this.autoOutdent=function(h,f,p){p+=1;var g=this.$getIndent(f.getLine(p)),m=f.getTabString();g.slice(-m.length)==m&&f.remove(new a(p,g.length-m.length,p,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,u=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,d=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=a,this.$behaviour=new u,this.foldingRules=new c};i.inherits(h,l),(function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(f){var p=new d(["ace"],"ace/mode/xml_worker","Worker");return p.attachToDocument(f.getDocument()),p.on("error",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,o){var i=n("../lib/oop"),s=n("./behaviour/cstyle").CstyleBehaviour,l=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,u=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new u,this.$behaviour=new s({braces:!0})};i.inherits(c,l),(function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(d,h,f){if(d=="listblock"){var p=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!p)return"";var g=p[2];return g||(g=parseInt(p[3],10)+1+"."),p[1]+g+p[4]}else return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){e&&(e.exports=n)})}()})(lge);var cge={exports:{}};(function(e,t){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},l.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(l,s),l.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},l.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},l.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},r.JsDocCommentHighlightRules=l}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,l=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",u=function(h){var f=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),d("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:f,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),d("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[d("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=!1)&&c.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(u,l);function c(){var h=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,d("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function d(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,o){var i=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var u=l.getLine(a),c=u.match(/^(\s*\})/);if(!c)return 0;var d=c[1].length,h=l.findMatchingBracket({row:a,column:d});if(!h||h.row==a)return 0;var f=this.$getIndent(l.getLine(h.row));l.replace(new i(a,0,a,d-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};i.inherits(a,l),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,c,d){var h=u.getLine(d);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(u,c,d);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(u,c,d,h){var f=u.getLine(d);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,d);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(u,m[1],d,p);var g=u.getCommentFoldRange(d,p+m[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(u,d):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(u,m[1],d,p):u.getCommentFoldRange(d,p,-1)}}},this.getSectionRange=function(u,c){var d=u.getLine(c),h=d.search(/\S/),f=c,p=d.length;c=c+1;for(var g=c,m=u.getLength();++cv)break;var y=this.getFoldWidgetRange(u,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(h==v)break}g=c}}return new s(f,p,g,u.getLine(g).length)},this.getCommentRegionBlock=function(u,c,d){for(var h=c.search(/\s*$/),f=u.getLength(),p=d,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++dp)return new s(p,h,y,c.length)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,d=n("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new d};i.inherits(h,s),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,b=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var w=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);w&&(m+=g)}else if(f=="doc-start"){if(b=="start"||b=="no_regex")return"";var w=p.match(/^\s*(\/?)\*/);w&&(w[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop");n("../lib/lang");var s=n("./text_highlight_rules").TextHighlightRules,l=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=r.supportFunction="rgb|rgba|url|attr|counter|counters",u=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",d=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":u,"support.type":l,"support.constant.color":c,"support.constant.fonts":d},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+h+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};i.inherits(g,s),r.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,o){var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var u=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});i.hasOwnProperty(u)||(i[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,u,c){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var d=a.getLine(u.row).substr(0,u.column),h=/\([^)]*$/.test(d);return h&&(d=d.substr(d.lastIndexOf("(")+1)),/:[^;]+$/.test(d)?this.getPropertyValueCompletions(l,a,u,c):this.getPropertyCompletions(l,a,u,c,h)}return[]},this.getPropertyCompletions=function(l,a,u,c,d){d=d||!1;var h=Object.keys(i);return h.map(function(f){return{caption:f,snippet:f+": $0"+(d?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,u,c){var d=a.getLine(u.row).substr(0,u.column),h=(/([\w\-]+):[^:]*$/.exec(d)||{})[1];if(!h)return[];var f=[];return h in i&&typeof i[h]=="object"&&(f=Object.keys(i[h])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(s.prototype),r.CssCompletions=s}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,o){var i=n("../../lib/oop");n("../behaviour").Behaviour;var s=n("./cstyle").CstyleBehaviour,l=n("../../token_iterator").TokenIterator,a=function(){this.inherit(s),this.add("colon","insertion",function(u,c,d,h,f){if(f===":"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=new l(h,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=h.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,c,d,h,f){var p=h.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=d.getCursorPosition(),m=new l(h,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=h.doc.getLine(f.start.row),b=y.substring(f.end.column,f.end.column+1);if(b===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(u,c,d,h,f){if(f===";"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,c,d,h,f){if(f==="!"&&d.selection.isEmpty()){var p=d.getCursorPosition(),g=h.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};i.inherits(a,s),r.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,o){var i=n("../lib/oop"),s=n("./text").Mode,l=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,u=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,d=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new d,this.$completer=new c,this.foldingRules=new h};i.inherits(f,s),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var b=g.match(/^.*\{\s*$/);return b&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new u(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),r.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,l=function(a){var u="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+u+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+u+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,u,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:u+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(d,h,f){return f.splice(0),this.token}}],this.embedRules(a,u,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(s.prototype),i.inherits(l,s),r.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./xml_highlight_rules").XmlHighlightRules,c=s.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),d=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,f){var p=c[f];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===d&&this.normalizeRules()};i.inherits(d,u),r.HtmlHighlightRules=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,o){var i=n("../../lib/oop"),s=n("../behaviour").Behaviour,l=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,d){return c&&c.type.lastIndexOf(d+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(c,d,h,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=h.getCursorPosition(),y=f.doc.getLine(v.row),b=y.substring(v.column,v.column+1),w=new l(f,v.row,v.column),k=w.getCurrentToken();if(b==g&&(a(k,"attribute-value")||a(k,"string")))return{text:"",selection:[1,1]};if(k||(k=w.stepBackward()),!k)return;for(;a(k,"tag-whitespace")||a(k,"whitespace");)k=w.stepBackward();var x=!b||b.match(/\s/);if(a(k,"attribute-equals")&&(x||b==">")||a(k,"decl-attribute-equals")&&(x||b=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,d,h,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,d,h,f,p){if(p==">"){var g=h.getSelectionRange().start,m=new l(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var w=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var x=v.value;return w==g.row&&(x=x.substring(0,g.column-k)),this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,d,h,f,p){if(p==` `){var g=h.getCursorPosition(),m=f.getLine(g.row),v=new l(f,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var b=y.value,w=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[b]){var k=f.getTokenAt(g.row,g.column+1),m=f.getLine(w),x=this.$getIndent(m),S=x+f.getTabString();return k&&k.value==="-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),function(){ace.require(["ace/mode/html"],function(n){t&&(t.exports=n)})}()})(jpe);var Gpe={exports:{}};(function(t,e){ace.define("ace/theme/github-css",["require","exports","module"],function(n,r,o){o.exports=`/* CSS style content from github's default pygments highlighter template. +`+S}}}}})};i.inherits(u,s),r.XmlBehaviour=u}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("./fold_mode").FoldMode,l=r.FoldMode=function(a,u){this.defaultMode=a,this.subModes=u};i.inherits(l,s),(function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var u in this.subModes)if(a.indexOf(u)===0)return this.subModes[u];return null},this.$tryMode=function(a,u,c,d){var h=this.$getMode(a);return h?h.getFoldWidget(u,c,d):""},this.getFoldWidget=function(a,u,c){return this.$tryMode(a.getState(c-1),a,u,c)||this.$tryMode(a.getState(c),a,u,c)||this.defaultMode.getFoldWidget(a,u,c)},this.getFoldWidgetRange=function(a,u,c){var d=this.$getMode(a.getState(c-1));return(!d||!d.getFoldWidget(a,u,c))&&(d=this.$getMode(a.getState(c))),(!d||!d.getFoldWidget(a,u,c))&&(d=this.defaultMode),d.getFoldWidgetRange(a,u,c)}}).call(l.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,o){var i=n("../../lib/oop"),s=n("../../range").Range,l=n("./fold_mode").FoldMode,a=r.FoldMode=function(d,h){l.call(this),this.voidElements=d||{},this.optionalEndTags=i.mixin({},this.voidElements),h&&i.mixin(this.optionalEndTags,h)};i.inherits(a,l);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(d,h){return d.type.lastIndexOf(h+".xml")>-1}(function(){this.getFoldWidget=function(d,h,f){var p=this._getFirstTagInLine(d,f);return p?p.closing||!p.tagName&&p.selfClosing?h==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(d,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(d,f)},this.getCommentFoldWidget=function(d,h){return/comment/.test(d.getState(h))&&/";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(d,h,f,p){for(var g=d.getTokens(h),m=0,v=0;v-1}function h(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new i(g,m.row,m.column),y=v.getCurrentToken();y&&!d(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var b=m.getTokenAt(v.row,v.column);if(!b)return[];if(d(b,"tag-name")||d(b,"tag-open")||d(b,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(d(b,"tag-whitespace")||d(b,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(d(b,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var w=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(w)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(b){return{value:b,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var b=h(m,v);if(!b)return[];var w=a;return b in u&&(w=w.concat(Object.keys(u[b]))),w.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var b=h(m,v),w=f(m,v);if(!b)return[];var k=[];return b in u&&w in u[b]&&typeof u[b][w]=="object"&&(k=Object.keys(u[b][w])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var b=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return b.map(function(w){return{caption:w,snippet:w,meta:"html entity",score:1e6}})}}).call(p.prototype),r.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,o){var i=n("../lib/oop"),s=n("../lib/lang"),l=n("./text").Mode,a=n("./javascript").Mode,u=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,d=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new d,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":u}),this.foldingRules=new h(this.voidElements,s.arrayToMap(m))};i.inherits(v,l),(function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(g),this.getNextLineIndent=function(y,b,w){return this.$getIndent(b)},this.checkOutdent=function(y,b,w){return!1},this.getCompletions=function(y,b,w,k){return this.$completer.getCompletions(y,b,w,k)},this.createWorker=function(y){if(this.constructor==v){var b=new p(["ace"],"ace/mode/html_worker","Worker");return b.attachToDocument(y.getDocument()),this.fragmentContext&&b.call("setOptions",[{context:this.fragmentContext}]),b.on("error",function(w){y.setAnnotations(w.data)}),b.on("terminate",function(){y.clearAnnotations()}),b}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(v.prototype),r.Mode=v}),function(){ace.require(["ace/mode/html"],function(n){e&&(e.exports=n)})}()})(cge);var uge={exports:{}};(function(e,t){ace.define("ace/theme/github-css",["require","exports","module"],function(n,r,o){o.exports=`/* CSS style content from github's default pygments highlighter template. Cursor and selection styles from textmate.css. */ .ace-github .ace_gutter { background: #e8e8e8; @@ -6223,5 +6233,10 @@ ${u} .ace-github .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } -`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(n,r,o){r.isDark=!1,r.cssClass="ace-github",r.cssText=n("./github-css");var i=n("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(n){t&&(t.exports=n)})}()})(Gpe);const Kpe=({mode:t,value:e})=>{const n=P.useMemo(()=>t==="Markdown"?{value:e,mode:"markdown"}:{value:Ype(e||""),mode:"html"},[t,e]);return j.jsx(Wpe,{mode:n.mode,value:n.value,height:"100%",width:"100%",readOnly:!0,wrapEnabled:!0})},F_=" ";function Ype(t){let e="",n="";return t.split(/>\s*{r.match(/^\/\w/)&&(n=n.substring(F_.length)),e+=n+"<"+r+`>\r -`,r.match(/^]*[^/]$/)&&!r.startsWith("input")&&(n+=F_)}),e.substring(1,e.length-3)}const Xpe=({onClose:t,node:e})=>{const[n,r,o]=JN(""),i=kn();P.useEffect(()=>{r(e.node.attrs.title||"")},[e,r]);const s=P.useCallback(u=>{r(u.target.value)},[r]),l=P.useCallback(()=>{i.updateNodeAttributes(e.getPos()||0,{...e.node.attrs||{},title:o.current}),t()},[i,e,t,o]),a=P.useCallback(u=>{const{code:c}=u;c==="Enter"&&l(),c==="Escape"&&t()},[t,l]);return j.jsxs(u$,{title:"Change Image Title",children:[j.jsx(c$,{value:n,onChange:s,onKeyDown:a,placeholder:"Enter Title..."}),j.jsxs(so,{children:[j.jsx(It,{commandName:"submitLink",enabled:!0,onSelect:l,icon:j.jsx(xo,{type:"Check"})}),j.jsx(It,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:j.jsx(xo,{type:"Cancel"})})]})]})};const qpe=t=>{const{appName:e,classNames:n,canSelectAIText:r,canSelectAssets:o,canSelectContents:i,isDisabled:s,mode:l,onChange:a,onEditAsset:u,onEditContent:c,onSelectAIText:d,onSelectAssets:h,onSelectContents:f,onUpload:p,value:g}=t,m=P.useMemo(()=>{let M=t.baseUrl;return M.endsWith("/")&&(M=M.substring(0,M.length-1)),M},[t.baseUrl]),[v,y]=P.useState(),[b,w]=P.useState(!1),[k,x]=P.useState(!1),S=P.useCallback(()=>{w(!0)},[]),T=P.useCallback(()=>{w(!1)},[]),C=P.useCallback(()=>{y(null)},[]),O=P.useCallback(()=>{x(M=>!M)},[]),_=P.useCallback(()=>[new fk,new dl({}),new Sh({enableSpine:!0}),new ru({classNames:n}),new mo({supportedLanguages:zhe}),new Th,new Ih({appName:e,baseUrl:m,onEditContent:c}),new Vs({}),new Ug,new Wg({}),new Vg,new lfe({copyAsHtml:l==="Html"}),new Ah({uploadHandler:p}),new _h,new hl({autoLink:!0}),new ul({enableCollapsible:!0}),new nu({copyAsMarkdown:l==="Markdown",htmlToMarkdown:tfe,markdownToHtml:nfe}),new Ch,new Qg,new Mh,new eb,new Oh],[e,m,n,l,c,p]),{manager:R,state:A,setState:E}=vQ({stringHandler:l==="Markdown"?"markdown":"html",content:g,nodeViewComponents:{image:M=>j.jsx(afe,{...M,appName:e,baseUrl:m,onEditNode:y,onEditAsset:u})},extensions:_});return j.jsx(Iue,{children:j.jsx(Tue,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:j.jsxs(wQ,{classNames:s?["squidex-editor-disabled"]:[],manager:R,state:A,onChange:M=>E(M.state),children:[j.jsx("div",{className:"squidex-editor-menu",children:j.jsxs(_N,{children:[j.jsxs("fieldset",{disabled:k,className:"MuiStack-root",children:[j.jsx(Eue,{}),j.jsx(kue,{showAll:!0}),j.jsxs(so,{children:[j.jsx(Wx,{}),j.jsx(jx,{}),j.jsx(Gx,{}),j.jsx(Vx,{})]}),j.jsxs(so,{children:[j.jsx(cue,{}),j.jsx(due,{}),j.jsx(aue,{})]}),j.jsxs(so,{children:[j.jsx(uue,{}),j.jsx(hue,{})]}),l==="Html"&&n&&n.length>0&&j.jsx(so,{children:j.jsx(Efe,{})}),j.jsx(so,{children:j.jsx(d$,{onEdit:S})}),j.jsxs(so,{children:[o&&h&&j.jsx(yfe,{onSelectAssets:h}),i&&f&&j.jsx(bfe,{onSelectContents:f}),r&&d&&j.jsx(mfe,{onSelectAIText:d})]}),l==="Html"&&j.jsx(so,{children:j.jsx(wfe,{})})]}),j.jsx(It,{commandName:"toggleMarkup",enabled:!0,onSelect:O,label:"Show Markup (readonly)",icon:j.jsx(xo,{type:"Preview"})})]})}),j.jsxs("div",{className:"squidex-editor-main",children:[j.jsx(cfe,{mode:l,onChange:a,state:A,value:g}),j.jsx(Fy,{}),k&&j.jsx(Kpe,{value:g,mode:l}),b?j.jsx(Cfe,{onClose:T}):v?j.jsx(Xpe,{node:v,onClose:C}):j.jsx(Zpe,{onLinkModal:S}),j.jsx(Rue,{offset:{x:5,y:5},className:Pc(B0.LANGUAGE_SELECT_POSITIONER,B0.LANGUAGE_SELECT_WIDTH)})]}),j.jsx(Sfe,{})]})})})},Zpe=({onLinkModal:t})=>hr().codeBlock()?null:j.jsxs(_ue,{className:"squidex-editor-floating",children:[j.jsx(Wx,{}),j.jsx(jx,{}),j.jsx(Gx,{}),j.jsx(Vx,{}),j.jsx(d$,{onEdit:t})]});var S$,B_=Qh;S$=B_.createRoot,B_.hydrateRoot;class Qpe{constructor(e,n){ct(this,"root");this.element=e,this.props=n,this.root=S$(this.element),this.render()}update(e){this.props={...this.props,...e},this.render()}setValue(e){this.update({value:e})}setIsDisabled(e){this.update({isDisabled:e})}destroy(){this.root.unmount()}render(){this.root.render(j.jsx(qpe,{...this.props}))}}window.SquidexEditorWrapper=Qpe; +`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(n,r,o){r.isDark=!1,r.cssClass="ace-github",r.cssText=n("./github-css");var i=n("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(n){e&&(e.exports=n)})}()})(uge);const dge=({mode:e,value:t})=>{const n=P.useMemo(()=>e==="Markdown"?{value:t,mode:"markdown"}:{value:hge(t||""),mode:"html"},[e,t]);return V.jsx(age,{mode:n.mode,value:n.value,height:"100%",width:"100%",readOnly:!0,wrapEnabled:!0})},Y_=" ";function hge(e){let t="",n="";return e.split(/>\s*{r.match(/^\/\w/)&&(n=n.substring(Y_.length)),t+=n+"<"+r+`>\r +`,r.match(/^]*[^/]$/)&&!r.startsWith("input")&&(n+=Y_)}),t.substring(1,t.length-3)}const fge=e=>{const{onClose:t,node:n}=e,[r,o,i]=l$(""),s=hn();P.useEffect(()=>{o(n.node.attrs.title||"")},[n,o]);const l=P.useCallback(c=>{o(c.target.value)},[o]),a=P.useCallback(()=>{s.updateNodeAttributes(n.getPos()||0,{...n.node.attrs||{},title:i.current}),t()},[s,n,t,i]),u=P.useCallback(c=>{const{code:d}=c;d==="Enter"&&a(),d==="Escape"&&t()},[t,a]);return V.jsxs(b$,{title:"Change Image Title",children:[V.jsx(y$,{value:r,onChange:l,onKeyDown:u,placeholder:"Enter Title..."}),V.jsxs(Br,{children:[V.jsx(Rt,{commandName:"submitLink",enabled:!0,onSelect:a,icon:V.jsx(eo,{type:"Check"})}),V.jsx(Rt,{commandName:"cancelLink",enabled:!0,onSelect:t,icon:V.jsx(eo,{type:"Cancel"})})]})]})};const pge=e=>{const{annotations:t,appName:n,canSelectAIText:r,canSelectAssets:o,canSelectContents:i,classNames:s,isDisabled:l,mode:a,onAnnotationCreate:u,onAnnotationsFocus:c,onAnnotationsUpdate:d,onChange:h,onEditAsset:f,onEditContent:p,onSelectAIText:g,onSelectAssets:m,onSelectContents:v,onUpload:y,value:b}=e,w=P.useMemo(()=>{let N=e.baseUrl;return N.endsWith("/")&&(N=N.substring(0,N.length-1)),N},[e.baseUrl]),[k,x]=P.useState(),[S,T]=P.useState(!1),[C,I]=P.useState(!1),_=P.useCallback(()=>{T(!0)},[]),R=P.useCallback(()=>{T(!1)},[]),A=P.useCallback(()=>{x(null)},[]),E=P.useCallback(()=>{I(N=>!N)},[]),M=P.useCallback(()=>[new Nn,new yk,new pl({}),new _h({enableSpine:!0}),new su({classNames:s}),new yo({supportedLanguages:Jhe}),new Mh,new Dh({appName:n,baseUrl:w,onEditContent:p}),new Ys({}),new jg,new Gg({}),new Kg,new Efe({copyAsHtml:a==="Html"}),new Oh({uploadHandler:y}),new Ih,new gl({autoLink:!0}),new fl({enableCollapsible:!0}),new iu({copyAsMarkdown:a==="Markdown",htmlToMarkdown:mfe,markdownToHtml:vfe}),new Rh,new nm,new Nh,new ob,new $h],[n,w,s,a,p,y]),{manager:O}=TQ({stringHandler:a==="Markdown"?"markdown":"html",content:b,nodeViewComponents:{image:N=>V.jsx(kfe,{...N,appName:n,baseUrl:w,onEditNode:x,onEditAsset:f})},extensions:M});return V.jsx(Hue,{children:V.jsx($ue,{theme:{color:{primary:"#3389ff",active:{primary:"#3389ff"}}},children:V.jsxs(RQ,{classNames:l?["squidex-editor-disabled"]:[],manager:O,children:[V.jsx("div",{className:"squidex-editor-menu",children:V.jsxs(DN,{children:[V.jsxs("fieldset",{disabled:C,className:"MuiStack-root",children:[V.jsx(Iue,{}),V.jsx(Oue,{showAll:!0}),V.jsxs(Br,{children:[V.jsx(Yx,{}),V.jsx(qx,{}),V.jsx(Zx,{}),V.jsx(Xx,{})]}),V.jsxs(Br,{children:[V.jsx(yue,{}),V.jsx(wue,{}),V.jsx(mue,{})]}),V.jsxs(Br,{children:[V.jsx(bue,{}),V.jsx(xue,{})]}),a==="Html"&&s&&s.length>0&&V.jsx(Br,{children:V.jsx(Hfe,{})}),V.jsx(Br,{children:V.jsx(w$,{onEdit:_})}),V.jsxs(Br,{children:[o&&m&&V.jsx(Nfe,{onSelectAssets:m}),i&&v&&V.jsx($fe,{onSelectContents:v}),r&&g&&V.jsx(Ife,{onSelectAIText:g})]}),u&&V.jsx(Br,{children:V.jsx(Pfe,{onAnnotationCreate:u})}),a==="Html"&&V.jsx(Br,{children:V.jsx(Dfe,{})})]}),V.jsx(Rt,{commandName:"toggleMarkup",enabled:!0,onSelect:E,label:"Show Markup (readonly)",icon:V.jsx(eo,{type:"Preview"})})]})}),V.jsxs("div",{className:"squidex-editor-main",children:[V.jsx(Sfe,{mode:a,onChange:h,value:b}),V.jsx(Wy,{}),C&&V.jsx(dge,{value:b,mode:a}),S?V.jsx(Wfe,{onClose:R}):k?V.jsx(fge,{node:k,onClose:A}):V.jsx(gge,{onLinkModal:_}),V.jsx(zue,{offset:{x:5,y:5},className:Bc(V0.LANGUAGE_SELECT_POSITIONER,V0.LANGUAGE_SELECT_WIDTH)}),V.jsx(zfe,{annotations:t,onAnnotationsFocus:c,onAnnotationsUpdate:d})]}),V.jsx(Ufe,{})]})})})},gge=({onLinkModal:e})=>fr().codeBlock()?null:V.jsxs(Pue,{className:"squidex-editor-floating",children:[V.jsx(Yx,{}),V.jsx(qx,{}),V.jsx(Zx,{}),V.jsx(Xx,{}),V.jsx(w$,{onEdit:e})]});var L$,X_=nf;L$=X_.createRoot,X_.hydrateRoot;class mge{constructor(t,n){this.element=t,this.props=n,this.root=L$(this.element),this.render()}update(t){this.props={...this.props,...t},this.render()}setValue(t){this.update({value:t})}setAnnotations(t){this.update({annotations:t})}setIsDisabled(t){this.update({isDisabled:t})}destroy(){this.root.unmount()}render(){this.root.render(V.jsx(pge,{...this.props}))}}/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */window.SquidexEditorWrapper=mge; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2bce567b9..ef7a40cf1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,26 +8,27 @@ "name": "squidex", "version": "0.0.0", "dependencies": { - "@angular-devkit/architect": "^0.1700.0", - "@angular/animations": "17.0.2", - "@angular/cdk": "17.0.0", - "@angular/cdk-experimental": "17.0.0", - "@angular/common": "17.0.2", - "@angular/core": "17.0.2", - "@angular/forms": "17.0.2", - "@angular/localize": "17.0.2", - "@angular/platform-browser": "17.0.2", - "@angular/platform-browser-dynamic": "17.0.2", - "@angular/platform-server": "17.0.2", - "@angular/router": "17.0.2", + "@angular-devkit/architect": "^0.1700.1", + "@angular/animations": "17.0.3", + "@angular/cdk": "17.0.1", + "@angular/cdk-experimental": "17.0.1", + "@angular/common": "17.0.3", + "@angular/core": "17.0.3", + "@angular/forms": "17.0.3", + "@angular/localize": "17.0.3", + "@angular/platform-browser": "17.0.3", + "@angular/platform-browser-dynamic": "17.0.3", + "@angular/platform-server": "17.0.3", + "@angular/router": "17.0.3", "@egjs/hammerjs": "2.0.17", "@floating-ui/dom": "^1.5.3", "@graphiql/toolkit": "^0.9.1", - "@iharbeck/ngx-virtual-scroller": "^16.0.0", + "@iharbeck/ngx-virtual-scroller": "^17.0.0", "@lithiumjs/angular": "^7.3.0", "@lithiumjs/ngx-virtual-scroll": "^0.3.0", "@marker.io/browser": "^0.19.0", - "ace-builds": "1.31.1", + "@types/ace": "^0.0.51", + "ace-builds": "^1.31.2", "angular-gridster2": "16.0.0", "angular-mentions": "1.5.0", "bootstrap": "5.2.3", @@ -70,16 +71,16 @@ "zone.js": "0.14.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.0.0", - "@angular-eslint/builder": "17.0.1", - "@angular-eslint/eslint-plugin": "17.0.1", - "@angular-eslint/eslint-plugin-template": "17.0.1", - "@angular-eslint/schematics": "17.0.1", - "@angular-eslint/template-parser": "17.0.1", - "@angular/cli": "^17.0.0", - "@angular/compiler": "^17.0.2", - "@angular/compiler-cli": "^17.0.2", - "@angular/elements": "^17.0.2", + "@angular-devkit/build-angular": "^17.0.1", + "@angular-eslint/builder": "17.1.0", + "@angular-eslint/eslint-plugin": "17.1.0", + "@angular-eslint/eslint-plugin-template": "17.1.0", + "@angular-eslint/schematics": "17.1.0", + "@angular-eslint/template-parser": "17.1.0", + "@angular/cli": "^17.0.1", + "@angular/compiler": "^17.0.3", + "@angular/compiler-cli": "^17.0.3", + "@angular/elements": "^17.0.3", "@compodoc/compodoc": "^1.1.22", "@storybook/addon-actions": "^7.5.3", "@storybook/addon-essentials": "^7.5.3", @@ -93,16 +94,16 @@ "@types/marked": "5.0.1", "@types/mersenne-twister": "1.1.7", "@types/mousetrap": "1.6.14", - "@types/node": "20.9.0", + "@types/node": "20.9.1", "@types/react": "18.2.37", "@types/react-dom": "18.2.15", "@types/simplemde": "1.11.11", "@types/tapable": "2.2.7", "@types/ws": "8.5.9", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "@webcomponents/custom-elements": "^1.6.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-airbnb-typescript": "17.1.0", "eslint-plugin-deprecation": "^2.0.0", "eslint-plugin-import": "2.29.0", @@ -150,11 +151,11 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1700.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1700.0.tgz", - "integrity": "sha512-whi7HvOjv1J3He9f+H8xNJWKyjAmWuWNl8gxNW6EZP/XLcrOu+/5QT4bPtXQBRIL/avZuc++5sNQS+kReaNCig==", + "version": "0.1700.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1700.1.tgz", + "integrity": "sha512-w84luzQNRjlt7XxX3+jyzcwBBv3gAjjvFWTjN1E5mlpDCUXgYmQ3CMowFHeu0U06HD5Sapap9p2l6GoajuZK5Q==", "dependencies": { - "@angular-devkit/core": "17.0.0", + "@angular-devkit/core": "17.0.1", "rxjs": "7.8.1" }, "engines": { @@ -164,15 +165,15 @@ } }, "node_modules/@angular-devkit/build-angular": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.0.0.tgz", - "integrity": "sha512-hkV8k4moAnUquac2Dz5XPd5izDDgEF82NeUkSwizcTaqlJqYOdmWASMsXyVBzdrTmDtFKQiphfA96i7eo5MlvA==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.0.1.tgz", + "integrity": "sha512-OomGAeBg/OOxzPpoU7EkdD3WwhKip+0Giy/cGtkalSgQ5vWTuZhf8UnxwTf7xEXW5LtvfoTtv7sKmb1dJT7FzA==", "dev": true, "dependencies": { "@ampproject/remapping": "2.2.1", - "@angular-devkit/architect": "0.1700.0", - "@angular-devkit/build-webpack": "0.1700.0", - "@angular-devkit/core": "17.0.0", + "@angular-devkit/architect": "0.1700.1", + "@angular-devkit/build-webpack": "0.1700.1", + "@angular-devkit/core": "17.0.1", "@babel/core": "7.23.2", "@babel/generator": "7.23.0", "@babel/helper-annotate-as-pure": "7.22.5", @@ -183,7 +184,7 @@ "@babel/preset-env": "7.23.2", "@babel/runtime": "7.23.2", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "17.0.0", + "@ngtools/webpack": "17.0.1", "@vitejs/plugin-basic-ssl": "1.0.1", "ansi-colors": "4.1.3", "autoprefixer": "10.4.16", @@ -1618,12 +1619,12 @@ } }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1700.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1700.0.tgz", - "integrity": "sha512-Hx9JUb32gigsHlbBZJ5sw3q3H7qHeX8HTh4aIq4Glvb/5e+HgPlclVSIA5BY2ZYatHixU+CUAXRmcIKxViS02Q==", + "version": "0.1700.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1700.1.tgz", + "integrity": "sha512-u9LTcG9Kg2J6WkF1WSoBLdDabhbKxcuHY24SouAJTwg33j6YksglL7qnofOsNxny3Gdnze2BhCjQ1GS9Y8ovXw==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1700.0", + "@angular-devkit/architect": "0.1700.1", "rxjs": "7.8.1" }, "engines": { @@ -1637,9 +1638,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.0.0.tgz", - "integrity": "sha512-QUu3LnEi4A8t733v2+I0sLtyBJx3Q7zdTAhaauCbxbFhDid0cbYm8hYsyG/njor1irTPxSJbn6UoetVkwUQZxg==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.0.1.tgz", + "integrity": "sha512-UjNx9fZW0oU7UaeoB0HblYz/Nm8MWtinAe39XkY+zjECLWqKAcHPotfYjucXiky1UlBUOScIKbwjMDdEY8xkuw==", "dependencies": { "ajv": "8.12.0", "ajv-formats": "2.1.1", @@ -1786,13 +1787,13 @@ "dev": true }, "node_modules/@angular-eslint/builder": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-17.0.1.tgz", - "integrity": "sha512-bNXi5tdqIFdNDHxphDRUUbzA+7v6emOX2B/PFLG2pe+K6/JpHS0auwY/nq7hCroH7pMS5HZ+Q4i90q0GN/DWPg==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-17.1.0.tgz", + "integrity": "sha512-rLIInxx9q82DDrfcg5gzjNftxhkqdLILUgjlA9XtA9LayU3rz4CS81we+vAOAPbbnGxoMsEeBg5nVecbKN3dVQ==", "dev": true, "dependencies": { - "@nx/devkit": "17.0.3", - "nx": "17.0.3" + "@nx/devkit": "17.1.2", + "nx": "17.1.2" }, "peerDependencies": { "eslint": "^7.20.0 || ^8.0.0", @@ -1800,19 +1801,19 @@ } }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.0.1.tgz", - "integrity": "sha512-E3YK9/uIBsuKC76i6uvPdtq8bwA63WDKDYpsPSTLF2XmL3a5LGev0+NmJCD2zR/0uMenHYB27BwjZotpk1rycg==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.1.0.tgz", + "integrity": "sha512-Y+CN/8nQZaYjsb2b2sXbkQr0LrgBWhCzyLZ+rLfnLE60B9k4GeDt5b7z/OdSObi1xozXfqiaAZ1eXo0iQMN3JA==", "dev": true }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-17.0.1.tgz", - "integrity": "sha512-HNXzjvqTCfaxENnfjVHJXcWrfzv/3LDH6aEHF7P8B363JSgx0g4SZtGKBrdbXcJPmf5arVfVgRUvKMJ7Es9aiQ==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-17.1.0.tgz", + "integrity": "sha512-pQac5h+XwsquDzaasK/xs9tjdQ/f9eLq8e5An9eXJGHWy4KcrMmQ1XrpaMMMg503LF3rRG/dHKBskGsYgSN9oQ==", "dev": true, "dependencies": { - "@angular-eslint/utils": "17.0.1", - "@typescript-eslint/utils": "6.10.0" + "@angular-eslint/utils": "17.1.0", + "@typescript-eslint/utils": "6.11.0" }, "peerDependencies": { "eslint": "^7.20.0 || ^8.0.0", @@ -1820,15 +1821,15 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-17.0.1.tgz", - "integrity": "sha512-7aQYUUCrdOvAKesUNsWSNUnPjzb9WI69Mlr/VhKSb4SNWwMr6SmYOsNqSqydIrtpHo4sIgyStGGfzELZ4Kub9Q==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-17.1.0.tgz", + "integrity": "sha512-nL9VhChwFQLIRQM4xbTY8Vo095Q4/D77hPtqt3ShYIrORjYTwaWa8+neexToAqXVMapce7oFmFa/OqtxvEerLg==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.0.1", - "@angular-eslint/utils": "17.0.1", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@angular-eslint/bundled-angular-compiler": "17.1.0", + "@angular-eslint/utils": "17.1.0", + "@typescript-eslint/type-utils": "6.11.0", + "@typescript-eslint/utils": "6.11.0", "aria-query": "5.3.0", "axobject-query": "4.0.0" }, @@ -1838,13 +1839,13 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1855,9 +1856,9 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1868,13 +1869,13 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1895,17 +1896,17 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -1920,12 +1921,12 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1955,13 +1956,13 @@ } }, "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1972,9 +1973,9 @@ } }, "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1985,13 +1986,13 @@ } }, "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2012,17 +2013,17 @@ } }, "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -2037,12 +2038,12 @@ } }, "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2054,16 +2055,16 @@ } }, "node_modules/@angular-eslint/schematics": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-17.0.1.tgz", - "integrity": "sha512-CnQpYJDkGM6NJUOOeHPwfzJbZG90oRGvHVDkDlB2mZ63rQCKNzE1hFnlwBWkzyRH4GkV/84WW0++fXt3cU9ItA==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-17.1.0.tgz", + "integrity": "sha512-74gW1E5P4z3PvxNXOTXGaF6li/MLcSeJO8z7XtcP7wcXWu0fihOKlMJGgqB3rIcBa8lRcTDLekQERF+kRZ15aQ==", "dev": true, "dependencies": { - "@angular-eslint/eslint-plugin": "17.0.1", - "@angular-eslint/eslint-plugin-template": "17.0.1", - "@nx/devkit": "17.0.3", + "@angular-eslint/eslint-plugin": "17.1.0", + "@angular-eslint/eslint-plugin-template": "17.1.0", + "@nx/devkit": "17.1.2", "ignore": "5.2.4", - "nx": "17.0.3", + "nx": "17.1.2", "strip-json-comments": "3.1.1", "tmp": "0.2.1" }, @@ -2072,12 +2073,12 @@ } }, "node_modules/@angular-eslint/template-parser": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-17.0.1.tgz", - "integrity": "sha512-EBN5c0/HuaikvPMqQJ6z2U2qSHof6xgwzNH48F4+Mnn2oMzz0eqtvjNrbTCka/vSCjELczao9px879ywDjVB5g==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-17.1.0.tgz", + "integrity": "sha512-CTxzB3stjynngTabdO8xTkiPc6Jvo15C2fxb1pYIlDIH2LgPJJxxCHi+IAt9oJpJOPa8QjLVF9VAXE3fLKAcpg==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.0.1", + "@angular-eslint/bundled-angular-compiler": "17.1.0", "eslint-scope": "^7.0.0" }, "peerDependencies": { @@ -2111,13 +2112,13 @@ } }, "node_modules/@angular-eslint/utils": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-17.0.1.tgz", - "integrity": "sha512-yao+cuWmtDKwe/zW/4+e53pgwlk/rz7fjZFYvaYIuoIpqUQhqYYcBW8NeUoo8BscM57IfPqn0l6UkcXJhS1bRA==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-17.1.0.tgz", + "integrity": "sha512-AmG0xpRtnBQwrbHObonSilmD3hiFEtZHwFY3LT28VWxznB6WIAHFE7SrKWrRsRsXlib8LaRo4uobR5+MO8aLpw==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "17.0.1", - "@typescript-eslint/utils": "6.10.0" + "@angular-eslint/bundled-angular-compiler": "17.1.0", + "@typescript-eslint/utils": "6.11.0" }, "peerDependencies": { "eslint": "^7.20.0 || ^8.0.0", @@ -2125,13 +2126,13 @@ } }, "node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2142,9 +2143,9 @@ } }, "node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2155,13 +2156,13 @@ } }, "node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2182,17 +2183,17 @@ } }, "node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -2207,12 +2208,12 @@ } }, "node_modules/@angular-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2224,9 +2225,9 @@ } }, "node_modules/@angular/animations": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.0.2.tgz", - "integrity": "sha512-32RHWhTgFLMonI3kRdstACay/nvetfxXjdwcTtABjcvBoND7nD9GMhkISQdgS+hcR/IhgXxaPidq8f2UAY5DBw==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.0.3.tgz", + "integrity": "sha512-aBLVJ0HHYdIZCAXymQDP6UGuz/5oM/3uLCFVHx32vhibLByjw0jNCvy2lzmPLU5gUU6wEWX2b3ZtnzFqhmo4+A==", "dependencies": { "tslib": "^2.3.0" }, @@ -2234,13 +2235,13 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.0.2" + "@angular/core": "17.0.3" } }, "node_modules/@angular/cdk": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.0.0.tgz", - "integrity": "sha512-8F1z0YhDjKWqB29+AUh33OKr2Ts5PVUUogVXEVmmPipPDtj82iIQLbtBnR6xpWvmsw9mS3oD76EwBoUhHQgi6g==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.0.1.tgz", + "integrity": "sha512-0hrXm2D0s0/vUtDoLFRWTs75k5WY/hQmfnsaJXHeqinbE3eKOxmQxL1i7ymnMSQthEWzgRAhzS3Nfs7Alw3dQA==", "dependencies": { "tslib": "^2.3.0" }, @@ -2254,27 +2255,27 @@ } }, "node_modules/@angular/cdk-experimental": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular/cdk-experimental/-/cdk-experimental-17.0.0.tgz", - "integrity": "sha512-sxLZV1clu2adhHGhD5CNOsqvOo6lAuQNuhprUkYu3mlkYuzLBPLihWkkMMd/VncAin88UbOrYHcMOcOsdvBSqA==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular/cdk-experimental/-/cdk-experimental-17.0.1.tgz", + "integrity": "sha512-oW10hhW04YwcNTptAYAVmKSJnO5eZAG2u8c/mUXMplJd0E1PBs6MnkpdGqZxImHS5Yfi8fqGnwH5N4VnB0FXfQ==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/cdk": "17.0.0", + "@angular/cdk": "17.0.1", "@angular/core": "^17.0.0 || ^18.0.0" } }, "node_modules/@angular/cli": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-17.0.0.tgz", - "integrity": "sha512-VzKYmN+1wSE2wLBEFu/NHSrRQbeaKkEDO9aZxd7nAnxC5T1Zcva7dfqZIXMHXH2HESYAZCvOS8ikBE/7DCtWWw==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-17.0.1.tgz", + "integrity": "sha512-3iJWw+bpr/8y1ZY1m0wGfukffQVmD6DJUNubB297NCq1bJyUj+uwBuDnpIH+vidJvPBEEY+9XPJr0Jnd6+i7rg==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1700.0", - "@angular-devkit/core": "17.0.0", - "@angular-devkit/schematics": "17.0.0", - "@schematics/angular": "17.0.0", + "@angular-devkit/architect": "0.1700.1", + "@angular-devkit/core": "17.0.1", + "@angular-devkit/schematics": "17.0.1", + "@schematics/angular": "17.0.1", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "4.1.1", @@ -2300,12 +2301,12 @@ } }, "node_modules/@angular/cli/node_modules/@angular-devkit/schematics": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.0.0.tgz", - "integrity": "sha512-LD7fjDORuBf139/oJ/gSwbIzQPfsm6Y67s1FD+XLi0QXaRt6dw4r7BMD08l1r//oPQofNgbEH4coGVO4NdCL/A==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.0.1.tgz", + "integrity": "sha512-bwgdGviRZC5X8Tl4QcjtIJAcC0p8yIhOyYVFrq4PWYvI+DfV9P6w3OFuoS6rwEoiIQR90+12iKBYMt1MfL/c0Q==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.0.0", + "@angular-devkit/core": "17.0.1", "jsonc-parser": "3.2.0", "magic-string": "0.30.5", "ora": "5.4.1", @@ -2353,9 +2354,9 @@ } }, "node_modules/@angular/common": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.0.2.tgz", - "integrity": "sha512-hCW0njHgrcwTWNoKZDwf02DnhYLVWNXM2FMw66MKpfxTp7McSyaXjGBU9/hchW3dZJ0xTwyxoyoqJFoHYvg0yg==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.0.3.tgz", + "integrity": "sha512-AD/d1n0hNisHDhIeBsW2ERZI9ChjiOuZ3IiGwcYKmlcOHTrZTJPAh/ZMgahv24rArlNVax7bT+Ik8+sJedGcEQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -2363,14 +2364,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.0.2", + "@angular/core": "17.0.3", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.0.2.tgz", - "integrity": "sha512-ewUFbKhMEhAmw2dGfk0ImhTlyrO2y4pJSKIZdFrkR1d0HiJX8bCHUdTiiR/2jeP7w2eamjXj15Rptb+iZZes2Q==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.0.3.tgz", + "integrity": "sha512-ryUcj8Vc+Q4jMrjrmsEIsGLXeWSmNE/KoTyURPCH+NWq9GBMbjv4oe0/oFSBMN2ZtRMVCvqv2Nq+Z2KRDRGB0A==", "dependencies": { "tslib": "^2.3.0" }, @@ -2378,7 +2379,7 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.0.2" + "@angular/core": "17.0.3" }, "peerDependenciesMeta": { "@angular/core": { @@ -2387,9 +2388,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.0.2.tgz", - "integrity": "sha512-IUYL3Yz5RbR0Z0/x7it4GK3sMb2qVihxu0tlgfUW53P1Vi6nU/Zda0bCJTu6Z64qEtS8zwCwF1Ekomuq6UaiKg==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.0.3.tgz", + "integrity": "sha512-oj7KJBFgs6ulT1/A/xkkDHBOB0c7o9HV2Mn5pUosXBo2VgcGYeuJeXffC+mFr5FyiRO1sUanw4vSWnLzK1U0pQ==", "dependencies": { "@babel/core": "7.23.2", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -2409,7 +2410,7 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/compiler": "17.0.2", + "@angular/compiler": "17.0.3", "typescript": ">=5.2 <5.3" } }, @@ -2483,9 +2484,9 @@ } }, "node_modules/@angular/core": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.0.2.tgz", - "integrity": "sha512-MjDxWeyn3Txi0qo/V/I+B/gndh0uptQ0XWgBRwOx6Wcr5zRGeZIFlXBxPpyXnGTlJkeyErsTN7FfFCZ4C3kCPA==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.0.3.tgz", + "integrity": "sha512-zY4yhPiphuktrodaM+GiP8G07qnUlmwKElLjYazeIR8A+kF51RQRpSf/pWe5M0uJIn5Oja+RdO9kzhDI9QvOcA==", "dependencies": { "tslib": "^2.3.0" }, @@ -2498,9 +2499,9 @@ } }, "node_modules/@angular/elements": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/elements/-/elements-17.0.2.tgz", - "integrity": "sha512-YO840GTVmwSbIeNXromF6GrD7Yh0qHcGKxPyzosPRy0HmFi4Mno6bAzzXyTiJyQXrPKqhnnl7LVsTx/onJhXzA==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/elements/-/elements-17.0.3.tgz", + "integrity": "sha512-TOX6ed2JsedYQnJHGTBq8d5uI5/zOWmIzzp29tWKseFarpJ9bhN3ScD3ASkFKmWg4wEy9ZC2tWziSse7kv512A==", "dev": true, "dependencies": { "tslib": "^2.3.0" @@ -2509,14 +2510,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.0.2", + "@angular/core": "17.0.3", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/forms": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.0.2.tgz", - "integrity": "sha512-w1QKifaVG4daxUktcBNZqBtOH1vn8t0YiwDR3woEdUYt0XYKMipfDzQfyIK+6fIVPOJUd42pRns1nbWJQHOInA==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.0.3.tgz", + "integrity": "sha512-slCUGe5nVOrA0Su9pkmgPXBVzkgh4stvVFBb6ic9/+GlmtRi8h1v5jAFhR4B0R4iaaIoF+TTpRKhZShwtFSqSg==", "dependencies": { "tslib": "^2.3.0" }, @@ -2524,16 +2525,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.0.2", - "@angular/core": "17.0.2", - "@angular/platform-browser": "17.0.2", + "@angular/common": "17.0.3", + "@angular/core": "17.0.3", + "@angular/platform-browser": "17.0.3", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/localize": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-17.0.2.tgz", - "integrity": "sha512-ct8xEy8Xk+PRfjrHLu7uywSQDzozmzlz6ptUCuYkRHrS4rJabXn3c0Sz4w+mh9B58qrK6KM+JSmXEZngEMXMTw==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-17.0.3.tgz", + "integrity": "sha512-AxMqZwClWNiYjoaHYu2Y499yM30DJDCgrV9k8mOb92SU3IUaQ52loPb91Cb2Xp4h0b6A3TVAmnYApcLYaUf40g==", "dependencies": { "@babel/core": "7.23.2", "fast-glob": "3.3.1", @@ -2548,8 +2549,8 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/compiler": "17.0.2", - "@angular/compiler-cli": "17.0.2" + "@angular/compiler": "17.0.3", + "@angular/compiler-cli": "17.0.3" } }, "node_modules/@angular/localize/node_modules/@babel/core": { @@ -2637,9 +2638,9 @@ } }, "node_modules/@angular/platform-browser": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.0.2.tgz", - "integrity": "sha512-eTnPILEA/eAMkVUR/+g6fWhhMTmnmOzcZSGX/bBgQcvOhayZrDDxA6/Qf+jIB4RwC0wd3KA9zT5BCMmNojoUsg==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.0.3.tgz", + "integrity": "sha512-4SoW0yeAxgfcLIekKsvZVg/WgI5aQZyz9HGOoyBcVQ8coYoZmM9bAYQi+9zvyweqoWc+jgw72X1E8wtmMXt7Aw==", "dependencies": { "tslib": "^2.3.0" }, @@ -2647,9 +2648,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/animations": "17.0.2", - "@angular/common": "17.0.2", - "@angular/core": "17.0.2" + "@angular/animations": "17.0.3", + "@angular/common": "17.0.3", + "@angular/core": "17.0.3" }, "peerDependenciesMeta": { "@angular/animations": { @@ -2658,9 +2659,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.0.2.tgz", - "integrity": "sha512-clcHqHcfD00/TlTixDbJ3q4EQxpm0t2ZFG76rRFmGrmE5tKYUPfaofIa3hQCxy3q269MAYuF16wALhUtrEWyUA==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.0.3.tgz", + "integrity": "sha512-Ab6ZeGG63z9Ilv8r4lHcmSirVaw8quRrPjDbT8cgIteHbj0SbwgDzxX0ve+fjjubFUluNSNtc6OYglWMHJ/g7Q==", "dependencies": { "tslib": "^2.3.0" }, @@ -2668,16 +2669,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.0.2", - "@angular/compiler": "17.0.2", - "@angular/core": "17.0.2", - "@angular/platform-browser": "17.0.2" + "@angular/common": "17.0.3", + "@angular/compiler": "17.0.3", + "@angular/core": "17.0.3", + "@angular/platform-browser": "17.0.3" } }, "node_modules/@angular/platform-server": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-17.0.2.tgz", - "integrity": "sha512-+1uCnAw7Ql2r4BDnfaRvQrXI1H5qUB/1f8CwCjaVoIn7kLJs/ps4I0WbOVtujJ2VPnxIggfVtenXRRMlungZlg==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-17.0.3.tgz", + "integrity": "sha512-/7Y91mCehVbxt52Kfm2PBbeMn1+S/2+MXwJjUXUHzKQPQx+bDH2eVzS2nIPnnToeD0Y8AOYOnafPUvNb7oSzgg==", "dependencies": { "tslib": "^2.3.0", "xhr2": "^0.2.0" @@ -2686,17 +2687,17 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/animations": "17.0.2", - "@angular/common": "17.0.2", - "@angular/compiler": "17.0.2", - "@angular/core": "17.0.2", - "@angular/platform-browser": "17.0.2" + "@angular/animations": "17.0.3", + "@angular/common": "17.0.3", + "@angular/compiler": "17.0.3", + "@angular/core": "17.0.3", + "@angular/platform-browser": "17.0.3" } }, "node_modules/@angular/router": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.0.2.tgz", - "integrity": "sha512-A1Ulv4qBAtJyK5g1yBlK1qZHe+KaaL5vMPAaPWUxICH8lHEodDkJlbYAUI2e4VL2BN7zBmdOep6tlBKPmHY3mw==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.0.3.tgz", + "integrity": "sha512-zw31XXMqLJ1CcHxDtEl2/FTJXeRbbnLM8oHtCPzbbxTkhAlnXxSYxjds0+1IMmpzz/v9qGBhYvUt8ZfZhqDBHQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -2704,9 +2705,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.0.2", - "@angular/core": "17.0.2", - "@angular/platform-browser": "17.0.2", + "@angular/common": "17.0.3", + "@angular/core": "17.0.3", + "@angular/platform-browser": "17.0.3", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -5877,9 +5878,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6104,14 +6105,14 @@ "dev": true }, "node_modules/@iharbeck/ngx-virtual-scroller": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@iharbeck/ngx-virtual-scroller/-/ngx-virtual-scroller-16.0.0.tgz", - "integrity": "sha512-zdXC/MTamAI5fFxFuFwP/0i+I5mgXulCHflIFITH4MuipLLu1aUkt5o9vbD9QMxehqeRhhQ5nWQVRg6Adosrjg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@iharbeck/ngx-virtual-scroller/-/ngx-virtual-scroller-17.0.0.tgz", + "integrity": "sha512-20BvzxEHvp6yQmB3q4idyzuQ1MsQOJaEnoXLtrsCsU2NM7kJxyWTIVwHAxLX56G99gdKxU8T3GDxb+fVS6GEzw==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@tweenjs/tween.js": "^20.0.3" + "@tweenjs/tween.js": "^21.0.0" } }, "node_modules/@isaacs/cliui": { @@ -6656,9 +6657,9 @@ } }, "node_modules/@ngtools/webpack": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.0.0.tgz", - "integrity": "sha512-/Bb5MXlphNp3UDsQDa4EB4AwpF4D/plrCPd5YGfVvD43j5g5Rpen+cqz5jai1zfAkF1dPl2qq0nRp/jwmJO3uA==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.0.1.tgz", + "integrity": "sha512-IfiWIBY1GntfJFV/U1CSOHZ7zF5p0zFMFzux7/iGXUXit299LTdJ5mZTe9++lFcH6dPHgEPWlinuYAfzorY4ng==", "dev": true, "engines": { "node": "^18.13.0 || >=20.9.0", @@ -6922,21 +6923,21 @@ } }, "node_modules/@nrwl/devkit": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-17.0.3.tgz", - "integrity": "sha512-k1o0tvmGcg2/Kw2d56ULixqngCj5zTfp3mn6yS0ytIJrTQnJVkI8GcFCtpnqbzQjD8nKHhvTIcOMsj2BzLos9A==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-17.1.2.tgz", + "integrity": "sha512-INPZk4qts3xNJt8E9fttuVTufXdigPUOvUiAiPJmR2oUGDF8SeOlIYNForbz+XMRvxyIVtf45O32azUsgeZe3Q==", "dev": true, "dependencies": { - "@nx/devkit": "17.0.3" + "@nx/devkit": "17.1.2" } }, "node_modules/@nrwl/tao": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-17.0.3.tgz", - "integrity": "sha512-X6zcwf6c3z7TuztRJWM/OCfzm7+LI4Uw4coc9+PWr44ohHkgId2wEJTzXrDT3+lvv8DgwPpgWPwqntw+YcgRYg==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-17.1.2.tgz", + "integrity": "sha512-tL+dlygeor/kLG5fuK5qaiVFJ4hEtvJ/E+xY9epp20UKCNQSEkrSFiesiXtX6E/PPf4YbOQ4B4itWR2EYCm03Q==", "dev": true, "dependencies": { - "nx": "17.0.3", + "nx": "17.1.2", "tslib": "^2.3.0" }, "bin": { @@ -6944,12 +6945,12 @@ } }, "node_modules/@nx/devkit": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-17.0.3.tgz", - "integrity": "sha512-gW9aVc2BJBQ6PME07lsiaHg2Tjm9FN/qFjzxeSQYe2cR/s4hXqCBUfgKEqjgzMq+ykDR2Japkd8Vg8BN0uWnpA==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-17.1.2.tgz", + "integrity": "sha512-9Izd9jsa++AaZSSlhi0zkv58k4clzE0kICurx9DjfWN6zXnD08HqJoUYCVVaeYS/SrWlQUbMig8e49BO8ZV5mw==", "dev": true, "dependencies": { - "@nrwl/devkit": "17.0.3", + "@nrwl/devkit": "17.1.2", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -6977,9 +6978,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.0.3.tgz", - "integrity": "sha512-KA75JC/hgkt9qwK4dnN1tlaTXWdYItkNMjji6YjkyAYabbLKQKVcQoPocYP/RB/Gng+vNslXwuug2atgxDf43g==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.1.2.tgz", + "integrity": "sha512-U8fwkuw0vmDfeRQX9LSMt1XiAXM57fxOiuHlrIBn8hUBvMAugAgSAYd7K9YQjrFf9UFUtQeSHDU9N/c/n63hdg==", "cpu": [ "arm64" ], @@ -6993,9 +6994,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-17.0.3.tgz", - "integrity": "sha512-YVWk9jNibD7fzn8oNBl/UNu8NEfcVwFo5wiNyfOql495yP0tyGdZNHD4i/7aS2Y654G1JYDRf7TutJ7wWFU8bg==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-17.1.2.tgz", + "integrity": "sha512-QR9Jrm32UK2nLdDRtjFabfCvF5SOQJ2IuYkw6Sxe16xGZU2DS9nQku0TQO3Uy2HV1xSR7vzj7ys5z4eI2k+/mA==", "cpu": [ "x64" ], @@ -7009,9 +7010,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.0.3.tgz", - "integrity": "sha512-yiYkfY+3IrlBrlaXN6SO4Fnb0a+Ti+FPwAqRPpH6q3uTCh0NmNgE99ydtT31ZbgCF1ZwRK8NdCbuNO3w9uznwA==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.1.2.tgz", + "integrity": "sha512-6rDuFHJREVg5XpcM5RlE8pHP4bgcbns8sSemF/g75SV4iEkBqxRvSe88oBtF44b7IpX2zdONRDV4qQcRf3DxRg==", "cpu": [ "x64" ], @@ -7025,9 +7026,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.0.3.tgz", - "integrity": "sha512-x4h6QJlESJZ0bigUlxNEVyi7F/VWQQx+1IBptofXhK5eTOPjJ5qgINdM38AZg+kBJDz5XOVMDejg6RzHlhs0Tg==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.1.2.tgz", + "integrity": "sha512-4FwqUX7NxVfJ0v7frBKNbjENz6pvp3slDfoG2/WmnAj5a6TCu7magwlg1qLQaHYJ1m/i8u7RrG0Uz4SYHWzkVw==", "cpu": [ "arm" ], @@ -7041,9 +7042,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.0.3.tgz", - "integrity": "sha512-1lysnsZv9FS+9fciK0qh5PhsQ8U+vyFoR/jiJl+3vqYNUwEmNLD0VEAZzpZL2SJXQqD5E0bjuQpYxiD7YRXImQ==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.1.2.tgz", + "integrity": "sha512-r6UATY0dVdxwpVJPf/f/KfRkFpMP06wC6HcfNMGbTBTKiKtsdYF42bWoSkDgtgP2bOx9FDH+Hwu3U/Rtj44FIA==", "cpu": [ "arm64" ], @@ -7057,9 +7058,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.0.3.tgz", - "integrity": "sha512-0/bvSpbc4vOy9E24fu0ajDGe3SO8lmLtlxjXwGRcnzlt/MWM8sazoO0lX163/X2wF6tuL6+HXHOr6AeqsdeRXQ==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.1.2.tgz", + "integrity": "sha512-MXGYY/KCzQhbj5UKwnRO2/GhByOkRlI+EeH1Mazam8wZ1BiBfcVWZoOUybIlxxes1o4cAnkZwB527tCmwrHvGw==", "cpu": [ "arm64" ], @@ -7073,9 +7074,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.0.3.tgz", - "integrity": "sha512-tKO6MYUxpUsHMuZrYy8hG20RIOdBY3kyEK8wxH8JZZaXKeYUK+5vv5DavWpY5wuu2jffNIJNsbUzcrqOlcbDOg==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.1.2.tgz", + "integrity": "sha512-3cC131hJ3VhuxjzzBlwIdVp46onykOo78EmnURNdLxcWOpmcKgYXn7OnVwjrglYi+JL7D0vABGKKUpt1cs6/rA==", "cpu": [ "x64" ], @@ -7089,9 +7090,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.0.3.tgz", - "integrity": "sha512-H88yBLrI51m6NGoCkpBYhacRyTBfDuf7x00SnxSfD1yLlxCazPUG7CGkMedpzXo10YHxCFvg7B/Fa23DRRleUg==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.1.2.tgz", + "integrity": "sha512-1UrR87ByhE0zSXt0C+RNT5ZiAsctOSWZwPYQAGolz8K70BxomDeRVtIaRog5KK5SHlEd1ILvgsmrhovjLjrJNw==", "cpu": [ "x64" ], @@ -7105,9 +7106,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.0.3.tgz", - "integrity": "sha512-bKzmzjvgLB4IzLWTySqXgBgXawfw0ZSjUkscFQ3ZHrK9loMba1Ue8Ugy2DktlkUrCyPmGSot+YZViTzWP75C3w==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.1.2.tgz", + "integrity": "sha512-2M7FfzfPGAN7tCUWZilPGNk/RbbGcA00MKOA4MDqMwJtLobW8KqfMedilRNTEuyNibejOHwvGzA9T/Ac/ahHgA==", "cpu": [ "arm64" ], @@ -7121,9 +7122,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.0.3.tgz", - "integrity": "sha512-SJssAOyUM1IW9t84/Uzau9JHo14hnG5mxvcrborNGlLq+WnP0jzISVs7gvV2xWZ9j1JemxA5KLbkMuIkJyR6qQ==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.1.2.tgz", + "integrity": "sha512-oxKCKunuo4wRusMlNu7PlhBijhtNy7eBZPAWyqUsdfnb+CjY2QncjCguW3fnsG9gHQFCa+y0b1WkSkvJ5G1DiQ==", "cpu": [ "x64" ], @@ -8228,13 +8229,13 @@ } }, "node_modules/@schematics/angular": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.0.0.tgz", - "integrity": "sha512-9jKU5x/WzaBsfSkUowK1X74FqtMXa6+A60XgW4ACO8i6fwKfPeS+tIrAieeYOX80/njBh7I5CvcpHmWA2SbcXQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.0.1.tgz", + "integrity": "sha512-BacI1fQsEXNYkfJzDJn3CsUSc9A4M7nhXtvt3XjceUhOqUp2AR4uIeUwDOrpLnkRwv5+rZLafUnRN3k01WUJOw==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.0.0", - "@angular-devkit/schematics": "17.0.0", + "@angular-devkit/core": "17.0.1", + "@angular-devkit/schematics": "17.0.1", "jsonc-parser": "3.2.0" }, "engines": { @@ -8244,12 +8245,12 @@ } }, "node_modules/@schematics/angular/node_modules/@angular-devkit/schematics": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.0.0.tgz", - "integrity": "sha512-LD7fjDORuBf139/oJ/gSwbIzQPfsm6Y67s1FD+XLi0QXaRt6dw4r7BMD08l1r//oPQofNgbEH4coGVO4NdCL/A==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.0.1.tgz", + "integrity": "sha512-bwgdGviRZC5X8Tl4QcjtIJAcC0p8yIhOyYVFrq4PWYvI+DfV9P6w3OFuoS6rwEoiIQR90+12iKBYMt1MfL/c0Q==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.0.0", + "@angular-devkit/core": "17.0.1", "jsonc-parser": "3.2.0", "magic-string": "0.30.5", "ora": "5.4.1", @@ -10659,11 +10660,16 @@ } }, "node_modules/@tweenjs/tween.js": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-20.0.3.tgz", - "integrity": "sha512-SYUe1UgY5HM05EB4+0B4arq2IPjvyzKXoklXKxSYrc2IFxGm1cBrqg5XbiB5uwbs0xY5j+rj986NAJMM0KZaUw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-21.0.0.tgz", + "integrity": "sha512-qVfOiFh0U8ZSkLgA6tf7kj2MciqRbSCWaJZRwftVO7UbtVDNsZAXpWXqvCDtIefvjC83UJB+vHTDOGm5ibXjEA==", "peer": true }, + "node_modules/@types/ace": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/ace/-/ace-0.0.51.tgz", + "integrity": "sha512-3dkbu9tv6klSmBG3GbDPInKKSuCaZ6HU/OMVPVtYfy+CZiegteTcvEIkFlYRnBjvfGkqpPcf6r4aYKSgNgo5GA==" + }, "node_modules/@types/aria-query": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", @@ -10978,9 +10984,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.1.tgz", + "integrity": "sha512-HhmzZh5LSJNS5O8jQKpJ/3ZcrrlG6L70hpGqMIAoM9YVD0YBRNWYsfwcXq8VnSjlNpCpgLzMXdiPo+dxcvSmiA==", "dependencies": { "undici-types": "~5.26.4" } @@ -10995,20 +11001,6 @@ "form-data": "^4.0.0" } }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@types/node-forge": { "version": "1.3.9", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.9.tgz", @@ -11185,16 +11177,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", - "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", + "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/type-utils": "6.11.0", + "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -11220,13 +11212,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11237,9 +11229,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11250,13 +11242,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11277,17 +11269,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -11302,12 +11294,12 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -11319,15 +11311,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", - "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", + "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4" }, "engines": { @@ -11347,13 +11339,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11364,9 +11356,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11377,13 +11369,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11404,12 +11396,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -11438,13 +11430,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", - "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", + "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/utils": "6.11.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -11465,13 +11457,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11482,9 +11474,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -11495,13 +11487,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11522,17 +11514,17 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -11547,12 +11539,12 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -12021,9 +12013,9 @@ } }, "node_modules/ace-builds": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.31.1.tgz", - "integrity": "sha512-3DnE5bZF6Ji+l4F5acoLk+rV7mxrUt1C4r61Xy9owp5rVM4lj5NL8GJfoX6Jnnbhx6kKV7Vdpb+Tco+0ORTvhg==" + "version": "1.31.2", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.31.2.tgz", + "integrity": "sha512-IeZI9ytPA6mB+goPxPkUPW4vXBoLuaBl5czu2tjtKrMi7mdRgyIUA/8e5JlrI1mqKoMeWHoUujzMTWkyutTdBw==" }, "node_modules/acorn": { "version": "8.10.0", @@ -16449,15 +16441,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -17998,6 +17990,20 @@ "node": ">=8" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "dev": true, @@ -23015,13 +23021,13 @@ "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==" }, "node_modules/nx": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/nx/-/nx-17.0.3.tgz", - "integrity": "sha512-VShJISKCYt3iVJoMUPZiv67+0tiItxWMnfVmTmPZPio2Fu+wGc9U4ijjPxcmp2RJmLRaxkB9cn5rlrAvkIrNMA==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-17.1.2.tgz", + "integrity": "sha512-pf94ri36cAiSzbYcPTJwQzttgAsHSjCLEni0Ilw6aVdjpoV2l6cggYxwddX7pgtCWuokVp/6KhAxVkbzvH65wg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "17.0.3", + "@nrwl/tao": "17.1.2", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.6", @@ -23062,16 +23068,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "17.0.3", - "@nx/nx-darwin-x64": "17.0.3", - "@nx/nx-freebsd-x64": "17.0.3", - "@nx/nx-linux-arm-gnueabihf": "17.0.3", - "@nx/nx-linux-arm64-gnu": "17.0.3", - "@nx/nx-linux-arm64-musl": "17.0.3", - "@nx/nx-linux-x64-gnu": "17.0.3", - "@nx/nx-linux-x64-musl": "17.0.3", - "@nx/nx-win32-arm64-msvc": "17.0.3", - "@nx/nx-win32-x64-msvc": "17.0.3" + "@nx/nx-darwin-arm64": "17.1.2", + "@nx/nx-darwin-x64": "17.1.2", + "@nx/nx-freebsd-x64": "17.1.2", + "@nx/nx-linux-arm-gnueabihf": "17.1.2", + "@nx/nx-linux-arm64-gnu": "17.1.2", + "@nx/nx-linux-arm64-musl": "17.1.2", + "@nx/nx-linux-x64-gnu": "17.1.2", + "@nx/nx-linux-x64-musl": "17.1.2", + "@nx/nx-win32-arm64-msvc": "17.1.2", + "@nx/nx-win32-x64-msvc": "17.1.2" }, "peerDependencies": { "@swc-node/register": "^1.6.7", @@ -23108,9 +23114,9 @@ "dev": true }, "node_modules/nx/node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -23181,20 +23187,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nx/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/nx/node_modules/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index 626d25e88..89adce27c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,26 +15,27 @@ }, "private": true, "dependencies": { - "@angular-devkit/architect": "^0.1700.0", - "@angular/animations": "17.0.2", - "@angular/cdk": "17.0.0", - "@angular/cdk-experimental": "17.0.0", - "@angular/common": "17.0.2", - "@angular/core": "17.0.2", - "@angular/forms": "17.0.2", - "@angular/localize": "17.0.2", - "@angular/platform-browser": "17.0.2", - "@angular/platform-browser-dynamic": "17.0.2", - "@angular/platform-server": "17.0.2", - "@angular/router": "17.0.2", + "@angular-devkit/architect": "^0.1700.1", + "@angular/animations": "17.0.3", + "@angular/cdk": "17.0.1", + "@angular/cdk-experimental": "17.0.1", + "@angular/common": "17.0.3", + "@angular/core": "17.0.3", + "@angular/forms": "17.0.3", + "@angular/localize": "17.0.3", + "@angular/platform-browser": "17.0.3", + "@angular/platform-browser-dynamic": "17.0.3", + "@angular/platform-server": "17.0.3", + "@angular/router": "17.0.3", "@egjs/hammerjs": "2.0.17", "@floating-ui/dom": "^1.5.3", "@graphiql/toolkit": "^0.9.1", - "@iharbeck/ngx-virtual-scroller": "^16.0.0", + "@iharbeck/ngx-virtual-scroller": "^17.0.0", "@lithiumjs/angular": "^7.3.0", "@lithiumjs/ngx-virtual-scroll": "^0.3.0", "@marker.io/browser": "^0.19.0", - "ace-builds": "1.31.1", + "@types/ace": "^0.0.51", + "ace-builds": "^1.31.2", "angular-gridster2": "16.0.0", "angular-mentions": "1.5.0", "bootstrap": "5.2.3", @@ -77,16 +78,16 @@ "zone.js": "0.14.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.0.0", - "@angular-eslint/builder": "17.0.1", - "@angular-eslint/eslint-plugin": "17.0.1", - "@angular-eslint/eslint-plugin-template": "17.0.1", - "@angular-eslint/schematics": "17.0.1", - "@angular-eslint/template-parser": "17.0.1", - "@angular/cli": "^17.0.0", - "@angular/compiler": "^17.0.2", - "@angular/compiler-cli": "^17.0.2", - "@angular/elements": "^17.0.2", + "@angular-devkit/build-angular": "^17.0.1", + "@angular-eslint/builder": "17.1.0", + "@angular-eslint/eslint-plugin": "17.1.0", + "@angular-eslint/eslint-plugin-template": "17.1.0", + "@angular-eslint/schematics": "17.1.0", + "@angular-eslint/template-parser": "17.1.0", + "@angular/cli": "^17.0.1", + "@angular/compiler": "^17.0.3", + "@angular/compiler-cli": "^17.0.3", + "@angular/elements": "^17.0.3", "@compodoc/compodoc": "^1.1.22", "@storybook/addon-actions": "^7.5.3", "@storybook/addon-essentials": "^7.5.3", @@ -100,16 +101,16 @@ "@types/marked": "5.0.1", "@types/mersenne-twister": "1.1.7", "@types/mousetrap": "1.6.14", - "@types/node": "20.9.0", + "@types/node": "20.9.1", "@types/react": "18.2.37", "@types/react-dom": "18.2.15", "@types/simplemde": "1.11.11", "@types/tapable": "2.2.7", "@types/ws": "8.5.9", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "@webcomponents/custom-elements": "^1.6.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-airbnb-typescript": "17.1.0", "eslint-plugin-deprecation": "^2.0.0", "eslint-plugin-import": "2.29.0", diff --git a/frontend/src/app/declarations.d.ts b/frontend/src/app/declarations.d.ts index d8f9fa8d8..172dfdccb 100644 --- a/frontend/src/app/declarations.d.ts +++ b/frontend/src/app/declarations.d.ts @@ -45,12 +45,17 @@ type Content = { title: string; }; +type OnAnnotationCreate = (annotation: AnnotationSelection) => void; +type OnAnnotationUpdate = (annotation: ReadonlyArray) => void; +type OnAnnotationFocus = (annotation: ReadonlyArray) => void; +type OnAssetEdit = (id: string) => void; +type OnAssetUpload = (images: UploadRequest[]) => DelayedPromiseCreator[]; +type OnChange = (value: string | undefined) => void; +type OnContentEdit = (schemaName: string, contentId: string) => void; type OnSelectAIText = () => Promise; type OnSelectAssets = () => Promise; type OnSelectContents = () => Promise; -type OnChange = (value: string | undefined) => void; - type SquidexEditorMode = 'Html' | 'Markdown'; interface UploadRequest { @@ -90,14 +95,22 @@ interface EditorProps { onSelectContents?: OnSelectContents; // Called when an asset is to be edited. - onEditAsset: (assetId: string) => void; + onEditAsset: OnAssetEdit; // Called when a content is to be edited. - onEditContent: (schemaName: string, contentId: string) => void; - + onEditContent: OnContentEdit; // Called when a file needs to be uploaded. - onUpload?: (images: UploadRequest[]) => DelayedPromiseCreator[]; + onUpload?: OnAssetUpload; + + // Triggered, when an annotation is clicked. + onAnnotationsFocus?: OnAnnotationFocus; + + // Triggered, when an annotation are updated. + onAnnotationsUpdate?: OnAnnotationUpdate; + + // Triggered, when an annotation is created. + onAnnotationCreate?: OnAnnotationCreate; // True, if disabled. isDisabled?: boolean; @@ -110,6 +123,22 @@ interface EditorProps { // Indicates whether content items can be selected. canSelectContents?: boolean; + + // The annotations. + annotations?: ReadonlyArray; +} + +interface AnnotationSelection { + // The start of the annotation selection. + from: number; + + // The end of the annotation selection. + to: number; +} + +interface Annotation extends AnnotationSelection { + // The ID of the annotation. + id: string; } type DelayedPromiseCreator = (context: unknown) => Promise; \ No newline at end of file diff --git a/frontend/src/app/features/content/pages/calendar/calendar-page.component.ts b/frontend/src/app/features/content/pages/calendar/calendar-page.component.ts index ee9e5987b..1d1bc008a 100644 --- a/frontend/src/app/features/content/pages/calendar/calendar-page.component.ts +++ b/frontend/src/app/features/content/pages/calendar/calendar-page.component.ts @@ -72,39 +72,39 @@ export class CalendarPageComponent implements AfterViewInit, OnDestroy, OnInit { this.language = this.languagesState.snapshot.languages.find(x => x.language.isMaster)!.language; } - public ngAfterViewInit() { - Promise.all([ + public async ngAfterViewInit() { + await Promise.all([ this.resourceLoader.loadLocalStyle('dependencies/tui-calendar/tui-calendar.min.css'), this.resourceLoader.loadLocalScript('dependencies/tui-calendar/tui-code-snippet.min.js'), this.resourceLoader.loadLocalScript('dependencies/tui-calendar/tui-calendar.min.js'), - ]).then(() => { - const Calendar = tui.Calendar; - - this.calendar = new Calendar(this.calendarContainer.nativeElement, { - defaultView: 'month', - isReadOnly: true, - scheduleView: ['time'], - taskView: false, - ...getLocalizationSettings(), - }); + ]); - this.calendar.on('clickSchedule', (event: any) => { - this.contentSelected = event.schedule.raw; - this.contentDialog.show(); + this.calendar?.destroy(); + this.calendar = new tui.Calendar(this.calendarContainer.nativeElement, { + defaultView: 'month', + isReadOnly: true, + isLoading: false, + scheduleView: ['time'], + taskView: false, + ...getLocalizationSettings(), + }); - this.changeDetector.detectChanges(); - }); + this.calendar.on('clickSchedule', (event: any) => { + this.contentSelected = event.schedule.raw; + this.contentDialog.show(); - this.calendar.on('clickDayname', (event: any) => { - if (this.calendar.getViewName() === 'week') { - this.calendar.setDate(new Date(event.date)); + this.changeDetector.detectChanges(); + }); - this.changeView('day'); - } - }); + this.calendar.on('clickDayname', (event: any) => { + if (this.calendar.getViewName() === 'week') { + this.calendar.setDate(new Date(event.date)); - this.load(); + this.changeView('day'); + } }); + + this.load(); } @HostListener('click', ['$event']) diff --git a/frontend/src/app/features/settings/pages/workflows/workflow-diagram.component.ts b/frontend/src/app/features/settings/pages/workflows/workflow-diagram.component.ts index 5f0a25825..2d39adbc8 100644 --- a/frontend/src/app/features/settings/pages/workflows/workflow-diagram.component.ts +++ b/frontend/src/app/features/settings/pages/workflows/workflow-diagram.component.ts @@ -47,72 +47,78 @@ export class WorkflowDiagramComponent implements AfterViewInit, OnDestroy { this.updateNetwork(); } - private updateNetwork() { - if (this.chartContainer?.nativeElement && this.workflow) { - this.resourceLoader.loadLocalScript('dependencies/vis-network/vis-network.min.js') - .then(() => { - this.network?.destroy(); - - const nodes = new vis.DataSet(); + private async updateNetwork() { + if (!this.chartContainer?.nativeElement || !this.workflow) { + return; + } - for (const step of this.workflow.steps) { - let label = `${step.name}`; + await this.resourceLoader.loadLocalScript('dependencies/vis-network/vis-network.min.js'); - if (step.noUpdate) { - label += '\nPrevent updates'; + const { edges, nodes } = buildGraph(this.workflow); - if (step.noUpdateExpression) { - label += `\nwhen (${step.noUpdateExpression})`; - } + this.network?.destroy(); + this.network = new vis.Network(this.chartContainer.nativeElement, { edges, nodes }, GRAPH_OPTIONS); + this.network.stabilize(); + this.network.fit(); - if (step.noUpdateRoles && step.noUpdateRoles.length > 0) { - label += `\nfor ${step.noUpdateRoles.join(', ')}`; - } - } + this.isLoaded = true; + } +} - if (step.name === 'Published') { - label += '\nAvailable in the API'; - } +function buildGraph(workflow: WorkflowDto) { + const nodes = new vis.DataSet(); - const node: any = { id: step.name, label, color: step.color }; + for (const step of workflow.steps) { + let label = `${step.name}`; - nodes.add(node); - } + if (step.noUpdate) { + label += '\nPrevent updates'; - if (this.workflow.initial) { - nodes.add({ id: 0, color: '#000', label: 'Start', shape: 'dot', size: 3 }); - } + if (step.noUpdateExpression) { + label += `\nwhen (${step.noUpdateExpression})`; + } - const edges = new vis.DataSet(); + if (step.noUpdateRoles && step.noUpdateRoles.length > 0) { + label += `\nfor ${step.noUpdateRoles.join(', ')}`; + } + } - for (const transition of this.workflow.transitions) { - let label = ''; + if (step.name === 'Published') { + label += '\nAvailable in the API'; + } - if (transition.expression) { - label += `\nwhen (${transition.expression})`; - } + const node: any = { id: step.name, label, color: step.color }; - if (transition.roles && transition.roles.length > 0) { - label += `\nfor ${transition.roles.join(', ')}`; - } + nodes.add(node); + } - const edge: any = { ...transition, label }; + if (workflow.initial) { + nodes.add({ id: 0, color: '#000', label: 'Start', shape: 'dot', size: 3 }); + } - edges.add(edge); - } + const edges = new vis.DataSet(); - if (this.workflow.initial) { - edges.add({ from: 0, to: this.workflow.initial }); - } + for (const transition of workflow.transitions) { + let label = ''; - this.network = new vis.Network(this.chartContainer.nativeElement, { edges, nodes }, GRAPH_OPTIONS); - this.network.stabilize(); - this.network.fit(); + if (transition.expression) { + label += `\nwhen (${transition.expression})`; + } - this.isLoaded = true; - }); + if (transition.roles && transition.roles.length > 0) { + label += `\nfor ${transition.roles.join(', ')}`; } + + const edge: any = { ...transition, label }; + + edges.add(edge); } + + if (workflow.initial) { + edges.add({ from: 0, to: workflow.initial }); + } + + return { edges, nodes }; } const GRAPH_OPTIONS = { diff --git a/frontend/src/app/framework/angular/forms/editors/code-editor.component.ts b/frontend/src/app/framework/angular/forms/editors/code-editor.component.ts index 99d6f6d90..b438aa857 100644 --- a/frontend/src/app/framework/angular/forms/editors/code-editor.component.ts +++ b/frontend/src/app/framework/angular/forms/editors/code-editor.component.ts @@ -8,11 +8,9 @@ import { AfterViewInit, booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, forwardRef, Input, numberAttribute, ViewChild } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { debounceTime, Subject } from 'rxjs'; -import { ResourceLoaderService, ScriptCompletions, StatefulControlComponent, TypedSimpleChanges, Types } from '@app/framework/internal'; +import { ResourceLoaderService, ScriptCompletion, ScriptCompletions, StatefulControlComponent, TypedSimpleChanges, Types } from '@app/framework/internal'; import { FocusComponent } from '../forms-helper'; -declare const ace: any; - export const SQX_CODE_EDITOR_CONTROL_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CodeEditorComponent), multi: true, }; @@ -28,11 +26,11 @@ export const SQX_CODE_EDITOR_CONTROL_VALUE_ACCESSOR: any = { changeDetection: ChangeDetectionStrategy.OnPush, }) export class CodeEditorComponent extends StatefulControlComponent<{}, any> implements AfterViewInit, FocusComponent { - private aceEditor: any; - private aceTools: any; + private aceModes?: ModeList; + private aceEditor?: AceAjax.Editor; + private aceTools = false; private valueChanged = new Subject(); private value = ''; - private modelist: any; private completions: ReadonlyArray<{ name: string; value: string }> = []; @ViewChild('editor', { static: false }) @@ -137,84 +135,88 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple this.aceEditor.focus(); } - public ngAfterViewInit() { + public async ngAfterViewInit() { this.valueChanged.pipe(debounceTime(500)) .subscribe(() => { this.changeValue(); }); - Promise.all([ + await Promise.all([ this.resourceLoader.loadLocalScript('dependencies/ace/ace.js'), this.resourceLoader.loadLocalScript('dependencies/ace/ext-modelist.js'), this.resourceLoader.loadLocalScript('dependencies/ace/ext-language_tools.js'), - ]).then(() => { - this.modelist = ace.require('ace/ext-modelist'); - - this.aceEditor = ace.edit(this.editor.nativeElement); - this.aceEditor.setFontSize(14); - this.aceTools = ace.require('ace/ext-language_tools'); - - this.setValue(this.value); - this.setMode(); - this.setOptions(); - this.setWordWrap(); - this.onDisabled(this.snapshot.isDisabled); - - if (this.aceTools) { - const previous = this.aceEditor.completers; - - this.aceEditor.completers = [ - previous?.[0], { - getCompletions: (editor: any, session: any, pos: any, prefix: any, callback: any) => { - callback(null, this.completions); - }, - getDocTooltip: (item: any) => { - if (item.path && item.description) { - item.docHTML = `${item.value}
    ${item.description}`; + ]); + + this.aceEditor = ace.edit(this.editor.nativeElement); + this.aceEditor.setFontSize('14px'); + this.aceModes = ace.require('ace/ext-modelist'); + this.aceTools = !!ace.require('ace/ext-language_tools'); + + this.setValue(this.value); + this.setMode(); + this.setOptions(); + this.setWordWrap(); + this.onDisabled(this.snapshot.isDisabled); + + if (this.aceTools) { + const previous = (this.aceEditor as any)['completers'] as AceAjax.Completer[]; + + (this.aceEditor as any)['completers'] = [ + previous?.[0], { + getCompletions: (editor: any, session: any, pos: any, prefix: any, callback: any) => { + callback(null, this.completions); + }, + getDocTooltip: (item: AceAjax.Completion) => { + const source = item as unknown as ScriptCompletion; - if (item.allowedValues) { - item.docHTML += '
    Allowed Values:
      '; + if (source.path && source.description) { + item.docHTML = `${item.value}
      ${source.description}`; - for (const value of item.allowedValues) { - item.docHTML += `
    • ${value}
    • `; - } + if (source.allowedValues) { + item.docHTML += '
      Allowed Values:
        '; - item.docHTML += '
      '; + for (const value of source.allowedValues) { + item.docHTML += `
    • ${value}
    • `; } - if (item.deprecationReason) { - item.docHTML += `
      Deprecated: ${item.deprecationReason}
      `; - } + item.docHTML += '
    '; } - }, - // eslint-disable-next-line no-useless-escape - identifierRegexps: [/[a-zA-Z_0-9\$\-\.\u00A2-\u2000\u2070-\uFFFF]/], - }, - ]; - } - this.aceEditor.on('blur', () => { - this.changeValue(); - this.callTouched(); - }); + if (source.deprecationReason) { + item.docHTML += `
    Deprecated: ${source.deprecationReason}
    `; + } + } + }, + identifierRegexps: [/[a-zA-Z_0-9\$\-\.\u00A2-\u2000\u2070-\uFFFF]/], + } as AceAjax.Completer, + ]; + } + this.aceEditor.on('blur', () => { + this.changeValue(); - this.aceEditor.on('change', () => { - this.valueChanged.next(true); - }); + this.callTouched(); + }); - this.aceEditor.on('paste', (event: any) => { - if (this.singleLine) { - event.text = event.text.replace(/[\r\n]+/g, ' '); - } - }); + this.aceEditor.on('change', () => { + this.valueChanged.next(true); + }); - this.detach(); + this.aceEditor.on('paste', (event: any) => { + if (this.singleLine) { + event.text = event.text.replace(/[\r\n]+/g, ' '); + } }); + + this.detach(); } private changeValue() { + if (!this.aceEditor) { + return; + } + let newValueText = this.aceEditor.getValue(); - let newValueOut = newValueText; + let newValueOut: string | null = newValueText; if (this.valueMode === 'Json') { const isValid = this.aceEditor.getSession().getAnnotations().length === 0; @@ -252,8 +254,8 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple return; } - if (this.valueFile && this.modelist) { - const mode = this.modelist.getModeForPath(this.valueFile).mode; + if (this.valueFile && this.aceModes) { + const mode = this.aceModes.getModeForPath(this.valueFile).mode; this.aceEditor.getSession().setMode(mode); } else { @@ -286,9 +288,9 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple this.aceEditor.setOptions({ autoScrollEditorIntoView: this.singleLine, - enableBasicAutocompletion: !!this.aceTools, - enableLiveAutocompletion: !!this.aceTools, - enableSnippets: !!this.aceTools && !this.singleLine && this.snippets, + enableBasicAutocompletion: this.aceTools, + enableLiveAutocompletion: this.aceTools, + enableSnippets: this.aceTools && !this.singleLine && this.snippets, highlightActiveLine: !this.singleLine, maxLines, minLines, @@ -296,11 +298,15 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple showGutter: !this.singleLine, }); - this.aceEditor.commands.bindKey('Enter|Shift-Enter', this.singleLine ? 'null' : undefined); + this.aceEditor.commands.bindKey('Enter|Shift-Enter', this.singleLine ? 'null' : undefined as any); } private setValue(value: string) { - this.aceEditor.setValue(value); - this.aceEditor.clearSelection(); + this.aceEditor?.setValue(value); + this.aceEditor?.clearSelection(); } } + +interface ModeList { + getModeForPath(path: string): { mode: string }; +} diff --git a/frontend/src/app/framework/angular/video-player.component.ts b/frontend/src/app/framework/angular/video-player.component.ts index eb8ab67cb..278bbfe87 100644 --- a/frontend/src/app/framework/angular/video-player.component.ts +++ b/frontend/src/app/framework/angular/video-player.component.ts @@ -49,18 +49,18 @@ export class VideoPlayerComponent implements AfterViewInit, OnDestroy { } } - public ngAfterViewInit() { - Promise.all([ + public async ngAfterViewInit() { + await Promise.all([ this.resourceLoader.loadLocalScript('dependencies/videojs/video.min.js'), this.resourceLoader.loadLocalStyle('dependencies/videojs/videojs.min.css'), - ]).then(() => { - this.renderer.removeClass(this.video.nativeElement, 'hidden'); + ]); - this.player = videojs(this.video.nativeElement, { - fluid: true, - }); + this.renderer.removeClass(this.video.nativeElement, 'hidden'); - this.ngOnChanges(); + this.player = videojs(this.video.nativeElement, { + fluid: true, }); + + this.ngOnChanges(); } } diff --git a/frontend/src/app/shared/components/forms/geolocation-editor.component.ts b/frontend/src/app/shared/components/forms/geolocation-editor.component.ts index ef15828df..46ecd2085 100644 --- a/frontend/src/app/shared/components/forms/geolocation-editor.component.ts +++ b/frontend/src/app/shared/components/forms/geolocation-editor.component.ts @@ -175,112 +175,111 @@ export class GeolocationEditorComponent extends StatefulControlComponent { - this.map = L.map(this.editor.nativeElement).fitWorld(); - - L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', - { - attribution: '©
    OpenStreetMap contributors', - }).addTo(this.map); - - this.resourceLoader.loadLocalScript('dependencies/leaflet/Control.Geocoder.min.js') - .then(() => { - L.Control.geocoder({ - defaultMarkGeocode: false, - }) - .on('markgeocode', (event: any) => { - const center = event.geocode.center; - - if (!this.snapshot.isDisabled) { - this.updateValue(center.lat, center.lng); - this.updateMarker({ reset: true, fire: true }); - } - }) - .addTo(this.map); - }); + ]); - this.map.on('click', (event: any) => { - if (!this.snapshot.isDisabled) { - const latlng = event.latlng.wrap(); + await Promise.all([ + this.resourceLoader.loadLocalStyle('dependencies/leaflet/Control.Geocoder.css'), + this.resourceLoader.loadLocalScript('dependencies/leaflet/Control.Geocoder.min.js'), + ]); - this.updateValue(latlng.lat, latlng.lng); - this.updateMarker({ fire: true }); - } - }); + this.map = L.map(this.editor.nativeElement).fitWorld(); - this.updateMarker({ reset: true }); + L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', + { + attribution: '© OpenStreetMap contributors', + }).addTo(this.map); - if (this.snapshot.isDisabled) { - this.map.zoomControl.disable(); + L.Control.geocoder({ + defaultMarkGeocode: false, + }) + .on('markgeocode', (event: any) => { + const center = event.geocode.center; - this.map._handlers.forEach((handler: any) => { - handler.disable(); - }); + if (!this.snapshot.isDisabled) { + this.updateValue(center.lat, center.lng); + this.updateMarker({ reset: true, fire: true }); + } + }) + .addTo(this.map); + + this.map.on('click', (event: any) => { + if (!this.snapshot.isDisabled) { + const latlng = event.latlng.wrap(); + + this.updateValue(latlng.lat, latlng.lng); + this.updateMarker({ fire: true }); } }); + + this.updateMarker({ reset: true }); + + if (this.snapshot.isDisabled) { + this.map.zoomControl.disable(); + + this.map._handlers.forEach((handler: any) => { + handler.disable(); + }); + } } - private ngAfterViewInitGoogle(apiKey: string) { - this.resourceLoader.loadScript(`https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`) - .then(() => { - this.map = new google.maps.Map(this.editor.nativeElement, - { - zoom: 1, - fullscreenControl: false, - mapTypeControl: false, - mapTypeControlOptions: {}, - streetViewControl: false, - center: { lat: 0, lng: 0 }, - }); - - const searchBox = new google.maps.places.SearchBox(this.searchBoxInput.nativeElement); - - this.map.addListener('click', (event: any) => { - if (!this.snapshot.isDisabled) { - const latlng = event.latLng; + private async ngAfterViewInitGoogle(apiKey: string) { + await this.resourceLoader.loadScript(`https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`); - this.updateValue(latlng.lat(), latlng.lng()); - this.updateMarker({ fire: true }); - } - }); + this.map = new google.maps.Map(this.editor.nativeElement, { + zoom: 1, + fullscreenControl: false, + mapTypeControl: false, + mapTypeControlOptions: {}, + streetViewControl: false, + center: { lat: 0, lng: 0 }, + }); - this.map.addListener('bounds_changed', () => { - searchBox.setBounds(this.map.getBounds()); - }); + const searchBox = new google.maps.places.SearchBox(this.searchBoxInput.nativeElement); - searchBox.addListener('places_changed', () => { - const places = searchBox.getPlaces(); + this.map.addListener('click', (event: any) => { + if (!this.snapshot.isDisabled) { + const latlng = event.latLng; - if (places.length === 1) { - const place = places[0]; + this.updateValue(latlng.lat(), latlng.lng()); + this.updateMarker({ fire: true }); + } + }); - if (!place.geometry) { - return; - } + this.map.addListener('bounds_changed', () => { + searchBox.setBounds(this.map.getBounds()); + }); - if (!this.snapshot.isDisabled) { - const lat = place.geometry.location.lat(); - const lng = place.geometry.location.lng(); + searchBox.addListener('places_changed', () => { + const places = searchBox.getPlaces(); - this.updateValue(lat, lng); - this.updateMarker({ pan: true, fire: true }); - } - } - }); + if (places.length === 1) { + const place = places[0]; - this.updateMarker({ reset: true }); + if (!place.geometry) { + return; + } - if (this.snapshot.isDisabled) { - this.map.setOptions({ draggable: false, zoomControl: false }); + if (!this.snapshot.isDisabled) { + const lat = place.geometry.location.lat(); + const lng = place.geometry.location.lng(); + + this.updateValue(lat, lng); + this.updateMarker({ pan: true, fire: true }); } - }); + } + }); + + this.updateMarker({ reset: true }); + + if (this.snapshot.isDisabled) { + this.map.setOptions({ draggable: false, zoomControl: false }); + } } public clearValue() { diff --git a/frontend/src/app/shared/components/forms/rich-editor.component.ts b/frontend/src/app/shared/components/forms/rich-editor.component.ts index 93cfdf0fe..675047b66 100644 --- a/frontend/src/app/shared/components/forms/rich-editor.component.ts +++ b/frontend/src/app/shared/components/forms/rich-editor.component.ts @@ -110,64 +110,66 @@ export class RichEditorComponent extends StatefulControlComponent<{}, string> im } } - public ngAfterViewInit() { - this.resourceLoader.loadLocalStyle('editor/squidex-editor.css'); - this.resourceLoader.loadLocalScript('editor/squidex-editor.js').then(() => { - this.editorWrapper = new SquidexEditorWrapper(this.editor.nativeElement, { - value: this.value || '', - isDisabled: this.snapshot.isDisabled, - onSelectAIText: async () => { - if (this.snapshot.isDisabled) { - return; - } - - this.currentChat = new ResolvablePromise(); - this.chatDialog.show(); - - return await this.currentChat.promise; - }, - onSelectAssets: async () => { - if (this.snapshot.isDisabled) { - return; - } - - this.currentAssets = new ResolvablePromise(); - this.assetsDialog.show(); - - return await this.currentAssets.promise; - }, - onSelectContents: async () => { - if (this.snapshot.isDisabled) { - return; - } - - this.currentContents = new ResolvablePromise(); - this.contentsDialog.show(); - - return await this.currentContents.promise; - }, - onUpload: (requests: UploadRequest[]) => { - return this.uploadFiles(requests); - }, - onChange: (value: string | undefined) => { - this.callChange(value); - }, - onEditContent: (schemaName, id) => { - const url = this.apiUrl.buildUrl(`/app/${this.appsState.appName}/content/${schemaName}/${id}`); - - window.open(url, '_blank'); - }, - onEditAsset: id => { - this.assetId.next(id); - }, - appName: this.appsState.appName, - baseUrl: this.apiUrl.buildUrl(''), - canSelectAIText: this.hasChatBot, - canSelectAssets: true, - canSelectContents: !!this.schemaIds, - classNames: this.classNames, - mode: this.mode, - }); + public async ngAfterViewInit() { + await Promise.all([ + this.resourceLoader.loadLocalStyle('editor/squidex-editor.css'), + this.resourceLoader.loadLocalScript('editor/squidex-editor.js'), + ]); + + this.editorWrapper = new SquidexEditorWrapper(this.editor.nativeElement, { + onSelectAIText: async () => { + if (this.snapshot.isDisabled) { + return; + } + + this.currentChat = new ResolvablePromise(); + this.chatDialog.show(); + + return await this.currentChat.promise; + }, + onSelectAssets: async () => { + if (this.snapshot.isDisabled) { + return; + } + + this.currentAssets = new ResolvablePromise(); + this.assetsDialog.show(); + + return await this.currentAssets.promise; + }, + onSelectContents: async () => { + if (this.snapshot.isDisabled) { + return; + } + + this.currentContents = new ResolvablePromise(); + this.contentsDialog.show(); + + return await this.currentContents.promise; + }, + onUpload: (requests: UploadRequest[]) => { + return this.uploadFiles(requests); + }, + onChange: (value: string | undefined) => { + this.callChange(value); + }, + onEditContent: (schemaName, id) => { + const url = this.apiUrl.buildUrl(`/app/${this.appsState.appName}/content/${schemaName}/${id}`); + + window.open(url, '_blank'); + }, + onEditAsset: id => { + this.assetId.next(id); + }, + mode: this.mode, + appName: this.appsState.appName, + baseUrl: this.apiUrl.buildUrl(''), + canSelectAIText: this.hasChatBot, + canSelectAssets: true, + canSelectContents: !!this.schemaIds, + classNames: this.classNames, + isDisabled: this.snapshot.isDisabled, + value: this.value || '', }); } diff --git a/frontend/src/app/shared/services/auth.service.ts b/frontend/src/app/shared/services/auth.service.ts index 922e3cfc4..b10e3d400 100644 --- a/frontend/src/app/shared/services/auth.service.ts +++ b/frontend/src/app/shared/services/auth.service.ts @@ -170,8 +170,10 @@ export class AuthService { throw new Error('Retry limit exceeded.'); } - private checkState(promise: Promise) { - promise.then(user => { + private async checkState(promise: Promise) { + try { + const user = await promise; + if (user) { this.user$.next(getProfile(user)); } else { @@ -179,11 +181,11 @@ export class AuthService { } return true; - }, _ => { + } catch { this.user$.next(null); return false; - }); + } } } diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index fac8571a3..6f8735b0b 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", - "types": [] }, "files": [ "src/main.ts"