# encoding: utf-8
from aiohttp import web
import socketio 
import sys
import argparse 
import math
import asyncio
from time import time as now


# 
# args setup
# 
parser = argparse.ArgumentParser(description="aiohttp server") 
parser.add_argument('--port') 
parser.add_argument('--custom-css', default="") 
parser.add_argument('--custom-js', default="")
args = parser.parse_args()

# globals 
last_time_data_was_viewed = -math.inf
last_time_data_was_updated = now()
debugging = False

# 
# server setup
# 
app = web.Application(client_max_size=(1024 ** 2 * 100))
routes = web.RouteTableDef()
options = {} if not debugging else dict(logger=True, engineio_logger=True)
sio = socketio.AsyncServer(async_mode='aiohttp', cors_allowed_origins="*", **options); sio.attach(app)
cards = "{}"
large_data = {}

if debugging: print('starting server') 

@routes.get('/')
async def index(request : web.Request): 
    if debugging: print(f'''web request''')
    global cards
    global last_time_data_was_viewed
    output = r'''
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <style>
                /* From: https://unpkg.com/css-baseline@1.3.0/css/3.css */
                @-ms-viewport {
                    width: device-width;
                }
                article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, main, summary {
                    display: block;
                }

                *, *::before, *::after {
                box-sizing: inherit;
                }

                html {
                /* 1 */
                box-sizing: border-box;
                /* 2 */
                touch-action: manipulation;
                /* 3 */
                -webkit-text-size-adjust: 100%;
                -ms-text-size-adjust: 100%;
                /* 4 */
                -ms-overflow-style: scrollbar;
                /* 5 */
                -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
                }

                body {
                line-height: 1;
                }

                html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, main {
                font-size: 100%;
                font: inherit;
                vertical-align: baseline;
                }

                ol, ul {
                list-style: none;
                }

                blockquote, q {
                quotes: none;
                }

                blockquote::before, blockquote::after, q::before, q::after {
                content: "";
                content: none;
                }

                table {
                border-collapse: collapse;
                border-spacing: 0;
                }

                hr {
                /* 1 */
                box-sizing: content-box;
                height: 0;
                /* 2 */
                overflow: visible;
                }

                pre, code, kbd, samp {
                /* 1 */
                font-family: monospace, monospace;
                }

                pre {
                /* 2 */
                overflow: auto;
                /* 3 */
                -ms-overflow-style: scrollbar;
                }

                a {
                /* 1 */
                background-color: transparent;
                /* 2 */
                -webkit-text-decoration-skip: objects;
                }

                abbr[title] {
                /* 1 */
                border-bottom: none;
                /* 2 */
                text-decoration: underline;
                text-decoration: underline dotted;
                }

                b, strong {
                font-weight: bolder;
                }

                small {
                font-size: 80%;
                }

                sub, sup {
                font-size: 75%;
                line-height: 0;
                position: relative;
                }

                sub {
                bottom: -0.25em;
                }

                sup {
                top: -0.5em;
                }

                img {
                border-style: none;
                }

                svg:not(:root) {
                overflow: hidden;
                }

                button {
                border-radius: 0;
                }

                input, button, select, optgroup, textarea {
                font-family: inherit;
                font-size: inherit;
                line-height: inherit;
                }

                button, [type=reset], [type=submit], html [type=button] {
                -webkit-appearance: button;
                }

                input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
                -webkit-appearance: listbox;
                }

                fieldset {
                min-width: 0;
                }

                [tabindex="-1"]:focus {
                outline: 0 !important;
                }

                button, input {
                overflow: visible;
                }

                button, select {
                text-transform: none;
                }

                button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner {
                border-style: none;
                padding: 0;
                }

                legend {
                /* 1 */
                max-width: 100%;
                white-space: normal;
                /* 2 */
                color: inherit;
                /* 3 */
                display: block;
                }

                progress {
                vertical-align: baseline;
                }

                textarea {
                overflow: auto;
                }

                [type=checkbox], [type=radio] {
                /* 1 */
                box-sizing: border-box;
                /* 2 */
                padding: 0;
                }

                [type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button {
                height: auto;
                }

                [type=search] {
                /* 1 */
                -webkit-appearance: textfield;
                /* 2 */
                outline-offset: -2px;
                }

                [type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration {
                -webkit-appearance: none;
                }

                ::-webkit-file-upload-button {
                /* 1 */
                -webkit-appearance: button;
                /* 2 */
                font: inherit;
                }

                template {
                display: none;
                }

                [hidden] {
                display: none;
                }

                button:focus {
                outline: 1px dotted;
                outline: 5px auto -webkit-focus-ring-color;
                }

                button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring {
                outline: 1px dotted ButtonText;
                }

                html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, main {
                margin: 0;
                padding: 0;
                border: 0;
                }

                input, button, select, optgroup, textarea {
                margin: 0;
                }

                body {
                width: 100vw;
                min-height: 100vh;
                overflow: visible;
                scroll-behavior: auto;
                }

                textarea {
                resize: vertical;
                }

                br {
                display: block;
                content: "";
                border-bottom: 0px solid transparent;
                }

                h1 {
                font-size: 2.78rem;
                }

                h2 {
                font-size: 2.454rem;
                }

                h3 {
                font-size: 2.128rem;
                }

                h4 {
                font-size: 1.802rem;
                }

                h5 {
                font-size: 1.476rem;
                }

                h6 {
                font-size: 1.15rem;
                }

                body {
                font-family: sans-serif;
                }

                :root {
                --css-baseline-scrollbar-background: lightgray;
                --css-baseline-scrollbar-foreground: dimgray;
                }

                * {
                scrollbar-color: var(--css-baseline-scrollbar-foreground) var(--css-baseline-scrollbar-background);
                }

                *::-webkit-scrollbar {
                    width: 10px;
                }

                *::-webkit-scrollbar-track {
                    background: var(--css-baseline-scrollbar-background);
                }

                *::-webkit-scrollbar-thumb {
                    background-color: var(--css-baseline-scrollbar-foreground);
                    border: 2px solid var(--css-baseline-scrollbar-background);
                    border-radius: 20px;
                }
            </style>
            <link rel="stylesheet" href="https://unpkg.com/css-baseline/css/3.css"> 
            <script>
                const actualParse = JSON.parse
                JSON.parse = (string, ...args) => {
                    string = string.replace(/[^\x00-\x7F]+/, "")
                    try {
                        var output = actualParse(string, ...args)
                    } catch (error) {
                        console.log('string = ', string)
                        console.log('string = ', JSON.stringify(string))
                        console.log('error = ', error)
                    }
                    return output
                }
            </script>
            <script>
                    window.Milkdown=(()=>{var e,t=function(e,n,r,o){var i,s="function"==typeof t&&t,a="function"==typeof require&&require;function c(r,o){if(!n[r]){if(!e[r]){var i="function"==typeof t&&t;if(!o&&i)return i(r,!0);if(s)return s(r,!0);if(a&&"string"==typeof r)return a(r);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(t){return e[r][1][t]||t},d.cache={};var u=n[r]=new c.Module(r);e[r][0].call(u.exports,d,u,u.exports,this)}return n[r].exports;function d(e){return c(d.resolve(e))}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=n,c.parent=s,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]};for(var l=0;l<r.length;l++)try{c(r[l])}catch(e){i||(i=e)}if(r.length){var u=c(r[r.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}if(t=c,i)throw i;return c}({"../node_modules/tslib/tslib.es6.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.__extends=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},n.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},n.__decorate=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},n.__param=function(e,t){return function(n,r){t(n,r,e)}},n.__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},n.__awaiter=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},n.__generator=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},n.__exportStar=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},n.__values=s,n.__read=a,n.__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},n.__spreadArrays=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},n.__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},n.__await=c,n.__asyncGenerator=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||a(e,t)})})}function a(e,t){try{(n=o[e](t)).value instanceof c?Promise.resolve(n.value.v).then(l,u):d(i[0][2],n)}catch(e){d(i[0][3],e)}var n}function l(e){a("next",e)}function u(e){a("throw",e)}function d(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},n.__asyncDelegator=function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:c(e[r](t)),done:"return"===r}:o?o(t):t}:o}},n.__asyncValues=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){t=e[n](t),function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,t.done,t.value)})}}},n.__makeTemplateObject=function(e,t){Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t;return e},n.__importStar=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return l(t,e),t},n.__importDefault=function(e){return e&&e.__esModule?e:{default:e}},n.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},n.__classPrivateFieldSet=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},n.__createBinding=n.__assign=void 0;var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var o=function(){return n.__assign=o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};n.__assign=o;var i=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function c(e){return this instanceof c?(this.v=e,this):new c(e)}n.__createBinding=i;var l=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}},{}],"../node_modules/@milkdown/exception/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.themeMustInstalled=n.callCommandBeforeEditorView=n.expectDomTypeError=n.getAtomFromSchemaFail=n.serializerMatchError=n.parserMatchError=n.stackOverFlow=n.createNodeInParserFail=n.ctxCallOutOfScope=n.timerNotFound=n.contextNotFound=n.docTypeError=void 0;const r=(e,t)=>"function"==typeof t?"[Function]":t,o=e=>JSON.stringify(e,r);n.docTypeError=(e=>new Error(`Doc type error, unsupported type: ${o(e)}`));n.contextNotFound=(e=>new Error(`Context "${e}" not found, do you forget to inject it?`));n.timerNotFound=(()=>new Error("Timer not found, do you forget to record it?"));n.ctxCallOutOfScope=(()=>new Error("Should not call a context out of the plugin."));n.createNodeInParserFail=((...e)=>{const t=e.reduce((e,t)=>{if(!t)return e;const n=e=>Array.isArray(e)?e.map(e=>n(e)).join(", "):e.toJSON?o(e.toJSON()):e.spec?o(e.spec):e.toString();return`${e}, ${n(t)}`},"Create prosemirror node from remark failed in parser");return new Error(t)});n.stackOverFlow=(()=>new Error("Stack over flow, cannot pop on an empty stack."));n.parserMatchError=(e=>new Error(`Cannot match target parser for node: ${o(e)}.`));n.serializerMatchError=(e=>new Error(`Cannot match target serializer for node: ${o(e)}.`));n.getAtomFromSchemaFail=((e,t)=>new Error(`Cannot get ${e}: ${t} from schema.`));n.expectDomTypeError=(e=>new Error(`Expect to be a dom, but get: ${o(e)}.`));n.callCommandBeforeEditorView=(()=>new Error("You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized"));n.themeMustInstalled=(()=>new Error("It seems that no theme found in editor, please make sure you have use theme in front of all plugins.\n        If you prefer to use an empty theme, you can use `themeFactory({})`."))},{}],"../node_modules/@milkdown/ctx/lib/context/container.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createContainer=void 0;var r=e("@milkdown/exception");n.createContainer=(()=>{const e=new Map;return{getSlice:t=>{const n=e.get(t.id);if(!n)throw(0,r.contextNotFound)(t.sliceName);return n},sliceMap:e}})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/ctx/lib/context/shallow-clone.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shallowClone=void 0;n.shallowClone=(e=>Array.isArray(e)?[...e]:"object"==typeof e?Object.assign({},e):e)},{}],"../node_modules/@milkdown/ctx/lib/context/slice.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSlice=void 0;var r=e("@milkdown/exception"),o=e("./shallow-clone");n.createSlice=((e,t)=>{const n=Symbol("Context"),i=(t,r=(0,o.shallowClone)(e))=>{let i=r;const s={id:n,set:e=>{i=e},get:()=>i,update:e=>{i=e(i)}};return t.set(n,s),s};return i.sliceName=t,i.id=n,i._typeInfo=(()=>{throw(0,r.ctxCallOutOfScope)()}),i})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js","./shallow-clone":"../node_modules/@milkdown/ctx/lib/context/shallow-clone.js"}],"../node_modules/@milkdown/ctx/lib/context/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./container");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./slice");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))})},{"./container":"../node_modules/@milkdown/ctx/lib/context/container.js","./slice":"../node_modules/@milkdown/ctx/lib/context/slice.js"}],"../node_modules/@milkdown/ctx/lib/plugin/ctx.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Ctx=void 0;var r,o,i=e("tslib");n.Ctx=class{constructor(e,t){r.set(this,void 0),o.set(this,void 0),this.use=(e=>(0,i.__classPrivateFieldGet)(this,r,"f").getSlice(e)),this.get=(e=>this.use(e).get()),this.set=((e,t)=>this.use(e).set(t)),this.update=((e,t)=>this.use(e).update(t)),this.timing=(e=>(0,i.__classPrivateFieldGet)(this,o,"f").get(e)),this.wait=(e=>this.timing(e)()),this.done=(e=>this.timing(e).done()),this.waitTimers=(e=>(0,i.__awaiter)(this,void 0,void 0,function*(){yield Promise.all(this.get(e).map(e=>this.wait(e)))})),(0,i.__classPrivateFieldSet)(this,r,e,"f"),(0,i.__classPrivateFieldSet)(this,o,t,"f")}},r=new WeakMap,o=new WeakMap},{tslib:"../node_modules/tslib/tslib.es6.js"}],"../node_modules/@milkdown/ctx/lib/plugin/pre.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Pre=void 0;var r,o,i=e("tslib");n.Pre=class{constructor(e,t){r.set(this,void 0),o.set(this,void 0),this.inject=((e,t)=>(e((0,i.__classPrivateFieldGet)(this,r,"f").sliceMap,t),this)),this.record=(e=>(e((0,i.__classPrivateFieldGet)(this,o,"f").store),this)),(0,i.__classPrivateFieldSet)(this,r,e,"f"),(0,i.__classPrivateFieldSet)(this,o,t,"f")}},r=new WeakMap,o=new WeakMap},{tslib:"../node_modules/tslib/tslib.es6.js"}],"../node_modules/@milkdown/ctx/lib/plugin/types.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"../node_modules/@milkdown/ctx/lib/plugin/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./ctx");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./pre");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./types");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))})},{"./ctx":"../node_modules/@milkdown/ctx/lib/plugin/ctx.js","./pre":"../node_modules/@milkdown/ctx/lib/plugin/pre.js","./types":"../node_modules/@milkdown/ctx/lib/plugin/types.js"}],"../node_modules/@milkdown/ctx/lib/timing/clock.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createClock=void 0;var r=e("@milkdown/exception");n.createClock=(()=>{const e=new Map;return{store:e,get:t=>{const n=e.get(t.id);if(!n)throw(0,r.timerNotFound)();return n}}})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/ctx/lib/timing/timing.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTimer=void 0;n.createTimer=((e,t=3e3)=>{const n=Symbol("Timer"),r=r=>{const o=Symbol(e),i=()=>new Promise((n,r)=>{setTimeout(()=>{r(`Timing ${e} timeout.`)},t),addEventListener(e,e=>{e instanceof CustomEvent&&e.detail.id===o&&n(void 0)})});return i.done=(()=>{const t=new CustomEvent(e,{detail:{id:o}});dispatchEvent(t)}),r.set(n,i),i};return r.id=n,r})},{}],"../node_modules/@milkdown/ctx/lib/timing/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./clock");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./timing");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))})},{"./clock":"../node_modules/@milkdown/ctx/lib/timing/clock.js","./timing":"../node_modules/@milkdown/ctx/lib/timing/timing.js"}],"../node_modules/@milkdown/ctx/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./context");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./plugin");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./timing");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))})},{"./context":"../node_modules/@milkdown/ctx/lib/context/index.js","./plugin":"../node_modules/@milkdown/ctx/lib/plugin/index.js","./timing":"../node_modules/@milkdown/ctx/lib/timing/index.js"}],"../node_modules/orderedmap/index.es.js":[function(e,t,n){"use strict";function r(e){this.content=e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),s=o.content.slice();return-1==i?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new r(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;n.default=o},{}],"../node_modules/prosemirror-model/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ReplaceError=d,n.Slice=n.Schema=n.ResolvedPos=n.NodeType=n.NodeRange=n.Node=n.MarkType=n.Mark=n.Fragment=n.DOMSerializer=n.DOMParser=n.ContentMatch=void 0;var r,o=(r=e("orderedmap"))&&r.__esModule?r:{default:r};var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize};n.Fragment=i;var s={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};i.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,s=0;s<t;i++){var a=this.content[i],c=s+a.nodeSize;if(c>e&&!1!==n(a,r+s,o,i)&&a.content.size){var l=s+1;a.nodesBetween(Math.max(0,e-l),Math.min(a.content.size,t-l),n,r+l)}s=c}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,function(s,a){s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf&&r?(o+="function"==typeof r?r(s):r,i=!n):!i&&s.isBlock&&(o+=n,i=!0)},0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)},i.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,s=0;s<t;o++){var a=this.content[o],c=s+a.nodeSize;c>e&&((s<e||c>t)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),n.push(a),r+=a.nodeSize),s=c}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},s.firstChild.get=function(){return this.content.length?this.content[0]:null},s.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},s.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},i.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),s=n.child(o);if(i!=s){if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(var a=0;i.text[a]==s.text[a];a++)r++;return r}if(i.content.size||s.content.size){var c=e(i.content,s.content,r+1);if(null!=c)return c}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,s=n.childCount;;){if(0==i||0==s)return i==s?null:{a:r,b:o};var a=t.child(--i),c=n.child(--s),l=a.nodeSize;if(a!=c){if(!a.sameMarkup(c))return{a:r,b:o};if(a.isText&&a.text!=c.text){for(var u=0,d=Math.min(a.text.length,c.text.length);u<d&&a.text[a.text.length-u-1]==c.text[c.text.length-u-1];)u++,r--,o--;return{a:r,b:o}}if(a.content.size||c.content.size){var f=e(a.content,c.content,r-1,o-1);if(f)return f}r-=l,o-=l}else r-=l,o-=l}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map(function(e){return e.toJSON()}):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(i.prototype,s);var a={index:0,offset:0};function c(e,t){return a.index=e,a.offset=t,a}function l(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t&&l(e[o],t[o])))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var u=function(e,t){this.type=e,this.attrs=t};function d(e){var t=Error.call(this,e);return t.__proto__=d.prototype,t}n.Mark=u,u.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},u.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},u.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},u.prototype.eq=function(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)},u.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},u.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},u.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},u.setFrom=function(e){if(!e||0==e.length)return u.none;if(e instanceof u)return[e];var t=e.slice();return t.sort(function(e,t){return e.type.rank-t.type.rank}),t},u.none=[],d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="ReplaceError";var f=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n};n.Slice=f;var p={size:{configurable:!0}};function m(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,o){var s=t.index(o),a=t.node(o);if(s==n.index(o)&&o<t.depth-r.openStart){var c=e(t,n,r,o+1);return a.copy(a.content.replaceChild(s,c))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var l=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),u=l.start,d=l.end;return b(a,function e(t,n,r,o,s){var a=t.depth>s&&g(t,n,s+1);var c=o.depth>s&&g(r,o,s+1);var l=[];y(null,t,s,l);a&&c&&n.index(s)==r.index(s)?(h(a,c),v(b(a,e(t,n,r,o,s+1)),l)):(a&&v(b(a,k(t,n,s+1)),l),y(n,r,s,l),c&&v(b(c,k(r,o,s+1)),l));y(o,null,s,l);return new i(l)}(t,u,d,n,o))}var f=t.parent,p=f.content;return b(f,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return b(a,k(t,n,o))}(e,t,n,0)}function h(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function g(e,t,n){var r=e.node(n);return h(r,t.node(n)),r}function v(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var 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&&(v(e.nodeAfter,r),i++));for(var a=i;a<s;a++)v(o.child(a),r);t&&t.depth==n&&t.textOffset&&v(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function k(e,t,n){var r=[];(y(null,e,n,r),e.depth>n)&&v(b(g(e,t,n+1),k(e,t,n+1)),r);return y(t,null,n,r),new i(r)}p.size.get=function(){return this.content.size-this.openStart-this.openEnd},f.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n);var s=i.index;var a=i.offset;var c=t.maybeChild(s);if(a==n||c.isText)return o&&!o.canReplace(s,s,r)?null:t.cut(0,n).append(r).append(t.cut(n));var l=e(c.content,n-a-1,r);return l&&t.replaceChild(s,c.copy(l))}(this.content,e+this.openStart,t,null);return n&&new f(n,this.openStart,this.openEnd)},f.prototype.removeBetween=function(e,t){return new f(function e(t,n,r){var o=t.findIndex(n);var i=o.index;var s=o.offset;var a=t.maybeChild(i);var c=t.findIndex(r);var l=c.index;var u=c.offset;if(s==n||a.isText){if(u!=r&&!t.child(l).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw new RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},f.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},f.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},f.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},f.fromJSON=function(e,t){if(!t)return f.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(i.fromJSON(e,t.content),n,r)},f.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new f(e,n,r)},Object.defineProperties(f.prototype,p),f.empty=new f(i.empty,0,0);var w=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n};n.ResolvedPos=w;var x={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};w.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},x.parent.get=function(){return this.node(this.depth)},x.doc.get=function(){return this.node(0)},w.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},w.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},w.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},w.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},w.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},w.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},w.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},x.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},x.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},x.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},w.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r},w.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i},w.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},w.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},w.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new O(this,e,n)},w.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},w.prototype.max=function(e){return e.pos>this.pos?e:this},w.prototype.min=function(e){return e.pos<this.pos?e:this},w.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},w.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var s=i.content.findIndex(o),a=s.index,c=s.offset,l=o-c;if(n.push(i,a,r+c),!l)break;if((i=i.child(a)).isText)break;o=l-1,r+=c+1}return new w(t,n,o)},w.resolveCached=function(e,t){for(var n=0;n<_.length;n++){var r=_[n];if(r.pos==t&&r.doc==e)return r}var o=_[j]=w.resolve(e,t);return j=(j+1)%S,o},Object.defineProperties(w.prototype,x);var _=[],j=0,S=12,O=function(e,t,n){this.$from=e,this.$to=t,this.depth=n};n.NodeRange=O;var M={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};M.start.get=function(){return this.$from.before(this.depth+1)},M.end.get=function(){return this.$to.after(this.depth+1)},M.parent.get=function(){return this.$from.node(this.depth)},M.startIndex.get=function(){return this.$from.index(this.depth)},M.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(O.prototype,M);var C=Object.create(null),E=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||u.none};n.Node=E;var P={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};P.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},P.childCount.get=function(){return this.content.childCount},E.prototype.child=function(e){return this.content.child(e)},E.prototype.maybeChild=function(e){return this.content.maybeChild(e)},E.prototype.forEach=function(e){this.content.forEach(e)},E.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},E.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},P.textContent.get=function(){return this.textBetween(0,this.content.size,"")},E.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},P.firstChild.get=function(){return this.content.firstChild},P.lastChild.get=function(){return this.content.lastChild},E.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},E.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},E.prototype.hasMarkup=function(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||C)&&u.sameSet(this.marks,n||u.none)},E.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},E.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},E.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},E.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return f.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new f(a,r.depth-i,o.depth-i)},E.prototype.replace=function(e,t,n){return m(this.resolve(e),this.resolve(t),n)},E.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},E.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},E.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},E.prototype.resolve=function(e){return w.resolveCached(this,e)},E.prototype.resolveNoCache=function(e){return w.resolve(this,e)},E.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,function(e){return n.isInSet(e.marks)&&(r=!0),!r}),r},P.isBlock.get=function(){return this.type.isBlock},P.isTextblock.get=function(){return this.type.isTextblock},P.inlineContent.get=function(){return this.type.inlineContent},P.isInline.get=function(){return this.type.isInline},P.isText.get=function(){return this.type.isText},P.isLeaf.get=function(){return this.type.isLeaf},P.isAtom.get=function(){return this.type.isAtom},E.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),N(this.marks,e)},E.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},E.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var s=this.contentMatchAt(e).matchFragment(n,r,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var c=r;c<o;c++)if(!this.type.allowsMarks(n.child(c).marks))return!1;return!0},E.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},E.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},E.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var e=u.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!u.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map(function(e){return e.type.name}));this.content.forEach(function(e){return e.check()})},E.prototype.toJSON=function(){var e={type:this.type.name};for(var t 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(function(e){return e.toJSON()})),e},E.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(E.prototype,P);var T=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):N(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(E);function N(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var A=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]};n.ContentMatch=A;var I={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};A.parse=function(e,t){var n=new D(e,t);if(null==n.next)return A.empty;var r=F(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach(function(t){e[t].forEach(function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),s=i>-1&&o[i+1];V(e,r).forEach(function(e){s||o.push(n,s=[]),-1==s.indexOf(e)&&s.push(e)})}})});var i=t[r.join(",")]=new A(r.indexOf(e.length-1)>-1);for(var s=0;s<o.length;s+=2){var a=o[s+1].sort($);i.next.push(o[s],t[a.join(",")]||n(a))}return i}(V(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce(function(t,n){return t.concat(e(n,i))},[]);if("seq"==t.type)for(var s=0;;s++){var a=e(t.exprs[s],i);if(s==t.exprs.length-1)return a;o(a,i=n())}else{if("star"==t.type){var c=n();return r(i,c),o(e(t.expr,c),c),[r(c)]}if("plus"==t.type){var l=n();return o(e(t.expr,i),l),o(e(t.expr,l),l),[r(l)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var u=i,d=0;d<t.min;d++){var f=n();o(e(t.expr,u),f),u=f}if(-1==t.max)o(e(t.expr,u),u);else for(var p=t.min;p<t.max;p++){var m=n();r(u,m),o(e(t.expr,u),m),u=m}return[r(u)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach(function(e){return e.to=t})}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,s=[],a=0;a<o.next.length;a+=2){var c=o.next[a],l=o.next[a+1];s.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},A.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},A.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},I.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},I.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},A.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},A.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(s,a){var c=s.matchFragment(e,n);if(c&&(!t||c.validEnd))return i.from(a.map(function(e){return e.createAndFill()}));for(var l=0;l<s.next.length;l+=2){var u=s.next[l],d=s.next[l+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var f=o(d,a.concat(u));if(f)return f}}}(this,[])},A.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},A.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],s=r;s.type;s=s.via)i.push(s.type);return i.reverse()}for(var a=0;a<o.next.length;a+=2){var c=o.next[a];c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!o.next[a+1].validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}},I.edgeCount.get=function(){return this.next.length>>1},A.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},A.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map(function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r}).join("\n")},Object.defineProperties(A.prototype,I),A.empty=new A(!0);var D=function(e,t){this.string=e,this.nodeTypes=t,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()},R={next:{configurable:!0}};function F(e){var t=[];do{t.push(z(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function z(e){var t=[];do{t.push(L(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function L(e){for(var t=function(e){if(e.eat("(")){var t=F(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map(function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}});return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)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("{"))break;t=q(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function q(e,t){var n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $(e,t){return t-e}function V(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var s=o[i],a=s.term,c=s.to;a||-1!=n.indexOf(c)||t(c)}}(t),n.sort($)}function U(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function W(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function H(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new G(e[n]);return t}R.next.get=function(){return this.tokens[this.pos]},D.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},D.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(D.prototype,R);var K=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=H(n.attrs),this.defaultAttrs=U(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e};n.NodeType=K;var J={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};J.isInline.get=function(){return!this.isBlock},J.isTextblock.get=function(){return this.isBlock&&this.inlineContent},J.isLeaf.get=function(){return this.contentMatch==A.empty},J.isAtom.get=function(){return this.isLeaf||this.spec.atom},K.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},K.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},K.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,e)},K.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new E(this,this.computeAttrs(e),i.from(t),u.setFrom(n))},K.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new E(this,this.computeAttrs(e),t,u.setFrom(n))},K.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new E(this,e,t.append(o),u.setFrom(n)):null},K.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},K.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},K.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},K.prototype.allowedMarks=function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.empty:e},K.compile=function(e,t){var n=Object.create(null);e.forEach(function(e,r){return n[e]=new K(e,t,r)});var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(K.prototype,J);var G=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},Q={isRequired:{configurable:!0}};Q.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(G.prototype,Q);var Y=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=H(r.attrs),this.rank=t,this.excluded=null;var o=U(this.attrs);this.instance=o&&new u(this,o)};n.MarkType=Y,Y.prototype.create=function(e){return!e&&this.instance?this.instance:new u(this,W(this.attrs,e))},Y.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach(function(e,o){return n[e]=new Y(e,r++,t,o)}),n},Y.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e},Y.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},Y.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Z=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.default.from(e.nodes),this.spec.marks=o.default.from(e.marks),this.nodes=K.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=A.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==a?null:a?X(this,a.split(" ")):""!=a&&i.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],u=l.spec.excludes;l.excluded=null==u?[l]:""==u?[]:X(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function X(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(var a in e.marks){var c=e.marks[a];("_"==o||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}n.Schema=Z,Z.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof K))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Z.prototype.text=function(e,t){var n=this.nodes.text;return new T(n,n.defaultAttrs,e,u.setFrom(t))},Z.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Z.prototype.nodeFromJSON=function(e){return E.fromJSON(this,e)},Z.prototype.markFromJSON=function(e){return u.fromJSON(this,e)},Z.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)}),this.normalizeLists=!this.tags.some(function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)})};n.DOMParser=ee,ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ce(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ce(this,t,!0);return n.addAll(e,null,t.from,t.to),f.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(ue(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},ee.prototype.matchStyle=function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(e)||i.context&&!n.matchesContext(i.context)||i.style.length>e.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s}return i}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach(function(e){n(e=de(e)),e.mark=t})};for(var o in e.marks)r(o);var i;for(var s in e.nodes)i=void 0,(i=e.nodes[s].spec.parseDOM)&&i.forEach(function(e){n(e=de(e)),e.node=s});return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={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},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0},oe=1,ie=2;function se(e){return(e?oe:0)|("full"===e?ie:0)}var ae=function(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.solid=o,this.match=i||(4&s?null:e.contentMatch),this.options=s,this.content=[],this.marks=n,this.activeMarks=u.none,this.pendingMarks=r,this.stashMarks=[]};ae.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ae.prototype.finish=function(e){if(!(this.options&oe)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ae.prototype.popFromStashMark=function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},ae.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):fe(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},ae.prototype.inlineContext=function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!te.hasOwnProperty(e.parentNode.nodeName.toLowerCase())};var ce=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=se(t.preserveWhitespace)|(n?4:0);r=o?new ae(o.type,o.attrs,u.none,u.none,!0,t.topMatch||o.type.contentMatch,i):new ae(n?null:e.schema.topNodeType,null,u.none,u.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},le={top:{configurable:!0},currentPos:{configurable:!0}};function ue(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function de(e){var t={};for(var n in e)t[n]=e[n];return t}function fe(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[],s=function(e){i.push(e);for(var n=0;n<e.edgeCount;n++){var r=e.edge(n),o=r.type,a=r.next;if(o==t)return!0;if(i.indexOf(a)<0&&s(a))return!0}};return s(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}le.top.get=function(){return this.nodes[this.open]},ce.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},ce.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(n.options&ie||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(n.options&oe)t=n.options&ie?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},ce.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();re.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&re.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ne.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,s=this.top,a=this.needsBlock;if(te.hasOwnProperty(r))i=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(s),this.needsBlock=a}else this.addElementByRule(e,o,!1===o.consuming?n:null)},ce.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},ce.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},ce.prototype.readStyles=function(e){var t=u.none;e:for(var n=0;n<e.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t},ce.prototype.addElementByRule=function(e,t,n){var r,o,i,s=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(function(e){return s.insertNode(e)});else{var c=t.contentElement;"string"==typeof c?c=e.querySelector(c):"function"==typeof c&&(c=c(e)),c||(c=e),this.findAround(e,c,!0),this.addAll(c,r)}r&&(this.sync(a),this.open--),i&&this.removePendingMark(i,a)},ce.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ce.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var s=0;s<t.length;s++)this.enterInner(t[s],null,!1);return!0},ce.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1},ce.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},ce.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e,t);var i=null==r?-5&o.options:se(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ae(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},ce.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ce.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ce.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},le.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ce.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},ce.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},ce.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},ce.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},ce.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var 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=function(e,a){for(;e>=0;e--){var c=n[e];if(""==c){if(e==n.length-1||0==e)continue;for(;a>=i;a--)if(s(e-1,a))return!0;return!1}var l=a>0||0==a&&o?t.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;a--}return!0};return s(n.length-1,this.open)},ce.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},ce.prototype.addPendingMark=function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ce.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(ce.prototype,le);var pe=function(e,t){this.nodes=e||{},this.marks=t||{}};function me(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}n.DOMSerializer=pe,pe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=he(t).createDocumentFragment());var o=n,i=null;return e.forEach(function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,s=0;n<i.length&&s<e.marks.length;){var a=e.marks[s];if(r.marks[a.type.name]){if(!a.eq(i[n])||!1===a.type.spec.spanning)break;n+=2,s++}else s++}for(;n<i.length;)o=i.pop(),i.pop();for(;s<e.marks.length;){var c=e.marks[s++],l=r.serializeMark(c,e.isInline,t);l&&(i.push(c,o),o.appendChild(l.dom),o=l.contentDOM||l.dom)}}o.appendChild(r.serializeNodeInner(e,t))}),n},pe.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=pe.renderSpec(he(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},pe.prototype.serializeNode=function(e,t){void 0===t&&(t={});for(var n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},pe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&pe.renderSpec(he(n),r(e,t))},pe.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,s=n?e.createElementNS(n,r):e.createElement(r),a=t[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a))for(var l in c=2,a)if(null!=a[l]){var u=l.indexOf(" ");u>0?s.setAttributeNS(l.slice(0,u),l.slice(u+1),a[l]):s.setAttribute(l,a[l])}for(var d=c;d<t.length;d++){var f=t[d];if(0===f){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var p=pe.renderSpec(e,f,n),m=p.dom,h=p.contentDOM;if(s.appendChild(m),h){if(i)throw new RangeError("Multiple content holes");i=h}}return{dom:s,contentDOM:i}},pe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new pe(this.nodesFromSchema(e),this.marksFromSchema(e)))},pe.nodesFromSchema=function(e){var t=me(e.nodes);return t.text||(t.text=function(e){return e.text}),t},pe.marksFromSchema=function(e){return me(e.marks)}},{orderedmap:"../node_modules/orderedmap/index.es.js"}],"../node_modules/prosemirror-transform/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransformError=u,n.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return x(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},n.canSplit=function(e,t,n,r){void 0===n&&(n=1);var 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(var a=o.depth-1,c=n-2;a>i;a--,c--){var l=o.node(a),u=o.index(a);if(l.type.spec.isolating)return!1;var d=l.content.cutByIndex(u,l.childCount),f=r&&r[c]||l;if(f!=l&&(d=d.replaceChild(0,f.type.create(f.attrs))),!l.canReplace(u+1,l.childCount)||!f.type.validContent(d))return!1}var p=o.indexAfter(i),m=r&&r[0];return o.node(i).canReplaceWith(p,p,m?m.type:o.node(i+1).type)},n.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var s=1;s<=(0==n.openStart&&n.size?2:1);s++)for(var a=r.depth;a>=0;a--){var c=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(c>0?1:0),u=r.node(a),d=!1;if(1==s)d=u.canReplace(l,l,o);else{var f=u.contentMatchAt(l).findWrapping(o.firstChild.type);d=f&&u.canReplaceWith(l,l,f[0])}if(d)return 0==c?r.pos:c<0?r.before(a+1):r.after(a+1)}return null},n.findWrapping=function(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;for(var a=(s.length?s[s.length-1]:t).contentMatch,c=r;a&&c<o;c++)a=a.matchType(n.child(c).type);if(!a||!a.validEnd)return null;return s}(r,t);if(!i)return null;return o.map(w).concat({type:t,attrs:n}).concat(i.map(w))},n.insertPoint=_,n.joinPoint=function(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,s=void 0,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&x(i,s)&&r.node(o).canReplace(a,a+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},n.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!k(r,o,i))break}},n.replaceStep=M,n.Transform=n.StepResult=n.StepMap=n.Step=n.ReplaceStep=n.ReplaceAroundStep=n.RemoveMarkStep=n.Mapping=n.MapResult=n.AddMarkStep=void 0;var r=e("prosemirror-model"),o=65535,i=Math.pow(2,16);function s(e){return e&o}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n};n.MapResult=a;var c=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};n.StepMap=c,c.prototype.recover=function(e){var t=0,n=s(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(e&o))/i}(e)},c.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},c.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},c.prototype._map=function(e,t,n){for(var r=0,o=this.inverted?2:1,s=this.inverted?1:2,c=0;c<this.ranges.length;c+=3){var l=this.ranges[c]-(this.inverted?r:0);if(l>e)break;var u=this.ranges[c+o],d=this.ranges[c+s],f=l+u;if(e<=f){var p=l+r+((u?e==l?-1:e==f?1:t:t)<0?0:d);if(n)return p;var m=e==(t<0?l:f)?null:c/3+(e-l)*i;return new a(p,t<0?e!=l:e!=f,m)}r+=d-u}return n?e+r:new a(e+r)},c.prototype.touches=function(e,t){for(var n=0,r=s(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var c=this.ranges[a]-(this.inverted?n:0);if(c>e)break;var l=this.ranges[a+o];if(e<=c+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1},c.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),c=this.ranges[r+t],l=this.ranges[r+n];e(s,s+c,a,a+l),o+=l-c}},c.prototype.invert=function(){return new c(this.ranges,!this.inverted)},c.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},c.offset=function(e){return 0==e?c.empty:new c(e<0?[0,-e,0]:[0,0,e])},c.empty=new c([]);var l=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function u(e){var t=Error.call(this,e);return t.__proto__=u.prototype,t}n.Mapping=l,l.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new l(this.maps,this.mirror,e,t)},l.prototype.copy=function(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},l.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},l.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},l.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},l.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},l.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},l.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},l.prototype._map=function(e,t,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var s=this.getMirror(o);if(null!=s&&s>o&&s<this.to){o=s,e=this.maps[s].recover(i.recover);continue}}i.deleted&&(r=!0),e=i.pos}return n?e:new a(e,r)},u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.name="TransformError";var d=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l};n.Transform=d;var f={before:{configurable:!0},docChanged:{configurable:!0}};function p(){throw new Error("Override me")}f.before.get=function(){return this.docs.length?this.docs[0]:this.doc},d.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new u(t.failed);return this},d.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},f.docChanged.get=function(){return this.steps.length>0},d.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(d.prototype,f);var m=Object.create(null),h=function(){};n.Step=h,h.prototype.apply=function(e){return p()},h.prototype.getMap=function(){return c.empty},h.prototype.invert=function(e){return p()},h.prototype.map=function(e){return p()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return p()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=m[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in m)throw new RangeError("Duplicate use of step JSON ID "+e);return m[e]=t,t.prototype.jsonID=e,t};var g=function(e,t){this.doc=e,this.failed=t};n.StepResult=g,g.ok=function(e){return new g(e,null)},g.fail=function(e){return new g(null,e)},g.fromReplace=function(e,t,n,o){try{return g.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return g.fail(e.message);throw e}};var v=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&b(e,this.from,this.to)?g.fail("Structure replace would overwrite content"):g.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new c([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);n.ReplaceStep=v,h.jsonID("replace",v);var y=function(e){function t(t,n,r,o,i,s,a){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=!!a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return g.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return g.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?g.fromReplace(e,this.from,this.to,n):g.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new c([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var 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},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function b(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var s=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}return!1}function k(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function w(e){return{type:e,attrs:null}}function x(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function _(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var 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(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,n))return r.after(s+1);if(a<r.node(s).childCount)return null}}function j(e,t,n){for(var o=[],i=0;i<e.childCount;i++){var s=e.child(i);s.content.size&&(s=s.copy(j(s.content,t,s))),s.isInline&&(s=t(s,n,i)),o.push(s)}return r.Fragment.fromArray(o)}n.ReplaceAroundStep=y,h.jsonID("replaceAround",y),d.prototype.lift=function(e,t){for(var n=e.$from,o=e.$to,i=e.depth,s=n.before(i+1),a=o.after(i+1),c=s,l=a,u=r.Fragment.empty,d=0,f=i,p=!1;f>t;f--)p||n.index(f)>0?(p=!0,u=r.Fragment.from(n.node(f).copy(u)),d++):c--;for(var m=r.Fragment.empty,h=0,g=i,v=!1;g>t;g--)v||o.after(g+1)<o.end(g)?(v=!0,m=r.Fragment.from(o.node(g).copy(m)),h++):l++;return this.step(new y(c,l,s,a,new r.Slice(u.append(m),d,h),u.size-d,!0))},d.prototype.wrap=function(e,t){for(var n=r.Fragment.empty,o=t.length-1;o>=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,s=e.end;return this.step(new y(i,s,i,s,new r.Slice(n,0,0),t.length,!0))},d.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var s=this.steps.length;return this.doc.nodesBetween(e,t,function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(s).map(t),n)){i.clearIncompatible(i.mapping.slice(s).map(t,1),n);var a=i.mapping.slice(s),c=a.map(t,1),l=a.map(t+e.nodeSize,1);return i.step(new y(c,l,c+1,l-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}}),this},d.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var s=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new y(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(s),0,0),1,!0))},d.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,s=r.Fragment.empty,a=o.depth,c=o.depth-t,l=t-1;a>c;a--,l--){i=r.Fragment.from(o.node(a).copy(i));var u=n&&n[l];s=r.Fragment.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}return this.step(new v(e,e,new r.Slice(i.append(s),t,t),!0))},d.prototype.join=function(e,t){void 0===t&&(t=1);var n=new v(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var S=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),s=new r.Slice(j(n.content,function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e},i),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,s)},t.prototype.invert=function(){return new O(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);n.AddMarkStep=S,h.jsonID("addMark",S);var O=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(j(n.content,function(e){return e.mark(t.mark.removeFromSet(e.marks))}),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new S(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function M(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),s=e.resolve(n);return C(i,s,o)?new v(t,n,o):new E(i,s,o).fit()}function C(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}n.RemoveMarkStep=O,h.jsonID("removeMark",O),d.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(e,t,function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var d=Math.max(c,e),f=Math.min(c+r.nodeSize,t),p=n.addToSet(u),m=0;m<u.length;m++)u[m].isInSet(p)||(s&&s.to==d&&s.mark.eq(u[m])?s.to=f:o.push(s=new O(d,f,u[m])));a&&a.to==d?a.to=f:i.push(a=new S(d,f,n))}}}),o.forEach(function(e){return r.step(e)}),i.forEach(function(e){return r.step(e)}),this},d.prototype.removeMark=function(e,t,n){var o=this;void 0===n&&(n=null);var i=[],s=0;return this.doc.nodesBetween(e,t,function(o,a){if(o.isInline){s++;var c=null;if(n instanceof r.MarkType)for(var l,u=o.marks;l=n.isInSet(u);)(c||(c=[])).push(l),u=l.removeFromSet(u);else n?n.isInSet(o.marks)&&(c=[n]):c=o.marks;if(c&&c.length)for(var d=Math.min(a+o.nodeSize,t),f=0;f<c.length;f++){for(var p=c[f],m=void 0,h=0;h<i.length;h++){var g=i[h];g.step==s-1&&p.eq(i[h].style)&&(m=g)}m?(m.to=d,m.step=s):i.push({style:p,from:Math.max(a,e),to:d,step:s})}}}),i.forEach(function(e){return o.step(new O(e.from,e.to,e.style))}),this},d.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var o=this.doc.nodeAt(e),i=[],s=e+1,a=0;a<o.childCount;a++){var c=o.child(a),l=s+c.nodeSize,u=n.matchType(c.type,c.attrs);if(u){n=u;for(var d=0;d<c.marks.length;d++)t.allowsMarkType(c.marks[d].type)||this.step(new O(s,l,c.marks[d]))}else i.push(new v(s,l,r.Slice.empty));s=l}if(!n.validEnd){var f=n.fillBefore(r.Fragment.empty,!0);this.replace(s,s,new r.Slice(f,0,0))}for(var p=i.length-1;p>=0;p--)this.step(i[p]);return this},d.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=M(this.doc,e,t,n);return o&&this.step(o),this},d.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},d.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},d.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var E=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var s=e.depth;s>0;s--)this.placed=r.Fragment.from(e.node(s).copy(this.placed))},P={depth:{configurable:!0}};function T(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(T(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function A(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function I(e,t,n){if(t<=0)return e;var o=e.content;return t>1&&(o=o.replaceChild(0,I(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function D(e,t,n,r,o){var i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function R(e,t,n,o,i){if(t<n){var s=e.firstChild;e=e.replaceChild(0,s.copy(R(s.content,t+1,n,o,s)))}if(t>o){var a=i.contentMatchAt(0),c=a.fillBefore(e).append(e);e=c.append(a.matchFragment(c).fillBefore(r.Fragment.empty,!0))}return e}function F(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}P.depth.get=function(){return this.frontier.length-1},E.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(t<0?this.$to:o.doc.resolve(t));if(!i)return null;for(var s=this.placed,a=o.depth,c=i.depth;a&&c&&1==s.childCount;)s=s.firstChild.content,a--,c--;var l=new r.Slice(s,a,c);return t>-1?new y(o.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||o.pos!=this.$to.pos?new v(o.pos,i.pos,l):void 0},E.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=A(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var s=this.frontier[i],a=s.type,c=s.match,l=void 0,u=void 0;if(1==e&&(o?c.matchType(o.type)||(u=c.fillBefore(r.Fragment.from(o),!1)):a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:u};if(2==e&&o&&(l=c.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:l};if(n&&c.matchType(n.type))break}},E.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=A(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},E.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=A(t,n);if(i.childCount<=1&&n>0){var s=t.size-n<=n+i.size;this.unplaced=new r.Slice(T(t,n-1,1),n-1,s?n-1:o)}else this.unplaced=new r.Slice(T(t,n,1),n,o)},E.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,s=e.wrap;this.depth>n;)this.closeFrontierNode();if(s)for(var a=0;a<s.length;a++)this.openFrontierNode(s[a]);var c=this.unplaced,l=o?o.content:c.content,u=c.openStart-t,d=0,f=[],p=this.frontier[n],m=p.match,h=p.type;if(i){for(var g=0;g<i.childCount;g++)f.push(i.child(g));m=m.matchFragment(i)}for(var v=l.size+t-(c.content.size-c.openEnd);d<l.childCount;){var y=l.child(d),b=m.matchType(y.type);if(!b)break;(++d>1||0==u||y.content.size)&&(m=b,f.push(I(y.mark(h.allowedMarks(y.marks)),1==d?u:0,d==l.childCount?v:-1)))}var k=d==l.childCount;k||(v=-1),this.placed=N(this.placed,n,r.Fragment.from(f)),this.frontier[n].match=m,k&&v<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,x=l;w<v;w++){var _=x.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),x=_.content}this.unplaced=k?0==t?r.Slice.empty:new r.Slice(T(c.content,t-1,1),t-1,v<0?c.openEnd:t-1):new r.Slice(T(c.content,t,d),c.openStart,c.openEnd)},E.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!D(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},E.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=D(e,t,o,r,i);if(s){for(var a=t-1;a>=0;a--){var c=this.frontier[a],l=c.match,u=D(e,a,c.type,l,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}},E.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e},E.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=N(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},E.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=N(this.placed,this.frontier.length,e))},Object.defineProperties(E.prototype,P),d.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(C(o,i,n))return this.step(new v(e,t,n));var s=F(o,this.doc.resolve(t));0==s[s.length-1]&&s.pop();var a=-(o.depth+1);s.unshift(a);for(var c=o.depth,l=o.pos-1;c>0;c--,l--){var u=o.node(c).type.spec;if(u.defining||u.isolating)break;s.indexOf(c)>-1?a=c:o.before(c)==l&&s.splice(1,0,-c)}for(var d=s.indexOf(a),f=[],p=n.openStart,m=n.content,h=0;;h++){var g=m.firstChild;if(f.push(g),h==n.openStart)break;m=g.content}p>0&&f[p-1].type.spec.defining&&o.node(d).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&o.node(d).type!=f[p-2].type&&(p-=2);for(var y=n.openStart;y>=0;y--){var b=(y+p+1)%(n.openStart+1),k=f[b];if(k)for(var w=0;w<s.length;w++){var x=s[(w+d)%s.length],_=!0;x<0&&(_=!1,x=-x);var j=o.node(x-1),S=o.index(x-1);if(j.canReplaceWith(S,S,k.type,k.marks))return this.replace(o.before(x),_?i.after(x):t,new r.Slice(R(n.content,0,n.openStart,b),b,n.openEnd))}}for(var O=this.steps.length,M=s.length-1;M>=0&&(this.replace(e,t,n),!(this.steps.length>O));M--){var E=s[M];E<0||(e=o.before(E),t=i.after(E))}return this},d.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=_(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},d.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=F(n,r),i=0;i<o.length;i++){var s=o[i],a=i==o.length-1;if(a&&0==s||n.node(s).type.contentMatch.validEnd)return this.delete(n.start(s),r.end(s));if(s>0&&(a||n.node(s-1).canReplace(n.index(s-1),r.indexAfter(s-1))))return this.delete(n.before(s),r.after(s))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(e-n.start(c)==n.depth-c&&t>n.end(c)&&r.end(c)-t!=r.depth-c)return this.delete(n.before(c),t);return this.delete(e,t)}},{"prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js"}],"../node_modules/prosemirror-state/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Transaction=n.TextSelection=n.SelectionRange=n.Selection=n.PluginKey=n.Plugin=n.NodeSelection=n.EditorState=n.AllSelection=void 0;var r=e("prosemirror-model"),o=e("prosemirror-transform"),i=Object.create(null),s=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t};n.Selection=s;var a={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};a.anchor.get=function(){return this.$anchor.pos},a.head.get=function(){return this.$head.pos},a.from.get=function(){return this.$from.pos},a.to.get=function(){return this.$to.pos},a.$from.get=function(){return this.ranges[0].$from},a.$to.get=function(){return this.ranges[0].$to},a.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},s.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},s.prototype.replace=function(e,t){void 0===t&&(t=r.Slice.empty);for(var n=t.content.lastChild,o=null,i=0;i<t.openEnd;i++)o=n,n=n.lastChild;for(var s=e.steps.length,a=this.ranges,c=0;c<a.length;c++){var l=a[c],u=l.$from,d=l.$to,f=e.mapping.slice(s);e.replaceRange(f.map(u.pos),f.map(d.pos),c?r.Slice.empty:t),0==c&&g(e,s,(n?n.isInline:o&&o.isTextblock)?-1:1)}},s.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],s=i.$from,a=i.$to,c=e.mapping.slice(n),l=c.map(s.pos),u=c.map(a.pos);o?e.deleteRange(l,u):(e.replaceRangeWith(l,u,t),g(e,n,t.isInline?-1:1))}},s.findFrom=function(e,t,n){var r=e.parent.inlineContent?new l(e):h(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?h(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):h(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},s.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))},s.atStart=function(e){return h(e,e,0,0,1)||new p(e)},s.atEnd=function(e){return h(e,e,e.content.size,e.childCount,-1)||new p(e)},s.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},s.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},s.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,a),s.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t};n.SelectionRange=c;var l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new u(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var s=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!s)return e.near(r,o);r=s.$head}return n.parent.inlineContent||(0==i?n=r:(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0&&(n=r)),new t(n,r)},Object.defineProperties(t.prototype,n),t}(s);n.TextSelection=l,s.jsonID("text",l);var u=function(e,t){this.anchor=e,this.head=t};u.prototype.map=function(e){return new u(e.map(this.anchor),e.map(this.head))},u.prototype.resolve=function(e){return l.between(e.resolve(this.anchor),e.resolve(this.head))};var d=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,s=o.pos,a=n.resolve(s);return i?e.near(a):new t(a)},t.prototype.content=function(){return new r.Slice(r.Fragment.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new f(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(s);n.NodeSelection=d,d.prototype.visible=!1,s.jsonID("node",d);var f=function(e){this.anchor=e};f.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new u(r,r):new f(r)},f.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):s.near(t)};var p=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),n==r.Slice.empty){t.delete(0,t.doc.content.size);var o=e.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else e.prototype.replace.call(this,t,n)},t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return m},t}(s);n.AllSelection=p,s.jsonID("all",p);var m={map:function(){return this},resolve:function(e){return new p(e)}};function h(e,t,n,r,o,i){if(t.inlineContent)return l.create(e,n);for(var s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){var a=t.child(s);if(a.isAtom){if(!i&&d.isSelectable(a))return d.create(e,n-(o<0?a.nodeSize:0))}else{var c=h(e,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function g(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,a=e.steps[r];if(a instanceof o.ReplaceStep||a instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach(function(e,t,n,r){null==i&&(i=r)}),e.setSelection(s.near(e.doc.resolve(i),n))}}var v=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function y(e,t){return t&&e?e.bind(t):e}n.Transaction=v;var b=function(e,t,n){this.name=e,this.init=y(t.init,n),this.apply=y(t.apply,n)},k=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||s.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],w=function(e,t){var n=this;this.schema=e,this.fields=k.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach(function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))})},x=function(e){this.config=e};n.EditorState=x;var _={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};_.schema.get=function(){return this.config.schema},_.plugins.get=function(){return this.config.plugins},x.prototype.apply=function(e){return this.applyTransaction(e).state},x.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},x.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var s=this.config.plugins[i];if(s.spec.appendTransaction){var a=r?r[i].n:0,c=r?r[i].state:this,l=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,c,n);if(l&&n.filterTransaction(l,i)){if(l.setMeta("appendedTransaction",e),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},x.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new x(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<j.length;i++)j[i](this,e,t);return t},_.tr.get=function(){return new v(this)},x.create=function(e){for(var t=new w(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new x(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},x.prototype.reconfigure=function(e){for(var t=new w(this.schema,e.plugins),n=t.fields,r=new x(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},x.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(function(e){return e.toJSON()})),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},x.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var o=new w(e.schema,e.plugins),i=new x(o);return o.fields.forEach(function(o){if("doc"==o.name)i.doc=r.Node.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var a in n){var c=n[a],l=c.spec.state;if(c.key==o.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(i[o.name]=l.fromJSON.call(c,e,t[a],i))}i[o.name]=o.init(e,i)}}),i},x.addApplyListener=function(e){j.push(e)},x.removeApplyListener=function(e){var t=j.indexOf(e);t>-1&&j.splice(t,1)},Object.defineProperties(x.prototype,_);var j=[];var S=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:M("plugin")};n.Plugin=S,S.prototype.getState=function(e){return e[this.key]};var O=Object.create(null);function M(e){return e in O?e+"$"+ ++O[e]:(O[e]=0,e+"$")}var C=function(e){void 0===e&&(e="key"),this.key=M(e)};n.PluginKey=C,C.prototype.get=function(e){return e.config.pluginsByKey[this.key]},C.prototype.getState=function(e){return e[this.key]}},{"prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js","prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js"}],"../node_modules/prosemirror-commands/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.autoJoin=function(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,o,i){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i<n.mapping.maps.length;i++){for(var s=n.mapping.maps[i],a=0;a<o.length;a++)o[a]=s.map(o[a]);s.forEach(function(e,t,n,r){return o.push(n,r)})}for(var c=[],l=0;l<o.length;l+=2)for(var u=o[l],d=o[l+1],f=n.doc.resolve(u),p=f.sharedDepth(d),m=f.node(p),h=f.indexAfter(p),g=f.after(p+1);g<=d;++h){var v=m.maybeChild(h);if(!v)break;if(h&&-1==c.indexOf(g)){var y=m.child(h-1);y.type==v.type&&t(y,v)&&c.push(g)}g+=v.nodeSize}c.sort(function(e,t){return e-t});for(var b=c.length-1;b>=0;b--)(0,r.canJoin)(n.doc,c[b])&&n.join(c[b]);e(n)}}(o,t),i)}},n.chainCommands=x,n.createParagraphNear=v,n.deleteSelection=s,n.exitCode=g,n.joinBackward=a,n.joinDown=function(e,t){var n,o=e.selection;if(o instanceof i.NodeSelection){if(o.node.isTextblock||!(0,r.canJoin)(e.doc,o.to))return!1;n=o.to}else if(null==(n=(0,r.joinPoint)(e.doc,o.to,1)))return!1;t&&t(e.tr.join(n).scrollIntoView());return!0},n.joinForward=d,n.joinUp=function(e,t){var n,o=e.selection,s=o instanceof i.NodeSelection;if(s){if(o.node.isTextblock||!(0,r.canJoin)(e.doc,o.from))return!1;n=o.from}else if(null==(n=(0,r.joinPoint)(e.doc,o.from,-1)))return!1;if(t){var a=e.tr.join(n);s&&a.setSelection(i.NodeSelection.create(a.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(a.scrollIntoView())}return!0},n.lift=function(e,t){var n=e.selection,o=n.$from,i=n.$to,s=o.blockRange(i),a=s&&(0,r.liftTarget)(s);if(null==a)return!1;t&&t(e.tr.lift(s,a).scrollIntoView());return!0},n.liftEmptyBlock=y,n.newlineInCode=m,n.selectAll=k,n.selectNodeBackward=l,n.selectNodeForward=f,n.selectParentNode=function(e,t){var n,r=e.selection,o=r.$from,s=r.to,a=o.sharedDepth(s);if(0==a)return!1;n=o.before(a),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n)));return!0},n.setBlockType=function(e,t){return function(n,r){var o=n.selection,i=o.from,s=o.to,a=!1;return n.doc.nodesBetween(i,s,function(r,o){if(a)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)a=!0;else{var i=n.doc.resolve(o),s=i.index();a=i.parent.canReplaceWith(s,s+1,e)}}),!!a&&(r&&r(n.tr.setBlockType(i,s,e,t).scrollIntoView()),!0)}},n.splitBlock=b,n.splitBlockKeepMarks=function(e,t){return b(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})},n.toggleMark=function(e,t){return function(n,r){var o=n.selection,i=o.empty,s=o.$cursor,a=o.ranges;if(i&&!s||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,s=o.$to,a=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,s.pos,function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)}),a)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,a,e))return!1;if(r)if(s)e.isInSet(n.storedMarks||s.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var c=!1,l=n.tr,u=0;!c&&u<a.length;u++){var d=a[u],f=d.$from,p=d.$to;c=n.doc.rangeHasMark(f.pos,p.pos,e)}for(var m=0;m<a.length;m++){var h=a[m],g=h.$from,v=h.$to;if(c)l.removeMark(g.pos,v.pos,e);else{var y=g.pos,b=v.pos,k=g.nodeAfter,w=v.nodeBefore,x=k&&k.isText?/^\s*/.exec(k.text)[0].length:0,_=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;y+x<b&&(y+=x,b-=_),l.addMark(y,b,e.create(t))}}r(l.scrollIntoView())}return!0}},n.wrapIn=function(e,t){return function(n,o){var i=n.selection,s=i.$from,a=i.$to,c=s.blockRange(a),l=c&&(0,r.findWrapping)(c,e,t);return!!l&&(o&&o(n.tr.wrap(c,l).scrollIntoView()),!0)}},n.pcBaseKeymap=n.macBaseKeymap=n.baseKeymap=void 0;var r=e("prosemirror-transform"),o=e("prosemirror-model"),i=e("prosemirror-state");function s(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function a(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var s=u(o);if(!s){var a=o.blockRange(),l=a&&(0,r.liftTarget)(a);return null!=l&&(t&&t(e.tr.lift(a,l).scrollIntoView()),!0)}var d=s.nodeBefore;if(!d.type.spec.isolating&&w(e,s,t))return!0;if(0==o.parent.content.size&&(c(d,"end")||i.NodeSelection.isSelectable(d))){if(t){var f=e.tr.deleteRange(o.before(),o.after());f.setSelection(c(d,"end")?i.Selection.findFrom(f.doc.resolve(f.mapping.map(s.pos,-1)),-1):i.NodeSelection.create(f.doc,s.pos-d.nodeSize)),t(f.scrollIntoView())}return!0}return!(!d.isAtom||s.depth!=o.depth-1)&&(t&&t(e.tr.delete(s.pos-d.nodeSize,s.pos).scrollIntoView()),!0)}function c(e,t,n){for(;e;e="start"==t?e.firstChild:e.lastChild){if(e.isTextblock)return!0;if(n&&1!=e.childCount)return!1}return!1}function l(e,t,n){var r=e.selection,o=r.$head,s=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;s=u(o)}var a=s&&s.nodeBefore;return!(!a||!i.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)}function u(e){if(!e.parent.type.spec.isolating)for(var 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 d(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=p(r);if(!o)return!1;var s=o.nodeAfter;if(w(e,o,t))return!0;if(0==r.parent.content.size&&(c(s,"start")||i.NodeSelection.isSelectable(s))){if(t){var a=e.tr.deleteRange(r.before(),r.after());a.setSelection(c(s,"start")?i.Selection.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):i.NodeSelection.create(a.doc,a.mapping.map(o.pos))),t(a.scrollIntoView())}return!0}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0)}function f(e,t,n){var r=e.selection,o=r.$head,s=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;s=p(o)}var a=s&&s.nodeAfter;return!(!a||!i.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,s.pos)).scrollIntoView()),!0)}function p(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function m(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function h(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function g(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var s=r.node(-1),a=r.indexAfter(-1),c=h(s.contentMatchAt(a));if(!s.canReplaceWith(a,a,c))return!1;if(t){var l=r.after(),u=e.tr.replaceWith(l,l,c.createAndFill());u.setSelection(i.Selection.near(u.doc.resolve(l),1)),t(u.scrollIntoView())}return!0}function v(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof i.AllSelection||r.parent.inlineContent||o.parent.inlineContent)return!1;var s=h(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,c=e.tr.insert(a,s.createAndFill());c.setSelection(i.TextSelection.create(c.doc,a+1)),t(c.scrollIntoView())}return!0}function y(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var o=n.before();if((0,r.canSplit)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),s=i&&(0,r.liftTarget)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)}function b(e,t){var n=e.selection,o=n.$from,s=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!o.parentOffset||!(0,r.canSplit)(e.doc,o.pos))&&(t&&t(e.tr.split(o.pos).scrollIntoView()),!0);if(!o.parent.isBlock)return!1;if(t){var a=s.parentOffset==s.parent.content.size,c=e.tr;(e.selection instanceof i.TextSelection||e.selection instanceof i.AllSelection)&&c.deleteSelection();var l=0==o.depth?null:h(o.node(-1).contentMatchAt(o.indexAfter(-1))),u=a&&l?[{type:l}]:null,d=(0,r.canSplit)(c.doc,c.mapping.map(o.pos),1,u);if(u||d||!(0,r.canSplit)(c.doc,c.mapping.map(o.pos),1,l&&[{type:l}])||(u=[{type:l}],d=!0),d&&(c.split(c.mapping.map(o.pos),1,u),!a&&!o.parentOffset&&o.parent.type!=l)){var f=c.mapping.map(o.before()),p=c.doc.resolve(f);o.node(-1).canReplaceWith(p.index(),p.index()+1,l)&&c.setNodeMarkup(c.mapping.map(o.before()),l)}t(c.scrollIntoView())}return!0}function k(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function w(e,t,n){var s,a,l=t.nodeBefore,u=t.nodeAfter;if(l.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,s=t.index();return!(!(o&&i&&o.type.compatibleContent(i.type))||(!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(s,s+1)||!i.isTextblock&&!(0,r.canJoin)(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;var d=t.parent.canReplace(t.index(),t.index()+1);if(d&&(s=(a=l.contentMatchAt(l.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){for(var f=t.pos+u.nodeSize,p=o.Fragment.empty,m=s.length-1;m>=0;m--)p=o.Fragment.from(s[m].create(null,p));p=o.Fragment.from(l.copy(p));var h=e.tr.step(new r.ReplaceAroundStep(t.pos-1,f,t.pos,f,new o.Slice(p,1,0),s.length,!0)),g=f+2*s.length;(0,r.canJoin)(h.doc,g)&&h.join(g),n(h.scrollIntoView())}return!0}var v=i.Selection.findFrom(t,1),y=v&&v.$from.blockRange(v.$to),b=y&&(0,r.liftTarget)(y);if(null!=b&&b>=t.depth)return n&&n(e.tr.lift(y,b).scrollIntoView()),!0;if(d&&c(u,"start",!0)&&c(l,"end")){for(var k=l,w=[];w.push(k),!k.isTextblock;)k=k.lastChild;for(var x=u,_=1;!x.isTextblock;x=x.firstChild)_++;if(k.canReplace(k.childCount,k.childCount,x.content)){if(n){for(var j=o.Fragment.empty,S=w.length-1;S>=0;S--)j=o.Fragment.from(w[S].copy(j));n(e.tr.step(new r.ReplaceAroundStep(t.pos-w.length,t.pos+u.nodeSize,t.pos+_,t.pos+u.nodeSize-_,new o.Slice(j,w.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function x(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var _=x(s,a,l),j=x(s,d,f),S={Enter:x(m,v,y,b),"Mod-Enter":g,Backspace:_,"Mod-Backspace":_,"Shift-Backspace":_,Delete:j,"Mod-Delete":j,"Mod-a":k};n.pcBaseKeymap=S;var O={"Ctrl-h":S.Backspace,"Alt-Backspace":S["Mod-Backspace"],"Ctrl-d":S.Delete,"Ctrl-Alt-Backspace":S["Mod-Delete"],"Alt-Delete":S["Mod-Delete"],"Alt-d":S["Mod-Delete"]};for(var M in n.macBaseKeymap=O,S)O[M]=S[M];var C=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?O:S;n.baseKeymap=C},{"prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js","prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js","prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js"}],"../node_modules/prosemirror-inputrules/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.inputRules=function(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return a(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout(function(){var r=e.state.selection,o=r.$cursor;o&&a(e,o.pos,o.pos,"",t,n)})}}},isInputRules:!0});return n},n.textblockTypeInputRule=function(e,t,n){return new i(e,function(e,r,o,i){var s=e.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,a):null})},n.undoInputRule=function(e,t){for(var n=e.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){for(var s=e.tr,a=i.transform,c=a.steps.length-1;c>=0;c--)s.step(a.steps[c].invert(a.docs[c]));if(i.text){var l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to);t(s)}return!0}}return!1},n.wrappingInputRule=function(e,t,n,r){return new i(e,function(e,i,s,a){var c=n instanceof Function?n(i):n,l=e.tr.delete(s,a),u=l.doc.resolve(s),d=u.blockRange(),f=d&&(0,o.findWrapping)(d,t,c);if(!f)return null;l.wrap(d,f);var p=l.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&(0,o.canJoin)(l.doc,s-1)&&(!r||r(i,p))&&l.join(s-1),l})},n.smartQuotes=n.openSingleQuote=n.openDoubleQuote=n.emDash=n.ellipsis=n.closeSingleQuote=n.closeDoubleQuote=n.InputRule=void 0;var r=e("prosemirror-state"),o=e("prosemirror-transform"),i=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var s=t[0].lastIndexOf(t[1]);i+=t[0].slice(s+t[1].length);var a=(r+=s)-o;a>0&&(i=t[0].slice(s-a,s)+i,r=o)}return e.tr.insertText(i,r,o)}):t};n.InputRule=i;var s=500;function a(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,c=a.doc.resolve(t);if(c.parent.type.spec.code)return!1;for(var l=c.parent.textBetween(Math.max(0,c.parentOffset-s),c.parentOffset,null,"￼")+r,u=0;u<o.length;u++){var d=o[u].match.exec(l),f=d&&o[u].handler(a,d,t-(d[0].length-r.length),n);if(f)return e.dispatch(f.setMeta(i,{transform:f,from:t,to:n,text:r})),!0}return!1}var c=new i(/--$/,"—");n.emDash=c;var l=new i(/\.\.\.$/,"…");n.ellipsis=l;var u=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");n.openDoubleQuote=u;var d=new i(/"$/,"”");n.closeDoubleQuote=d;var f=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");n.openSingleQuote=f;var p=new i(/'$/,"’");n.closeSingleQuote=p;var m=[u,d,f,p];n.smartQuotes=m},{"prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js","prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js"}],"../node_modules/w3c-keyname/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keyName=function(e){var t=!(u&&(e.ctrlKey||e.altKey||e.metaKey)||(s||l)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";"Esc"==t&&(t="Escape");"Del"==t&&(t="Delete");"Left"==t&&(t="ArrowLeft");"Up"==t&&(t="ArrowUp");"Right"==t&&(t="ArrowRight");"Down"==t&&(t="ArrowDown");return t},n.shift=n.base=void 0;var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"};n.base=r;var o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"};n.shift=o;for(var i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),s="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),a="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=i&&(c||+i[1]<57)||a&&c,d=0;d<10;d++)r[48+d]=r[96+d]=String(d);for(d=1;d<=24;d++)r[d+111]="F"+d;for(d=65;d<=90;d++)r[d]=String.fromCharCode(d+32),o[d]=String.fromCharCode(d);for(var f in r)o.hasOwnProperty(f)||(o[f]=r[f])},{}],"../node_modules/prosemirror-keymap/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keydownHandler=c,n.keymap=function(e){return new o.Plugin({props:{handleKeyDown:c(e)}})};var r=e("w3c-keyname"),o=e("prosemirror-state"),i="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function s(e){var t,n,r,o,s=e.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var c=0;c<s.length-1;c++){var l=s[c];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function a(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function c(e){var t=function(e){var t=Object.create(null);for(var n in e)t[s(n)]=e[n];return t}(e);return function(e,n){var o,i=(0,r.keyName)(n),s=1==i.length&&" "!=i,c=t[a(i,n,!s)];if(c&&c(e.state,e.dispatch,e))return!0;if(s&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(o=r.base[n.keyCode])&&o!=i){var l=t[a(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}else if(s&&n.shiftKey){var u=t[a(i,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}},{"w3c-keyname":"../node_modules/w3c-keyname/index.es.js","prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js"}],"../node_modules/prosemirror-view/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.__endComposition=vt,n.__parseFromClipboard=qe,n.__serializeForClipboard=Be,n.EditorView=n.DecorationSet=n.Decoration=void 0;var r=e("prosemirror-state"),o=e("prosemirror-model"),i=e("prosemirror-transform"),s={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var a=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=s.ie=!!(c||l||a);s.ie_version=c?document.documentMode||6:l?+l[1]:a?+a[1]:null,s.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),s.gecko_version=s.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);s.chrome=!!d,s.chrome_version=d&&+d[1],s.safari=!u&&/Apple Computer/.test(navigator.vendor),s.ios=s.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),s.mac=s.ios||/Mac/.test(navigator.platform),s.android=/Android \d/.test(navigator.userAgent),s.webkit="webkitFontSmoothing"in document.documentElement.style,s.webkit_version=s.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var f=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},p=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},m=null,h=function(e,t,n){var r=m||(m=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},g=function(e,t,n,r){return n&&(y(e,t,n,r,-1)||y(e,t,n,r,1))},v=/^(img|br|input|textarea|hr)$/i;function y(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:b(e))){var i=e.parentNode;if(1!=i.nodeType||k(e)||v.test(e.nodeName)||"false"==e.contentEditable)return!1;t=f(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?b(e):0}}}function b(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function k(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var w=function(e){var t=e.isCollapsed;return t&&s.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function x(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function _(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function j(e,t){return"number"==typeof e?e:e[t]}function S(e){var 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 O(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,s=n||e.dom;s;s=p(s))if(1==s.nodeType){var a=s==i.body||1!=s.nodeType,c=a?_(i):S(s),l=0,u=0;if(t.top<c.top+j(r,"top")?u=-(c.top-t.top+j(o,"top")):t.bottom>c.bottom-j(r,"bottom")&&(u=t.bottom-c.bottom+j(o,"bottom")),t.left<c.left+j(r,"left")?l=-(c.left-t.left+j(o,"left")):t.right>c.right-j(r,"right")&&(l=t.right-c.right+j(o,"right")),l||u)if(a)i.defaultView.scrollBy(l,u);else{var d=s.scrollLeft,f=s.scrollTop;u&&(s.scrollTop+=u),l&&(s.scrollLeft+=l);var m=s.scrollLeft-d,h=s.scrollTop-f;t={left:t.left-m,top:t.top-h,right:t.right-m,bottom:t.bottom-h}}if(a)break}}function M(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=p(e));return t}function C(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,s=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=s&&(o.scrollLeft=s)}}var E=null;function P(e,t){for(var n,r,o=2e8,i=0,s=t.top,a=t.top,c=e.firstChild,l=0;c;c=c.nextSibling,l++){var u=void 0;if(1==c.nodeType)u=c.getClientRects();else{if(3!=c.nodeType)continue;u=h(c).getClientRects()}for(var d=0;d<u.length;d++){var f=u[d];if(f.top<=s&&f.bottom>=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=c,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==c.nodeType&&p&&(i=l+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=A(r,1);if(i.top!=i.bottom&&T(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:P(n,r)}function T(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function N(e,t){var n,r,o,i,a=e.dom.ownerDocument;if(a.caretPositionFromPoint)try{var c=a.caretPositionFromPoint(t.left,t.top);c&&(o=(n=c).offsetNode,i=n.offset)}catch(e){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(t.left,t.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var u,d=(e.root.elementFromPoint?e.root:a).elementFromPoint(t.left,t.top+1);if(!d||!e.dom.contains(1!=d.nodeType?d.parentNode:d)){var f=e.dom.getBoundingClientRect();if(!T(t,f))return null;if(!(d=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),s=i;;){var a=t.childNodes[s];if(1==a.nodeType)for(var c=a.getClientRects(),l=0;l<c.length;l++){var u=c[l];if(T(n,u))return e(a,n,u)}if((s=(s+1)%o)==i)break}return t}(e.dom,t,f)))return null}if(s.safari)for(var m=d;o&&m;m=p(m))m.draggable&&(o=i=null);if(d=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(d,t),o){if(s.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var h,g=o.childNodes[i];"IMG"==g.nodeName&&(h=g.getBoundingClientRect()).right<=t.left&&h.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?u=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(u=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var s=e.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)o=s.posBefore;else{if(!(a.right<r.left||a.bottom<r.top))break;o=s.posAfter}}i=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==u&&(u=function(e,t,n){var r=P(t,n),o=r.node,i=r.offset,s=-1;if(1==o.nodeType&&!o.firstChild){var a=o.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(o,i,s)}(e,d,t));var v=e.docView.nearestDesc(d,!0);return{pos:u,inside:v?v.posAtStart-v.border:-1}}function A(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function D(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=s.webkit||s.gecko;if(3==o.nodeType){if(!a||!I.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var c=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==o.nodeValue.length?(c--,u=1):n<0?c--:l++,R(A(h(o,c,l),u),u<0)}var d=A(h(o,i,i),n);if(s.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=A(h(o,i-1,i-1),-1);if(f.top==d.top){var p=A(h(o,i,i+1),-1);if(p.top!=d.top)return R(p,p.left<f.left)}}return d}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==b(o))){var m=o.childNodes[i-1];if(1==m.nodeType)return F(m.getBoundingClientRect(),!1)}if(i<b(o)){var g=o.childNodes[i];if(1==g.nodeType)return F(g.getBoundingClientRect(),!0)}return F(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==b(o))){var v=o.childNodes[i-1],y=3==v.nodeType?h(v,b(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(y)return R(A(y,1),!1)}if(i<b(o)){for(var k=o.childNodes[i];k.pmViewDesc&&k.pmViewDesc.ignoreForCoords;)k=k.nextSibling;var w=k?3==k.nodeType?h(k,0,a?0:1):1==k.nodeType?k:null:null;if(w)return R(A(w,-1),!0)}return R(A(3==o.nodeType?h(o):o,-n),n>=0)}function R(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function F(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function z(e,t,n){var 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()}}var L=/[\u0590-\u08ac]/;var B=null,q=null,$=!1;function V(e,t,n){return B==t&&q==n?$:(B=t,q=n,$="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return z(e,t,function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=D(e,o.pos,1),s=t.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=h(s,0,s.nodeValue.length).getClientRects()}for(var c=0;c<a.length;c++){var l=a[c];if(l.bottom>l.top+1&&("up"==n?i.top-l.top>2*(l.bottom-i.top):l.bottom-i.bottom>2*(i.bottom-l.top)))return!1}}return!0})}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.root.getSelection();return L.test(r.parent.textContent)&&a.modify?z(e,t,function(){var t=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");var c=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),c}):"left"==n||"backward"==n?i:s}(e,t,n))}var U=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},W={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};U.prototype.matchesWidget=function(){return!1},U.prototype.matchesMark=function(){return!1},U.prototype.matchesNode=function(){return!1},U.prototype.matchesHack=function(e){return!1},U.prototype.parseRule=function(){return null},U.prototype.stopEvent=function(){return!1},W.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},W.border.get=function(){return 0},U.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},U.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},W.posBefore.get=function(){return this.parent.posBeforeChild(this)},W.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},W.posAfter.get=function(){return this.posBefore+this.size},W.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},U.prototype.localPosFromDOM=function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,s;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(s=i.pmViewDesc)||s.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}var a;if(e==this.dom&&this.contentDOM)a=t>f(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){a=!1;break}if(c.parentNode.firstChild!=c)break}if(null==a&&t==e.childNodes.length)for(var l=e;;l=l.parentNode){if(l==this.dom){a=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==a?n>0:a)?this.posAtEnd:this.posAtStart},U.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},U.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},U.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},U.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},U.prototype.domFromPos=function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=0;n<this.children.length;n++){var i=this.children[n],s=o+i.size;if(s>e||i instanceof X){r=e-o;break}o=s}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(var a=void 0;n&&!(a=this.children[n-1]).size&&a instanceof K&&a.widget.type.side>=0;n--);if(t<=0){for(var c,l=!0;(c=n?this.children[n-1]:null)&&c.dom.parentNode!=this.contentDOM;n--,l=!1);return c&&t&&l&&!c.border&&!c.domAtom?c.domFromPos(c.size,t):{node:this.contentDOM,offset:c?f(c.dom)+1:0}}for(var u,d=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,d=!1);return u&&d&&!u.border&&!u.domAtom?u.domFromPos(0,t):{node:this.contentDOM,offset:u?f(u.dom):this.contentDOM.childNodes.length}},U.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==r&&e<=c){var l=i+a.border;if(e>=l&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,l);e=i;for(var u=s;u>0;u--){var d=this.children[u-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=f(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(c>t||s==this.children.length-1)){t=c;for(var p=s+1;p<this.children.length;p++){var m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){o=f(m.dom);break}t+=m.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},U.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},U.prototype.domAfterPos=function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},U.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),a=0,c=0;a<this.children.length;a++){var l=this.children[a],u=c+l.size;if(o>c&&i<u)return l.setSelection(e-c-l.border,t-c-l.border,n,r);c=u}var d=this.domFromPos(e,e?-1:1),p=t==e?d:this.domFromPos(t,t?-1:1),m=n.getSelection(),h=!1;if((s.gecko||s.safari)&&e==t){var v=d.node,y=d.offset;if(3==v.nodeType){if((h=y&&"\n"==v.nodeValue[y-1])&&y==v.nodeValue.length)for(var b=v,k=void 0;b;b=b.parentNode){if(k=b.nextSibling){"BR"==k.nodeName&&(d=p={node:k.parentNode,offset:f(k)+1});break}var w=b.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{var x=v.childNodes[y-1];h=x&&("BR"==x.nodeName||"false"==x.contentEditable)}}if(s.gecko&&m.focusNode&&m.focusNode!=p.node&&1==m.focusNode.nodeType){var _=m.focusNode.childNodes[m.focusOffset];_&&"false"==_.contentEditable&&(r=!0)}if(r||h&&s.safari||!g(d.node,d.offset,m.anchorNode,m.anchorOffset)||!g(p.node,p.offset,m.focusNode,m.focusOffset)){var j=!1;if((m.extend||e==t)&&!h){m.collapse(d.node,d.offset);try{e!=t&&m.extend(p.node,p.offset),j=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!j){if(e>t){var S=d;d=p,p=S}var O=document.createRange();O.setEnd(p.node,p.offset),O.setStart(d.node,d.offset),m.removeAllRanges(),m.addRange(O)}}},U.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},W.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},U.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var s=n+o.border,a=i-o.border;if(e>=s&&t<=a)return this.dirty=e==n||t==i?2:1,void(e!=s||t!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-s,t-s):o.dirty=3);o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM?2:3}n=i}this.dirty=2},U.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}},W.domAtom.get=function(){return!1},W.ignoreForCoords.get=function(){return!1},Object.defineProperties(U.prototype,W);var H=[],K=function(e){function t(t,n,r,o){var i,s=n.type.toDOM;if("function"==typeof s&&(s=s(r,function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o})),!n.type.spec.raw){if(1!=s.nodeType){var a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable=!1,s.classList.add("ProseMirror-widget")}e.call(this,t,H,s,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},t.prototype.ignoreMutation=function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection},t.prototype.destroy=function(){this.widget.type.destroy(this.dom),e.prototype.destroy.call(this)},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(U),J=function(e){function t(t,n,r,o){e.call(this,t,H,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(U),G=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,i){var s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return a&&a.dom||(a=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=de(i,n,s,r)),e>0&&(i=de(i,0,e,r));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},t}(U),Q=function(e){function t(t,n,r,o,i,s,a,c,l){e.call(this,t,n.isLeaf?H:[],i,s),this.nodeDOM=a,this.node=n,this.outerDeco=r,this.innerDeco=o,s&&this.updateChildren(c,l)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return t.create=function(e,n,r,i,s,a){var c,l,u=s.nodeViews[n.type.name],d=u&&u(n,s,function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:a},r,i),f=d&&d.dom,p=d&&d.contentDOM;if(n.isText)if(f){if(3!=f.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else f=document.createTextNode(n.text);else f||(f=(c=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=c.contentDOM);p||n.isText||"BR"==f.nodeName||(f.hasAttribute("contenteditable")||(f.contentEditable=!1),n.type.spec.draggable&&(f.draggable=!0));var m=f;return f=se(f,r,n),d?l=new ee(e,n,r,i,f,p,m,d,s,a+1):n.isText?new Z(e,n,r,i,f,m,s):new t(e,n,r,i,f,p,m,s,a+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?o.Fragment.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ae(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,i=t,a=e.composing&&this.localCompositionInfo(e,t),c=a&&a.pos>-1?a:null,l=a&&a.pos<0,u=new le(this,c&&c.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var s=0;s<e.childCount;s++){var a=e.child(s);r(a,o,t.forChild(i,a),s),i+=a.nodeSize}return}for(var c=0,l=[],u=null,d=0;;){if(c<o.length&&o[c].to==i){for(var f=o[c++],p=void 0;c<o.length&&o[c].to==i;)(p||(p=[f])).push(o[c++]);if(p){p.sort(ue);for(var m=0;m<p.length;m++)n(p[m],d,!!u)}else n(f,d,!!u)}var h=void 0,g=void 0;if(u)g=-1,h=u,u=null;else{if(!(d<e.childCount))break;g=d,h=e.child(d++)}for(var v=0;v<l.length;v++)l[v].to<=i&&l.splice(v--,1);for(;c<o.length&&o[c].from<=i&&o[c].to>i;)l.push(o[c++]);var y=i+h.nodeSize;if(h.isText){var b=y;c<o.length&&o[c].from<b&&(b=o[c].from);for(var k=0;k<l.length;k++)l[k].to<b&&(b=l[k].to);b<y&&(u=h.cut(b-i),h=h.cut(0,b-i),y=b,g=-1)}var w=l.length?h.isInline&&!h.isLeaf?l.filter(function(e){return!e.inline}):l.slice():H;r(h,w,t.forChild(i,h),g),i=y}}(this.node,this.innerDeco,function(t,s,a){t.spec.marks?u.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&u.syncToMarks(s==n.node.childCount?o.Mark.none:n.node.child(s).marks,r,e),u.placeWidget(t,e,i)},function(t,n,o,s){var c;u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,o,s)||l&&e.state.selection.from>i&&e.state.selection.to<i+t.nodeSize&&(c=u.findIndexWithChild(a.node))>-1&&u.updateNodeAt(t,n,o,c,e)||u.updateNextNode(t,n,o,e,s)||u.addNode(t,n,o,e,i),i+=t.nodeSize}),u.syncToMarks(H,r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(c&&this.protectLocalComposition(e,c),function e(t,n,r){var o=t.firstChild,i=!1;for(var s=0;s<n.length;s++){var a=n[s],c=a.dom;if(c.parentNode==t){for(;c!=o;)o=ce(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(c,o);if(a instanceof G){var l=o?o.previousSibling:t.lastChild;e(a.contentDOM,a.children,r),o=l?l.nextSibling:t.firstChild}}for(;o;)o=ce(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),s.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,o=n.from,i=n.to;if(!(!(e.state.selection instanceof r.TextSelection)||o<t||i>t+this.node.content.size)){var s=e.root.getSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=b(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(s.focusNode,s.focusOffset);if(a&&this.dom.contains(a.parentNode)){if(this.node.inlineContent){var c=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var s=e.child(o++),a=i;if(i+=s.nodeSize,s.isText){for(var c=s.text;o<e.childCount;){var l=e.child(o++);if(i+=l.nodeSize,!l.isText)break;c+=l.text}if(i>=n){var u=c.lastIndexOf(t,r-a);if(u>=0&&u+t.length+a>=n)return a+u}}}return-1}(this.node.content,c,o-t,i-t);return l<0?null:{node:a,pos:l,text:c}}return{node:a,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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=null)}var s=new J(this,i,n,o);e.compositionNodes.push(s),this.children=de(this.children,r,r+o.length,e,s)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!ae(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=oe(this.dom,this.nodeDOM,re(this.outerDeco,this.node,t),re(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(U);function Y(e,t,n,r,o){return se(r,t,e),new Q(null,e,t,n,r,r,r,o,0)}var Z=function(e){function t(t,n,r,o,i,s,a){e.call(this,t,n,r,o,i,null,s,a)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(Q),X=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return 0==this.dirty&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(t.prototype,n),t}(U),ee=function(e){function t(t,n,r,o,i,s,a,c,l,u){e.call(this,t,n,r,o,i,s,a,l,u),this.spec=c}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(Q);function te(e){e&&(this.nodeName=e)}te.prototype=Object.create(null);var ne=[new te];function re(e,t,n){if(0==e.length)return ne;for(var r=n?ne[0]:new te,o=[r],i=0;i<e.length;i++){var s=e[i].type.attrs;if(s)for(var a in s.nodeName&&o.push(r=new te(s.nodeName)),s){var c=s[a];null!=c&&(n&&1==o.length&&o.push(r=new te(t.isInline?"span":"div")),"class"==a?r.class=(r.class?r.class+" ":"")+c:"style"==a?r.style=(r.style?r.style+";":"")+c:"nodeName"!=a&&(r[a]=c))}}return o}function oe(e,t,n,r){if(n==ne&&r==ne)return t;for(var o=t,i=0;i<r.length;i++){var s=r[i],a=n[i];if(i){var c=void 0;a&&a.nodeName==s.nodeName&&o!=e&&(c=o.parentNode)&&c.tagName.toLowerCase()==s.nodeName?o=c:((c=document.createElement(s.nodeName)).pmIsDeco=!0,c.appendChild(o),a=ne[0],o=c)}ie(o,a||ne[0],s)}return o}function ie(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):H,s=n.class?n.class.split(" ").filter(Boolean):H,a=0;a<i.length;a++)-1==s.indexOf(i[a])&&e.classList.remove(i[a]);for(var c=0;c<s.length;c++)-1==i.indexOf(s[c])&&e.classList.add(s[c]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var l,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;l=u.exec(t.style);)e.style.removeProperty(l[1]);n.style&&(e.style.cssText+=n.style)}}function se(e,t,n){return oe(e,e,ne,re(t,n,1!=e.nodeType))}function ae(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ce(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var le=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,s=[];e:for(;o>0;){for(var a=void 0;;)if(r){var c=n.children[r-1];if(!(c instanceof G)){a=c,r--;break}n=c,r=c.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)};function ue(e,t){return e.type.side-t.type.side}function de(e,t,n,r,o){for(var i=[],s=0,a=0;s<e.length;s++){var c=e[s],l=a,u=a+=c.size;l>=n||u<=t?i.push(c):(l<t&&i.push(c.slice(0,t-l,r)),o&&(i.push(o),o=null),u>n&&i.push(c.slice(n-l,c.size,r)))}return i}function fe(e,t){var n=e.root.getSelection(),o=e.state.doc;if(!n.focusNode)return null;var i=e.docView.nearestDesc(n.focusNode),s=i&&0==i.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var c,l,u=o.resolve(a);if(w(n)){for(c=u;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&r.NodeSelection.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function(e,t,n){for(var r=0==t,o=t==b(e);r||o;){if(e==n)return!0;var i=f(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==b(e)}}(n.focusNode,n.focusOffset,i.dom))){var d=i.posBefore;l=new r.NodeSelection(a==d?u:o.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;c=o.resolve(p)}l||(l=we(e,c,u,"pointer"==t||e.state.selection.head<u.pos&&!s?1:-1));return l}function pe(e){return e.editable?e.hasFocus():xe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function me(e,t){var n=e.state.selection;if(be(e,n),pe(e)){if(!t&&e.mouseDown&&e.mouseDown.allowDefault)return e.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection();if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,f(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&s.ie&&s.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var o,i,a=n.anchor,c=n.head;!he||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=ge(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=ge(e,n.to))),e.docView.setSelection(a,c,e.root,t),he&&(o&&ye(o),i&&ye(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),setTimeout(function(){pe(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}le.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},le.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},le.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var s=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(e[o])){s=a;break}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},le.prototype.findNodeMatch=function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var s=this.index,a=Math.min(this.top.children.length,s+5);s<a;s++){var c=this.top.children[s];if(c.matchesNode(e,t,n)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},le.prototype.updateNodeAt=function(e,t,n,r,o){return!!this.top.children[r].update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},le.prototype.findIndexWithChild=function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}},le.prototype.updateNextNode=function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var s=this.top.children[i];if(s instanceof Q){var a=this.preMatch.matched.get(s);if(null!=a&&a!=o)return!1;var c=s.dom;if(!(this.lock&&(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&3!=s.dirty&&ae(t,s.outerDeco)))&&s.update(e,t,n,r))return this.destroyBetween(this.index,i),s.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},le.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,Q.create(this.top,e,t,n,r,o)),this.changed=!0},le.prototype.placeWidget=function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new K(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},le.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof G;)e=e.children[e.children.length-1];e&&e instanceof Z&&!/\n$/.test(e.node.text)||((s.safari||s.chrome)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},le.prototype.addHackNode=function(e){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(e))this.index++;else{var t=document.createElement(e);"IMG"==e&&(t.className="ProseMirror-separator"),"BR"==e&&(t.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new X(this.top,H,t,null)),this.changed=!0}};var he=s.safari||s.chrome&&s.chrome_version<63;function ge(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(s.safari&&i&&"false"==i.contentEditable)return ve(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return ve(i);if(a)return ve(a)}}function ve(e){return e.contentEditable="true",s.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ye(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function be(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(ke(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else ke(e)}function ke(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function we(e,t,n,o){return e.someProp("createSelectionBetween",function(r){return r(e,t,n)})||r.TextSelection.between(t,n,o)}function xe(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function _e(e,t){var n=e.selection,o=n.$anchor,i=n.$head,s=t>0?o.max(i):o.min(i),a=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return a&&r.Selection.findFrom(a,t)}function je(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Se(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return je(e,new r.TextSelection(t>0?o.$to:o.$from));var i=_e(e.state,t);return!!i&&je(e,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var a=_e(e.state,t);return!!(a&&a instanceof r.NodeSelection)&&je(e,a)}if(!(s.mac&&n.indexOf("m")>-1)){var c,l=o.$head,u=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!u||u.isText)return!1;var d=t<0?l.pos-u.nodeSize:l.pos;return!!(u.isAtom||(c=e.docView.descAt(d))&&!c.contentDOM)&&(r.NodeSelection.isSelectable(u)?je(e,new r.NodeSelection(t<0?e.state.doc.resolve(l.pos-u.nodeSize):l)):!!s.webkit&&je(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+u.nodeSize))))}}function Oe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Me(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ce(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(s.gecko&&1==n.nodeType&&r<Oe(n)&&Me(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(Me(c))o=n,i=--r;else{if(3!=c.nodeType)break;r=(n=c).nodeValue.length}}else{if(Pe(n))break;for(var l=n.previousSibling;l&&Me(l);)o=n.parentNode,i=f(l),l=l.previousSibling;if(l)r=Oe(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Te(e,t,n,r):o&&Te(e,t,o,i)}}function Ee(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,s=Oe(n);;)if(r<s){if(1!=n.nodeType)break;if(!Me(n.childNodes[r]))break;o=n,i=++r}else{if(Pe(n))break;for(var a=n.nextSibling;a&&Me(a);)o=a.parentNode,i=f(a)+1,a=a.nextSibling;if(a)r=0,s=Oe(n=a);else{if((n=n.parentNode)==e.dom)break;r=s=0}}o&&Te(e,t,o,i)}}function Pe(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Te(e,t,n,r){if(w(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout(function(){e.state==i&&me(e)},50)}function Ne(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection&&!o.empty||n.indexOf("s")>-1)return!1;if(s.mac&&n.indexOf("m")>-1)return!1;var i=o.$from,a=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var c=_e(e.state,t);if(c&&c instanceof r.NodeSelection)return je(e,c)}if(!i.parent.inlineContent){var l=t<0?i:a,u=o instanceof r.AllSelection?r.Selection.near(l,t):r.Selection.findFrom(l,t);return!!u&&je(e,u)}return!1}function Ae(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,s=n.empty;if(!o.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(a&&!a.isText){var c=e.state.tr;return t<0?c.delete(o.pos-a.nodeSize,o.pos):c.delete(o.pos,o.pos+a.nodeSize),e.dispatch(c),!0}return!1}function Ie(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function De(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||s.mac&&72==n&&"c"==r?Ae(e,-1)||Ce(e):46==n||s.mac&&68==n&&"c"==r?Ae(e,1)||Ee(e):13==n||27==n||(37==n?Se(e,-1,r)||Ce(e):39==n?Se(e,1,r)||Ee(e):38==n?Ne(e,-1,r)||Ce(e):40==n?function(e){if(s.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Ie(e,o,!0),setTimeout(function(){return Ie(e,o,!1)},20)}}}(e)||Ne(e,1,r)||Ee(e):r==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Re(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(s.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||s.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function Fe(e,t,n,i,a){if(t<0){var c=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,l=fe(e,c);if(l&&!e.state.selection.eq(l)){var u=e.state.tr.setSelection(l);"pointer"==c?u.setMeta("pointer",!0):"key"==c&&u.scrollIntoView(),e.dispatch(u)}}else{var d=e.state.doc.resolve(t),f=d.sharedDepth(n);t=d.before(f+1),n=e.state.doc.resolve(n).after(f+1);var p=e.state.selection,m=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,a=r.fromOffset,c=r.toOffset,l=r.from,u=r.to,d=e.root.getSelection(),f=null,p=d.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(f=[{node:p,offset:d.anchorOffset}],w(d)||f.push({node:d.focusNode,offset:d.focusOffset})),s.chrome&&8===e.lastKeyCode)for(var m=c;m>a;m--){var h=i.childNodes[m-1],g=h.pmViewDesc;if("BR"==h.nodeName&&!g){c=m;break}if(!g||g.size)break}var v=e.state.doc,y=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),b=v.resolve(l),k=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:a,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:f,ruleFromNode:Re,context:b});if(f&&null!=f[0].pos){var _=f[0].pos,j=f[1]&&f[1].pos;null==j&&(j=_),k={anchor:_+l,head:j+l}}return{doc:x,sel:k,from:l,to:u}}(e,t,n);if(s.chrome&&e.cursorWrapper&&m.sel&&m.sel.anchor==e.cursorWrapper.deco.from){var h=e.cursorWrapper.deco.type.toDOM.nextSibling,g=h&&h.nodeValue?h.nodeValue.length:1;m.sel={anchor:m.sel.anchor+g,head:m.sel.anchor+g}}var v,y,b=e.state.doc,k=b.slice(m.from,m.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(v=e.state.selection.to,y="end"):(v=e.state.selection.from,y="start"),e.lastKeyCode=null;var _=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var s=e.findDiffEnd(t,n+e.size,n+t.size),a=s.a,c=s.b;if("end"==o){var l=Math.max(0,i-Math.min(a,c));r-=a+l-i}if(a<i&&e.size<t.size){var u=r<=i&&r>=a?i-r:0;c=(i-=u)+(c-a),a=i}else if(c<i){var d=r<=i&&r>=c?i-r:0;a=(i-=d)+(a-c),c=i}return{start:i,endA:a,endB:c}}(k.content,m.doc.content,m.from,v,y);if(!_){if(!(i&&p instanceof r.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||m.sel&&m.sel.anchor!=m.sel.head){if((s.ios&&e.lastIOSEnter>Date.now()-225||s.android)&&a.some(function(e){return"DIV"==e.nodeName||"P"==e.nodeName})&&e.someProp("handleKeyDown",function(t){return t(e,x(13,"Enter"))}))return void(e.lastIOSEnter=0);if(m.sel){var j=ze(e,e.state.doc,m.sel);j&&!j.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(j))}return}_={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&_.start==_.endB&&e.state.selection instanceof r.TextSelection&&(_.start>e.state.selection.from&&_.start<=e.state.selection.from+2?_.start=e.state.selection.from:_.endA<e.state.selection.to&&_.endA>=e.state.selection.to-2&&(_.endB+=e.state.selection.to-_.endA,_.endA=e.state.selection.to)),s.ie&&s.ie_version<=11&&_.endB==_.start+1&&_.endA==_.start&&_.start>m.from&&"  "==m.doc.textBetween(_.start-m.from-1,_.start-m.from+1)&&(_.start--,_.endA--,_.endB--);var S,O=m.doc.resolveNoCache(_.start-m.from),M=m.doc.resolveNoCache(_.endB-m.from),C=O.sameParent(M)&&O.parent.inlineContent;if((s.ios&&e.lastIOSEnter>Date.now()-225&&(!C||a.some(function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))||!C&&O.pos<m.doc.content.size&&(S=r.Selection.findFrom(m.doc.resolve(O.pos+1),1,!0))&&S.head==M.pos)&&e.someProp("handleKeyDown",function(t){return t(e,x(13,"Enter"))}))e.lastIOSEnter=0;else if(e.state.selection.anchor>_.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Le(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var s=e.resolve(Le(i,!0,!0));if(!s.parent.isTextblock||s.pos>n||Le(s,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(b,_.start,_.endA,O,M)&&e.someProp("handleKeyDown",function(t){return t(e,x(8,"Backspace"))}))s.android&&s.chrome&&e.domObserver.suppressSelectionUpdates();else{s.chrome&&s.android&&_.toB==_.from&&(e.lastAndroidDelete=Date.now()),s.android&&!C&&O.start()!=M.start()&&0==M.parentOffset&&O.depth==M.depth&&m.sel&&m.sel.anchor==m.sel.head&&m.sel.head==_.endA&&(_.endB-=2,M=m.doc.resolveNoCache(_.endB-m.from),setTimeout(function(){e.someProp("handleKeyDown",function(t){return t(e,x(13,"Enter"))})},20));var E,P,T,N,A=_.start,I=_.endA;if(C)if(O.pos==M.pos)s.ie&&s.ie_version<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(function(){return me(e)},20)),E=e.state.tr.delete(A,I),P=b.resolve(_.start).marksAcross(b.resolve(_.endA));else if(_.endA==_.endB&&(N=b.resolve(_.start))&&(T=function(e,t){for(var n,r,i,s=e.firstChild.marks,a=t.firstChild.marks,c=s,l=a,u=0;u<a.length;u++)c=a[u].removeFromSet(c);for(var d=0;d<s.length;d++)l=s[d].removeFromSet(l);if(1==c.length&&0==l.length)r=c[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=c.length||1!=l.length)return null;r=l[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],p=0;p<t.childCount;p++)f.push(i(t.child(p)));if(o.Fragment.from(f).eq(e))return{mark:r,type:n}}(O.parent.content.cut(O.parentOffset,M.parentOffset),N.parent.content.cut(N.parentOffset,_.endA-N.start()))))E=e.state.tr,"add"==T.type?E.addMark(A,I,T.mark):E.removeMark(A,I,T.mark);else if(O.parent.child(O.index()).isText&&O.index()==M.index()-(M.textOffset?0:1)){var D=O.parent.textBetween(O.parentOffset,M.parentOffset);if(e.someProp("handleTextInput",function(t){return t(e,A,I,D)}))return;E=e.state.tr.insertText(D,A,I)}if(E||(E=e.state.tr.replace(A,I,m.doc.slice(_.start-m.from,_.endB-m.from))),m.sel){var R=ze(e,E.doc,m.sel);R&&!(s.chrome&&s.android&&e.composing&&R.empty&&(_.start!=_.endB||e.lastAndroidDelete<Date.now()-100)&&(R.head==A||R.head==E.mapping.map(I)-1)||s.ie&&R.empty&&R.head==A)&&E.setSelection(R)}P&&E.ensureMarks(P),e.dispatch(E.scrollIntoView())}}}function ze(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:we(e,t.resolve(n.anchor),t.resolve(n.head))}function Le(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Be(e,t){for(var n=[],r=t.content,i=t.openStart,s=t.openEnd;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var c=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),l=Je(),u=l.createElement("div");u.appendChild(c.serializeFragment(r,{document:l}));for(var d,f=u.firstChild;f&&1==f.nodeType&&(d=He[f.nodeName.toLowerCase()]);){for(var p=d.length-1;p>=0;p--){for(var m=l.createElement(d[p]);u.firstChild;)m.appendChild(u.firstChild);u.appendChild(m),"tbody"!=d[p]&&(i++,s++)}f=u.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n)),{dom:u,text:e.someProp("clipboardTextSerializer",function(e){return e(t)})||t.content.textBetween(0,t.content.size,"\n\n")}}function qe(e,t,n,r,i){var a,c,l=i.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||l||!n);if(u){if(e.someProp("transformPastedText",function(e){t=e(t,l||r)}),l)return t?new o.Slice(o.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):o.Slice.empty;var d=e.someProp("clipboardTextParser",function(e){return e(t,i,r)});if(d)c=d;else{var f=i.marks(),p=e.state.schema,m=o.DOMSerializer.fromSchema(p);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(function(e){var t=a.appendChild(document.createElement("p"));e&&t.appendChild(m.serializeNode(p.text(e,f)))})}}else e.someProp("transformPastedHTML",function(e){n=e(n)}),a=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Je().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&He[o[1].toLowerCase()])&&(e=n.map(function(e){return"<"+e+">"}).join("")+e+n.map(function(e){return"</"+e+">"}).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),s.webkit&&function(e){for(var t=e.querySelectorAll(s.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);var h=a&&a.querySelector("[data-pm-slice]"),g=h&&/^(\d+) (\d+) (.*)/.exec(h.getAttribute("data-pm-slice"));if(!c){var v=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);c=v.parseSlice(a,{preserveWhitespace:!(!u&&!g),context:i,ruleFromNode:function(e){if("BR"==e.nodeName&&!e.nextSibling&&e.parentNode&&!$e.test(e.parentNode.nodeName))return{ignore:!0}}})}if(g)c=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var i=e.content,s=e.openStart,a=e.openEnd,c=n.length-2;c>=0;c-=2){var l=r.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;i=o.Fragment.from(l.create(n[c+1],i)),s++,a++}return new o.Slice(i,s,a)}(We(c,+g[1],+g[2]),g[3]);else if((c=o.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n),i=r.contentMatchAt(t.index(n)),s=void 0,a=[];if(e.forEach(function(e){if(a){var t,n=i.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&s.length&&function e(t,n,r,i,s){if(s<t.length&&s<n.length&&t[s]==n[s]){var a=e(t,n,r,i.lastChild,s+1);if(a)return i.copy(i.content.replaceChild(i.childCount-1,a));var c=i.contentMatchAt(i.childCount);if(c.matchType(s==t.length-1?r.type:t[s+1]))return i.copy(i.content.append(o.Fragment.from(Ve(r,t,s+1))))}}(n,s,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1));var i=t.contentMatchAt(t.childCount).fillBefore(o.Fragment.empty,!0);return t.copy(r.append(i))}(a[a.length-1],s.length));var r=Ve(e,n);a.push(r),i=i.matchType(r.type,r.attrs),s=n}}}),a)return{v:o.Fragment.from(a)}},r=t.depth;r>=0;r--){var i=n(r);if(i)return i.v}return e}(c.content,i),!0)).openStart||c.openEnd){for(var y=0,b=0,k=c.content.firstChild;y<c.openStart&&!k.type.spec.isolating;y++,k=k.firstChild);for(var w=c.content.lastChild;b<c.openEnd&&!w.type.spec.isolating;b++,w=w.lastChild);c=We(c,y,b)}return e.someProp("transformPasted",function(e){c=e(c)}),c}var $e=/^(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 Ve(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function Ue(e,t,n,r,i,s){var a=t<0?e.firstChild:e.lastChild,c=a.content;return i<r-1&&(c=Ue(c,t,n,r,i+1,s)),i>=n&&(c=t<0?a.contentMatchAt(0).fillBefore(c,e.childCount>1||s<=i).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(c))}function We(e,t,n){return t<e.openStart&&(e=new o.Slice(Ue(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o.Slice(Ue(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var He={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ke=null;function Je(){return Ke||(Ke=document.implementation.createHTMLDocument("title"))}var Ge={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qe=s.ie&&s.ie_version<=11,Ye=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Ye.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Ye.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ze=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver(function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);s.ie&&s.ie_version<=11&&e.some(function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length})?n.flushSoon():n.flush()}),this.currentSelection=new Ye,Qe&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ze.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){e.flushingSoon=-1,e.flush()},20))},Ze.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ze.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ge),Qe&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ze.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(function(){return e.flush()},20)}this.observer.disconnect()}Qe&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Ze.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Ze.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Ze.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout(function(){return e.suppressingSelectionUpdates=!1},50)},Ze.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&xe(e)){var e;if(this.suppressingSelectionUpdates)return me(this.view);if(s.ie&&s.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&g(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Ze.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Ze.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0},Ze.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&xe(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var c=0;c<e.length;c++){var l=this.registerMutation(e[c],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(s.gecko&&a.length>1){var u=a.filter(function(e){return"BR"==e.nodeName});if(2==u.length){var d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Xe)return;Xe=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||me(this.view),this.currentSelection.set(t))}},Ze.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(s.ie&&s.ie_version<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var c=e.addedNodes[a],l=c.previousSibling,u=c.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}var d=o&&o.parentNode==e.target?f(o)+1:0,p=n.localPosFromDOM(e.target,d,-1),m=i&&i.parentNode==e.target?f(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,m,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var Xe=!1;var et={},tt={};function nt(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function rt(e){e.someProp("handleDOMEvents",function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return ot(e,t)})})}function ot(e,t){return e.someProp("handleDOMEvents",function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function it(e){return{left:e.clientX,top:e.clientY}}function st(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),s=function(r){if(e.someProp(t,function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)}))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function at(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ct(e,t,n,o,i){return st(e,"handleClickOn",t,n,o)||e.someProp("handleClick",function(n){return n(e,t,o)})||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var s=e.state.doc.resolve(t),a=s.depth+1;a>0;a--){var c=a>s.depth?s.nodeAfter:s.node(a);if(r.NodeSelection.isSelectable(c)){o=n&&i.$from.depth>0&&a>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(a);break}}return null!=o&&(at(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(at(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function lt(e,t,n,o){return st(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",function(n){return n(e,t,o)})||function(e,t,n){if(0!=n.button)return!1;var o=e.state.doc;if(-1==t)return!!o.inlineContent&&(at(e,r.TextSelection.create(o,0,o.content.size),"pointer"),!0);for(var i=o.resolve(t),s=i.depth+1;s>0;s--){var a=s>i.depth?i.nodeAfter:i.node(s),c=i.before(s);if(a.inlineContent)at(e,r.TextSelection.create(o,c+1,c+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;at(e,r.NodeSelection.create(o,c),"pointer")}return!0}}(e,n,o)}function ut(e){return vt(e)}tt.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!pt(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!s.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",function(n){return n(e,t)})||De(e,t)?t.preventDefault():nt(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout(function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",function(t){return t(e,x(13,"Enter"))}),e.lastIOSEnter=0)},200)}},tt.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},tt.keypress=function(e,t){if(!(pt(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||s.mac&&t.metaKey))if(e.someProp("handleKeyPress",function(n){return n(e,t)}))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection&&n.$from.sameParent(n.$to))){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",function(t){return t(e,n.$from.pos,n.$to.pos,o)})||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var dt=s.mac?"metaKey":"ctrlKey";et.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ut(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[dt]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(it(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new ft(e,i,t,n)):("doubleClick"==o?function(e,t,n,r){return st(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",function(n){return n(e,t,r)})}:lt)(e,i.pos,i.inside,t)?t.preventDefault():nt(e,"pointer"))};var ft=function(e,t,n,o){var i,a,c=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[dt],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{var l=e.state.doc.resolve(t.pos);i=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var u=o?null:n.target,d=u?e.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=e.state.selection;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof r.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&s.gecko&&!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(function(){c.view.mouseDown==c&&c.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)),nt(e,"pointer")};function pt(e,t){return!!e.composing||!!(s.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}ft.prototype.done=function(){var e=this;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(function(){return me(e.view)}),this.view.mouseDown=null},ft.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(it(e))),this.allowDefault||!t?nt(this.view,"pointer"):ct(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||s.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||s.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(at(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):nt(this.view,"pointer")}},ft.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),nt(this.view,"pointer"),0==e.buttons&&this.done()},et.touchdown=function(e){ut(e),nt(e,"pointer")},et.contextmenu=function(e){return ut(e)};var mt=s.android?5e3:-1;function ht(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout(function(){return vt(e)},t))}function gt(e){var t;for(e.composing&&(e.composing=!1,e.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function vt(e,t){if(e.domObserver.forceFlush(),gt(e),t||e.docView.dirty){var n=fe(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}tt.compositionstart=tt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(function(e){return!1===e.type.spec.inclusive})))e.markCursor=e.state.storedMarks||n.marks(),vt(e,!0),e.markCursor=null;else if(vt(e),s.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.composing=!0}ht(e,mt)},tt.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ht(e,20))};var yt=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function bt(e,t,n,r){var i=qe(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",function(t){return t(e,r,i||o.Slice.empty)}))return!0;if(!i)return!1;var s=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),a=s?e.state.tr.replaceSelectionWith(s,e.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}et.copy=tt.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=yt?null:t.clipboardData,i=Be(e,n.content()),s=i.dom,a=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}}(e,s),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},tt.paste=function(e,t){var n=yt?null:t.clipboardData;n&&bt(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.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(),setTimeout(function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bt(e,r.value,null,t):bt(e,r.textContent,r.innerHTML,t)},50)}}(e,t)};var kt=function(e,t){this.slice=e,this.move=t},wt=s.mac?"altKey":"ctrlKey";for(var xt in et.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(it(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var s=e.docView.nearestDesc(t.target,!0);s&&s.node.type.spec.draggable&&s!=e.docView&&e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,s.posBefore)))}var a=e.state.selection.content(),c=Be(e,a),l=c.dom,u=c.text;t.dataTransfer.clearData(),t.dataTransfer.setData(yt?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",yt||t.dataTransfer.setData("text/plain",u),e.dragging=new kt(a,!t[wt])}},et.dragend=function(e){var t=e.dragging;window.setTimeout(function(){e.dragging==t&&(e.dragging=null)},50)},tt.dragover=tt.dragenter=function(e,t){return t.preventDefault()},tt.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var s=e.posAtCoords(it(t));if(s){var a=e.state.doc.resolve(s.pos);if(a){var c=n&&n.slice;c?e.someProp("transformPasted",function(e){c=e(c)}):c=qe(e,t.dataTransfer.getData(yt?"Text":"text/plain"),yt?null:t.dataTransfer.getData("text/html"),!1,a);var l=n&&!t[wt];if(e.someProp("handleDrop",function(n){return n(e,t,c||o.Slice.empty,l)}))t.preventDefault();else if(c){t.preventDefault();var u=c?(0,i.dropPoint)(e.state.doc,a.pos,c):a.pos;null==u&&(u=a.pos);var d=e.state.tr;l&&d.deleteSelection();var f=d.mapping.map(u),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=d.doc;if(p?d.replaceRangeWith(f,f,c.content.firstChild):d.replaceRange(f,f,c),!d.doc.eq(m)){var h=d.doc.resolve(f);if(p&&r.NodeSelection.isSelectable(c.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new r.NodeSelection(h));else{var g=d.mapping.map(u);d.mapping.maps[d.mapping.maps.length-1].forEach(function(e,t,n,r){return g=r}),d.setSelection(we(e,h,d.doc.resolve(g)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},et.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&me(e)},20))},et.blur=function(e,t){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.set({}),e.focused=!1)},et.beforeinput=function(e,t){if(s.chrome&&s.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout(function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",function(t){return t(e,x(8,"Backspace"))}))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}},50)}},tt)et[xt]=tt[xt];function _t(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var jt=function(e,t){this.spec=t||Pt,this.side=this.spec.side||0,this.toDOM=e};jt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Mt(i-n,i-n,this)},jt.prototype.valid=function(){return!0},jt.prototype.eq=function(e){return this==e||e instanceof jt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&_t(this.spec,e.spec))},jt.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var St=function(e,t){this.spec=t||Pt,this.attrs=e};St.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Mt(o,i,this)},St.prototype.valid=function(e,t){return t.from<t.to},St.prototype.eq=function(e){return this==e||e instanceof St&&_t(this.attrs,e.attrs)&&_t(this.spec,e.spec)},St.is=function(e){return e.type instanceof St};var Ot=function(e,t){this.spec=t||Pt,this.attrs=e};Ot.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Mt(o.pos-n,i.pos-n,this)},Ot.prototype.valid=function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to},Ot.prototype.eq=function(e){return this==e||e instanceof Ot&&_t(this.attrs,e.attrs)&&_t(this.spec,e.spec)};var Mt=function(e,t,n){this.from=e,this.to=t,this.type=n};n.Decoration=Mt;var Ct={spec:{configurable:!0},inline:{configurable:!0}};Mt.prototype.copy=function(e,t){return new Mt(e,t,this.type)},Mt.prototype.eq=function(e,t){return void 0===t&&(t=0),this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to},Mt.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},Mt.widget=function(e,t,n){return new Mt(e,e,new jt(t,n))},Mt.inline=function(e,t,n,r){return new Mt(e,t,new St(n,r))},Mt.node=function(e,t,n,r){return new Mt(e,t,new Ot(n,r))},Ct.spec.get=function(){return this.type.spec},Ct.inline.get=function(){return this.type instanceof St},Object.defineProperties(Mt.prototype,Ct);var Et=[],Pt={},Tt=function(e,t){this.local=e&&e.length?e:Et,this.children=t&&t.length?t:Et};n.DecorationSet=Tt,Tt.create=function(e,t){return t.length?Ft(t,e,0,Pt):Nt},Tt.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Tt.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){var c=this.children[a]+1;this.children[a+2].findInner(e-c,t-c,n,r+c,o)}},Tt.prototype.map=function(e,t,n){return this==Nt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Pt)},Tt.prototype.mapInner=function(e,t,n,r,o){for(var i,s=0;s<this.local.length;s++){var a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){for(var a=e.slice(),c=function(e,t,n,r){for(var s=0;s<a.length;s+=3){var c=a[s+1],l=void 0;-1==c||e>c+i||(t>=a[s]+i?a[s+1]=-1:n>=o&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l))}},l=0;l<n.maps.length;l++)n.maps[l].forEach(c);for(var u=!1,d=0;d<a.length;d+=3)if(-1==a[d+1]){var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){u=!0;continue}var m=n.map(e[d+1]+i,-1),h=m-o,g=r.content.findIndex(p),v=g.index,y=g.offset,b=r.maybeChild(v);if(b&&y==p&&y+b.nodeSize==h){var k=a[d+2].mapInner(n,b,f+1,e[d]+i+1,s);k!=Nt?(a[d]=p,a[d+1]=h,a[d+2]=k):(a[d+1]=-2,u=!0)}else u=!0}if(u){var w=function(e,t,n,r,o,i,s){function a(e,t){for(var i=0;i<e.local.length;i++){var c=e.local[i].map(r,o,t);c?n.push(c):s.onRemove&&s.onRemove(e.local[i].spec)}for(var l=0;l<e.children.length;l+=3)a(e.children[l+2],e.children[l]+t+1)}for(var c=0;c<e.length;c+=3)-1==e[c+1]&&a(e[c+2],t[c]+i+1);return n}(a,e,t||[],n,o,i,s),x=Ft(w,r,0,s);t=x.local;for(var _=0;_<a.length;_+=3)a[_+1]<0&&(a.splice(_,3),_-=3);for(var j=0,S=0;j<x.children.length;j+=3){for(var O=x.children[j];S<a.length&&a[S]<O;)S+=3;a.splice(S,0,x.children[j],x.children[j+1],x.children[j+2])}}return new Tt(t&&t.sort(zt),a)}(this.children,i,e,t,n,r,o):i?new Tt(i.sort(zt)):Nt},Tt.prototype.add=function(e,t){return t.length?this==Nt?Tt.create(e,t):this.addInner(e,t,0):this},Tt.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach(function(e,s){var a,c=s+n;if(a=Dt(t,e,c)){for(r||(r=o.children.slice());i<r.length&&r[i]<s;)i+=3;r[i]==s?r[i+2]=r[i+2].addInner(e,a,c+1):r.splice(i,0,s,s+e.nodeSize,Ft(a,e,c+1,Pt)),i+=3}});for(var s=It(i?Rt(t):t,-n),a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Tt(s.length?this.local.concat(s).sort(zt):this.local,r||this.children)},Tt.prototype.remove=function(e){return 0==e.length||this==Nt?this:this.removeInner(e,0)},Tt.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,s=n[o]+t,a=n[o+1]+t,c=0,l=void 0;c<e.length;c++)(l=e[c])&&l.from>s&&l.to<a&&(e[c]=null,(i||(i=[])).push(l));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,s+1);u!=Nt?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,f=void 0;d<e.length;d++)if(f=e[d])for(var p=0;p<r.length;p++)r[p].eq(f,t)&&(r==this.local&&(r=this.local.slice()),r.splice(p--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Tt(r,n):Nt},Tt.prototype.forChild=function(e,t){if(this==Nt)return this;if(t.isLeaf)return Tt.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,s=i+t.content.size,a=0;a<this.local.length;a++){var c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof St){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;l<u&&(r||(r=[])).push(c.copy(l,u))}}if(r){var d=new Tt(r.sort(zt));return n?new At([d,n]):d}return n||Nt},Tt.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Tt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},Tt.prototype.locals=function(e){return Lt(this.localsInner(e))},Tt.prototype.localsInner=function(e){if(this==Nt)return Et;if(e.inlineContent||!this.local.some(St.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof St||t.push(this.local[n]);return t};var Nt=new Tt;Tt.empty=Nt,Tt.removeOverlap=Lt;var At=function(e){this.members=e};function It(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Mt(o.from+t,o.to+t,o.type))}return n}function Dt(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,s=void 0;i<e.length;i++)(s=e[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),e[i]=null);return o}function Rt(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ft(e,t,n,r){var o=[],i=!1;t.forEach(function(t,s){var a=Dt(e,t,s+n);if(a){i=!0;var c=Ft(a,t,n+s+1,r);c!=Nt&&o.push(s,s+t.nodeSize,c)}});for(var s=It(i?Rt(e):e,-n).sort(zt),a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new Tt(s,o):Nt}function zt(e,t){return e.from-t.from||e.to-t.to}function Lt(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Bt(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Bt(t,o+1,i.copy(r.to,i.to)))}}return t}function Bt(e,t,n){for(;t<e.length&&zt(n,e[t])>0;)t++;e.splice(t,0,n)}function qt(e){var t=[];return e.someProp("decorations",function(n){var r=n(e.state);r&&r!=Nt&&t.push(r)}),e.cursorWrapper&&t.push(Tt.create(e.state.doc,[e.cursorWrapper.deco])),At.from(t)}At.prototype.map=function(e,t){var n=this.members.map(function(n){return n.map(e,t,Pt)});return At.from(n)},At.prototype.forChild=function(e,t){if(t.isLeaf)return Tt.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=Nt&&(o instanceof At?n=n.concat(o.members):n.push(o))}return At.from(n)},At.prototype.eq=function(e){if(!(e instanceof At)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},At.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Lt(n?t:t.sort(zt)):Et},At.from=function(e){switch(e.length){case 0:return Nt;case 1:return e[0];default:return new At(e)}};var $t=function(e,t){this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Jt),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ht(this),this.markCursor=null,this.cursorWrapper=null,Wt(this),this.nodeViews=Kt(this),this.docView=Y(this.state.doc,Ut(this),qt(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.lastIOSEnter=0,e.lastIOSEnterFallbackTimeout=null,e.lastAndroidDelete=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new Ze(e,function(t,n,r,o){return Fe(e,t,n,r,o)}),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=et[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||ot(e,t)||!e.editable&&t.type in tt||n(e,t)})};for(var n in et)t(n);s.safari&&e.dom.addEventListener("input",function(){return null}),rt(e)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()};n.EditorView=$t;var Vt={props:{configurable:!0},root:{configurable:!0},isDestroyed:{configurable:!0}};function Ut(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))}),[Mt.node(0,e.state.doc.content.size,t)]}function Wt(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:t,deco:Mt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ht(e){return!e.someProp("editable",function(t){return!1===t(e.state)})}function Kt(e){var t={};return e.someProp("nodeViews",function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}),t}function Jt(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")}Vt.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},$t.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&rt(this),this._props=e,e.plugins&&(e.plugins.forEach(Jt),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)},$t.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},$t.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},$t.prototype.updateStateInner=function(e,t){var n=this,o=this.state,i=!1,a=!1;if(e.storedMarks&&this.composing&&(gt(this),a=!0),this.state=e,t){var c=Kt(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(c,this.nodeViews)&&(this.nodeViews=c,i=!0),rt(this)}this.editable=Ht(this),Wt(this);var l=qt(this),u=Ut(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,u,l);!f&&e.selection.eq(o.selection)||(a=!0);var p,m,h,v,y,b,k,w,x,_,j,S="preserve"==d&&a&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){var a=e.root.elementFromPoint(i,s);if(a!=e.dom&&e.dom.contains(a)){var c=a.getBoundingClientRect();if(c.top>=o-20){t=a,n=c.top;break}}}return{refDOM:t,refTop:n,stack:M(e.dom)}}(this);if(a){this.domObserver.stop();var E=f&&(s.ie||s.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(v=o.selection,y=e.selection,b=Math.min(v.$anchor.sharedDepth(v.head),y.$anchor.sharedDepth(y.head)),v.$anchor.start(b)!=y.$anchor.start(b));if(f){var P=s.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Y(e.doc,u,l,this.dom,this)),P&&!this.trackWrites&&(E=!0)}E||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,m=p.docView.domFromPos(p.state.selection.anchor,0),h=p.root.getSelection(),g(m.node,m.offset,h.anchorNode,h.anchorOffset)))?me(this,E):(be(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var T=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",function(e){return e(n)})||(e.selection instanceof r.NodeSelection?O(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),T):O(this,this.coordsAtPos(e.selection.head,1),T))}else S&&(w=(k=S).refDOM,x=k.refTop,_=k.stack,j=w?w.getBoundingClientRect().top:0,C(_,0==j?0:j-x))},$t.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},$t.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var s=this.state.plugins[i];s.spec.view&&this.pluginViews.push(s.spec.view(this))}}},$t.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var s=this.state.plugins;if(s)for(var a=0;a<s.length;a++){var c=s[a].props[e];if(null!=c&&(n=t?t(c):c))return n}},$t.prototype.hasFocus=function(){return this.root.activeElement==this.dom},$t.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(E)return e.focus(E);var t=M(e);e.focus(null==E?{get preventScroll(){return E={preventScroll:!0},!0}}:void 0),E||(E=!1,C(t,0))}(this.dom),me(this),this.domObserver.start()},Vt.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return document.getSelection()}),this._root=t;return e||document},$t.prototype.posAtCoords=function(e){return N(this,e)},$t.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),D(this,e,t)},$t.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},$t.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},$t.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},$t.prototype.endOfTextblock=function(e,t){return V(this,t||this.state,e)},$t.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout),clearTimeout(e.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],qt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Vt.isDestroyed.get=function(){return null==this.docView},$t.prototype.dispatchEvent=function(e){return function(e,t){ot(e,t)||!et[t.type]||!e.editable&&t.type in tt||et[t.type](e,t)}(this,e)},$t.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties($t.prototype,Vt)},{"prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js","prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js","prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js"}],"../node_modules/@milkdown/prose/lib/prosemirror.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("prosemirror-commands");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("prosemirror-inputrules");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("prosemirror-keymap");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("prosemirror-model");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("prosemirror-state");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))});var c=e("prosemirror-transform");Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))});var l=e("prosemirror-view");Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===l[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return l[e]}}))})},{"prosemirror-commands":"../node_modules/prosemirror-commands/dist/index.es.js","prosemirror-inputrules":"../node_modules/prosemirror-inputrules/dist/index.es.js","prosemirror-keymap":"../node_modules/prosemirror-keymap/dist/index.es.js","prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js","prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js","prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js","prosemirror-view":"../node_modules/prosemirror-view/dist/index.es.js"}],"../node_modules/@milkdown/prose/lib/toolkit/input-rules/mark-rule.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.markRule=function(e,t){return new r.InputRule(e,(e,n,r,o)=>{const{tr:i}=e,s=n.length;let a=r,c=o;if(n[s-1]){const l=n[0],u=n[s-1],d=n[s-2],f=r+l.indexOf(d),p=f+d.length-1,m=f+d.lastIndexOf(u),h=m+u.length,g=function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,(e,t)=>{r=[...r,...e.marks.map(n=>({start:t,end:t+e.nodeSize,mark:n}))]}),r}(r,o,e).filter(e=>e.mark.type.excludes(t)).filter(e=>e.end>f);if(g.length)return null;h<p&&i.delete(h,p),m>f&&i.delete(f,m),c=(a=f)+u.length}return i.addMark(a,c,t.create()),i.removeStoredMark(t),i})};var r=e("prosemirror-inputrules")},{"prosemirror-inputrules":"../node_modules/prosemirror-inputrules/dist/index.es.js"}],"../node_modules/@milkdown/prose/lib/toolkit/input-rules/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./mark-rule");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))})},{"./mark-rule":"../node_modules/@milkdown/prose/lib/toolkit/input-rules/mark-rule.js"}],"../node_modules/@milkdown/prose/lib/toolkit/position/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateTextPosition=n.calculateNodePosition=void 0;n.calculateNodePosition=((e,t,n)=>{var r;const o=e.state,{from:i}=o.selection,{node:s}=e.domAtPos(i),a=s instanceof Text?s.parentElement:s;if(!(a instanceof HTMLElement))throw new Error;const c=a.getBoundingClientRect(),l=t.getBoundingClientRect(),u=null===(r=t.parentElement)||void 0===r?void 0:r.getBoundingClientRect();if(!u)throw new Error;const[d,f]=n(c,l,u);t.style.top=d+"px",t.style.left=f+"px"});n.calculateTextPosition=((e,t,n)=>{var r;const o=e.state,{from:i,to:s}=o.selection,a=e.coordsAtPos(i),c=e.coordsAtPos(s),l=t.getBoundingClientRect(),u=null===(r=t.parentElement)||void 0===r?void 0:r.getBoundingClientRect();if(!u)throw new Error;const[d,f]=n(a,c,l,u);t.style.top=d+"px",t.style.left=f+"px"})},{}],"../node_modules/@milkdown/prose/lib/toolkit/prose/helper.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.equalNodeType=n.cloneTr=void 0;n.cloneTr=(e=>Object.assign(Object.create(e),e).setTime(Date.now()));n.equalNodeType=((e,t)=>Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e)},{}],"../node_modules/@milkdown/prose/lib/toolkit/prose/node.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findChildrenByMark=n.findChildren=n.flatten=void 0;const r=(e,t=!0)=>{const n=[];return e.descendants((e,r)=>{if(n.push({node:e,pos:r}),!t)return!1}),n};n.flatten=r;const o=e=>(t,n)=>r(t,n).filter(t=>e(t.node));n.findChildren=o;n.findChildrenByMark=((e,t,n)=>o(e=>Boolean(t.isInSet(e.marks)))(e,n))},{}],"../node_modules/@milkdown/prose/lib/toolkit/prose/schema.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getMarkFromSchema=n.getNodeFromSchema=void 0;var r=e("@milkdown/exception");n.getNodeFromSchema=((e,t)=>{const n=t.nodes[e];if(!n)throw(0,r.getAtomFromSchemaFail)("node",e);return n});n.getMarkFromSchema=((e,t)=>{const n=t.marks[e];if(!n)throw(0,r.getAtomFromSchemaFail)("mark",e);return n})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/prose/lib/toolkit/prose/selection.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findSelectedNodeOfType=n.findParentNode=n.findParentNodeClosestToPos=void 0;var r=e("prosemirror-state"),o=e("./helper");const i=e=>t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}};n.findParentNodeClosestToPos=i;n.findParentNode=(e=>t=>i(e)(t.$from));n.findSelectedNodeOfType=((e,t)=>{if(!(e instanceof r.NodeSelection))return;const{node:n,$from:i}=e;return(0,o.equalNodeType)(t,n)?{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}:void 0})},{"prosemirror-state":"../node_modules/prosemirror-state/dist/index.es.js","./helper":"../node_modules/@milkdown/prose/lib/toolkit/prose/helper.js"}],"../node_modules/@milkdown/prose/lib/toolkit/prose/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./helper");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./node");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./schema");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./selection");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))})},{"./helper":"../node_modules/@milkdown/prose/lib/toolkit/prose/helper.js","./node":"../node_modules/@milkdown/prose/lib/toolkit/prose/node.js","./schema":"../node_modules/@milkdown/prose/lib/toolkit/prose/schema.js","./selection":"../node_modules/@milkdown/prose/lib/toolkit/prose/selection.js"}],"../node_modules/@milkdown/prose/lib/toolkit/types/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"../node_modules/@milkdown/prose/lib/toolkit/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./input-rules");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./position");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./prose");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./types");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))})},{"./input-rules":"../node_modules/@milkdown/prose/lib/toolkit/input-rules/index.js","./position":"../node_modules/@milkdown/prose/lib/toolkit/position/index.js","./prose":"../node_modules/@milkdown/prose/lib/toolkit/prose/index.js","./types":"../node_modules/@milkdown/prose/lib/toolkit/types/index.js"}],"../node_modules/@milkdown/prose/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./prosemirror");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./toolkit");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))})},{"./prosemirror":"../node_modules/@milkdown/prose/lib/prosemirror.js","./toolkit":"../node_modules/@milkdown/prose/lib/toolkit/index.js"}],"../node_modules/bail/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bail=function(e){if(e)throw e}},{}],"../node_modules/is-buffer/index.js":[function(e,t,n){t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},{}],"../node_modules/extend/index.js":[function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},c=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(s)return s(e,t).value}return e[t]};t.exports=function e(){var t,n,r,o,i,s,d=arguments[0],f=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(o=u(t,n))&&(m&&o&&(c(o)||(i=a(o)))?(i?(i=!1,s=r&&a(r)?r:[]):s=r&&c(r)?r:{},l(d,{name:n,newValue:e(m,s,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}},{}],"../node_modules/is-plain-obj/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},{}],"../node_modules/trough/index.js":[function(e,t,n){"use strict";function r(e,t){let n;return function(...t){const i=e.length>t.length;let s;i&&t.push(r);try{s=e(...t)}catch(e){const t=e;if(i&&n)throw t;return r(t)}i||(s instanceof Promise?s.then(o,r):s instanceof Error?r(s):o(s))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}Object.defineProperty(n,"__esModule",{value:!0}),n.trough=function(){const e=[],t={run:function(...t){let n=-1;const o=t.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);!function i(s,...a){const c=e[++n];let l=-1;if(s)return void o(s);for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a;c?r(c,i)(...a):o(null,...a)}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t},n.wrap=r},{}],"../node_modules/unist-util-stringify-position/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringifyPosition=function(e){if(!e||"object"!=typeof e)return"";if(r.call(e,"position")||r.call(e,"type"))return i(e.position);if(r.call(e,"start")||r.call(e,"end"))return i(e);if(r.call(e,"line")||r.call(e,"column"))return o(e);return""};var r={}.hasOwnProperty;function o(e){return s(e&&e.line)+":"+s(e&&e.column)}function i(e){return o(e&&e.start)+"-"+o(e&&e.end)}function s(e){return e&&"number"==typeof e?e:1}},{}],"../node_modules/vfile-message/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.VFileMessage=void 0;var r=e("unist-util-stringify-position");class o extends Error{constructor(e,t,n){var o,i=[null,null],s={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(n=t,t=null),"string"==typeof n&&(-1===(o=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,o),i[1]=n.slice(o+1))),t&&("type"in t||"position"in t?t.position&&(s=t.position):"start"in t||"end"in t?s=t:("line"in t||"column"in t)&&(s.start=t)),this.name=(0,r.stringifyPosition)(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.line=s.start.line,this.column=s.start.column,this.source=i[0],this.ruleId=i[1],this.position=s,this.file,this.fatal,this.url,this.note}}n.VFileMessage=o,o.prototype.file="",o.prototype.name="",o.prototype.reason="",o.prototype.message="",o.prototype.stack="",o.prototype.fatal=null,o.prototype.column=null,o.prototype.line=null,o.prototype.source=null,o.prototype.ruleId=null,o.prototype.position=null},{"unist-util-stringify-position":"../node_modules/unist-util-stringify-position/index.js"}],"../node_modules/vfile/lib/minpath.browser.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.path=void 0;const r={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);let n,r=0,i=-1,s=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;s--;)if(47===e.charCodeAt(s)){if(n){r=s+1;break}}else i<0&&(n=!0,i=s+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;s--;)if(47===e.charCodeAt(s)){if(n){r=s+1;break}}else a<0&&(n=!0,a=s+1),c>-1&&(e.charCodeAt(s)===t.charCodeAt(c--)?c<0&&(i=s):(c=-1,i=a));r===i?i=a:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(o(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){o(e);let t,n=e.length,r=-1,i=0,s=-1,a=0;for(;n--;){const o=e.charCodeAt(n);if(47!==o)r<0&&(t=!0,r=n+1),46===o?s<0?s=n:1!==a&&(a=1):s>-1&&(a=-1);else if(t){i=n+1;break}}if(s<0||r<0||0===a||1===a&&s===r-1&&s===i+1)return"";return e.slice(s,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)o(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){o(e);const t=47===e.charCodeAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,a=0,c=-1;for(;++c<=e.length;){if(c<e.length)n=e.charCodeAt(c);else{if(47===n)break;n=47}if(47===n){if(s===c-1||1===a);else if(s!==c-1&&2===a){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=c,a=0;continue}}else if(o.length>0){o="",i=0,s=c,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,c):o=e.slice(s+1,c),i=c-s-1;s=c,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}n.path=r},{}],"../node_modules/vfile/lib/minproc.browser.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.proc=void 0;const r={cwd:function(){return"/"}};n.proc=r},{}],"../node_modules/vfile/lib/minurl.shared.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isUrl=function(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}},{}],"../node_modules/vfile/lib/minurl.browser.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.urlToPath=function(e){if("string"==typeof e)e=new URL(e);else if(!(0,r.isUrl)(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){const e=t.charCodeAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)},Object.defineProperty(n,"isUrl",{enumerable:!0,get:function(){return r.isUrl}});var r=e("./minurl.shared.js")},{"./minurl.shared.js":"../node_modules/vfile/lib/minurl.shared.js"}],"../node_modules/vfile/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.VFile=void 0;var r,o=(r=e("is-buffer"))&&r.__esModule?r:{default:r},i=e("vfile-message"),s=e("./minpath.js"),a=e("./minproc.js"),c=e("./minurl.js");const l=["history","path","basename","stem","extname","dirname"];function u(e,t){if(e&&e.includes(s.path.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+s.path.sep+"`")}function d(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}n.VFile=class{constructor(e){let t;t=e?"string"==typeof e||(0,o.default)(e)?{value:e}:(0,c.isUrl)(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=a.proc.cwd(),this.value,this.stored,this.result,this.map;let n,r=-1;for(;++r<l.length;){const e=l[r];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)l.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){(0,c.isUrl)(e)&&(e=(0,c.urlToPath)(e)),d(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?s.path.dirname(this.path):void 0}set dirname(e){f(this.basename,"dirname"),this.path=s.path.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?s.path.basename(this.path):void 0}set basename(e){d(e,"basename"),u(e,"basename"),this.path=s.path.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?s.path.extname(this.path):void 0}set extname(e){if(u(e,"extname"),f(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=s.path.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?s.path.basename(this.path,this.extname):void 0}set stem(e){d(e,"stem"),u(e,"stem"),this.path=s.path.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){const r=new i.VFileMessage(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}}},{"is-buffer":"../node_modules/is-buffer/index.js","vfile-message":"../node_modules/vfile-message/index.js","./minpath.js":"../node_modules/vfile/lib/minpath.browser.js","./minproc.js":"../node_modules/vfile/lib/minproc.browser.js","./minurl.js":"../node_modules/vfile/lib/minurl.browser.js"}],"../node_modules/vfile/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"VFile",{enumerable:!0,get:function(){return r.VFile}});var r=e("./lib/index.js")},{"./lib/index.js":"../node_modules/vfile/lib/index.js"}],"../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js":[function(e,t,n){var r,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,u=[],d=!1,f=-1;function p(){d&&l&&(d=!1,l.length?u=l.concat(u):f=-1,u.length&&m())}function m(){if(!d){var e=c(p);d=!0;for(var t=u.length;t;){for(l=u,u=[];++f<t;)l&&l[f].run();f=-1,t=u.length}l=null,d=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||d||c(m)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],"../node_modules/unified/lib/index.js":[function(e,t,n){e("process");Object.defineProperty(n,"__esModule",{value:!0}),n.unified=void 0;var r=e("bail"),o=l(e("is-buffer")),i=l(e("extend")),s=l(e("is-plain-obj")),a=e("trough"),c=e("vfile");function l(e){return e&&e.__esModule?e:{default:e}}const u=function e(){const t=(0,a.trough)();const n=[];let c={};let l;let u=-1;b.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(h("data",l),c[e]=t,b):d.call(c,e)&&c[e]||null;if(e)return h("data",l),c=e,b;return c};b.Parser=void 0;b.Compiler=void 0;b.freeze=function(){if(l)return b;for(;++u<n.length;){const[e,...r]=n[u];if(!1===r[0])continue;!0===r[0]&&(r[1]=void 0);const o=e.call(b,...r);"function"==typeof o&&t.use(o)}return l=!0,u=Number.POSITIVE_INFINITY,b};b.attachers=n;b.use=function(e,...t){let r;if(h("use",l),null==e);else if("function"==typeof e)d(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):a(e)}r&&(c.settings=Object.assign(c.settings||{},r));return b;function o(e){if("function"==typeof e)d(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;d(t,...n)}else a(e)}}function a(e){u(e.plugins),e.settings&&(r=Object.assign(r||{},e.settings))}function u(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){const n=e[t];o(n)}}}function d(e,t){let r,o=-1;for(;++o<n.length;)if(n[o][0]===e){r=n[o];break}r?((0,s.default)(r[1])&&(0,s.default)(t)&&(t=(0,i.default)(!0,r[1],t)),r[1]=t):n.push([...arguments])}};b.parse=function(e){b.freeze();const t=y(e),n=b.Parser;if(p("parse",n),f(n,"parse"))return new n(String(t),t).parse();return n(String(t),t)};b.stringify=function(e,t){b.freeze();const n=y(t),r=b.Compiler;if(m("stringify",r),g(e),f(r,"compile"))return new r(e,n).compile();return r(e,n)};b.run=function(e,n,r){g(e),b.freeze(),r||"function"!=typeof n||(r=n,n=void 0);if(!r)return new Promise(o);function o(o,i){t.run(e,y(n),function(t,n,s){n=n||e,t?i(t):o?o(n):r(null,n,s)})}o(null,r)};b.runSync=function(e,t){let n,o;return b.run(e,t,function(e,t){(0,r.bail)(e),n=t,o=!0}),v("runSync","run",o),n};b.process=function(e,t){if(b.freeze(),p("process",b.Parser),m("process",b.Compiler),!t)return new Promise(n);function n(n,r){const i=y(e);function s(e,o){e||!o?r(e):n?n(o):t(null,o)}b.run(b.parse(i),i,(e,t,n)=>{if(!e&&t&&n){const r=b.stringify(t,n);null==r||(!function(e){return"string"==typeof e||(0,o.default)(e)}(r)?n.result=r:n.value=r),s(e,n)}else s(e)})}n(null,t)};b.processSync=function(e){let t;b.freeze(),p("processSync",b.Parser),m("processSync",b.Compiler);const n=y(e);return b.process(n,function(e){t=!0,(0,r.bail)(e)}),v("processSync","process",t),n};return b;function b(){const t=e();let r=-1;for(;++r<n.length;)t.use(...n[r]);return t.data((0,i.default)(!0,{},c)),t}}().freeze();n.unified=u;const d={}.hasOwnProperty;function f(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(d.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function p(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function m(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function h(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function g(e){if(!(0,s.default)(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function v(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function y(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new c.VFile(e)}},{bail:"../node_modules/bail/index.js","is-buffer":"../node_modules/is-buffer/index.js",extend:"../node_modules/extend/index.js","is-plain-obj":"../node_modules/is-plain-obj/index.js",trough:"../node_modules/trough/index.js",vfile:"../node_modules/vfile/index.js",process:"../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js"}],"../node_modules/unified/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"unified",{enumerable:!0,get:function(){return r.unified}});var r=e("./lib/index.js")},{"./lib/index.js":"../node_modules/unified/lib/index.js"}],"../node_modules/mdast-util-to-string/index.js":[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&o(e.children,t)||Array.isArray(e)&&o(e,t))||""}function o(e,t){for(var n=[],o=-1;++o<e.length;)n[o]=r(e[o],t);return n.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.toString=function(e,t){var{includeImageAlt:n=!0}=t||{};return r(e,n)}},{}],"../node_modules/micromark-util-chunked/index.js":[function(e,t,n){"use strict";function r(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),[].splice.apply(e,i);else for(n&&[].splice.apply(e,[t,n]);s<r.length;)(i=r.slice(s,s+1e4)).unshift(t,0),[].splice.apply(e,i),s+=1e4,t+=1e4}Object.defineProperty(n,"__esModule",{value:!0}),n.splice=r,n.push=function(e,t){if(e.length>0)return r(e,e.length,0,t),e;return t}},{}],"../node_modules/micromark-util-combine-extensions/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.combineExtensions=function(e){const t={};let n=-1;for(;++n<e.length;)i(t,e[n]);return t},n.combineHtmlExtensions=function(e){const t={};let n=-1;for(;++n<e.length;)a(t,e[n]);return t};var r=e("micromark-util-chunked");const o={}.hasOwnProperty;function i(e,t){let n;for(n in t){const r=(o.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;for(a in i){o.call(r,a)||(r[a]=[]);const e=i[a];s(r[a],Array.isArray(e)?e:e?[e]:[])}}}function s(e,t){let n=-1;const o=[];for(;++n<t.length;)("after"===t[n].add?e:o).push(t[n]);(0,r.splice)(e,0,0,o)}function a(e,t){let n;for(n in t){const r=(o.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i)r[s]=i[s]}}},{"micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js"}],"../node_modules/micromark-util-character/lib/unicode-punctuation-regex.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unicodePunctuationRegex=void 0;n.unicodePunctuationRegex=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},{}],"../node_modules/micromark-util-character/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.asciiControl=function(e){return null!==e&&(e<32||127===e)},n.markdownLineEndingOrSpace=function(e){return null!==e&&(e<0||32===e)},n.markdownLineEnding=function(e){return null!==e&&e<-2},n.markdownSpace=function(e){return-2===e||-1===e||32===e},n.unicodePunctuation=n.unicodeWhitespace=n.asciiAtext=n.asciiPunctuation=n.asciiAlphanumeric=n.asciiHexDigit=n.asciiDigit=n.asciiAlpha=void 0;var r=e("./lib/unicode-punctuation-regex.js");const o=f(/[A-Za-z]/);n.asciiAlpha=o;const i=f(/\d/);n.asciiDigit=i;const s=f(/[\dA-Fa-f]/);n.asciiHexDigit=s;const a=f(/[\dA-Za-z]/);n.asciiAlphanumeric=a;const c=f(/[!-/:-@[-`{-~]/);n.asciiPunctuation=c;const l=f(/[#-'*+\--9=?A-Z^-~]/);n.asciiAtext=l;const u=f(/\s/);n.unicodeWhitespace=u;const d=f(r.unicodePunctuationRegex);function f(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}n.unicodePunctuation=d},{"./lib/unicode-punctuation-regex.js":"../node_modules/micromark-util-character/lib/unicode-punctuation-regex.js"}],"../node_modules/micromark-factory-space/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.factorySpace=function(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let s=0;return function(o){if((0,r.markdownSpace)(o))return e.enter(n),a(o);return t(o)};function a(o){return(0,r.markdownSpace)(o)&&s++<i?(e.consume(o),a):(e.exit(n),t(o))}};var r=e("micromark-util-character")},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark/lib/initialize/content.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.content=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),(0,r.factorySpace)(e,t,"linePrefix")},function(t){return e.enter("paragraph"),i(t)});let n;return t;function i(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,s(t)}function s(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):(0,o.markdownLineEnding)(t)?(e.consume(t),e.exit("chunkText"),i):(e.consume(t),s)}}};n.content=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark/lib/initialize/document.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.document=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character"),i=e("micromark-util-chunked");const s={tokenize:function(e){const t=this,n=[];let r,s,c,l=0;return u;function u(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,d,f)(r)}return f(r)}function d(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&w();const n=t.events.length;let o,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){o=t.events[s][1].end;break}k(l);let a=n;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},o),a++;return(0,i.splice)(t.events,s+1,0,t.events.slice(n)),t.events.length=a,f(e)}return u(e)}function f(o){if(l===n.length){if(!r)return h(o);if(r.currentConstruct&&r.currentConstruct.concrete)return v(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(a,p,m)(o)}function p(e){return r&&w(),k(l),h(e)}function m(e){return t.parser.lazy[t.now().line]=l!==n.length,c=t.now().offset,v(e)}function h(n){return t.containerState={},e.attempt(a,g,v)(n)}function g(e){return l++,n.push([t.currentConstruct,t.containerState]),h(e)}function v(n){return null===n?(r&&w(),k(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:r}),y(n))}function y(n){return null===n?(b(e.exit("chunkFlow"),!0),k(0),void e.consume(n)):(0,o.markdownLineEnding)(n)?(e.consume(n),b(e.exit("chunkFlow")),l=0,t.interrupt=void 0,u):(e.consume(n),y)}function b(e,n){const o=t.sliceStream(e);if(n&&o.push(null),e.previous=s,s&&(s.next=e),s=e,r.defineSkip(e.start),r.write(o),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<c&&(!r.events[e][1].end||r.events[e][1].end.offset>c))return;const n=t.events.length;let o,s,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){if(o){s=t.events[a][1].end;break}o=!0}for(k(l),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;(0,i.splice)(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function k(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function w(){r.write([null]),s=void 0,r=void 0,t.containerState._closeFlow=void 0}}};n.document=s;const a={tokenize:function(e,t,n){return(0,r.factorySpace)(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}}},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js"}],"../node_modules/micromark-util-classify-character/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.classifyCharacter=function(e){if(null===e||(0,r.markdownLineEndingOrSpace)(e)||(0,r.unicodeWhitespace)(e))return 1;if((0,r.unicodePunctuation)(e))return 2};var r=e("micromark-util-character")},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-util-resolve-all/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveAll=function(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}},{}],"../node_modules/micromark-core-commonmark/lib/attention.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.attention=void 0;var r=e("micromark-util-chunked"),o=e("micromark-util-classify-character"),i=e("micromark-util-resolve-all");const s={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=(0,o.classifyCharacter)(r);let s;return function(t){return e.enter("attentionSequence"),s=t,a(t)};function a(c){if(c===s)return e.consume(c),a;const l=e.exit("attentionSequence"),u=(0,o.classifyCharacter)(c),d=!u||2===u&&i||n.includes(c),f=!i||2===i&&u||n.includes(r);return l._open=Boolean(42===s?d:d&&(i||!f)),l._close=Boolean(42===s?f:f&&(u||!d)),t(c)}},resolveAll:function(e,t){let n,o,s,c,l,u,d,f,p=-1;for(;++p<e.length;)if("enter"===e[p][0]&&"attentionSequence"===e[p][1].type&&e[p][1]._close)for(n=p;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[p][1]).charCodeAt(0)){if((e[n][1]._close||e[p][1]._open)&&(e[p][1].end.offset-e[p][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[p][1].end.offset-e[p][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[p][1].end.offset-e[p][1].start.offset>1?2:1;const m=Object.assign({},e[n][1].end),h=Object.assign({},e[p][1].start);a(m,-u),a(h,u),c={type:u>1?"strongSequence":"emphasisSequence",start:m,end:Object.assign({},e[n][1].end)},l={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[p][1].start),end:h},s={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[p][1].start)},o={type:u>1?"strong":"emphasis",start:Object.assign({},c.start),end:Object.assign({},l.end)},e[n][1].end=Object.assign({},c.start),e[p][1].start=Object.assign({},l.end),d=[],e[n][1].end.offset-e[n][1].start.offset&&(d=(0,r.push)(d,[["enter",e[n][1],t],["exit",e[n][1],t]])),d=(0,r.push)(d,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),d=(0,r.push)(d,(0,i.resolveAll)(t.parser.constructs.insideSpan.null,e.slice(n+1,p),t)),d=(0,r.push)(d,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[p][1].end.offset-e[p][1].start.offset?(f=2,d=(0,r.push)(d,[["enter",e[p][1],t],["exit",e[p][1],t]])):f=0,(0,r.splice)(e,n-1,p-n+3,d),p=n+d.length-f-2;break}p=-1;for(;++p<e.length;)"attentionSequence"===e[p][1].type&&(e[p][1].type="data");return e}};function a(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}n.attention=s},{"micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js","micromark-util-classify-character":"../node_modules/micromark-util-classify-character/index.js","micromark-util-resolve-all":"../node_modules/micromark-util-resolve-all/index.js"}],"../node_modules/micromark-core-commonmark/lib/autolink.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.autolink=void 0;var r=e("micromark-util-character");const o={name:"autolink",tokenize:function(e,t,n){let o=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return(0,r.asciiAlpha)(t)?(e.consume(t),s):(0,r.asciiAtext)(t)?l(t):n(t)}function s(e){return 43===e||45===e||46===e||(0,r.asciiAlphanumeric)(e)?a(e):l(e)}function a(t){return 58===t?(e.consume(t),c):(43===t||45===t||46===t||(0,r.asciiAlphanumeric)(t))&&o++<32?(e.consume(t),a):l(t)}function c(t){return 62===t?(e.exit("autolinkProtocol"),p(t)):null===t||32===t||60===t||(0,r.asciiControl)(t)?n(t):(e.consume(t),c)}function l(t){return 64===t?(e.consume(t),o=0,u):(0,r.asciiAtext)(t)?(e.consume(t),l):n(t)}function u(e){return(0,r.asciiAlphanumeric)(e)?d(e):n(e)}function d(t){return 46===t?(e.consume(t),o=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",p(t)):f(t)}function f(t){return(45===t||(0,r.asciiAlphanumeric)(t))&&o++<63?(e.consume(t),45===t?f:d):n(t)}function p(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};n.autolink=o},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/blank-line.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.blankLine=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={tokenize:function(e,t,n){return(0,r.factorySpace)(e,function(e){return null===e||(0,o.markdownLineEnding)(e)?t(e):n(e)},"linePrefix")},partial:!0};n.blankLine=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/block-quote.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.blockQuote=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return(0,o.markdownSpace)(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return(0,r.factorySpace)(e,e.attempt(i,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};n.blockQuote=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/character-escape.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.characterEscape=void 0;var r=e("micromark-util-character");const o={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),o};function o(o){return(0,r.asciiPunctuation)(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}};n.characterEscape=o},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/character-entities/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.characterEntities=void 0;n.characterEntities={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"Ĳ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",ffr:"𝔣",filig:"ﬁ",fjlig:"fj",flat:"♭",fllig:"ﬂ",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ĳ",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ŉ",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],"../node_modules/decode-named-character-reference/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decodeNamedCharacterReference=function(e){return!!o.call(r.characterEntities,e)&&r.characterEntities[e]};var r=e("character-entities");const o={}.hasOwnProperty},{"character-entities":"../node_modules/character-entities/index.js"}],"../node_modules/micromark-core-commonmark/lib/character-reference.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.characterReference=void 0;var r=e("decode-named-character-reference"),o=e("micromark-util-character");const i={name:"characterReference",tokenize:function(e,t,n){const i=this;let s,a,c=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=o.asciiAlphanumeric,d(t))}function u(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=o.asciiHexDigit,d):(e.enter("characterReferenceValue"),s=7,a=o.asciiDigit,d(t))}function d(l){let u;return 59===l&&c?(u=e.exit("characterReferenceValue"),a!==o.asciiAlphanumeric||(0,r.decodeNamedCharacterReference)(i.sliceSerialize(u))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)):a(l)&&c++<s?(e.consume(l),d):n(l)}}};n.characterReference=i},{"decode-named-character-reference":"../node_modules/decode-named-character-reference/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/code-fenced.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.codeFenced=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"codeFenced",tokenize:function(e,t,n){const i=this,s={tokenize:function(e,t,n){let i=0;return(0,r.factorySpace)(e,function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function s(t){return t===u?(e.consume(t),i++,s):i<d?n(t):(e.exit("codeFencedFenceSequence"),(0,r.factorySpace)(e,a,"whitespace")(t))}function a(r){return null===r||(0,o.markdownLineEnding)(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},a={tokenize:function(e,t,n){const r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},c=this.events[this.events.length-1],l=c&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0;let u,d=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u=t,f(t)};function f(t){return t===u?(e.consume(t),d++,f):(e.exit("codeFencedFenceSequence"),d<3?n(t):(0,r.factorySpace)(e,p,"whitespace")(t))}function p(t){return null===t||(0,o.markdownLineEnding)(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||(0,o.markdownLineEndingOrSpace)(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),(0,r.factorySpace)(e,h,"whitespace")(t)):96===t&&t===u?n(t):(e.consume(t),m)}function h(t){return null===t||(0,o.markdownLineEnding)(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(t))}function g(t){return null===t||(0,o.markdownLineEnding)(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===u?n(t):(e.consume(t),g)}function v(n){return e.exit("codeFencedFence"),i.interrupt?t(n):y(n)}function y(t){return null===t?k(t):(0,o.markdownLineEnding)(t)?e.attempt(a,e.attempt(s,k,l?(0,r.factorySpace)(e,y,"linePrefix",l+1):y),k)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||(0,o.markdownLineEnding)(t)?(e.exit("codeFlowValue"),y(t)):(e.consume(t),b)}function k(n){return e.exit("codeFenced"),t(n)}},concrete:!0};n.codeFenced=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/code-indented.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.codeIndented=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"codeIndented",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("codeIndented"),(0,r.factorySpace)(e,a,"linePrefix",5)(t)};function a(e){const t=i.events[i.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?c(e):n(e)}function c(t){return null===t?u(t):(0,o.markdownLineEnding)(t)?e.attempt(s,c,u)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||(0,o.markdownLineEnding)(t)?(e.exit("codeFlowValue"),c(t)):(e.consume(t),l)}function u(n){return e.exit("codeIndented"),t(n)}}};n.codeIndented=i;const s={tokenize:function(e,t,n){const i=this;return s;function s(t){return i.parser.lazy[i.now().line]?n(t):(0,o.markdownLineEnding)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(0,r.factorySpace)(e,a,"linePrefix",5)(t)}function a(e){const r=i.events[i.events.length-1];return r&&"linePrefix"===r[1].type&&r[2].sliceSerialize(r[1],!0).length>=4?t(e):(0,o.markdownLineEnding)(e)?s(e):n(e)}},partial:!0}},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/code-text.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.codeText=void 0;var r=e("micromark-util-character");const o={name:"codeText",tokenize:function(e,t,n){let o,i,s=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),s++,a):(e.exit("codeTextSequence"),c(t))}function c(t){return null===t?n(t):96===t?(i=e.enter("codeTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),c):(0,r.markdownLineEnding)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||(0,r.markdownLineEnding)(t)?(e.exit("codeTextData"),c(t)):(e.consume(t),l)}function u(n){return 96===n?(e.consume(n),o++,u):o===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};n.codeText=o},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-util-subtokenize/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.subtokenize=function(e){const t={};let n,i,s,a,c,l,u,d=-1;for(;++d<e.length;){for(;d in t;)d=t[d];if(n=e[d],d&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[d-1][1].type&&(l=n[1]._tokenizer.events,(s=0)<l.length&&"lineEndingBlank"===l[s][1].type&&(s+=2),s<l.length&&"content"===l[s][1].type))for(;++s<l.length&&"content"!==l[s][1].type;)"chunkText"===l[s][1].type&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,o(e,d)),d=t[d],u=!0);else if(n[1]._container){for(s=d,i=void 0;s--&&("lineEnding"===(a=e[s])[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);i&&(n[1].end=Object.assign({},e[i][1].start),(c=e.slice(i,d)).unshift(n),(0,r.splice)(e,i,d-i+1,c))}}return!u};var r=e("micromark-util-chunked");function o(e,t){const n=e[t][1],o=e[t][2];let i=t-1;const s=[],a=n._tokenizer||o.parser[n.contentType](n.start),c=a.events,l=[],u={};let d,f,p=-1,m=n,h=0,g=0;const v=[g];for(;m;){for(;e[++i][1]!==m;);s.push(i),m._tokenizer||(d=o.sliceStream(m),m.next||d.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(g=p+1,v.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):v.pop(),p=v.length;p--;){const t=c.slice(v[p],v[p+1]),n=s.pop();l.unshift([n,n+t.length-1]),(0,r.splice)(e,n,2,t)}for(p=-1;++p<l.length;)u[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return u}},{"micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js"}],"../node_modules/micromark-core-commonmark/lib/content.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.content=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character"),i=e("micromark-util-subtokenize");const s={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):(0,o.markdownLineEnding)(t)?e.check(a,s,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function s(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return(0,i.subtokenize)(e),e}};n.content=s;const a={tokenize:function(e,t,n){const i=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,r.factorySpace)(e,s,"linePrefix")};function s(r){if(null===r||(0,o.markdownLineEnding)(r))return n(r);const s=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}},partial:!0}},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-subtokenize":"../node_modules/micromark-util-subtokenize/index.js"}],"../node_modules/micromark-factory-destination/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.factoryDestination=function(e,t,n,o,i,s,a,c,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return function(t){if(60===t)return e.enter(o),e.enter(i),e.enter(s),e.consume(t),e.exit(s),f;if(null===t||41===t||(0,r.asciiControl)(t))return n(t);return e.enter(o),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(s),e.consume(n),e.exit(s),e.exit(i),e.exit(o),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(c),f(t)):null===t||60===t||(0,r.markdownLineEnding)(t)?n(t):(e.consume(t),92===t?m:p)}function m(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return 40===i?++d>u?n(i):(e.consume(i),h):41===i?d--?(e.consume(i),h):(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(i)):null===i||(0,r.markdownLineEndingOrSpace)(i)?d?n(i):(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(i)):(0,r.asciiControl)(i)?n(i):(e.consume(i),92===i?g:h)}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}};var r=e("micromark-util-character")},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-factory-label/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.factoryLabel=function(e,t,n,o,i,s){const a=this;let c,l=0;return function(t){return e.enter(o),e.enter(i),e.consume(t),e.exit(i),e.enter(s),u};function u(f){return null===f||91===f||93===f&&!c||94===f&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs||l>999?n(f):93===f?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(o),t):(0,r.markdownLineEnding)(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(t){return null===t||91===t||93===t||(0,r.markdownLineEnding)(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),c=c||!(0,r.markdownSpace)(t),92===t?f:d)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,d):d(t)}};var r=e("micromark-util-character")},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-factory-title/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.factoryTitle=function(e,t,n,i,s,a){let c;return function(t){return e.enter(i),e.enter(s),e.consume(t),e.exit(s),c=40===t?41:t,l};function l(n){return n===c?(e.enter(s),e.consume(n),e.exit(s),e.exit(i),t):(e.enter(a),u(n))}function u(t){return t===c?(e.exit(a),l(c)):null===t?n(t):(0,o.markdownLineEnding)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,r.factorySpace)(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===c||null===t||(0,o.markdownLineEnding)(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?f:d)}function f(t){return t===c||92===t?(e.consume(t),d):d(t)}};var r=e("micromark-factory-space"),o=e("micromark-util-character")},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-factory-whitespace/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.factoryWhitespace=function(e,t){let n;return function i(s){if((0,o.markdownLineEnding)(s))return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i;if((0,o.markdownSpace)(s))return(0,r.factorySpace)(e,i,n?"linePrefix":"lineSuffix")(s);return t(s)}};var r=e("micromark-factory-space"),o=e("micromark-util-character")},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-util-normalize-identifier/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeIdentifier=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},{}],"../node_modules/micromark-core-commonmark/lib/definition.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.definition=void 0;var r=e("micromark-factory-destination"),o=e("micromark-factory-label"),i=e("micromark-factory-space"),s=e("micromark-factory-title"),a=e("micromark-factory-whitespace"),c=e("micromark-util-normalize-identifier"),l=e("micromark-util-character");const u={name:"definition",tokenize:function(e,t,n){const s=this;let u;return function(t){return e.enter("definition"),o.factoryLabel.call(s,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function f(t){return u=(0,c.normalizeIdentifier)(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),(0,a.factoryWhitespace)(e,(0,r.factoryDestination)(e,e.attempt(d,(0,i.factorySpace)(e,p,"whitespace"),(0,i.factorySpace)(e,p,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function p(r){return null===r||(0,l.markdownLineEnding)(r)?(e.exit("definition"),s.parser.defined.includes(u)||s.parser.defined.push(u),t(r)):n(r)}}};n.definition=u;const d={tokenize:function(e,t,n){return function(t){return(0,l.markdownLineEndingOrSpace)(t)?(0,a.factoryWhitespace)(e,r)(t):n(t)};function r(t){return 34===t||39===t||40===t?(0,s.factoryTitle)(e,(0,i.factorySpace)(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function o(e){return null===e||(0,l.markdownLineEnding)(e)?t(e):n(e)}},partial:!0}},{"micromark-factory-destination":"../node_modules/micromark-factory-destination/index.js","micromark-factory-label":"../node_modules/micromark-factory-label/index.js","micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-factory-title":"../node_modules/micromark-factory-title/index.js","micromark-factory-whitespace":"../node_modules/micromark-factory-whitespace/index.js","micromark-util-normalize-identifier":"../node_modules/micromark-util-normalize-identifier/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/hard-break-escape.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hardBreakEscape=void 0;var r=e("micromark-util-character");const o={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),o};function o(o){return(0,r.markdownLineEnding)(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}};n.hardBreakEscape=o},{"micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/heading-atx.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.headingAtx=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character"),i=e("micromark-util-chunked");const s={name:"headingAtx",tokenize:function(e,t,n){const i=this;let s=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(t)};function a(r){return 35===r&&s++<6?(e.consume(r),a):null===r||(0,o.markdownLineEndingOrSpace)(r)?(e.exit("atxHeadingSequence"),i.interrupt?t(r):c(r)):n(r)}function c(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||(0,o.markdownLineEnding)(n)?(e.exit("atxHeading"),t(n)):(0,o.markdownSpace)(n)?(0,r.factorySpace)(e,c,"whitespace")(n):(e.enter("atxHeadingText"),u(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),c(t))}function u(t){return null===t||35===t||(0,o.markdownLineEndingOrSpace)(t)?(e.exit("atxHeadingText"),c(t)):(e.consume(t),u)}},resolve:function(e,t){let n,r,o=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);o-2>s&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(s===o-1||o-4>s&&"whitespace"===e[o-2][1].type)&&(o-=s+1===o?2:4);o>s&&(n={type:"atxHeadingText",start:e[s][1].start,end:e[o][1].end},r={type:"chunkText",start:e[s][1].start,end:e[o][1].end,contentType:"text"},(0,i.splice)(e,s,o-s+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};n.headingAtx=s},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js"}],"../node_modules/micromark-util-html-tag-name/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.htmlRawNames=n.htmlBlockNames=void 0;n.htmlBlockNames=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];n.htmlRawNames=["pre","script","style","textarea"]},{}],"../node_modules/micromark-core-commonmark/lib/html-flow.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.htmlFlow=void 0;var r=e("micromark-util-character"),o=e("micromark-util-html-tag-name"),i=e("./blank-line.js");const s={name:"htmlFlow",tokenize:function(e,t,n){const i=this;let s,c,l,u,d;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),f};function f(o){return 33===o?(e.consume(o),p):47===o?(e.consume(o),g):63===o?(e.consume(o),s=3,i.interrupt?t:F):(0,r.asciiAlpha)(o)?(e.consume(o),l=String.fromCharCode(o),c=!0,v):n(o)}function p(o){return 45===o?(e.consume(o),s=2,m):91===o?(e.consume(o),s=5,l="CDATA[",u=0,h):(0,r.asciiAlpha)(o)?(e.consume(o),s=4,i.interrupt?t:F):n(o)}function m(r){return 45===r?(e.consume(r),i.interrupt?t:F):n(r)}function h(r){return r===l.charCodeAt(u++)?(e.consume(r),u===l.length?i.interrupt?t:E:h):n(r)}function g(t){return(0,r.asciiAlpha)(t)?(e.consume(t),l=String.fromCharCode(t),v):n(t)}function v(a){return null===a||47===a||62===a||(0,r.markdownLineEndingOrSpace)(a)?47!==a&&c&&o.htmlRawNames.includes(l.toLowerCase())?(s=1,i.interrupt?t(a):E(a)):o.htmlBlockNames.includes(l.toLowerCase())?(s=6,47===a?(e.consume(a),y):i.interrupt?t(a):E(a)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):c?k(a):b(a)):45===a||(0,r.asciiAlphanumeric)(a)?(e.consume(a),l+=String.fromCharCode(a),v):n(a)}function y(r){return 62===r?(e.consume(r),i.interrupt?t:E):n(r)}function b(t){return(0,r.markdownSpace)(t)?(e.consume(t),b):M(t)}function k(t){return 47===t?(e.consume(t),M):58===t||95===t||(0,r.asciiAlpha)(t)?(e.consume(t),w):(0,r.markdownSpace)(t)?(e.consume(t),k):M(t)}function w(t){return 45===t||46===t||58===t||95===t||(0,r.asciiAlphanumeric)(t)?(e.consume(t),w):x(t)}function x(t){return 61===t?(e.consume(t),_):(0,r.markdownSpace)(t)?(e.consume(t),x):k(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),d=t,j):(0,r.markdownSpace)(t)?(e.consume(t),_):(d=null,S(t))}function j(t){return null===t||(0,r.markdownLineEnding)(t)?n(t):t===d?(e.consume(t),O):(e.consume(t),j)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||(0,r.markdownLineEndingOrSpace)(t)?x(t):(e.consume(t),S)}function O(e){return 47===e||62===e||(0,r.markdownSpace)(e)?k(e):n(e)}function M(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return(0,r.markdownSpace)(t)?(e.consume(t),C):null===t||(0,r.markdownLineEnding)(t)?E(t):n(t)}function E(t){return 45===t&&2===s?(e.consume(t),A):60===t&&1===s?(e.consume(t),I):62===t&&4===s?(e.consume(t),z):63===t&&3===s?(e.consume(t),F):93===t&&5===s?(e.consume(t),R):!(0,r.markdownLineEnding)(t)||6!==s&&7!==s?null===t||(0,r.markdownLineEnding)(t)?P(t):(e.consume(t),E):e.check(a,z,P)(t)}function P(t){return e.exit("htmlFlowData"),T(t)}function T(t){return null===t?L(t):(0,r.markdownLineEnding)(t)?e.attempt({tokenize:N,partial:!0},T,L)(t):(e.enter("htmlFlowData"),E(t))}function N(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}function A(t){return 45===t?(e.consume(t),F):E(t)}function I(t){return 47===t?(e.consume(t),l="",D):E(t)}function D(t){return 62===t&&o.htmlRawNames.includes(l.toLowerCase())?(e.consume(t),z):(0,r.asciiAlpha)(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),D):E(t)}function R(t){return 93===t?(e.consume(t),F):E(t)}function F(t){return 62===t?(e.consume(t),z):45===t&&2===s?(e.consume(t),F):E(t)}function z(t){return null===t||(0,r.markdownLineEnding)(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),z)}function L(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0};n.htmlFlow=s;const a={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(i.blankLine,t,n)}},partial:!0}},{"micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-html-tag-name":"../node_modules/micromark-util-html-tag-name/index.js","./blank-line.js":"../node_modules/micromark-core-commonmark/lib/blank-line.js"}],"../node_modules/micromark-core-commonmark/lib/html-text.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.htmlText=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"htmlText",tokenize:function(e,t,n){const i=this;let s,a,c,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),u};function u(t){return 33===t?(e.consume(t),d):47===t?(e.consume(t),j):63===t?(e.consume(t),x):(0,o.asciiAlpha)(t)?(e.consume(t),M):n(t)}function d(t){return 45===t?(e.consume(t),f):91===t?(e.consume(t),a="CDATA[",c=0,v):(0,o.asciiAlpha)(t)?(e.consume(t),w):n(t)}function f(t){return 45===t?(e.consume(t),p):n(t)}function p(t){return null===t||62===t?n(t):45===t?(e.consume(t),m):h(t)}function m(e){return null===e||62===e?n(e):h(e)}function h(t){return null===t?n(t):45===t?(e.consume(t),g):(0,o.markdownLineEnding)(t)?(l=h,D(t)):(e.consume(t),h)}function g(t){return 45===t?(e.consume(t),F):h(t)}function v(t){return t===a.charCodeAt(c++)?(e.consume(t),c===a.length?y:v):n(t)}function y(t){return null===t?n(t):93===t?(e.consume(t),b):(0,o.markdownLineEnding)(t)?(l=y,D(t)):(e.consume(t),y)}function b(t){return 93===t?(e.consume(t),k):y(t)}function k(t){return 62===t?F(t):93===t?(e.consume(t),k):y(t)}function w(t){return null===t||62===t?F(t):(0,o.markdownLineEnding)(t)?(l=w,D(t)):(e.consume(t),w)}function x(t){return null===t?n(t):63===t?(e.consume(t),_):(0,o.markdownLineEnding)(t)?(l=x,D(t)):(e.consume(t),x)}function _(e){return 62===e?F(e):x(e)}function j(t){return(0,o.asciiAlpha)(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||(0,o.asciiAlphanumeric)(t)?(e.consume(t),S):O(t)}function O(t){return(0,o.markdownLineEnding)(t)?(l=O,D(t)):(0,o.markdownSpace)(t)?(e.consume(t),O):F(t)}function M(t){return 45===t||(0,o.asciiAlphanumeric)(t)?(e.consume(t),M):47===t||62===t||(0,o.markdownLineEndingOrSpace)(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),F):58===t||95===t||(0,o.asciiAlpha)(t)?(e.consume(t),E):(0,o.markdownLineEnding)(t)?(l=C,D(t)):(0,o.markdownSpace)(t)?(e.consume(t),C):F(t)}function E(t){return 45===t||46===t||58===t||95===t||(0,o.asciiAlphanumeric)(t)?(e.consume(t),E):P(t)}function P(t){return 61===t?(e.consume(t),T):(0,o.markdownLineEnding)(t)?(l=P,D(t)):(0,o.markdownSpace)(t)?(e.consume(t),P):C(t)}function T(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,N):(0,o.markdownLineEnding)(t)?(l=T,D(t)):(0,o.markdownSpace)(t)?(e.consume(t),T):(e.consume(t),s=void 0,I)}function N(t){return t===s?(e.consume(t),A):null===t?n(t):(0,o.markdownLineEnding)(t)?(l=N,D(t)):(e.consume(t),N)}function A(e){return 62===e||47===e||(0,o.markdownLineEndingOrSpace)(e)?C(e):n(e)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||(0,o.markdownLineEndingOrSpace)(t)?C(t):(e.consume(t),I)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,r.factorySpace)(e,R,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function R(t){return e.enter("htmlTextData"),l(t)}function F(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}};n.htmlText=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/label-end.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.labelEnd=void 0;var r=e("micromark-factory-destination"),o=e("micromark-factory-label"),i=e("micromark-factory-title"),s=e("micromark-factory-whitespace"),a=e("micromark-util-character"),c=e("micromark-util-chunked"),l=e("micromark-util-normalize-identifier"),u=e("micromark-util-resolve-all");const d={name:"labelEnd",tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(t){if(!o)return n(t);return o._inactive?c(t):(i=r.parser.defined.includes((0,l.normalizeIdentifier)(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a)};function a(n){return 40===n?e.attempt(f,t,i?t:c)(n):91===n?e.attempt(p,t,i?e.attempt(m,t,c):c)(n):i?t(n):c(n)}function c(e){return o._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=s);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},d={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},f={type:"labelText",start:Object.assign({},e[r+a+2][1].end),end:Object.assign({},e[o-2][1].start)};return i=[["enter",l,t],["enter",d,t]],i=(0,c.push)(i,e.slice(r+1,r+a+3)),i=(0,c.push)(i,[["enter",f,t]]),i=(0,c.push)(i,(0,u.resolveAll)(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=(0,c.push)(i,[["exit",f,t],e[o-2],e[o-1],["exit",d,t]]),i=(0,c.push)(i,e.slice(o+1)),i=(0,c.push)(i,[["exit",l,t]]),(0,c.splice)(e,r,e.length,i),e},resolveAll:function(e){let t,n=-1;for(;++n<e.length;)"labelImage"!==(t=e[n][1]).type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}};n.labelEnd=d;const f={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),(0,s.factoryWhitespace)(e,o)};function o(t){return 41===t?u(t):(0,r.factoryDestination)(e,c,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function c(t){return(0,a.markdownLineEndingOrSpace)(t)?(0,s.factoryWhitespace)(e,l)(t):u(t)}function l(t){return 34===t||39===t||40===t?(0,i.factoryTitle)(e,(0,s.factoryWhitespace)(e,u),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},p={tokenize:function(e,t,n){const r=this;return function(t){return o.factoryLabel.call(r,e,i,n,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes((0,l.normalizeIdentifier)(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}}},m={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}}},{"micromark-factory-destination":"../node_modules/micromark-factory-destination/index.js","micromark-factory-label":"../node_modules/micromark-factory-label/index.js","micromark-factory-title":"../node_modules/micromark-factory-title/index.js","micromark-factory-whitespace":"../node_modules/micromark-factory-whitespace/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js","micromark-util-normalize-identifier":"../node_modules/micromark-util-normalize-identifier/index.js","micromark-util-resolve-all":"../node_modules/micromark-util-resolve-all/index.js"}],"../node_modules/micromark-core-commonmark/lib/label-start-image.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.labelStartImage=void 0;const r={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:e("./label-end.js").labelEnd.resolveAll};n.labelStartImage=r},{"./label-end.js":"../node_modules/micromark-core-commonmark/lib/label-end.js"}],"../node_modules/micromark-core-commonmark/lib/label-start-link.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.labelStartLink=void 0;const r={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:e("./label-end.js").labelEnd.resolveAll};n.labelStartLink=r},{"./label-end.js":"../node_modules/micromark-core-commonmark/lib/label-end.js"}],"../node_modules/micromark-core-commonmark/lib/line-ending.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lineEnding=void 0;var r=e("micromark-factory-space");e("micromark-util-character");const o={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),(0,r.factorySpace)(e,t,"linePrefix")}}};n.lineEnding=o},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/thematic-break.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.thematicBreak=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"thematicBreak",tokenize:function(e,t,n){let i,s=0;return function(t){return e.enter("thematicBreak"),i=t,a(t)};function a(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):(0,o.markdownSpace)(l)?(0,r.factorySpace)(e,a,"whitespace")(l):s<3||null!==l&&!(0,o.markdownLineEnding)(l)?n(l):(e.exit("thematicBreak"),t(l))}function c(t){return t===i?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),a(t))}}};n.thematicBreak=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/lib/list.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.list=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character"),i=e("./blank-line.js"),s=e("./thematic-break.js");const a={name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let l=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,u=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:(0,o.asciiDigit)(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(s.thematicBreak,n,f)(t):f(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(t)}return n(t)};function d(t){return(0,o.asciiDigit)(t)&&++u<10?(e.consume(t),d):(!r.interrupt||u<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),f(t)):n(t)}function f(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(i.blankLine,r.interrupt?n:p,e.attempt(c,h,m))}function p(e){return r.containerState.initialBlankLine=!0,l++,h(e)}function m(t){return(0,o.markdownSpace)(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):n(t)}function h(n){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(i.blankLine,function(n){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,(0,r.factorySpace)(e,t,"listItemIndent",s.containerState.size+1)(n)},function(n){return s.containerState.furtherBlankLines||!(0,o.markdownSpace)(n)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(n)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(l,t,c)(n))});function c(o){return s.containerState._closeFlow=!0,s.interrupt=void 0,(0,r.factorySpace)(e,e.attempt(a,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}};n.list=a;const c={tokenize:function(e,t,n){const i=this;return(0,r.factorySpace)(e,function(e){const r=i.events[i.events.length-1];return!(0,o.markdownSpace)(e)&&r&&"listItemPrefixWhitespace"===r[1].type?t(e):n(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},l={tokenize:function(e,t,n){const o=this;return(0,r.factorySpace)(e,function(e){const r=o.events[o.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===o.containerState.size?t(e):n(e)},"listItemIndent",o.containerState.size+1)},partial:!0}},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js","./blank-line.js":"../node_modules/micromark-core-commonmark/lib/blank-line.js","./thematic-break.js":"../node_modules/micromark-core-commonmark/lib/thematic-break.js"}],"../node_modules/micromark-core-commonmark/lib/setext-underline.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setextUnderline=void 0;var r=e("micromark-factory-space"),o=e("micromark-util-character");const i={name:"setextUnderline",tokenize:function(e,t,n){const i=this;let s,a,c=i.events.length;for(;c--;)if("lineEnding"!==i.events[c][1].type&&"linePrefix"!==i.events[c][1].type&&"content"!==i.events[c][1].type){a="paragraph"===i.events[c][1].type;break}return function(t){if(!i.parser.lazy[i.now().line]&&(i.interrupt||a))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),s=t,l(t);return n(t)};function l(t){return t===s?(e.consume(t),l):(e.exit("setextHeadingLineSequence"),(0,r.factorySpace)(e,u,"lineSuffix")(t))}function u(r){return null===r||(0,o.markdownLineEnding)(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e}};n.setextUnderline=i},{"micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark-core-commonmark/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"attention",{enumerable:!0,get:function(){return r.attention}}),Object.defineProperty(n,"autolink",{enumerable:!0,get:function(){return o.autolink}}),Object.defineProperty(n,"blankLine",{enumerable:!0,get:function(){return i.blankLine}}),Object.defineProperty(n,"blockQuote",{enumerable:!0,get:function(){return s.blockQuote}}),Object.defineProperty(n,"characterEscape",{enumerable:!0,get:function(){return a.characterEscape}}),Object.defineProperty(n,"characterReference",{enumerable:!0,get:function(){return c.characterReference}}),Object.defineProperty(n,"codeFenced",{enumerable:!0,get:function(){return l.codeFenced}}),Object.defineProperty(n,"codeIndented",{enumerable:!0,get:function(){return u.codeIndented}}),Object.defineProperty(n,"codeText",{enumerable:!0,get:function(){return d.codeText}}),Object.defineProperty(n,"content",{enumerable:!0,get:function(){return f.content}}),Object.defineProperty(n,"definition",{enumerable:!0,get:function(){return p.definition}}),Object.defineProperty(n,"hardBreakEscape",{enumerable:!0,get:function(){return m.hardBreakEscape}}),Object.defineProperty(n,"headingAtx",{enumerable:!0,get:function(){return h.headingAtx}}),Object.defineProperty(n,"htmlFlow",{enumerable:!0,get:function(){return g.htmlFlow}}),Object.defineProperty(n,"htmlText",{enumerable:!0,get:function(){return v.htmlText}}),Object.defineProperty(n,"labelEnd",{enumerable:!0,get:function(){return y.labelEnd}}),Object.defineProperty(n,"labelStartImage",{enumerable:!0,get:function(){return b.labelStartImage}}),Object.defineProperty(n,"labelStartLink",{enumerable:!0,get:function(){return k.labelStartLink}}),Object.defineProperty(n,"lineEnding",{enumerable:!0,get:function(){return w.lineEnding}}),Object.defineProperty(n,"list",{enumerable:!0,get:function(){return x.list}}),Object.defineProperty(n,"setextUnderline",{enumerable:!0,get:function(){return _.setextUnderline}}),Object.defineProperty(n,"thematicBreak",{enumerable:!0,get:function(){return j.thematicBreak}});var r=e("./lib/attention.js"),o=e("./lib/autolink.js"),i=e("./lib/blank-line.js"),s=e("./lib/block-quote.js"),a=e("./lib/character-escape.js"),c=e("./lib/character-reference.js"),l=e("./lib/code-fenced.js"),u=e("./lib/code-indented.js"),d=e("./lib/code-text.js"),f=e("./lib/content.js"),p=e("./lib/definition.js"),m=e("./lib/hard-break-escape.js"),h=e("./lib/heading-atx.js"),g=e("./lib/html-flow.js"),v=e("./lib/html-text.js"),y=e("./lib/label-end.js"),b=e("./lib/label-start-image.js"),k=e("./lib/label-start-link.js"),w=e("./lib/line-ending.js"),x=e("./lib/list.js"),_=e("./lib/setext-underline.js"),j=e("./lib/thematic-break.js")},{"./lib/attention.js":"../node_modules/micromark-core-commonmark/lib/attention.js","./lib/autolink.js":"../node_modules/micromark-core-commonmark/lib/autolink.js","./lib/blank-line.js":"../node_modules/micromark-core-commonmark/lib/blank-line.js","./lib/block-quote.js":"../node_modules/micromark-core-commonmark/lib/block-quote.js","./lib/character-escape.js":"../node_modules/micromark-core-commonmark/lib/character-escape.js","./lib/character-reference.js":"../node_modules/micromark-core-commonmark/lib/character-reference.js","./lib/code-fenced.js":"../node_modules/micromark-core-commonmark/lib/code-fenced.js","./lib/code-indented.js":"../node_modules/micromark-core-commonmark/lib/code-indented.js","./lib/code-text.js":"../node_modules/micromark-core-commonmark/lib/code-text.js","./lib/content.js":"../node_modules/micromark-core-commonmark/lib/content.js","./lib/definition.js":"../node_modules/micromark-core-commonmark/lib/definition.js","./lib/hard-break-escape.js":"../node_modules/micromark-core-commonmark/lib/hard-break-escape.js","./lib/heading-atx.js":"../node_modules/micromark-core-commonmark/lib/heading-atx.js","./lib/html-flow.js":"../node_modules/micromark-core-commonmark/lib/html-flow.js","./lib/html-text.js":"../node_modules/micromark-core-commonmark/lib/html-text.js","./lib/label-end.js":"../node_modules/micromark-core-commonmark/lib/label-end.js","./lib/label-start-image.js":"../node_modules/micromark-core-commonmark/lib/label-start-image.js","./lib/label-start-link.js":"../node_modules/micromark-core-commonmark/lib/label-start-link.js","./lib/line-ending.js":"../node_modules/micromark-core-commonmark/lib/line-ending.js","./lib/list.js":"../node_modules/micromark-core-commonmark/lib/list.js","./lib/setext-underline.js":"../node_modules/micromark-core-commonmark/lib/setext-underline.js","./lib/thematic-break.js":"../node_modules/micromark-core-commonmark/lib/thematic-break.js"}],"../node_modules/micromark/lib/initialize/flow.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.flow=void 0;var r=e("micromark-core-commonmark"),o=e("micromark-factory-space");e("micromark-util-character");const i={tokenize:function(e){const t=this,n=e.attempt(r.blankLine,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,i,(0,o.factorySpace)(e,e.attempt(this.parser.constructs.flow,i,e.attempt(r.content,i)),"linePrefix")));return n;function i(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};n.flow=i},{"micromark-core-commonmark":"../node_modules/micromark-core-commonmark/index.js","micromark-factory-space":"../node_modules/micromark-factory-space/index.js","micromark-util-character":"../node_modules/micromark-util-character/index.js"}],"../node_modules/micromark/lib/initialize/text.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=n.string=n.resolver=void 0;const r={resolveAll:a()};n.resolver=r;const o=s("string");n.string=o;const i=s("text");function s(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(e){return c(e)?o(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return c(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function c(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:a("text"===e?c:void 0)}}function a(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function c(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,s=o.length,a=-1,c=0;for(;s--;){const e=o[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)c++,a--;if(a)break;a=-1}else if(-2===e)i=!0,c++;else if(-1!==e){s++;break}}if(c){const o={type:n===e.length||i||c<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-c,offset:r.end.offset-c,_index:r.start._index+s,_bufferIndex:s?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},o.start),r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}n.text=i},{}],"../node_modules/micromark/lib/create-tokenizer.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTokenizer=function(e,t,n){let s=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const a={},c=[];let l=[],u=[],d=!0;const f={consume:function(e){(0,r.markdownLineEnding)(e)?(s.line++,s.column=1,s.offset+=-3===e?2:1,x()):-1!==e&&(s.column++,s.offset++);s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===l[s._index].length&&(s._bufferIndex=-1,s._index++));p.previous=e,d=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=v(),p.events.push(["enter",n,p]),u.push(n),n},exit:function(e){const t=u.pop();return t.end=v(),p.events.push(["exit",t,p]),t},attempt:k(function(e,t){w(e,t.from)}),check:k(b),interrupt:k(b,{interrupt:!0})},p={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if("string"==typeof i)s=i;else switch(i){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&o)continue;s=" ";break;default:s=String.fromCharCode(i)}o=-2===i,r.push(s)}return r.join("")}(g(e),t)},now:v,defineSkip:function(e){a[e.line]=e.column,x()},write:function(e){if(l=(0,o.push)(l,e),function(){let e;for(;s._index<l.length;){const t=l[s._index];if("string"==typeof t)for(e=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===e&&s._bufferIndex<t.length;)y(t.charCodeAt(s._bufferIndex));else y(t)}}(),null!==l[l.length-1])return[];return w(t,0),p.events=(0,i.resolveAll)(c,p.events,p),p.events}};let m,h=t.tokenize.call(p,f);t.resolveAll&&c.push(t);return p;function g(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;n===o?s=[e[n].slice(r,i)]:(s=e.slice(n,o),r>-1&&(s[0]=s[0].slice(r)),i>0&&s.push(e[o].slice(0,i)));return s}(l,e)}function v(){return Object.assign({},s)}function y(e){d=void 0,m=e,h=h(e)}function b(e,t){t.restore()}function k(e,t){return function(n,r,o){let i,a,c,l;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function m(e){return i=e,a=0,0===e.length?o:h(e[a])}function h(e){return function(n){l=function(){const e=v(),t=p.previous,n=p.currentConstruct,r=p.events.length,o=Array.from(u);return{restore:function(){s=e,p.previous=t,p.currentConstruct=n,p.events.length=r,u=o,x()},from:r}}(),c=e,e.partial||(p.currentConstruct=e);if(e.name&&p.parser.constructs.disable.null.includes(e.name))return y(n);return e.tokenize.call(t?Object.assign(Object.create(p),t):p,f,g,y)(n)}}function g(t){return d=!0,e(c,l),r}function y(e){return d=!0,l.restore(),++a<i.length?h(i[a]):o}}}function w(e,t){e.resolveAll&&!c.includes(e)&&c.push(e),e.resolve&&(0,o.splice)(p.events,t,p.events.length-t,e.resolve(p.events.slice(t),p)),e.resolveTo&&(p.events=e.resolveTo(p.events,p))}function x(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}};var r=e("micromark-util-character"),o=e("micromark-util-chunked"),i=e("micromark-util-resolve-all")},{"micromark-util-character":"../node_modules/micromark-util-character/index.js","micromark-util-chunked":"../node_modules/micromark-util-chunked/index.js","micromark-util-resolve-all":"../node_modules/micromark-util-resolve-all/index.js"}],"../node_modules/micromark/lib/constructs.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.disable=n.attentionMarkers=n.insideSpan=n.text=n.string=n.flow=n.flowInitial=n.contentInitial=n.document=void 0;var r=e("micromark-core-commonmark"),o=e("./initialize/text.js");const i={42:r.list,43:r.list,45:r.list,48:r.list,49:r.list,50:r.list,51:r.list,52:r.list,53:r.list,54:r.list,55:r.list,56:r.list,57:r.list,62:r.blockQuote};n.document=i;const s={91:r.definition};n.contentInitial=s;const a={[-2]:r.codeIndented,[-1]:r.codeIndented,32:r.codeIndented};n.flowInitial=a;const c={35:r.headingAtx,42:r.thematicBreak,45:[r.setextUnderline,r.thematicBreak],60:r.htmlFlow,61:r.setextUnderline,95:r.thematicBreak,96:r.codeFenced,126:r.codeFenced};n.flow=c;const l={38:r.characterReference,92:r.characterEscape};n.string=l;const u={[-5]:r.lineEnding,[-4]:r.lineEnding,[-3]:r.lineEnding,33:r.labelStartImage,38:r.characterReference,42:r.attention,60:[r.autolink,r.htmlText],91:r.labelStartLink,92:[r.hardBreakEscape,r.characterEscape],93:r.labelEnd,95:r.attention,96:r.codeText};n.text=u;const d={null:[r.attention,o.resolver]};n.insideSpan=d;n.attentionMarkers={null:[42,95]};n.disable={null:[]}},{"micromark-core-commonmark":"../node_modules/micromark-core-commonmark/index.js","./initialize/text.js":"../node_modules/micromark/lib/initialize/text.js"}],"../node_modules/micromark/lib/parse.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e={}){const t={defined:[],lazy:{},constructs:(0,r.combineExtensions)([l].concat(e.extensions||[])),content:n(o.content),document:n(i.document),flow:n(s.flow),string:n(a.string),text:n(a.text)};return t;function n(e){return function(n){return(0,c.createTokenizer)(t,e,n)}}};var r=e("micromark-util-combine-extensions"),o=e("./initialize/content.js"),i=e("./initialize/document.js"),s=e("./initialize/flow.js"),a=e("./initialize/text.js"),c=e("./create-tokenizer.js"),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(e("./constructs.js"));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}},{"micromark-util-combine-extensions":"../node_modules/micromark-util-combine-extensions/index.js","./initialize/content.js":"../node_modules/micromark/lib/initialize/content.js","./initialize/document.js":"../node_modules/micromark/lib/initialize/document.js","./initialize/flow.js":"../node_modules/micromark/lib/initialize/flow.js","./initialize/text.js":"../node_modules/micromark/lib/initialize/text.js","./create-tokenizer.js":"../node_modules/micromark/lib/create-tokenizer.js","./constructs.js":"../node_modules/micromark/lib/constructs.js"}],"../node_modules/micromark/lib/preprocess.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.preprocess=function(){let e,t=1,n="",o=!0;return function(i,s,a){const c=[];let l,u,d,f,p;i=n+i.toString(s),d=0,n="",o&&(65279===i.charCodeAt(0)&&d++,o=void 0);for(;d<i.length;){if(r.lastIndex=d,l=r.exec(i),f=l&&void 0!==l.index?l.index:i.length,p=i.charCodeAt(f),!l){n=i.slice(d);break}if(10===p&&d===f&&e)c.push(-3),e=void 0;else switch(e&&(c.push(-5),e=void 0),d<f&&(c.push(i.slice(d,f)),t+=f-d),p){case 0:c.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),c.push(-2);t++<u;)c.push(-1);break;case 10:c.push(-4),t=1;break;default:e=!0,t=1}d=f+1}a&&(e&&c.push(-5),n&&c.push(n),c.push(null));return c}};const r=/[\0\t\n\r]/g},{}],"../node_modules/micromark/lib/postprocess.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.postprocess=function(e){for(;!(0,r.subtokenize)(e););return e};var r=e("micromark-util-subtokenize")},{"micromark-util-subtokenize":"../node_modules/micromark-util-subtokenize/index.js"}],"../node_modules/micromark-util-decode-numeric-character-reference/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decodeNumericCharacterReference=function(e,t){const n=Number.parseInt(e,t);if(n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111)return"�";return String.fromCharCode(n)}},{}],"../node_modules/micromark-util-decode-string/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decodeString=function(e){return e.replace(i,s)};var r=e("decode-named-character-reference"),o=e("micromark-util-decode-numeric-character-reference");const i=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function s(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return(0,o.decodeNumericCharacterReference)(n.slice(t?2:1),t?16:10)}return(0,r.decodeNamedCharacterReference)(n)||e}},{"decode-named-character-reference":"../node_modules/decode-named-character-reference/index.js","micromark-util-decode-numeric-character-reference":"../node_modules/micromark-util-decode-numeric-character-reference/index.js"}],"../node_modules/mdast-util-from-markdown/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fromMarkdown=void 0;var r=e("mdast-util-to-string"),o=e("micromark/lib/parse.js"),i=e("micromark/lib/preprocess.js"),s=e("micromark/lib/postprocess.js"),a=e("micromark-util-decode-numeric-character-reference"),c=e("micromark-util-decode-string"),l=e("micromark-util-normalize-identifier"),u=e("decode-named-character-reference"),d=e("unist-util-stringify-position");const f={}.hasOwnProperty;function p(e,t){let n;for(n in t)if(f.call(t,n)){const r="canContainEols"===n||"transforms"===n,o=(f.call(e,n)?e[n]:void 0)||(e[n]=r?[]:{}),i=t[n];i&&(r?e[n]=[...o,...i]:Object.assign(o,i))}}function m(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+(0,d.stringifyPosition)({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+(0,d.stringifyPosition)({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+(0,d.stringifyPosition)({start:t.start,end:t.end})+") is still open")}n.fromMarkdown=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e={}){const t=function e(t,n){let r=-1;for(;++r<n.length;){const o=n[r];Array.isArray(o)?e(t,o):p(t,o)}return t}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:g(P),autolinkProtocol:x,autolinkEmail:x,atxHeading:g(M),blockQuote:g(function(){return{type:"blockquote",children:[]}}),characterEscape:x,characterReference:x,codeFenced:g(O),codeFencedFenceInfo:v,codeFencedFenceMeta:v,codeIndented:g(O,v),codeText:g(function(){return{type:"inlineCode",value:""}},v),codeTextData:x,data:x,codeFlowValue:x,definition:g(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:v,definitionLabelString:v,definitionTitleString:v,emphasis:g(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:g(C),hardBreakTrailing:g(C),htmlFlow:g(E,v),htmlFlowData:x,htmlText:g(E,v),htmlTextData:x,image:g(function(){return{type:"image",title:null,url:"",alt:null}}),label:v,link:g(P),listItem:g(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){if(s("expectingFirstListItemValue")){const t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),i("expectingFirstListItemValue")}},listOrdered:g(T,function(){i("expectingFirstListItemValue",!0)}),listUnordered:g(T),paragraph:g(function(){return{type:"paragraph",children:[]}}),reference:function(){i("referenceType","collapsed")},referenceString:v,resourceDestinationString:v,resourceTitleString:v,setextHeading:g(M),strong:g(function(){return{type:"strong",children:[]}}),thematicBreak:g(function(){return{type:"thematicBreak"}})},exit:{atxHeading:b(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:b(),autolinkEmail:function(e){_.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){_.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:b(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:S,characterReferenceMarkerNumeric:S,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=s("characterReferenceType");let r;n?(r=(0,a.decodeNumericCharacterReference)(t,"characterReferenceMarkerNumeric"===n?10:16),i("characterReferenceType")):r=(0,u.decodeNamedCharacterReference)(t);const o=this.stack.pop();o.value+=r,o.position.end=h(e.end)},codeFenced:b(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),i("flowCodeInside")}),codeFencedFence:function(){s("flowCodeInside")||(this.buffer(),i("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:_,codeIndented:b(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:b(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:_,data:_,definition:b(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,l.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:b(),hardBreakEscape:b(j),hardBreakTrailing:b(j),htmlFlow:b(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:_,htmlText:b(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:_,image:b(function(){const e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),i("referenceType")}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];i("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.stack[this.stack.length-2],n=this.sliceSerialize(e);t.label=(0,c.decodeString)(n),t.identifier=(0,l.normalizeIdentifier)(n).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(s("atHardBreak")){const t=n.children[n.children.length-1];return t.position.end=h(e.end),void i("atHardBreak")}!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(x.call(this,e),_.call(this,e))},link:b(function(){const e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),i("referenceType")}),listItem:b(),listOrdered:b(),listUnordered:b(),paragraph:b(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,l.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase(),i("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){i("inReference")},setextHeading:b(function(){i("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){i("setextHeadingSlurpLineEnding",!0)},strong:b(),thematicBreak:b()}},e.mdastExtensions||[]),n={};return function(e){let n={type:"root",children:[]};const r=[],a=[],c={stack:[n],tokenStack:r,config:t,enter:y,exit:k,buffer:v,resume:w,setData:i,getData:s};let l=-1;for(;++l<e.length;)if("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)if("enter"===e[l][0])a.push(l);else{const t=a.pop();l=o(e,t,l)}for(l=-1;++l<e.length;){const n=t[e[l][0]];f.call(n,e[l][1].type)&&n[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},c),e[l][1])}if(r.length>0){const e=r[r.length-1],t=e[1]||m;t.call(c,void 0,e[0])}for(n.position={start:h(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:h(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)n=t.transforms[l](n)||n;return n};function o(e,t,n){let r,o,i,s,a=t-1,c=-1,l=!1;for(;++a<=n;){const t=e[a];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,s=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!r||s||c||i||(i=a),s=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(s=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(o=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",o=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}"listItemPrefix"===t[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(a,0,["enter",r,t[2]]),a++,n++,i=void 0,s=!0)}}return e[t][1]._spread=l,n}function i(e,t){n[e]=t}function s(e){return n[e]}function h(e){return{line:e.line,column:e.column,offset:e.offset}}function g(e,t){return function(n){y.call(this,e(n),n),t&&t.call(this,n)}}function v(){this.stack.push({type:"fragment",children:[]})}function y(e,t,n){const r=this.stack[this.stack.length-1];return r.children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:h(t.start)},e}function b(e){return function(t){e&&e.call(this,t),k.call(this,t)}}function k(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+(0,d.stringifyPosition)({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{const t=r[1]||m;t.call(this,e,r[0])}return n.position.end=h(e.end),n}function w(){return(0,r.toString)(this.stack.pop())}function x(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:h(e.start)},t.children.push(n)),this.stack.push(n)}function _(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=h(e.end)}function j(){i("atHardBreak",!0)}function S(e){i("characterReferenceType",e.type)}function O(){return{type:"code",lang:null,meta:null,value:""}}function M(){return{type:"heading",depth:void 0,children:[]}}function C(){return{type:"break"}}function E(){return{type:"html",value:""}}function P(){return{type:"link",title:null,url:"",children:[]}}function T(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)((0,s.postprocess)((0,o.parse)(n).document().write((0,i.preprocess)()(e,t,!0))))}},{"mdast-util-to-string":"../node_modules/mdast-util-to-string/index.js","micromark/lib/parse.js":"../node_modules/micromark/lib/parse.js","micromark/lib/preprocess.js":"../node_modules/micromark/lib/preprocess.js","micromark/lib/postprocess.js":"../node_modules/micromark/lib/postprocess.js","micromark-util-decode-numeric-character-reference":"../node_modules/micromark-util-decode-numeric-character-reference/index.js","micromark-util-decode-string":"../node_modules/micromark-util-decode-string/index.js","micromark-util-normalize-identifier":"../node_modules/micromark-util-normalize-identifier/index.js","decode-named-character-reference":"../node_modules/decode-named-character-reference/index.js","unist-util-stringify-position":"../node_modules/unist-util-stringify-position/index.js"}],"../node_modules/mdast-util-from-markdown/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"fromMarkdown",{enumerable:!0,get:function(){return r.fromMarkdown}});var r=e("./lib/index.js")},{"./lib/index.js":"../node_modules/mdast-util-from-markdown/lib/index.js"}],"../node_modules/remark-parse/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){Object.assign(this,{Parser:t=>{const n=this.data("settings");return(0,r.fromMarkdown)(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})};var r=e("mdast-util-from-markdown")},{"mdast-util-from-markdown":"../node_modules/mdast-util-from-markdown/index.js"}],"../node_modules/remark-parse/index.js":[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=((r=e("./lib/index.js"))&&r.__esModule?r:{default:r}).default;n.default=o},{"./lib/index.js":"../node_modules/remark-parse/lib/index.js"}],"../node_modules/zwitch/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.zwitch=function(e,t){var n=t||{};function o(t){var n=o.invalid,i=o.handlers;if(t&&r.call(t,e)&&(n=r.call(i,t[e])?i[t[e]]:o.unknown),n)return n.apply(this,arguments)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o};var r={}.hasOwnProperty},{}],"../node_modules/mdast-util-to-markdown/lib/configure.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.configure=function e(t,n){let r=-1;let o;if(n.extensions)for(;++r<n.extensions.length;)e(t,n.extensions[r]);for(o in n)"extensions"===o||("unsafe"===o||"join"===o?t[o]=[...t[o]||[],...n[o]||[]]:"handlers"===o?t[o]=Object.assign(t[o],n[o]||{}):t.options[o]=n[o]);return t}},{}],"../node_modules/mdast-util-to-markdown/lib/util/container-flow.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.containerFlow=function(e,t){const n=t.indexStack,r=e.children||[],o=[];let i=-1;n.push(-1);for(;++i<r.length;){const a=r[i];n[n.length-1]=i,o.push(t.handle(a,e,t,{before:"\n",after:"\n"})),"list"!==a.type&&(t.bulletLastUsed=void 0),i<r.length-1&&o.push(s(a,r[i+1]))}return n.pop(),o.join("");function s(n,r){let o=t.join.length;for(;o--;){const i=t.join[o](n,r,e,t);if(!0===i||1===i)break;if("number"==typeof i)return"\n".repeat(1+i);if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}}},{}],"../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.indentLines=function(e,t){const n=[];let o,i=0,s=0;for(;o=r.exec(e);)a(e.slice(i,o.index)),n.push(o[0]),i=o.index+o[0].length,s++;return a(e.slice(i)),n.join("");function a(e){n.push(t(e,s,!e))}};const r=/\r?\n|\r/g},{}],"../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.blockquote=function(e,t,n){const s=n.enter("blockquote"),a=(0,o.indentLines)((0,r.containerFlow)(e,n),i);return s(),a};var r=e("../util/container-flow.js"),o=e("../util/indent-lines.js");function i(e,t,n){return">"+(n?"":" ")+e}},{"../util/container-flow.js":"../node_modules/mdast-util-to-markdown/lib/util/container-flow.js","../util/indent-lines.js":"../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js"}],"../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js":[function(e,t,n){"use strict";function r(e,t,n){if(!t)return n;"string"==typeof t&&(t=[t]);let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}Object.defineProperty(n,"__esModule",{value:!0}),n.patternInScope=function(e,t){return r(e,t.inConstruct,!0)&&!r(e,t.notInConstruct,!1)}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/break.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hardBreak=function(e,t,n,o){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&(0,r.patternInScope)(n.stack,n.unsafe[i]))return/[ \t]/.test(o.before)?"":" ";return"\\\n"};var r=e("../util/pattern-in-scope.js")},{"../util/pattern-in-scope.js":"../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"}],"../node_modules/longest-streak/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.longestStreak=function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t||1!==t.length)throw new Error("Expected character");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+1,r=n.indexOf(t,o);return s}},{}],"../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatCodeAsIndented=function(e,t){return Boolean(!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}},{}],"../node_modules/mdast-util-to-markdown/lib/util/check-fence.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkFence=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.patternCompile=function(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}},{}],"../node_modules/mdast-util-to-markdown/lib/util/safe.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.safe=function(e,t,n){const a=(n.before||"")+(t||"")+(n.after||""),c=[],l=[],u={};let d=-1;for(;++d<e.unsafe.length;){const t=e.unsafe[d];if(!(0,o.patternInScope)(e.stack,t))continue;const n=(0,r.patternCompile)(t);let i;for(;i=n.exec(a);){const e="before"in t||Boolean(t.atBreak),n="after"in t,r=i.index+(e?i[1].length:0);c.includes(r)?(u[r].before&&!e&&(u[r].before=!1),u[r].after&&!n&&(u[r].after=!1)):(c.push(r),u[r]={before:e,after:n})}}c.sort(i);let f=n.before?n.before.length:0;const p=a.length-(n.after?n.after.length:0);d=-1;for(;++d<c.length;){const e=c[d];e<f||e>=p||(e+1<p&&c[d+1]===e+1&&u[e].after&&!u[e+1].before&&!u[e+1].after||c[d-1]===e-1&&u[e].before&&!u[e-1].before&&!u[e-1].after||(f!==e&&l.push(s(a.slice(f,e),"\\")),f=e,!/[!-/:-@[-`{-~]/.test(a.charAt(e))||n.encode&&n.encode.includes(a.charAt(e))?(l.push("&#x"+a.charCodeAt(e).toString(16).toUpperCase()+";"),f++):l.push("\\")))}return l.push(s(a.slice(f,p),n.after)),l.join("")};var r=e("./pattern-compile.js"),o=e("./pattern-in-scope.js");function i(e,t){return e-t}function s(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],o=[],i=e+t;let s,a=-1,c=0;for(;s=n.exec(i);)r.push(s.index);for(;++a<r.length;)c!==r[a]&&o.push(e.slice(c,r[a])),o.push("\\"),c=r[a];return o.push(e.slice(c)),o.join("")}},{"./pattern-compile.js":"../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js","./pattern-in-scope.js":"../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/code.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.code=function(e,t,n){const l=(0,i.checkFence)(n),u=e.value||"",d="`"===l?"GraveAccent":"Tilde";let f,p;if((0,o.formatCodeAsIndented)(e,n))p=n.enter("codeIndented"),f=(0,s.indentLines)(u,c);else{const t=l.repeat(Math.max((0,r.longestStreak)(u,l)+1,3));let o;p=n.enter("codeFenced"),f=t,e.lang&&(o=n.enter("codeFencedLang"+d),f+=(0,a.safe)(n,e.lang,{before:"`",after:" ",encode:["`"]}),o()),e.lang&&e.meta&&(o=n.enter("codeFencedMeta"+d),f+=" "+(0,a.safe)(n,e.meta,{before:" ",after:"\n",encode:["`"]}),o()),f+="\n",u&&(f+=u+"\n"),f+=t}return p(),f};var r=e("longest-streak"),o=e("../util/format-code-as-indented.js"),i=e("../util/check-fence.js"),s=e("../util/indent-lines.js"),a=e("../util/safe.js");function c(e,t,n){return(n?"":"    ")+e}},{"longest-streak":"../node_modules/longest-streak/index.js","../util/format-code-as-indented.js":"../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js","../util/check-fence.js":"../node_modules/mdast-util-to-markdown/lib/util/check-fence.js","../util/indent-lines.js":"../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/util/association.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.association=function(e){if(e.label||!e.identifier)return e.label||"";return(0,r.decodeString)(e.identifier)};var r=e("micromark-util-decode-string")},{"micromark-util-decode-string":"../node_modules/micromark-util-decode-string/index.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-quote.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkQuote=function(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/definition.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.definition=function(e,t,n){const s=(0,o.checkQuote)(n),a='"'===s?"Quote":"Apostrophe",c=n.enter("definition");let l=n.enter("label"),u="["+(0,i.safe)(n,(0,r.association)(e),{before:"[",after:"]"})+"]: ";l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+="<"+(0,i.safe)(n,e.url,{before:"<",after:">"})+">"):(l=n.enter("destinationRaw"),u+=(0,i.safe)(n,e.url,{before:" ",after:" "}));l(),e.title&&(l=n.enter("title"+a),u+=" "+s+(0,i.safe)(n,e.title,{before:s,after:s})+s,l());return c(),u};var r=e("../util/association.js"),o=e("../util/check-quote.js"),i=e("../util/safe.js")},{"../util/association.js":"../node_modules/mdast-util-to-markdown/lib/util/association.js","../util/check-quote.js":"../node_modules/mdast-util-to-markdown/lib/util/check-quote.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkEmphasis=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.containerPhrasing=function(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let s=-1,a=n.before;r.push(-1);for(;++s<o.length;){const c=o[s];let l;if(r[r.length-1]=s,s+1<o.length){let n=t.handle.handlers[o[s+1].type];n&&n.peek&&(n=n.peek),l=n?n(o[s+1],e,t,{before:"",after:""}).charAt(0):""}else l=n.after;i.length>0&&("\r"===a||"\n"===a)&&"html"===c.type&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" "),i.push(t.handle(c,e,t,{before:a,after:l})),a=i[i.length-1].slice(-1)}return r.pop(),i.join("")}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.emphasis=i;var r=e("../util/check-emphasis.js"),o=e("../util/container-phrasing.js");function i(e,t,n){const i=(0,r.checkEmphasis)(n),s=n.enter("emphasis"),a=(0,o.containerPhrasing)(e,n,{before:i,after:i});return s(),i+a+i}i.peek=function(e,t,n){return n.options.emphasis||"*"}},{"../util/check-emphasis.js":"../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js","../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js"}],"../node_modules/unist-util-is/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convert=n.is=void 0;n.is=function e(t,n,o,i,s){const a=r(n);if(null!=o&&("number"!=typeof o||o<0||o===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==i||e(i)&&i.children))throw new Error("Expected parent node");if(null==i!=(null==o))throw new Error("Expected both parent and index");return!(!t||!t.type||"string"!=typeof t.type)&&Boolean(a.call(s,t,o,i))};const r=function(e){if(null==e)return i;if("string"==typeof e)return function(e){return o(function(t){return t&&t.type===e})}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r(e[n]);return o(function(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1})}(e):function(e){return o(function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0})}(e);if("function"==typeof e)return o(e);throw new Error("Expected function, string, or object as test")};function o(e){return function(...t){return Boolean(e.call(this,...t))}}function i(){return!0}n.convert=r},{}],"../node_modules/unist-util-visit-parents/color.browser.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.color=function(e){return e}},{}],"../node_modules/unist-util-visit-parents/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.visitParents=n.EXIT=n.SKIP=n.CONTINUE=void 0;var r=e("unist-util-is"),o=e("./color.js");const i=!0;n.CONTINUE=i;const s="skip";n.SKIP=s;const a=!1;n.EXIT=a;n.visitParents=function(e,t,n,c){"function"==typeof t&&"function"!=typeof n&&(c=n,n=t,t=null);const l=(0,r.convert)(t),u=c?-1:1;!function e(r,d,f){const p="object"==typeof r&&null!==r?r:{};let m;return"string"==typeof p.type&&(m="string"==typeof p.tagName?p.tagName:"string"==typeof p.name?p.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(0,o.color)(p.type+(m?"<"+m+">":""))+")"})),h;function h(){let o,p,m,h=[];if((!t||l(r,d,f[f.length-1]||null))&&(g=n(r,f),h=Array.isArray(g)?g:"number"==typeof g?[i,g]:[g])[0]===a)return h;var g;if(r.children&&h[0]!==s)for(p=(c?r.children.length:-1)+u,m=f.concat(r);p>-1&&p<r.children.length;){if((o=e(r.children[p],p,m)())[0]===a)return o;p="number"==typeof o[1]?o[1]:p+u}return h}}(e,null,[])()}},{"unist-util-is":"../node_modules/unist-util-is/index.js","./color.js":"../node_modules/unist-util-visit-parents/color.browser.js"}],"../node_modules/unist-util-visit/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"CONTINUE",{enumerable:!0,get:function(){return r.CONTINUE}}),Object.defineProperty(n,"SKIP",{enumerable:!0,get:function(){return r.SKIP}}),Object.defineProperty(n,"EXIT",{enumerable:!0,get:function(){return r.EXIT}}),n.visit=void 0;var r=e("unist-util-visit-parents");n.visit=function(e,t,n,o){"function"==typeof t&&"function"!=typeof n&&(o=n,n=t,t=null),(0,r.visitParents)(e,t,function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)},o)}},{"unist-util-visit-parents":"../node_modules/unist-util-visit-parents/index.js"}],"../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatHeadingAsSetext=function(e,t){let n=!1;return(0,r.visit)(e,e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,r.EXIT}),Boolean((!e.depth||e.depth<3)&&(0,o.toString)(e)&&(t.options.setext||n))};var r=e("unist-util-visit"),o=e("mdast-util-to-string")},{"unist-util-visit":"../node_modules/unist-util-visit/index.js","mdast-util-to-string":"../node_modules/mdast-util-to-string/index.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/heading.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.heading=function(e,t,n){const i=Math.max(Math.min(6,e.depth||1),1);if((0,r.formatHeadingAsSetext)(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=(0,o.containerPhrasing)(e,n,{before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),c=n.enter("phrasing");let l=(0,o.containerPhrasing)(e,n,{before:"# ",after:"\n"});/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1));l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s);return c(),a(),l};var r=e("../util/format-heading-as-setext.js"),o=e("../util/container-phrasing.js")},{"../util/format-heading-as-setext.js":"../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js","../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/html.js":[function(e,t,n){"use strict";function r(e){return e.value||""}Object.defineProperty(n,"__esModule",{value:!0}),n.html=r,r.peek=function(){return"<"}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/image.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.image=i;var r=e("../util/check-quote.js"),o=e("../util/safe.js");function i(e,t,n){const i=(0,r.checkQuote)(n),s='"'===i?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label"),l="!["+(0,o.safe)(n,e.alt,{before:"[",after:"]"})+"](";return c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+="<"+(0,o.safe)(n,e.url,{before:"<",after:">"})+">"):(c=n.enter("destinationRaw"),l+=(0,o.safe)(n,e.url,{before:"(",after:e.title?" ":")"})),c(),e.title&&(c=n.enter("title"+s),l+=" "+i+(0,o.safe)(n,e.title,{before:i,after:i})+i,c()),l+=")",a(),l}i.peek=function(){return"!"}},{"../util/check-quote.js":"../node_modules/mdast-util-to-markdown/lib/util/check-quote.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.imageReference=i;var r=e("../util/association.js"),o=e("../util/safe.js");function i(e,t,n){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const c=(0,o.safe)(n,e.alt,{before:"[",after:"]"});let l="!["+c+"]";a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=(0,o.safe)(n,(0,r.association)(e),{before:"[",after:"]"});return a(),n.stack=u,s(),"full"!==i&&c&&c===d?"shortcut"!==i&&(l+="[]"):l+="["+d+"]",l}i.peek=function(){return"!"}},{"../util/association.js":"../node_modules/mdast-util-to-markdown/lib/util/association.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.inlineCode=o;var r=e("../util/pattern-compile.js");function o(e,t,n){let o=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(o);)i+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++s<n.unsafe.length;){const e=n.unsafe[s],t=(0,r.patternCompile)(e);let i;if(e.atBreak)for(;i=t.exec(o);){let e=i.index;10===o.charCodeAt(e)&&13===o.charCodeAt(e-1)&&e--,o=o.slice(0,e)+" "+o.slice(i.index+1)}}return i+o+i}o.peek=function(){return"`"}},{"../util/pattern-compile.js":"../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js"}],"../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatLinkAsAutolink=function(e,t){const n=(0,r.toString)(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))};var r=e("mdast-util-to-string")},{"mdast-util-to-string":"../node_modules/mdast-util-to-string/index.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/link.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.link=a;var r=e("../util/check-quote.js"),o=e("../util/format-link-as-autolink.js"),i=e("../util/container-phrasing.js"),s=e("../util/safe.js");function a(e,t,n){const a=(0,r.checkQuote)(n),c='"'===a?"Quote":"Apostrophe";let l,u,d;if((0,o.formatLinkAsAutolink)(e,n)){const t=n.stack;return n.stack=[],l=n.enter("autolink"),d="<"+(0,i.containerPhrasing)(e,n,{before:"<",after:">"})+">",l(),n.stack=t,d}return l=n.enter("link"),u=n.enter("label"),d="["+(0,i.containerPhrasing)(e,n,{before:"[",after:"]"})+"](",u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+="<"+(0,s.safe)(n,e.url,{before:"<",after:">"})+">"):(u=n.enter("destinationRaw"),d+=(0,s.safe)(n,e.url,{before:"(",after:e.title?" ":")"})),u(),e.title&&(u=n.enter("title"+c),d+=" "+a+(0,s.safe)(n,e.title,{before:a,after:a})+a,u()),d+=")",l(),d}a.peek=function(e,t,n){return(0,o.formatLinkAsAutolink)(e,n)?"<":"["}},{"../util/check-quote.js":"../node_modules/mdast-util-to-markdown/lib/util/check-quote.js","../util/format-link-as-autolink.js":"../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js","../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.linkReference=s;var r=e("../util/association.js"),o=e("../util/container-phrasing.js"),i=e("../util/safe.js");function s(e,t,n){const s=e.referenceType,a=n.enter("linkReference");let c=n.enter("label");const l=(0,o.containerPhrasing)(e,n,{before:"[",after:"]"});let u="["+l+"]";c();const d=n.stack;n.stack=[],c=n.enter("reference");const f=(0,i.safe)(n,(0,r.association)(e),{before:"[",after:"]"});return c(),n.stack=d,a(),"full"!==s&&l&&l===f?"shortcut"!==s&&(u+="[]"):u+="["+f+"]",u}s.peek=function(){return"["}},{"../util/association.js":"../node_modules/mdast-util-to-markdown/lib/util/association.js","../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js","../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBullet=function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBulletOther=function(e){const t=(0,r.checkBullet)(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n};var r=e("./check-bullet.js")},{"./check-bullet.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBulletOrdered=function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered-other.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBulletOrderedOther=function(e){const t=(0,r.checkBulletOrdered)(e),n=e.options.bulletOrderedOther;if(!n)return"."===t?")":".";if("."!==n&&")"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrderedOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bulletOrdered` (`"+t+"`) and `bulletOrderedOther` (`"+n+"`) to be different");return n};var r=e("./check-bullet-ordered.js")},{"./check-bullet-ordered.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-rule.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkRule=function(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/list.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.list=function(e,t,n){const l=n.enter("list"),u=n.bulletCurrent;let d=e.ordered?(0,s.checkBulletOrdered)(n):(0,o.checkBullet)(n);const f=e.ordered?(0,a.checkBulletOrderedOther)(n):(0,i.checkBulletOther)(n),p=n.bulletLastUsed;let m=!1;t&&(e.ordered?n.options.bulletOrderedOther:n.options.bulletOther)&&p&&d===p&&(m=!0);if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==d&&"-"!==d||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(m=!0),(0,c.checkRule)(n)===d&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){m=!0;break}}}}m&&(d=f);n.bulletCurrent=d;const h=(0,r.containerFlow)(e,n);return n.bulletLastUsed=d,n.bulletCurrent=u,l(),h};var r=e("../util/container-flow.js"),o=e("../util/check-bullet.js"),i=e("../util/check-bullet-other.js"),s=e("../util/check-bullet-ordered.js"),a=e("../util/check-bullet-ordered-other.js"),c=e("../util/check-rule.js")},{"../util/container-flow.js":"../node_modules/mdast-util-to-markdown/lib/util/container-flow.js","../util/check-bullet.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js","../util/check-bullet-other.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js","../util/check-bullet-ordered.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js","../util/check-bullet-ordered-other.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered-other.js","../util/check-rule.js":"../node_modules/mdast-util-to-markdown/lib/util/check-rule.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkListItemIndent=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/list-item.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.listItem=function(e,t,n){const a=(0,o.checkListItemIndent)(n);let c=n.bulletCurrent||(0,r.checkBullet)(n);t&&"list"===t.type&&t.ordered&&(c=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+c);let l=c.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));const u=n.enter("listItem"),d=(0,s.indentLines)((0,i.containerFlow)(e,n),function(e,t,n){if(t)return(n?"":" ".repeat(l))+e;return(n?c:c+" ".repeat(l-c.length))+e});return u(),d};var r=e("../util/check-bullet.js"),o=e("../util/check-list-item-indent.js"),i=e("../util/container-flow.js"),s=e("../util/indent-lines.js")},{"../util/check-bullet.js":"../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js","../util/check-list-item-indent.js":"../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js","../util/container-flow.js":"../node_modules/mdast-util-to-markdown/lib/util/container-flow.js","../util/indent-lines.js":"../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.paragraph=function(e,t,n){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=(0,r.containerPhrasing)(e,n,{before:"\n",after:"\n"});return i(),o(),s};var r=e("../util/container-phrasing.js")},{"../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/root.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.root=function(e,t,n){return(0,r.containerFlow)(e,n)};var r=e("../util/container-flow.js")},{"../util/container-flow.js":"../node_modules/mdast-util-to-markdown/lib/util/container-flow.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-strong.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrong=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/strong.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.strong=i;var r=e("../util/check-strong.js"),o=e("../util/container-phrasing.js");function i(e,t,n){const i=(0,r.checkStrong)(n),s=n.enter("strong"),a=(0,o.containerPhrasing)(e,n,{before:i,after:i});return s(),i+i+a+i+i}i.peek=function(e,t,n){return n.options.strong||"*"}},{"../util/check-strong.js":"../node_modules/mdast-util-to-markdown/lib/util/check-strong.js","../util/container-phrasing.js":"../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/text.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=function(e,t,n,o){return(0,r.safe)(n,e.value,o)};var r=e("../util/safe.js")},{"../util/safe.js":"../node_modules/mdast-util-to-markdown/lib/util/safe.js"}],"../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkRuleRepetition=function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}},{}],"../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.thematicBreak=function(e,t,n){const i=((0,o.checkRule)(n)+(n.options.ruleSpaces?" ":"")).repeat((0,r.checkRuleRepetition)(n));return n.options.ruleSpaces?i.slice(0,-1):i};var r=e("../util/check-rule-repetition.js"),o=e("../util/check-rule.js")},{"../util/check-rule-repetition.js":"../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js","../util/check-rule.js":"../node_modules/mdast-util-to-markdown/lib/util/check-rule.js"}],"../node_modules/mdast-util-to-markdown/lib/handle/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handle=void 0;var r=e("./blockquote.js"),o=e("./break.js"),i=e("./code.js"),s=e("./definition.js"),a=e("./emphasis.js"),c=e("./heading.js"),l=e("./html.js"),u=e("./image.js"),d=e("./image-reference.js"),f=e("./inline-code.js"),p=e("./link.js"),m=e("./link-reference.js"),h=e("./list.js"),g=e("./list-item.js"),v=e("./paragraph.js"),y=e("./root.js"),b=e("./strong.js"),k=e("./text.js"),w=e("./thematic-break.js");const x={blockquote:r.blockquote,break:o.hardBreak,code:i.code,definition:s.definition,emphasis:a.emphasis,hardBreak:o.hardBreak,heading:c.heading,html:l.html,image:u.image,imageReference:d.imageReference,inlineCode:f.inlineCode,link:p.link,linkReference:m.linkReference,list:h.list,listItem:g.listItem,paragraph:v.paragraph,root:y.root,strong:b.strong,text:k.text,thematicBreak:w.thematicBreak};n.handle=x},{"./blockquote.js":"../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js","./break.js":"../node_modules/mdast-util-to-markdown/lib/handle/break.js","./code.js":"../node_modules/mdast-util-to-markdown/lib/handle/code.js","./definition.js":"../node_modules/mdast-util-to-markdown/lib/handle/definition.js","./emphasis.js":"../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js","./heading.js":"../node_modules/mdast-util-to-markdown/lib/handle/heading.js","./html.js":"../node_modules/mdast-util-to-markdown/lib/handle/html.js","./image.js":"../node_modules/mdast-util-to-markdown/lib/handle/image.js","./image-reference.js":"../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js","./inline-code.js":"../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js","./link.js":"../node_modules/mdast-util-to-markdown/lib/handle/link.js","./link-reference.js":"../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js","./list.js":"../node_modules/mdast-util-to-markdown/lib/handle/list.js","./list-item.js":"../node_modules/mdast-util-to-markdown/lib/handle/list-item.js","./paragraph.js":"../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js","./root.js":"../node_modules/mdast-util-to-markdown/lib/handle/root.js","./strong.js":"../node_modules/mdast-util-to-markdown/lib/handle/strong.js","./text.js":"../node_modules/mdast-util-to-markdown/lib/handle/text.js","./thematic-break.js":"../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js"}],"../node_modules/mdast-util-to-markdown/lib/join.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.join=void 0;var r=e("./util/format-code-as-indented.js"),o=e("./util/format-heading-as-setext.js");const i=[function(e,t,n,i){if("code"===t.type&&(0,r.formatCodeAsIndented)(t,i)&&("list"===e.type||e.type===t.type&&(0,r.formatCodeAsIndented)(e,i)))return!1;if("list"===e.type&&e.type===t.type&&Boolean(e.ordered)===Boolean(t.ordered)&&!(e.ordered?i.options.bulletOrderedOther:i.options.bulletOther))return!1;if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&(0,o.formatHeadingAsSetext)(t,i)))return;return n.spread?1:0}}];n.join=i},{"./util/format-code-as-indented.js":"../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js","./util/format-heading-as-setext.js":"../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js"}],"../node_modules/mdast-util-to-markdown/lib/unsafe.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unsafe=void 0;const r=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],o=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:r},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:r},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing",notInConstruct:r},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:r},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:r},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:r},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:r},{atBreak:!0,character:"~"}];n.unsafe=o},{}],"../node_modules/mdast-util-to-markdown/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toMarkdown=function(e,t={}){const n={enter:function(e){return n.stack.push(e),function(){n.stack.pop()}},stack:[],unsafe:[],join:[],handlers:{},options:{},indexStack:[]};(0,o.configure)(n,{unsafe:a.unsafe,join:s.join,handlers:i.handle}),(0,o.configure)(n,t),n.options.tightDefinitions&&(0,o.configure)(n,{join:[u]});n.handle=(0,r.zwitch)("type",{invalid:c,unknown:l,handlers:n.handlers});let d=n.handle(e,null,n,{before:"\n",after:"\n"});d&&10!==d.charCodeAt(d.length-1)&&13!==d.charCodeAt(d.length-1)&&(d+="\n");return d};var r=e("zwitch"),o=e("./configure.js"),i=e("./handle/index.js"),s=e("./join.js"),a=e("./unsafe.js");function c(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function l(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function u(e,t){if("definition"===e.type&&e.type===t.type)return 0}},{zwitch:"../node_modules/zwitch/index.js","./configure.js":"../node_modules/mdast-util-to-markdown/lib/configure.js","./handle/index.js":"../node_modules/mdast-util-to-markdown/lib/handle/index.js","./join.js":"../node_modules/mdast-util-to-markdown/lib/join.js","./unsafe.js":"../node_modules/mdast-util-to-markdown/lib/unsafe.js"}],"../node_modules/mdast-util-to-markdown/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"toMarkdown",{enumerable:!0,get:function(){return r.toMarkdown}});var r=e("./lib/index.js")},{"./lib/index.js":"../node_modules/mdast-util-to-markdown/lib/index.js"}],"../node_modules/remark-stringify/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){Object.assign(this,{Compiler:t=>{const n=this.data("settings");return(0,r.toMarkdown)(t,Object.assign({},n,e,{extensions:this.data("toMarkdownExtensions")||[]}))}})};var r=e("mdast-util-to-markdown")},{"mdast-util-to-markdown":"../node_modules/mdast-util-to-markdown/index.js"}],"../node_modules/remark-stringify/index.js":[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=((r=e("./lib/index.js"))&&r.__esModule?r:{default:r}).default;n.default=o},{"./lib/index.js":"../node_modules/remark-stringify/lib/index.js"}],"../node_modules/remark/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remark=void 0;var r=e("unified"),o=s(e("remark-parse")),i=s(e("remark-stringify"));function s(e){return e&&e.__esModule?e:{default:e}}const a=(0,r.unified)().use(o.default).use(i.default).freeze();n.remark=a},{unified:"../node_modules/unified/index.js","remark-parse":"../node_modules/remark-parse/index.js","remark-stringify":"../node_modules/remark-stringify/index.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/config.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=n.ConfigReady=void 0;var r=e("tslib");const o=(0,e("@milkdown/ctx").createTimer)("ConfigReady");n.ConfigReady=o;n.config=(e=>t=>(t.record(o),t=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e(t),t.done(o)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/init.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.init=n.remarkCtx=n.viewCtx=n.remarkPluginsCtx=n.prosePluginsCtx=n.inputRulesCtx=n.editorCtx=n.initTimerCtx=n.InitReady=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("remark"),s=e("./config");const a=(0,o.createTimer)("InitReady");n.InitReady=a;const c=(0,o.createSlice)([],"initTimer");n.initTimerCtx=c;const l=(0,o.createSlice)({},"editor");n.editorCtx=l;const u=(0,o.createSlice)([],"inputRules");n.inputRulesCtx=u;const d=(0,o.createSlice)([],"prosePlugins");n.prosePluginsCtx=d;const f=(0,o.createSlice)([],"remarkPlugins");n.remarkPluginsCtx=f;const p=(0,o.createSlice)([],"nodeView");n.viewCtx=p;const m=(0,o.createSlice)((0,i.remark)(),"remark");n.remarkCtx=m;n.init=(e=>t=>(t.inject(l,e).inject(d).inject(f).inject(u).inject(p).inject(m,(0,i.remark)()).inject(c,[s.ConfigReady]).record(a),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(c),e.done(a)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js",remark:"../node_modules/remark/index.js","./config":"../node_modules/@milkdown/core/lib/internal-plugin/config.js"}],"../node_modules/@milkdown/transformer/lib/utility/stack.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getStackUtil=void 0;var r=e("@milkdown/exception");n.getStackUtil=(()=>{const e=e=>e.elements.length,t=t=>t.elements[e(t)-1];return{size:e,top:t,push:e=>n=>{var r;null===(r=t(e))||void 0===r||r.push(n)},open:e=>t=>{e.elements.push(t)},close:e=>{const t=e.elements.pop();if(!t)throw(0,r.stackOverFlow)();return t}}})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/transformer/lib/utility/types.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"../node_modules/@milkdown/transformer/lib/utility/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./stack");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./types");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))})},{"./stack":"../node_modules/@milkdown/transformer/lib/utility/stack.js","./types":"../node_modules/@milkdown/transformer/lib/utility/types.js"}],"../node_modules/@milkdown/transformer/lib/parser/stack-element.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createElement=void 0;n.createElement=((e,t,n)=>{const r={type:e,content:t,attrs:n,push:(...e)=>((e,t,...n)=>{e.content.push(t,...n)})(r,...e),pop:()=>(e=>e.content.pop())(r)};return r})},{}],"../node_modules/@milkdown/transformer/lib/parser/stack.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createStack=void 0;var r=e("@milkdown/exception"),o=e("@milkdown/prose"),i=e("../utility"),s=e("./stack-element");const{size:a,push:c,top:l,open:u,close:d}=(0,i.getStackUtil)(),f=e=>e.isText,p=e=>(t,n)=>u(e)((0,s.createElement)(t,[],n)),m=e=>(t,n,o)=>{const i=t.createAndFill(n,o,e.marks);if(!i)throw(0,r.createNodeInParserFail)(t,n,o);return c(e)(i),i},h=e=>()=>{e.marks=o.Mark.none;const t=d(e);return m(e)(t.type,t.attrs,t.content)},g=e=>(t,n)=>{const r=t.create(n);e.marks=r.addToSet(e.marks)},v=e=>t=>{e.marks=t.removeFromSet(e.marks)},y=e=>t=>{const n=l(e);if(!n)throw(0,r.stackOverFlow)();const i=n.pop(),s=e.schema.text(t,e.marks);if(!i)return void n.push(s);const a=((e,t,n)=>{if(f(t)&&f(n)&&o.Mark.sameSet(t.marks,n.marks))return e.text(t.text+n.text,t.marks)})(e.schema,i,s);a?n.push(a):n.push(i,s)},b=e=>()=>{let t=null;do{t=h(e)()}while(a(e));return t};n.createStack=(e=>{const t={marks:[],elements:[],schema:e};return{build:b(t),openMark:g(t),closeMark:v(t),addText:y(t),openNode:p(t),addNode:m(t),closeNode:h(t)}})},{"@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","../utility":"../node_modules/@milkdown/transformer/lib/utility/index.js","./stack-element":"../node_modules/@milkdown/transformer/lib/parser/stack-element.js"}],"../node_modules/@milkdown/transformer/lib/parser/state.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.State=void 0;var r,o,i,s=e("tslib"),a=e("@milkdown/exception");n.State=class{constructor(e,t,n){this.stack=e,this.schema=t,this.specMap=n,r.add(this),this.run=((e,t)=>{const n=e.runSync(e.parse(t));return this.next(n),this}),this.next=((e=[])=>([e].flat().forEach(e=>(0,s.__classPrivateFieldGet)(this,r,"m",i).call(this,e)),this)),this.toDoc=(()=>this.stack.build()),this.injectRoot=((e,t,n)=>(this.stack.openNode(t,n),this.next(e.children),this)),this.addText=((e="")=>(this.stack.addText(e),this)),this.addNode=((...e)=>(this.stack.addNode(...e),this)),this.openNode=((...e)=>(this.stack.openNode(...e),this)),this.closeNode=((...e)=>(this.stack.closeNode(...e),this)),this.openMark=((...e)=>(this.stack.openMark(...e),this)),this.closeMark=((...e)=>(this.stack.closeMark(...e),this))}},r=new WeakSet,o=function(e){const t=Object.values(this.specMap).find(t=>t.match(e));if(!t)throw(0,a.parserMatchError)(e);return t},i=function(e){const{key:t,runner:n,is:i}=(0,s.__classPrivateFieldGet)(this,r,"m",o).call(this,e);n(this,e,this.schema["node"===i?"nodes":"marks"][t])}},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/transformer/lib/parser/types.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"../node_modules/@milkdown/transformer/lib/parser/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={createParser:!0};n.createParser=void 0;var o=e("./stack"),i=e("./state"),s=e("./types");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});n.createParser=((e,t,n)=>r=>{const s=new i.State((0,o.createStack)(e),e,t);return s.run(n,r),s.toDoc()})},{"./stack":"../node_modules/@milkdown/transformer/lib/parser/stack.js","./state":"../node_modules/@milkdown/transformer/lib/parser/state.js","./types":"../node_modules/@milkdown/transformer/lib/parser/types.js"}],"../node_modules/@milkdown/transformer/lib/serializer/stack-element.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createElement=void 0;n.createElement=((e,t,n,r={})=>{const o={type:e,children:t,props:r,value:n,push:(...e)=>((e,t,...n)=>{e.children||(e.children=[]),e.children.push(t,...n)})(o,...e),pop:()=>(e=>{var t;return null===(t=e.children)||void 0===t?void 0:t.pop()})(o)};return o})},{}],"../node_modules/@milkdown/transformer/lib/serializer/stack.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createStack=void 0;var r=e("tslib"),o=e("../utility"),i=e("./stack-element");const{size:s,push:a,open:c,close:l}=(0,o.getStackUtil)(),u=e=>(t,n,r)=>c(e)((0,i.createElement)(t,[],n,r)),d=e=>(t,n,o,s)=>{const c=(e=>{const{children:t}=e;return t?(e.children=t.reduce((e,t,n)=>{if(0===n)return[t];const o=e[e.length-1];if(t.isMark&&t.type===o.type){const{children:n}=t,i=(0,r.__rest)(t,["children"]),{children:s}=o,a=(0,r.__rest)(o,["children"]);if(n&&s&&JSON.stringify(i)===JSON.stringify(a)){const t=Object.assign(Object.assign({},a),{children:[...s,...n]});return e.slice(0,-1).concat(t)}}return e.concat(t)},[]),e):e})((e=>{const t=Object.assign(Object.assign({},e.props),{type:e.type});return e.children&&(t.children=e.children),e.value&&(t.value=e.value),t})((0,i.createElement)(t,n,o,s)));return a(e)(c),c},f=e=>()=>{const t=l(e);return d(e)(t.type,t.children,t.value,t.props)},p=e=>(t,n,r,o)=>{t.isInSet(e.marks)||(e.marks=t.addToSet(e.marks),u(e)(n,r,Object.assign(Object.assign({},o),{isMark:!0})))},m=e=>t=>t.isInSet(e.marks)?(e.marks=t.type.removeFromSet(e.marks),f(e)()):null,h=e=>()=>{let t=null;do{t=f(e)()}while(s(e));return t};n.createStack=(()=>{const e={marks:[],elements:[]};return{build:h(e),openMark:p(e),closeMark:m(e),openNode:u(e),addNode:d(e),closeNode:f(e)}})},{tslib:"../node_modules/tslib/tslib.es6.js","../utility":"../node_modules/@milkdown/transformer/lib/utility/index.js","./stack-element":"../node_modules/@milkdown/transformer/lib/serializer/stack-element.js"}],"../node_modules/@milkdown/transformer/lib/serializer/state.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.State=void 0;var r,o,i,s,a,c=e("tslib"),l=e("@milkdown/exception");const u=e=>Object.prototype.hasOwnProperty.call(e,"size");n.State=class{constructor(e,t,n){this.stack=e,this.schema=t,this.specMap=n,r.add(this),this.toString=(e=>e.stringify(this.stack.build())),this.next=(e=>u(e)?(e.forEach(e=>{(0,c.__classPrivateFieldGet)(this,r,"m",a).call(this,e)}),this):((0,c.__classPrivateFieldGet)(this,r,"m",a).call(this,e),this)),this.addNode=((...e)=>(this.stack.addNode(...e),this)),this.openNode=((...e)=>(this.stack.openNode(...e),this)),this.closeNode=((...e)=>(this.stack.closeNode(...e),this)),this.withMark=((...e)=>(this.stack.openMark(...e),this))}run(e){return this.next(e),this}},r=new WeakSet,o=function(e){const t=Object.entries(this.specMap).map(([e,t])=>Object.assign({key:e},t)).find(t=>t.match(e));if(!t)throw(0,l.serializerMatchError)(e.type);return t},i=function(e){const{runner:t}=(0,c.__classPrivateFieldGet)(this,r,"m",o).call(this,e);t(this,e)},s=function(e,t){const{runner:n}=(0,c.__classPrivateFieldGet)(this,r,"m",o).call(this,e);return n(this,e,t)},a=function(e){const{marks:t}=e;t.every(t=>!(0,c.__classPrivateFieldGet)(this,r,"m",s).call(this,t,e))&&(0,c.__classPrivateFieldGet)(this,r,"m",i).call(this,e),t.forEach(e=>this.stack.closeMark(e))}},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js"}],"../node_modules/@milkdown/transformer/lib/serializer/types.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"../node_modules/@milkdown/transformer/lib/serializer/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={createSerializer:!0};n.createSerializer=void 0;var o=e("./stack"),i=e("./state"),s=e("./types");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});n.createSerializer=((e,t,n)=>r=>{const s=new i.State((0,o.createStack)(),e,t);return s.run(r),s.toString(n)})},{"./stack":"../node_modules/@milkdown/transformer/lib/serializer/stack.js","./state":"../node_modules/@milkdown/transformer/lib/serializer/state.js","./types":"../node_modules/@milkdown/transformer/lib/serializer/types.js"}],"../node_modules/@milkdown/transformer/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./parser");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./serializer");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./utility");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))})},{"./parser":"../node_modules/@milkdown/transformer/lib/parser/index.js","./serializer":"../node_modules/@milkdown/transformer/lib/serializer/index.js","./utility":"../node_modules/@milkdown/transformer/lib/utility/index.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/schema.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.schema=n.marksCtx=n.nodesCtx=n.schemaTimerCtx=n.schemaCtx=n.SchemaReady=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/prose"),s=e(".");const a=(0,o.createTimer)("schemaReady");n.SchemaReady=a;const c=(0,o.createSlice)({},"schema");n.schemaCtx=c;const l=(0,o.createSlice)([],"schemaTimer");n.schemaTimerCtx=l;const u=(0,o.createSlice)([],"nodes");n.nodesCtx=u;const d=(0,o.createSlice)([],"marks");n.marksCtx=d;n.schema=(e=>(e.inject(c).inject(u).inject(d).inject(l,[s.InitReady]).record(a),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(l);const t=e.get(s.remarkCtx),n=e.get(s.remarkPluginsCtx).reduce((e,t)=>e.use(t),t);e.set(s.remarkCtx,n);const r=Object.fromEntries(e.get(u)),o=Object.fromEntries(e.get(d));e.set(c,new i.Schema({nodes:r,marks:o})),e.done(a)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js",".":"../node_modules/@milkdown/core/lib/internal-plugin/index.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/parser.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parser=n.ParserReady=n.parserTimerCtx=n.parserCtx=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/transformer"),s=e("."),a=e("./init"),c=e("./schema");const l=(0,o.createSlice)(()=>null,"parser");n.parserCtx=l;const u=(0,o.createSlice)([],"parserTimer");n.parserTimerCtx=u;const d=(0,o.createTimer)("ParserReady");n.ParserReady=d;n.parser=(e=>(e.inject(l).inject(u,[c.SchemaReady]).record(d),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(u);const t=e.get(s.nodesCtx),n=e.get(s.marksCtx),r=e.get(a.remarkCtx),o=e.get(c.schemaCtx),f=[...t.map(([e,t])=>Object.assign({id:e},t)).map(e=>Object.assign(Object.assign({},e),{is:"node"})),...n.map(([e,t])=>Object.assign({id:e},t)).map(e=>Object.assign(Object.assign({},e),{is:"mark"}))],p=Object.fromEntries(f.map(({id:e,parseMarkdown:t,is:n})=>[e,Object.assign(Object.assign({},t),{is:n,key:e})]));e.set(l,(0,i.createParser)(o,p,r)),e.done(d)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/transformer":"../node_modules/@milkdown/transformer/lib/index.js",".":"../node_modules/@milkdown/core/lib/internal-plugin/index.js","./init":"../node_modules/@milkdown/core/lib/internal-plugin/init.js","./schema":"../node_modules/@milkdown/core/lib/internal-plugin/schema.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/serializer.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serializer=n.SerializerReady=n.serializerTimerCtx=n.serializerCtx=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/transformer"),s=e("./init"),a=e("./schema");const c=(0,o.createSlice)(()=>"","serializer");n.serializerCtx=c;const l=(0,o.createSlice)([],"serializerTimer");n.serializerTimerCtx=l;const u=(0,o.createTimer)("SerializerReady");n.SerializerReady=u;n.serializer=(e=>(e.inject(c).inject(l,[a.SchemaReady]).record(u),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(l);const t=e.get(a.nodesCtx),n=e.get(a.marksCtx),r=e.get(s.remarkCtx),o=e.get(a.schemaCtx),d=[...t,...n],f=Object.fromEntries(d.map(([e,t])=>[e,t.toMarkdown]));e.set(c,(0,i.createSerializer)(o,f,r)),e.done(u)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/transformer":"../node_modules/@milkdown/transformer/lib/index.js","./init":"../node_modules/@milkdown/core/lib/internal-plugin/init.js","./schema":"../node_modules/@milkdown/core/lib/internal-plugin/schema.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/editor-state.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.editorState=n.EditorStateReady=n.editorStateTimerCtx=n.editorStateOptionsCtx=n.editorStateCtx=n.defaultValueCtx=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/exception"),s=e("@milkdown/prose"),a=e("."),c=e("./init"),l=e("./parser"),u=e("./schema"),d=e("./serializer");const f=(0,o.createSlice)("","defaultValue");n.defaultValueCtx=f;const p=(0,o.createSlice)({},"editorState");n.editorStateCtx=p;const m=(0,o.createSlice)({},"stateOptions");n.editorStateOptionsCtx=m;const h=(0,o.createSlice)([],"editorStateTimer");n.editorStateTimerCtx=h;const g=(0,o.createTimer)("EditorStateReady");n.EditorStateReady=g;n.editorState=(e=>(e.inject(f).inject(p).inject(m).inject(h,[l.ParserReady,d.SerializerReady,a.CommandsReady]).record(g),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(h);const t=e.get(u.schemaCtx),n=e.get(l.parserCtx),r=e.get(c.inputRulesCtx),o=e.get(m),a=e.get(c.prosePluginsCtx),d=((e,t,n)=>{if("string"==typeof e)return t(e);if("html"===e.type)return s.DOMParser.fromSchema(n).parse(e.dom);if("json"===e.type)return s.Node.fromJSON(n,e.value);throw(0,i.docTypeError)(e)})(e.get(f),n,t),v=s.EditorState.create(Object.assign({schema:t,doc:d,plugins:[...a,(0,s.keymap)(s.baseKeymap),(0,s.inputRules)({rules:r})]},o));e.set(p,v),e.done(g)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js",".":"../node_modules/@milkdown/core/lib/internal-plugin/index.js","./init":"../node_modules/@milkdown/core/lib/internal-plugin/init.js","./parser":"../node_modules/@milkdown/core/lib/internal-plugin/parser.js","./schema":"../node_modules/@milkdown/core/lib/internal-plugin/schema.js","./serializer":"../node_modules/@milkdown/core/lib/internal-plugin/serializer.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/editor-view.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.editorView=n.EditorViewReady=n.editorViewTimerCtx=n.rootCtx=n.editorViewOptionsCtx=n.editorViewCtx=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/prose"),s=e("./editor-state"),a=e("./init");const c=(0,o.createSlice)({},"editorView");n.editorViewCtx=c;const l=(0,o.createSlice)({},"editorViewOptions");n.editorViewOptionsCtx=l;const u=(0,o.createSlice)(document.body,"root");n.rootCtx=u;const d=(0,o.createSlice)([],"editorViewTimer");n.editorViewTimerCtx=d;const f=(0,o.createTimer)("EditorViewReady");n.EditorViewReady=f;n.editorView=(e=>(e.inject(u,document.body).inject(c).inject(l).inject(d,[s.EditorStateReady]).record(f),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(d);const t=e.get(s.editorStateCtx),n=e.get(l),r=Object.fromEntries(e.get(a.viewCtx)),o=e.get(u),p=o?(e=>{const t=document.createElement("div");return t.className="milkdown",e.appendChild(t),t})(o):void 0,m=new i.EditorView(p,Object.assign({state:t,nodeViews:r},n));var h;(h=m.dom).classList.add("editor"),h.setAttribute("role","textbox"),e.set(c,m),e.done(f)})))},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","./editor-state":"../node_modules/@milkdown/core/lib/internal-plugin/editor-state.js","./init":"../node_modules/@milkdown/core/lib/internal-plugin/init.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/commands.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.commands=n.CommandsReady=n.commandsTimerCtx=n.createCmdKey=n.commandsCtx=n.createCmd=void 0;var r=e("tslib"),o=e("@milkdown/ctx"),i=e("@milkdown/exception"),s=e("./editor-view"),a=e("./schema");n.createCmd=((e,t)=>[e,t]);const c=(0,o.createSlice)({},"commands");n.commandsCtx=c;n.createCmdKey=(()=>(0,o.createSlice)(()=>()=>!1,"cmdKey"));const l=(0,o.createSlice)([],"commandsTimer");n.commandsTimerCtx=l;const u=(0,o.createTimer)("CommandsReady");n.CommandsReady=u;n.commands=(e=>{const t=(0,o.createContainer)(),n={create:(e,n)=>e(t.sliceMap,n),get:e=>t.getSlice(e).get(),call:()=>{throw(0,i.callCommandBeforeEditorView)()}};return e.inject(c,n).inject(l,[a.SchemaReady]).record(u),e=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield e.waitTimers(l),e.done(u),yield e.wait(s.EditorViewReady),e.update(c,t=>Object.assign(Object.assign({},t),{call:(t,r)=>{const o=n.get(t)(r),i=e.get(s.editorViewCtx);return o(i.state,i.dispatch,i)}}))})})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js","./editor-view":"../node_modules/@milkdown/core/lib/internal-plugin/editor-view.js","./schema":"../node_modules/@milkdown/core/lib/internal-plugin/schema.js"}],"../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StyleSheet=void 0;var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0!==e.speedy&&e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1],n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);if(n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n,this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(t){/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this._alreadyInsertedOrderInsensitiveRule=!1},e}();n.StyleSheet=r},{}],"../node_modules/stylis/dist/stylis.mjs":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.alloc=B,n.append=_,n.caret=F,n.char=A,n.charat=b,n.combine=j,n.comment=Z,n.commenter=J,n.compile=function(e){return q(Q("",null,null,null,[""],e=B(e),0,[0],e))},n.copy=N,n.dealloc=q,n.declaration=X,n.delimit=$,n.delimiter=K,n.escaping=H,n.hash=m,n.identifier=G,n.indexof=y,n.match=g,n.middleware=function(e){var t=x(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}},n.namespace=function(e){switch(e.type){case a:e.props=e.props.map(function(t){return j(V(t),function(t,n,r){switch(b(t,0)){case 12:return k(t,1,w(t));case 0:case 40:case 43:case 62:case 126:return t;case 58:"global"===r[++n]&&(r[n]="",r[++n]="\f"+k(r[n],n=1,-1));case 32:return 1===n?"":t;default:switch(n){case 0:return e=t,x(r)>1?"":t;case n=x(r)-1:case 2:return 2===n?t+e+e:t+e;default:return t}}})})}},n.next=D,n.node=T,n.parse=Q,n.peek=R,n.prefix=ee,n.prefixer=function(e,t,n,s){if(e.length>-1&&!e.return)switch(e.type){case c:e.return=ee(e.value,e.length);break;case u:return te([N(e,{value:v(e.value,"@","@"+i)})],s);case a:if(e.length)return j(e.props,function(t){switch(g(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return te([N(e,{props:[v(t,/:(read-\w+)/,":"+o+"$1")]})],s);case"::placeholder":return te([N(e,{props:[v(t,/:(plac\w+)/,":"+i+"input-$1")]}),N(e,{props:[v(t,/:(plac\w+)/,":"+o+"$1")]}),N(e,{props:[v(t,/:(plac\w+)/,r+"input-$1")]})],s)}return""})}},n.prev=I,n.replace=v,n.ruleset=Y,n.rulesheet=function(e){return function(t){t.root||(t=t.return)&&e(t)}},n.serialize=te,n.sizeof=x,n.slice=z,n.stringify=function(e,t,n,r){switch(e.type){case l:case c:return e.return=e.return||e.value;case s:return"";case u:return e.return=e.value+"{"+te(e.children,r)+"}";case a:e.value=e.props.join(",")}return w(n=te(e.children,r))?e.return=e.value+"{"+n+"}":""},n.strlen=w,n.substr=k,n.token=L,n.tokenize=V,n.tokenizer=W,n.trim=h,n.whitespace=U,n.position=n.line=n.length=n.from=n.column=n.characters=n.character=n.assign=n.abs=n.WEBKIT=n.VIEWPORT=n.SUPPORTS=n.RULESET=n.PAGE=n.NAMESPACE=n.MS=n.MOZ=n.MEDIA=n.KEYFRAMES=n.IMPORT=n.FONT_FEATURE_VALUES=n.FONT_FACE=n.DOCUMENT=n.DECLARATION=n.COUNTER_STYLE=n.COMMENT=n.CHARSET=void 0;var r="-ms-";n.MS=r;var o="-moz-";n.MOZ=o;var i="-webkit-";n.WEBKIT=i;var s="comm";n.COMMENT=s;var a="rule";n.RULESET=a;var c="decl";n.DECLARATION=c;n.PAGE="@page";n.MEDIA="@media";var l="@import";n.IMPORT=l;n.CHARSET="@charset";n.VIEWPORT="@viewport";n.SUPPORTS="@supports";n.DOCUMENT="@document";n.NAMESPACE="@namespace";var u="@keyframes";n.KEYFRAMES=u;n.FONT_FACE="@font-face";n.COUNTER_STYLE="@counter-style";n.FONT_FEATURE_VALUES="@font-feature-values";var d=Math.abs;n.abs=d;var f=String.fromCharCode;n.from=f;var p=Object.assign;function m(e,t){return(((t<<2^b(e,0))<<2^b(e,1))<<2^b(e,2))<<2^b(e,3)}function h(e){return e.trim()}function g(e,t){return(e=t.exec(e))?e[0]:e}function v(e,t,n){return e.replace(t,n)}function y(e,t){return e.indexOf(t)}function b(e,t){return 0|e.charCodeAt(t)}function k(e,t,n){return e.slice(t,n)}function w(e){return e.length}function x(e){return e.length}function _(e,t){return t.push(e),e}function j(e,t){return e.map(t).join("")}n.assign=p;var S=1;n.line=S;var O=1;n.column=O;var M=0;n.length=M;var C=0;n.position=C;var E=0;n.character=E;var P="";function T(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:S,column:O,length:s,return:""}}function N(e,t){return p({},e,{length:-e.length},t)}function A(){return E}function I(){var e,t;return n.character=E=C>0?b(P,n.position=C=+C-1):0,e=+O,n.column=O=e-1,10===E&&(n.column=O=1,t=+S,n.line=S=t-1),E}function D(){var e,t,r;return n.character=E=C<M?b(P,(e=+C,n.position=C=e+1,e)):0,t=+O,n.column=O=t+1,10===E&&(n.column=O=1,r=+S,n.line=S=r+1),E}function R(){return b(P,C)}function F(){return C}function z(e,t){return k(P,e,t)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function B(e){return n.line=S=n.column=O=1,n.length=M=w(n.characters=P=e),n.position=C=0,[]}function q(e){return n.characters=P="",e}function $(e){return h(z(C-1,K(91===e?e+2:40===e?e+1:e)))}function V(e){return q(W(B(e)))}function U(e){for(;(n.character=E=R())&&E<33;)D();return L(e)>2||L(E)>3?"":" "}function W(e){for(;D();)switch(L(E)){case 0:_(G(C-1),e);break;case 2:_($(E),e);break;default:_(f(E),e)}return e}function H(e,t){for(;--t&&D()&&!(E<48||E>102||E>57&&E<65||E>70&&E<97););return z(e,F()+(t<6&&32==R()&&32==D()))}function K(e){for(;D();)switch(E){case e:return C;case 34:case 39:34!==e&&39!==e&&K(E);break;case 40:41===e&&K(e);break;case 92:D()}return C}function J(e,t){for(;D()&&e+E!==57&&(e+E!==84||47!==R()););return"/*"+z(t,C-1)+"*"+f(47===e?e:D())}function G(e){for(;!L(R());)D();return z(e,C)}function Q(e,t,n,r,o,i,s,a,c){for(var l=0,u=0,d=s,p=0,m=0,h=0,g=1,b=1,k=1,x=0,j="",S=o,O=i,M=r,C=j;b;)switch(h=x,x=D()){case 40:if(108!=h&&58==C.charCodeAt(d-1)){-1!=y(C+=v($(x),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:C+=$(x);break;case 9:case 10:case 13:case 32:C+=U(h);break;case 92:C+=H(F()-1,7);continue;case 47:switch(R()){case 42:case 47:_(Z(J(D(),F()),t,n),c);break;default:C+="/"}break;case 123*g:a[l++]=w(C)*k;case 125*g:case 59:case 0:switch(x){case 0:case 125:b=0;case 59+u:m>0&&w(C)-d&&_(m>32?X(C+";",r,n,d-1):X(v(C," ","")+";",r,n,d-2),c);break;case 59:C+=";";default:if(_(M=Y(C,t,n,l,u,o,a,j,S=[],O=[],d),i),123===x)if(0===u)Q(C,t,M,M,S,i,d,a,O);else switch(p){case 100:case 109:case 115:Q(e,M,M,r&&_(Y(e,M,M,0,0,o,a,j,o,S=[],d),O),o,O,d,a,r?S:O);break;default:Q(C,M,M,M,[""],O,0,a,O)}}l=u=m=0,g=k=1,j=C="",d=s;break;case 58:d=1+w(C),m=h;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==I())continue;switch(C+=f(x),x*g){case 38:k=u>0?1:(C+="\f",-1);break;case 44:a[l++]=(w(C)-1)*k,k=1;break;case 64:45===R()&&(C+=$(D())),p=R(),u=d=w(j=C+=G(F())),x++;break;case 45:45===h&&2==w(C)&&(g=0)}}return i}function Y(e,t,n,r,o,i,s,c,l,u,f){for(var p=o-1,m=0===o?i:[""],g=x(m),y=0,b=0,w=0;y<r;++y)for(var _=0,j=k(e,p+1,p=d(b=s[y])),S=e;_<g;++_)(S=h(b>0?m[_]+" "+j:v(j,/&\f/g,m[_])))&&(l[w++]=S);return T(e,t,n,0===o?a:c,l,u,f)}function Z(e,t,n){return T(e,t,n,s,f(A()),k(e,2,-2),0)}function X(e,t,n,r){return T(e,t,n,c,k(e,0,r),k(e,r+1,-1),r)}function ee(e,t){switch(m(e,t)){case 5103:return i+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return i+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return i+e+o+e+r+e+e;case 6828:case 4268:return i+e+r+e+e;case 6165:return i+e+r+"flex-"+e+e;case 5187:return i+e+v(e,/(\w+).+(:[^]+)/,i+"box-$1$2"+r+"flex-$1$2")+e;case 5443:return i+e+r+"flex-item-"+v(e,/flex-|-self/,"")+e;case 4675:return i+e+r+"flex-line-pack"+v(e,/align-content|flex-|-self/,"")+e;case 5548:return i+e+r+v(e,"shrink","negative")+e;case 5292:return i+e+r+v(e,"basis","preferred-size")+e;case 6060:return i+"box-"+v(e,"-grow","")+i+e+r+v(e,"grow","positive")+e;case 4554:return i+v(e,/([^-])(transform)/g,"$1"+i+"$2")+e;case 6187:return v(v(v(e,/(zoom-|grab)/,i+"$1"),/(image-set)/,i+"$1"),e,"")+e;case 5495:case 3959:return v(e,/(image-set\([^]*)/,i+"$1$`$1");case 4968:return v(v(e,/(.+:)(flex-)?(.*)/,i+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+i+e+e;case 4095:case 3583:case 4068:case 2532:return v(e,/(.+)-inline(.+)/,i+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(w(e)-1-t>6)switch(b(e,t+1)){case 109:if(45!==b(e,t+4))break;case 102:return v(e,/(.+:)(.+)-([^]+)/,"$1"+i+"$2-$3$1"+o+(108==b(e,t+3)?"$3":"$2-$3"))+e;case 115:return~y(e,"stretch")?ee(v(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==b(e,t+1))break;case 6444:switch(b(e,w(e)-3-(~y(e,"!important")&&10))){case 107:return v(e,":",":"+i)+e;case 101:return v(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+i+(45===b(e,14)?"inline-":"")+"box$3$1"+i+"$2$3$1"+r+"$2box$3")+e}break;case 5936:switch(b(e,t+11)){case 114:return i+e+r+v(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return i+e+r+v(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return i+e+r+v(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return i+e+r+e+e}return e}function te(e,t){for(var n="",r=x(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}n.characters=P},{}],"../node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};n.default=r},{}],"../node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}};n.default=r},{}],"../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@emotion/sheet"),o=e("stylis");e("@emotion/weak-memoize"),e("@emotion/memoize");var i=function(e,t,n){for(var r=0,i=0;r=i,i=(0,o.peek)(),38===r&&12===i&&(t[n]=1),!(0,o.token)(i);)(0,o.next)();return(0,o.slice)(e,o.position)},s=function(e,t){return(0,o.dealloc)(function(e,t){var n=-1,r=44;do{switch((0,o.token)(r)){case 0:38===r&&12===(0,o.peek)()&&(t[n]=1),e[n]+=i(o.position-1,t,n);break;case 2:e[n]+=(0,o.delimit)(r);break;case 4:if(44===r){e[++n]=58===(0,o.peek)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,o.from)(r)}}while(r=(0,o.next)());return e}((0,o.alloc)(e),t))},a=new WeakMap,c=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||a.get(n))&&!r){a.set(e,!0);for(var o=[],i=s(t,o),c=n.props,l=0,u=0;l<i.length;l++)for(var d=0;d<c.length;d++,u++)e.props[u]=o[l]?i[l].replace(/&\f/g,c[d]):c[d]+" "+i[l]}}},l=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},u=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},d=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},f=function(e,t,n){u(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),d(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!u(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),d(e)))},p=[o.prefixer],m=function(e){var t=e.key;if(!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i=e.stylisPlugins||p;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var s,a,u={},d=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)u[t[n]]=!0;d.push(e)});var m=[c,l];m.push(function(e){return function(t,n,r){if("rule"===t.type){var o,i=t.value.match(/(:first|:nth|:nth-last)-child/g);if(i&&!0!==e.compat){var s=n>0?r[n-1]:null;if(s&&function(e){return!!e&&"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1}((o=s.children).length?o[o.length-1]:null))return;i.forEach(function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')})}}}}({get compat(){return y.compat}}),f);var h,g=[o.stringify,function(e){e.root||(e.return?h.insert(e.return):e.value&&e.type!==o.COMMENT&&h.insert(e.value+"{}"))}],v=(0,o.middleware)(m.concat(i,g));a=function(e,t,n,r){var i;h=n,void 0!==t.map&&(h={insert:function(e){n.insert(e+t.map)}}),i=e?e+"{"+t.styles+"}":t.styles,(0,o.serialize)((0,o.compile)(i),v),r&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new r.StyleSheet({key:t,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:u,registered:{},insert:a};return y.sheet.hydrate(d),y};n.default=m},{"@emotion/sheet":"../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js",stylis:"../node_modules/stylis/dist/stylis.mjs","@emotion/weak-memoize":"../node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js","@emotion/memoize":"../node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js"}],"../node_modules/@emotion/hash/dist/hash.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};n.default=r},{}],"../node_modules/@emotion/unitless/dist/unitless.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};n.default=r},{}],"../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serializeStyles=void 0;var r=s(e("@emotion/hash")),o=s(e("@emotion/unitless")),i=s(e("@emotion/memoize"));function s(e){return e&&e.__esModule?e:{default:e}}var a="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",c="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",l=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,d=function(e){return 45===e.charCodeAt(1)},f=function(e){return null!=e&&"boolean"!=typeof e},p=(0,i.default)(function(e){return d(e)?e:e.replace(l,"-$&").toLowerCase()}),m=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(u,function(e,t,n){return _={name:t,styles:n,next:_},t})}return 1===o.default[e]||d(e)||"number"!=typeof t||0===t?t:t+"px"},h=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,g=["normal","none","initial","inherit","unset"],v=m,y=/^-ms-/,b=/-(.)/g,k={};function w(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles){if("NO_COMPONENT_SELECTOR"===n.toString())throw new Error("Component selectors can only be used in conjunction with @emotion/babel-plugin.");return n}switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return _={name:n.name,styles:n.styles,next:_},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_={name:r.name,styles:r.styles,next:_},r=r.next;var o=n.styles+";";return void 0!==n.map&&(o+=n.map),o}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=w(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":f(s)&&(r+=p(i)+":"+m(i,s)+";");else{if("NO_COMPONENT_SELECTOR"===i)throw new Error("Component selectors can only be used in conjunction with @emotion/babel-plugin.");if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=w(e,t,s);switch(i){case"animation":case"animationName":r+=p(i)+":"+a+";";break;default:"undefined"===i&&console.error(c),r+=i+"{"+a+"}"}}else for(var l=0;l<s.length;l++)f(s[l])&&(r+=p(i)+":"+m(i,s[l])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var i=_,s=n(e);return _=i,w(e,t,s)}console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":var a=[],l=n.replace(u,function(e,t,n){var r="animation"+a.length;return a.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"});a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+l+"`")}if(null==t)return n;var d=t[n];return void 0!==d?d:n}m=function(e,t){if("content"===e&&("string"!=typeof t||-1===g.indexOf(t)&&!h.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=v(e,t);return""===n||d(e)||-1===e.indexOf("-")||void 0!==k[e]||(k[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(y,"ms-").replace(b,function(e,t){return t.toUpperCase()})+"?")),n};var x,_,j=/label:\s*([^\s;\n{]+)\s*(;|$)/g;x=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;n.serializeStyles=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,i="";_=void 0;var s,c=e[0];null==c||void 0===c.raw?(o=!1,i+=w(n,t,c)):(void 0===c[0]&&console.error(a),i+=c[0]);for(var l=1;l<e.length;l++)i+=w(n,t,e[l]),o&&(void 0===c[l]&&console.error(a),i+=c[l]);i=i.replace(x,function(e){return s=e,""}),j.lastIndex=0;for(var u,d="";null!==(u=j.exec(i));)d+="-"+u[1];var f=(0,r.default)(i)+d;return{name:f,styles:i,map:s,next:_,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}}},{"@emotion/hash":"../node_modules/@emotion/hash/dist/hash.browser.esm.js","@emotion/unitless":"../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","@emotion/memoize":"../node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js"}],"../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRegisteredStyles=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "}),r},n.insertStyles=void 0;n.insertStyles=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},{}],"../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=e("@emotion/cache"))&&r.__esModule?r:{default:r},i=e("@emotion/serialize"),s=e("@emotion/utils");function a(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function c(e,t,n){var r=[],o=(0,s.getRegisteredStyles)(e,r,n);return r.length<2?n:o+t(r)}var l=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},u=function(e){var t=(0,o.default)(e);t.sheet.speedy=function(e){if(0!==this.ctr)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=(0,i.serializeStyles)(n,t.registered,void 0);return(0,s.insertStyles)(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return c(t.registered,n,l(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=(0,i.serializeStyles)(n,t.registered);a(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=(0,i.serializeStyles)(n,t.registered),s="animation-"+o.name;return a(t,{name:o.name,styles:"@keyframes "+s+"{"+o.styles+"}"}),s},hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:s.getRegisteredStyles.bind(null,t.registered),merge:c.bind(null,t.registered,n)}};n.default=u},{"@emotion/cache":"../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","@emotion/serialize":"../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","@emotion/utils":"../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js"}],"../node_modules/@emotion/css/dist/emotion-css.esm.js":[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.sheet=n.merge=n.keyframes=n.injectGlobal=n.hydrate=n.getRegisteredStyles=n.flush=n.cx=n.css=n.cache=void 0,e("@emotion/cache"),e("@emotion/serialize"),e("@emotion/utils");var o=(0,((r=e("../create-instance/dist/emotion-css-create-instance.esm.js"))&&r.__esModule?r:{default:r}).default)({key:"css"}),i=o.flush,s=o.hydrate,a=o.cx,c=o.merge,l=o.getRegisteredStyles,u=o.injectGlobal,d=o.keyframes,f=o.css,p=o.sheet,m=o.cache;n.cache=m,n.sheet=p,n.css=f,n.keyframes=d,n.injectGlobal=u,n.getRegisteredStyles=l,n.merge=c,n.cx=a,n.hydrate=s,n.flush=i},{"@emotion/cache":"../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","@emotion/serialize":"../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","@emotion/utils":"../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../create-instance/dist/emotion-css-create-instance.esm.js":"../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js"}],"../node_modules/@milkdown/design-system/lib/default-value.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.slots=n.mixin=n.size=n.font=void 0;n.font={typography:"",code:""};n.size={radius:"0",lineWidth:"1px"};n.mixin={scrollbar:()=>"",shadow:()=>"",border:()=>""};const r={icon:e=>{const t=document.createElement("div");return t.className="milkdown-icon",t.textContent=e,t}};n.slots=r},{}],"../node_modules/@milkdown/design-system/lib/transformer.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.obj2color=n.obj2var=n.themeColor=void 0;const r=e=>{if(e.startsWith("rgba"))return e.slice(5,-1).split(",").slice(0,-1).join(",");if(e.startsWith("rgb"))return e.slice(4,-1);const t=(e=>{const t=e.slice(1).replace(/^([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,r)=>t+t+n+n+r+r),[n,r,o,i]=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i)||[];return n?[r,o,i].map(e=>parseInt(e,16)):null})(e);return t?t.join(", "):(console.warn(`Invalid hex: ${e}`),e)};n.themeColor=r;const o=(e={},t=(e=>`${e}`))=>Object.entries(e).map(([e,n])=>`--${e}: ${t(n)};`).join("\n");n.obj2var=o;n.obj2color=((e={})=>o(e,r))},{}],"../node_modules/@milkdown/design-system/lib/index.js":[function(e,t,n){arguments[3];Object.defineProperty(n,"__esModule",{value:!0}),n.pack2Tool=n.injectVar=void 0;var r=e("@emotion/css"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(e("./default-value")),i=e("./transformer");function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}n.injectVar=(e=>{const{color:t={},font:n,size:o={}}=e;r.injectGlobal`
                        :root {
                            ${(0,i.obj2color)(t)};
                            ${(0,i.obj2var)(n,e=>e.join(", "))};
                            ${(0,i.obj2var)(o)};
                        }
                    `});n.pack2Tool=(e=>{const{font:t,size:n={},mixin:r,slots:i,global:s}=e,a=(e={})=>Object.fromEntries(Object.keys(e).map(e=>[e,`var(--${e})`])),c={palette:(e,t=1)=>`rgba(var(--${e}), ${t})`,size:Object.assign(Object.assign({},o.size),a(n)),font:Object.assign(Object.assign({},o.font),a(t))},l=Object.assign(Object.assign({},o.mixin),null==r?void 0:r(c)),u=Object.assign(Object.assign({},c),{mixin:l}),d=Object.assign(Object.assign({},o.slots),null==i?void 0:i(u)),f=Object.assign(Object.assign({},u),{slots:d});return null==s||s(f),f})},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","./default-value":"../node_modules/@milkdown/design-system/lib/default-value.js","./transformer":"../node_modules/@milkdown/design-system/lib/transformer.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/theme.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.themeFactory=n.themeToolCtx=void 0;var r=e("@milkdown/ctx"),o=e("@milkdown/design-system");const i=(0,r.createSlice)({mixin:{},font:{},size:{},slots:{},palette:()=>""},"ThemeTool");n.themeToolCtx=i;n.themeFactory=(e=>t=>(t.inject(i),t=>{(0,o.injectVar)(e);const n=(0,o.pack2Tool)(e);t.set(i,n)}))},{"@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/design-system":"../node_modules/@milkdown/design-system/lib/index.js"}],"../node_modules/@milkdown/core/lib/internal-plugin/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./commands");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./config");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./editor-state");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./editor-view");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("./init");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))});var c=e("./parser");Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))});var l=e("./schema");Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===l[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return l[e]}}))});var u=e("./serializer");Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===u[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}}))});var d=e("./theme");Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===d[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return d[e]}}))})},{"./commands":"../node_modules/@milkdown/core/lib/internal-plugin/commands.js","./config":"../node_modules/@milkdown/core/lib/internal-plugin/config.js","./editor-state":"../node_modules/@milkdown/core/lib/internal-plugin/editor-state.js","./editor-view":"../node_modules/@milkdown/core/lib/internal-plugin/editor-view.js","./init":"../node_modules/@milkdown/core/lib/internal-plugin/init.js","./parser":"../node_modules/@milkdown/core/lib/internal-plugin/parser.js","./schema":"../node_modules/@milkdown/core/lib/internal-plugin/schema.js","./serializer":"../node_modules/@milkdown/core/lib/internal-plugin/serializer.js","./theme":"../node_modules/@milkdown/core/lib/internal-plugin/theme.js"}],"../node_modules/@milkdown/core/lib/editor/editor.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Editor=void 0;var r,o,i,s,a,c,l,u=e("tslib"),d=e("@milkdown/ctx"),f=e("../internal-plugin");class p{constructor(){r.set(this,(0,d.createContainer)()),o.set(this,(0,d.createClock)()),i.set(this,new Set),s.set(this,[]),a.set(this,new d.Ctx((0,u.__classPrivateFieldGet)(this,r,"f"),(0,u.__classPrivateFieldGet)(this,o,"f"))),c.set(this,new d.Pre((0,u.__classPrivateFieldGet)(this,r,"f"),(0,u.__classPrivateFieldGet)(this,o,"f"))),l.set(this,()=>{const e=[f.schema,f.parser,f.serializer,f.commands,f.editorState,f.editorView],t=(0,f.config)(e=>(0,u.__awaiter)(this,void 0,void 0,function*(){yield Promise.all((0,u.__classPrivateFieldGet)(this,s,"f").map(t=>t(e)))}));this.use(e.concat((0,f.init)(this)).concat(t))}),this.use=(e=>([e].flat().forEach(e=>{(0,u.__classPrivateFieldGet)(this,i,"f").add(e((0,u.__classPrivateFieldGet)(this,c,"f")))}),this)),this.config=(e=>((0,u.__classPrivateFieldGet)(this,s,"f").push(e),this)),this.create=(()=>(0,u.__awaiter)(this,void 0,void 0,function*(){return(0,u.__classPrivateFieldGet)(this,l,"f").call(this),yield Promise.all([...(0,u.__classPrivateFieldGet)(this,i,"f")].map(e=>e((0,u.__classPrivateFieldGet)(this,a,"f")))),this})),this.action=(e=>e((0,u.__classPrivateFieldGet)(this,a,"f")))}static make(){return new p}}n.Editor=p,r=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","../internal-plugin":"../node_modules/@milkdown/core/lib/internal-plugin/index.js"}],"../node_modules/@milkdown/core/lib/editor/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./editor");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))})},{"./editor":"../node_modules/@milkdown/core/lib/editor/editor.js"}],"../node_modules/@milkdown/core/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./editor");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./internal-plugin");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("@milkdown/ctx");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("@milkdown/transformer");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))})},{"./editor":"../node_modules/@milkdown/core/lib/editor/index.js","./internal-plugin":"../node_modules/@milkdown/core/lib/internal-plugin/index.js","@milkdown/ctx":"../node_modules/@milkdown/ctx/lib/index.js","@milkdown/transformer":"../node_modules/@milkdown/transformer/lib/index.js"}],"../node_modules/@milkdown/theme-nord/lib/font.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.code=n.typography=void 0;n.typography=["Roboto","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue","Helvetica","Arial","Lucida Grande","sans-serif"];n.code=["Consolas","Monaco","Andale Mono","Ubuntu Mono","monospace"]},{}],"../node_modules/@milkdown/theme-nord/lib/mixin.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mixin=void 0;var r=e("@emotion/css");n.mixin=(({palette:e,size:t})=>({scrollbar:(t="y")=>r.css`
                        scrollbar-width: thin;
                        scrollbar-color: ${e("secondary",.38)} ${e("secondary",.12)};
                        -webkit-overflow-scrolling: touch;

                    &::-webkit-scrollbar {
                            ${"y"===t?"width":"height"}: 4px;
                            padding: 0 2px;
                            background: ${e("surface")};
                        }

                        &::-webkit-scrollbar-track {
                            border-radius: 4px;
                            background: ${e("secondary",.12)};
                        }

                        &::-webkit-scrollbar-thumb {
                            border-radius: 4px;
                            background: ${e("secondary",.38)};
                        }

                        &::-webkit-scrollbar-thumb:hover {
                            background: ${e("secondary")};
                        }
                    `,shadow:()=>{const{lineWidth:n}=t;return r.css`
                            box-shadow: 0px ${n} ${n} ${e("shadow",.14)},
                                0px 2px ${n} ${e("shadow",.12)}, 0px ${n} 3px ${e("shadow",.2)};
                        `},border:n=>n?r.css`
                            ${`border-${n}`}: ${t.lineWidth} solid ${e("line")};
                        `:r.css`
                                border: ${t.lineWidth} solid ${e("line")};
                            `}))},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js"}],"../node_modules/@milkdown/theme-nord/lib/nord.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.color=n.darkColor=n.lightColor=n.Nord=void 0;const r={nord0:"#2e3440",nord1:"#3b4252",nord2:"#434c5e",nord3:"#4c566a",nord4:"#d8dee9",nord5:"#e5e9f0",nord6:"#eceff4",nord7:"#8fbcbb",nord8:"#88c0d0",nord9:"#81a1c1",nord10:"#5e81ac",nord11:"#bf616a",nord12:"#d08770",nord13:"#ebcb8b",nord14:"#a3be8c",nord15:"#b48ead"};n.Nord=r;const o={shadow:r.nord1,primary:r.nord10,secondary:r.nord9,neutral:r.nord0,solid:r.nord3,line:r.nord4,background:r.nord6,surface:"#fff"};n.lightColor=o;const i={shadow:r.nord1,primary:r.nord10,secondary:r.nord9,neutral:r.nord6,solid:r.nord4,line:r.nord2,background:"#252932",surface:r.nord0};n.darkColor=i;const s={lightColor:o,darkColor:i};n.color=s},{}],"../node_modules/@milkdown/theme-nord/lib/override.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.override=void 0;var r=e("@emotion/css");n.override=(({palette:e,mixin:t,size:n,font:o})=>{var i,s;return r.css`
                    .milkdown {
                        color: ${e("neutral",.87)};
                        background: ${e("surface")};

                        position: relative;
                        font-family: ${o.typography};
                        margin-left: auto;
                        margin-right: auto;
                        ${null===(i=t.shadow)||void 0===i?void 0:i.call(t)};
                        box-sizing: border-box;

                        .editor {
                            padding: 3.125rem 1.25rem;
                            outline: none;
                            & > * {
                                margin: 1.875rem 0;
                            }

                            @media only screen and (min-width: 72rem) {
                                max-width: 57.375rem;
                                padding: 3.125rem 7.25rem;
                            }
                        }

                        .ProseMirror-selectednode {
                            outline: ${n.lineWidth} solid ${e("line")};
                        }

                        li.ProseMirror-selectednode {
                            outline: none;
                        }

                        li.ProseMirror-selectednode::after {
                            ${null===(s=t.border)||void 0===s?void 0:s.call(t)};
                        }

                        & ::selection {
                            background: ${e("secondary",.38)};
                        }
                    }
                `})},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js"}],"../node_modules/@milkdown/theme-nord/lib/slots.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.slots=void 0;const r={h1:"looks_one",h2:"looks_two",h3:"looks_3",loading:"hourglass_empty",quote:"format_quote",code:"code",table:"table_chart",divider:"horizontal_rule",image:"image",brokenImage:"broken_image",bulletList:"format_list_bulleted",orderedList:"format_list_numbered",taskList:"checklist",bold:"format_bold",italic:"format_italic",inlineCode:"code",strikeThrough:"strikethrough_s",link:"link",leftArrow:"chevron_left",rightArrow:"chevron_right",upArrow:"expand_less",downArrow:"expand_more",alignLeft:"format_align_left",alignRight:"format_align_right",alignCenter:"format_align_center",delete:"delete",select:"select_all",unchecked:"check_box_outline_blank",checked:"check_box",undo:"turn_left",redo:"turn_right",liftList:"format_indent_decrease",sinkList:"format_indent_increase"};n.slots=(()=>({icon:e=>{const t=document.createElement("span");return t.className="icon material-icons material-icons-outlined",t.textContent=r[e],t}}))},{}],"../node_modules/@milkdown/theme-nord/lib/view.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.view=void 0;const r=e("@emotion/css").css`
                    /* copy from https://github.com/ProseMirror/@milkdown/prose/blob/master/style/prosemirror.css */
                    .ProseMirror {
                        position: relative;
                    }

                    .ProseMirror {
                        word-wrap: break-word;
                        white-space: pre-wrap;
                        white-space: break-spaces;
                        -webkit-font-variant-ligatures: none;
                        font-variant-ligatures: none;
                        font-feature-settings: 'liga' 0; /* the above doesn't seem to work in Edge */
                    }

                    .ProseMirror pre {
                        white-space: pre-wrap;
                    }

                    .ProseMirror li {
                        position: relative;
                    }

                    .ProseMirror-hideselection *::selection {
                        background: transparent;
                    }
                    .ProseMirror-hideselection *::-moz-selection {
                        background: transparent;
                    }
                    .ProseMirror-hideselection {
                        caret-color: transparent;
                    }

                    .ProseMirror-selectednode {
                        outline: 2px solid #8cf;
                    }

                    /* Make sure li selections wrap around markers */

                    li.ProseMirror-selectednode {
                        outline: none;
                    }

                    li.ProseMirror-selectednode:after {
                        content: '';
                        position: absolute;
                        left: -32px;
                        right: -2px;
                        top: -2px;
                        bottom: -2px;
                        border: 2px solid #8cf;
                        pointer-events: none;
                    }
                `;n.view=r},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js"}],"../node_modules/@milkdown/theme-nord/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"mixin",{enumerable:!0,get:function(){return a.mixin}}),Object.defineProperty(n,"color",{enumerable:!0,get:function(){return c.color}}),Object.defineProperty(n,"darkColor",{enumerable:!0,get:function(){return c.darkColor}}),Object.defineProperty(n,"lightColor",{enumerable:!0,get:function(){return c.lightColor}}),Object.defineProperty(n,"override",{enumerable:!0,get:function(){return l.override}}),Object.defineProperty(n,"slots",{enumerable:!0,get:function(){return u.slots}}),Object.defineProperty(n,"view",{enumerable:!0,get:function(){return d.view}}),n.nord=n.nordDark=n.nordLight=n.size=n.font=void 0;var r,o=e("@emotion/css"),i=e("@milkdown/core"),s=e("./font"),a=e("./mixin"),c=e("./nord"),l=e("./override"),u=e("./slots"),d=e("./view");const f={typography:s.typography,code:s.code};n.font=f;const p={radius:"4px",lineWidth:"1px"};n.size=p;const m=(0,i.themeFactory)({font:f,size:p,color:c.lightColor,mixin:a.mixin,slots:u.slots,global:e=>{o.injectGlobal`
                            ${d.view};
                            ${(0,l.override)(e)}
                        `}});n.nordLight=m;const h=(0,i.themeFactory)({font:f,size:p,color:c.darkColor,mixin:a.mixin,slots:u.slots,global:e=>{o.injectGlobal`
                            ${d.view};
                            ${(0,l.override)(e)}
                        `}});n.nordDark=h;const g=Boolean(null===(r=window.matchMedia)||void 0===r?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)?h:m;n.nord=g},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","./font":"../node_modules/@milkdown/theme-nord/lib/font.js","./mixin":"../node_modules/@milkdown/theme-nord/lib/mixin.js","./nord":"../node_modules/@milkdown/theme-nord/lib/nord.js","./override":"../node_modules/@milkdown/theme-nord/lib/override.js","./slots":"../node_modules/@milkdown/theme-nord/lib/slots.js","./view":"../node_modules/@milkdown/theme-nord/lib/view.js"}],"../node_modules/@milkdown/utils/lib/atom/atom-list.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AtomList=void 0;const r=e=>Object.prototype.hasOwnProperty.call(e,"origin");class o extends Array{findThenRun(e,t){const n=this.findIndex(t=>r(t)&&t.origin===e);return n<0?this:(t(n),this)}configure(e,t){return this.findThenRun(e,n=>{this.splice(n,1,e(t))})}replace(e,t){return this.findThenRun(e,e=>{this.splice(e,1,t)})}remove(e){return this.findThenRun(e,e=>{this.splice(e,1)})}headless(){return this.filter(r).forEach(e=>{this.configure(e.origin,{headless:!0})}),this}static create(e){return new o(...e)}}n.AtomList=o},{}],"../node_modules/@milkdown/utils/lib/atom/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./atom-list");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))})},{"./atom-list":"../node_modules/@milkdown/utils/lib/atom/atom-list.js"}],"../node_modules/@milkdown/utils/lib/composable/$command.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$command=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$command=(e=>{const t=()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield n.wait(o.SchemaReady);const[r,i]=e(n);n.get(o.commandsCtx).create(r,i),t.run=(e=>n.get(o.commandsCtx).call(r,e)),t.key=r});return t})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$inputRule.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$inputRule=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$inputRule=(e=>{const t=()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield n.wait(o.SchemaReady);const r=e(n);n.update(o.inputRulesCtx,e=>[...e,r]),t.inputRule=r});return t})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$mark.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$mark=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$mark=((e,t)=>{const n=()=>i=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){const r=t(i);i.update(o.marksCtx,t=>[...t,[e,r]]),n.id=e,n.schema=r,yield i.wait(o.SchemaReady),n.type=i.get(o.schemaCtx).marks[e]});return n})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$node.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$node=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$node=((e,t)=>{const n=()=>i=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){const r=t(i);i.update(o.nodesCtx,t=>[...t,[e,r]]),n.id=e,n.schema=r,yield i.wait(o.SchemaReady),n.type=i.get(o.schemaCtx).nodes[e]});return n})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$prose.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$prose=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$prose=(e=>{const t=()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield n.wait(o.SchemaReady);const r=e(n);n.update(o.prosePluginsCtx,e=>[...e,r]),t.plugin=r});return t})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$remark.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$remark=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$remark=(e=>{const t=()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield n.wait(o.InitReady);const r=e(n);n.update(o.remarkPluginsCtx,e=>[...e,r]),t.plugin=r});return t})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$shortcut.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$shortcut=void 0;var r=e("tslib"),o=e("@milkdown/core"),i=e("@milkdown/prose");n.$shortcut=(e=>{const t=()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield n.wait(o.SchemaReady);const r=e(n);n.update(o.prosePluginsCtx,e=>[...e,(0,i.keymap)(r)]),t.keymap=r});return t})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/$view.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$view=void 0;var r=e("tslib"),o=e("@milkdown/core");n.$view=((e,t)=>{const n=()=>i=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){yield i.wait(o.SchemaReady);const r=t(i);i.update(o.viewCtx,t=>[...t,[e.id,r]]),n.view=r,n.type=e});return n})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js"}],"../node_modules/@milkdown/utils/lib/composable/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./$command");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./$inputRule");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./$mark");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./$node");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("./$prose");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))});var c=e("./$remark");Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))});var l=e("./$shortcut");Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===l[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return l[e]}}))});var u=e("./$view");Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===u[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}}))})},{"./$command":"../node_modules/@milkdown/utils/lib/composable/$command.js","./$inputRule":"../node_modules/@milkdown/utils/lib/composable/$inputRule.js","./$mark":"../node_modules/@milkdown/utils/lib/composable/$mark.js","./$node":"../node_modules/@milkdown/utils/lib/composable/$node.js","./$prose":"../node_modules/@milkdown/utils/lib/composable/$prose.js","./$remark":"../node_modules/@milkdown/utils/lib/composable/$remark.js","./$shortcut":"../node_modules/@milkdown/utils/lib/composable/$shortcut.js","./$view":"../node_modules/@milkdown/utils/lib/composable/$view.js"}],"../node_modules/@milkdown/utils/lib/factory/common.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.withExtend=n.addMetadata=n.applyMethods=n.getUtils=n.createShortcut=n.getClassName=void 0;var r=e("tslib"),o=e("@milkdown/core"),i=e("@milkdown/exception"),s=e("@milkdown/prose");const a=e=>(t,...n)=>{var r;const o=null!==(r=null==e?void 0:e(t))&&void 0!==r?r:n;return Array.isArray(o)?o.filter(e=>e).join(" "):o};n.getClassName=a;n.createShortcut=((e,t,n)=>[e,t,n]);n.getUtils=((e,t)=>{try{const n=e.get(o.themeToolCtx);return{getClassName:a(null==t?void 0:t.className),getStyle:e=>(null==t?void 0:t.headless)?"":e(n),themeTool:n}}catch(e){throw(0,i.themeMustInstalled)()}});n.applyMethods=((e,t,n,i)=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){if(yield e.wait(o.InitReady),t.remarkPlugins){const n=t.remarkPlugins(e);e.update(o.remarkPluginsCtx,e=>[...e,...n])}const r=yield n();if(t.commands&&t.commands(r,e).forEach(([t,n])=>{e.get(o.commandsCtx).create(t,n)}),t.inputRules){const n=t.inputRules(r,e);e.update(o.inputRulesCtx,e=>[...e,...n])}if(t.shortcuts){const n=(e,t)=>{var n,r;return null!==(r=null===(n=null==i?void 0:i.keymap)||void 0===n?void 0:n[e])&&void 0!==r?r:t},r=Object.entries(t.shortcuts).flatMap(([t,[r,i,s]])=>{const a=()=>e.get(o.commandsCtx).call(r,s),c=n(t,i);return Array.isArray(c)?c.map(e=>({key:e,runner:a})):{key:c,runner:a}}).map(e=>[e.key,e.runner]);e.update(o.prosePluginsCtx,e=>e.concat((0,s.keymap)(Object.fromEntries(r))))}if(t.prosePlugins){const n=t.prosePlugins(r,e);e.update(o.prosePluginsCtx,e=>[...e,...n])}}));n.addMetadata=(e=>{const t=n=>{const r=e(n);return r.origin=t,r};return t});n.withExtend=((e,t,n)=>{const r=t;return r.extend=(t=>n((...n)=>t(e(...n),...n))),r})},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/exception":"../node_modules/@milkdown/exception/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js"}],"../node_modules/@milkdown/utils/lib/factory/create-mark.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createMark=void 0;var r=e("tslib"),o=e("@milkdown/core"),i=e("./common");const s=e=>(0,i.withExtend)(e,(0,i.addMetadata)(t=>()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){var s;const a=(0,i.getUtils)(n,t),c=e(a,t);if(c.view=null!==(s=null==t?void 0:t.view)&&void 0!==s?s:c.view,yield(0,i.applyMethods)(n,c,()=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){const e=c.schema(n);return n.update(o.marksCtx,t=>[...t,[c.id,e]]),yield n.wait(o.SchemaReady),n.get(o.schemaCtx).marks[c.id]}),t),c.view){const e=c.view(n);n.update(o.viewCtx,t=>[...t,[c.id,e]])}})),s);n.createMark=s},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","./common":"../node_modules/@milkdown/utils/lib/factory/common.js"}],"../node_modules/@milkdown/utils/lib/factory/create-node.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createNode=void 0;var r=e("tslib"),o=e("@milkdown/core"),i=e("./common");const s=e=>(0,i.withExtend)(e,(0,i.addMetadata)(t=>()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){var s;const a=(0,i.getUtils)(n,t),c=e(a,t);if(c.view=null!==(s=null==t?void 0:t.view)&&void 0!==s?s:c.view,yield(0,i.applyMethods)(n,c,()=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){const e=c.schema(n);return n.update(o.nodesCtx,t=>[...t,[c.id,e]]),yield n.wait(o.SchemaReady),n.get(o.schemaCtx).nodes[c.id]}),t),c.view){const e=c.view(n);n.update(o.viewCtx,t=>[...t,[c.id,e]])}})),s);n.createNode=s},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","./common":"../node_modules/@milkdown/utils/lib/factory/common.js"}],"../node_modules/@milkdown/utils/lib/factory/create-plugin.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createPlugin=void 0;var r=e("tslib"),o=e("@milkdown/core"),i=e("./common");const s=e=>(0,i.withExtend)(e,(0,i.addMetadata)(t=>()=>n=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){const s=(0,i.getUtils)(n,t),a=e(s,t);if(yield(0,i.applyMethods)(n,a,()=>(0,r.__awaiter)(void 0,void 0,void 0,function*(){let e={},t={};if(a.schema){const r=a.schema(n);if(r.node){e=r.node;const t=Object.entries(r.node);n.update(o.nodesCtx,e=>[...e,...t])}if(r.mark){t=r.mark;const e=Object.entries(r.mark);n.update(o.marksCtx,t=>[...t,...e])}}yield n.wait(o.SchemaReady);const r=n.get(o.schemaCtx),i=Object.keys(e).map(e=>[e,r.nodes[e]]),s=Object.keys(t).map(e=>[e,r.marks[e]]);return Object.fromEntries([...i,...s])}),t),a.view){const e=a.view(n);n.update(o.viewCtx,t=>[...t,...Object.entries(e)])}})),s);n.createPlugin=s},{tslib:"../node_modules/tslib/tslib.es6.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","./common":"../node_modules/@milkdown/utils/lib/factory/common.js"}],"../node_modules/@milkdown/utils/lib/factory/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./common");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./create-mark");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./create-node");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./create-plugin");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))})},{"./common":"../node_modules/@milkdown/utils/lib/factory/common.js","./create-mark":"../node_modules/@milkdown/utils/lib/factory/create-mark.js","./create-node":"../node_modules/@milkdown/utils/lib/factory/create-node.js","./create-plugin":"../node_modules/@milkdown/utils/lib/factory/create-plugin.js"}],"../node_modules/@milkdown/utils/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./atom");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))});var o=e("./composable");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./factory");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))})},{"./atom":"../node_modules/@milkdown/utils/lib/atom/index.js","./composable":"../node_modules/@milkdown/utils/lib/composable/index.js","./factory":"../node_modules/@milkdown/utils/lib/factory/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SupportedKeys=void 0;n.SupportedKeys={HardBreak:"HardBreak",Blockquote:"Blockquote",BulletList:"BulletList",OrderedList:"OrderedList",CodeFence:"CodeFence",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",Text:"Text",CodeInline:"CodeInline",Em:"Em",Bold:"Bold",NextListItem:"NextListItem",SinkListItem:"SinkListItem",LiftListItem:"LiftListItem"}},{}],"../node_modules/@milkdown/preset-commonmark/lib/mark/code-inline.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.codeInline=n.ToggleInlineCode=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c="code_inline",l=(0,o.createCmdKey)();n.ToggleInlineCode=l;const u=(0,s.createMark)(e=>{const t=e.getStyle(({palette:e,size:t,font:n})=>r.css`
                                background-color: ${e("neutral")};
                                color: ${e("background")};
                                border-radius: ${t.radius};
                                font-weight: 500;
                                font-family: ${n.code};
                                padding: 0 0.2rem;
                            `);return{id:c,schema:()=>({excludes:"_",parseDOM:[{tag:"code"}],toDOM:n=>["code",{class:e.getClassName(n.attrs,"code-inline",t)}],parseMarkdown:{match:e=>"inlineCode"===e.type,runner:(e,t,n)=>{e.openMark(n),e.addText(t.value),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name===c,runner:(e,t,n)=>(e.addNode("inlineCode",void 0,n.text||""),!0)}}),inputRules:e=>[(0,i.markRule)(/(?:^|[^`])(`([^`]+)`)$/,e)],commands:e=>[(0,o.createCmd)(l,()=>(0,i.toggleMark)(e))],shortcuts:{[a.SupportedKeys.CodeInline]:(0,s.createShortcut)(l,"Mod-e")}}});n.codeInline=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/mark/em.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.em=n.ToggleItalic=void 0;var r=e("@milkdown/core"),o=e("@milkdown/prose"),i=e("@milkdown/utils"),s=e("../supported-keys");const a=(0,r.createCmdKey)();n.ToggleItalic=a;const c=(0,i.createMark)(e=>({id:"em",schema:()=>({parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>"italic"===e}],toDOM:t=>["em",{class:e.getClassName(t.attrs,"em")}],parseMarkdown:{match:e=>"emphasis"===e.type,runner:(e,t,n)=>{e.openMark(n),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"em"===e.type.name,runner:(e,t)=>{e.withMark(t,"emphasis")}}}),inputRules:e=>[(0,o.markRule)(/(?:^|[^_])(_([^_]+)_)$/,e),(0,o.markRule)(/(?:^|[^*])(\*([^*]+)\*)$/,e)],commands:e=>[(0,r.createCmd)(a,()=>(0,o.toggleMark)(e))],shortcuts:{[s.SupportedKeys.Em]:(0,i.createShortcut)(a,"Mod-i")}}));n.em=c},{"@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/mark/link.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.link=n.ModifyLink=n.ToggleLink=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils");const a=(0,o.createCmdKey)();n.ToggleLink=a;const c=(0,o.createCmdKey)();n.ModifyLink=c;const l="link",u=(0,s.createMark)(e=>{const t=e.getStyle(e=>{const t=e.palette("line");return r.css`
                            color: ${e.palette("secondary")};
                            cursor: pointer;
                            transition: all 0.4s ease-in-out;
                            font-weight: 500;
                            &:hover {
                                background-color: ${t};
                                box-shadow: 0 0.2rem ${t}, 0 -0.2rem ${t};
                            }
                        `});return{id:l,schema:()=>({attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw new Error;return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:n=>["a",Object.assign(Object.assign({},n.attrs),{class:e.getClassName(n.attrs,l,t)})],parseMarkdown:{match:e=>"link"===e.type,runner:(e,t,n)=>{const r=t.url,o=t.title;e.openMark(n,{href:r,title:o}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name===l,runner:(e,t)=>{e.withMark(t,"link",void 0,{title:t.attrs.title,url:t.attrs.href})}}}),commands:e=>[(0,o.createCmd)(a,(t="")=>(0,i.toggleMark)(e,{href:t})),(0,o.createCmd)(c,(t="")=>(n,r)=>{if(!r)return!1;const{marks:o}=n.schema;let s,a=-1;const{selection:c}=n;if(n.doc.nodesBetween(c.from,c.to,(e,t)=>{if(o.link.isInSet(e.marks))return s=e,a=t,!1}),!s)return!1;const l=s.marks.find(({type:t})=>t===e);if(!l)return!1;const u=a,d=a+s.nodeSize,{tr:f}=n,p=o.link.create(Object.assign(Object.assign({},l.attrs),{href:t}));return r(f.removeMark(u,d,l).addMark(u,d,p).setSelection(new i.TextSelection(f.selection.$anchor)).scrollIntoView()),!0})],inputRules:(e,t)=>[new i.InputRule(/\[(?<text>.*?)]\((?<href>.*?)(?=“|\))"?(?<title>[^"]+)?"?\)/,(n,r,i,s)=>{const[a,c="",l,u]=r,{tr:d}=n;if(a){const n=c||"link";d.replaceWith(i,s,t.get(o.schemaCtx).text(n)).addMark(i,n.length+i,e.create({title:u,href:l}))}return d})]}});n.link=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/mark/strong.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.strong=n.ToggleBold=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c="strong",l=(0,o.createCmdKey)();n.ToggleBold=l;const u=(0,s.createMark)(e=>{const t=e.getStyle(()=>r.css`
                                font-weight: 600;
                            `);return{id:c,schema:()=>({parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>"bold"===e}],toDOM:n=>["strong",{class:e.getClassName(n.attrs,c,t)}],parseMarkdown:{match:e=>"strong"===e.type,runner:(e,t,n)=>{e.openMark(n),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>e.type.name===c,runner:(e,t)=>{e.withMark(t,"strong")}}}),inputRules:e=>[(0,i.markRule)(/(?:__)([^_]+)(?:__)$/,e),(0,i.markRule)(/(?:\*\*)([^*]+)(?:\*\*)$/,e)],commands:e=>[(0,o.createCmd)(l,()=>(0,i.toggleMark)(e))],shortcuts:{[a.SupportedKeys.Bold]:(0,s.createShortcut)(l,"Mod-b")}}});n.strong=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/mark/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={marks:!0};n.marks=void 0;var o=e("./code-inline");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./em");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./link");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("./strong");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))});const c=[(0,o.codeInline)(),(0,i.em)(),(0,a.strong)(),(0,s.link)()];n.marks=c},{"./code-inline":"../node_modules/@milkdown/preset-commonmark/lib/mark/code-inline.js","./em":"../node_modules/@milkdown/preset-commonmark/lib/mark/em.js","./link":"../node_modules/@milkdown/preset-commonmark/lib/mark/link.js","./strong":"../node_modules/@milkdown/preset-commonmark/lib/mark/strong.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/blockquote.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.blockquote=n.WrapInBlockquote=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c="blockquote",l=(0,o.createCmdKey)();n.WrapInBlockquote=l;const u=(0,s.createNode)(e=>{const t=e.getStyle(e=>r.css`
                                padding-left: 1.875rem;
                                line-height: 1.75rem;
                                border-left: 4px solid ${e.palette("primary")};
                                * {
                                    font-size: 1rem;
                                    line-height: 1.5rem;
                                }
                            `);return{id:c,schema:()=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:n=>["blockquote",{class:e.getClassName(n.attrs,c,t)},0],parseMarkdown:{match:({type:e})=>e===c,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===c,runner:(e,t)=>{e.openNode("blockquote").next(t.content).closeNode()}}}),inputRules:e=>[(0,i.wrappingInputRule)(/^\s*>\s$/,e)],commands:e=>[(0,o.createCmd)(l,()=>(0,i.wrapIn)(e))],shortcuts:{[a.SupportedKeys.Blockquote]:(0,s.createShortcut)(l,"Mod-Shift-b")}}});n.blockquote=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/bullet-list.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bulletList=n.WrapInBulletList=void 0;var r=e("@milkdown/core"),o=e("@milkdown/prose"),i=e("@milkdown/utils"),s=e("../supported-keys");const a=(0,r.createCmdKey)();n.WrapInBulletList=a;const c=(0,i.createNode)(e=>{const t="bullet_list";return{id:t,schema:()=>({content:"listItem+",group:"block",parseDOM:[{tag:"ul"}],toDOM:t=>["ul",{class:e.getClassName(t.attrs,"bullet-list")},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!t,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===t,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!1}).next(t.content).closeNode()}}}),inputRules:e=>[(0,o.wrappingInputRule)(/^\s*([-+*])\s$/,e)],commands:e=>[(0,r.createCmd)(a,()=>(0,o.wrapIn)(e))],shortcuts:{[s.SupportedKeys.BulletList]:(0,i.createShortcut)(a,"Mod-Shift-8")}}});n.bulletList=c},{"@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/code-fence.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.codeFence=n.TurnIntoCodeFence=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c=["","javascript","typescript","bash","sql","json","html","css","c","cpp","java","ruby","python","go","rust","markdown"],l=/^```(?<language>[a-z]*)? $/,u=(0,o.createCmdKey)();n.TurnIntoCodeFence=u;const d="fence",f=(0,s.createNode)((e,t)=>{const n=e.getStyle(({palette:e,mixin:t,size:n,font:o})=>{const{shadow:i,scrollbar:s,border:a}=t,{lineWidth:c,radius:l}=n;return r.css`
                            background-color: ${e("background")};
                            color: ${e("neutral")};
                            font-size: 0.85rem;
                            padding: 1.2rem 0.4rem 1.4rem;
                            border-radius: ${l};
                            font-family: ${o.typography};

                            * {
                                margin: 0;
                            }

                            .code-fence_select-wrapper {
                                position: relative;
                            }

                            .code-fence_value {
                                width: 10.25rem;
                                box-sizing: border-box;
                                border-radius: ${n.radius};
                                margin: 0 1.2rem 1.2rem;
                                ${a()};
                                ${i()};
                                cursor: pointer;
                                background-color: ${e("surface")};
                                position: relative;
                                display: flex;
                                color: ${e("neutral",.87)};
                                letter-spacing: 0.5px;
                                height: 2.625rem;
                                align-items: center;

                                & > *:last-child {
                                    width: 2.625rem;
                                    height: 100%;
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;
                                    color: ${e("solid",.87)};
                                    border-left: ${c} solid ${e("line")};

                                    text-align: center;
                                    transition: all 0.2s ease-in-out;
                                    &:hover {
                                        background: ${e("background")};
                                        color: ${e("primary")};
                                    }
                                }

                                > span:first-child {
                                    padding-left: 1rem;
                                    flex: 1;
                                    font-weight: 500;
                                }
                            }

                            .code-fence_select-option {
                                list-style: none;
                                line-height: 2rem;
                                padding-left: 1rem;
                                cursor: pointer;
                                :hover {
                                    background: ${e("secondary",.12)};
                                    color: ${e("primary")};
                                }
                            }

                            .code-fence_select {
                                &[data-fold='true'] {
                                    display: none;
                                }

                                font-weight: 500;
                                position: absolute;
                                z-index: 1;
                                top: 2.625rem;
                                box-sizing: border-box;
                                left: 1.2rem;
                                padding: 0.5rem 0;
                                max-height: 16.75rem;
                                width: 10.25rem;
                                ${a()};
                                ${i()};
                                background-color: ${e("surface")};
                                border-top: none;
                                overflow-y: auto;
                                display: flex;
                                flex-direction: column;

                                ${s("y")}
                            }

                            code {
                                line-height: 1.5;
                                font-family: ${o.code};
                            }

                            pre {
                                font-family: ${o.code};
                                margin: 0 1.2rem !important;
                            }
                        `});return{id:d,schema:()=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""},fold:{default:!0}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw new Error("Parse DOM error.");return{language:e.dataset.language}}}],toDOM:t=>["div",{"data-language":t.attrs.language,class:e.getClassName(t.attrs,"code-fence",n)},["pre",["code",{spellCheck:"false"},0]]],parseMarkdown:{match:({type:e})=>"code"===e,runner:(e,t,n)=>{const r=t.lang,o=t.value;e.openNode(n,{language:r}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>e.type.name===d,runner:(e,t)=>{var n;e.addNode("code",void 0,(null===(n=t.content.firstChild)||void 0===n?void 0:n.text)||"",{lang:t.attrs.language})}}}),inputRules:e=>[(0,i.textblockTypeInputRule)(l,e,([e,t])=>{if(e)return{language:t}})],commands:e=>[(0,o.createCmd)(u,()=>(0,i.setBlockType)(e))],shortcuts:{[a.SupportedKeys.CodeFence]:(0,s.createShortcut)(u,"Mod-Alt-c")},view:r=>(i,s,a)=>{const l=document.createElement("div"),u=document.createElement("div"),f=document.createElement("ul"),p=document.createElement("pre"),m=document.createElement("code"),h=document.createElement("div");h.className="code-fence_value";const g=document.createElement("span");h.appendChild(g),h.appendChild(r.get(o.themeToolCtx).slots.icon("downArrow")),f.className="code-fence_select",f.addEventListener("mousedown",e=>{if(e.preventDefault(),e.stopPropagation(),!s.editable)return;const t=e.target;if(!(t instanceof HTMLLIElement))return;const{tr:n}=s.state;s.dispatch(n.setNodeMarkup(a(),void 0,{fold:!0,language:t.dataset.value}))}),h.addEventListener("mousedown",e=>{if(e.preventDefault(),e.stopPropagation(),!s.editable)return;const{tr:t}=s.state;s.dispatch(t.setNodeMarkup(a(),void 0,{fold:!1,language:l.dataset.language}))}),document.addEventListener("mousedown",()=>{if(!s.editable||"true"===f.dataset.fold)return;const{tr:e}=s.state;s.dispatch(e.setNodeMarkup(a(),void 0,{fold:!0,language:l.dataset.language}))}),((null==t?void 0:t.languageList)||c).forEach(e=>{const t=document.createElement("li");t.className="code-fence_select-option",t.innerText=e||"--",f.appendChild(t),t.setAttribute("data-value",e)}),m.spellcheck=!1,u.className="code-fence_select-wrapper",u.contentEditable="false",u.append(h),u.append(f),p.append(m);const v=document.createElement("div");return m.append(v),l.append(u,p),l.setAttribute("class",e.getClassName(i.attrs,"code-fence",n)),l.setAttribute("data-language",i.attrs.language),g.innerText=i.attrs.language||"--",f.setAttribute("data-fold",i.attrs.fold?"true":"false"),{dom:l,contentDOM:v,update:e=>{if(e.type.name!==d)return!1;const t=e.attrs.language;return l.dataset.language=t,g.innerText=t||"--",f.setAttribute("data-fold",e.attrs.fold?"true":"false"),!0}}}}});n.codeFence=f},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/doc.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.doc=void 0;const r=(0,e("@milkdown/utils").createNode)(()=>({id:"doc",schema:()=>({content:"block+",parseMarkdown:{match:({type:e})=>"root"===e,runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>"doc"===e.type.name,runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}})}));n.doc=r},{"@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/hardbreak.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hardbreak=n.InsertHardbreak=void 0;var r=e("@milkdown/core"),o=e("@milkdown/prose"),i=e("@milkdown/utils"),s=e("../supported-keys");const a=(0,r.createCmdKey)();n.InsertHardbreak=a;const c=(0,i.createNode)(e=>({id:"hardbreak",schema:()=>({inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:t=>["br",{class:e.getClassName(t.attrs,"hardbreak")}],parseMarkdown:{match:({type:e})=>"break"===e,runner:(e,t,n)=>{e.addNode(n)}},toMarkdown:{match:e=>"hardbreak"===e.type.name,runner:e=>{e.addNode("break")}}}),commands:e=>[(0,r.createCmd)(a,()=>(t,n)=>(null==n||n(t.tr.setMeta("hardbreak",!0).replaceSelectionWith(e.create()).scrollIntoView()),!0))],shortcuts:{[s.SupportedKeys.HardBreak]:(0,i.createShortcut)(a,"Shift-Enter")},prosePlugins:e=>[new o.Plugin({appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t,[s]=i.steps;if(i.getMeta("hardbreak")){if(!(s instanceof o.ReplaceStep))return;const{from:t}=s;return r.tr.setNodeMarkup(t,e,void 0,[])}if(s instanceof o.AddMarkStep){let t=r.tr;const{from:n,to:o}=s;return r.doc.nodesBetween(n,o,(n,r)=>{n.type===e&&(t=t.setNodeMarkup(r,e,void 0,[]))}),t}}})]}));n.hardbreak=c},{"@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/heading.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.heading=n.TurnIntoHeading=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c=Array(6).fill(0).map((e,t)=>t+1),l=(0,o.createCmdKey)();n.TurnIntoHeading=l;const u=(0,s.createNode)((e,t)=>{const n="heading",u={1:r.css`
                            font-size: 3rem;
                            line-height: 3.5rem;
                        `,2:r.css`
                            font-size: 2.125rem;
                            line-height: 2.25rem;
                        `,3:r.css`
                            font-size: 1.5rem;
                            line-height: 1.5rem;
                        `},d=e=>(null==t?void 0:t.headless)?null:r.css`
                                ${u[e]||""}
                                margin: 2.5rem 0 !important;
                                font-weight: 400;
                            `;return{id:n,schema:()=>({content:"inline*",group:"block",attrs:{level:{default:1},id:{default:""}},parseDOM:c.map(e=>({tag:`h${e}`,attrs:{level:e}})),toDOM:t=>[`h${t.attrs.level}`,{class:e.getClassName(t.attrs,`heading h${t.attrs.level}`,d(t.attrs.level))},0],parseMarkdown:{match:({type:e})=>e===n,runner:(e,t,n)=>{const r=t.depth;e.openNode(n,{level:r}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name===n,runner:(e,t)=>{e.openNode("heading",void 0,{depth:t.attrs.level}),e.next(t.content),e.closeNode()}}}),inputRules:e=>c.map(t=>(0,i.textblockTypeInputRule)(new RegExp(`^(#{1,${t}})\\s$`),e,()=>({level:t}))),commands:e=>[(0,o.createCmd)(l,(t=1)=>(0,i.setBlockType)(e,{level:t}))],shortcuts:{[a.SupportedKeys.H1]:(0,s.createShortcut)(l,"Mod-Alt-1",1),[a.SupportedKeys.H2]:(0,s.createShortcut)(l,"Mod-Alt-2",2),[a.SupportedKeys.H3]:(0,s.createShortcut)(l,"Mod-Alt-3",3),[a.SupportedKeys.H4]:(0,s.createShortcut)(l,"Mod-Alt-4",4),[a.SupportedKeys.H5]:(0,s.createShortcut)(l,"Mod-Alt-5",5),[a.SupportedKeys.H6]:(0,s.createShortcut)(l,"Mod-Alt-6",6)}}});n.heading=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/hr.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hr=n.InsertHr=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils");const a=(0,o.createCmdKey)();n.InsertHr=a;const c=(0,s.createNode)(e=>{const t=e.getStyle(e=>r.css`
                            height: ${e.size.lineWidth};
                            background-color: ${e.palette("line")};
                            border-width: 0;
                        `);return{id:"hr",schema:()=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:n=>["hr",{class:e.getClassName(n.attrs,"hr",t)}],parseMarkdown:{match:({type:e})=>"thematicBreak"===e,runner:(e,t,n)=>{e.addNode(n)}},toMarkdown:{match:e=>"hr"===e.type.name,runner:e=>{e.addNode("thematicBreak")}}}),inputRules:e=>[new i.InputRule(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,o)=>{const{tr:i}=t;return n[0]&&i.replaceWith(r-1,o,e.create()),i})],commands:(e,t)=>[(0,o.createCmd)(a,()=>(n,r)=>{if(!r)return!0;const{tr:s,selection:a}=n,c=a.from,l=e.create();if(!l)return!0;const u=s.replaceSelectionWith(l).insert(c,t.get(o.schemaCtx).node("paragraph")),d=i.Selection.findFrom(u.doc.resolve(c),1,!0);return!d||(r(u.setSelection(d).scrollIntoView()),!0)})]}});n.hr=c},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/image.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.image=n.InsertImage=n.ModifyImage=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils");const a=(0,o.createCmdKey)();n.ModifyImage=a;const c=(0,o.createCmdKey)();n.InsertImage=c;const l="image",u=(0,s.createNode)((e,t)=>{var n,s;const u=Object.assign({loading:"Loading...",empty:"Add an Image",failed:"Image loads failed"},null!==(n=null==t?void 0:t.placeholder)&&void 0!==n?n:{}),d=null!==(s=null==t?void 0:t.isBlock)&&void 0!==s&&s,f=e.getStyle(e=>r.css`
                                display: inline-block;
                                position: relative;
                                text-align: center;
                                font-size: 0;
                                vertical-align: text-bottom;
                                line-height: 1;

                                ${d?"\n                        width: 100%;\n                        margin: 0 auto;\n                        ":""}

                                &.ProseMirror-selectednode::after {
                                    content: '';
                                    background: ${e.palette("secondary",.38)};
                                    position: absolute;
                                    top: 0;
                                    left: 0;
                                    right: 0;
                                    bottom: 0;
                                }

                                img {
                                    max-width: 100%;
                                    height: auto;
                                    object-fit: contain;
                                    margin: 0 2px;
                                }
                                .icon,
                                .placeholder {
                                    display: none;
                                }

                                &.system {
                                    width: 100%;
                                    padding: 0 2rem;

                                    img {
                                        width: 0;
                                        height: 0;
                                        display: none;
                                    }

                                    .icon,
                                    .placeholder {
                                        display: inline;
                                    }

                                    box-sizing: border-box;
                                    height: 3rem;
                                    background-color: ${e.palette("background")};
                                    border-radius: ${e.size.radius};
                                    display: inline-flex;
                                    gap: 2rem;
                                    justify-content: flex-start;
                                    align-items: center;
                                    .placeholder {
                                        margin: 0;
                                        line-height: 1;
                                        &::before {
                                            content: '';
                                            font-size: 0.875rem;
                                            color: ${e.palette("neutral",.6)};
                                        }
                                    }
                                }

                                &.loading {
                                    .placeholder {
                                        &::before {
                                            content: '${u.loading}';
                                        }
                                    }
                                }

                                &.empty {
                                    .placeholder {
                                        &::before {
                                            content: '${u.empty}';
                                        }
                                    }
                                }

                                &.failed {
                                    .placeholder {
                                        &::before {
                                            content: '${u.failed}';
                                        }
                                    }
                                }
                            `),p=e.getStyle(()=>r.css`
                                display: inline-block;
                                margin: 0 auto;
                                object-fit: contain;
                                width: 100%;
                                position: relative;
                                height: auto;
                                text-align: center;
                            `);return{id:"image",schema:()=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:null},title:{default:null},failed:{default:!1},loading:{default:!0},width:{default:0}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw new Error;return{failed:e.classList.contains("failed"),loading:e.classList.contains("loading"),src:e.getAttribute("src")||"",alt:e.getAttribute("alt"),title:e.getAttribute("title")||e.getAttribute("alt"),width:e.getAttribute("width")||0}}}],toDOM:t=>["img",Object.assign(Object.assign({},t.attrs),{class:e.getClassName(t.attrs,l,t.attrs.failed?"failed":"",t.attrs.loading?"loading":"",p)})],parseMarkdown:{match:({type:e})=>e===l,runner:(e,t,n)=>{const r=t.url,o=t.alt,i=t.title;e.addNode(n,{src:r,alt:o,title:i})}},toMarkdown:{match:e=>e.type.name===l,runner:(e,t)=>{e.addNode("image",void 0,void 0,{title:t.attrs.title,url:t.attrs.src,alt:t.attrs.alt})}}}),commands:e=>[(0,o.createCmd)(c,(t="")=>(n,r)=>{if(!r)return!0;const{tr:o}=n,i=e.create({src:t});return!i||(r(o.replaceSelectionWith(i).scrollIntoView()),!0)}),(0,o.createCmd)(a,(t="")=>(n,r)=>{const o=(0,i.findSelectedNodeOfType)(n.selection,e);if(!o)return!1;const{tr:s}=n;return null==r||r(s.setNodeMarkup(o.pos,void 0,Object.assign(Object.assign({},o.node.attrs),{loading:!0,src:t})).scrollIntoView()),!0})],inputRules:e=>[new i.InputRule(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,o)=>{const[i,s,a="",c]=n,{tr:l}=t;return i&&l.replaceWith(r,o,e.create({src:a,alt:s,title:c})),l})],view:t=>(n,r,i)=>{const s=n.type,a=t.get(o.themeToolCtx).slots.icon,c=document.createElement("span");c.className=e.getClassName(n.attrs,l,f);const u=document.createElement("img");c.append(u);let d=a("image");const p=document.createElement("span");p.classList.add("placeholder"),c.append(d,p);const m=e=>{const t=a(e);c.replaceChild(t,d),d=t},h=e=>{c.classList.add("system","loading"),m("loading");const t=document.createElement("img");t.src=e,t.onerror=(()=>{const{tr:t}=r.state,o=t.setNodeMarkup(i(),s,Object.assign(Object.assign({},n.attrs),{src:e,loading:!1,failed:!0}));r.dispatch(o)}),t.onload=(()=>{const{tr:o}=r.state,a=o.setNodeMarkup(i(),s,Object.assign(Object.assign({},n.attrs),{width:t.width,src:e,loading:!1,failed:!1}));r.dispatch(a)})},{src:g,loading:v,title:y,alt:b,width:k}=n.attrs;return u.src=g,u.title=y||b,u.alt=b,u.width=k,0===g.length?(c.classList.add("system","empty"),m("image")):v&&h(g),{dom:c,update:e=>{if(e.type.name!==l)return!1;const{src:t,alt:n,title:r,loading:o,failed:i,width:s}=e.attrs;return u.src=t,u.alt=n,u.title=r||n,u.width=s,o?(h(t),!0):i?(c.classList.remove("loading","empty"),c.classList.add("system","failed"),m("brokenImage"),!0):t.length>0?(c.classList.remove("system","empty","loading"),!0):(c.classList.add("system","empty"),m("image"),!0)},selectNode:()=>{c.classList.add("ProseMirror-selectednode")},deselectNode:()=>{c.classList.remove("ProseMirror-selectednode")}}}}});n.image=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js"}],"../node_modules/prosemirror-schema-list/dist/index.es.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addListNodes=function(e,t,n){return e.append({ordered_list:d(c,{content:"list_item+",group:n}),bullet_list:d(l,{content:"list_item+",group:n}),list_item:d(u,{content:t})})},n.liftListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=s.blockRange(a,function(t){return t.childCount&&t.firstChild.type==e});return!!c&&(!n||(s.node(c.depth-1).type==e?function(e,t,n,i){var s=e.tr,a=i.end,c=i.$to.end(i.depth);a<c&&(s.step(new r.ReplaceAroundStep(a-1,c,a,c,new o.Slice(o.Fragment.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new o.NodeRange(s.doc.resolve(i.$from.pos),s.doc.resolve(c),i.depth));return t(s.lift(i,(0,r.liftTarget)(i)).scrollIntoView()),!0}(t,n,e,c):function(e,t,n){for(var i=e.tr,s=n.parent,a=n.end,c=n.endIndex-1,l=n.startIndex;c>l;c--)a-=s.child(c).nodeSize,i.delete(a-1,a+1);var u=i.doc.resolve(n.start),d=u.nodeAfter;if(i.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;var f=0==n.startIndex,p=n.endIndex==s.childCount,m=u.node(-1),h=u.index(-1);if(!m.canReplace(h+(f?0:1),h+1,d.content.append(p?o.Fragment.empty:o.Fragment.from(s))))return!1;var g=u.pos,v=g+d.nodeSize;return i.step(new r.ReplaceAroundStep(g-(f?1:0),v+(p?1:0),g+1,v-1,new o.Slice((f?o.Fragment.empty:o.Fragment.from(s.copy(o.Fragment.empty))).append(p?o.Fragment.empty:o.Fragment.from(s.copy(o.Fragment.empty))),f?0:1,p?0:1),f?0:1)),t(i.scrollIntoView()),!0}(t,n,c)))}},n.sinkListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=s.blockRange(a,function(t){return t.childCount&&t.firstChild.type==e});if(!c)return!1;var l=c.startIndex;if(0==l)return!1;var u=c.parent,d=u.child(l-1);if(d.type!=e)return!1;if(n){var f=d.lastChild&&d.lastChild.type==u.type,p=o.Fragment.from(f?e.create():null),m=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(u.type.create(null,p)))),f?3:1,0),h=c.start,g=c.end;n(t.tr.step(new r.ReplaceAroundStep(h-(f?3:1),g,h,g,m,1,!0)).scrollIntoView())}return!0}},n.splitListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=i.node;if(c&&c.isBlock||s.depth<2||!s.sameParent(a))return!1;var l=s.node(-1);if(l.type!=e)return!1;if(0==s.parent.content.size&&s.node(-1).childCount==s.indexAfter(-1)){if(2==s.depth||s.node(-3).type!=e||s.index(-2)!=s.node(-2).childCount-1)return!1;if(n){for(var u=o.Fragment.empty,d=s.index(-1)?1:s.index(-2)?2:3,f=s.depth-d;f>=s.depth-3;f--)u=o.Fragment.from(s.node(f).copy(u));var p=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3;u=u.append(o.Fragment.from(e.createAndFill()));var m=s.before(s.depth-(d-1)),h=t.tr.replace(m,s.after(-p),new o.Slice(u,4-d,0)),g=-1;h.doc.nodesBetween(m,h.doc.content.size,function(e,t){if(g>-1)return!1;e.isTextblock&&0==e.content.size&&(g=t+1)}),g>-1&&h.setSelection(t.selection.constructor.near(h.doc.resolve(g))),n(h.scrollIntoView())}return!0}var v=a.pos==s.end()?l.contentMatchAt(0).defaultType:null,y=t.tr.delete(s.pos,a.pos),b=v&&[null,{type:v}];return!!(0,r.canSplit)(y.doc,s.pos,2,b)&&(n&&n(y.split(s.pos,2,b).scrollIntoView()),!0)}},n.wrapInList=function(e,t){return function(n,i){var s=n.selection,a=s.$from,c=s.$to,l=a.blockRange(c),u=!1,d=l;if(!l)return!1;if(l.depth>=2&&a.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==a.index(l.depth-1))return!1;var f=n.doc.resolve(l.start-2);d=new o.NodeRange(f,f,l.depth),l.endIndex<l.parent.childCount&&(l=new o.NodeRange(a,n.doc.resolve(c.end(l.depth)),l.depth)),u=!0}var p=(0,r.findWrapping)(d,e,t,l);return!!p&&(i&&i(function(e,t,n,i,s){for(var a=o.Fragment.empty,c=n.length-1;c>=0;c--)a=o.Fragment.from(n[c].type.create(n[c].attrs,a));e.step(new r.ReplaceAroundStep(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(a,0,0),n.length,!0));for(var l=0,u=0;u<n.length;u++)n[u].type==s&&(l=u+1);for(var d=n.length-l,f=t.start+n.length-(i?2:0),p=t.parent,m=t.startIndex,h=t.endIndex,g=!0;m<h;m++,g=!1)!g&&(0,r.canSplit)(e.doc,f,d)&&(e.split(f,d),f+=2*d),f+=p.child(m).nodeSize;return e}(n.tr,l,p,u,e).scrollIntoView()),!0)}},n.orderedList=n.listItem=n.bulletList=void 0;var r=e("prosemirror-transform"),o=e("prosemirror-model"),i=["ol",0],s=["ul",0],a=["li",0],c={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}};n.orderedList=c;var l={parseDOM:[{tag:"ul"}],toDOM:function(){return s}};n.bulletList=l;var u={parseDOM:[{tag:"li"}],toDOM:function(){return a},defining:!0};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}n.listItem=u},{"prosemirror-transform":"../node_modules/prosemirror-transform/dist/index.es.js","prosemirror-model":"../node_modules/prosemirror-model/dist/index.es.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/list-item.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.listItem=n.LiftListItem=n.SinkListItem=n.SplitListItem=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("prosemirror-schema-list"),c=e("../supported-keys");const l="list_item",u=(0,o.createCmdKey)();n.SplitListItem=u;const d=(0,o.createCmdKey)();n.SinkListItem=d;const f=(0,o.createCmdKey)();n.LiftListItem=f;const p=(0,s.createNode)(e=>{const t=e.getStyle(e=>r.css`
                                &,
                                & > * {
                                    margin: 0.5rem 0;
                                }

                                &,
                                li {
                                    &::marker {
                                        color: ${e.palette("primary")};
                                    }
                                }
                            `);return{id:l,schema:()=>({group:"listItem",content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:n=>["li",{class:e.getClassName(n.attrs,"list-item",t)},0],parseMarkdown:{match:({type:e,checked:t})=>"listItem"===e&&null===t,runner:(e,t,n)=>{e.openNode(n),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name===l,runner:(e,t)=>{e.openNode("listItem"),e.next(t.content),e.closeNode()}}}),inputRules:e=>[(0,i.wrappingInputRule)(/^\s*([-+*])\s$/,e)],commands:e=>[(0,o.createCmd)(u,()=>(0,a.splitListItem)(e)),(0,o.createCmd)(d,()=>(0,a.sinkListItem)(e)),(0,o.createCmd)(f,()=>(0,a.liftListItem)(e))],shortcuts:{[c.SupportedKeys.NextListItem]:(0,s.createShortcut)(u,"Enter"),[c.SupportedKeys.SinkListItem]:(0,s.createShortcut)(d,"Mod-]"),[c.SupportedKeys.LiftListItem]:(0,s.createShortcut)(f,"Mod-[")}}});n.listItem=p},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","prosemirror-schema-list":"../node_modules/prosemirror-schema-list/dist/index.es.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/ordered-list.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.orderedList=n.WrapInOrderedList=void 0;var r=e("@milkdown/core"),o=e("@milkdown/prose"),i=e("@milkdown/utils"),s=e("../supported-keys");const a=(0,r.createCmdKey)();n.WrapInOrderedList=a;const c="ordered_list",l=(0,i.createNode)(e=>({id:c,schema:()=>({content:"listItem+",group:"block",attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw new Error;return{order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:t=>["ol",Object.assign(Object.assign({},1===t.attrs.order?{}:t.attrs.order),{class:e.getClassName(t.attrs,"ordered-list")}),0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!!t,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===c,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!0,start:1}),e.next(t.content),e.closeNode()}}}),inputRules:e=>[(0,o.wrappingInputRule)(/^(\d+)\.\s$/,e,e=>({order:Number(e[1])}),(e,t)=>t.childCount+t.attrs.order===Number(e[1]))],commands:e=>[(0,r.createCmd)(a,()=>(0,o.wrapIn)(e))],shortcuts:{[s.SupportedKeys.OrderedList]:(0,i.createShortcut)(a,"Mod-Shift-7")}}));n.orderedList=l},{"@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/paragraph.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.paragraph=n.TurnIntoText=void 0;var r=e("@emotion/css"),o=e("@milkdown/core"),i=e("@milkdown/prose"),s=e("@milkdown/utils"),a=e("../supported-keys");const c=(0,o.createCmdKey)();n.TurnIntoText=c;const l="paragraph",u=(0,s.createNode)((e,t)=>{const n=(null==t?void 0:t.headless)?null:r.css`
                            font-size: 1rem;
                            line-height: 1.5;
                            letter-spacing: 0.5px;
                        `;return{id:l,schema:()=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",{class:e.getClassName(t.attrs,l,n)},0],parseMarkdown:{match:e=>"paragraph"===e.type,runner:(e,t,n)=>{e.openNode(n),t.children?e.next(t.children):e.addText(t.value),e.closeNode()}},toMarkdown:{match:e=>"paragraph"===e.type.name,runner:(e,t)=>{e.openNode("paragraph"),e.next(t.content),e.closeNode()}}}),commands:e=>[(0,o.createCmd)(c,()=>(0,i.setBlockType)(e))],shortcuts:{[a.SupportedKeys.Text]:(0,s.createShortcut)(c,"Mod-Alt-0")}}});n.paragraph=u},{"@emotion/css":"../node_modules/@emotion/css/dist/emotion-css.esm.js","@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/prose":"../node_modules/@milkdown/prose/lib/index.js","@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","../supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/text.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=void 0;const r=(0,e("@milkdown/utils").createNode)(()=>({id:"text",schema:()=>({group:"inline",parseMarkdown:{match:({type:e})=>"text"===e,runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>"text"===e.type.name,runner:(e,t)=>{e.addNode("text",void 0,t.text)}}})}));n.text=r},{"@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/node/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={nodes:!0};n.nodes=void 0;var o=e("./blockquote");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))});var i=e("./bullet-list");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./code-fence");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("./doc");Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))});var c=e("./hardbreak");Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))});var l=e("./heading");Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===l[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return l[e]}}))});var u=e("./hr");Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===u[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}}))});var d=e("./image");Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===d[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return d[e]}}))});var f=e("./list-item");Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===f[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return f[e]}}))});var p=e("./ordered-list");Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===p[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return p[e]}}))});var m=e("./paragraph");Object.keys(m).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===m[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return m[e]}}))});var h=e("./text");Object.keys(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===h[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return h[e]}}))});const g=[(0,a.doc)(),(0,m.paragraph)(),(0,c.hardbreak)(),(0,o.blockquote)(),(0,s.codeFence)(),(0,i.bulletList)(),(0,p.orderedList)(),(0,f.listItem)(),(0,l.heading)(),(0,u.hr)(),(0,d.image)(),(0,h.text)()];n.nodes=g},{"./blockquote":"../node_modules/@milkdown/preset-commonmark/lib/node/blockquote.js","./bullet-list":"../node_modules/@milkdown/preset-commonmark/lib/node/bullet-list.js","./code-fence":"../node_modules/@milkdown/preset-commonmark/lib/node/code-fence.js","./doc":"../node_modules/@milkdown/preset-commonmark/lib/node/doc.js","./hardbreak":"../node_modules/@milkdown/preset-commonmark/lib/node/hardbreak.js","./heading":"../node_modules/@milkdown/preset-commonmark/lib/node/heading.js","./hr":"../node_modules/@milkdown/preset-commonmark/lib/node/hr.js","./image":"../node_modules/@milkdown/preset-commonmark/lib/node/image.js","./list-item":"../node_modules/@milkdown/preset-commonmark/lib/node/list-item.js","./ordered-list":"../node_modules/@milkdown/preset-commonmark/lib/node/ordered-list.js","./paragraph":"../node_modules/@milkdown/preset-commonmark/lib/node/paragraph.js","./text":"../node_modules/@milkdown/preset-commonmark/lib/node/text.js"}],"../node_modules/remark-inline-links/node_modules/unist-util-is/convert.js":[function(e,t,n){"use strict";function r(e){if(null==e)return o;if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if("object"==typeof e)return"length"in e?function(e){var t=[],n=-1;for(;++n<e.length;)t[n]=r(e[n]);return function(){var e=-1;for(;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function o(){return!0}t.exports=r},{}],"../node_modules/remark-inline-links/node_modules/unist-util-visit-parents/color.browser.js":[function(e,t,n){t.exports=function(e){return e}},{}],"../node_modules/remark-inline-links/node_modules/unist-util-visit-parents/index.js":[function(e,t,n){"use strict";t.exports=c;var r=e("unist-util-is/convert"),o=e("./color"),i=!0,s="skip",a=!1;function c(e,t,n,c){var l,u;"function"==typeof t&&"function"!=typeof n&&(c=n,n=t,t=null),u=r(t),l=c?-1:1,function e(r,d,f){var p="object"==typeof r&&null!==r?r:{};var m;"string"==typeof p.type&&(m="string"==typeof p.tagName?p.tagName:"string"==typeof p.name?p.name:void 0,h.displayName="node ("+o(p.type+(m?"<"+m+">":""))+")");return h;function h(){var o,p,m=f.concat(r),h=[];if((!t||u(r,d,f[f.length-1]||null))&&(h=function(e){if(null!==e&&"object"==typeof e&&"length"in e)return e;if("number"==typeof e)return[i,e];return[e]}(n(r,f)))[0]===a)return h;if(r.children&&h[0]!==s)for(p=(c?r.children.length:-1)+l;p>-1&&p<r.children.length;){if((o=e(r.children[p],p,m)())[0]===a)return o;p="number"==typeof o[1]?o[1]:p+l}return h}}(e,null,[])()}c.CONTINUE=i,c.SKIP=s,c.EXIT=a},{"unist-util-is/convert":"../node_modules/remark-inline-links/node_modules/unist-util-is/convert.js","./color":"../node_modules/remark-inline-links/node_modules/unist-util-visit-parents/color.browser.js"}],"../node_modules/remark-inline-links/node_modules/unist-util-visit/index.js":[function(e,t,n){"use strict";t.exports=a;var r=e("unist-util-visit-parents"),o=r.CONTINUE,i=r.SKIP,s=r.EXIT;function a(e,t,n,o){"function"==typeof t&&"function"!=typeof n&&(o=n,n=t,t=null),r(e,t,function(e,t){var r=t[t.length-1],o=r?r.children.indexOf(e):null;return n(e,o,r)},o)}a.CONTINUE=o,a.SKIP=i,a.EXIT=s},{"unist-util-visit-parents":"../node_modules/remark-inline-links/node_modules/unist-util-visit-parents/index.js"}],"../node_modules/mdast-util-definitions/node_modules/unist-util-is/convert.js":[function(e,t,n){"use strict";function r(e){if(null==e)return o;if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if("object"==typeof e)return"length"in e?function(e){var t=[],n=-1;for(;++n<e.length;)t[n]=r(e[n]);return function(){var e=-1;for(;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function o(){return!0}t.exports=r},{}],"../node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/color.browser.js":[function(e,t,n){t.exports=function(e){return e}},{}],"../node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/index.js":[function(e,t,n){"use strict";t.exports=c;var r=e("unist-util-is/convert"),o=e("./color"),i=!0,s="skip",a=!1;function c(e,t,n,c){var l,u;"function"==typeof t&&"function"!=typeof n&&(c=n,n=t,t=null),u=r(t),l=c?-1:1,function e(r,d,f){var p="object"==typeof r&&null!==r?r:{};var m;"string"==typeof p.type&&(m="string"==typeof p.tagName?p.tagName:"string"==typeof p.name?p.name:void 0,h.displayName="node ("+o(p.type+(m?"<"+m+">":""))+")");return h;function h(){var o,p,m=f.concat(r),h=[];if((!t||u(r,d,f[f.length-1]||null))&&(h=function(e){if(null!==e&&"object"==typeof e&&"length"in e)return e;if("number"==typeof e)return[i,e];return[e]}(n(r,f)))[0]===a)return h;if(r.children&&h[0]!==s)for(p=(c?r.children.length:-1)+l;p>-1&&p<r.children.length;){if((o=e(r.children[p],p,m)())[0]===a)return o;p="number"==typeof o[1]?o[1]:p+l}return h}}(e,null,[])()}c.CONTINUE=i,c.SKIP=s,c.EXIT=a},{"unist-util-is/convert":"../node_modules/mdast-util-definitions/node_modules/unist-util-is/convert.js","./color":"../node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/color.browser.js"}],"../node_modules/mdast-util-definitions/node_modules/unist-util-visit/index.js":[function(e,t,n){"use strict";t.exports=a;var r=e("unist-util-visit-parents"),o=r.CONTINUE,i=r.SKIP,s=r.EXIT;function a(e,t,n,o){"function"==typeof t&&"function"!=typeof n&&(o=n,n=t,t=null),r(e,t,function(e,t){var r=t[t.length-1],o=r?r.children.indexOf(e):null;return n(e,o,r)},o)}a.CONTINUE=o,a.SKIP=i,a.EXIT=s},{"unist-util-visit-parents":"../node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/index.js"}],"../node_modules/mdast-util-definitions/index.js":[function(e,t,n){"use strict";var r=e("unist-util-visit");t.exports=function(e,t){return function(e){return function(t){var n=t&&i(t);return n&&o.call(e,n)?e[n]:null}}(function(e){var t={};if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return r(e,"definition",function(e){var n=i(e.identifier);o.call(t,n)||(t[n]=e)}),t}(e))};var o={}.hasOwnProperty;function i(e){return e.toUpperCase()}},{"unist-util-visit":"../node_modules/mdast-util-definitions/node_modules/unist-util-visit/index.js"}],"../node_modules/remark-inline-links/index.js":[function(e,t,n){"use strict";var r=e("unist-util-visit"),o=e("mdast-util-definitions");t.exports=function(){return function(e){var t=o(e);r(e,function(e,n,o){var i,s,a;if("definition"===e.type)return o.children.splice(n,1),[r.SKIP,n];if(("imageReference"===e.type||"linkReference"===e.type)&&(i=t(e.identifier)))return a="imageReference"===e.type,s={type:a?"image":"link",url:i.url,title:i.title},a?s.alt=e.alt:s.children=e.children,o.children[n]=s,[r.SKIP,n]})}}},{"unist-util-visit":"../node_modules/remark-inline-links/node_modules/unist-util-visit/index.js","mdast-util-definitions":"../node_modules/mdast-util-definitions/index.js"}],"../node_modules/@milkdown/preset-commonmark/lib/plugin/filter-html.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.filterHTMLPlugin=void 0;const r=e=>!!e.children,o=e=>"html"===e.type;n.filterHTMLPlugin=(()=>{return function(e){var t;t=(e=>o(e)?[]:[e]),function e(n,o,i){if(r(n)){const t=[];for(let r=0,o=n.children.length;r<o;r++){const o=e(n.children[r],r,n);if(o)for(let e=0,n=o.length;e<n;e++)t.push(o[e])}n.children=t}return t(n,o,i)}(e,0,null)[0]}})},{}],"../node_modules/@milkdown/preset-commonmark/lib/plugin/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.commonmarkPlugins=void 0;var r,o=e("@milkdown/utils"),i=(r=e("remark-inline-links"))&&r.__esModule?r:{default:r},s=e("./filter-html");const a=[(0,o.createPlugin)(()=>({remarkPlugins:()=>[i.default,s.filterHTMLPlugin]}))()];n.commonmarkPlugins=a},{"@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","remark-inline-links":"../node_modules/remark-inline-links/index.js","./filter-html":"../node_modules/@milkdown/preset-commonmark/lib/plugin/filter-html.js"}],"../node_modules/@milkdown/preset-commonmark/lib/index.js":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={commonmarkNodes:!0,commonmark:!0,commands:!0,commonmarkPlugins:!0};Object.defineProperty(n,"commonmarkPlugins",{enumerable:!0,get:function(){return a.commonmarkPlugins}}),n.commands=n.commonmark=n.commonmarkNodes=void 0;var o=e("@milkdown/utils"),i=e("./mark");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))});var s=e("./node");Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))});var a=e("./plugin"),c=e("./supported-keys");Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))});const l=o.AtomList.create([...s.nodes,...i.marks]);n.commonmarkNodes=l;const u=o.AtomList.create([...a.commonmarkPlugins,...l]);n.commonmark=u;const d={ToggleInlineCode:i.ToggleInlineCode,ToggleItalic:i.ToggleItalic,ToggleLink:i.ToggleLink,ToggleBold:i.ToggleBold,ModifyLink:i.ModifyLink,ModifyImage:s.ModifyImage,WrapInBlockquote:s.WrapInBlockquote,WrapInBulletList:s.WrapInBulletList,WrapInOrderedList:s.WrapInOrderedList,TurnIntoCodeFence:s.TurnIntoCodeFence,TurnIntoHeading:s.TurnIntoHeading,TurnIntoText:s.TurnIntoText,InsertHardbreak:s.InsertHardbreak,InsertHr:s.InsertHr,InsertImage:s.InsertImage,SplitListItem:s.SplitListItem,SinkListItem:s.SinkListItem,LiftListItem:s.LiftListItem};n.commands=d},{"@milkdown/utils":"../node_modules/@milkdown/utils/lib/index.js","./mark":"../node_modules/@milkdown/preset-commonmark/lib/mark/index.js","./node":"../node_modules/@milkdown/preset-commonmark/lib/node/index.js","./plugin":"../node_modules/@milkdown/preset-commonmark/lib/plugin/index.js","./supported-keys":"../node_modules/@milkdown/preset-commonmark/lib/supported-keys.js"}],"../website.jsx":[function(t,n,r){"use strict";var o=t("@milkdown/core"),i=t("@milkdown/theme-nord"),s=t("@milkdown/preset-commonmark");e=function(e){var t=e.readonly,n=e.style,r=e.contentString,a=document.createElement("div");return Object.assign(a.style,n),o.Editor.make().config(function(e){e.set(o.rootCtx,a),e.set(o.editorViewOptionsCtx,{editable:function(){return!t}}),e.set(o.defaultValueCtx,r)}).use(i.nord).use(s.commonmark).create().then(function(){Object.assign(a.childNodes[0].style,n),a.outerHTML=a.childNodes[0].outerHTML}),a}},{"@milkdown/core":"../node_modules/@milkdown/core/lib/index.js","@milkdown/theme-nord":"../node_modules/@milkdown/theme-nord/lib/index.js","@milkdown/preset-commonmark":"../node_modules/@milkdown/preset-commonmark/lib/index.js"}],"../node_modules/.pnpm/parcel-bundler@1.12.5/node_modules/parcel-bundler/src/builtins/hmr-runtime.js":[function(e,t,n){arguments[3];var r=t.bundle.Module;t.bundle.Module=function(e){r.call(this,e),this.hot={data:t.bundle.hotData,_acceptCallbacks:[],_disposeCallbacks:[],accept:function(e){this._acceptCallbacks.push(e||function(){})},dispose:function(e){this._disposeCallbacks.push(e)}},t.bundle.hotData=null};var o=t.bundle.parent;if(!(o&&o.isParcelRequire||"undefined"==typeof WebSocket))location.hostname,location.protocol},{}]},{},["../node_modules/.pnpm/parcel-bundler@1.12.5/node_modules/parcel-bundler/src/builtins/hmr-runtime.js","../website.jsx"]);return e})();
            </script>
            <script>
                /*!
                * Socket.IO v4.0.1
                * (c) 2014-2021 Guillermo Rauch
                * Released under the MIT License.
                */
                !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}(self,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(t,e,n){var r=n(24),o=n(25),i=String.fromCharCode(30);t.exports={protocol:4,encodePacket:r,encodePayload:function(t,e){var n=t.length,o=new Array(n),s=0;t.forEach((function(t,c){r(t,!1,(function(t){o[c]=t,++s===n&&e(o.join(i))}))}))},decodePacket:o,decodePayload:function(t,e){for(var n=t.split(i),r=[],s=0;s<n.length;s++){var c=o(n[s],e);if(r.push(c),"error"===c.type)break}return r}}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=n(0),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(a,t);var e,n,r,c=s(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=c.call(this)).opts=t,e.query=t.query,e.readyState="",e.socket=t.socket,e}return e=a,(n=[{key:"onError",value:function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(t){"open"===this.readyState&&this.write(t)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,this.emit("open")}},{key:"onData",value:function(t){var e=u.decodePacket(t,this.socket.binaryType);this.onPacket(e)}},{key:"onPacket",value:function(t){this.emit("packet",t)}},{key:"onClose",value:function(){this.readyState="closed",this.emit("close")}}])&&o(e.prototype,n),r&&o(e,r),a}(n(1));t.exports=f},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;var l,h=n(1),y=n(30),d=n(15);e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(l=e.PacketType||(e.PacketType={}));var v=function(){function t(){u(this,t)}return p(t,[{key:"encode",value:function(t){return t.type!==l.EVENT&&t.type!==l.ACK||!d.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===l.EVENT?l.BINARY_EVENT:l.BINARY_ACK,this.encodeAsBinary(t))}},{key:"encodeAsString",value:function(t){var e=""+t.type;return t.type!==l.BINARY_EVENT&&t.type!==l.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data)),e}},{key:"encodeAsBinary",value:function(t){var e=y.deconstructPacket(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}}]),t}();e.Encoder=v;var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(n,t);var e=s(n);function n(){return u(this,n),e.call(this)}return p(n,[{key:"add",value:function(t){var e;if("string"==typeof t)(e=this.decodeString(t)).type===l.BINARY_EVENT||e.type===l.BINARY_ACK?(this.reconstructor=new m(e),0===e.attachments&&o(a(n.prototype),"emit",this).call(this,"decoded",e)):o(a(n.prototype),"emit",this).call(this,"decoded",e);else{if(!d.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,o(a(n.prototype),"emit",this).call(this,"decoded",e))}}},{key:"decodeString",value:function(t){var e=0,r={type:Number(t.charAt(0))};if(void 0===l[r.type])throw new Error("unknown packet type "+r.type);if(r.type===l.BINARY_EVENT||r.type===l.BINARY_ACK){for(var o=e+1;"-"!==t.charAt(++e)&&e!=t.length;);var i=t.substring(o,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===t.charAt(e+1)){for(var s=e+1;++e;){if(","===t.charAt(e))break;if(e===t.length)break}r.nsp=t.substring(s,e)}else r.nsp="/";var c=t.charAt(e+1);if(""!==c&&Number(c)==c){for(var a=e+1;++e;){var u=t.charAt(e);if(null==u||Number(u)!=u){--e;break}if(e===t.length)break}r.id=Number(t.substring(a,e+1))}if(t.charAt(++e)){var f=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e));if(!n.isPayloadValid(r.type,f))throw new Error("invalid payload");r.data=f}return r}},{key:"destroy",value:function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}],[{key:"isPayloadValid",value:function(t,e){switch(t){case l.CONNECT:return"object"===r(e);case l.DISCONNECT:return void 0===e;case l.CONNECT_ERROR:return"string"==typeof e||"object"===r(e);case l.EVENT:case l.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case l.ACK:case l.BINARY_ACK:return Array.isArray(e)}}}]),n}(h);e.Decoder=b;var m=function(){function t(e){u(this,t),this.packet=e,this.buffers=[],this.reconPack=e}return p(t,[{key:"takeBinaryData",value:function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=y.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),t}()},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s,c,a=n.exec(t||""),u={},f=14;f--;)u[r[f]]=a[f]||"";return-1!=o&&-1!=i&&(u.source=e,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,e){var n=e.replace(/\/{2,9}/g,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||n.splice(0,1);"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1);return n}(0,u.path),u.queryKey=(s=u.query,c={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(c[e]=n)})),c),u}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;var u=n(20),f=n(14),p=n(5),l=n(16),h=n(31),y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(y,t);var e,n,c,a=s(y);function y(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),(n=a.call(this)).nsps={},n.subs=[],t&&"object"===r(t)&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",n.opts=e,n.reconnection(!1!==e.reconnection),n.reconnectionAttempts(e.reconnectionAttempts||1/0),n.reconnectionDelay(e.reconnectionDelay||1e3),n.reconnectionDelayMax(e.reconnectionDelayMax||5e3),n.randomizationFactor(e.randomizationFactor||.5),n.backoff=new h({min:n.reconnectionDelay(),max:n.reconnectionDelayMax(),jitter:n.randomizationFactor()}),n.timeout(null==e.timeout?2e4:e.timeout),n._readyState="closed",n.uri=t;var o=e.parser||p;return n.encoder=new o.Encoder,n.decoder=new o.Decoder,n._autoConnect=!1!==e.autoConnect,n._autoConnect&&n.open(),n}return e=y,(n=[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=u(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var o=l.on(n,"open",(function(){r.onopen(),t&&t()})),i=l.on(n,"error",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;0===s&&o();var c=setTimeout((function(){o(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref&&c.unref(),this.subs.push((function(){clearTimeout(c)}))}return this.subs.push(o),this.subs.push(i),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){this.decoder.add(t)}},{key:"ondecoded",value:function(t){this.emitReserved("packet",t)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n||(n=new f.Socket(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e<n.length;e++){var r=n[e];if(this.nsps[r].active)return}this._close()}},{key:"_packet",value:function(t){for(var e=this.encoder.encode(t),n=0;n<e.length;n++)this.engine.write(e[n],t.options)}},{key:"cleanup",value:function(){this.subs.forEach((function(t){return t()})),this.subs.length=0,this.decoder.destroy()}},{key:"_close",value:function(){this.skipReconnect=!0,this._reconnecting=!1,"opening"===this._readyState&&this.cleanup(),this.backoff.reset(),this._readyState="closed",this.engine&&this.engine.close()}},{key:"disconnect",value:function(){return this._close()}},{key:"onclose",value:function(t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:function(){var t=this;if(this._reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=setTimeout((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}])&&o(e.prototype,n),c&&o(e,c),y}(n(17).StrictEventEmitter);e.Manager=y},function(t,e,n){var r=n(9),o=n(23),i=n(27),s=n(28);e.polling=function(t){var e=!1,n=!1,s=!1!==t.jsonp;if("undefined"!=typeof location){var c="https:"===location.protocol,a=location.port;a||(a=c?443:80),e=t.hostname!==location.hostname||a!==t.port,n=t.secure!==c}if(t.xdomain=e,t.xscheme=n,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!s)throw new Error("JSONP disabled");return new i(t)},e.websocket=s},function(t,e,n){var r=n(22),o=n(2);t.exports=function(t){var e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(t){}if(!e)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}function a(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=n(3),p=n(4),l=n(0),h=n(12),y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(u,t);var e,n,r,a=c(u);function u(){return o(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(t){var e=this;function n(){e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})))}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emit("poll")}},{key:"onData",value:function(t){var e=this;l.decodePayload(t,this.socket.binaryType).forEach((function(t,n,r){if("opening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var t=this;function e(){t.write([{type:"close"}])}"open"===this.readyState?e():this.once("open",e)}},{key:"write",value:function(t){var e=this;this.writable=!1,l.encodePayload(t,(function(t){e.doWrite(t,(function(){e.writable=!0,e.emit("drain")}))}))}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"https":"http",n="";return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=h()),this.supportsBinary||t.sid||(t.b64=1),t=p.encode(t),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),t.length&&(t="?"+t),e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}},{key:"name",get:function(){return"polling"}}])&&i(e.prototype,n),r&&i(e,r),u}(f);t.exports=y},function(t,e){var n=Object.create(null);n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";var r=Object.create(null);Object.keys(n).forEach((function(t){r[n[t]]=t}));t.exports={PACKET_TYPES:n,PACKET_TYPES_REVERSE:r,ERROR_PACKET:{type:"error",data:"parser error"}}},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,c=0;function a(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=a(+new Date);return t!==r?(s=0,r=t):t+"."+a(s++)}for(;c<64;c++)i[o[c]]=c;u.encode=a,u.decode=function(t){var e=0;for(c=0;c<t.length;c++)e=64*e+i[t.charAt(c)];return e},t.exports=u},function(t,e){t.exports.pick=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e}),{})}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,c=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return c=t.done,t},e:function(t){a=!0,s=t},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw s}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;var l=n(5),h=n(16),y=n(17),d=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(f,t);var e,n,r,i=u(f);function f(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(r=i.call(this)).receiveBuffer=[],r.sendBuffer=[],r.ids=0,r.acks={},r.flags={},r.io=t,r.nsp=e,r.ids=0,r.acks={},r.receiveBuffer=[],r.sendBuffer=[],r.connected=!1,r.disconnected=!0,r.flags={},n&&n.auth&&(r.auth=n.auth),r.io._autoConnect&&r.open(),r}return e=f,(n=[{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs=[h.on(t,"open",this.onopen.bind(this)),h.on(t,"packet",this.onpacket.bind(this)),h.on(t,"error",this.onerror.bind(this)),h.on(t,"close",this.onclose.bind(this))]}}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.unshift("message"),this.emit.apply(this,e),this}},{key:"emit",value:function(t){if(d.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.unshift(t);var o={type:l.PacketType.EVENT,data:n,options:{}};o.options.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]&&(this.acks[this.ids]=n.pop(),o.id=this.ids++);var i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable,s=this.flags.volatile&&(!i||!this.connected);return s||(this.connected?this.packet(o):this.sendBuffer.push(o)),this.flags={},this}},{key:"packet",value:function(t){t.nsp=this.nsp,this.io._packet(t)}},{key:"onopen",value:function(){var t=this;"function"==typeof this.auth?this.auth((function(e){t.packet({type:l.PacketType.CONNECT,data:e})})):this.packet({type:l.PacketType.CONNECT,data:this.auth})}},{key:"onerror",value:function(t){this.connected||this.emitReserved("connect_error",t)}},{key:"onclose",value:function(t){this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",t)}},{key:"onpacket",value:function(t){if(t.nsp===this.nsp)switch(t.type){case l.PacketType.CONNECT:if(t.data&&t.data.sid){var e=t.data.sid;this.onconnect(e)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case l.PacketType.EVENT:case l.PacketType.BINARY_EVENT:this.onevent(t);break;case l.PacketType.ACK:case l.PacketType.BINARY_ACK:this.onack(t);break;case l.PacketType.DISCONNECT:this.ondisconnect();break;case l.PacketType.CONNECT_ERROR:var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}}},{key:"onevent",value:function(t){var e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}},{key:"emitEvent",value:function(t){if(this._anyListeners&&this._anyListeners.length){var e,n=o(this._anyListeners.slice());try{for(n.s();!(e=n.n()).done;)e.value.apply(this,t)}catch(t){n.e(t)}finally{n.f()}}c(p(f.prototype),"emit",this).apply(this,t)}},{key:"ack",value:function(t){var e=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e.packet({type:l.PacketType.ACK,id:t,data:o})}}}},{key:"onack",value:function(t){var e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}},{key:"onconnect",value:function(t){this.id=t,this.connected=!0,this.disconnected=!1,this.emitReserved("connect"),this.emitBuffered()}},{key:"emitBuffered",value:function(){var t=this;this.receiveBuffer.forEach((function(e){return t.emitEvent(e)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(e){return t.packet(e)})),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.destroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach((function(t){return t()})),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&this.packet({type:l.PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect()}},{key:"compress",value:function(t){return this.flags.compress=t,this}},{key:"onAny",value:function(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}},{key:"prependAny",value:function(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}},{key:"offAny",value:function(t){if(!this._anyListeners)return this;if(t){for(var e=this._anyListeners,n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){return this._anyListeners||[]}},{key:"active",get:function(){return!!this.subs}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}}])&&s(e.prototype,n),r&&s(e,r),f}(y.StrictEventEmitter);e.Socket=v},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;var o="function"==typeof ArrayBuffer,i=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),c="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);function a(t){return o&&(t instanceof ArrayBuffer||function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}(t))||s&&t instanceof Blob||c&&t instanceof File}e.isBinary=a,e.hasBinary=function t(e,n){if(!e||"object"!==r(e))return!1;if(Array.isArray(e)){for(var o=0,i=e.length;o<i;o++)if(t(e[o]))return!0;return!1}if(a(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.StrictEventEmitter=void 0;var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(p,t);var e,n,r,u=a(p);function p(){return o(this,p),u.apply(this,arguments)}return e=p,(n=[{key:"on",value:function(t,e){return s(f(p.prototype),"on",this).call(this,t,e),this}},{key:"once",value:function(t,e){return s(f(p.prototype),"once",this).call(this,t,e),this}},{key:"emit",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(e=s(f(p.prototype),"emit",this)).call.apply(e,[this,t].concat(r)),this}},{key:"emitReserved",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(e=s(f(p.prototype),"emit",this)).call.apply(e,[this,t].concat(r)),this}},{key:"listeners",value:function(t){return s(f(p.prototype),"listeners",this).call(this,t)}}])&&i(e.prototype,n),r&&i(e,r),p}(n(1));e.StrictEventEmitter=p},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.io=e.Manager=e.protocol=void 0;var o=n(19),i=n(7),s=n(14);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}}),t.exports=e=a;var c=e.managers={};function a(t,e){"object"===r(t)&&(e=t,t=void 0),e=e||{};var n,s=o.url(t,e.path),a=s.source,u=s.id,f=s.path,p=c[u]&&f in c[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||p?n=new i.Manager(a,e):(c[u]||(c[u]=new i.Manager(a,e)),n=c[u]),s.query&&!e.query&&(e.query=s.queryKey),n.socket(s.path,e)}e.io=a;var u=n(5);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.connect=a;var f=n(7);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return f.Manager}}),e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;var r=n(6);e.url=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),o=r(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";var i=-1!==o.host.indexOf(":"),s=i?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(n&&n.port===o.port?"":":"+o.port),o}},function(t,e,n){var r=n(21);t.exports=function(t,e){return new r(t,e)},t.exports.Socket=r,t.exports.protocol=r.protocol,t.exports.Transport=n(3),t.exports.transports=n(8),t.exports.parser=n(0)},function(t,e,n){function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=n(8),l=n(1),h=n(0),y=n(6),d=n(4),v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,n,u,f=a(l);function l(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,l),e=f.call(this),t&&"object"===o(t)&&(n=t,t=null),t?(t=y(t),n.hostname=t.host,n.secure="https"===t.protocol||"wss"===t.protocol,n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=y(n.host).host),e.secure=null!=n.secure?n.secure:"undefined"!=typeof location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=e.secure?"443":"80"),e.hostname=n.hostname||("undefined"!=typeof location?location.hostname:"localhost"),e.port=n.port||("undefined"!=typeof location&&location.port?location.port:e.secure?443:80),e.transports=n.transports||["polling","websocket"],e.readyState="",e.writeBuffer=[],e.prevBufferLen=0,e.opts=r({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,jsonp:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{}},n),e.opts.path=e.opts.path.replace(/\/$/,"")+"/","string"==typeof e.opts.query&&(e.opts.query=d.decode(e.opts.query)),e.id=null,e.upgrades=null,e.pingInterval=null,e.pingTimeout=null,e.pingTimeoutTimer=null,"function"==typeof addEventListener&&(addEventListener("beforeunload",(function(){e.transport&&(e.transport.removeAllListeners(),e.transport.close())}),!1),"localhost"!==e.hostname&&(e.offlineEventListener=function(){e.onClose("transport close")},addEventListener("offline",e.offlineEventListener,!1))),e.open(),e}return e=l,(n=[{key:"createTransport",value:function(t){var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.opts.query);e.EIO=h.protocol,e.transport=t,this.id&&(e.sid=this.id);var n=r({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new p[t](n)}},{key:"open",value:function(){var t;if(this.opts.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout((function(){e.emit("error","No transports available")}),0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",(function(){e.onDrain()})).on("packet",(function(t){e.onPacket(t)})).on("error",(function(t){e.onError(t)})).on("close",(function(){e.onClose("transport close")}))}},{key:"probe",value:function(t){var e=this.createTransport(t,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var t=!this.supportsBinary&&r.transport.supportsBinary;n=n||t}n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(t){if(!n)if("pong"===t.type&&"probe"===t.data){if(r.upgrading=!0,r.emit("upgrading",e),!e)return;l.priorWebsocketSuccess="websocket"===e.name,r.transport.pause((function(){n||"closed"!==r.readyState&&(f(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())}))}else{var o=new Error("probe error");o.transport=e.name,r.emit("upgradeError",o)}})))}function i(){n||(n=!0,f(),e.close(),e=null)}function s(t){var n=new Error("probe error: "+t);n.transport=e.name,i(),r.emit("upgradeError",n)}function c(){s("transport closed")}function a(){s("socket closed")}function u(t){e&&t.name!==e.name&&i()}function f(){e.removeListener("open",o),e.removeListener("error",s),e.removeListener("close",c),r.removeListener("close",a),r.removeListener("upgrading",u)}l.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",s),e.once("close",c),this.once("close",a),this.once("upgrading",u),e.open()}},{key:"onOpen",value:function(){if(this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},{key:"onPacket",value:function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}}},{key:"onHandshake",value:function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var t=this;clearTimeout(this.pingTimeoutTimer),this.pingTimeoutTimer=setTimeout((function(){t.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()}},{key:"flush",value:function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this;function e(){t.onClose("forced close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function r(){t.once("upgrade",n),t.once("upgradeError",n)}return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){l.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}])&&s(e.prototype,n),u&&s(e,u),l}(l);v.priorWebsocketSuccess=!1,v.protocol=h.protocol,t.exports=v},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=n(9),y=n(10),d=n(1),v=n(13).pick,b=n(2);function m(){}var g=null!=new h({xdomain:!1}).responseType,k=function(t){a(n,t);var e=f(n);function n(t){var r;if(i(this,n),r=e.call(this,t),"undefined"!=typeof location){var o="https:"===location.protocol,s=location.port;s||(s=o?443:80),r.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port,r.xs=t.secure!==o}var c=t&&t.forceBase64;return r.supportsBinary=g&&!c,r}return c(n,[{key:"request",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t,{xd:this.xd,xs:this.xs},this.opts),new w(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this.request({method:"POST",data:t}),r=this;n.on("success",e),n.on("error",(function(t){r.onError("xhr post error",t)}))}},{key:"doPoll",value:function(){var t=this.request(),e=this;t.on("data",(function(t){e.onData(t)})),t.on("error",(function(t){e.onError("xhr poll error",t)})),this.pollXhr=t}}]),n}(y),w=function(t){a(n,t);var e=f(n);function n(t,r){var o;return i(this,n),(o=e.call(this)).opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return c(n,[{key:"create",value:function(){var t=v(this.opts,"agent","enablesXDR","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;var e=this.xhr=new h(t),r=this;try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var o in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.opts.extraHeaders[o])}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),this.hasXDR()?(e.onload=function(){r.onLoad()},e.onerror=function(){r.onError(e.responseText)}):e.onreadystatechange=function(){4===e.readyState&&(200===e.status||1223===e.status?r.onLoad():setTimeout((function(){r.onError("number"==typeof e.status?e.status:0)}),0))},e.send(this.data)}catch(t){return void setTimeout((function(){r.onError(t)}),0)}"undefined"!=typeof document&&(this.index=n.requestsCount++,n.requests[this.index]=this)}},{key:"onSuccess",value:function(){this.emit("success"),this.cleanup()}},{key:"onData",value:function(t){this.emit("data",t),this.onSuccess()}},{key:"onError",value:function(t){this.emit("error",t),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=m:this.xhr.onreadystatechange=m,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete n.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&this.onData(t)}},{key:"hasXDR",value:function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR}},{key:"abort",value:function(){this.cleanup()}}]),n}(d);if(w.requestsCount=0,w.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",_);else if("function"==typeof addEventListener){addEventListener("onpagehide"in b?"pagehide":"unload",_,!1)}function _(){for(var t in w.requests)w.requests.hasOwnProperty(t)&&w.requests[t].abort()}t.exports=k,t.exports.Request=w},function(t,e,n){var r=n(11).PACKET_TYPES,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,s=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)};t.exports=function(t,e,n){var c,a=t.type,u=t.data;return o&&u instanceof Blob?e?n(u):s(u,n):i&&(u instanceof ArrayBuffer||(c=u,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?e?n(u instanceof ArrayBuffer?u:u.buffer):s(new Blob([u]),n):n(r[a]+(u||""))}},function(t,e,n){var r,o=n(11),i=o.PACKET_TYPES_REVERSE,s=o.ERROR_PACKET;"function"==typeof ArrayBuffer&&(r=n(26));var c=function(t,e){if(r){var n=r.decode(t);return a(n,e)}return{base64:!0,data:t}},a=function(t,e){switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}};t.exports=function(t,e){if("string"!=typeof t)return{type:"message",data:a(t,e)};var n=t.charAt(0);return"b"===n?{type:"message",data:c(t.substring(1),e)}:i[n]?t.length>1?{type:i[n],data:t.substring(1)}:{type:i[n]}:s}},function(t,e){!function(t){"use strict";e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(e){var n,r,o,i,s,c=.75*e.length,a=e.length,u=0;"="===e[e.length-1]&&(c--,"="===e[e.length-2]&&c--);var f=new ArrayBuffer(c),p=new Uint8Array(f);for(n=0;n<a;n+=4)r=t.indexOf(e[n]),o=t.indexOf(e[n+1]),i=t.indexOf(e[n+2]),s=t.indexOf(e[n+3]),p[u++]=r<<2|o>>4,p[u++]=(15&o)<<4|i>>2,p[u++]=(3&i)<<6|63&s;return f}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return(i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}function a(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?u(t):e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p,l=n(10),h=n(2),y=/\n/g,d=/\\n/g,v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,r,a=c(l);function l(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this,t)).query=e.query||{},p||(p=h.___eio=h.___eio||[]),e.index=p.length;var n=u(e);return p.push((function(t){n.onData(t)})),e.query.j=e.index,e}return e=l,(n=[{key:"doClose",value:function(){this.script&&(this.script.onerror=function(){},this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i(f(l.prototype),"doClose",this).call(this)}},{key:"doPoll",value:function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)}},{key:"doWrite",value:function(t,e){var n,r=this;if(!this.form){var o=document.createElement("form"),i=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=s,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function c(){a(),e()}function a(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(t){r.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+r.iframeId+'">';n=document.createElement(t)}catch(t){(n=document.createElement("iframe")).name=r.iframeId,n.src="javascript:0"}n.id=r.iframeId,r.form.appendChild(n),r.iframe=n}this.form.action=this.uri(),a(),t=t.replace(d,"\\\n"),this.area.value=t.replace(y,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&c()}:this.iframe.onload=c}},{key:"supportsBinary",get:function(){return!1}}])&&o(e.prototype,n),r&&o(e,r),l}(l);t.exports=v},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=n(3),f=n(0),p=n(4),l=n(12),h=n(13).pick,y=n(29),d=y.WebSocket,v=y.usingBrowserWebSocket,b=y.defaultBinaryType,m="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(a,t);var e,n,r,c=s(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=c.call(this,t)).supportsBinary=!t.forceBase64,e}return e=a,(n=[{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=m?{}:h(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=v&&!m?e?new d(t,e):new d(t):new d(t,e,n)}catch(t){return this.emit("error",t)}this.ws.binaryType=this.socket.binaryType||b,this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=t.length,r=0,o=n;r<o;r++)!function(t){f.encodePacket(t,e.supportsBinary,(function(r){var o={};v||(t.options&&(o.compress=t.options.compress),e.opts.perMessageDeflate&&("string"==typeof r?Buffer.byteLength(r):r.length)<e.opts.perMessageDeflate.threshold&&(o.compress=!1));try{v?e.ws.send(r):e.ws.send(r,o)}catch(t){}--n||(e.emit("flush"),setTimeout((function(){e.writable=!0,e.emit("drain")}),0))}))}(t[r])}},{key:"onClose",value:function(){u.prototype.onClose.call(this)}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"wss":"ws",n="";return this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=l()),this.supportsBinary||(t.b64=1),(t=p.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}},{key:"check",value:function(){return!(!d||"__initialize"in d&&this.name===a.prototype.name)}},{key:"name",get:function(){return"websocket"}}])&&o(e.prototype,n),r&&o(e,r),a}(u);t.exports=g},function(t,e,n){var r=n(2);t.exports={WebSocket:r.WebSocket||r.MozWebSocket,usingBrowserWebSocket:!0,defaultBinaryType:"arraybuffer"}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;var o=n(15);e.deconstructPacket=function(t){var e=[],n=t.data,i=t;return i.data=function t(e,n){if(!e)return e;if(o.isBinary(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(Array.isArray(e)){for(var s=new Array(e.length),c=0;c<e.length;c++)s[c]=t(e[c],n);return s}if("object"===r(e)&&!(e instanceof Date)){var a={};for(var u in e)e.hasOwnProperty(u)&&(a[u]=t(e[u],n));return a}return e}(n,e),i.attachments=e.length,{packet:i,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(Array.isArray(e))for(var o=0;o<e.length;o++)e[o]=t(e[o],n);else if("object"===r(e))for(var i in e)e.hasOwnProperty(i)&&(e[i]=t(e[i],n));return e}(t.data,e),t.attachments=void 0,t}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}}])}));
                //# sourceMappingURL=socket.io.min.js.map
            </script>
            <title>Silver Spectacle</title>
            <style>
                :root {
                    --font-color: black;
                    --light-red: #f07178;
                    --solid-red: #ff5572;
                    --light-theme--back-distance-1: whitesmoke;
                    --light-theme--back-distance-2: white;
                    --dark-theme--back-distance-1: 37, 42, 50;
                    --dark-theme--back-distance-2: 55, 62, 77;
                    --back-distance-1: var(--dark-theme--back-distance-1);
                    --back-distance-2: var(--dark-theme--back-distance-2);
                    /* milkdown vars */
                    --neutral: 236, 239, 244 !important;
                    --solid: 216, 222, 233 !important;
                    --line: 67, 76, 94 !important;
                    --background: var(--back-distance-1) !important;
                    --surface: var(--back-distance-2) !important;
                    --css-baseline-scrollbar-background: rgb(var(--back-distance-1));
                }
                /* custom styles */
                body {
                    display: flex;
                    flex-direction: column;
                    align-items: center; /* horizontal */ 
                    justify-content: flex-start; /* vertical */
                    background: rgb(var(--back-distance-1));
                    max-width: 100vw;
                    overflow-x: hidden;
                    overflow-y: hidden;
                }
                #stream-container {
                    display: flex;
                    flex-direction: column-reverse;
                    justify-content: flex-start;
                    align-items: flex-start;
                    width: 60rem;
                    max-width: calc(100vw - 2rem);
                    transition: all 0.5s ease-in-out 0s;
                    padding: 6rem 3rem;
                    overflow-y: auto;
                    max-height: 100vh;
                    box-sizing: border-box;
                }
                /* Hide scrollbar for Chrome, Safari and Opera */
                #stream-container::-webkit-scrollbar {
                    display: none;
                }
                /* Hide scrollbar for IE, Edge and Firefox */
                #stream-container {
                    -ms-overflow-style: none;  /* IE and Edge */
                    scrollbar-width: none;  /* Firefox */
                } 
                #stream-container > .card {
                    margin-bottom: 4.5rem;
                }
                .button {
                    --accent-color: white;
                    background-color: var(--light-red);
                    border: 3px solid var(--accent-color);
                    border-radius: 2rem;
                    padding: 0.6rem 0.8rem;
                    color: var(--accent-color);
                    cursor: pointer;
                    font-size: 1.1rem;
                    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
                    outline: none;
                }
                .button:hover {
                    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
                }
                .card {
                    position: relative;
                    padding: 1rem;
                    border-radius: 1rem;
                    flex-shrink: 0;
                    background-color: rgb(var(--back-distance-2));
                    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
                    display: flex;
                    flex-direction: column;
                    align-items: center; /* vertical */ 
                    justify-content: center; /* horizontal */
                    transition: all 0.2s ease-in-out 0s;
                    box-sizing: border-box;
                    width: 100%;
                    min-height: 5rem;
                }
                .card:hover {
                    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
                }
                .x-out-button {
                    position: absolute;
                    right: 0;
                    top: 0;
                    transform: translate(50%, -50%);
                    display: flex;
                    align-items: center;
                    justify-items: center;
                    justify-content: center;
                    align-content: center;
                    border-radius: 0.3rem;
                    background-color: var(--light-red);
                    color: white;
                    aspect-ratio: 1;
                    width: 2rem;
                    opacity: 0;
                    transition: all 0.2s ease-in-out 0s;
                    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
                }
                *:hover > .x-out-button {
                    opacity: 0.8;
                }
                body .x-out-button:hover {
                    opacity: 1;
                    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
                }
                .stop-button {
                    transition: all 0.2s ease-in-out 0s;
                    transform: scale(1);
                    z-index: 100;
                    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
                    border-radius: 0.8rem;
                    background-color: rgb(var(--back-distance-2));
                    color: var(--light-red);
                    position: fixed;
                    bottom: 30px;
                    left: 30px;
                    border: 2px solid var(--light-red);
                    padding: 0.8rem;
                    cursor: pointer;
                    outline: none;
                }
                .stop-button:hover {
                    transform: scale(1.1);
                }
                #log {
                    display: flex;
                    flex-direction: column;
                    align-items: flex-start; /* horizontal */ 
                    justify-content: flex-end; /* vertical */
                    position: fixed;
                    bottom: 30px;
                    right: 30px;
                    width: 15rem;
                    padding: 1rem;
                    overflow: auto;
                }
                body div .milkdown .editor {
                    --milkdown-vertical-padding: 0;
                    --milkdown-horizontal-padding: 3.25rem;
                    padding-top: var(--milkdown-vertical-padding);
                    padding-bottom: var(--milkdown-vertical-padding);
                    padding-left: var(--milkdown-horizontal-padding);
                    padding-right: var(--milkdown-horizontal-padding);
                }
            </style>
            <style>
                '''+args.custom_css+r'''
            </style>
        </head>
        <body>
            <div id="stream-container"></div>
            <div id="log"></div>
        </body>
        <script>
            //
            // main object
            //
                const silverSpectacle = {
                    libraries: {}
                }
            
            //
            // wrapper (to avoid polluting the global namespace)
            //
            ;((()=>{
                // create the stop button immediately (so that critical errors can be resolved)
                document.body.appendChild(createstopButton())
                
                //
                //
                // helper tools
                //
                //
                    // simple get requests
                    const get = async (url) => new Promise((resolve, reject) =>
                        fetch(url).then(function(response) {
                                return response.json();
                            }).then(function(data) {
                                resolve(data);
                            }).catch(function() {
                                reject()
                            })
                        )
                    
                    // simple post requests
                    const post = ({data=null, to=null}) => new Promise(
                            function (resolve, reject) {
                                let theRequest = new XMLHttpRequest()
                                theRequest.onload = function () {
                                    if (this.status >= 200 && this.status < 300) {
                                        try { var output = JSON.parse(theRequest.responseText) }
                                        catch (error) { var output = theRequest.responseText }
                                        resolve(output)
                                    }
                                    else {
                                        reject({
                                            status: this.status,
                                            statusText: theRequest.statusText
                                        })
                                    }
                                }
                                theRequest.onerror = function () {
                                    reject({
                                        status: this.status,
                                        statusText: theRequest.statusText
                                    })
                                }
                                theRequest.open("POST", to, true)
                                theRequest.setRequestHeader('Content-Type', 'application/json; charset=UTF-8')
                                theRequest.send(JSON.stringify(data))
                            }
                        )
                    
                    // basic visual logging tool
                    silverSpectacle.log = (message) => {
                            let span = document.createElement("span")
                            span.innerHTML = message.replace('\n', "<br>")
                            span.style.marginTop = "15px"
                            span.style.color = "gray"
                            logElement.appendChild(span)
                        }
                        const logElement = document.getElementById("log")
                    
                    // setup chart.js
                    silverSpectacle.libraries.Chart = (function chartSetup() {
                            let globalThis = {}
                            /*!
                            * Chart.js v3.5.0
                            * https://www.chartjs.org
                            * (c) 2021 Chart.js Contributors
                            * Released under the MIT License
                            */
                            !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
                            /*!
                            * @kurkle/color v0.1.9
                            * https://github.com/kurkle/color#readme
                            * (c) 2020 Jukka Kurkela
                            * Released under the MIT License
                            */
                            const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},T={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let A;function L(t){A||(A=function(){const t={},e=Object.keys(T),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(T[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function z(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||z(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function B(t){return new F(t)}const V=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return V(t)?t:B(t)}function N(t){return V(t)?t:B(t).saturate(.5).darken(.1).hexString()}function H(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ft=Object.create(null),gt=Object.create(null);function pt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function mt(t,e,i){return"string"==typeof e?ot(pt(t,e),i):ot(pt(t,""),e)}var xt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>N(e.backgroundColor),this.hoverBorderColor=(t,e)=>N(e.borderColor),this.hoverColor=(t,e)=>N(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return mt(this,t,e)}get(t){return pt(this,t)}describe(t,e){return mt(gt,t,e)}override(t,e){return mt(ft,t,e)}route(t,e,i,n){const o=pt(this,t),s=pt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const bt=Math.PI,_t=2*bt,yt=_t+bt,vt=Number.POSITIVE_INFINITY,wt=bt/180,Mt=bt/2,kt=bt/4,St=2*bt/3,Pt=Math.log10,Dt=Math.sign;function Ct(t){const e=Math.round(t);t=At(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Pt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Ot(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Lt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Et(t){return t*(bt/180)}function It(t){return t*(180/bt)}function zt(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*bt&&(s+=_t),{angle:s,distance:o}}function Bt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+yt)%_t-bt}function Wt(t){return(t%_t+_t)%_t}function Nt(t,e,i,n){const o=Wt(t),s=Wt(e),a=Wt(i),r=Wt(s-o),l=Wt(a-o),c=Wt(o-s),h=Wt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Ht(t,e,i){return Math.max(e,Math.min(i,t))}function jt(t){return Ht(t,-32768,32767)}function $t(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Yt(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Ut(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=Yt(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=Yt(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Xt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function qt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Kt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*wt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,_t),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+kt)*r,a=Math.sin(u+kt)*r,t.arc(i-s,n-a,l,u-bt,u-Mt),t.arc(i+a,n-s,l,u-Mt,u),t.arc(i+s,n+a,l,u,u+Mt),t.arc(i-a,n+s,l,u+Mt,u+bt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=kt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=kt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=kt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Gt(t,e,i){return i=i||.5,t&&e&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Zt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qt(t){t.restore()}function Jt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);$(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<a.length;++l)c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),ie(t,i,n,c,s),n+=o.lineHeight;t.restore()}function ie(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,c=i+s.actualBoundingBoxDescent,h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,h),t.lineTo(r,h),t.stroke()}}function ne(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,bt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,bt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function oe(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const se=(t,e,i)=>oe(t,i,(n=>t[n][e]<i)),ae=(t,e,i)=>oe(t,i,(n=>t[n][e]>=i));function re(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const le=["push","pop","shift","splice","unshift"];function ce(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),le.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function he(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(le.forEach((e=>{delete t[e]})),delete t._chartjs)}function de(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ue(){return"undefined"!=typeof window&&"undefined"!=typeof document}function fe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ge(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const pe=t=>window.getComputedStyle(t,null);function me(t,e){return pe(t).getPropertyValue(e)}const xe=["top","right","bottom","left"];function be(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=xe[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function _e(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=pe(i),s="border-box"===o.boxSizing,a=be(o,"padding"),r=be(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const ye=t=>Math.round(10*t)/10;function ve(t,e,i,n){const o=pe(t),s=be(o,"margin"),a=ge(o.maxWidth,t,"clientWidth")||vt,r=ge(o.maxHeight,t,"clientHeight")||vt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=fe(t);if(s){const t=s.getBoundingClientRect(),a=pe(s),r=be(a,"border","width"),l=be(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=ge(a.maxWidth,s,"clientWidth"),o=ge(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||vt,maxHeight:o||vt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=be(o,"border","width"),e=be(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=ye(Math.min(c,a,l.maxWidth)),h=ye(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ye(c/2)),{width:c,height:h}}function we(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Me=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ke(t,e){const i=me(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Se(t,e){return"native"in t?{x:t.x,y:t.y}:_e(t,e)}function Pe(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ae:se;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function De(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Pe(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Ce(t,e,i,n){const o=[];if(!Gt(e,t.chartArea,t._minPadding))return o;return De(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function Oe(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Gt(e,t.chartArea,t._minPadding))return r;return De(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Gt(h,t.chartArea,t._minPadding)&&!i.inRange(e.x,e.y,o))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r}function Te(t,e,i,n){const o=Se(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Ae={modes:{index(t,e,i,n){const o=Se(e,t),s=i.axis||"x",a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=Se(e,t),s=i.axis||"xy";let a=i.intersect?Ce(t,o,s,n):Oe(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Ce(t,Se(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Oe(t,Se(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Te(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Te(t,e,i,n))}};const Le=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Re=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ee(t,e){const i=(""+t).match(Le);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Ie(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function ze(t){return Ie(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Fe(t){return Ie(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Be(t){const e=ze(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ve(t,e){t=t||{},e=e||xt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Re)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Ee(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=$t(o),o}function We(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ne(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const He=["left","top","right","bottom"];function je(t,e){return t.filter((t=>t.pos===e))}function $e(t,e){return t.filter((t=>-1===He.indexOf(t.pos)&&t.box.axis===e))}function Ye(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function Ue(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!He.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,a,r;for(s=0,a=t.length;s<a;++s){r=t[s];const{fullSize:a}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*n:a&&e.availableWidth,r.height=o):(r.width=n,r.height=c?c*o:a&&e.availableHeight)}return i}function Xe(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function qe(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ke(t,e,i,n){const{pos:o,box:s}=i,a=t.maxPadding;if(!U(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&qe(a,s.getPadding());const r=Math.max(0,e.outerWidth-Xe(a,t,"left","right")),l=Math.max(0,e.outerHeight-Xe(a,t,"top","bottom")),c=r!==t.w,h=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Ge(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Ze(t,e,i,n){const o=[];let s,a,r,l,c,h;for(s=0,a=t.length,c=0;s<a;++s){r=t[s],l=r.box,l.update(r.width||e.w,r.height||e.h,Ge(r.horizontal,e));const{same:a,other:d}=Ke(e,i,r,n);c|=a&&o.length,h=h||d,l.fullSize||o.push(r)}return c&&Ze(o,e,i,n)||h}function Qe(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Je(t,e,i,n){const o=i.padding;let{x:s,y:a}=e;for(const r of t){const t=r.box,l=n[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const n=e.w*c,s=l.size||t.height;ht(l.start)&&(a=l.start),t.fullSize?Qe(t,o.left,a,i.outerWidth-o.right-o.left,s):Qe(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*c,a=l.size||t.width;ht(l.start)&&(s=l.start),t.fullSize?Qe(t,s,o.top,a,i.outerHeight-o.bottom-o.top):Qe(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}xt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var ti={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Be(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o,s,a,r;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:a,stackWeight:r=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&s+a,stackWeight:r});return e}(t),i=Ye(e.filter((t=>t.box.fullSize)),!0),n=Ye(je(e,"left"),!0),o=Ye(je(e,"right")),s=Ye(je(e,"top"),!0),a=Ye(je(e,"bottom")),r=$e(e,"x"),l=$e(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:je(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);qe(u,Be(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o),g=Ue(l.concat(c),d);Ze(r.fullSize,f,d,g),Ze(l,f,d,g),Ze(c,f,d,g)&&Ze(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Je(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Je(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};function ei(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=ui("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>ei([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ai(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=ui(oi(s,t),i),ht(o))return si(t,o)?hi(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>fi(t).includes(e),ownKeys:t=>fi(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function ii(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ni(t,n),setContext:e=>ii(t,e,i,n),override:o=>ii(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ai(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=hi(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=hi(n,o,t,l);e.push(ii(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));si(e,r)&&(r=ii(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ni(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const oi=(t,e)=>t?t+ct(e):e,si=(t,e)=>U(e)&&"adapters"!==t;function ai(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function ri(t,e,i){return dt(t)?t(e,i):t}const li=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function ci(t,e,i,n){for(const o of e){const e=li(i,o);if(e){t.add(e);const o=ri(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function hi(t,e,i,n){const o=e._rootScopes,s=ri(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=di(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=di(r,a,s,l),null!==l))&&ei(Array.from(r),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Y(o)&&U(i))return i;return o}(e,i,n))))}function di(t,e,i,n){for(;i;)i=ci(t,e,i,n);return i}function ui(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function fi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const gi=Number.EPSILON||1e-14,pi=(t,e)=>e<t.length&&!t[e].skip&&t[e],mi=t=>"x"===t?"y":"x";function xi(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Bt(s,o),l=Bt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function bi(t,e="x"){const i=mi(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=pi(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=pi(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Dt(o[a-1])!==Dt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=pi(t,0);for(let h=0;h<n-1;++h)l=c,c=pi(t,h+1),l&&c&&(At(e[h],0,gi)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=mi(i),o=t.length;let s,a,r,l=pi(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=pi(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function _i(t,e,i){return Math.max(Math.min(t,i),e)}function yi(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)bi(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=xi(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Gt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Gt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=_i(o.cp1x,e.left,e.right),o.cp1y=_i(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=_i(o.cp2x,e.left,e.right),o.cp2y=_i(o.cp2y,e.top,e.bottom)))}(t,i)}const vi=t=>0===t||1===t,wi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/i),Mi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/i)+1,ki={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(bt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>vi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>vi(t)?t:wi(t,.075,.3),easeOutElastic:t=>vi(t)?t:Mi(t,.075,.3),easeInOutElastic(t){const e=.1125;return vi(t)?t:t<.5?.5*wi(2*t,e,.45):.5+.5*Mi(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ki.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ki.easeInBounce(2*t):.5*ki.easeOutBounce(2*t-1)+.5};function Si(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Pi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Di(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Si(t,o,i),r=Si(o,s,i),l=Si(s,e,i),c=Si(a,r,i),h=Si(r,l,i);return Si(c,h,i)}const Ci=new Map;function Oi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ci.get(i);return n||(n=new Intl.NumberFormat(t,e),Ci.set(i,n)),n}(e,i).format(t)}function Ti(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ai(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Li(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ri(t){return"angle"===t?{between:Nt,compare:Vt,normalize:Wt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Ei({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function Ii(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=Ri(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Ri(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(Ei({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Ei({start:_,end:d,loop:u,count:a,style:f})),g}function zi(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=Ii(n[o],t.points,e);s.length&&i.push(...s)}return i}function Fi(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Bi(t,[{start:a,end:r,loop:s}],i,e);return Bi(t,function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Bi(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=Vi(t.options),s=i.length,a=[];let r=e[0].start,l=r;for(const c of e){let e,h=o,d=i[r%s];for(l=r+1;l<=c.end;l++){const o=i[l%s];e=Vi(n.setContext({type:"segment",p0:d,p1:o,p0DataIndex:(l-1)%s,p1DataIndex:l%s,datasetIndex:t._datasetIndex})),Wi(e,h)&&(a.push({start:r,end:l-1,loop:c.loop,style:h}),h=e,r=l-1),d=o,h=e}r<l-1&&(a.push({start:r,end:l-1,loop:c.loop,style:e}),r=l-1)}return a}(t,e,i,n):e}function Vi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Wi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Ni=Object.freeze({__proto__:null,easingEffects:ki,color:W,getHoverColor:N,noop:H,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,setsEqual:ut,toFontString:$t,_measureText:Yt,_longestText:Ut,_alignPixel:Xt,clearCanvas:qt,drawPoint:Kt,_isPointInArea:Gt,clipArea:Zt,unclipArea:Qt,_steppedLineTo:Jt,_bezierCurveTo:te,renderText:ee,addRoundedRectPath:ne,_lookup:oe,_lookupByKey:se,_rlookupByKey:ae,_filterBetween:re,listenArrayEvents:ce,unlistenArrayEvents:he,_arrayUnique:de,_createResolver:ei,_attachContext:ii,_descriptors:ni,splineCurve:xi,splineCurveMonotone:bi,_updateBezierControlPoints:yi,_isDomSupported:ue,_getParentNode:fe,getStyle:me,getRelativePosition:_e,getMaximumSize:ve,retinaScale:we,supportsEventListenerOptions:Me,readUsedSize:ke,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:Si,_steppedInterpolation:Pi,_bezierInterpolation:Di,formatNumber:Oi,toLineHeight:Ee,_readValueToProps:Ie,toTRBL:ze,toTRBLCorners:Fe,toPadding:Be,toFont:Ve,resolve:We,_addGrace:Ne,PI:bt,TAU:_t,PITAU:yt,INFINITY:vt,RAD_PER_DEG:wt,HALF_PI:Mt,QUARTER_PI:kt,TWO_THIRDS_PI:St,log10:Pt,sign:Dt,niceNum:Ct,_factorize:Ot,isNumber:Tt,almostEquals:At,almostWhole:Lt,_setMinAndMaxByKey:Rt,toRadians:Et,toDegrees:It,_decimalPlaces:zt,getAngleFromPoint:Ft,distanceBetweenPoints:Bt,_angleDiff:Vt,_normalizeAngle:Wt,_angleBetween:Nt,_limitValue:Ht,_int16Range:jt,getRtlAdapter:Ti,overrideTextDirection:Ai,restoreTextDirection:Li,_boundSegment:Ii,_boundSegments:zi,_computeSegments:Fi});class Hi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class ji extends Hi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const $i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yi=t=>null===t||""===t;const Ui=!!Me&&{passive:!0};function Xi(t,e,i){t.canvas.removeEventListener(e,i,Ui)}function qi(t,e,i){const n=t.canvas,o=n&&fe(n)||n,s=new MutationObserver((t=>{const e=fe(o);t.forEach((t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}}))}));return s.observe(document,{childList:!0,subtree:!0}),s}function Ki(t,e,i){const n=t.canvas,o=n&&fe(n);if(!o)return;const s=new MutationObserver((t=>{t.forEach((t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}}))}));return s.observe(o,{childList:!0}),s}const Gi=new Map;let Zi=0;function Qi(){const t=window.devicePixelRatio;t!==Zi&&(Zi=t,Gi.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Ji(t,i,n){const o=t.canvas,s=o&&fe(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){Gi.size||window.addEventListener("resize",Qi),Gi.set(t,e)}(t,a),r}function tn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Gi.delete(t),Gi.size||window.removeEventListener("resize",Qi)}(t)}function en(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=$i[t.type]||t.type,{x:n,y:o}=_e(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Ui)}(o,i,s),s}class nn extends Hi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Yi(o)){const e=ke(t,"width");void 0!==e&&(t.width=e)}if(Yi(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ke(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:qi,detach:Ki,resize:Ji}[e]||en;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:tn,detach:tn,resize:tn}[e]||Xi)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ve(t,e,i,n)}isAttached(t){const e=fe(t);return!(!e||!e.isConnected)}}function on(t){return!ue()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ji:nn}var sn=Object.freeze({__proto__:null,_detectPlatform:on,BasePlatform:Hi,BasicPlatform:ji,DomPlatform:nn});const an="transparent",rn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||an),o=n.valid&&W(e||an);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ln{constructor(t,e,i,n){const o=e[i];n=We([t.to,n,o,t.from]);const s=We([t.from,o,n]);this._active=!0,this._fn=t.fn||rn[t.type||typeof s],this._easing=ki[t.easing]||ki.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=We([t.to,e,o,t.from]),n._from=We([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}xt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const cn=Object.keys(xt.animation);xt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),xt.describe("animations",{_fallback:"animation"}),xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class hn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of cn)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new ln(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function dn(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function un(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function fn(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Dt(e)===Dt(c))&&(e+=c)}return e}}function gn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function pn(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function mn(t,e,i){for(const n of e.getMatchingVisibleMetas("bar").reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function xn(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:n,[c]:s}=i;u=(i._stacks||(i._stacks={}))[c]=pn(o,h,n),u[r]=s,u._top=mn(u,a,!0),u._bottom=mn(u,a,!1)}}function bn(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function _n(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const yn=t=>"reset"===t||"none"===t,vn=(t,e)=>e?t:Object.assign({},t);class wn{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=gn(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&_n(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,bn(e,"x")),a=i.yAxisID=K(n.yAxisID,bn(e,"y")),r=i.rAxisID=K(n.rAxisID,bn(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&he(this._data,this),t._stacked&&_n(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(U(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){he(n,t);const e=t._cachedMeta;_n(e),e._parsed=[]}i&&Object.isExtensible(i)&&ce(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=gn(i.vScale,i),i.stack!==n.stack&&(o=!0,_n(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&xn(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&xn(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return fn({keys:un(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=fn(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:un(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=dn(t,i),o=dn(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.hidden||(t.active?a.push(t):t.draw(e,s))}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return vn(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(xt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(vn(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new hn(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||yn(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){yn(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!yn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._data,n=e._cachedMeta.data;for(const[t,i,n]of e._syncList)e[t](i,n);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&_n(i,n)}i.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}wn.defaults={},wn.prototype.datasetElementType=null,wn.prototype.dataElementType=null;class Mn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Tt(this.x)&&Tt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Mn.defaults={},Mn.defaultRoutes=void 0;const kn={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Pt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Oi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Pt(t)));return 1===n||2===n||5===n?kn.numeric.call(this,t,e,i):""}};var Sn={formatters:kn};function Pn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ot(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Dn(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Dn(e,l,c,o[t],o[t+1]);return Dn(e,l,c,r,$(n)?e.length:r+n),l}return Dn(e,l,c),l}function Dn(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}xt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Sn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),xt.route("scale.ticks","color","","color"),xt.route("scale.grid","color","","borderColor"),xt.route("scale.grid","borderColor","","borderColor"),xt.route("scale.title","color","","color"),xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),xt.describe("scales",{_fallback:"scale"}),xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Cn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function On(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Tn(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function An(t){return t.drawTicks?t.tickLength:0}function Ln(t,e){if(!t.display)return 0;const i=Ve(t.font,e),n=Be(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Rn(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class En extends Mn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=Ne(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?On(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=Pn(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Ht(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-An(e.grid)-i.padding-Ln(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=It(Math.min(Math.asin(Ht((h.highest.height+6)/a,-1,1)),Math.asin(Ht(r/l,-1,1))-Math.asin(Ht(u/l,-1,1)))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Ln(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=An(s)+a):(e.height=t.maxHeight,e.width=An(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Et(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;let i,n;for(e.beforeTickToLabelConversion(),e.generateTickLabels(t),i=0,n=t.length;i<n;i++)$(t[i].label)&&(t.splice(i,1),n--,i--);e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=On(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=Yt(i,u.data,u.gc,g,m),p+=f)}else g=Yt(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return jt(e._alignToPixels?Xt(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Et(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=An(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Xt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}const C=K(o.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/C));for(x=0;x<c;x+=O){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=Tn(e,x,r),void 0!==b&&(_=Xt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=An(n.grid),f=u+h,g=d?-h:f,p=-Et(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:-T.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=Be(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(l="left",c=e.right+s):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(l="right",c=e.left+s):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=Xt(e,t.left,s)-s/2,c=Xt(e,t.right,a)+a/2,h=d=r):(h=Xt(e,t.top,s)-s/2,d=Xt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Zt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(i,n,0,t.textOffset,e,t)}n&&Qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Ve(i.font),a=Be(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e||"center"===e||U(e)?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l,chart:c}=t,{chartArea:h,scales:d}=c;let u,f,g,p=0;const m=r-s,x=l-a;if(t.isHorizontal()){if(f=o(n,a,l),U(i)){const t=Object.keys(i)[0],n=i[t];g=d[t].getPixelForValue(n)+m-e}else g="center"===i?(h.bottom+h.top)/2+m-e:Cn(t,i,e);u=l-a}else{if(U(i)){const t=Object.keys(i)[0],n=i[t];f=d[t].getPixelForValue(n)-x+e}else f="center"===i?(h.left+h.right)/2-x+e:Cn(t,i,e);g=o(n,r,s),p="left"===i?-Mt:Mt}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}(this,l,e,r);ee(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Rn(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=K(e.grid&&e.grid.z,-1);return t._isVisible()&&t.draw===En.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Ve(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}class In{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?xt.get(i):{},xt.get(e),t.defaults]);xt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");xt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&xt.describe(e,t.descriptors)}(t,a,n),e.override&&xt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in xt[n]&&(delete xt[n][i],this.override&&delete ft[i])}}var zn=new class{constructor(){this.controllers=new In(wn,"datasets",!0),this.elements=new In(Mn,"elements"),this.plugins=new In(Object,"plugins"),this.scales=new In(En,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Fn{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(zn.plugins.items);for(let t=0;t<i.length;t++)e.push(zn.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=Bn(i[r.id],n);null!==l&&o.push({plugin:r,options:Vn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Bn(t,e){return e||!1!==t?!0===t?{}:t:null}function Vn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wn(t,e){const i=xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Nn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Hn(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ft[t.type]||{scales:{}},n=e.scales||{},o=Wn(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t],r=Nn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Wn(o,e),l=(ft[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[xt.scales[e.type],xt.scale])})),a}(t,e)}function jn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $n=new Map,Yn=new Set;function Un(t,e){let i=$n.get(t);return i||(i=e(),$n.set(t,i),Yn.add(i)),i}const Xn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class qn{constructor(t){this._config=function(t){return(t=t||{}).data=jn(t.data),Hn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=jn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Hn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Un(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Un(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Un(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Un(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Xn(r,t,e)))),e.forEach((t=>Xn(r,n,t))),e.forEach((t=>Xn(r,ft[o]||{},t))),e.forEach((t=>Xn(r,xt,t))),e.forEach((t=>Xn(r,gt,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Yn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ft[e]||{},xt.datasets[e]||{},{type:e},xt,gt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Kn(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=ni(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=ii(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Kn(this._resolverCache,t,i);return U(e)?ii(o,e,void 0,n):o}}function Kn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:ei(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Gn=["top","bottom","left","right","chartArea"];function Zn(t,e){return"top"===t||"bottom"===t||-1===Gn.indexOf(t)&&"x"===e}function Qn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Jn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function to(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function eo(t){return ue()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const io={},no=t=>{const e=eo(t);return Object.values(io).filter((t=>t.canvas===e)).pop()};class oo{constructor(t,e){const n=this,o=this.config=new qn(e),s=eo(t),r=no(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const l=o.createResolver(o.chartOptionScopes(),n.getContext());this.platform=new(o.platform||on(s));const c=n.platform.acquireContext(s,l.aspectRatio),h=c&&c.canvas,d=h&&h.height,u=h&&h.width;this.id=j(),this.ctx=c,this.canvas=h,this.width=u,this.height=d,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new Fn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((()=>this.update("resize")),l.resizeDelay||0),io[n.id]=n,c&&h?(a.listen(n,"complete",Jn),a.listen(n,"progress",to),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():we(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}clear(){return qt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,we(i,r,!0)&&(i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Nn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Nn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Zn(s.position,r)===Zn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(zn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{ti.configure(t,e,e.options),ti.addBox(t,e)}))}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort(((t,e)=>t.index-e.index)),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(Qn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||Wn(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=zn.getController(a),{datasetElementType:o,dataElementType:r}=xt.datasets[a];Object.assign(i.prototype,{dataElementType:zn.getElement(r),datasetElementType:o&&zn.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{ti.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(ut(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),o=!n&&-1===a.indexOf(i);i.buildOrUpdateElements(o),r=Math.max(+i.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||J(a,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Qn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;ti.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),Jn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=!n.disabled,s=e.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",a)&&(o&&Zt(i,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?e.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?e.height:s.bottom+n.bottom}),t.controller.draw(),o&&Qt(i),a.cancelable=!1,e.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(t,e,i,n){const o=Ae.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=this,o=i?"show":"hide",s=n.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,o);ht(e)?(s.data[e].hidden=!i,n.update()):(n.setDatasetVisibility(t,i),a.update(s,{visible:i}),n.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n<o;++n)t._destroyDatasetMeta(n);t.config.clearCache(),e&&(t.unbindEvents(),qt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete io[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};J(t.options.events,(o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n)))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;J(t._listeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._listeners={},J(t._responsiveListeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Gt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const so=()=>J(oo.instances,(t=>t._plugins.invalidate())),ao=!0;function ro(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(oo,{defaults:{enumerable:ao,value:xt},instances:{enumerable:ao,value:io},overrides:{enumerable:ao,value:ft},registry:{enumerable:ao,value:zn},version:{enumerable:ao,value:"3.5.0"},getChart:{enumerable:ao,value:no},register:{enumerable:ao,value:(...t)=>{zn.add(...t),so()}},unregister:{enumerable:ao,value:(...t)=>{zn.remove(...t),so()}}});class lo{constructor(t){this.options=t||{}}formats(){return ro()}parse(t,e){return ro()}format(t,e){return ro()}add(t,e,i){return ro()}diff(t,e,i){return ro()}startOf(t,e,i){return ro()}endOf(t,e){return ro()}}lo.override=function(t){Object.assign(lo.prototype,t)};var co={_date:lo};function ho(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=de(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{32767!==o&&-32768!==o&&(ht(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(s=void 0,i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function uo(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function fo(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(uo(u,d,s,c));return l}function go(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function po(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);const{start:a,end:r,reverse:l,top:c,bottom:h}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=c:(i._bottom||0)===n?o=h:(s[mo(h,a,r,l)]=!0,o=c)),s[mo(o,a,r,l)]=!0,t.borderSkipped=s}function mo(t,e,i,n){var o,s,a;return n?(a=i,t=xo(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=xo(t,e,i),t}function xo(t,e,i){return"start"===t?e:"end"===t?i:t}class bo extends wn{parsePrimitiveData(t,e,i,n){return fo(t,e,i,n)}parseArrayData(t,e,i,n){return fo(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(uo(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=go(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{index:a,_cachedMeta:{vScale:r}}=o,l=r.getBasePixel(),c=r.isHorizontal(),h=o._getRuler(),d=o.resolveDataElementOptions(e,n),u=o.getSharedOptions(d),f=o.includeOptions(n,u);o.updateSharedOptions(u,n,d);for(let d=e;d<e+i;d++){const e=o.getParsed(d),i=s||$(e[r.axis])?{base:l,head:l}:o._calculateBarValuePixels(d),g=o._calculateBarIndexPixels(d,h),p=(e._stacks||{})[r.axis],m={horizontal:c,base:i.base,enableBorderRadius:!p||go(e._custom)||a===p._top||a===p._bottom,x:c?i.head:g.center,y:c?g.center:i.head,height:c?g.size:Math.abs(i.size),width:c?Math.abs(i.size):g.size};f&&(m.options=u||o.resolveDataElementOptions(d,t[d].active?"active":n)),po(m,m.options||t[d].options,p,a),o.updateElement(t[d],d,m,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r)if(l=n[r],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||ho(n),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{_cachedMeta:{vScale:i,_stacked:n},options:{base:o,minBarLength:s}}=e,a=o||0,r=e.getParsed(t),l=r._custom,c=go(l);let h,d,u=r[i.axis],f=0,g=n?e.applyStack(i,r,n):u;g!==u&&(f=g-u,g=u),c&&(u=l.barStart,g=l.barEnd-l.barStart,0!==u&&Dt(u)!==Dt(l.barEnd)&&(f=0),f+=u);const p=$(o)||c?f:o;let m=i.getPixelForValue(p);if(h=e.chart.getDataVisibility(t)?i.getPixelForValue(f+g):m,d=h-m,Math.abs(d)<s&&(d=function(t,e,i){return 0!==t?Dt(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,i,a)*s,u===a&&(m-=d/2),h=m+d),m===i.getPixelForValue(a)){const t=Dt(d)*i.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=K(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this,e=t._cachedMeta,i=e.vScale,n=e.data,o=n.length;let s=0;for(;s<o;++s)null!==t.getParsed(s)[i.axis]&&n[s].draw(t._ctx)}}bo.id="bar",bo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},bo.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class _o extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c={},f=c[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=c[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);c.skip=isNaN(f)||isNaN(g),h&&(c.options=o.resolveDataElementOptions(l,e.active?"active":n),s&&(c.options.radius=0)),o.updateElement(e,l,c,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}_o.id="bubble",_o.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},_o.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class yo extends wn{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=+i[o]}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=_t,e=-_t;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s)+e.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<_t){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Nt(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Nt(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(bt,c,d),b=g(bt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:i.calculateCircumference(o._parsed[t]*s/_t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,i.active?"active":n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?_t*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}yo.id="doughnut",yo.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},yo.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},yo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class vo extends wn{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ht(Math.min(se(r,a.axis,c).lo,i?n:se(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Ht(Math.max(se(r,a.axis,h).hi+1,i?0:se(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._datasetIndex=e.index,n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Tt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),g=m?e:{},b=$(i[f]),_=g[u]=a.getPixelForValue(i[u],c),y=g[f]=s||b?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],c);g.skip=isNaN(_)||isNaN(y)||b,g.stop=c>0&&i[u]-x[u]>p,g.parsed=i,d&&(g.options=h||o.resolveDataElementOptions(c,e.active?"active":n)),m||o.updateElement(e,c,g,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}vo.id="line",vo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},vo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class wo extends wn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Oi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*bt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,e.active?"active":n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,e).angle||i):0}}wo.id="polarArea",wo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},wo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Mo extends yo{}Mo.id="pie",Mo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ko extends wn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,e.active?"active":n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}ko.id="radar",ko.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},ko.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class So extends vo{}So.id="scatter",So.defaults={showLine:!1,fill:!1},So.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Po=Object.freeze({__proto__:null,BarController:bo,BubbleController:_o,DoughnutController:yo,LineController:vo,PolarAreaController:wo,PieController:Mo,RadarController:ko,ScatterController:So});function Do(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+Mt,n-Mt),t.closePath(),t.clip()}function Co(t,e,i,n){const o=Ie(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Ht(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Ht(o.innerStart,0,a),innerEnd:Ht(o.innerEnd,0,a)}}function Oo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function To(t,e,i,n,o){const{x:s,y:a,startAngle:r,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=o-r;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/bt)/h)/2,p=r+g+u,m=o-g-u,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:y}=Co(e,d,h,m-p),v=h-x,w=h-b,M=p+x/v,k=m-b/w,S=d+_,P=d+y,D=p+_/S,C=m-y/P;if(t.beginPath(),t.arc(s,a,h,M,k),b>0){const e=Oo(w,k,s,a);t.arc(e.x,e.y,b,k,m+Mt)}const O=Oo(P,m,s,a);if(t.lineTo(O.x,O.y),y>0){const e=Oo(P,C,s,a);t.arc(e.x,e.y,y,m+Mt,C+Math.PI)}if(t.arc(s,a,d,m-y/d,p+_/d,!0),_>0){const e=Oo(S,D,s,a);t.arc(e.x,e.y,_,D+Math.PI,p-Mt)}const T=Oo(v,p,s,a);if(t.lineTo(T.x,T.y),x>0){const e=Oo(v,M,s,a);t.arc(e.x,e.y,x,p-Mt,M)}t.closePath()}function Ao(t,e,i,n,o){const{options:s}=e,a="inner"===s.borderAlign;s.borderWidth&&(a?(t.lineWidth=2*s.borderWidth,t.lineJoin="round"):(t.lineWidth=s.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&Do(t,e,s+_t),t.beginPath(),t.arc(n,o,c,s+_t,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+_t),h=0;h<r;++h)t.stroke()}(t,e,a),a&&Do(t,e,o),To(t,e,i,n,o),t.stroke())}class Lo extends Mn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2;return(h>=_t||Nt(o,a,r))&&(s>=l+d&&s<=c+d)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,c=(n+o)/2,h=(s+a+l+r)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2,s=(i.spacing||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>_t?Math.floor(n/_t):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let a=0;if(o){a=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a),e.circumference>=bt&&(a=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:a}=e;let r=e.endAngle;if(o){To(t,e,i,n,s+_t);for(let e=0;e<o;++e)t.fill();isNaN(a)||(r=s+a%_t,a%_t==0&&(r+=_t))}return To(t,e,i,n,r),t.fill(),r}(t,e,a,s);Ao(t,e,a,s,r),t.restore()}}function Ro(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Eo(t,e,i){t.lineTo(i.x,i.y)}function Io(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r),h=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function zo(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=Io(o,i,n),h=function(t){return t.stepped?Jt:t.tension||"monotone"===t.cubicInterpolationMode?te:Eo}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function Fo(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=Io(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Bo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Fo:zo}Lo.id="arc",Lo.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Lo.defaultRoutes={backgroundColor:"backgroundColor"};const Vo="function"==typeof Path2D;function Wo(t,e,i,n){Vo&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Ro(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Bo(e);for(const r of o)Ro(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class No extends Mn{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!i._pointsUpdated){const o=n.spanGaps?i._loop:i._fullLoop;yi(i._points,n,t,o,e),i._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Fi(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=zi(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?Pi:t.tension||"monotone"===t.cubicInterpolationMode?Di:Si}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Bo(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Bo(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Wo(t,o,i,n),t.restore(),o.animated&&(o._pointsUpdated=!1,o._path=void 0))}}function Ho(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}No.id="line",No.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},No.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},No.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class jo extends Mn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ho(this,t,"x",e)}inYRange(t,e){return Ho(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this,n=i.options;i.skip||n.radius<.1||!Gt(i,e,i.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Kt(t,n,i.x,i.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $o(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Yo(t,e,i,n){return t?0:Ht(e,i,n)}function Uo(t){const e=$o(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=ze(n);return{t:Yo(o.top,s.top,0,i),r:Yo(o.right,s.right,0,e),b:Yo(o.bottom,s.bottom,0,i),l:Yo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Fe(o),a=Math.min(e,i),r=t.borderSkipped,l=n||U(o);return{topLeft:Yo(!l||r.top||r.left,s.topLeft,0,a),topRight:Yo(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Yo(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Yo(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Xo(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&$o(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function qo(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ko(t,e,i={}){const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+a,radius:t.radius}}jo.id="point",jo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},jo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Go extends Mn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=Uo(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ne:qo;var s;const a=.33;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,Ko(n,a,i)),t.clip(),o(t,Ko(i,-.33,n)),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,Ko(i,a,n)),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Xo(this,t,e,i)}inXRange(t,e){return Xo(this,t,null,e)}inYRange(t,e){return Xo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Go.id="bar",Go.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zo=Object.freeze({__proto__:null,ArcElement:Lo,LineElement:No,PointElement:jo,BarElement:Go});function Qo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Jo(t){t.data.datasets.forEach((t=>{Qo(t)}))}var ts={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Jo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===We([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:d}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Ht(se(e,s.axis,a).lo,0,i-1)),n=c?Ht(se(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(d<=(i.threshold||4*n))return void Qo(e);let u;switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.min(Math.floor((h+1)*r)+1,i)+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,h,d,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,h,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Jo(t)}};function es(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class is{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:_t},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function ns(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new is({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function os(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ss(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;as(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(cs({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)rs(s,r[t],l)}return new No({points:s,options:{}})}const as=t=>"line"===t.type&&!t.hidden;function rs(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=ls(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function ls(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function cs(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=os(t,e,o);const a=o[t],r=o[e];null!==n?(s.push({x:a.x,y:n}),s.push({x:r.x,y:n})):null!==i&&(s.push({x:i,y:a.y}),s.push({x:i,y:r.y}))})),s}(t,e),i.length?new No({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function hs(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function ds(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function us(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Wt(o),s=Wt(s)),{property:t,start:o,end:s}}function fs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function gs(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function ps(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function ms(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){let{start:n,end:r}=t;r=os(n,r,o);const l=us(i,o[n],o[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:o[n],end:o[r]});continue}const c=zi(e,l);for(const e of c){const n=us(i,s[e.start],s[e.end],e.loop),r=Ii(t,o,n);for(const t of r)a.push({source:t,target:e,start:{[i]:fs(l,n,"start",Math.max)},end:{[i]:fs(l,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e,d=!0!==n;t.save(),t.fillStyle=r,gs(t,a,d&&us(o,c,h)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():ps(t,n,h,o);const e=!!n.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||ps(t,n,c,o)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function xs(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return ss(t);if("shape"===i)return!0;const o=ns(t);return o instanceof is?o:cs(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(ds(t,n,a.top),ms(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),ds(t,n,a.bottom)),ms(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),Qt(t))}var bs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof No&&(l={visible:t.isDatasetVisible(a),index:a,fill:es(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=hs(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&xs(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&xs(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&xs(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _s=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ys extends Mn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=t._margins.left,t.right=t.width):(t.height=t.maxHeight,t.top=t._margins.top,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Ve(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=_s(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[o]={left:g,top:f,col:p,width:a,height:n},u=Math.max(u,a),f+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s},rtl:a}}=t,r=Ti(a,t.left,t.width);if(this.isHorizontal()){let a=0,l=o(n,t.left+s,t.right-t.lineWidths[a]);for(const c of i)a!==c.row&&(a=c.row,l=o(n,t.left+s,t.right-t.lineWidths[a])),c.top+=t.top+e+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const c of i)c.col!==a&&(a=c.col,l=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),c.top=l,c.left+=t.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Zt(e,t),t._draw(),Qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=xt.color,h=Ti(e.rtl,t.left,t.width),d=Ve(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=_s(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},Ai(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((M,k)=>{a.strokeStyle=M.fontColor||u,a.fillStyle=M.fontColor||u;const S=a.measureText(M.text).width,P=h.textAlign(M.textAlign||(M.textAlign=l.textAlign)),D=x+p+S;let C=m.x,O=m.y;h.setWidth(t.width),y?k>0&&C+D+f>t.right&&(O=m.y+=w,m.line++,C=m.x=o(r,t.left+f,t.right-n[m.line])):k>0&&O+w>t.bottom&&(C=m.x=C+i[m.line].width+f,m.line++,O=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Kt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Fe(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ne(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(C),O,M),C=s(P,C+x+p,y?C+D:t.right,e.rtl),function(t,e,i){ee(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})}(h.x(C),O,M),y?m.x+=D+f:m.y+=w})),Li(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Ve(i.font),a=Be(i.padding);if(!i.display)return;const r=Ti(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,ee(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Ve(t.font),i=Be(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var vs={id:"legend",_element:ys,start(t,e,i){const n=t.legend=new ys({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n)},stop(t){ti.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ti.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Be(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ws extends Mn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Be(n.padding);const s=o*Ve(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*bt):(c=s-t,h=o(r,e,n),d=.5*bt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Ve(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);ee(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var Ms={id:"title",_element:ws,start(t,e,i){!function(t,e){const i=new ws({ctx:t.ctx,options:e,chart:t});ti.configure(t,i,e),ti.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ti.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ks=new WeakMap;var Ss={id:"subtitle",start(t,e,i){const n=new ws({ctx:t.ctx,options:i,chart:t});ti.configure(t,n,i),ti.addBox(t,n),ks.set(t,n)},stop(t){ti.removeBox(t,ks.get(t)),ks.delete(t)},beforeUpdate(t,e,i){const n=ks.get(t);ti.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ps={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Bt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function Ds(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Cs(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Os(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function Ts(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Ve(e.bodyFont),c=Ve(e.titleFont),h=Ve(e.footerFont),d=s.length,u=o.length,f=n.length,g=Be(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function As(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function Ls(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||As(t,e,i,n),yAlign:n}}function Rs(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Ht(d,0,n.width-e.width),y:Ht(u,0,n.height-e.height)}}function Es(t,e,i){const n=Be(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Is(t){return Ds([],Cs(t))}function zs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Fs extends Mn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new hn(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}getBeforeBody(t,e){return Is(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=zs(n,t);Ds(e.before,Cs(s.beforeLabel.call(i,t))),Ds(e.lines,s.label.call(i,t)),Ds(e.after,Cs(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return Is(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=Ds(r,Cs(o)),r=Ds(r,Cs(s)),r=Ds(r,Cs(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(Os(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=zs(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=Ps[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=Ts(i,n),r=Object.assign({},t,e),l=Ls(i._chart,n,r),c=Rs(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Ve(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,h=Ve(o.bodyFont),d=Es(s,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,c)+c/2,s=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Kt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Kt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,c),i=n.leftForLtr(n.xPlus(u,1),c-2),s=Fe(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:e,y:g,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:i,y:g+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,c,l),t.strokeRect(e,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c}=i,h=Ve(i.bodyFont);let d=h.lineHeight,u=0;const f=Ti(i.rtl,n.x,n.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(a);let m,x,b,_,y,v,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=Es(n,p,i),e.fillStyle=i.bodyColor,J(n.beforeBody,g),u=r&&"right"!==p?"center"===a?c/2+1:c+2:0,_=0,v=o.length;_<v;++_){for(m=o[_],x=n.labelTextColors[_],e.fillStyle=x,J(m.before,g),b=m.lines,r&&b.length&&(n._drawColorBox(e,t,_,f,i),d=Math.max(h.lineHeight,l)),y=0,w=b.length;y<w;++y)g(b[y]),d=h.lineHeight;J(m.after,g)}u=0,d=h.lineHeight,J(n.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=Ti(i.rtl,n.x,n.width);for(t.x=Es(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Ve(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,h=n.cornerRadius;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-h,r),e.quadraticCurveTo(a+l,r,a+l,r+h),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-h),e.quadraticCurveTo(a+l,r+c,a+l-h,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+h,r+c),e.quadraticCurveTo(a,r+c,a,r+c-h),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=Ps[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=Ts(e,t),r=Object.assign({},n,e._size),l=Ls(i,t,r),c=Rs(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Be(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),Ai(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),Li(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=Ps[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Fs.positioners=Ps;var Bs={id:"tooltip",_element:Fs,positioners:Ps,afterInit(t,e,i){i&&(t.tooltip=new Fs({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:H,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Vs=Object.freeze({__proto__:null,Decimation:ts,Filler:bs,Legend:vs,SubTitle:Ss,Title:Ms,Tooltip:Bs});function Ws(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Ns extends En{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ws(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function Hs(t,e,{horizontal:i,minRotation:n}){const o=Et(n),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}Ns.id="category",Ns.defaults={ticks:{callback:Ns.prototype.getLabelForValue}};class js extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Dt(o),e=Dt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(o===s){let t=1;(s>=Number.MAX_SAFE_INTEGER||o<=Number.MIN_SAFE_INTEGER)&&(t=Math.abs(.05*s)),r(s+t),e||a(o-t)}t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!$(s),x=!$(a),b=!$(l),_=(p-g)/(h+1);let y,v,w,M,k=Ct((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ct(M*k/f/u)*u),$(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Lt((a-s)/o,k/1e3)?(M=Math.round(Math.min((a-s)/k,c)),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=At(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(zt(k),zt(v));y=Math.pow(10,$(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,At(Math.round((v+P*k)*y)/y,s,Hs(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?At(i[i.length-1].value,a,Hs(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Oi(t,this.chart.options.locale)}}class $s extends js{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Et(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ys(t){return 1===t/Math.pow(10,Math.floor(Pt(t)))}$s.id="linear",$s.defaults={ticks:{callback:Sn.formatters.numeric}};class Us extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=js.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(Pt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Pt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(Pt(e.min)))),a=Math.floor(Pt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ys(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Ys(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Oi(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=Pt(e),t._valueRange=Pt(t.max)-Pt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(Pt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Xs(t){const e=t.ticks;if(e.display&&t.display){const t=Be(e.backdropPadding);return K(e.font&&e.font.size,xt.font.size)+t.height}return 0}function qs(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ks(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],o=[],s=t.getLabels().length;for(let c=0;c<s;c++){const s=t.options.pointLabels.setContext(t.getPointLabelContext(c));o[c]=s.padding;const h=t.getPointPosition(c,t.drawingArea+o[c]),d=Ve(s.font),u=(a=t.ctx,r=d,l=Y(l=t._pointLabels[c])?l:[l],{w:Ut(a,r.string,l),h:l.length*r.lineHeight});n[c]=u;const f=t.getIndexAngle(c),g=It(f),p=qs(g,h.x,u.w,0,180),m=qs(g,h.y,u.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var a,r,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],o=t.getLabels().length,s=t.options,a=Xs(s),r=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max);for(let s=0;s<o;s++){const o=0===s?a/2:0,l=t.getPointPosition(s,r+o+i[s]),c=It(t.getIndexAngle(s)),h=e[s],d=Qs(l.y,h.h,c),u=Gs(c),f=Zs(l.x,h.w,u);n.push({x:l.x,y:d,textAlign:u,left:f,top:d,right:f+h.w,bottom:d+h.h})}return n}(t,n,o)}function Gs(t){return 0===t||180===t?"center":t<180?"left":"right"}function Zs(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Qs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Js(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,_t);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function ta(t){return Tt(t)?t:0}Us.id="logarithmic",Us.defaults={ticks:{callback:Sn.formatters.logarithmic,major:{enabled:!0}}};class ea extends js{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Xs(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Xs(this.options))}generateTickLabels(t){const e=this;js.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?Ks(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=ta(o),s=ta(s),a=ta(a),r=ta(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Wt(t*(_t/this.getLabels().length)+Et(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointLabelContext(t){const e=this,i=e._pointLabels||[];if(t>=0&&t<i.length){const n=i[t];return function(t,e,i){return Object.assign(Object.create(t),{label:i,index:e,type:"pointLabel"})}(e.getContext(),t,n)}}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-Mt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),Js(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=Ve(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Be(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ee(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Js(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getPointLabelContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Ve(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){e.font=c.string,a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Be(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}ee(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}ea.id="radialLinear",ea.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ea.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ea.descriptors={angleLines:{_fallback:"grid"}};const ia={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},na=Object.keys(ia);function oa(t,e){return t-e}function sa(t,e){if($(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),X(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Tt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function aa(t,e,i,n){const o=na.length;for(let s=na.indexOf(t);s<o-1;++s){const t=ia[na[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return na[s]}return na[o-1]}function ra(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=oe(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function la(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class ca extends En{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new co._date(t.adapters.date);st(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:sa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=re(o,s,t.max);return t._unit=i.unit||(n.autoSkip?aa(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=na.length-1;s>=na.indexOf(i);s--){const i=na[s];if(ia[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return na[i?na.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=na.indexOf(t)+1,i=na.length;e<i;++e)if(ia[na[e]].common)return na[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),la(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Ht(o,0,a),s=Ht(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||aa(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Tt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)ra(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||ra(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Et(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,la(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(sa(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return de(t.sort(oa))}}function ha(t,e,i){let n,o,s,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=se(t,"pos",e)),({pos:n,time:s}=t[r]),({pos:o,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=se(t,"time",e)),({time:n,pos:s}=t[r]),({time:o,pos:a}=t[l]));const c=o-n;return c?s+(a-s)*(e-n)/c:s}ca.id="time",ca.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class da extends ca{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable(),i=t._table=t.buildLookupTable(e);t._minPos=ha(i,t.min),t._tableRange=ha(i,t.max)-t._minPos,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,a,r,l,c;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=n.length;s<a;++s)c=n[s+1],r=n[s-1],l=n[s],Math.round((c+r)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getDecimalForValue(t){return(ha(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return ha(e._table,n*e._tableRange+e._minPos,!0)}}da.id="timeseries",da.defaults=ca.defaults;var ua=Object.freeze({__proto__:null,CategoryScale:Ns,LinearScale:$s,LogarithmicScale:Us,RadialLinearScale:ea,TimeScale:ca,TimeSeriesScale:da});return oo.register(Po,ua,Zo,Vs),oo.helpers={...Ni},oo._adapters=co,oo.Animation=ln,oo.Animations=hn,oo.animator=a,oo.controllers=zn.controllers.items,oo.DatasetController=wn,oo.Element=Mn,oo.elements=Zo,oo.Interaction=Ae,oo.layouts=ti,oo.platforms=sn,oo.Scale=En,oo.Ticks=Sn,Object.assign(oo,Po,ua,Zo,Vs,sn),oo.Chart=oo,"undefined"!=typeof window&&(window.Chart=oo),oo}));
                            return globalThis
                        })().Chart
                        Chart.defaults.font.size = 15
                        Chart.defaults.color = "rgba(236, 239, 244, 0.75)"
                        Chart.defaults.borderColor = "dimgray"
                    
                    // setup lodash
                    const _ = silverSpectacle.libraries.lodash = function(){var n,t=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",e="Expected a function",u="__lodash_hash_undefined__",i=500,o="__lodash_placeholder__",f=1,a=2,c=4,l=1,s=2,h=1,p=2,v=4,g=8,y=16,d=32,b=64,w=128,m=256,x=512,j=30,A="...",k=800,O=16,I=1,R=2,E=1/0,z=9007199254740991,S=1.7976931348623157e308,L=NaN,W=4294967295,C=W-1,U=W>>>1,B=[["ary",w],["bind",h],["bindKey",p],["curry",g],["curryRight",y],["flip",x],["partial",d],["partialRight",b],["rearg",m]],T="[object Arguments]",$="[object Array]",D="[object AsyncFunction]",M="[object Boolean]",F="[object Date]",N="[object DOMException]",P="[object Error]",q="[object Function]",Z="[object GeneratorFunction]",K="[object Map]",V="[object Number]",G="[object Null]",H="[object Object]",J="[object Proxy]",Y="[object RegExp]",Q="[object Set]",X="[object String]",nn="[object Symbol]",tn="[object Undefined]",rn="[object WeakMap]",en="[object WeakSet]",un="[object ArrayBuffer]",on="[object DataView]",fn="[object Float32Array]",an="[object Float64Array]",cn="[object Int8Array]",ln="[object Int16Array]",sn="[object Int32Array]",hn="[object Uint8Array]",pn="[object Uint8ClampedArray]",vn="[object Uint16Array]",_n="[object Uint32Array]",gn=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bn=/&(?:amp|lt|gt|quot|#39);/g,wn=/[&<>"']/g,mn=RegExp(bn.source),xn=RegExp(wn.source),jn=/<%-([\s\S]+?)%>/g,An=/<%([\s\S]+?)%>/g,kn=/<%=([\s\S]+?)%>/g,On=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,In=/^\w*$/,Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/[\\^$.*+?()[\]{}|]/g,zn=RegExp(En.source),Sn=/^\s+|\s+$/g,Ln=/^\s+/,Wn=/\s+$/,Cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Un=/\{\n\/\* \[wrapped with (.+)\] \*/,Bn=/,? & /,Tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$n=/\\(\\)?/g,Dn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mn=/\w*$/,Fn=/^[-+]0x[0-9a-f]+$/i,Nn=/^0b[01]+$/i,Pn=/^\[object .+?Constructor\]$/,qn=/^0o[0-7]+$/i,Zn=/^(?:0|[1-9]\d*)$/,Kn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vn=/($^)/,Gn=/['\n\r\u2028\u2029\\]/g,Hn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yn="[\\ud800-\\udfff]",Qn="["+Jn+"]",Xn="["+Hn+"]",nt="\\d+",tt="[\\u2700-\\u27bf]",rt="[a-z\\xdf-\\xf6\\xf8-\\xff]",et="[^\\ud800-\\udfff"+Jn+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ut="\\ud83c[\\udffb-\\udfff]",it="[^\\ud800-\\udfff]",ot="(?:\\ud83c[\\udde6-\\uddff]){2}",ft="[\\ud800-\\udbff][\\udc00-\\udfff]",at="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ct="(?:"+rt+"|"+et+")",lt="(?:"+at+"|"+et+")",st="(?:"+Xn+"|"+ut+")"+"?",ht="[\\ufe0e\\ufe0f]?"+st+("(?:\\u200d(?:"+[it,ot,ft].join("|")+")[\\ufe0e\\ufe0f]?"+st+")*"),pt="(?:"+[tt,ot,ft].join("|")+")"+ht,vt="(?:"+[it+Xn+"?",Xn,ot,ft,Yn].join("|")+")",_t=RegExp("['’]","g"),gt=RegExp(Xn,"g"),yt=RegExp(ut+"(?="+ut+")|"+vt+ht,"g"),dt=RegExp([at+"?"+rt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Qn,at,"$"].join("|")+")",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Qn,at+ct,"$"].join("|")+")",at+"?"+ct+"+(?:['’](?:d|ll|m|re|s|t|ve))?",at+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nt,pt].join("|"),"g"),bt=RegExp("[\\u200d\\ud800-\\udfff"+Hn+"\\ufe0e\\ufe0f]"),wt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xt=-1,jt={};jt[fn]=jt[an]=jt[cn]=jt[ln]=jt[sn]=jt[hn]=jt[pn]=jt[vn]=jt[_n]=!0,jt[T]=jt[$]=jt[un]=jt[M]=jt[on]=jt[F]=jt[P]=jt[q]=jt[K]=jt[V]=jt[H]=jt[Y]=jt[Q]=jt[X]=jt[rn]=!1;var At={};At[T]=At[$]=At[un]=At[on]=At[M]=At[F]=At[fn]=At[an]=At[cn]=At[ln]=At[sn]=At[K]=At[V]=At[H]=At[Y]=At[Q]=At[X]=At[nn]=At[hn]=At[pn]=At[vn]=At[_n]=!0,At[P]=At[q]=At[rn]=!1;var kt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ot=parseFloat,It=parseInt,Rt="object"==typeof global&&global&&global.Object===Object&&global,Et="object"==typeof self&&self&&self.Object===Object&&self,zt=Rt||Et||Function("return this")(),St="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=St&&"object"==typeof module&&module&&!module.nodeType&&module,Wt=Lt&&Lt.exports===St,Ct=Wt&&Rt.process,Ut=function(){try{var n=Lt&&Lt.require&&Lt.require("util").types;return n||Ct&&Ct.binding&&Ct.binding("util")}catch(n){}}(),Bt=Ut&&Ut.isArrayBuffer,Tt=Ut&&Ut.isDate,$t=Ut&&Ut.isMap,Dt=Ut&&Ut.isRegExp,Mt=Ut&&Ut.isSet,Ft=Ut&&Ut.isTypedArray;function Nt(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function Pt(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function qt(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function Zt(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function Kt(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function Vt(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function Gt(n,t){return!!(null==n?0:n.length)&&ur(n,t,0)>-1}function Ht(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function Jt(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function Yt(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Qt(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function Xt(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function nr(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}var tr=ar("length");function rr(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function er(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function ur(n,t,r){return t==t?function(n,t,r){var e=r-1,u=n.length;for(;++e<u;)if(n[e]===t)return e;return-1}(n,t,r):er(n,or,r)}function ir(n,t,r,e){for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function or(n){return n!=n}function fr(n,t){var r=null==n?0:n.length;return r?sr(n,t)/r:L}function ar(t){return function(r){return null==r?n:r[t]}}function cr(t){return function(r){return null==t?n:t[r]}}function lr(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function sr(t,r){for(var e,u=-1,i=t.length;++u<i;){var o=r(t[u]);o!==n&&(e=e===n?o:e+o)}return e}function hr(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function pr(n){return function(t){return n(t)}}function vr(n,t){return Jt(t,function(t){return n[t]})}function _r(n,t){return n.has(t)}function gr(n,t){for(var r=-1,e=n.length;++r<e&&ur(t,n[r],0)>-1;);return r}function yr(n,t){for(var r=n.length;r--&&ur(t,n[r],0)>-1;);return r}var dr=cr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),br=cr({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function wr(n){return"\\"+kt[n]}function mr(n){return bt.test(n)}function xr(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function jr(n,t){return function(r){return n(t(r))}}function Ar(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var f=n[r];f!==t&&f!==o||(n[r]=o,i[u++]=r)}return i}function kr(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function Or(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Ir(n){return mr(n)?function(n){var t=yt.lastIndex=0;for(;yt.test(n);)++t;return t}(n):tr(n)}function Rr(n){return mr(n)?function(n){return n.match(yt)||[]}(n):function(n){return n.split("")}(n)}var Er=cr({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});return function Hn(Jn){var Yn,Qn=(Jn=null==Jn?zt:_.defaults(zt.Object(),Jn,_.pick(zt,mt))).Array,Xn=Jn.Date,nt=Jn.Error,tt=Jn.Function,rt=Jn.Math,et=Jn.Object,ut=Jn.RegExp,it=Jn.String,ot=Jn.TypeError,ft=Qn.prototype,at=tt.prototype,ct=et.prototype,lt=Jn["__core-js_shared__"],st=at.toString,ht=ct.hasOwnProperty,pt=0,vt=(Yn=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||""))?"Symbol(src)_1."+Yn:"",yt=ct.toString,bt=st.call(et),kt=zt._,Rt=ut("^"+st.call(ht).replace(En,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Et=Wt?Jn.Buffer:n,St=Jn.Symbol,Lt=Jn.Uint8Array,Ct=Et?Et.allocUnsafe:n,Ut=jr(et.getPrototypeOf,et),tr=et.create,cr=ct.propertyIsEnumerable,zr=ft.splice,Sr=St?St.isConcatSpreadable:n,Lr=St?St.iterator:n,Wr=St?St.toStringTag:n,Cr=function(){try{var n=$i(et,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ur=Jn.clearTimeout!==zt.clearTimeout&&Jn.clearTimeout,Br=Xn&&Xn.now!==zt.Date.now&&Xn.now,Tr=Jn.setTimeout!==zt.setTimeout&&Jn.setTimeout,$r=rt.ceil,Dr=rt.floor,Mr=et.getOwnPropertySymbols,Fr=Et?Et.isBuffer:n,Nr=Jn.isFinite,Pr=ft.join,qr=jr(et.keys,et),Zr=rt.max,Kr=rt.min,Vr=Xn.now,Gr=Jn.parseInt,Hr=rt.random,Jr=ft.reverse,Yr=$i(Jn,"DataView"),Qr=$i(Jn,"Map"),Xr=$i(Jn,"Promise"),ne=$i(Jn,"Set"),te=$i(Jn,"WeakMap"),re=$i(et,"create"),ee=te&&new te,ue={},ie=lo(Yr),oe=lo(Qr),fe=lo(Xr),ae=lo(ne),ce=lo(te),le=St?St.prototype:n,se=le?le.valueOf:n,he=le?le.toString:n;function pe(n){if(Ef(n)&&!df(n)&&!(n instanceof ye)){if(n instanceof ge)return n;if(ht.call(n,"__wrapped__"))return so(n)}return new ge(n)}var ve=function(){function t(){}return function(r){if(!Rf(r))return{};if(tr)return tr(r);t.prototype=r;var e=new t;return t.prototype=n,e}}();function _e(){}function ge(t,r){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=n}function ye(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function de(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function be(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function we(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function me(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new we;++t<r;)this.add(n[t])}function xe(n){var t=this.__data__=new be(n);this.size=t.size}function je(n,t){var r=df(n),e=!r&&yf(n),u=!r&&!e&&xf(n),i=!r&&!e&&!u&&Tf(n),o=r||e||u||i,f=o?hr(n.length,it):[],a=f.length;for(var c in n)!t&&!ht.call(n,c)||o&&("length"==c||u&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zi(c,a))||f.push(c);return f}function Ae(t){var r=t.length;return r?t[mu(0,r-1)]:n}function ke(n,t){return fo(ri(n),Ce(t,0,n.length))}function Oe(n){return fo(ri(n))}function Ie(t,r,e){(e===n||vf(t[r],e))&&(e!==n||r in t)||Le(t,r,e)}function Re(t,r,e){var u=t[r];ht.call(t,r)&&vf(u,e)&&(e!==n||r in t)||Le(t,r,e)}function Ee(n,t){for(var r=n.length;r--;)if(vf(n[r][0],t))return r;return-1}function ze(n,t,r,e){return De(n,function(n,u,i){t(e,n,r(n),i)}),e}function Se(n,t){return n&&ei(t,ia(t),n)}function Le(n,t,r){"__proto__"==t&&Cr?Cr(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function We(t,r){for(var e=-1,u=r.length,i=Qn(u),o=null==t;++e<u;)i[e]=o?n:na(t,r[e]);return i}function Ce(t,r,e){return t==t&&(e!==n&&(t=t<=e?t:e),r!==n&&(t=t>=r?t:r)),t}function Ue(t,r,e,u,i,o){var l,s=r&f,h=r&a,p=r&c;if(e&&(l=i?e(t,u,i,o):e(t)),l!==n)return l;if(!Rf(t))return t;var v=df(t);if(v){if(l=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&ht.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(t),!s)return ri(t,l)}else{var _=Fi(t),g=_==q||_==Z;if(xf(t))return Ju(t,s);if(_==H||_==T||g&&!i){if(l=h||g?{}:Pi(t),!s)return h?function(n,t){return ei(n,Mi(n),t)}(t,function(n,t){return n&&ei(t,oa(t),n)}(l,t)):function(n,t){return ei(n,Di(n),t)}(t,Se(l,t))}else{if(!At[_])return i?t:{};l=function(n,t,r){var e,u,i,o=n.constructor;switch(t){case un:return Yu(n);case M:case F:return new o(+n);case on:return function(n,t){var r=t?Yu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case fn:case an:case cn:case ln:case sn:case hn:case pn:case vn:case _n:return Qu(n,r);case K:return new o;case V:case X:return new o(n);case Y:return(i=new(u=n).constructor(u.source,Mn.exec(u))).lastIndex=u.lastIndex,i;case Q:return new o;case nn:return e=n,se?et(se.call(e)):{}}}(t,_,s)}}o||(o=new xe);var y=o.get(t);if(y)return y;o.set(t,l),Cf(t)?t.forEach(function(n){l.add(Ue(n,r,e,n,t,o))}):zf(t)&&t.forEach(function(n,u){l.set(u,Ue(n,r,e,u,t,o))});var d=v?n:(p?h?Si:zi:h?oa:ia)(t);return qt(d||t,function(n,u){d&&(n=t[u=n]),Re(l,u,Ue(n,r,e,u,t,o))}),l}function Be(t,r,e){var u=e.length;if(null==t)return!u;for(t=et(t);u--;){var i=e[u],o=r[i],f=t[i];if(f===n&&!(i in t)||!o(f))return!1}return!0}function Te(t,r,u){if("function"!=typeof t)throw new ot(e);return eo(function(){t.apply(n,u)},r)}function $e(n,r,e,u){var i=-1,o=Gt,f=!0,a=n.length,c=[],l=r.length;if(!a)return c;e&&(r=Jt(r,pr(e))),u?(o=Ht,f=!1):r.length>=t&&(o=_r,f=!1,r=new me(r));n:for(;++i<a;){var s=n[i],h=null==e?s:e(s);if(s=u||0!==s?s:0,f&&h==h){for(var p=l;p--;)if(r[p]===h)continue n;c.push(s)}else o(r,h,u)||c.push(s)}return c}pe.templateSettings={escape:jn,evaluate:An,interpolate:kn,variable:"",imports:{_:pe}},pe.prototype=_e.prototype,pe.prototype.constructor=pe,ge.prototype=ve(_e.prototype),ge.prototype.constructor=ge,ye.prototype=ve(_e.prototype),ye.prototype.constructor=ye,de.prototype.clear=function(){this.__data__=re?re(null):{},this.size=0},de.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},de.prototype.get=function(t){var r=this.__data__;if(re){var e=r[t];return e===u?n:e}return ht.call(r,t)?r[t]:n},de.prototype.has=function(t){var r=this.__data__;return re?r[t]!==n:ht.call(r,t)},de.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=re&&r===n?u:r,this},be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(n){var t=this.__data__,r=Ee(t,n);return!(r<0||(r==t.length-1?t.pop():zr.call(t,r,1),--this.size,0))},be.prototype.get=function(t){var r=this.__data__,e=Ee(r,t);return e<0?n:r[e][1]},be.prototype.has=function(n){return Ee(this.__data__,n)>-1},be.prototype.set=function(n,t){var r=this.__data__,e=Ee(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},we.prototype.clear=function(){this.size=0,this.__data__={hash:new de,map:new(Qr||be),string:new de}},we.prototype.delete=function(n){var t=Bi(this,n).delete(n);return this.size-=t?1:0,t},we.prototype.get=function(n){return Bi(this,n).get(n)},we.prototype.has=function(n){return Bi(this,n).has(n)},we.prototype.set=function(n,t){var r=Bi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},me.prototype.add=me.prototype.push=function(n){return this.__data__.set(n,u),this},me.prototype.has=function(n){return this.__data__.has(n)},xe.prototype.clear=function(){this.__data__=new be,this.size=0},xe.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},xe.prototype.get=function(n){return this.__data__.get(n)},xe.prototype.has=function(n){return this.__data__.has(n)},xe.prototype.set=function(n,r){var e=this.__data__;if(e instanceof be){var u=e.__data__;if(!Qr||u.length<t-1)return u.push([n,r]),this.size=++e.size,this;e=this.__data__=new we(u)}return e.set(n,r),this.size=e.size,this};var De=oi(Ve),Me=oi(Ge,!0);function Fe(n,t){var r=!0;return De(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Ne(t,r,e){for(var u=-1,i=t.length;++u<i;){var o=t[u],f=r(o);if(null!=f&&(a===n?f==f&&!Bf(f):e(f,a)))var a=f,c=o}return c}function Pe(n,t){var r=[];return De(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function qe(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=qi),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?qe(f,t-1,r,e,u):Yt(u,f):e||(u[u.length]=f)}return u}var Ze=fi(),Ke=fi(!0);function Ve(n,t){return n&&Ze(n,t,ia)}function Ge(n,t){return n&&Ke(n,t,ia)}function He(n,t){return Vt(t,function(t){return kf(n[t])})}function Je(t,r){for(var e=0,u=(r=Ku(r,t)).length;null!=t&&e<u;)t=t[co(r[e++])];return e&&e==u?t:n}function Ye(n,t,r){var e=t(n);return df(n)?e:Yt(e,r(n))}function Qe(t){return null==t?t===n?tn:G:Wr&&Wr in et(t)?function(t){var r=ht.call(t,Wr),e=t[Wr];try{t[Wr]=n;var u=!0}catch(n){}var i=yt.call(t);return u&&(r?t[Wr]=e:delete t[Wr]),i}(t):function(n){return yt.call(n)}(t)}function Xe(n,t){return n>t}function nu(n,t){return null!=n&&ht.call(n,t)}function tu(n,t){return null!=n&&t in et(n)}function ru(t,r,e){for(var u=e?Ht:Gt,i=t[0].length,o=t.length,f=o,a=Qn(o),c=1/0,l=[];f--;){var s=t[f];f&&r&&(s=Jt(s,pr(r))),c=Kr(s.length,c),a[f]=!e&&(r||i>=120&&s.length>=120)?new me(f&&s):n}s=t[0];var h=-1,p=a[0];n:for(;++h<i&&l.length<c;){var v=s[h],_=r?r(v):v;if(v=e||0!==v?v:0,!(p?_r(p,_):u(l,_,e))){for(f=o;--f;){var g=a[f];if(!(g?_r(g,_):u(t[f],_,e)))continue n}p&&p.push(_),l.push(v)}}return l}function eu(t,r,e){var u=null==(t=no(t,r=Ku(r,t)))?t:t[co(jo(r))];return null==u?n:Nt(u,t,e)}function uu(n){return Ef(n)&&Qe(n)==T}function iu(t,r,e,u,i){return t===r||(null==t||null==r||!Ef(t)&&!Ef(r)?t!=t&&r!=r:function(t,r,e,u,i,o){var f=df(t),a=df(r),c=f?$:Fi(t),h=a?$:Fi(r),p=(c=c==T?H:c)==H,v=(h=h==T?H:h)==H,_=c==h;if(_&&xf(t)){if(!xf(r))return!1;f=!0,p=!1}if(_&&!p)return o||(o=new xe),f||Tf(t)?Ri(t,r,e,u,i,o):function(n,t,r,e,u,i,o){switch(r){case on:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case un:return!(n.byteLength!=t.byteLength||!i(new Lt(n),new Lt(t)));case M:case F:case V:return vf(+n,+t);case P:return n.name==t.name&&n.message==t.message;case Y:case X:return n==t+"";case K:var f=xr;case Q:var a=e&l;if(f||(f=kr),n.size!=t.size&&!a)return!1;var c=o.get(n);if(c)return c==t;e|=s,o.set(n,t);var h=Ri(f(n),f(t),e,u,i,o);return o.delete(n),h;case nn:if(se)return se.call(n)==se.call(t)}return!1}(t,r,c,e,u,i,o);if(!(e&l)){var g=p&&ht.call(t,"__wrapped__"),y=v&&ht.call(r,"__wrapped__");if(g||y){var d=g?t.value():t,b=y?r.value():r;return o||(o=new xe),i(d,b,e,u,o)}}return!!_&&(o||(o=new xe),function(t,r,e,u,i,o){var f=e&l,a=zi(t),c=a.length,s=zi(r).length;if(c!=s&&!f)return!1;for(var h=c;h--;){var p=a[h];if(!(f?p in r:ht.call(r,p)))return!1}var v=o.get(t);if(v&&o.get(r))return v==r;var _=!0;o.set(t,r),o.set(r,t);for(var g=f;++h<c;){p=a[h];var y=t[p],d=r[p];if(u)var b=f?u(d,y,p,r,t,o):u(y,d,p,t,r,o);if(!(b===n?y===d||i(y,d,e,u,o):b)){_=!1;break}g||(g="constructor"==p)}if(_&&!g){var w=t.constructor,m=r.constructor;w!=m&&"constructor"in t&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof m&&m instanceof m)&&(_=!1)}return o.delete(t),o.delete(r),_}(t,r,e,u,i,o))}(t,r,e,u,iu,i))}function ou(t,r,e,u){var i=e.length,o=i,f=!u;if(null==t)return!o;for(t=et(t);i--;){var a=e[i];if(f&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var c=(a=e[i])[0],h=t[c],p=a[1];if(f&&a[2]){if(h===n&&!(c in t))return!1}else{var v=new xe;if(u)var _=u(h,p,c,t,r,v);if(!(_===n?iu(p,h,l|s,u,v):_))return!1}}return!0}function fu(n){return!(!Rf(n)||(t=n,vt&&vt in t))&&(kf(n)?Rt:Pn).test(lo(n));var t}function au(n){return"function"==typeof n?n:null==n?Sa:"object"==typeof n?df(n)?vu(n[0],n[1]):pu(n):Ma(n)}function cu(n){if(!Ji(n))return qr(n);var t=[];for(var r in et(n))ht.call(n,r)&&"constructor"!=r&&t.push(r);return t}function lu(n){if(!Rf(n))return function(n){var t=[];if(null!=n)for(var r in et(n))t.push(r);return t}(n);var t=Ji(n),r=[];for(var e in n)("constructor"!=e||!t&&ht.call(n,e))&&r.push(e);return r}function su(n,t){return n<t}function hu(n,t){var r=-1,e=wf(n)?Qn(n.length):[];return De(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function pu(n){var t=Ti(n);return 1==t.length&&t[0][2]?Qi(t[0][0],t[0][1]):function(r){return r===n||ou(r,n,t)}}function vu(t,r){return Vi(t)&&Yi(r)?Qi(co(t),r):function(e){var u=na(e,t);return u===n&&u===r?ta(e,t):iu(r,u,l|s)}}function _u(t,r,e,u,i){t!==r&&Ze(r,function(o,f){if(i||(i=new xe),Rf(o))!function(t,r,e,u,i,o,f){var a=to(t,e),c=to(r,e),l=f.get(c);if(l)Ie(t,e,l);else{var s=o?o(a,c,e+"",t,r,f):n,h=s===n;if(h){var p=df(c),v=!p&&xf(c),_=!p&&!v&&Tf(c);s=c,p||v||_?df(a)?s=a:mf(a)?s=ri(a):v?(h=!1,s=Ju(c,!0)):_?(h=!1,s=Qu(c,!0)):s=[]:Lf(c)||yf(c)?(s=a,yf(a)?s=Zf(a):Rf(a)&&!kf(a)||(s=Pi(c))):h=!1}h&&(f.set(c,s),i(s,c,u,o,f),f.delete(c)),Ie(t,e,s)}}(t,r,f,e,_u,u,i);else{var a=u?u(to(t,f),o,f+"",t,r,i):n;a===n&&(a=o),Ie(t,f,a)}},oa)}function gu(t,r){var e=t.length;if(e)return Zi(r+=r<0?e:0,e)?t[r]:n}function yu(n,t,r){var e=-1;return t=Jt(t.length?t:[Sa],pr(Ui())),function(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}(hu(n,function(n,r,u){return{criteria:Jt(t,function(t){return t(n)}),index:++e,value:n}}),function(n,t){return function(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var a=Xu(u[e],i[e]);if(a){if(e>=f)return a;var c=r[e];return a*("desc"==c?-1:1)}}return n.index-t.index}(n,t,r)})}function du(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=Je(n,o);r(f,o)&&Ou(i,Ku(o,n),f)}return i}function bu(n,t,r,e){var u=e?ir:ur,i=-1,o=t.length,f=n;for(n===t&&(t=ri(t)),r&&(f=Jt(n,pr(r)));++i<o;)for(var a=0,c=t[i],l=r?r(c):c;(a=u(f,l,a,e))>-1;)f!==n&&zr.call(f,a,1),zr.call(n,a,1);return n}function wu(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Zi(u)?zr.call(n,u,1):$u(n,u)}}return n}function mu(n,t){return n+Dr(Hr()*(t-n+1))}function xu(n,t){var r="";if(!n||t<1||t>z)return r;do{t%2&&(r+=n),(t=Dr(t/2))&&(n+=n)}while(t);return r}function ju(n,t){return uo(Xi(n,t,Sa),n+"")}function Au(n){return Ae(va(n))}function ku(n,t){var r=va(n);return fo(r,Ce(t,0,r.length))}function Ou(t,r,e,u){if(!Rf(t))return t;for(var i=-1,o=(r=Ku(r,t)).length,f=o-1,a=t;null!=a&&++i<o;){var c=co(r[i]),l=e;if(i!=f){var s=a[c];(l=u?u(s,c,a):n)===n&&(l=Rf(s)?s:Zi(r[i+1])?[]:{})}Re(a,c,l),a=a[c]}return t}var Iu=ee?function(n,t){return ee.set(n,t),n}:Sa,Ru=Cr?function(n,t){return Cr(n,"toString",{configurable:!0,enumerable:!1,value:Ra(t),writable:!0})}:Sa;function Eu(n){return fo(va(n))}function zu(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=Qn(u);++e<u;)i[e]=n[e+t];return i}function Su(n,t){var r;return De(n,function(n,e,u){return!(r=t(n,e,u))}),!!r}function Lu(n,t,r){var e=0,u=null==n?e:n.length;if("number"==typeof t&&t==t&&u<=U){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Bf(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return Wu(n,t,Sa,r)}function Wu(t,r,e,u){r=e(r);for(var i=0,o=null==t?0:t.length,f=r!=r,a=null===r,c=Bf(r),l=r===n;i<o;){var s=Dr((i+o)/2),h=e(t[s]),p=h!==n,v=null===h,_=h==h,g=Bf(h);if(f)var y=u||_;else y=l?_&&(u||p):a?_&&p&&(u||!v):c?_&&p&&!v&&(u||!g):!v&&!g&&(u?h<=r:h<r);y?i=s+1:o=s}return Kr(o,C)}function Cu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!vf(f,a)){var a=f;i[u++]=0===o?0:o}}return i}function Uu(n){return"number"==typeof n?n:Bf(n)?L:+n}function Bu(n){if("string"==typeof n)return n;if(df(n))return Jt(n,Bu)+"";if(Bf(n))return he?he.call(n):"";var t=n+"";return"0"==t&&1/n==-E?"-0":t}function Tu(n,r,e){var u=-1,i=Gt,o=n.length,f=!0,a=[],c=a;if(e)f=!1,i=Ht;else if(o>=t){var l=r?null:xi(n);if(l)return kr(l);f=!1,i=_r,c=new me}else c=r?[]:a;n:for(;++u<o;){var s=n[u],h=r?r(s):s;if(s=e||0!==s?s:0,f&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue n;r&&c.push(h),a.push(s)}else i(c,h,e)||(c!==a&&c.push(h),a.push(s))}return a}function $u(n,t){return null==(n=no(n,t=Ku(t,n)))||delete n[co(jo(t))]}function Du(n,t,r,e){return Ou(n,t,r(Je(n,t)),e)}function Mu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?zu(n,e?0:i,e?i+1:u):zu(n,e?i+1:0,e?u:i)}function Fu(n,t){var r=n;return r instanceof ye&&(r=r.value()),Qt(t,function(n,t){return t.func.apply(t.thisArg,Yt([n],t.args))},r)}function Nu(n,t,r){var e=n.length;if(e<2)return e?Tu(n[0]):[];for(var u=-1,i=Qn(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=$e(i[u]||o,n[f],t,r));return Tu(qe(i,1),t,r)}function Pu(t,r,e){for(var u=-1,i=t.length,o=r.length,f={};++u<i;){var a=u<o?r[u]:n;e(f,t[u],a)}return f}function qu(n){return mf(n)?n:[]}function Zu(n){return"function"==typeof n?n:Sa}function Ku(n,t){return df(n)?n:Vi(n,t)?[n]:ao(Kf(n))}var Vu=ju;function Gu(t,r,e){var u=t.length;return e=e===n?u:e,!r&&e>=u?t:zu(t,r,e)}var Hu=Ur||function(n){return zt.clearTimeout(n)};function Ju(n,t){if(t)return n.slice();var r=n.length,e=Ct?Ct(r):new n.constructor(r);return n.copy(e),e}function Yu(n){var t=new n.constructor(n.byteLength);return new Lt(t).set(new Lt(n)),t}function Qu(n,t){var r=t?Yu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Xu(t,r){if(t!==r){var e=t!==n,u=null===t,i=t==t,o=Bf(t),f=r!==n,a=null===r,c=r==r,l=Bf(r);if(!a&&!l&&!o&&t>r||o&&f&&c&&!a&&!l||u&&f&&c||!e&&c||!i)return 1;if(!u&&!o&&!l&&t<r||l&&e&&i&&!u&&!o||a&&e&&i||!f&&i||!c)return-1}return 0}function ni(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,a=t.length,c=Zr(i-o,0),l=Qn(a+c),s=!e;++f<a;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;c--;)l[f++]=n[u++];return l}function ti(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,a=-1,c=t.length,l=Zr(i-f,0),s=Qn(l+c),h=!e;++u<l;)s[u]=n[u];for(var p=u;++a<c;)s[p+a]=t[a];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function ri(n,t){var r=-1,e=n.length;for(t||(t=Qn(e));++r<e;)t[r]=n[r];return t}function ei(t,r,e,u){var i=!e;e||(e={});for(var o=-1,f=r.length;++o<f;){var a=r[o],c=u?u(e[a],t[a],a,e,t):n;c===n&&(c=t[a]),i?Le(e,a,c):Re(e,a,c)}return e}function ui(n,t){return function(r,e){var u=df(r)?Pt:ze,i=t?t():{};return u(r,n,Ui(e,2),i)}}function ii(t){return ju(function(r,e){var u=-1,i=e.length,o=i>1?e[i-1]:n,f=i>2?e[2]:n;for(o=t.length>3&&"function"==typeof o?(i--,o):n,f&&Ki(e[0],e[1],f)&&(o=i<3?n:o,i=1),r=et(r);++u<i;){var a=e[u];a&&t(r,a,u,o)}return r})}function oi(n,t){return function(r,e){if(null==r)return r;if(!wf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=et(r);(t?i--:++i<u)&&!1!==e(o[i],i,o););return r}}function fi(n){return function(t,r,e){for(var u=-1,i=et(t),o=e(t),f=o.length;f--;){var a=o[n?f:++u];if(!1===r(i[a],a,i))break}return t}}function ai(t){return function(r){var e=mr(r=Kf(r))?Rr(r):n,u=e?e[0]:r.charAt(0),i=e?Gu(e,1).join(""):r.slice(1);return u[t]()+i}}function ci(n){return function(t){return Qt(ka(ya(t).replace(_t,"")),n,"")}}function li(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=ve(n.prototype),e=n.apply(r,t);return Rf(e)?e:r}}function si(t){return function(r,e,u){var i=et(r);if(!wf(r)){var o=Ui(e,3);r=ia(r),e=function(n){return o(i[n],n,i)}}var f=t(r,e,u);return f>-1?i[o?r[f]:f]:n}}function hi(t){return Ei(function(r){var u=r.length,i=u,o=ge.prototype.thru;for(t&&r.reverse();i--;){var f=r[i];if("function"!=typeof f)throw new ot(e);if(o&&!a&&"wrapper"==Wi(f))var a=new ge([],!0)}for(i=a?i:u;++i<u;){var c=Wi(f=r[i]),l="wrapper"==c?Li(f):n;a=l&&Gi(l[0])&&l[1]==(w|g|d|m)&&!l[4].length&&1==l[9]?a[Wi(l[0])].apply(a,l[3]):1==f.length&&Gi(f)?a[c]():a.thru(f)}return function(){var n=arguments,t=n[0];if(a&&1==n.length&&df(t))return a.plant(t).value();for(var e=0,i=u?r[e].apply(this,n):t;++e<u;)i=r[e].call(this,i);return i}})}function pi(t,r,e,u,i,o,f,a,c,l){var s=r&w,v=r&h,_=r&p,d=r&(g|y),b=r&x,m=_?n:li(t);return function h(){for(var p=arguments.length,g=Qn(p),y=p;y--;)g[y]=arguments[y];if(d)var w=Ci(h),x=function(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}(g,w);if(u&&(g=ni(g,u,i,d)),o&&(g=ti(g,o,f,d)),p-=x,d&&p<l){var j=Ar(g,w);return wi(t,r,pi,h.placeholder,e,g,j,a,c,l-p)}var A=v?e:this,k=_?A[t]:t;return p=g.length,a?g=function(t,r){for(var e=t.length,u=Kr(r.length,e),i=ri(t);u--;){var o=r[u];t[u]=Zi(o,e)?i[o]:n}return t}(g,a):b&&p>1&&g.reverse(),s&&c<p&&(g.length=c),this&&this!==zt&&this instanceof h&&(k=m||li(k)),k.apply(A,g)}}function vi(n,t){return function(r,e){return function(n,t,r,e){return Ve(n,function(n,u,i){t(e,r(n),u,i)}),e}(r,n,t(e),{})}}function _i(t,r){return function(e,u){var i;if(e===n&&u===n)return r;if(e!==n&&(i=e),u!==n){if(i===n)return u;"string"==typeof e||"string"==typeof u?(e=Bu(e),u=Bu(u)):(e=Uu(e),u=Uu(u)),i=t(e,u)}return i}}function gi(n){return Ei(function(t){return t=Jt(t,pr(Ui())),ju(function(r){var e=this;return n(t,function(n){return Nt(n,e,r)})})})}function yi(t,r){var e=(r=r===n?" ":Bu(r)).length;if(e<2)return e?xu(r,t):r;var u=xu(r,$r(t/Ir(r)));return mr(r)?Gu(Rr(u),0,t).join(""):u.slice(0,t)}function di(t){return function(r,e,u){return u&&"number"!=typeof u&&Ki(r,e,u)&&(e=u=n),r=Ff(r),e===n?(e=r,r=0):e=Ff(e),function(n,t,r,e){for(var u=-1,i=Zr($r((t-n)/(r||1)),0),o=Qn(i);i--;)o[e?i:++u]=n,n+=r;return o}(r,e,u=u===n?r<e?1:-1:Ff(u),t)}}function bi(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=qf(t),r=qf(r)),n(t,r)}}function wi(t,r,e,u,i,o,f,a,c,l){var s=r&g;r|=s?d:b,(r&=~(s?b:d))&v||(r&=~(h|p));var _=[t,r,i,s?o:n,s?f:n,s?n:o,s?n:f,a,c,l],y=e.apply(n,_);return Gi(t)&&ro(y,_),y.placeholder=u,io(y,t,r)}function mi(n){var t=rt[n];return function(n,r){if(n=qf(n),(r=null==r?0:Kr(Nf(r),292))&&Nr(n)){var e=(Kf(n)+"e").split("e");return+((e=(Kf(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return t(n)}}var xi=ne&&1/kr(new ne([,-0]))[1]==E?function(n){return new ne(n)}:Ba;function ji(n){return function(t){var r=Fi(t);return r==K?xr(t):r==Q?Or(t):function(n,t){return Jt(t,function(t){return[t,n[t]]})}(t,n(t))}}function Ai(t,r,u,i,f,a,c,l){var s=r&p;if(!s&&"function"!=typeof t)throw new ot(e);var _=i?i.length:0;if(_||(r&=~(d|b),i=f=n),c=c===n?c:Zr(Nf(c),0),l=l===n?l:Nf(l),_-=f?f.length:0,r&b){var x=i,j=f;i=f=n}var A=s?n:Li(t),k=[t,r,u,i,f,x,j,a,c,l];if(A&&function(n,t){var r=n[1],e=t[1],u=r|e,i=u<(h|p|w),f=e==w&&r==g||e==w&&r==m&&n[7].length<=t[8]||e==(w|m)&&t[7].length<=t[8]&&r==g;if(!i&&!f)return n;e&h&&(n[2]=t[2],u|=r&h?0:v);var a=t[3];if(a){var c=n[3];n[3]=c?ni(c,a,t[4]):a,n[4]=c?Ar(n[3],o):t[4]}(a=t[5])&&(c=n[5],n[5]=c?ti(c,a,t[6]):a,n[6]=c?Ar(n[5],o):t[6]),(a=t[7])&&(n[7]=a),e&w&&(n[8]=null==n[8]?t[8]:Kr(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u}(k,A),t=k[0],r=k[1],u=k[2],i=k[3],f=k[4],!(l=k[9]=k[9]===n?s?0:t.length:Zr(k[9]-_,0))&&r&(g|y)&&(r&=~(g|y)),r&&r!=h)O=r==g||r==y?function(t,r,e){var u=li(t);return function i(){for(var o=arguments.length,f=Qn(o),a=o,c=Ci(i);a--;)f[a]=arguments[a];var l=o<3&&f[0]!==c&&f[o-1]!==c?[]:Ar(f,c);return(o-=l.length)<e?wi(t,r,pi,i.placeholder,n,f,l,n,n,e-o):Nt(this&&this!==zt&&this instanceof i?u:t,this,f)}}(t,r,l):r!=d&&r!=(h|d)||f.length?pi.apply(n,k):function(n,t,r,e){var u=t&h,i=li(n);return function t(){for(var o=-1,f=arguments.length,a=-1,c=e.length,l=Qn(c+f),s=this&&this!==zt&&this instanceof t?i:n;++a<c;)l[a]=e[a];for(;f--;)l[a++]=arguments[++o];return Nt(s,u?r:this,l)}}(t,r,u,i);else var O=function(n,t,r){var e=t&h,u=li(n);return function t(){return(this&&this!==zt&&this instanceof t?u:n).apply(e?r:this,arguments)}}(t,r,u);return io((A?Iu:ro)(O,k),t,r)}function ki(t,r,e,u){return t===n||vf(t,ct[e])&&!ht.call(u,e)?r:t}function Oi(t,r,e,u,i,o){return Rf(t)&&Rf(r)&&(o.set(r,t),_u(t,r,n,Oi,o),o.delete(r)),t}function Ii(t){return Lf(t)?n:t}function Ri(t,r,e,u,i,o){var f=e&l,a=t.length,c=r.length;if(a!=c&&!(f&&c>a))return!1;var h=o.get(t);if(h&&o.get(r))return h==r;var p=-1,v=!0,_=e&s?new me:n;for(o.set(t,r),o.set(r,t);++p<a;){var g=t[p],y=r[p];if(u)var d=f?u(y,g,p,r,t,o):u(g,y,p,t,r,o);if(d!==n){if(d)continue;v=!1;break}if(_){if(!nr(r,function(n,t){if(!_r(_,t)&&(g===n||i(g,n,e,u,o)))return _.push(t)})){v=!1;break}}else if(g!==y&&!i(g,y,e,u,o)){v=!1;break}}return o.delete(t),o.delete(r),v}function Ei(t){return uo(Xi(t,n,yo),t+"")}function zi(n){return Ye(n,ia,Di)}function Si(n){return Ye(n,oa,Mi)}var Li=ee?function(n){return ee.get(n)}:Ba;function Wi(n){for(var t=n.name+"",r=ue[t],e=ht.call(ue,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function Ci(n){return(ht.call(pe,"placeholder")?pe:n).placeholder}function Ui(){var n=pe.iteratee||La;return n=n===La?au:n,arguments.length?n(arguments[0],arguments[1]):n}function Bi(n,t){var r,e,u=n.__data__;return("string"==(e=typeof(r=t))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?u["string"==typeof t?"string":"hash"]:u.map}function Ti(n){for(var t=ia(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Yi(u)]}return t}function $i(t,r){var e=function(t,r){return null==t?n:t[r]}(t,r);return fu(e)?e:n}var Di=Mr?function(n){return null==n?[]:(n=et(n),Vt(Mr(n),function(t){return cr.call(n,t)}))}:Pa,Mi=Mr?function(n){for(var t=[];n;)Yt(t,Di(n)),n=Ut(n);return t}:Pa,Fi=Qe;function Ni(n,t,r){for(var e=-1,u=(t=Ku(t,n)).length,i=!1;++e<u;){var o=co(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:!!(u=null==n?0:n.length)&&If(u)&&Zi(o,u)&&(df(n)||yf(n))}function Pi(n){return"function"!=typeof n.constructor||Ji(n)?{}:ve(Ut(n))}function qi(n){return df(n)||yf(n)||!!(Sr&&n&&n[Sr])}function Zi(n,t){var r=typeof n;return!!(t=null==t?z:t)&&("number"==r||"symbol"!=r&&Zn.test(n))&&n>-1&&n%1==0&&n<t}function Ki(n,t,r){if(!Rf(r))return!1;var e=typeof t;return!!("number"==e?wf(r)&&Zi(t,r.length):"string"==e&&t in r)&&vf(r[t],n)}function Vi(n,t){if(df(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Bf(n))||In.test(n)||!On.test(n)||null!=t&&n in et(t)}function Gi(n){var t=Wi(n),r=pe[t];if("function"!=typeof r||!(t in ye.prototype))return!1;if(n===r)return!0;var e=Li(r);return!!e&&n===e[0]}(Yr&&Fi(new Yr(new ArrayBuffer(1)))!=on||Qr&&Fi(new Qr)!=K||Xr&&"[object Promise]"!=Fi(Xr.resolve())||ne&&Fi(new ne)!=Q||te&&Fi(new te)!=rn)&&(Fi=function(t){var r=Qe(t),e=r==H?t.constructor:n,u=e?lo(e):"";if(u)switch(u){case ie:return on;case oe:return K;case fe:return"[object Promise]";case ae:return Q;case ce:return rn}return r});var Hi=lt?kf:qa;function Ji(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||ct)}function Yi(n){return n==n&&!Rf(n)}function Qi(t,r){return function(e){return null!=e&&e[t]===r&&(r!==n||t in et(e))}}function Xi(t,r,e){return r=Zr(r===n?t.length-1:r,0),function(){for(var n=arguments,u=-1,i=Zr(n.length-r,0),o=Qn(i);++u<i;)o[u]=n[r+u];u=-1;for(var f=Qn(r+1);++u<r;)f[u]=n[u];return f[r]=e(o),Nt(t,this,f)}}function no(n,t){return t.length<2?n:Je(n,zu(t,0,-1))}function to(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}var ro=oo(Iu),eo=Tr||function(n,t){return zt.setTimeout(n,t)},uo=oo(Ru);function io(n,t,r){var e=t+"";return uo(n,function(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Cn,"{\n/* [wrapped with "+t+"] */\n")}(e,function(n,t){return qt(B,function(r){var e="_."+r[0];t&r[1]&&!Gt(n,e)&&n.push(e)}),n.sort()}(function(n){var t=n.match(Un);return t?t[1].split(Bn):[]}(e),r)))}function oo(t){var r=0,e=0;return function(){var u=Vr(),i=O-(u-e);if(e=u,i>0){if(++r>=k)return arguments[0]}else r=0;return t.apply(n,arguments)}}function fo(t,r){var e=-1,u=t.length,i=u-1;for(r=r===n?u:r;++e<r;){var o=mu(e,i),f=t[o];t[o]=t[e],t[e]=f}return t.length=r,t}var ao=function(n){var t=af(n,function(n){return r.size===i&&r.clear(),n}),r=t.cache;return t}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Rn,function(n,r,e,u){t.push(e?u.replace($n,"$1"):r||n)}),t});function co(n){if("string"==typeof n||Bf(n))return n;var t=n+"";return"0"==t&&1/n==-E?"-0":t}function lo(n){if(null!=n){try{return st.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function so(n){if(n instanceof ye)return n.clone();var t=new ge(n.__wrapped__,n.__chain__);return t.__actions__=ri(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var ho=ju(function(n,t){return mf(n)?$e(n,qe(t,1,mf,!0)):[]}),po=ju(function(t,r){var e=jo(r);return mf(e)&&(e=n),mf(t)?$e(t,qe(r,1,mf,!0),Ui(e,2)):[]}),vo=ju(function(t,r){var e=jo(r);return mf(e)&&(e=n),mf(t)?$e(t,qe(r,1,mf,!0),n,e):[]});function _o(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Nf(r);return u<0&&(u=Zr(e+u,0)),er(n,Ui(t,3),u)}function go(t,r,e){var u=null==t?0:t.length;if(!u)return-1;var i=u-1;return e!==n&&(i=Nf(e),i=e<0?Zr(u+i,0):Kr(i,u-1)),er(t,Ui(r,3),i,!0)}function yo(n){return null!=n&&n.length?qe(n,1):[]}function bo(t){return t&&t.length?t[0]:n}var wo=ju(function(n){var t=Jt(n,qu);return t.length&&t[0]===n[0]?ru(t):[]}),mo=ju(function(t){var r=jo(t),e=Jt(t,qu);return r===jo(e)?r=n:e.pop(),e.length&&e[0]===t[0]?ru(e,Ui(r,2)):[]}),xo=ju(function(t){var r=jo(t),e=Jt(t,qu);return(r="function"==typeof r?r:n)&&e.pop(),e.length&&e[0]===t[0]?ru(e,n,r):[]});function jo(t){var r=null==t?0:t.length;return r?t[r-1]:n}var Ao=ju(ko);function ko(n,t){return n&&n.length&&t&&t.length?bu(n,t):n}var Oo=Ei(function(n,t){var r=null==n?0:n.length,e=We(n,t);return wu(n,Jt(t,function(n){return Zi(n,r)?+n:n}).sort(Xu)),e});function Io(n){return null==n?n:Jr.call(n)}var Ro=ju(function(n){return Tu(qe(n,1,mf,!0))}),Eo=ju(function(t){var r=jo(t);return mf(r)&&(r=n),Tu(qe(t,1,mf,!0),Ui(r,2))}),zo=ju(function(t){var r=jo(t);return r="function"==typeof r?r:n,Tu(qe(t,1,mf,!0),n,r)});function So(n){if(!n||!n.length)return[];var t=0;return n=Vt(n,function(n){if(mf(n))return t=Zr(n.length,t),!0}),hr(t,function(t){return Jt(n,ar(t))})}function Lo(t,r){if(!t||!t.length)return[];var e=So(t);return null==r?e:Jt(e,function(t){return Nt(r,n,t)})}var Wo=ju(function(n,t){return mf(n)?$e(n,t):[]}),Co=ju(function(n){return Nu(Vt(n,mf))}),Uo=ju(function(t){var r=jo(t);return mf(r)&&(r=n),Nu(Vt(t,mf),Ui(r,2))}),Bo=ju(function(t){var r=jo(t);return r="function"==typeof r?r:n,Nu(Vt(t,mf),n,r)}),To=ju(So);var $o=ju(function(t){var r=t.length,e=r>1?t[r-1]:n;return e="function"==typeof e?(t.pop(),e):n,Lo(t,e)});function Do(n){var t=pe(n);return t.__chain__=!0,t}function Mo(n,t){return t(n)}var Fo=Ei(function(t){var r=t.length,e=r?t[0]:0,u=this.__wrapped__,i=function(n){return We(n,t)};return!(r>1||this.__actions__.length)&&u instanceof ye&&Zi(e)?((u=u.slice(e,+e+(r?1:0))).__actions__.push({func:Mo,args:[i],thisArg:n}),new ge(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(n),t})):this.thru(i)});var No=ui(function(n,t,r){ht.call(n,r)?++n[r]:Le(n,r,1)});var Po=si(_o),qo=si(go);function Zo(n,t){return(df(n)?qt:De)(n,Ui(t,3))}function Ko(n,t){return(df(n)?Zt:Me)(n,Ui(t,3))}var Vo=ui(function(n,t,r){ht.call(n,r)?n[r].push(t):Le(n,r,[t])});var Go=ju(function(n,t,r){var e=-1,u="function"==typeof t,i=wf(n)?Qn(n.length):[];return De(n,function(n){i[++e]=u?Nt(t,n,r):eu(n,t,r)}),i}),Ho=ui(function(n,t,r){Le(n,r,t)});function Jo(n,t){return(df(n)?Jt:hu)(n,Ui(t,3))}var Yo=ui(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]});var Qo=ju(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ki(n,t[0],t[1])?t=[]:r>2&&Ki(t[0],t[1],t[2])&&(t=[t[0]]),yu(n,qe(t,1),[])}),Xo=Br||function(){return zt.Date.now()};function nf(t,r,e){return r=e?n:r,r=t&&null==r?t.length:r,Ai(t,w,n,n,n,n,r)}function tf(t,r){var u;if("function"!=typeof r)throw new ot(e);return t=Nf(t),function(){return--t>0&&(u=r.apply(this,arguments)),t<=1&&(r=n),u}}var rf=ju(function(n,t,r){var e=h;if(r.length){var u=Ar(r,Ci(rf));e|=d}return Ai(n,e,t,r,u)}),ef=ju(function(n,t,r){var e=h|p;if(r.length){var u=Ar(r,Ci(ef));e|=d}return Ai(t,e,n,r,u)});function uf(t,r,u){var i,o,f,a,c,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof t)throw new ot(e);function _(r){var e=i,u=o;return i=o=n,s=r,a=t.apply(u,e)}function g(t){var e=t-l;return l===n||e>=r||e<0||p&&t-s>=f}function y(){var n=Xo();if(g(n))return d(n);c=eo(y,function(n){var t=r-(n-l);return p?Kr(t,f-(n-s)):t}(n))}function d(t){return c=n,v&&i?_(t):(i=o=n,a)}function b(){var t=Xo(),e=g(t);if(i=arguments,o=this,l=t,e){if(c===n)return function(n){return s=n,c=eo(y,r),h?_(n):a}(l);if(p)return Hu(c),c=eo(y,r),_(l)}return c===n&&(c=eo(y,r)),a}return r=qf(r)||0,Rf(u)&&(h=!!u.leading,f=(p="maxWait"in u)?Zr(qf(u.maxWait)||0,r):f,v="trailing"in u?!!u.trailing:v),b.cancel=function(){c!==n&&Hu(c),s=0,i=l=o=c=n},b.flush=function(){return c===n?a:d(Xo())},b}var of=ju(function(n,t){return Te(n,1,t)}),ff=ju(function(n,t,r){return Te(n,qf(t)||0,r)});function af(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new ot(e);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(af.Cache||we),r}function cf(n){if("function"!=typeof n)throw new ot(e);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}af.Cache=we;var lf=Vu(function(n,t){var r=(t=1==t.length&&df(t[0])?Jt(t[0],pr(Ui())):Jt(qe(t,1),pr(Ui()))).length;return ju(function(e){for(var u=-1,i=Kr(e.length,r);++u<i;)e[u]=t[u].call(this,e[u]);return Nt(n,this,e)})}),sf=ju(function(t,r){var e=Ar(r,Ci(sf));return Ai(t,d,n,r,e)}),hf=ju(function(t,r){var e=Ar(r,Ci(hf));return Ai(t,b,n,r,e)}),pf=Ei(function(t,r){return Ai(t,m,n,n,n,r)});function vf(n,t){return n===t||n!=n&&t!=t}var _f=bi(Xe),gf=bi(function(n,t){return n>=t}),yf=uu(function(){return arguments}())?uu:function(n){return Ef(n)&&ht.call(n,"callee")&&!cr.call(n,"callee")},df=Qn.isArray,bf=Bt?pr(Bt):function(n){return Ef(n)&&Qe(n)==un};function wf(n){return null!=n&&If(n.length)&&!kf(n)}function mf(n){return Ef(n)&&wf(n)}var xf=Fr||qa,jf=Tt?pr(Tt):function(n){return Ef(n)&&Qe(n)==F};function Af(n){if(!Ef(n))return!1;var t=Qe(n);return t==P||t==N||"string"==typeof n.message&&"string"==typeof n.name&&!Lf(n)}function kf(n){if(!Rf(n))return!1;var t=Qe(n);return t==q||t==Z||t==D||t==J}function Of(n){return"number"==typeof n&&n==Nf(n)}function If(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=z}function Rf(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function Ef(n){return null!=n&&"object"==typeof n}var zf=$t?pr($t):function(n){return Ef(n)&&Fi(n)==K};function Sf(n){return"number"==typeof n||Ef(n)&&Qe(n)==V}function Lf(n){if(!Ef(n)||Qe(n)!=H)return!1;var t=Ut(n);if(null===t)return!0;var r=ht.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&st.call(r)==bt}var Wf=Dt?pr(Dt):function(n){return Ef(n)&&Qe(n)==Y};var Cf=Mt?pr(Mt):function(n){return Ef(n)&&Fi(n)==Q};function Uf(n){return"string"==typeof n||!df(n)&&Ef(n)&&Qe(n)==X}function Bf(n){return"symbol"==typeof n||Ef(n)&&Qe(n)==nn}var Tf=Ft?pr(Ft):function(n){return Ef(n)&&If(n.length)&&!!jt[Qe(n)]};var $f=bi(su),Df=bi(function(n,t){return n<=t});function Mf(n){if(!n)return[];if(wf(n))return Uf(n)?Rr(n):ri(n);if(Lr&&n[Lr])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Lr]());var t=Fi(n);return(t==K?xr:t==Q?kr:va)(n)}function Ff(n){return n?(n=qf(n))===E||n===-E?(n<0?-1:1)*S:n==n?n:0:0===n?n:0}function Nf(n){var t=Ff(n),r=t%1;return t==t?r?t-r:t:0}function Pf(n){return n?Ce(Nf(n),0,W):0}function qf(n){if("number"==typeof n)return n;if(Bf(n))return L;if(Rf(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Rf(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Sn,"");var r=Nn.test(n);return r||qn.test(n)?It(n.slice(2),r?2:8):Fn.test(n)?L:+n}function Zf(n){return ei(n,oa(n))}function Kf(n){return null==n?"":Bu(n)}var Vf=ii(function(n,t){if(Ji(t)||wf(t))ei(t,ia(t),n);else for(var r in t)ht.call(t,r)&&Re(n,r,t[r])}),Gf=ii(function(n,t){ei(t,oa(t),n)}),Hf=ii(function(n,t,r,e){ei(t,oa(t),n,e)}),Jf=ii(function(n,t,r,e){ei(t,ia(t),n,e)}),Yf=Ei(We);var Qf=ju(function(t,r){t=et(t);var e=-1,u=r.length,i=u>2?r[2]:n;for(i&&Ki(r[0],r[1],i)&&(u=1);++e<u;)for(var o=r[e],f=oa(o),a=-1,c=f.length;++a<c;){var l=f[a],s=t[l];(s===n||vf(s,ct[l])&&!ht.call(t,l))&&(t[l]=o[l])}return t}),Xf=ju(function(t){return t.push(n,Oi),Nt(aa,n,t)});function na(t,r,e){var u=null==t?n:Je(t,r);return u===n?e:u}function ta(n,t){return null!=n&&Ni(n,t,tu)}var ra=vi(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=yt.call(t)),n[t]=r},Ra(Sa)),ea=vi(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=yt.call(t)),ht.call(n,t)?n[t].push(r):n[t]=[r]},Ui),ua=ju(eu);function ia(n){return wf(n)?je(n):cu(n)}function oa(n){return wf(n)?je(n,!0):lu(n)}var fa=ii(function(n,t,r){_u(n,t,r)}),aa=ii(function(n,t,r,e){_u(n,t,r,e)}),ca=Ei(function(n,t){var r={};if(null==n)return r;var e=!1;t=Jt(t,function(t){return t=Ku(t,n),e||(e=t.length>1),t}),ei(n,Si(n),r),e&&(r=Ue(r,f|a|c,Ii));for(var u=t.length;u--;)$u(r,t[u]);return r});var la=Ei(function(n,t){return null==n?{}:function(n,t){return du(n,t,function(t,r){return ta(n,r)})}(n,t)});function sa(n,t){if(null==n)return{};var r=Jt(Si(n),function(n){return[n]});return t=Ui(t),du(n,r,function(n,r){return t(n,r[0])})}var ha=ji(ia),pa=ji(oa);function va(n){return null==n?[]:vr(n,ia(n))}var _a=ci(function(n,t,r){return t=t.toLowerCase(),n+(r?ga(t):t)});function ga(n){return Aa(Kf(n).toLowerCase())}function ya(n){return(n=Kf(n))&&n.replace(Kn,dr).replace(gt,"")}var da=ci(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),ba=ci(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),wa=ai("toLowerCase");var ma=ci(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()});var xa=ci(function(n,t,r){return n+(r?" ":"")+Aa(t)});var ja=ci(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Aa=ai("toUpperCase");function ka(t,r,e){return t=Kf(t),(r=e?n:r)===n?function(n){return wt.test(n)}(t)?function(n){return n.match(dt)||[]}(t):function(n){return n.match(Tn)||[]}(t):t.match(r)||[]}var Oa=ju(function(t,r){try{return Nt(t,n,r)}catch(n){return Af(n)?n:new nt(n)}}),Ia=Ei(function(n,t){return qt(t,function(t){t=co(t),Le(n,t,rf(n[t],n))}),n});function Ra(n){return function(){return n}}var Ea=hi(),za=hi(!0);function Sa(n){return n}function La(n){return au("function"==typeof n?n:Ue(n,f))}var Wa=ju(function(n,t){return function(r){return eu(r,n,t)}}),Ca=ju(function(n,t){return function(r){return eu(n,r,t)}});function Ua(n,t,r){var e=ia(t),u=He(t,e);null!=r||Rf(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=He(t,ia(t)));var i=!(Rf(r)&&"chain"in r&&!r.chain),o=kf(n);return qt(u,function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=ri(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,Yt([this.value()],arguments))})}),n}function Ba(){}var Ta=gi(Jt),$a=gi(Kt),Da=gi(nr);function Ma(n){return Vi(n)?ar(co(n)):function(n){return function(t){return Je(t,n)}}(n)}var Fa=di(),Na=di(!0);function Pa(){return[]}function qa(){return!1}var Za=_i(function(n,t){return n+t},0),Ka=mi("ceil"),Va=_i(function(n,t){return n/t},1),Ga=mi("floor");var Ha,Ja=_i(function(n,t){return n*t},1),Ya=mi("round"),Qa=_i(function(n,t){return n-t},0);return pe.after=function(n,t){if("function"!=typeof t)throw new ot(e);return n=Nf(n),function(){if(--n<1)return t.apply(this,arguments)}},pe.ary=nf,pe.assign=Vf,pe.assignIn=Gf,pe.assignInWith=Hf,pe.assignWith=Jf,pe.at=Yf,pe.before=tf,pe.bind=rf,pe.bindAll=Ia,pe.bindKey=ef,pe.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return df(n)?n:[n]},pe.chain=Do,pe.chunk=function(t,r,e){r=(e?Ki(t,r,e):r===n)?1:Zr(Nf(r),0);var u=null==t?0:t.length;if(!u||r<1)return[];for(var i=0,o=0,f=Qn($r(u/r));i<u;)f[o++]=zu(t,i,i+=r);return f},pe.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},pe.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Qn(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return Yt(df(r)?ri(r):[r],qe(t,1))},pe.cond=function(n){var t=null==n?0:n.length,r=Ui();return n=t?Jt(n,function(n){if("function"!=typeof n[1])throw new ot(e);return[r(n[0]),n[1]]}):[],ju(function(r){for(var e=-1;++e<t;){var u=n[e];if(Nt(u[0],this,r))return Nt(u[1],this,r)}})},pe.conforms=function(n){return function(n){var t=ia(n);return function(r){return Be(r,n,t)}}(Ue(n,f))},pe.constant=Ra,pe.countBy=No,pe.create=function(n,t){var r=ve(n);return null==t?r:Se(r,t)},pe.curry=function t(r,e,u){var i=Ai(r,g,n,n,n,n,n,e=u?n:e);return i.placeholder=t.placeholder,i},pe.curryRight=function t(r,e,u){var i=Ai(r,y,n,n,n,n,n,e=u?n:e);return i.placeholder=t.placeholder,i},pe.debounce=uf,pe.defaults=Qf,pe.defaultsDeep=Xf,pe.defer=of,pe.delay=ff,pe.difference=ho,pe.differenceBy=po,pe.differenceWith=vo,pe.drop=function(t,r,e){var u=null==t?0:t.length;return u?zu(t,(r=e||r===n?1:Nf(r))<0?0:r,u):[]},pe.dropRight=function(t,r,e){var u=null==t?0:t.length;return u?zu(t,0,(r=u-(r=e||r===n?1:Nf(r)))<0?0:r):[]},pe.dropRightWhile=function(n,t){return n&&n.length?Mu(n,Ui(t,3),!0,!0):[]},pe.dropWhile=function(n,t){return n&&n.length?Mu(n,Ui(t,3),!0):[]},pe.fill=function(t,r,e,u){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&Ki(t,r,e)&&(e=0,u=i),function(t,r,e,u){var i=t.length;for((e=Nf(e))<0&&(e=-e>i?0:i+e),(u=u===n||u>i?i:Nf(u))<0&&(u+=i),u=e>u?0:Pf(u);e<u;)t[e++]=r;return t}(t,r,e,u)):[]},pe.filter=function(n,t){return(df(n)?Vt:Pe)(n,Ui(t,3))},pe.flatMap=function(n,t){return qe(Jo(n,t),1)},pe.flatMapDeep=function(n,t){return qe(Jo(n,t),E)},pe.flatMapDepth=function(t,r,e){return e=e===n?1:Nf(e),qe(Jo(t,r),e)},pe.flatten=yo,pe.flattenDeep=function(n){return null!=n&&n.length?qe(n,E):[]},pe.flattenDepth=function(t,r){return null!=t&&t.length?qe(t,r=r===n?1:Nf(r)):[]},pe.flip=function(n){return Ai(n,x)},pe.flow=Ea,pe.flowRight=za,pe.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},pe.functions=function(n){return null==n?[]:He(n,ia(n))},pe.functionsIn=function(n){return null==n?[]:He(n,oa(n))},pe.groupBy=Vo,pe.initial=function(n){return null!=n&&n.length?zu(n,0,-1):[]},pe.intersection=wo,pe.intersectionBy=mo,pe.intersectionWith=xo,pe.invert=ra,pe.invertBy=ea,pe.invokeMap=Go,pe.iteratee=La,pe.keyBy=Ho,pe.keys=ia,pe.keysIn=oa,pe.map=Jo,pe.mapKeys=function(n,t){var r={};return t=Ui(t,3),Ve(n,function(n,e,u){Le(r,t(n,e,u),n)}),r},pe.mapValues=function(n,t){var r={};return t=Ui(t,3),Ve(n,function(n,e,u){Le(r,e,t(n,e,u))}),r},pe.matches=function(n){return pu(Ue(n,f))},pe.matchesProperty=function(n,t){return vu(n,Ue(t,f))},pe.memoize=af,pe.merge=fa,pe.mergeWith=aa,pe.method=Wa,pe.methodOf=Ca,pe.mixin=Ua,pe.negate=cf,pe.nthArg=function(n){return n=Nf(n),ju(function(t){return gu(t,n)})},pe.omit=ca,pe.omitBy=function(n,t){return sa(n,cf(Ui(t)))},pe.once=function(n){return tf(2,n)},pe.orderBy=function(t,r,e,u){return null==t?[]:(df(r)||(r=null==r?[]:[r]),df(e=u?n:e)||(e=null==e?[]:[e]),yu(t,r,e))},pe.over=Ta,pe.overArgs=lf,pe.overEvery=$a,pe.overSome=Da,pe.partial=sf,pe.partialRight=hf,pe.partition=Yo,pe.pick=la,pe.pickBy=sa,pe.property=Ma,pe.propertyOf=function(t){return function(r){return null==t?n:Je(t,r)}},pe.pull=Ao,pe.pullAll=ko,pe.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?bu(n,t,Ui(r,2)):n},pe.pullAllWith=function(t,r,e){return t&&t.length&&r&&r.length?bu(t,r,n,e):t},pe.pullAt=Oo,pe.range=Fa,pe.rangeRight=Na,pe.rearg=pf,pe.reject=function(n,t){return(df(n)?Vt:Pe)(n,cf(Ui(t,3)))},pe.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=Ui(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return wu(n,u),r},pe.rest=function(t,r){if("function"!=typeof t)throw new ot(e);return ju(t,r=r===n?r:Nf(r))},pe.reverse=Io,pe.sampleSize=function(t,r,e){return r=(e?Ki(t,r,e):r===n)?1:Nf(r),(df(t)?ke:ku)(t,r)},pe.set=function(n,t,r){return null==n?n:Ou(n,t,r)},pe.setWith=function(t,r,e,u){return u="function"==typeof u?u:n,null==t?t:Ou(t,r,e,u)},pe.shuffle=function(n){return(df(n)?Oe:Eu)(n)},pe.slice=function(t,r,e){var u=null==t?0:t.length;return u?(e&&"number"!=typeof e&&Ki(t,r,e)?(r=0,e=u):(r=null==r?0:Nf(r),e=e===n?u:Nf(e)),zu(t,r,e)):[]},pe.sortBy=Qo,pe.sortedUniq=function(n){return n&&n.length?Cu(n):[]},pe.sortedUniqBy=function(n,t){return n&&n.length?Cu(n,Ui(t,2)):[]},pe.split=function(t,r,e){return e&&"number"!=typeof e&&Ki(t,r,e)&&(r=e=n),(e=e===n?W:e>>>0)?(t=Kf(t))&&("string"==typeof r||null!=r&&!Wf(r))&&!(r=Bu(r))&&mr(t)?Gu(Rr(t),0,e):t.split(r,e):[]},pe.spread=function(n,t){if("function"!=typeof n)throw new ot(e);return t=null==t?0:Zr(Nf(t),0),ju(function(r){var e=r[t],u=Gu(r,0,t);return e&&Yt(u,e),Nt(n,this,u)})},pe.tail=function(n){var t=null==n?0:n.length;return t?zu(n,1,t):[]},pe.take=function(t,r,e){return t&&t.length?zu(t,0,(r=e||r===n?1:Nf(r))<0?0:r):[]},pe.takeRight=function(t,r,e){var u=null==t?0:t.length;return u?zu(t,(r=u-(r=e||r===n?1:Nf(r)))<0?0:r,u):[]},pe.takeRightWhile=function(n,t){return n&&n.length?Mu(n,Ui(t,3),!1,!0):[]},pe.takeWhile=function(n,t){return n&&n.length?Mu(n,Ui(t,3)):[]},pe.tap=function(n,t){return t(n),n},pe.throttle=function(n,t,r){var u=!0,i=!0;if("function"!=typeof n)throw new ot(e);return Rf(r)&&(u="leading"in r?!!r.leading:u,i="trailing"in r?!!r.trailing:i),uf(n,t,{leading:u,maxWait:t,trailing:i})},pe.thru=Mo,pe.toArray=Mf,pe.toPairs=ha,pe.toPairsIn=pa,pe.toPath=function(n){return df(n)?Jt(n,co):Bf(n)?[n]:ri(ao(Kf(n)))},pe.toPlainObject=Zf,pe.transform=function(n,t,r){var e=df(n),u=e||xf(n)||Tf(n);if(t=Ui(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:Rf(n)&&kf(i)?ve(Ut(n)):{}}return(u?qt:Ve)(n,function(n,e,u){return t(r,n,e,u)}),r},pe.unary=function(n){return nf(n,1)},pe.union=Ro,pe.unionBy=Eo,pe.unionWith=zo,pe.uniq=function(n){return n&&n.length?Tu(n):[]},pe.uniqBy=function(n,t){return n&&n.length?Tu(n,Ui(t,2)):[]},pe.uniqWith=function(t,r){return r="function"==typeof r?r:n,t&&t.length?Tu(t,n,r):[]},pe.unset=function(n,t){return null==n||$u(n,t)},pe.unzip=So,pe.unzipWith=Lo,pe.update=function(n,t,r){return null==n?n:Du(n,t,Zu(r))},pe.updateWith=function(t,r,e,u){return u="function"==typeof u?u:n,null==t?t:Du(t,r,Zu(e),u)},pe.values=va,pe.valuesIn=function(n){return null==n?[]:vr(n,oa(n))},pe.without=Wo,pe.words=ka,pe.wrap=function(n,t){return sf(Zu(t),n)},pe.xor=Co,pe.xorBy=Uo,pe.xorWith=Bo,pe.zip=To,pe.zipObject=function(n,t){return Pu(n||[],t||[],Re)},pe.zipObjectDeep=function(n,t){return Pu(n||[],t||[],Ou)},pe.zipWith=$o,pe.entries=ha,pe.entriesIn=pa,pe.extend=Gf,pe.extendWith=Hf,Ua(pe,pe),pe.add=Za,pe.attempt=Oa,pe.camelCase=_a,pe.capitalize=ga,pe.ceil=Ka,pe.clamp=function(t,r,e){return e===n&&(e=r,r=n),e!==n&&(e=(e=qf(e))==e?e:0),r!==n&&(r=(r=qf(r))==r?r:0),Ce(qf(t),r,e)},pe.clone=function(n){return Ue(n,c)},pe.cloneDeep=function(n){return Ue(n,f|c)},pe.cloneDeepWith=function(t,r){return Ue(t,f|c,r="function"==typeof r?r:n)},pe.cloneWith=function(t,r){return Ue(t,c,r="function"==typeof r?r:n)},pe.conformsTo=function(n,t){return null==t||Be(n,t,ia(t))},pe.deburr=ya,pe.defaultTo=function(n,t){return null==n||n!=n?t:n},pe.divide=Va,pe.endsWith=function(t,r,e){t=Kf(t),r=Bu(r);var u=t.length,i=e=e===n?u:Ce(Nf(e),0,u);return(e-=r.length)>=0&&t.slice(e,i)==r},pe.eq=vf,pe.escape=function(n){return(n=Kf(n))&&xn.test(n)?n.replace(wn,br):n},pe.escapeRegExp=function(n){return(n=Kf(n))&&zn.test(n)?n.replace(En,"\\$&"):n},pe.every=function(t,r,e){var u=df(t)?Kt:Fe;return e&&Ki(t,r,e)&&(r=n),u(t,Ui(r,3))},pe.find=Po,pe.findIndex=_o,pe.findKey=function(n,t){return rr(n,Ui(t,3),Ve)},pe.findLast=qo,pe.findLastIndex=go,pe.findLastKey=function(n,t){return rr(n,Ui(t,3),Ge)},pe.floor=Ga,pe.forEach=Zo,pe.forEachRight=Ko,pe.forIn=function(n,t){return null==n?n:Ze(n,Ui(t,3),oa)},pe.forInRight=function(n,t){return null==n?n:Ke(n,Ui(t,3),oa)},pe.forOwn=function(n,t){return n&&Ve(n,Ui(t,3))},pe.forOwnRight=function(n,t){return n&&Ge(n,Ui(t,3))},pe.get=na,pe.gt=_f,pe.gte=gf,pe.has=function(n,t){return null!=n&&Ni(n,t,nu)},pe.hasIn=ta,pe.head=bo,pe.identity=Sa,pe.includes=function(n,t,r,e){n=wf(n)?n:va(n),r=r&&!e?Nf(r):0;var u=n.length;return r<0&&(r=Zr(u+r,0)),Uf(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&ur(n,t,r)>-1},pe.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Nf(r);return u<0&&(u=Zr(e+u,0)),ur(n,t,u)},pe.inRange=function(t,r,e){return r=Ff(r),e===n?(e=r,r=0):e=Ff(e),function(n,t,r){return n>=Kr(t,r)&&n<Zr(t,r)}(t=qf(t),r,e)},pe.invoke=ua,pe.isArguments=yf,pe.isArray=df,pe.isArrayBuffer=bf,pe.isArrayLike=wf,pe.isArrayLikeObject=mf,pe.isBoolean=function(n){return!0===n||!1===n||Ef(n)&&Qe(n)==M},pe.isBuffer=xf,pe.isDate=jf,pe.isElement=function(n){return Ef(n)&&1===n.nodeType&&!Lf(n)},pe.isEmpty=function(n){if(null==n)return!0;if(wf(n)&&(df(n)||"string"==typeof n||"function"==typeof n.splice||xf(n)||Tf(n)||yf(n)))return!n.length;var t=Fi(n);if(t==K||t==Q)return!n.size;if(Ji(n))return!cu(n).length;for(var r in n)if(ht.call(n,r))return!1;return!0},pe.isEqual=function(n,t){return iu(n,t)},pe.isEqualWith=function(t,r,e){var u=(e="function"==typeof e?e:n)?e(t,r):n;return u===n?iu(t,r,n,e):!!u},pe.isError=Af,pe.isFinite=function(n){return"number"==typeof n&&Nr(n)},pe.isFunction=kf,pe.isInteger=Of,pe.isLength=If,pe.isMap=zf,pe.isMatch=function(n,t){return n===t||ou(n,t,Ti(t))},pe.isMatchWith=function(t,r,e){return e="function"==typeof e?e:n,ou(t,r,Ti(r),e)},pe.isNaN=function(n){return Sf(n)&&n!=+n},pe.isNative=function(n){if(Hi(n))throw new nt(r);return fu(n)},pe.isNil=function(n){return null==n},pe.isNull=function(n){return null===n},pe.isNumber=Sf,pe.isObject=Rf,pe.isObjectLike=Ef,pe.isPlainObject=Lf,pe.isRegExp=Wf,pe.isSafeInteger=function(n){return Of(n)&&n>=-z&&n<=z},pe.isSet=Cf,pe.isString=Uf,pe.isSymbol=Bf,pe.isTypedArray=Tf,pe.isUndefined=function(t){return t===n},pe.isWeakMap=function(n){return Ef(n)&&Fi(n)==rn},pe.isWeakSet=function(n){return Ef(n)&&Qe(n)==en},pe.join=function(n,t){return null==n?"":Pr.call(n,t)},pe.kebabCase=da,pe.last=jo,pe.lastIndexOf=function(t,r,e){var u=null==t?0:t.length;if(!u)return-1;var i=u;return e!==n&&(i=(i=Nf(e))<0?Zr(u+i,0):Kr(i,u-1)),r==r?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(t,r,i):er(t,or,i,!0)},pe.lowerCase=ba,pe.lowerFirst=wa,pe.lt=$f,pe.lte=Df,pe.max=function(t){return t&&t.length?Ne(t,Sa,Xe):n},pe.maxBy=function(t,r){return t&&t.length?Ne(t,Ui(r,2),Xe):n},pe.mean=function(n){return fr(n,Sa)},pe.meanBy=function(n,t){return fr(n,Ui(t,2))},pe.min=function(t){return t&&t.length?Ne(t,Sa,su):n},pe.minBy=function(t,r){return t&&t.length?Ne(t,Ui(r,2),su):n},pe.stubArray=Pa,pe.stubFalse=qa,pe.stubObject=function(){return{}},pe.stubString=function(){return""},pe.stubTrue=function(){return!0},pe.multiply=Ja,pe.nth=function(t,r){return t&&t.length?gu(t,Nf(r)):n},pe.noConflict=function(){return zt._===this&&(zt._=kt),this},pe.noop=Ba,pe.now=Xo,pe.pad=function(n,t,r){n=Kf(n);var e=(t=Nf(t))?Ir(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return yi(Dr(u),r)+n+yi($r(u),r)},pe.padEnd=function(n,t,r){n=Kf(n);var e=(t=Nf(t))?Ir(n):0;return t&&e<t?n+yi(t-e,r):n},pe.padStart=function(n,t,r){n=Kf(n);var e=(t=Nf(t))?Ir(n):0;return t&&e<t?yi(t-e,r)+n:n},pe.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),Gr(Kf(n).replace(Ln,""),t||0)},pe.random=function(t,r,e){if(e&&"boolean"!=typeof e&&Ki(t,r,e)&&(r=e=n),e===n&&("boolean"==typeof r?(e=r,r=n):"boolean"==typeof t&&(e=t,t=n)),t===n&&r===n?(t=0,r=1):(t=Ff(t),r===n?(r=t,t=0):r=Ff(r)),t>r){var u=t;t=r,r=u}if(e||t%1||r%1){var i=Hr();return Kr(t+i*(r-t+Ot("1e-"+((i+"").length-1))),r)}return mu(t,r)},pe.reduce=function(n,t,r){var e=df(n)?Qt:lr,u=arguments.length<3;return e(n,Ui(t,4),r,u,De)},pe.reduceRight=function(n,t,r){var e=df(n)?Xt:lr,u=arguments.length<3;return e(n,Ui(t,4),r,u,Me)},pe.repeat=function(t,r,e){return r=(e?Ki(t,r,e):r===n)?1:Nf(r),xu(Kf(t),r)},pe.replace=function(){var n=arguments,t=Kf(n[0]);return n.length<3?t:t.replace(n[1],n[2])},pe.result=function(t,r,e){var u=-1,i=(r=Ku(r,t)).length;for(i||(i=1,t=n);++u<i;){var o=null==t?n:t[co(r[u])];o===n&&(u=i,o=e),t=kf(o)?o.call(t):o}return t},pe.round=Ya,pe.runInContext=Hn,pe.sample=function(n){return(df(n)?Ae:Au)(n)},pe.size=function(n){if(null==n)return 0;if(wf(n))return Uf(n)?Ir(n):n.length;var t=Fi(n);return t==K||t==Q?n.size:cu(n).length},pe.snakeCase=ma,pe.some=function(t,r,e){var u=df(t)?nr:Su;return e&&Ki(t,r,e)&&(r=n),u(t,Ui(r,3))},pe.sortedIndex=function(n,t){return Lu(n,t)},pe.sortedIndexBy=function(n,t,r){return Wu(n,t,Ui(r,2))},pe.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=Lu(n,t);if(e<r&&vf(n[e],t))return e}return-1},pe.sortedLastIndex=function(n,t){return Lu(n,t,!0)},pe.sortedLastIndexBy=function(n,t,r){return Wu(n,t,Ui(r,2),!0)},pe.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var r=Lu(n,t,!0)-1;if(vf(n[r],t))return r}return-1},pe.startCase=xa,pe.startsWith=function(n,t,r){return n=Kf(n),r=null==r?0:Ce(Nf(r),0,n.length),t=Bu(t),n.slice(r,r+t.length)==t},pe.subtract=Qa,pe.sum=function(n){return n&&n.length?sr(n,Sa):0},pe.sumBy=function(n,t){return n&&n.length?sr(n,Ui(t,2)):0},pe.template=function(t,r,e){var u=pe.templateSettings;e&&Ki(t,r,e)&&(r=n),t=Kf(t),r=Hf({},r,u,ki);var i,o,f=Hf({},r.imports,u.imports,ki),a=ia(f),c=vr(f,a),l=0,s=r.interpolate||Vn,h="__p += '",p=ut((r.escape||Vn).source+"|"+s.source+"|"+(s===kn?Dn:Vn).source+"|"+(r.evaluate||Vn).source+"|$","g"),v="//# sourceURL="+(ht.call(r,"sourceURL")?(r.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++xt+"]")+"\n";t.replace(p,function(n,r,e,u,f,a){return e||(e=u),h+=t.slice(l,a).replace(Gn,wr),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),f&&(o=!0,h+="';\n"+f+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=a+n.length,n}),h+="';\n";var _=ht.call(r,"variable")&&r.variable;_||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(gn,""):h).replace(yn,"$1").replace(dn,"$1;"),h="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Oa(function(){return tt(a,v+"return "+h).apply(n,c)});if(g.source=h,Af(g))throw g;return g},pe.times=function(n,t){if((n=Nf(n))<1||n>z)return[];var r=W,e=Kr(n,W);t=Ui(t),n-=W;for(var u=hr(e,t);++r<n;)t(r);return u},pe.toFinite=Ff,pe.toInteger=Nf,pe.toLength=Pf,pe.toLower=function(n){return Kf(n).toLowerCase()},pe.toNumber=qf,pe.toSafeInteger=function(n){return n?Ce(Nf(n),-z,z):0===n?n:0},pe.toString=Kf,pe.toUpper=function(n){return Kf(n).toUpperCase()},pe.trim=function(t,r,e){if((t=Kf(t))&&(e||r===n))return t.replace(Sn,"");if(!t||!(r=Bu(r)))return t;var u=Rr(t),i=Rr(r);return Gu(u,gr(u,i),yr(u,i)+1).join("")},pe.trimEnd=function(t,r,e){if((t=Kf(t))&&(e||r===n))return t.replace(Wn,"");if(!t||!(r=Bu(r)))return t;var u=Rr(t);return Gu(u,0,yr(u,Rr(r))+1).join("")},pe.trimStart=function(t,r,e){if((t=Kf(t))&&(e||r===n))return t.replace(Ln,"");if(!t||!(r=Bu(r)))return t;var u=Rr(t);return Gu(u,gr(u,Rr(r))).join("")},pe.truncate=function(t,r){var e=j,u=A;if(Rf(r)){var i="separator"in r?r.separator:i;e="length"in r?Nf(r.length):e,u="omission"in r?Bu(r.omission):u}var o=(t=Kf(t)).length;if(mr(t)){var f=Rr(t);o=f.length}if(e>=o)return t;var a=e-Ir(u);if(a<1)return u;var c=f?Gu(f,0,a).join(""):t.slice(0,a);if(i===n)return c+u;if(f&&(a+=c.length-a),Wf(i)){if(t.slice(a).search(i)){var l,s=c;for(i.global||(i=ut(i.source,Kf(Mn.exec(i))+"g")),i.lastIndex=0;l=i.exec(s);)var h=l.index;c=c.slice(0,h===n?a:h)}}else if(t.indexOf(Bu(i),a)!=a){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+u},pe.unescape=function(n){return(n=Kf(n))&&mn.test(n)?n.replace(bn,Er):n},pe.uniqueId=function(n){var t=++pt;return Kf(n)+t},pe.upperCase=ja,pe.upperFirst=Aa,pe.each=Zo,pe.eachRight=Ko,pe.first=bo,Ua(pe,(Ha={},Ve(pe,function(n,t){ht.call(pe.prototype,t)||(Ha[t]=n)}),Ha),{chain:!1}),pe.VERSION="4.17.15",qt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){pe[n].placeholder=pe}),qt(["drop","take"],function(t,r){ye.prototype[t]=function(e){e=e===n?1:Zr(Nf(e),0);var u=this.__filtered__&&!r?new ye(this):this.clone();return u.__filtered__?u.__takeCount__=Kr(e,u.__takeCount__):u.__views__.push({size:Kr(e,W),type:t+(u.__dir__<0?"Right":"")}),u},ye.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),qt(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==I||3==r;ye.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Ui(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),qt(["head","last"],function(n,t){var r="take"+(t?"Right":"");ye.prototype[n]=function(){return this[r](1).value()[0]}}),qt(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");ye.prototype[n]=function(){return this.__filtered__?new ye(this):this[r](1)}}),ye.prototype.compact=function(){return this.filter(Sa)},ye.prototype.find=function(n){return this.filter(n).head()},ye.prototype.findLast=function(n){return this.reverse().find(n)},ye.prototype.invokeMap=ju(function(n,t){return"function"==typeof n?new ye(this):this.map(function(r){return eu(r,n,t)})}),ye.prototype.reject=function(n){return this.filter(cf(Ui(n)))},ye.prototype.slice=function(t,r){t=Nf(t);var e=this;return e.__filtered__&&(t>0||r<0)?new ye(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),r!==n&&(e=(r=Nf(r))<0?e.dropRight(-r):e.take(r-t)),e)},ye.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},ye.prototype.toArray=function(){return this.take(W)},Ve(ye.prototype,function(t,r){var e=/^(?:filter|find|map|reject)|While$/.test(r),u=/^(?:head|last)$/.test(r),i=pe[u?"take"+("last"==r?"Right":""):r],o=u||/^find/.test(r);i&&(pe.prototype[r]=function(){var r=this.__wrapped__,f=u?[1]:arguments,a=r instanceof ye,c=f[0],l=a||df(r),s=function(n){var t=i.apply(pe,Yt([n],f));return u&&h?t[0]:t};l&&e&&"function"==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,_=a&&!p;if(!o&&l){r=_?r:new ye(this);var g=t.apply(r,f);return g.__actions__.push({func:Mo,args:[s],thisArg:n}),new ge(g,h)}return v&&_?t.apply(this,f):(g=this.thru(s),v?u?g.value()[0]:g.value():g)})}),qt(["pop","push","shift","sort","splice","unshift"],function(n){var t=ft[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);pe.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(df(u)?u:[],n)}return this[r](function(r){return t.apply(df(r)?r:[],n)})}}),Ve(ye.prototype,function(n,t){var r=pe[t];if(r){var e=r.name+"";ht.call(ue,e)||(ue[e]=[]),ue[e].push({name:t,func:r})}}),ue[pi(n,p).name]=[{name:"wrapper",func:n}],ye.prototype.clone=function(){var n=new ye(this.__wrapped__);return n.__actions__=ri(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=ri(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=ri(this.__views__),n},ye.prototype.reverse=function(){if(this.__filtered__){var n=new ye(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},ye.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=df(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Kr(t,n+o);break;case"takeRight":n=Zr(n,t-o)}}return{start:n,end:t}}(0,u,this.__views__),o=i.start,f=i.end,a=f-o,c=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Kr(a,this.__takeCount__);if(!r||!e&&u==a&&p==a)return Fu(n,this.__actions__);var v=[];n:for(;a--&&h<p;){for(var _=-1,g=n[c+=t];++_<s;){var y=l[_],d=y.iteratee,b=y.type,w=d(g);if(b==R)g=w;else if(!w){if(b==I)continue n;break n}}v[h++]=g}return v},pe.prototype.at=Fo,pe.prototype.chain=function(){return Do(this)},pe.prototype.commit=function(){return new ge(this.value(),this.__chain__)},pe.prototype.next=function(){this.__values__===n&&(this.__values__=Mf(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},pe.prototype.plant=function(t){for(var r,e=this;e instanceof _e;){var u=so(e);u.__index__=0,u.__values__=n,r?i.__wrapped__=u:r=u;var i=u;e=e.__wrapped__}return i.__wrapped__=t,r},pe.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof ye){var r=t;return this.__actions__.length&&(r=new ye(this)),(r=r.reverse()).__actions__.push({func:Mo,args:[Io],thisArg:n}),new ge(r,this.__chain__)}return this.thru(Io)},pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=function(){return Fu(this.__wrapped__,this.__actions__)},pe.prototype.first=pe.prototype.head,Lr&&(pe.prototype[Lr]=function(){return this}),pe}()}.apply();
                // 
                // 
                // init key vars
                // 
                // 
                    let socket = silverSpectacle.libraries.socket = io({
                        reconnection: true,
                        reconnectionDelay: 250,
                        reconnectionDelayMax : 5000,
                        reconnectionAttempts: Infinity,
                    })
                    window.socket = socket
                    silverSpectacle.cards = JSON.parse(`'''+cards.replace("\\","\\\\").replace("$","\\$").replace("`","\\`")+r'''`)
                    let streamContainer = document.getElementById("stream-container")
                
                //
                // 
                // main interface
                // 
                //
                    let colors = [
                        "#83ecc9",
                        "#89ddff",
                        "#82aaff",
                        "#c792ea",
                        "#e57eb3",
                        "#fec355",
                        "#f07178",
                        "#f78c6c",
                        "#c3e88d",
                    ]
                    silverSpectacle.colors = (index)=> colors[(index % colors.length + colors.length) % colors.length]
                    silverSpectacle.interface = {
                        //
                        // Quick Markdown
                        //
                        quickMarkdown: (args) => {
                            const createMarkdownCard = (text) => {
                                text = text.replace("\n\n", "\n&nbsp;\n").replace(/<br\/?>/, "&nbsp;").replace(/\\<br>/, "\\<br>").replace(/\\<br\/>/, "\\<br/>")
                                const markdownItself = Milkdown({ readonly: true, contentString: text, style: { width: "100%", height: "fit-content" } })
                                const card = silverSpectacle.createCard({
                                    children: [
                                        markdownItself
                                    ],
                                })
                                card.style.overflow = "hidden"
                                card.style.padding = 0
                                card.style.marginBottom = "1rem"
                                return card
                            }
                            let card = createMarkdownCard(args[0])
                            card.receive = (newString) => {
                                card.innerHTML = ""
                                card.appendChild(createMarkdownCard(newString))
                            }
                            return card
                        },
                        
                        
                        //
                        // Chart JS
                        //
                        chartjs: (args) => {
                            const config = args[0]
                            //
                            // if only given Y data then upgrade it (auto-generate x axis)
                            //
                            let labelExists = false
                            try { labelExists = config.data.labels instanceof Array } catch (error) {}
                            if (!labelExists) {
                                let dataIsSingleNumbers = false
                                try { dataIsSingleNumbers = !((config.data[0])-0 !== (config.data[0])-0) } catch (error) {}
                                let length = 0
                                if (dataIsSingleNumbers) {
                                    length = config.data.length
                                } else {
                                    try { dataIsSingleNumbers = dataIsSingleNumbers ||  !((config.data.datasets[0].data) !== (config.data.datasets[0].data)) } catch (error) {}
                                    if (dataIsSingleNumbers) {
                                        length = Math.max(...config.data.datasets.map(each=>each.data.length))
                                    }
                                }
                                // generate the labels / Y axis
                                if (dataIsSingleNumbers) {
                                    config.data.labels = [...Array(length)].map((each,index)=>index)
                                }
                            }
                            //
                            // actuall call / setup chart
                            //
                            const canvas = document.createElement("canvas")
                            let card = silverSpectacle.createCard({ children: [ canvas ], })
                            let chart
                            setTimeout(() => {
                                card.chartJsChart = chart = new Chart(canvas, config)
                                if (!(silverSpectacle._chartjsCharts instanceof Array)) {
                                    silverSpectacle._chartjsCharts = []
                                    setInterval(()=>{
                                        for (const each of silverSpectacle._chartjsCharts) {
                                            each.update()
                                        }
                                    }, 1000)
                                }
                                silverSpectacle._chartjsCharts.push(card.chartJsChart)
                            }, 0)
                            //
                            // updater callback
                            //
                            // TODO: finalize this receiver 
                            // card.receive = (data) => {
                            //     console.log("data:",data)
                            //     //
                            //     // if labels were automatic
                            //     //
                            //     let lastLabel
                            //     try {
                            //         lastLabel = chart.data.labels.slice(-1)[0]
                            //     } catch (error) {}
                            //     if (_.isNumber(data) && _.isNumber(lastLabel)) {
                            //         chart.data.datasets[0].data.push(data)
                            //         chart.data.labels.push(lastLabel+1)
                            //     //
                            //     // manual labels
                            //     //
                            //     } else {
                            //         console.log("_.isNumber(data[0])", _.isNumber(data[0]))
                            //         // basic pair data
                            //         if (_.isNumber(data[0])) {
                            //             let x = data[0]
                            //             let y = data[1]
                            //             console.log("x", x)
                            //             console.log("y", y)
                            //             
                            //             console.log("chart.data.datasets", chart.data.datasets)
                            //             chart.data.labels.push(y)
                            //             chart.data.datasets[0].data.push(x)
                            //         // basic x, y data
                            //         } else if (_.isNumber(data.x)) {
                            //             chart.data.labels.push(data.y);
                            //             chart.data.datasets[0].data.push(data.x)
                            //         // dataset data {labels, datasets: {dataSet1: [1,2,3]}}
                            //         } else {
                            //             let {labels, datasets} = data
                            //             labels.forEach(each=>chart.data.labels.push(each))
                            //             chart.data.datasets.forEach((existingDataset) => {
                            //                 let newData = datasets[existingDataset.label]
                            //                 if (newData instanceof Array) {
                            //                     newData.forEach(element=>existingDataset.data.push(element))
                            //                 }
                            //             })
                            //         }
                            //     }
                            //     chart.update()
                            // }
                            return card
                        },
                        
                        //
                        // Quick Scatter
                        //
                        quickScatter: (args) => {
                            let data = args[0]
                            if (!(data instanceof Array)) {
                                throw Exception(`quickLine needs an array [[x1,y1],[x2,y2] ...] but it got this instead:\n    ${JSON.stringify(data)}`)
                            }
                            // if single numbers instead of pairs
                            if (! _.isNaN(_.toNumber(data[0])) ) {
                                // make them pairs
                                data = data.map((each,index)=>([index,each]))
                            }
                            const config = {
                                type: "scatter",
                                data: {
                                datasets: [
                                        {
                                            label: "Quick Scatter",
                                            data: data.map(([x, y])=>({x,y})),
                                            backgroundColor: silverSpectacle.colors(6),
                                            borderColor: silverSpectacle.colors(6),
                                        },
                                    ],
                                },
                                options: {
                                    pointRadius: 5,
                                    pointHoverRadius: 8,
                                    scales: {
                                        x: {
                                            type: "linear",
                                            position: "bottom",
                                        },
                                    },
                                },
                            }
                            let card = silverSpectacle.createComponent("chartjs", config)
                            // sender callback
                            card.receive = (arg) => {
                                const dataset = card.chartJsChart.data.datasets[0]
                                if (arg == "clear") {
                                    card.chartJsChart.data.datasets[0].data = []
                                } else {
                                    if (arg instanceof Array && arg.length) {
                                        if (arg[0] == "replace_all" && arg.length > 1) {
                                            arg.shift()
                                            if (arg[0] instanceof Array) {
                                                dataset.data = arg.map(([x,y])=>({x,y}))
                                            }
                                        } else if (!(arg[0] instanceof Array)) {
                                            const [x,y] = arg
                                            dataset.data.push({x,y})
                                        } else {
                                            for (const [x,y] of arg) {
                                                dataset.data.push({x,y})
                                            }
                                        }
                                    }
                                }
                                
                            }
                            return card
                        },
                        
                        //
                        // Quick Line
                        //
                        quickLine: (args) => {
                            let data = args[0]
                            if (!(data instanceof Array)) {
                                throw Exception(`quickLine needs an array [[x1,y1],[x2,y2] ...] but it got this instead:\n    ${JSON.stringify(data)}`)
                            }
                            // if single numbers instead of pairs
                            if (! _.isNaN(_.toNumber(data[0])) ) {
                                // make them pairs
                                data = data.map((each,index)=>([index,each]))
                            }
                            
                            const config = {
                                type: "line",
                                data: {
                                    datasets: [
                                        {
                                            label: "Quick Line",
                                            data: data.map(([x, y])=>({x,y})),
                                            backgroundColor: silverSpectacle.colors(0),
                                            borderColor: silverSpectacle.colors(0),
                                            color: silverSpectacle.colors(0),
                                            cubicInterpolationMode: 'monotone',
                                            tension: 0.4,
                                        },
                                    ],
                                },
                                options: {
                                    pointRadius: 3,
                                    pointHoverRadius: 8,
                                    color: "whitesmoke",
                                    scales: {
                                        x: {
                                            type: "linear",
                                            position: "bottom",
                                        },
                                        y: {
                                            type: "linear",
                                            position: "left",
                                        },
                                    },
                                },
                            }
                            let card = silverSpectacle.createComponent("chartjs", config)
                            // sender callback
                            card.receive = (arg) => {
                                const dataset = card.chartJsChart.data.datasets[0]
                                if (arg == "clear") {
                                    card.chartJsChart.data.datasets[0].data = []
                                } else {
                                    if (arg instanceof Array && arg.length) {
                                        if (arg[0] == "replace_all" && arg.length > 1) {
                                            arg.shift()
                                            if (arg[0] instanceof Array) {
                                                dataset.data = arg.map(([x,y])=>({x,y}))
                                            }
                                        } else if (!(arg[0] instanceof Array)) {
                                            const [x,y] = arg
                                            dataset.data.push({x,y})
                                        } else {
                                            for (const [x,y] of arg) {
                                                dataset.data.push({x,y})
                                            }
                                        }
                                    }
                                }
                                
                            }
                            return card
                        },
                        
                        //
                        // Multi Line
                        //
                        multiLine: (args) => {
                            let data = args[0]
                            if (!(data instanceof Object)) {
                                throw Exception(`multLine needs a dict { "name": [[x1,y1],[x2,y2] ...], ... }  but it got this instead:\n    ${JSON.stringify(data)}`)
                            }
                            
                            // if single numbers instead of pairs
                            const nameToIndex = {}
                            let index = 0
                            for (const [key, value] of Object.entries(data)) {
                                nameToIndex[key] = index++
                                if (! _.isNaN(_.toNumber(value[0])) ) {
                                    // make them pairs
                                    data[key] = value.map((each,index)=>([index,each]))
                                }
                            }
                            
                            const config = {
                                type: "line",
                                data: {
                                    datasets: Object.entries(data).map(([key, value], index)=> ({
                                        label: key,
                                        data: value.map(([x, y])=>({x,y})),
                                        backgroundColor: silverSpectacle.colors(index),
                                        borderColor: silverSpectacle.colors(index),
                                        color: silverSpectacle.colors(index),
                                        cubicInterpolationMode: 'monotone',
                                        tension: 0.4,
                                    })),
                                },
                                options: {
                                    pointRadius: 3,
                                    pointHoverRadius: 8,
                                    color: "whitesmoke",
                                    scales: {
                                        x: {
                                            type: "linear",
                                            position: "bottom",
                                        },
                                        y: {
                                            type: "linear",
                                            position: "left",
                                        },
                                    },
                                },
                            }
                            let card = silverSpectacle.createComponent("chartjs", config)
                            // sender callback
                            card.receive = (data) => {
                                for (const [key, value] of Object.entries(data)) {
                                    const index = nameToIndex[key]
                                    if (!(value[0] instanceof Array)) {
                                        card.chartJsChart.data.datasets[index].data.push({x: value[0], y: value[1]})
                                    } else {
                                        for (const [x,y] of value) {
                                            card.chartJsChart.data.datasets[index].data.push({x,y})
                                        }
                                    }
                                }
                                
                            }
                            return card
                        },
                        
                        //
                        // Quick Image
                        //
                        quickImage: (args) => {
                            const card = silverSpectacle.createCard({children:[]})
                            const saveImageButton = document.createElement("a")
                            
                            //
                            // canvas sizing
                            //
                            // const canvas = document.createElement("canvas")
                            // canvas.style.maxWidth = "100%"
                            // canvas.style.maxHeight = "40rem"
                            // canvas.style.transition = "all 0.25s ease-out 0s"
                            // canvas.style.transform = "scale(1.001)" // fixes a pixel glitch
                            // canvas.style.width = "unset"
                            // canvas.style.padding = "0"
                            // canvas.classList.add("card")
                            // card.style.background = "transparent"
                            // card.style.boxShadow = "unset"
                            
                            //
                            // add image data
                            //
                            const putImageIntoCanvas = (rgbImage) => {
                                const width = rgbImage[0].length
                                const height = rgbImage.length
                                canvas.height = height
                                canvas.width = width
                                if (canvas.height > canvas.width) {
                                    canvas.style.height = canvas.style.maxHeight
                                } else {
                                    canvas.style.width = canvas.style.maxWidth
                                }
                                const listOfPixels = rgbImage.flat()
                                let rgba
                                if (listOfPixels[0].length != 4) {
                                    rgba = listOfPixels.map(each=>each.concat([255]))
                                } else {
                                    rgba = listOfPixels
                                }
                                const flattenedRgba = rgba.flat()
                                const dataArray = new Uint8ClampedArray(flattenedRgba)
                                let imageData
                                try {
                                    imageData = new ImageData(dataArray, width, height)
                                } catch (error) {
                                    imageData = canvas.getContext("2d").getImageData(0, 0, width, height)
                                    imageData.data = dataArray
                                }
                                try {
                                    canvas.getContext("2d").putImageData(imageData, 0, 0)
                                } catch (error) {
                                }
                                // update the save button link
                                saveImageButton.setAttribute("href", canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"))
                            }
                            // putImageIntoCanvas(args[0]) // dimensions: width, height, rgb
                            const imageElement = document.createElement("img")
                            imageElement.style.position = "absolute"
                            imageElement.style.top = "0px"
                            imageElement.style.left = "0px"
                            imageElement.style.width = "100%"
                            imageElement.style.boxSizing = "content-box"
                            imageElement.style.imageRendering = "crisp-edges"
                            card.appendChild(imageElement)
                            
                            // expand the card after the fact (better for performance when img changing rapidly)
                            setInterval(()=>{
                                if (imageElement.clientHeight) {
                                    card.style.minHeight = `${imageElement.clientHeight}px`
                                }
                            }, 200)
                            
                            const putImageIntoCard = (imageExtension)=> {
                                imageElement.src = "/large/get/"+imageExtension
                            }
                            
                            //
                            // dynamic update
                            //
                            card.receive = (imageExtension) => {
                                putImageIntoCard(imageExtension)
                            }
                            
                            putImageIntoCard(args[0])
                            return card
                        },
                    }
                
                //
                // 
                // event hooks
                // 
                //
                    // right after page loads
                    setTimeout(()=>{
                            refreshUi()
                            post({ to: window.location.origin+"/web_received_data" }).catch(errorObject=>null)
                        }, 250)
                    
                    // when there is new (valid) data
                    socket.on("new_card", async (message)=>{
                            let newData = null
                            try {
                                newData = JSON.parse(message)
                            } catch (error) {
                                console.debug(`error is:`,error)
                                console.debug(`message is:`,message)
                            }
                            if (newData) {
                                silverSpectacle.cards = {...silverSpectacle.cards, ...newData}
                                refreshUi()
                            }
                            post({ to: window.location.origin+"/web_received_data" })
                        })
                    
                    // when python wants to trigger an event
                    socket.on("card_trigger", async (input)=>{
                            input = JSON.parse(input)
                            const card = silverSpectacle.cards[input.cardId]
                            if (card) {
                                const cardElement = card.element
                                if (input.action == "send") {
                                    try {
                                        cardElement.receive(input.data)
                                    } catch (error) {
                                        silverSpectacle.log(`When data was being sent to card<br>id: ${input.cardId}<br>there was an error.<br>The data was: ${JSON.stringify(input).slice(0,1000)}`)
                                        console.debug(error)
                                    }
                                }
                            }
                            // TODO: add more error handling/logging
                            post({ to: window.location.origin+"/web_received_data" }).catch(errorObject=>null)
                        })
                        
                    // when server says "i'm stopping"
                    socket.on("stop:response", async (message)=>{
                            silverSpectacle.log("server was stopped")
                        })

                // 
                // 
                // core functions
                //
                // 
                    silverSpectacle._deletedCards = new Set()
                    function refreshUi(){
                            let elements = []
                            // create elements if needed
                            for (const [key, value] of Object.entries(silverSpectacle.cards)) {
                                // skip deleted key
                                if (silverSpectacle._deletedCards.has(key)) {
                                    continue
                                }
                                // if no element then create it
                                if (!value.element) {
                                    value.element = silverSpectacle.createComponent(value.interface, ...value.arguments)
                                }
                                value.element.id = key
                                
                                // add a removal button
                                const xOutButton = document.createElement("button")
                                xOutButton.classList.add("x-out-button")
                                xOutButton.addEventListener("click", ()=>{
                                    // add to deleted list
                                    silverSpectacle._deletedCards.add(key)
                                    // stop showing the current element right away
                                    if (xOutButton.parentElement) {
                                        xOutButton.parentElement.style.display = "none"
                                    }
                                })
                                xOutButton.innerText = "x"
                                value.element.appendChild(xOutButton)
                                
                                elements.push(value.element)
                            }
                            refreshStreamContainer(elements)
                        }
                    
                    function refreshStreamContainer(listOfElements) {
                            // delete old container
                            streamContainer.parentElement.removeChild(streamContainer)
                            streamContainer = document.createElement("div")
                            streamContainer.id = "stream-container"
                            for (const each of listOfElements) {
                                streamContainer.appendChild(each)
                            }
                            document.body.appendChild(streamContainer)
                        }
                    
                    silverSpectacle.createComponent = function(theInterface, ...args) {
                            const creationInterface = silverSpectacle.interface[theInterface]
                            if (creationInterface instanceof Function) {
                                try {
                                    return creationInterface(args)
                                } catch (error) {
                                    const element = silverSpectacle.createCard({})
                                    element.style.backgroundColor = "coral"
                                    element.style.color = "white"
                                    element.innerHTML = `There was an issue with the card:<span>${error}</span>`
                                    return element
                                }
                            } else {
                                silverSpectacle.log(`[ERROR] python tried to create a {JSON.stringify(theInterface)} interface\nHowever that isn't one of the available interfaces\nThe current list is ${JSON.stringify(Object.keys(silverSpectacle.interface))}\nThe arguments for that card were: ${JSON.stringify(args)}`)
                            }
                        }

                    silverSpectacle.createCard = function({ children, style, ...data }) {
                            style = {...style}
                            children = children||[]
                            let div = document.createElement("div")
                            div.classList.add("card")
                            if (typeof data.class == 'string') {
                                let classes = data.class.split(" ")
                                for (let each of classes) {
                                    div.classList.add(each)
                                }
                            }
                            for (const each of children) {
                                div.appendChild(each)
                            }
                            Object.assign(div.style, style)
                            
                            const xOutButton = document.createElement("button")
                            return div
                        }
                
                    function createstopButton() {
                            let button = document.createElement("button")
                            button.innerHTML = "Stop Server"
                            button.addEventListener("click", async ()=>{
                                try {
                                    await post({ to: window.location.origin+"/stop" })
                                } catch (error) {}
                            })
                            button.classList.add("stop-button")
                            return button
                        }
                //
            })())
        </script>
        <script>
            '''+args.custom_js+r'''
        </script>
        </html>
    '''
    last_time_data_was_viewed = now()
    return web.Response(text=output, content_type='text/html')

@routes.post('/ping')
async def ping(request : web.Request):
    return web.Response(text='"pong"')

@routes.post('/stop')
async def stop(request : web.Request):
    await sio.emit('stop:response', '"imded"')
    exit()
    return web.Response(text='"imded"')

@routes.post('/was_data_seen')
async def was_data_seen(request : web.Request):
    # if data was viewed more recently than it was updated
    if last_time_data_was_viewed >= last_time_data_was_updated:
        return web.Response(text="true")
    else:
        return web.Response(text="false")

@routes.post('/web_received_data')
async def web_received_data(request : web.Request):
    global last_time_data_was_viewed
    last_time_data_was_viewed = now()
    return web.Response(text="true")

@routes.post('/new_card')
async def new_card(request : web.Request):
    global cards
    global last_time_data_was_updated
    try:
        cards = await request.text()
    except Exception as error:
        print('error = ', error)
    print('backend: awaited request.text')
    last_time_data_was_updated = now()
    print('backend: emitting new_card')
    await sio.emit('new_card', cards)
    print('backend: emitted new_card')
    return web.Response(text="null")

@routes.post('/card_trigger')
async def card_trigger(request : web.Request):
    global cards
    global last_time_data_was_updated
    data = await request.text()
    last_time_data_was_updated = now()
    await sio.emit('card_trigger', data)
    return web.Response(text="null")

@routes.post('/large/set/{content_type}/{data_id}')
async def set_large_data(request : web.Request):
    global large_data
    content_type = request.match_info["content_type"]
    content_type = content_type.replace(r"%2F", "/")
    large_data_id = request.match_info["data_id"]
    # save in ram
    post_result = await request.post()
    large_file = post_result.get("file")
    if large_file is not None:
        large_data[large_data_id] = large_file.file.read()
    return web.Response(text="null")

@routes.get('/large/get/{content_type}/{data_id}')
async def get_large_data(request : web.Request):
    global large_data
    content_type = request.match_info["content_type"]
    content_type = content_type.replace(r"%2F", "/")
    large_data_id = request.match_info["data_id"]
    return web.Response(
        content_type=content_type,
        body=large_data[large_data_id],
    )

# 
# start server
# 
app.add_routes(routes); web.run_app(app, port=args.port) 