diff --git a/package.json b/package.json index 4d01e11..70fedad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lexicanter", "productName": "Lexicanter", - "version": "2.1.14", + "version": "2.1.15", "description": "A lexicon management tool for constructed languages.", "main": "src/index.js", "scripts": { diff --git a/src/app/layouts/Changelog.svelte b/src/app/layouts/Changelog.svelte index bcf4b73..5dcea59 100644 --- a/src/app/layouts/Changelog.svelte +++ b/src/app/layouts/Changelog.svelte @@ -25,13 +25,20 @@


+

Patch 2.1.15

+

+ • Fixed a reported bug which caused the search fields in the lexicon and phrasebook to find no matches in certain cases.
+ • Changed the way that the app recognizes when changes have been made to the version of your file in the database.
+ • A few quality of life features related to the previous change, including the ability to see the local and online file version numbers in Settings.
+

+

Patch 2.1.14

• Fixed a bug with the orthography pattern replacement features which caused it to only replace the first instance of a pattern in each word.
• Added the ability to use ^ or # as word-end characters in the orthography pattern replacement fields.
• Fixed a reported bug with the Illegals field of the Advanced Phonotactics word generator which caused that field not to save its contents.
- • Fixed a bug with database syncing which caused the setting to not save for files. - • Files should now automatically detect when you have changes in the database on loading, and will prompt you to download the changes. + • Fixed a bug with database syncing which caused the setting to not save for files.
+ • Files should now automatically detect when you have changes in the database on loading, and will prompt you to download the changes.


Patch 2.1.13

diff --git a/src/app/layouts/File.svelte b/src/app/layouts/File.svelte index d41bae0..2bf4588 100644 --- a/src/app/layouts/File.svelte +++ b/src/app/layouts/File.svelte @@ -87,6 +87,9 @@ if (contents.hasOwnProperty('SaveLocation')) { $Language.SaveLocation = contents.SaveLocation; } + if (contents.hasOwnProperty('FileVersion')) { + $Language.FileVersion = contents.FileVersion + } errorMessage = 'There was a problem loading the alphabet from the file.' $Language.Alphabet = contents.Alphabet; @@ -155,9 +158,21 @@ if (verifyHash($dbid, $dbkey)) { const queryResult = await retrieveFromDatabase(contents.Name); if (queryResult !== false) { - if (JSON.stringify($Language.Lexicon) !== JSON.stringify(queryResult.Lexicon)) { + if (queryResult.FileVersion === undefined) { + vex.dialog.confirm({ + message: `The file in the database has no FileVersion number. Would you like to overwrite it with your local version?`, + yesText: 'Upload Local Version', + callback: (proceed) => { + if (proceed) { + saveFile(); + vex.dialog.alert('Saved and uploaded local file.') + } + } + }) + } else if ( parseInt($Language.FileVersion, 36) < parseInt(queryResult.FileVersion, 36) ) { vex.dialog.confirm({ - message: 'Detected changes to the file in the database. Would you like to download them?', + message: `Detected a newer version of the file in the database (local: ${$Language.FileVersion} | online: ${queryResult.FileVersion}). Would you like to download the changes?`, + yesText: 'Download Changes', callback: (proceed, download = queryResult) => { if (proceed) { $Language = download; diff --git a/src/app/layouts/Lexicon.svelte b/src/app/layouts/Lexicon.svelte index 538565f..1f40f6f 100644 --- a/src/app/layouts/Lexicon.svelte +++ b/src/app/layouts/Lexicon.svelte @@ -191,77 +191,75 @@ * or end of a word. Searches are combinative, and only * results which match all search input fields will be * selected as matches. - * @returns {any} */ function search_lex(): void { let words_search = $Language.CaseSensitive? searchWords.trim() : searchWords.toLowerCase().trim(); let definitions_search = searchDefinitions.toLowerCase().trim(); - let tags_search = searchTags.toLowerCase().trim()? searchTags.toLowerCase().trim().split(/\s+/g) : []; + let tags_search = searchTags.toLowerCase().trim(); keys = []; - if (!!words_search || !!definitions_search || !!tags_search[0] || !!lectFilter) { - // Turn l into a list of [search by word terms, search by def terms - let l = [[...words_search.split('|')], [...definitions_search.split('|')]]; + if (!!words_search || !!definitions_search || !!tags_search || !!lectFilter) { // if there is at least one search term for (let word in $Language.Lexicon) { - const w = '^' + word.replaceAll(/\s+/g, '^') + '^'; - let match = lectFilter? $Language.Lexicon[word].Senses.some(sense => sense.lects.includes(lectFilter)) : true; - if (!match) continue; - for (let a of l[0]) { - // words - if (!w.includes(a)) { + let entry = $Language.Lexicon[word]; + let match = true; + + // check lect filter + if ( !!lectFilter ) { + if ( !entry.Senses.some(sense => sense.lects.includes(lectFilter)) ) { match = false; + continue; } } - for (let a of l[1]) { - // definitions - let needs_exact_match = a[0] === '!'; - if (needs_exact_match) { - let pattern = `\\b${a.split('!')[1]}\\b`; - $Language.Lexicon[word].Senses.forEach(sense => { - if (!sense.definition.toLowerCase().match(pattern)) { - // no exact word match - match = false; - } - }); - } else if (!$Language.Lexicon[word].Senses.some(sense => sense.definition.toLowerCase().includes(a))) { - // no partial match + + // check word + if ( !!words_search ) { + if ( words_search[0] === '!') { // requires exact match + if (word !== words_search.split('!')[1]) { + match = false; + continue; + } + } else if ( !('^' + word.replaceAll(/\s+/g, '^') + '^').includes(words_search.replaceAll(/\s+/g, '^')) ) { + // searches for inexact match match = false; + continue; } } - if (!!$Language.Lexicon[word].Senses.some(sense => !!sense.tags[0])) { - // has at least one tag - let partial_tag_match = false; - let needs_exact_match = false; - let has_exact_match = false; - for (let tag of $Language.Lexicon[word].Senses.map(sense => sense.tags).flat()) { - for (let a of tags_search) { - // debug.log('`a` | `tag` : ' + a + ' | ' + tag, false) - // tags - if (a[0] === '!') { - needs_exact_match = true; - if (`!${tag}` === a) { - has_exact_match = true; - partial_tag_match = true; - } - } - if (`^${tag}^`.includes(a)) { - partial_tag_match = true; - } + + // check definitions + if ( !!definitions_search ) { + if ( definitions_search[0] === '!' ) { // requires exact match + if (!entry.Senses.some(sense => sense.definition === definitions_search.split('!')[1])) { + match = false; + continue; } - } - if (!!tags_search[0] && ((!partial_tag_match) || (needs_exact_match && !has_exact_match))) { + } else if (!entry.Senses.some(sense => sense.definition.replaceAll(/\s+/g, '^').toLowerCase().includes(definitions_search.replaceAll(/\s+/g, '^')))) { + // searches for inexact match match = false; + continue; } - } else { - // has no tags - if (!!tags_search[0]) { - match = false; // at least one tag as search term + } + + // check tags + if ( !!tags_search ) { + let tag_search_array = tags_search.split(/\s+/); + for (let tag_search of tag_search_array) { + if (tag_search[0] === '!') { // requires exact match (per tag basis) + if (!entry.Senses.some(sense => sense.tags.some(tag => tag.toLowerCase() === tag_search.split('!')[1]))) { + match = false; + continue; + } + } else if ( !entry.Senses.some(sense => sense.tags.some(tag => `^${tag.toLowerCase()}^`.includes(tag_search))) ) { + // searches for inexact match (per tag basis) + match = false; + continue; + } } } - if (match) { + + if ( match ) { keys = [...keys, word]; } } - if (!keys.length) keys = [null]; // Search was attempted, no results + if (!keys.length) {keys = [null]}; // Search was attempted, no results } } diff --git a/src/app/layouts/Phrasebook.svelte b/src/app/layouts/Phrasebook.svelte index 99c7280..ea399f6 100644 --- a/src/app/layouts/Phrasebook.svelte +++ b/src/app/layouts/Phrasebook.svelte @@ -42,16 +42,15 @@ let tagMatch = !tagsSearch const filterLect = lectFilter? !lectFilter : scope[entry].lects.includes(lectFilter); - if (term.includes(phrase_search)) + if (term.toLowerCase().includes(phrase_search.toLowerCase())) phraseMatch = true; - if (scope[entry].description.toLowerCase().includes(descript_search)) + if (scope[entry].description.toLowerCase().includes(descript_search.toLowerCase())) descriptMatch = true; if (!!tagsSearch) { - if (scope[entry].tags.some(tag => tagsSearch.includes(tag))) + if (scope[entry].tags.some(tag => tagsSearch.includes(tag.toLowerCase()))) tagMatch = true; } - for (let variant in scope[entry].variants) { let v_term = '^' + variant + '^'; if (v_term.includes(phrase_search)) diff --git a/src/app/layouts/Settings.svelte b/src/app/layouts/Settings.svelte index 7f0fc0f..d2ac316 100644 --- a/src/app/layouts/Settings.svelte +++ b/src/app/layouts/Settings.svelte @@ -1,5 +1,5 @@ \";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n // Do not reenter flush while dirty components are updated, as this can\n // result in an infinite loop. Instead, let the inner flush handle it.\n // Reentrancy is ok afterwards for bindings etc.\n if (flushidx !== 0) {\n return;\n }\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n try {\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n }\n catch (e) {\n // reset dirty state to not end up in a deadlocked state and then rethrow\n dirty_components.length = 0;\n flushidx = 0;\n throw e;\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n const options = { direction: 'in' };\n let config = fn(node, params, options);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config(options);\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n const options = { direction: 'out' };\n let config = fn(node, params, options);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n const options = { direction: 'both' };\n let config = fn(node, params, options);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${escape_attribute_value(style_object[key])};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.55.1' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(` is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","/*! For license information please see editor.js.LICENSE.txt */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.EditorJS=t():e.EditorJS=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=187)}([function(e,t,n){var o=n(10),r=n(16),i=n(27),a=n(23),s=n(31),l=function(e,t,n){var c,u,f,d,p=e&l.F,h=e&l.G,v=e&l.S,g=e&l.P,y=e&l.B,k=h?o:v?o[t]||(o[t]={}):(o[t]||{}).prototype,b=h?r:r[t]||(r[t]={}),m=b.prototype||(b.prototype={});for(c in h&&(n=t),n)f=((u=!p&&k&&void 0!==k[c])?k:n)[c],d=y&&u?s(f,o):g&&\"function\"==typeof f?s(Function.call,f):f,k&&a(k,c,f,e&l.U),b[c]!=f&&i(b,c,d),g&&m[c]!=f&&(m[c]=f)};o.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:\"log\",o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:\"color: inherit\";if(\"console\"in window&&window.console[n]){var i=[\"info\",\"log\",\"warn\",\"error\"].includes(n),a=[];switch(c.logLevel){case s.ERROR:if(\"error\"!==n)return;break;case s.WARN:if(![\"error\",\"warn\"].includes(n))return;break;case s.INFO:if(!i||e)return}o&&a.push(o);var l=\"Editor.js \".concat(\"2.26.5\"),u=\"line-height: 1em;\\n color: #006FEA;\\n display: inline-block;\\n font-size: 11px;\\n line-height: 1em;\\n background-color: #fff;\\n padding: 4px 9px;\\n border-radius: 30px;\\n border: 1px solid rgba(56, 138, 229, 0.16);\\n margin: 4px 5px 4px 0;\";e&&(i?(a.unshift(u,r),t=\"%c\".concat(l,\"%c \").concat(t)):t=\"( \".concat(l,\" )\").concat(t));try{if(i)if(o){var f;(f=console)[n].apply(f,[\"\".concat(t,\" %o\")].concat(a))}else{var d;(d=console)[n].apply(d,[t].concat(a))}else console[n](t)}catch(e){}}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.LogLevels=void 0,e.array=function(e){return Array.prototype.slice.call(e)},e.beautifyShortcut=function(e){var t=y();return e=e.replace(/shift/gi,\"⇧\").replace(/backspace/gi,\"⌫\").replace(/enter/gi,\"⏎\").replace(/up/gi,\"↑\").replace(/left/gi,\"→\").replace(/down/gi,\"↓\").replace(/right/gi,\"←\").replace(/escape/gi,\"⎋\").replace(/insert/gi,\"Ins\").replace(/delete/gi,\"␡\").replace(/\\+/gi,\" + \"),e=t.mac?e.replace(/ctrl|cmd/gi,\"⌘\").replace(/alt/gi,\"⌥\"):e.replace(/cmd/gi,\"Ctrl\").replace(/windows/gi,\"WIN\")},e.cacheable=function(e,t,n){var o=n.value?\"value\":\"get\",r=n[o],i=\"#\".concat(t,\"Cache\");if(n[o]=function(){if(void 0===this[i]){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:\"\";return\"\".concat(e).concat(Math.floor(1e8*Math.random()).toString(16))},e.getFileExtension=function(e){return e.name.split(\".\").pop()},e.getUserOS=y,e.getValidUrl=function(e){try{return new URL(e).href}catch(e){}return\"//\"===e.substring(0,2)?window.location.protocol+e:window.location.origin+e},e.isBoolean=function(e){return\"boolean\"===d(e)},e.isClass=function(e){return p(e)&&/^\\s*class\\s+/.test(e.toString())},e.isEmpty=function(e){return!e||0===Object.keys(e).length&&e.constructor===Object},e.isFunction=p,e.isIosDevice=void 0,e.isMobileScreen=function(){return window.matchMedia(\"(max-width: \".concat(650,\"px)\")).matches},e.isNumber=function(e){return\"number\"===d(e)},e.isObject=h,e.isPrintableKey=function(e){return e>47&&e<58||32===e||13===e||229===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223},e.isPromise=function(e){return Promise.resolve(e)===e},e.isString=function(e){return\"string\"===d(e)},e.isTouchSupported=void 0,e.isUndefined=v,e.isValidMimeType=function(e){return/^[-\\w]+\\/([-+\\w]+|\\*)$/.test(e)},e.mouseButtons=e.mobileScreenBreakpoint=e.logLabeled=e.log=e.keyCodes=void 0,e.openTab=function(e){window.open(e,\"_blank\")},e.sequence=function(e){return g.apply(this,arguments)},e.setLogLevel=function(e){c.logLevel=e},e.throttle=function(e,t){var n,o,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=null,s=0;i||(i={});var l=function(){s=!1===i.leading?0:Date.now(),a=null,r=e.apply(n,o),a||(n=o=null)};return function(){var c=Date.now();s||!1!==i.leading||(s=c);var u=t-(c-s);return n=this,o=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,r=e.apply(n,o),a||(n=o=null)):a||!1===i.trailing||(a=setTimeout(l,u)),r}},e.typeOf=d,t=l(t),o=l(o),r=l(r),a=l(a),e.LogLevels=s,function(e){e.VERBOSE=\"VERBOSE\",e.INFO=\"INFO\",e.WARN=\"WARN\",e.ERROR=\"ERROR\"}(s||(e.LogLevels=s={})),e.keyCodes={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},e.mouseButtons={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4},c.logLevel=s.VERBOSE;var u=c.bind(window,!1);e.log=u;var f=c.bind(window,!0);function d(e){return Object.prototype.toString.call(e).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()}function p(e){return\"function\"===d(e)||\"asyncfunction\"===d(e)}function h(e){return\"object\"===d(e)}function v(e){return\"undefined\"===d(e)}function g(){return(g=(0,r.default)(t.default.mark((function e(n){var o,i,a,s,l=arguments;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=function(){return(s=(0,r.default)(t.default.mark((function e(n,o,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.function(n.data);case 3:return e.next=5,o(v(n.data)?{}:n.data);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),r(v(n.data)?{}:n.data);case 10:case\"end\":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)},a=function(e,t,n){return s.apply(this,arguments)},o=l.length>1&&void 0!==l[1]?l[1]:function(){},i=l.length>2&&void 0!==l[2]?l[2]:function(){},e.abrupt(\"return\",n.reduce(function(){var e=(0,r.default)(t.default.mark((function e(n,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n;case 2:return e.abrupt(\"return\",a(r,o,i));case 3:case\"end\":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve()));case 5:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function y(){var e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find((function(e){return-1!==window.navigator.appVersion.toLowerCase().indexOf(e)}));return t?(e[t]=!0,e):e}e.logLabeled=f;var k=\"ontouchstart\"in document.documentElement;e.isTouchSupported=k,e.mobileScreenBreakpoint=650;var b=\"undefined\"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||\"MacIntel\"===window.navigator.platform&&window.navigator.maxTouchPoints>1);e.isIosDevice=b})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(112)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);function l(e,t){var n=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(\"string\"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&\"number\"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3&&void 0!==arguments[3]&&arguments[3];n.mutableListenerIds.push(n.listeners.on(e,t,o,r))},clearAll:function(){var e,t=l(n.mutableListenerIds);try{for(t.s();!(e=t.n()).done;){var o=e.value;n.listeners.offById(o)}}catch(e){t.e(e)}finally{t.f()}n.mutableListenerIds=[]}},this.mutableListenerIds=[],(this instanceof e?this.constructor:void 0)===e)throw new TypeError(\"Constructors for abstract class Module are not allowed.\");this.config=o,this.eventsDispatcher=i}return(0,i.default)(e,[{key:\"state\",set:function(e){this.Editor=e}},{key:\"removeAllNodes\",value:function(){for(var e in this.nodes){var t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}},{key:\"isRtl\",get:function(){return\"rtl\"===this.config.i18n.direction}}]),e}();o.default=u,u.displayName=\"Module\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n=e.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(13);e.exports=function(e){if(!o(e))throw TypeError(e+\" is not an object!\");return e}},function(e,t){e.exports=function(e){return\"object\"==typeof e?null!==e:\"function\"==typeof e}},function(e,t,n){var o=n(70)(\"wks\"),r=n(45),i=n(10).Symbol,a=\"function\"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)(\"Symbol.\"+e))}).store=o},function(e,t,n){var o=n(33),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t){var n=e.exports={version:\"2.6.12\"};\"number\"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(12),r=n(117),i=n(42),a=Object.defineProperty;t.f=n(17)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported!\");return\"value\"in n&&(e[t]=n.value),e}},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(41),n(2),n(3),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l){\"use strict\";var c=n(1);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)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:\"isSingleTag\",value:function(e){return e.tagName&&[\"AREA\",\"BASE\",\"BR\",\"COL\",\"COMMAND\",\"EMBED\",\"HR\",\"IMG\",\"INPUT\",\"KEYGEN\",\"LINK\",\"META\",\"PARAM\",\"SOURCE\",\"TRACK\",\"WBR\"].includes(e.tagName)}},{key:\"isLineBreakTag\",value:function(e){return e&&e.tagName&&[\"BR\",\"WBR\"].includes(e.tagName)}},{key:\"make\",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,(0,r.default)(n)):n&&i.classList.add(n),o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a]);return i}},{key:\"text\",value:function(e){return document.createTextNode(e)}},{key:\"append\",value:function(e,t){Array.isArray(t)?t.forEach((function(t){return e.appendChild(t)})):e.appendChild(t)}},{key:\"prepend\",value:function(e,t){Array.isArray(t)?(t=t.reverse()).forEach((function(t){return e.prepend(t)})):e.prepend(t)}},{key:\"swap\",value:function(e,t){var n=document.createElement(\"div\"),o=e.parentNode;o.insertBefore(n,e),o.insertBefore(e,t),o.insertBefore(t,n),o.removeChild(n)}},{key:\"find\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelector(t)}},{key:\"get\",value:function(e){return document.getElementById(e)}},{key:\"findAll\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelectorAll(t)}},{key:\"allInputsSelector\",get:function(){return\"[contenteditable=true], textarea, input:not([type]), \"+[\"text\",\"password\",\"email\",\"number\",\"search\",\"tel\",\"url\"].map((function(e){return'input[type=\"'.concat(e,'\"]')})).join(\", \")}},{key:\"findAllInputs\",value:function(t){return l.array(t.querySelectorAll(e.allInputsSelector)).reduce((function(t,n){return e.isNativeInput(n)||e.containsOnlyInlineElements(n)?[].concat((0,r.default)(t),[n]):[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:\"getDeepestNode\",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?\"lastChild\":\"firstChild\",r=n?\"previousSibling\":\"nextSibling\";if(t&&t.nodeType===Node.ELEMENT_NODE&&t[o]){var i=t[o];if(e.isSingleTag(i)&&!e.isNativeInput(i)&&!e.isLineBreakTag(i))if(i[r])i=i[r];else{if(!i.parentNode[r])return i.parentNode;i=i.parentNode[r]}return this.getDeepestNode(i,n)}return t}},{key:\"isElement\",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}},{key:\"isFragment\",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:\"isContentEditable\",value:function(e){return\"true\"===e.contentEditable}},{key:\"isNativeInput\",value:function(e){return!(!e||!e.tagName)&&[\"INPUT\",\"TEXTAREA\"].includes(e.tagName)}},{key:\"canSetCaret\",value:function(t){var n=!0;if(e.isNativeInput(t))switch(t.type){case\"file\":case\"checkbox\":case\"radio\":case\"hidden\":case\"submit\":case\"button\":case\"image\":case\"reset\":n=!1}else n=e.isContentEditable(t);return n}},{key:\"isNodeEmpty\",value:function(e){return!(this.isSingleTag(e)&&!this.isLineBreakTag(e))&&0===(this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent.replace(\"​\",\"\")).trim().length}},{key:\"isLeaf\",value:function(e){return!!e&&0===e.childNodes.length}},{key:\"isEmpty\",value:function(e){e.normalize();for(var t=[e];t.length>0;)if(e=t.shift()){if(this.isLeaf(e)&&!this.isNodeEmpty(e))return!1;e.childNodes&&t.push.apply(t,(0,r.default)(Array.from(e.childNodes)))}return!0}},{key:\"isHTMLString\",value:function(t){var n=e.make(\"div\");return n.innerHTML=t,n.childElementCount>0}},{key:\"getContentLength\",value:function(t){return e.isNativeInput(t)?t.value.length:t.nodeType===Node.TEXT_NODE?t.length:t.textContent.length}},{key:\"blockElements\",get:function(){return[\"address\",\"article\",\"aside\",\"blockquote\",\"canvas\",\"div\",\"dl\",\"dt\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"li\",\"main\",\"nav\",\"noscript\",\"ol\",\"output\",\"p\",\"pre\",\"ruby\",\"section\",\"table\",\"tbody\",\"thead\",\"tr\",\"tfoot\",\"ul\",\"video\"]}},{key:\"containsOnlyInlineElements\",value:function(t){var n;return l.isString(t)?(n=document.createElement(\"div\")).innerHTML=t:n=t,Array.from(n.children).every((function t(n){return!e.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(t)}))}},{key:\"getDeepestBlockElements\",value:function(t){return e.containsOnlyInlineElements(t)?[t]:Array.from(t.children).reduce((function(t,n){return[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:\"getHolder\",value:function(e){return l.isString(e)?document.getElementById(e):e}},{key:\"isExtensionNode\",value:function(e){return e&&[\"GRAMMARLY-EXTENSION\"].includes(e.nodeName)}},{key:\"isAnchor\",value:function(e){return\"a\"===e.tagName.toLowerCase()}},{key:\"offset\",value:function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,r=t.top+o,i=t.left+n;return{top:r,left:i,bottom:r+t.height,right:i+t.width}}}]),e}();o.default=f,f.displayName=\"Dom\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(368)();e.exports=o;try{regeneratorRuntime=o}catch(e){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=o:Function(\"r\",\"regeneratorRuntime = r\")(o)}},function(e,t){function n(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,r)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise((function(r,i){var a=e.apply(t,o);function s(e){n(a,r,i,s,l,\"next\",e)}function l(e){n(a,r,i,s,l,\"throw\",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(39);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(10),r=n(27),i=n(26),a=n(45)(\"src\"),s=n(192),l=(\"\"+s).split(\"toString\");n(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c=\"function\"==typeof n;c&&(i(n,\"name\")||r(n,\"name\",t)),e[t]!==n&&(c&&(i(n,a)||r(n,a,e[t]?\"\"+e[t]:l.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,\"toString\",(function(){return\"function\"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var o=n(0),r=n(11),i=n(39),a=/\"/g,s=function(e,t,n,o){var r=String(i(e)),s=\"<\"+t;return\"\"!==n&&(s+=\" \"+n+'=\"'+String(o).replace(a,\""\")+'\"'),s+\">\"+r+\"\"};e.exports=function(e,t){var n={};n[e]=t(s),o(o.P+o.F*r((function(){var t=\"\"[e]('\"');return t!==t.toLowerCase()||t.split('\"').length>3})),\"String\",n)}},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l){\"use strict\";var c=n(1);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)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=c(l);var f=function(){function e(){(0,r.default)(this,e),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground=\"backColor\",this.commandRemoveFormat=\"removeFormat\"}return(0,i.default)(e,[{key:\"removeFakeBackground\",value:function(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}},{key:\"setFakeBackground\",value:function(){document.execCommand(this.commandBackground,!1,\"#a8d6ff\"),this.isFakeBackgroundEnabled=!0}},{key:\"save\",value:function(){this.savedSelectionRange=e.range}},{key:\"restore\",value:function(){if(this.savedSelectionRange){var e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}}},{key:\"clearSaved\",value:function(){this.savedSelectionRange=null}},{key:\"collapseToEnd\",value:function(){var e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}},{key:\"findParentTag\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),r=null;if(!o||!o.anchorNode||!o.focusNode)return null;var i=[o.anchorNode,o.focusNode];return i.forEach((function(o){for(var i=n;i>0&&o.parentNode&&(o.tagName!==e||(r=o,t&&o.classList&&!o.classList.contains(t)&&(r=null),!r));)o=o.parentNode,i--})),r}},{key:\"expandToTag\",value:function(e){var t=window.getSelection();t.removeAllRanges();var n=document.createRange();n.selectNodeContents(e),t.addRange(n)}}],[{key:\"CSS\",get:function(){return{editorWrapper:\"codex-editor\",editorZone:\"codex-editor__redactor\"}}},{key:\"anchorNode\",get:function(){var e=window.getSelection();return e?e.anchorNode:null}},{key:\"anchorElement\",get:function(){var e=window.getSelection();if(!e)return null;var t=e.anchorNode;return t?l.default.isElement(t)?t:t.parentElement:null}},{key:\"anchorOffset\",get:function(){var e=window.getSelection();return e?e.anchorOffset:null}},{key:\"isCollapsed\",get:function(){var e=window.getSelection();return e?e.isCollapsed:null}},{key:\"isAtEditor\",get:function(){return this.isSelectionAtEditor(e.get())}},{key:\"isSelectionAtEditor\",value:function(t){if(!t)return!1;var n=t.anchorNode||t.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(\".\".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}},{key:\"isRangeAtEditor\",value:function(t){if(t){var n=t.startContainer;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(\".\".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}}},{key:\"isSelectionExists\",get:function(){return!!e.get().anchorNode}},{key:\"range\",get:function(){return this.getRangeFromSelection(this.get())}},{key:\"getRangeFromSelection\",value:function(e){return e&&e.rangeCount?e.getRangeAt(0):null}},{key:\"rect\",get:function(){var e,t=document.selection,n={x:0,y:0,width:0,height:0};if(t&&\"Control\"!==t.type)return e=(t=t).createRange(),n.x=e.boundingLeft,n.y=e.boundingTop,n.width=e.boundingWidth,n.height=e.boundingHeight,n;if(!window.getSelection)return s.log(\"Method window.getSelection is not supported\",\"warn\"),n;if(null===(t=window.getSelection()).rangeCount||isNaN(t.rangeCount))return s.log(\"Method SelectionUtils.rangeCount is not supported\",\"warn\"),n;if(0===t.rangeCount)return n;if((e=t.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=e.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement(\"span\");if(o.getBoundingClientRect){o.appendChild(document.createTextNode(\"​\")),e.insertNode(o),n=o.getBoundingClientRect();var r=o.parentNode;r.removeChild(o),r.normalize()}}return n}},{key:\"text\",get:function(){return window.getSelection?window.getSelection().toString():\"\"}},{key:\"get\",value:function(){return window.getSelection()}},{key:\"setCursor\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=window.getSelection();if(l.default.isNativeInput(e)){if(!l.default.canSetCaret(e))return;return e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()}return n.setStart(e,t),n.setEnd(e,t),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect()}},{key:\"addFakeCursor\",value:function(t){var n=e.range,o=l.default.make(\"span\",\"codex-editor__fake-cursor\");o.dataset.mutationFree=\"true\",!n||t&&!t.contains(n.startContainer)||(n.collapse(),n.insertNode(o))}},{key:\"removeFakeCursor\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=l.default.find(e,\".codex-editor__fake-cursor\");t&&t.remove()}}]),e}();o.default=f,f.displayName=\"SelectionUtils\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(18),r=n(44);e.exports=n(17)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(62),r=n(39);e.exports=function(e){return o(r(e))}},function(e,t,n){\"use strict\";var o=n(11);e.exports=function(e,t){return!!e&&o((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var o=n(362),r=n(363),i=n(148),a=n(364);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(32);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(\"function\"!=typeof e)throw TypeError(e+\" is not a function!\");return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(63),r=n(44),i=n(28),a=n(42),s=n(26),l=n(117),c=Object.getOwnPropertyDescriptor;t.f=n(17)?c:function(e,t){if(e=i(e),t=a(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(0),r=n(16),i=n(11);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i((function(){n(1)})),\"Object\",a)}},function(e,t,n){var o=n(31),r=n(62),i=n(22),a=n(15),s=n(133);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,f=6==e,d=5==e||f,p=t||s;return function(t,s,h){for(var v,g,y=i(t),k=r(y),b=o(s,h,3),m=a(k.length),w=0,x=n?p(t,m):l?p(t,0):void 0;m>w;w++)if((d||w in k)&&(g=b(v=k[w],w,y),e))if(n)x[w]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(u)return!1;return f?-1:c||u?u:x}}},function(e,t,n){\"use strict\";n.r(t),n.d(t,\"IconAddBackground\",(function(){return c})),n.d(t,\"IconAddBorder\",(function(){return u})),n.d(t,\"IconAlignCenter\",(function(){return f})),n.d(t,\"IconAlignJustify\",(function(){return d})),n.d(t,\"IconAlignLeft\",(function(){return p})),n.d(t,\"IconAlignRight\",(function(){return h})),n.d(t,\"IconBold\",(function(){return v})),n.d(t,\"IconBrackets\",(function(){return g})),n.d(t,\"IconChecklist\",(function(){return y})),n.d(t,\"IconChevronDown\",(function(){return k})),n.d(t,\"IconChevronLeft\",(function(){return b})),n.d(t,\"IconChevronRight\",(function(){return m})),n.d(t,\"IconChevronUp\",(function(){return w})),n.d(t,\"IconClipboard\",(function(){return x})),n.d(t,\"IconCollapse\",(function(){return C})),n.d(t,\"IconColor\",(function(){return S})),n.d(t,\"IconCopy\",(function(){return T})),n.d(t,\"IconCross\",(function(){return E})),n.d(t,\"IconCurlyBrackets\",(function(){return B})),n.d(t,\"IconDelimiter\",(function(){return M})),n.d(t,\"IconDirectionDownRight\",(function(){return _})),n.d(t,\"IconDirectionLeftDown\",(function(){return O})),n.d(t,\"IconDirectionRightDown\",(function(){return I})),n.d(t,\"IconDirectionUpRight\",(function(){return L})),n.d(t,\"IconDotCircle\",(function(){return P})),n.d(t,\"IconEtcHorisontal\",(function(){return j})),n.d(t,\"IconEtcVertical\",(function(){return R})),n.d(t,\"IconFile\",(function(){return A})),n.d(t,\"IconGift\",(function(){return N})),n.d(t,\"IconGlobe\",(function(){return D})),n.d(t,\"IconH1\",(function(){return o})),n.d(t,\"IconH2\",(function(){return r})),n.d(t,\"IconH3\",(function(){return i})),n.d(t,\"IconH4\",(function(){return a})),n.d(t,\"IconH5\",(function(){return s})),n.d(t,\"IconH6\",(function(){return l})),n.d(t,\"IconHeading\",(function(){return F})),n.d(t,\"IconHeart\",(function(){return H})),n.d(t,\"IconHidden\",(function(){return W})),n.d(t,\"IconHtml\",(function(){return U})),n.d(t,\"IconInstagram\",(function(){return z})),n.d(t,\"IconItalic\",(function(){return V})),n.d(t,\"IconLink\",(function(){return Y})),n.d(t,\"IconLinkedin\",(function(){return X})),n.d(t,\"IconListBulleted\",(function(){return G})),n.d(t,\"IconListNumbered\",(function(){return K})),n.d(t,\"IconMarker\",(function(){return Z})),n.d(t,\"IconMenu\",(function(){return J})),n.d(t,\"IconMenuSmall\",(function(){return q})),n.d(t,\"IconPicture\",(function(){return $})),n.d(t,\"IconPlay\",(function(){return Q})),n.d(t,\"IconPlus\",(function(){return ee})),n.d(t,\"IconQuestion\",(function(){return te})),n.d(t,\"IconQuote\",(function(){return ne})),n.d(t,\"IconRedo\",(function(){return oe})),n.d(t,\"IconRemoveBackground\",(function(){return re})),n.d(t,\"IconReplace\",(function(){return ie})),n.d(t,\"IconSave\",(function(){return ae})),n.d(t,\"IconSearch\",(function(){return se})),n.d(t,\"IconStar\",(function(){return le})),n.d(t,\"IconStretch\",(function(){return ce})),n.d(t,\"IconStrikethrough\",(function(){return ue})),n.d(t,\"IconTable\",(function(){return pe})),n.d(t,\"IconTableWithHeadings\",(function(){return fe})),n.d(t,\"IconTableWithoutHeadings\",(function(){return de})),n.d(t,\"IconText\",(function(){return he})),n.d(t,\"IconTranslate\",(function(){return ve})),n.d(t,\"IconTrash\",(function(){return ge})),n.d(t,\"IconTwitter\",(function(){return ye})),n.d(t,\"IconUnderline\",(function(){return ke})),n.d(t,\"IconUndo\",(function(){return be})),n.d(t,\"IconUnlink\",(function(){return me})),n.d(t,\"IconUser\",(function(){return we})),n.d(t,\"IconUsersGroup\",(function(){return xe})),n.d(t,\"IconWarning\",(function(){return Ce}));const o='',r='',i='',a='',s='',l='',c='',u='',f='',d='',p='',h='',v='',g='',y='',k='',b='',m='',w='',x='',C='',S='',T='',E='',B='',M='',_='',O='',I='',L='',P='',j='',R='',A='',N='',D='',F='',H='',W='',U='',z='',V='',Y='',X='',G='',K='',Z='',q='',J='',$='',Q='',ee='',te='',ne='',oe='',re='',ie='',ae='',se='',le='',ce='',ue='',fe='',de='',pe='',he='',ve='',ge='',ye='',ke='',be='',me='',we='',xe='',Ce=''},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError(\"Can't call method on \"+e);return e}},function(e,t,n){\"use strict\";if(n(17)){var o=n(46),r=n(10),i=n(11),a=n(0),s=n(81),l=n(110),c=n(31),u=n(59),f=n(44),d=n(27),p=n(60),h=n(33),v=n(15),g=n(144),y=n(48),k=n(42),b=n(26),m=n(64),w=n(13),x=n(22),C=n(102),S=n(49),T=n(51),E=n(50).f,B=n(104),M=n(45),_=n(14),O=n(36),I=n(71),L=n(65),P=n(106),j=n(57),R=n(74),A=n(58),N=n(105),D=n(135),F=n(18),H=n(34),W=F.f,U=H.f,z=r.RangeError,V=r.TypeError,Y=r.Uint8Array,X=Array.prototype,G=l.ArrayBuffer,K=l.DataView,Z=O(0),q=O(2),J=O(3),$=O(4),Q=O(5),ee=O(6),te=I(!0),ne=I(!1),oe=P.values,re=P.keys,ie=P.entries,ae=X.lastIndexOf,se=X.reduce,le=X.reduceRight,ce=X.join,ue=X.sort,fe=X.slice,de=X.toString,pe=X.toLocaleString,he=_(\"iterator\"),ve=_(\"toStringTag\"),ge=M(\"typed_constructor\"),ye=M(\"def_constructor\"),ke=s.CONSTR,be=s.TYPED,me=s.VIEW,we=O(1,(function(e,t){return Ee(L(e,e[ye]),t)})),xe=i((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),Ce=!!Y&&!!Y.prototype.set&&i((function(){new Y(1).set({})})),Se=function(e,t){var n=h(e);if(n<0||n%t)throw z(\"Wrong offset!\");return n},Te=function(e){if(w(e)&&be in e)return e;throw V(e+\" is not a typed array!\")},Ee=function(e,t){if(!w(e)||!(ge in e))throw V(\"It is not a typed array constructor!\");return new e(t)},Be=function(e,t){return Me(L(e,e[ye]),t)},Me=function(e,t){for(var n=0,o=t.length,r=Ee(e,o);o>n;)r[n]=t[n++];return r},_e=function(e,t,n){W(e,t,{get:function(){return this._d[n]}})},Oe=function(e){var t,n,o,r,i,a,s=x(e),l=arguments.length,u=l>1?arguments[1]:void 0,f=void 0!==u,d=B(s);if(null!=d&&!C(d)){for(a=d.call(s),o=[],t=0;!(i=a.next()).done;t++)o.push(i.value);s=o}for(f&&l>2&&(u=c(u,arguments[2],2)),t=0,n=v(s.length),r=Ee(this,n);n>t;t++)r[t]=f?u(s[t],t):s[t];return r},Ie=function(){for(var e=0,t=arguments.length,n=Ee(this,t);t>e;)n[e]=arguments[e++];return n},Le=!!Y&&i((function(){pe.call(new Y(1))})),Pe=function(){return pe.apply(Le?fe.call(Te(this)):Te(this),arguments)},je={copyWithin:function(e,t){return D.call(Te(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Te(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Te(this),arguments)},filter:function(e){return Be(this,q(Te(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Te(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Te(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Te(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Te(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Te(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Te(this),arguments)},lastIndexOf:function(e){return ae.apply(Te(this),arguments)},map:function(e){return we(Te(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Te(this),arguments)},reduceRight:function(e){return le.apply(Te(this),arguments)},reverse:function(){for(var e,t=Te(this).length,n=Math.floor(t/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return ue.call(Te(this),e)},subarray:function(e,t){var n=Te(this),o=n.length,r=y(e,o);return new(L(n,n[ye]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,v((void 0===t?o:y(t,o))-r))}},Re=function(e,t){return Be(this,fe.call(Te(this),e,t))},Ae=function(e){Te(this);var t=Se(arguments[1],1),n=this.length,o=x(e),r=v(o.length),i=0;if(r+t>n)throw z(\"Wrong length!\");for(;i255?255:255&o),r.v[p](n*t+r.o,o,xe)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,o,r){u(e,h,c,\"_d\");var i,a,s,l,f=0,p=0;if(w(n)){if(!(n instanceof G||\"ArrayBuffer\"==(l=m(n))||\"SharedArrayBuffer\"==l))return be in n?Me(h,n):Oe.call(h,n);i=n,p=Se(o,t);var y=n.byteLength;if(void 0===r){if(y%t)throw z(\"Wrong length!\");if((a=y-p)<0)throw z(\"Wrong length!\")}else if((a=v(r)*t)+p>y)throw z(\"Wrong length!\");s=a/t}else s=g(n),i=new G(a=s*t);for(d(e,\"_d\",{b:i,o:p,l:a,e:s,v:new K(i)});fdocument.F=Object<\\/script>\"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(119),r=n(89).concat(\"length\",\"prototype\");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(26),r=n(22),i=n(88)(\"IE_PROTO\"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:\"function\"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var o=n(14)(\"unscopables\"),r=Array.prototype;null==r[o]&&n(27)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){var o=n(13);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError(\"Incompatible receiver, \"+t+\" required!\");return e}},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(150)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,null,[{key:\"ui\",value:function(t,n){return e._t(t,n)}},{key:\"t\",value:function(t,n){return e._t(t,n)}},{key:\"setDictionary\",value:function(t){e.currentDictionary=t}},{key:\"_t\",value:function(t,n){var o=e.getNamespace(t);return o&&o[n]?o[n]:n}},{key:\"getNamespace\",value:function(t){return t.split(\".\").reduce((function(e,t){return e&&Object.keys(e).length?e[t]:{}}),e.currentDictionary)}}]),e}();o.default=l,l.displayName=\"I18n\",l.currentDictionary=a.default,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(18).f,r=n(26),i=n(14)(\"toStringTag\");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(0),r=n(39),i=n(11),a=n(92),s=\"[\"+a+\"]\",l=RegExp(\"^\"+s+s+\"*\"),c=RegExp(s+s+\"*$\"),u=function(e,t,n){var r={},s=i((function(){return!!a[e]()||\"​…\"!=\"​…\"[e]()})),l=r[e]=s?t(f):a[e];n&&(r[n]=l),o(o.P+o.F*s,\"String\",r)},f=u.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(l,\"\")),2&t&&(e=e.replace(c,\"\")),e};e.exports=u},function(e,t){e.exports={}},function(e,t,n){\"use strict\";var o=n(10),r=n(18),i=n(17),a=n(14)(\"species\");e.exports=function(e){var t=o[e];i&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+\": incorrect invocation!\");return e}},function(e,t,n){var o=n(23);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(41),n(2),n(3),n(152),n(114),n(5),n(6),n(4),n(19),n(8),n(113),n(25),n(82)],void 0===(i=\"function\"==typeof(o=function(e,t,o,r,i,s,l,c,u,f,d,p,h,v,g,y,k){\"use strict\";var b,m=n(1);function w(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function x(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=e.BlockToolAPI=void 0,t=m(t),o=m(o),r=m(r),i=m(i),s=m(s),l=m(l),c=m(c),u=m(u),f=m(f),d=m(d),p=m(p),h=m(h),v=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(v),g=m(g),y=m(y),k=m(k),e.BlockToolAPI=b,function(e){e.APPEND_CALLBACK=\"appendCallback\",e.RENDERED=\"rendered\",e.MOVED=\"moved\",e.UPDATED=\"updated\",e.REMOVED=\"removed\",e.ON_PASTE=\"onPaste\"}(b||(e.BlockToolAPI=b={}));var C=function(e){(0,f.default)(w,e);var n,a,d,k,m=x(w);function w(e){var t,n=e.id,o=void 0===n?v.generateBlockId():n,r=e.data,a=e.tool,l=e.api,u=e.readOnly,f=e.tunesData;return(0,s.default)(this,w),(t=m.call(this)).cachedInputs=[],t.tunesInstances=new Map,t.defaultTunesInstances=new Map,t.unavailableTunesData={},t.inputIndex=0,t.modificationDebounceTimer=450,t.didMutated=v.debounce((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=e instanceof InputEvent||!e.some((function(e){var t=e.addedNodes,n=void 0===t?[]:t,o=e.removedNodes;return[].concat((0,i.default)(Array.from(n)),(0,i.default)(Array.from(o))).some((function(e){return h.default.isElement(e)&&\"true\"===e.dataset.mutationFree}))}));n&&(t.cachedInputs=[],t.updateCurrentInput(),t.call(b.UPDATED),t.emit(\"didMutated\",(0,c.default)(t)))}),t.modificationDebounceTimer),t.handleFocus=function(){t.cachedInputs=[],t.updateCurrentInput()},t.name=a.name,t.id=o,t.settings=a.settings,t.config=a.settings.config||{},t.api=l,t.blockAPI=new g.default((0,c.default)(t)),t.mutationObserver=new MutationObserver(t.didMutated),t.tool=a,t.toolInstance=a.create(r,t.blockAPI,u),t.tunes=a.tunes,t.composeTunes(f),t.holder=t.compose(),t}return(0,l.default)(w,[{key:\"inputs\",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var e=h.default.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}},{key:\"currentInput\",get:function(){return this.inputs[this.inputIndex]},set:function(e){var t=this.inputs.findIndex((function(t){return t===e||t.contains(e)}));-1!==t&&(this.inputIndex=t)}},{key:\"firstInput\",get:function(){return this.inputs[0]}},{key:\"lastInput\",get:function(){var e=this.inputs;return e[e.length-1]}},{key:\"nextInput\",get:function(){return this.inputs[this.inputIndex+1]}},{key:\"previousInput\",get:function(){return this.inputs[this.inputIndex-1]}},{key:\"data\",get:function(){return this.save().then((function(e){return e&&!v.isEmpty(e.data)?e.data:{}}))}},{key:\"sanitize\",get:function(){return this.tool.sanitizeConfig}},{key:\"mergeable\",get:function(){return v.isFunction(this.toolInstance.merge)}},{key:\"isEmpty\",get:function(){var e=h.default.isEmpty(this.pluginsContent),t=!this.hasMedia;return e&&t}},{key:\"hasMedia\",get:function(){return!!this.holder.querySelector([\"img\",\"iframe\",\"video\",\"audio\",\"source\",\"input\",\"textarea\",\"twitterwidget\"].join(\",\"))}},{key:\"focused\",get:function(){return this.holder.classList.contains(w.CSS.focused)},set:function(e){this.holder.classList.toggle(w.CSS.focused,e)}},{key:\"selected\",get:function(){return this.holder.classList.contains(w.CSS.selected)},set:function(e){e?(this.holder.classList.add(w.CSS.selected),y.default.addFakeCursor(this.holder)):(this.holder.classList.remove(w.CSS.selected),y.default.removeFakeCursor(this.holder))}},{key:\"stretched\",get:function(){return this.holder.classList.contains(w.CSS.wrapperStretched)},set:function(e){this.holder.classList.toggle(w.CSS.wrapperStretched,e)}},{key:\"dropTarget\",set:function(e){this.holder.classList.toggle(w.CSS.dropTarget,e)}},{key:\"pluginsContent\",get:function(){var e=this.holder.querySelector(\".\".concat(w.CSS.content));if(e&&e.childNodes.length)for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];if(!h.default.isExtensionNode(n))return n}return null}},{key:\"call\",value:function(e,t){if(v.isFunction(this.toolInstance[e])){e===b.APPEND_CALLBACK&&v.log(\"`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead\",\"warn\");try{this.toolInstance[e].call(this.toolInstance,t)}catch(t){v.log(\"Error during '\".concat(e,\"' call: \").concat(t.message),\"error\")}}}},{key:\"mergeWith\",value:(k=(0,r.default)(t.default.mark((function e(n){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.merge(n);case 2:case\"end\":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:\"save\",value:(d=(0,r.default)(t.default.mark((function e(){var n,r,a,s,l=this;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.save(this.pluginsContent);case 2:return n=e.sent,r=this.unavailableTunesData,[].concat((0,i.default)(this.tunesInstances.entries()),(0,i.default)(this.defaultTunesInstances.entries())).forEach((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];if(v.isFunction(i.save))try{r[n]=i.save()}catch(e){v.log(\"Tune \".concat(i.constructor.name,\" save method throws an Error %o\"),\"warn\",e)}})),a=window.performance.now(),e.abrupt(\"return\",Promise.resolve(n).then((function(e){return s=window.performance.now(),{id:l.id,tool:l.name,data:e,tunes:r,time:s-a}})).catch((function(e){v.log(\"Saving process for \".concat(l.name,\" tool failed due to the \").concat(e),\"log\",\"red\")})));case 7:case\"end\":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:\"validate\",value:(a=(0,r.default)(t.default.mark((function e(n){var o;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=!0,!(this.toolInstance.validate instanceof Function)){e.next=5;break}return e.next=4,this.toolInstance.validate(n);case 4:o=e.sent;case 5:return e.abrupt(\"return\",o);case 6:case\"end\":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:\"getTunes\",value:function(){var e=document.createElement(\"div\"),t=[];return[\"function\"==typeof this.toolInstance.renderSettings?this.toolInstance.renderSettings():[],[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).map((function(e){return e.render()}))].flat().forEach((function(n){h.default.isElement(n)?e.appendChild(n):Array.isArray(n)?t.push.apply(t,(0,i.default)(n)):t.push(n)})),[t,e]}},{key:\"updateCurrentInput\",value:function(){this.currentInput=h.default.isNativeInput(document.activeElement)||!y.default.anchorNode?document.activeElement:y.default.anchorNode}},{key:\"willSelect\",value:function(){this.mutationObserver.observe(this.holder.firstElementChild,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.addInputEvents()}},{key:\"willUnselect\",value:function(){this.mutationObserver.disconnect(),this.removeInputEvents()}},{key:\"dispatchChange\",value:function(){this.didMutated()}},{key:\"destroy\",value:function(){(0,u.default)((0,p.default)(w.prototype),\"destroy\",this).call(this),v.isFunction(this.toolInstance.destroy)&&this.toolInstance.destroy()}},{key:\"getActiveToolboxEntry\",value:(n=(0,r.default)(t.default.mark((function e(){var n,r,i;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==(n=this.tool.toolbox).length){e.next=3;break}return e.abrupt(\"return\",Promise.resolve(this.tool.toolbox[0]));case 3:return e.next=5,this.data;case 5:return r=e.sent,i=n,e.abrupt(\"return\",i.find((function(e){return Object.entries(e.data).some((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];return r[n]&&v.equals(r[n],i)}))})));case 8:case\"end\":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:\"compose\",value:function(){var e=h.default.make(\"div\",w.CSS.wrapper),t=h.default.make(\"div\",w.CSS.content),n=this.toolInstance.render();t.appendChild(n);var o=t;return[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).forEach((function(e){if(v.isFunction(e.wrap))try{o=e.wrap(o)}catch(t){v.log(\"Tune \".concat(e.constructor.name,\" wrap method throws an Error %o\"),\"warn\",t)}})),e.appendChild(o),e}},{key:\"composeTunes\",value:function(e){var t=this;Array.from(this.tunes.values()).forEach((function(n){(n.isInternal?t.defaultTunesInstances:t.tunesInstances).set(n.name,n.create(e[n.name],t.blockAPI))})),Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),r=n[0],i=n[1];t.tunesInstances.has(r)||(t.unavailableTunesData[r]=i)}))}},{key:\"addInputEvents\",value:function(){var e=this;this.inputs.forEach((function(t){t.addEventListener(\"focus\",e.handleFocus),h.default.isNativeInput(t)&&t.addEventListener(\"input\",e.didMutated)}))}},{key:\"removeInputEvents\",value:function(){var e=this;this.inputs.forEach((function(t){t.removeEventListener(\"focus\",e.handleFocus),h.default.isNativeInput(t)&&t.removeEventListener(\"input\",e.didMutated)}))}}],[{key:\"CSS\",get:function(){return{wrapper:\"ce-block\",wrapperStretched:\"ce-block--stretched\",content:\"ce-block__content\",focused:\"ce-block--focused\",selected:\"ce-block--selected\",dropTarget:\"ce-block--drop-target\"}}}]),w}(k.default);e.default=C,C.displayName=\"Block\"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(38);e.exports=Object(\"z\").propertyIsEnumerable(0)?Object:function(e){return\"String\"==o(e)?e.split(\"\"):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(38),r=n(14)(\"toStringTag\"),i=\"Arguments\"==o(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?\"Undefined\":null===e?\"Null\":\"string\"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:i?o(t):\"Object\"==(a=o(t))&&\"function\"==typeof t.callee?\"Arguments\":a}},function(e,t,n){var o=n(12),r=n(32),i=n(14)(\"species\");e.exports=function(e,t){var n,a=o(e).constructor;return void 0===a||null==(n=o(a)[i])?t:r(n)}},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(8),n(380)],void 0===(i=\"function\"==typeof(o=function(e,t,o){\"use strict\";var r=n(1);function i(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={tags:t},r=new o.default(n);return r.clean(e)}function l(e,n){return Array.isArray(e)?(i=n,e.map((function(e){return l(e,i)}))):t.isObject(e)?function(e,n){var o,r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=e[i],s=(o=n[i],t.isObject(o)||t.isBoolean(o)||t.isFunction(o)?n[i]:n);r[i]=l(a,s)}return r}(e,n):t.isString(e)?(o=e,r=n,t.isObject(r)?s(o,r):!1===r?s(o,{}):o):e;var o,r,i}Object.defineProperty(e,\"__esModule\",{value:!0}),e.clean=s,e.sanitizeBlocks=function(e,n){return e.map((function(e){var o=t.isFunction(n)?n(e.tool):n;return t.isEmpty(o)||(e.data=l(e.data,o)),e}))},t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(\"default\"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=r?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o}(t),o=r(o)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(382),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l){\"use strict\";var c=n(1);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)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(t){var n=this;(0,r.default)(this,e),this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=function(t){if(n.isEventReadyForHandling(t))switch(e.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case l.keyCodes.TAB:n.handleTabPress(t);break;case l.keyCodes.LEFT:case l.keyCodes.UP:n.flipLeft();break;case l.keyCodes.RIGHT:case l.keyCodes.DOWN:n.flipRight();break;case l.keyCodes.ENTER:n.handleEnterPress(t)}},this.iterator=new s.default(t.items,t.focusedItemClass),this.activateCallback=t.activateCallback,this.allowedKeys=t.allowedKeys||e.usedKeys}return(0,i.default)(e,[{key:\"isActivated\",get:function(){return this.activated}},{key:\"activate\",value:function(e,t){this.activated=!0,e&&this.iterator.setItems(e),void 0!==t&&this.iterator.setCursor(t),document.addEventListener(\"keydown\",this.onKeyDown,!0)}},{key:\"deactivate\",value:function(){this.activated=!1,this.dropCursor(),document.removeEventListener(\"keydown\",this.onKeyDown)}},{key:\"focusFirst\",value:function(){this.dropCursor(),this.flipRight()}},{key:\"flipLeft\",value:function(){this.iterator.previous(),this.flipCallback()}},{key:\"flipRight\",value:function(){this.iterator.next(),this.flipCallback()}},{key:\"hasFocus\",value:function(){return!!this.iterator.currentItem}},{key:\"onFlip\",value:function(e){this.flipCallbacks.push(e)}},{key:\"removeOnFlip\",value:function(e){this.flipCallbacks=this.flipCallbacks.filter((function(t){return t!==e}))}},{key:\"dropCursor\",value:function(){this.iterator.dropCursor()}},{key:\"isEventReadyForHandling\",value:function(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}},{key:\"handleTabPress\",value:function(e){switch(e.shiftKey?s.default.directions.LEFT:s.default.directions.RIGHT){case s.default.directions.RIGHT:this.flipRight();break;case s.default.directions.LEFT:this.flipLeft()}}},{key:\"handleEnterPress\",value:function(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),l.isFunction(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}},{key:\"flipCallback\",value:function(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach((function(e){return e()}))}}],[{key:\"usedKeys\",get:function(){return[l.keyCodes.TAB,l.keyCodes.LEFT,l.keyCodes.RIGHT,l.keyCodes.ENTER,l.keyCodes.UP,l.keyCodes.DOWN]}}]),e}();o.default=f,f.displayName=\"Flipper\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(30),n(150),n(8)],void 0===(i=\"function\"==typeof(o=function(e,t,o,r){\"use strict\";var i=n(1);Object.defineProperty(e,\"__esModule\",{value:!0}),e.I18nInternalNS=void 0,t=i(t);var a=function e(n,o){var i={};return Object.entries(n).forEach((function(n){var a=(0,t.default)(n,2),s=a[0],l=a[1];if((0,r.isObject)(l)){var c=o?\"\".concat(o,\".\").concat(s):s,u=Object.values(l).every((function(e){return(0,r.isString)(e)}));i[s]=u?c:e(l,c)}else i[s]=l})),i}((o=i(o)).default);e.I18nInternalNS=a})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i=\"function\"==typeof(o=function(e,t,o,r){\"use strict\";var i,s,l,c,u,f,d=n(1);function p(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=e.UserSettings=e.ToolType=e.InternalTuneSettings=e.InternalInlineToolSettings=e.InternalBlockToolSettings=e.CommonInternalSettings=void 0,t=d(t),o=d(o),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(r),e.ToolType=i,function(e){e[e.Block=0]=\"Block\",e[e.Inline=1]=\"Inline\",e[e.Tune=2]=\"Tune\"}(i||(e.ToolType=i={})),e.UserSettings=s,function(e){e.Shortcut=\"shortcut\",e.Toolbox=\"toolbox\",e.EnabledInlineTools=\"inlineToolbar\",e.EnabledBlockTunes=\"tunes\",e.Config=\"config\"}(s||(e.UserSettings=s={})),e.CommonInternalSettings=l,function(e){e.Shortcut=\"shortcut\",e.SanitizeConfig=\"sanitize\"}(l||(e.CommonInternalSettings=l={})),e.InternalBlockToolSettings=c,function(e){e.IsEnabledLineBreaks=\"enableLineBreaks\",e.Toolbox=\"toolbox\",e.ConversionConfig=\"conversionConfig\",e.IsReadOnlySupported=\"isReadOnlySupported\",e.PasteConfig=\"pasteConfig\"}(c||(e.InternalBlockToolSettings=c={})),e.InternalInlineToolSettings=u,function(e){e.IsInline=\"isInline\",e.Title=\"title\"}(u||(e.InternalInlineToolSettings=u={})),e.InternalTuneSettings=f,function(e){e.IsTune=\"isTune\"}(f||(e.InternalTuneSettings=f={}));var h=function(){function e(n){var o=n.name,r=n.constructable,i=n.config,a=n.api,s=n.isDefault,l=n.isInternal,c=void 0!==l&&l,u=n.defaultPlaceholder;(0,t.default)(this,e),this.api=a,this.name=o,this.constructable=r,this.config=i,this.isDefault=s,this.isInternal=c,this.defaultPlaceholder=u}return(0,o.default)(e,[{key:\"settings\",get:function(){var e=this.config[s.Config]||{};return this.isDefault&&!(\"placeholder\"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}},{key:\"reset\",value:function(){if(r.isFunction(this.constructable.reset))return this.constructable.reset()}},{key:\"prepare\",value:function(){if(r.isFunction(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}},{key:\"shortcut\",get:function(){var e=this.constructable[l.Shortcut];return this.config[s.Shortcut]||e}},{key:\"sanitizeConfig\",get:function(){return this.constructable[l.SanitizeConfig]||{}}},{key:\"isInline\",value:function(){return this.type===i.Inline}},{key:\"isBlock\",value:function(){return this.type===i.Block}},{key:\"isTune\",value:function(){return this.type===i.Tune}}]),e}();e.default=h,h.displayName=\"BaseTool\"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(16),r=n(10),i=r[\"__core-js_shared__\"]||(r[\"__core-js_shared__\"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:o.version,mode:n(46)?\"pure\":\"global\",copyright:\"© 2020 Denis Pushkarev (zloirock.ru)\"})},function(e,t,n){var o=n(28),r=n(15),i=n(48);e.exports=function(e){return function(t,n,a){var s,l=o(t),c=r(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(38);e.exports=Array.isArray||function(e){return\"Array\"==o(e)}},function(e,t,n){var o=n(14)(\"iterator\"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){\"use strict\";var o=n(12);e.exports=function(){var e=o(this),t=\"\";return e.global&&(t+=\"g\"),e.ignoreCase&&(t+=\"i\"),e.multiline&&(t+=\"m\"),e.unicode&&(t+=\"u\"),e.sticky&&(t+=\"y\"),t}},function(e,t,n){\"use strict\";var o=n(64),r=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if(\"function\"==typeof n){var i=n.call(e,t);if(\"object\"!=typeof i)throw new TypeError(\"RegExp exec method returned something other than an Object or null\");return i}if(\"RegExp\"!==o(e))throw new TypeError(\"RegExp#exec called on incompatible receiver\");return r.call(e,t)}},function(e,t,n){\"use strict\";n(137);var o=n(23),r=n(27),i=n(11),a=n(39),s=n(14),l=n(107),c=s(\"species\"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:\"7\"},e},\"7\"!==\"\".replace(e,\"$\")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n=\"ab\".split(e);return 2===n.length&&\"a\"===n[0]&&\"b\"===n[1]}();e.exports=function(e,t,n){var d=s(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!=\"\"[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},\"split\"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](\"\"),!t})):void 0;if(!p||!h||\"replace\"===e&&!u||\"split\"===e&&!f){var v=/./[d],g=n(a,d,\"\"[e],(function(e,t,n,o,r){return t.exec===l?p&&!r?{done:!0,value:v.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}})),y=g[0],k=g[1];o(String.prototype,e,y),r(RegExp.prototype,d,2==t?function(e,t){return k.call(e,this,t)}:function(e){return k.call(e,this)})}}},function(e,t,n){var o=n(31),r=n(132),i=n(102),a=n(12),s=n(15),l=n(104),c={},u={};(t=e.exports=function(e,t,n,f,d){var p,h,v,g,y=d?function(){return e}:l(e),k=o(n,f,t?2:1),b=0;if(\"function\"!=typeof y)throw TypeError(e+\" is not iterable!\");if(i(y)){for(p=s(e.length);p>b;b++)if((g=t?k(a(h=e[b])[0],h[1]):k(e[b]))===c||g===u)return g}else for(v=y.call(e);!(h=v.next()).done;)if((g=r(v,k,h.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},function(e,t,n){var o=n(10).navigator;e.exports=o&&o.userAgent||\"\"},function(e,t,n){\"use strict\";var o=n(10),r=n(0),i=n(23),a=n(60),s=n(43),l=n(78),c=n(59),u=n(13),f=n(11),d=n(74),p=n(55),h=n(93);e.exports=function(e,t,n,v,g,y){var k=o[e],b=k,m=g?\"set\":\"add\",w=b&&b.prototype,x={},C=function(e){var t=w[e];i(w,e,\"delete\"==e||\"has\"==e?function(e){return!(y&&!u(e))&&t.call(this,0===e?0:e)}:\"get\"==e?function(e){return y&&!u(e)?void 0:t.call(this,0===e?0:e)}:\"add\"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(\"function\"==typeof b&&(y||w.forEach&&!f((function(){(new b).entries().next()})))){var S=new b,T=S[m](y?{}:-0,1)!=S,E=f((function(){S.has(1)})),B=d((function(e){new b(e)})),M=!y&&f((function(){for(var e=new b,t=5;t--;)e[m](t,t);return!e.has(-0)}));B||((b=t((function(t,n){c(t,b,e);var o=h(new k,t,b);return null!=n&&l(n,g,o[m],o),o}))).prototype=w,w.constructor=b),(E||M)&&(C(\"delete\"),C(\"has\"),g&&C(\"get\")),(M||T)&&C(m),y&&w.clear&&delete w.clear}else b=v.getConstructor(t,e,g,m),a(b.prototype,n),s.NEED=!0;return p(b,e),x[e]=b,r(r.G+r.W+r.F*(b!=k),x),y||v.setStrong(b,e,g),b}},function(e,t,n){for(var o,r=n(10),i=n(27),a=n(45),s=a(\"typed_array\"),l=a(\"view\"),c=!(!r.ArrayBuffer||!r.DataView),u=c,f=0,d=\"Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array\".split(\",\");f<9;)(o=r[d[f++]])?(i(o.prototype,s,!0),i(o.prototype,l,!0)):u=!1;e.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e),this.subscribers={}}return(0,i.default)(e,[{key:\"on\",value:function(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}},{key:\"once\",value:function(e,t){var n=this;e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push((function o(r){var i=t(r),a=n.subscribers[e].indexOf(o);return-1!==a&&n.subscribers[e].splice(a,1),i}))}},{key:\"emit\",value:function(e,t){!(0,a.isEmpty)(this.subscribers)&&this.subscribers[e]&&this.subscribers[e].reduce((function(e,t){return t(e)||e}),t)}},{key:\"off\",value:function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;if(this.toolboxInstance.close(),this.Editor.BlockSettings.close(),e){this.hoveredBlock=e;var t,n=e.holder,o=this.Editor.UI.isMobile,r=e.pluginsContent,i=window.getComputedStyle(r),a=parseInt(i.paddingTop,10),s=n.offsetHeight;t=o?n.offsetTop+s:n.offsetTop+a,this.nodes.wrapper.style.top=\"\".concat(Math.floor(t),\"px\"),1===this.Editor.BlockManager.blocks.length&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}}},{key:\"close\",value:function(){this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.toolboxInstance.close(),this.Editor.BlockSettings.close())}},{key:\"open\",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];d.delay((function(){e.nodes.wrapper.classList.add(e.CSS.toolbarOpened),t?e.blockActions.show():e.blockActions.hide()}),50)()}},{key:\"make\",value:function(){var e=this;this.nodes.wrapper=f.default.make(\"div\",this.CSS.toolbar),[\"content\",\"actions\"].forEach((function(t){e.nodes[t]=f.default.make(\"div\",e.CSS[t])})),f.default.append(this.nodes.wrapper,this.nodes.content),f.default.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=f.default.make(\"div\",this.CSS.plusButton,{innerHTML:y.IconPlus}),f.default.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,\"click\",(function(){e.tooltip.hide(!0),e.plusButtonClicked()}),!1);var t=f.default.make(\"div\");t.appendChild(document.createTextNode(p.default.ui(h.I18nInternalNS.ui.toolbar.toolbox,\"Add\"))),t.appendChild(f.default.make(\"div\",this.CSS.plusButtonShortcut,{textContent:\"⇥ Tab\"})),this.tooltip.onHover(this.nodes.plusButton,t,{hidingDelay:400}),this.nodes.settingsToggler=f.default.make(\"span\",this.CSS.settingsToggler,{innerHTML:y.IconMenu}),f.default.append(this.nodes.actions,this.nodes.settingsToggler),this.tooltip.onHover(this.nodes.settingsToggler,p.default.ui(h.I18nInternalNS.ui.blockTunes.toggler,\"Click to tune\"),{hidingDelay:400}),f.default.append(this.nodes.actions,this.makeToolbox()),f.default.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:\"makeToolbox\",value:function(){var e=this;return this.toolboxInstance=new g.default({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:p.default.ui(h.I18nInternalNS.ui.popover,\"Filter\"),nothingFound:p.default.ui(h.I18nInternalNS.ui.popover,\"Nothing found\")}}),this.toolboxInstance.on(g.ToolboxEvent.Opened,(function(){e.Editor.UI.nodes.wrapper.classList.add(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(g.ToolboxEvent.Closed,(function(){e.Editor.UI.nodes.wrapper.classList.remove(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(g.ToolboxEvent.BlockAdded,(function(t){var n=t.block,o=e.Editor,r=o.BlockManager,i=o.Caret,a=r.getBlockById(n.id);0===a.inputs.length&&(a===r.lastBlock?(r.insertAtEnd(),i.setToBlock(r.lastBlock)):i.setToBlock(r.nextBlock))})),this.toolboxInstance.make()}},{key:\"plusButtonClicked\",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.toggle()}},{key:\"enableModuleBindings\",value:function(){var e=this;this.readOnlyMutableListeners.on(this.nodes.settingsToggler,\"mousedown\",(function(t){t.stopPropagation(),e.settingsTogglerClicked(),e.toolboxInstance.close(),e.tooltip.hide(!0)}),!0),d.isMobileScreen()||this.eventsDispatcher.on(this.Editor.UI.events.blockHovered,(function(t){e.Editor.BlockSettings.opened||e.toolboxInstance.opened||e.moveAndOpen(t.block)}))}},{key:\"disableModuleBindings\",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:\"settingsTogglerClicked\",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}},{key:\"drawUI\",value:function(){this.Editor.BlockSettings.make(),this.make()}},{key:\"destroy\",value:function(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy(),this.tooltip.destroy()}}]),n}(u.default);o.default=x,x.displayName=\"Toolbar\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(41),n(2),n(3),n(5),n(6),n(4),n(7),n(19),n(112),n(67),n(387),n(82),n(8),n(388),n(37)],void 0===(i=\"function\"==typeof(o=function(e,t,o,r,i,a,s,l,c,u,f,d,p,h,v,g){\"use strict\";var y=n(1);function k(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,s.default)(e);if(t){var r=(0,s.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,a.default)(this,n)}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=e.PopoverEvent=void 0,t=y(t),o=y(o),r=y(r),i=y(i),a=y(a),s=y(s),l=y(l),c=y(c),u=y(u),f=y(f),d=y(d),p=y(p),v=y(v);var b,m=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if(\"object\"===(\"undefined\"==typeof Reflect?\"undefined\":(0,l.default)(Reflect))&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.PopoverEvent=b,function(e){e.OverlayClicked=\"overlay-clicked\",e.Close=\"close\"}(b||(e.PopoverEvent=b={}));var w=function(e){(0,i.default)(a,e);var n=k(a);function a(e){var t,r=e.items,i=e.className,s=e.searchable,l=e.filterLabel,c=e.nothingFoundLabel,f=e.customContent,d=e.customContentFlippableItems,p=e.scopeElement;return(0,o.default)(this,a),(t=n.call(this)).customContentFlippableItems=[],t.isShown=!1,t.nodes={wrapper:null,popover:null,items:null,nothingFound:null,overlay:null},t.scrollLocker=new v.default,t.itemsRequiringConfirmation={},t.removeSpecialHoverBehavior=function(){var e=t.nodes.items.querySelector(\".\".concat(a.CSS.itemNoHover));e&&e.classList.remove(a.CSS.itemNoHover)},t.onFlip=function(){t.disableSpecialHoverAndFocusBehavior()},t.items=r,t.customContent=f,t.customContentFlippableItems=d,t.className=i||\"\",t.searchable=s,t.listeners=new u.default,t.scopeElement=p,t.filterLabel=l,t.nothingFoundLabel=c,t.render(),t.enableFlipper(),t}return(0,r.default)(a,[{key:\"getElement\",value:function(){return this.nodes.wrapper}},{key:\"show\",value:function(){var e=this;this.shouldOpenPopoverBottom||(this.nodes.wrapper.style.setProperty(\"--popover-height\",this.calculateHeight()+\"px\"),this.nodes.wrapper.classList.add(this.className+\"--opened-top\")),this.search&&this.search.clear(),this.nodes.items.scrollTop=0,this.nodes.popover.classList.add(a.CSS.popoverOpened),this.nodes.overlay.classList.remove(a.CSS.popoverOverlayHidden),this.flipper.activate(this.flippableElements),this.searchable&&setTimeout((function(){e.search.focus()}),100),(0,h.isMobileScreen)()&&this.scrollLocker.lock(),this.isShown=!0}},{key:\"hide\",value:function(){var e=this;this.isShown&&(this.nodes.popover.classList.remove(a.CSS.popoverOpened),this.nodes.overlay.classList.add(a.CSS.popoverOverlayHidden),this.flipper.deactivate(),(0,h.isMobileScreen)()&&this.scrollLocker.unlock(),this.isShown=!1,this.nodes.wrapper.classList.remove(this.className+\"--opened-top\"),Array.from(this.nodes.items.querySelectorAll(\".\".concat(a.CSS.itemConfirmation))).forEach((function(t){return e.cleanUpConfirmationStateForItem(t)})),this.disableSpecialHoverAndFocusBehavior(),this.emit(b.Close))}},{key:\"destroy\",value:function(){this.flipper.deactivate(),this.listeners.removeAll(),this.disableSpecialHoverAndFocusBehavior(),(0,h.isMobileScreen)()&&this.scrollLocker.unlock()}},{key:\"hasFocus\",value:function(){return this.flipper.hasFocus()}},{key:\"calculateHeight\",value:function(){var e,t=this.nodes.popover.cloneNode(!0);return t.style.visibility=\"hidden\",t.style.position=\"absolute\",t.style.top=\"-1000px\",t.classList.add(a.CSS.popoverOpened),document.body.appendChild(t),e=t.offsetHeight,t.remove(),e}},{key:\"render\",value:function(){var e=this;this.nodes.wrapper=c.default.make(\"div\",this.className),this.nodes.popover=c.default.make(\"div\",a.CSS.popover),this.nodes.wrapper.appendChild(this.nodes.popover),this.nodes.overlay=c.default.make(\"div\",[a.CSS.popoverOverlay,a.CSS.popoverOverlayHidden]),this.nodes.wrapper.appendChild(this.nodes.overlay),this.searchable&&this.addSearch(this.nodes.popover),this.customContent&&(this.customContent.classList.add(a.CSS.customContent),this.nodes.popover.appendChild(this.customContent)),this.nodes.items=c.default.make(\"div\",a.CSS.itemsWrapper),this.items.forEach((function(t){e.nodes.items.appendChild(e.createItem(t))})),this.nodes.popover.appendChild(this.nodes.items),this.nodes.nothingFound=c.default.make(\"div\",[a.CSS.noFoundMessage],{textContent:this.nothingFoundLabel}),this.nodes.popover.appendChild(this.nodes.nothingFound),this.listeners.on(this.nodes.popover,\"click\",(function(t){var n=t.target.closest(\".\".concat(a.CSS.item));n&&e.itemClicked(n,t)})),this.listeners.on(this.nodes.overlay,\"click\",(function(){e.emit(b.OverlayClicked)}))}},{key:\"addSearch\",value:function(e){var t=this;this.search=new d.default({items:this.items,placeholder:this.filterLabel,onSearch:function(e){var n=[];t.items.forEach((function(o,r){var i=t.nodes.items.children[r];e.includes(o)?(n.push(i),i.classList.remove(a.CSS.itemHidden)):i.classList.add(a.CSS.itemHidden)})),t.nodes.nothingFound.classList.toggle(a.CSS.noFoundMessageShown,0===n.length);var o=e.length===t.items.length,r=o?t.flippableElements:n;t.customContent&&t.customContent.classList.toggle(a.CSS.customContentHidden,!o),t.flipper.isActivated&&(t.reactivateFlipper(r),t.flipper.focusFirst())}});var n=this.search.getElement();e.appendChild(n)}},{key:\"createItem\",value:function(e){var t=c.default.make(\"div\",a.CSS.item);e.name&&(t.dataset.itemName=e.name);var n=c.default.make(\"div\",a.CSS.itemLabel,{innerHTML:e.title||\"\"});return t.appendChild(c.default.make(\"div\",a.CSS.itemIcon,{innerHTML:e.icon||g.IconDotCircle})),t.appendChild(n),e.secondaryLabel&&t.appendChild(c.default.make(\"div\",a.CSS.itemSecondaryLabel,{textContent:e.secondaryLabel})),e.isActive&&t.classList.add(a.CSS.itemActive),e.isDisabled&&t.classList.add(a.CSS.itemDisabled),t}},{key:\"itemClicked\",value:function(e,t){var n=this,o=Array.from(this.nodes.items.children),r=o.indexOf(e),i=this.items[r];i.isDisabled||(o.filter((function(t){return t!==e})).forEach((function(e){n.cleanUpConfirmationStateForItem(e)})),i.confirmation?this.enableConfirmationStateForItem(i,e,r):(i.onActivate(i,t),this.toggleIfNeeded(r,o),i.closeOnActivate&&this.hide()))}},{key:\"toggleIfNeeded\",value:function(e,t){var n=this,o=this.items[e];if(!0===o.toggle)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);if(\"string\"==typeof o.toggle){var r=this.items.filter((function(e){return e.toggle===o.toggle}));if(1===r.length)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);r.forEach((function(e){var r=n.items.indexOf(e),i=e===o;e.isActive=i,t[r].classList.toggle(a.CSS.itemActive,i)}))}}},{key:\"enableConfirmationStateForItem\",value:function(e,n,o){var r;void 0===this.itemsRequiringConfirmation[o]&&(this.itemsRequiringConfirmation[o]=e);var i=Object.assign(Object.assign(Object.assign({},e),e.confirmation),{confirmation:e.confirmation.confirmation});this.items[o]=i;var s=this.createItem(i);(r=s.classList).add.apply(r,[a.CSS.itemConfirmation].concat((0,t.default)(Array.from(n.classList)))),n.parentElement.replaceChild(s,n),this.enableSpecialHoverAndFocusBehavior(s),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(s))}},{key:\"cleanUpConfirmationStateForItem\",value:function(e){var t=Array.from(this.nodes.items.children).indexOf(e),n=this.itemsRequiringConfirmation[t];if(void 0!==n){var o=this.createItem(n);e.parentElement.replaceChild(o,e),this.items[t]=n,delete this.itemsRequiringConfirmation[t],e.removeEventListener(\"mouseleave\",this.removeSpecialHoverBehavior),this.disableSpecialHoverAndFocusBehavior(),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(o))}}},{key:\"enableSpecialHoverAndFocusBehavior\",value:function(e){e.classList.add(a.CSS.itemNoHover),e.classList.add(a.CSS.itemNoFocus),e.addEventListener(\"mouseleave\",this.removeSpecialHoverBehavior,{once:!0}),this.flipper.onFlip(this.onFlip)}},{key:\"disableSpecialHoverAndFocusBehavior\",value:function(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.flipper.removeOnFlip(this.onFlip)}},{key:\"removeSpecialFocusBehavior\",value:function(){var e=this.nodes.items.querySelector(\".\".concat(a.CSS.itemNoFocus));e&&e.classList.remove(a.CSS.itemNoFocus)}},{key:\"reactivateFlipper\",value:function(e,t){this.flipper.deactivate(),this.flipper.activate(e,t)}},{key:\"enableFlipper\",value:function(){this.flipper=new f.default({items:this.flippableElements,focusedItemClass:a.CSS.itemFocused,allowedKeys:[h.keyCodes.TAB,h.keyCodes.UP,h.keyCodes.DOWN,h.keyCodes.ENTER]})}},{key:\"flippableElements\",get:function(){var e=Array.from(this.nodes.wrapper.querySelectorAll(\".\".concat(a.CSS.item)));return(this.customContentFlippableItems||[]).concat(e)}},{key:\"shouldOpenPopoverBottom\",get:function(){var e=this.nodes.wrapper.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),n=this.calculateHeight(),o=e.top+n,r=e.top-n,i=Math.min(window.innerHeight,t.bottom);return r0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var o=n(33),r=n(39);e.exports=function(e){return function(t,n){var i,a,s=String(r(t)),l=o(n),c=s.length;return l<0||l>=c?e?\"\":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){\"use strict\";var o=n(46),r=n(0),i=n(23),a=n(27),s=n(57),l=n(131),c=n(55),u=n(51),f=n(14)(\"iterator\"),d=!([].keys&&\"next\"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,v,g,y){l(n,t,h);var k,b,m,w=function(e){if(!d&&e in T)return T[e];switch(e){case\"keys\":case\"values\":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+\" Iterator\",C=\"values\"==v,S=!1,T=e.prototype,E=T[f]||T[\"@@iterator\"]||v&&T[v],B=E||w(v),M=v?C?w(\"entries\"):B:void 0,_=\"Array\"==t&&T.entries||E;if(_&&(m=u(_.call(new e)))!==Object.prototype&&m.next&&(c(m,x,!0),o||\"function\"==typeof m[f]||a(m,f,p)),C&&E&&\"values\"!==E.name&&(S=!0,B=function(){return E.call(this)}),o&&!y||!d&&!S&&T[f]||a(T,f,B),s[t]=B,s[x]=p,v)if(k={values:C?B:w(\"values\"),keys:g?B:w(\"keys\"),entries:M},y)for(b in k)b in T||i(T,b,k[b]);else r(r.P+r.F*(d||S),t,k);return k}},function(e,t,n){var o=n(100),r=n(39);e.exports=function(e,t,n){if(o(t))throw TypeError(\"String#\"+n+\" doesn't accept regex!\");return String(r(e))}},function(e,t,n){var o=n(13),r=n(38),i=n(14)(\"match\");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:\"RegExp\"==r(e))}},function(e,t,n){var o=n(14)(\"match\");e.exports=function(e){var t=/./;try{\"/./\"[e](t)}catch(n){try{return t[o]=!1,!\"/./\"[e](t)}catch(e){}}return!0}},function(e,t,n){var o=n(57),r=n(14)(\"iterator\"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){\"use strict\";var o=n(18),r=n(44);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){var o=n(64),r=n(14)(\"iterator\"),i=n(57);e.exports=n(16).getIteratorMethod=function(e){if(null!=e)return e[r]||e[\"@@iterator\"]||i[o(e)]}},function(e,t,n){\"use strict\";var o=n(22),r=n(48),i=n(15);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>s;)t[s++]=e;return t}},function(e,t,n){\"use strict\";var o=n(52),r=n(136),i=n(57),a=n(28);e.exports=n(98)(Array,\"Array\",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,\"keys\"==t?n:\"values\"==t?e[n]:[n,e[n]])}),\"values\"),i.Arguments=i.Array,o(\"keys\"),o(\"values\"),o(\"entries\")},function(e,t,n){\"use strict\";var o,r,i=n(75),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,r=/b*/g,a.call(o,\"a\"),a.call(r,\"a\"),0!==o.lastIndex||0!==r.lastIndex),u=void 0!==/()??/.exec(\"\")[1];(c||u)&&(l=function(e){var t,n,o,r,l=this;return u&&(n=new RegExp(\"^\"+l.source+\"$(?!\\\\s)\",i.call(l))),c&&(t=l.lastIndex),o=a.call(l,e),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:t),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(r=1;rn;)t.push(arguments[n++]);return y[++g]=function(){s(\"function\"==typeof e?e:Function(e),t)},o(g),g},p=function(e){delete y[e]},\"process\"==n(38)(f)?o=function(e){f.nextTick(a(k,e,1))}:v&&v.now?o=function(e){v.now(a(k,e,1))}:h?(i=(r=new h).port2,r.port1.onmessage=b,o=a(i.postMessage,i,1)):u.addEventListener&&\"function\"==typeof postMessage&&!u.importScripts?(o=function(e){u.postMessage(e+\"\",\"*\")},u.addEventListener(\"message\",b,!1)):o=\"onreadystatechange\"in c(\"script\")?function(e){l.appendChild(c(\"script\")).onreadystatechange=function(){l.removeChild(this),k.call(e)}}:function(e){setTimeout(a(k,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){\"use strict\";var o=n(10),r=n(17),i=n(46),a=n(81),s=n(27),l=n(60),c=n(11),u=n(59),f=n(33),d=n(15),p=n(144),h=n(50).f,v=n(18).f,g=n(105),y=n(55),k=o.ArrayBuffer,b=o.DataView,m=o.Math,w=o.RangeError,x=o.Infinity,C=k,S=m.abs,T=m.pow,E=m.floor,B=m.log,M=m.LN2,_=r?\"_b\":\"buffer\",O=r?\"_l\":\"byteLength\",I=r?\"_o\":\"byteOffset\";function L(e,t,n){var o,r,i,a=new Array(n),s=8*n-t-1,l=(1<>1,u=23===t?T(2,-24)-T(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for((e=S(e))!=e||e===x?(r=e!=e?1:0,o=l):(o=E(B(e)/M),e*(i=T(2,-o))<1&&(o--,i*=2),(e+=o+c>=1?u/i:u*T(2,1-c))*i>=2&&(o++,i/=2),o+c>=l?(r=0,o=l):o+c>=1?(r=(e*i-1)*T(2,t),o+=c):(r=e*T(2,c-1)*T(2,t),o=0));t>=8;a[f++]=255&r,r/=256,t-=8);for(o=o<0;a[f++]=255&o,o/=256,s-=8);return a[--f]|=128*d,a}function P(e,t,n){var o,r=8*n-t-1,i=(1<>1,s=r-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;u=256*u+e[l],l--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=t;s>0;o=256*o+e[l],l--,s-=8);if(0===u)u=1-a;else{if(u===i)return o?NaN:c?-x:x;o+=T(2,t),u-=a}return(c?-1:1)*o*T(2,u-t)}function j(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function R(e){return[255&e]}function A(e){return[255&e,e>>8&255]}function N(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function D(e){return L(e,52,8)}function F(e){return L(e,23,4)}function H(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function W(e,t,n,o){var r=p(+n);if(r+t>e[O])throw w(\"Wrong index!\");var i=e[_]._b,a=r+e[I],s=i.slice(a,a+t);return o?s:s.reverse()}function U(e,t,n,o,r,i){var a=p(+n);if(a+t>e[O])throw w(\"Wrong index!\");for(var s=e[_]._b,l=a+e[I],c=o(+r),u=0;uX;)(z=Y[X++])in k||s(k,z,C[z]);i||(V.constructor=k)}var G=new b(new k(2)),K=b.prototype.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||l(b.prototype,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},!0)}else k=function(e){u(this,k,\"ArrayBuffer\");var t=p(e);this._b=g.call(new Array(t),0),this[O]=t},b=function(e,t,n){u(this,b,\"DataView\"),u(e,k,\"DataView\");var o=e[O],r=f(t);if(r<0||r>o)throw w(\"Wrong offset!\");if(r+(n=void 0===n?o-r:d(n))>o)throw w(\"Wrong length!\");this[_]=e,this[I]=r,this[O]=n},r&&(H(k,\"byteLength\",\"_l\"),H(b,\"buffer\",\"_b\"),H(b,\"byteLength\",\"_l\"),H(b,\"byteOffset\",\"_o\")),l(b.prototype,{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return j(W(this,4,e,arguments[1]))},getUint32:function(e){return j(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return P(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return P(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){U(this,1,e,R,t)},setUint8:function(e,t){U(this,1,e,R,t)},setInt16:function(e,t){U(this,2,e,A,t,arguments[2])},setUint16:function(e,t){U(this,2,e,A,t,arguments[2])},setInt32:function(e,t){U(this,4,e,N,t,arguments[2])},setUint32:function(e,t){U(this,4,e,N,t,arguments[2])},setFloat32:function(e,t){U(this,4,e,F,t,arguments[2])},setFloat64:function(e,t){U(this,8,e,D,t,arguments[2])}});y(k,\"ArrayBuffer\"),y(b,\"DataView\"),s(b.prototype,a.VIEW,!0),t.ArrayBuffer=k,t.DataView=b},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s){\"use strict\";var l=n(1);function c(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=l(r),i=l(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s);var u=function(){function e(){(0,r.default)(this,e),this.allListeners=[]}return(0,i.default)(e,[{key:\"on\",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=s.generateId(\"l\"),i={id:r,element:e,eventType:t,handler:n,options:o},a=this.findOne(e,t,n);if(!a)return this.allListeners.push(i),e.addEventListener(t,n,o),r}},{key:\"off\",value:function(e,t,n,o){var r=this,i=this.findAll(e,t,n);i.forEach((function(e,t){var n=r.allListeners.indexOf(i[t]);n>-1&&(r.allListeners.splice(n,1),e.element.removeEventListener(e.eventType,e.handler,e.options))}))}},{key:\"offById\",value:function(e){var t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}},{key:\"findOne\",value:function(e,t,n){var o=this.findAll(e,t,n);return o.length>0?o[0]:null}},{key:\"findAll\",value:function(e,t,n){var o=e?this.findByEventTarget(e):[];return e&&t&&n?o.filter((function(e){return e.eventType===t&&e.handler===n})):e&&t?o.filter((function(e){return e.eventType===t})):o}},{key:\"removeAll\",value:function(){this.allListeners.map((function(e){e.element.removeEventListener(e.eventType,e.handler,e.options)})),this.allListeners=[]}},{key:\"destroy\",value:function(){this.removeAll()}},{key:\"findByEventTarget\",value:function(e){return this.allListeners.filter((function(t){if(t.element===e)return t}))}},{key:\"findByType\",value:function(e){return this.allListeners.filter((function(t){if(t.eventType===e)return t}))}},{key:\"findByHandler\",value:function(e){return this.allListeners.filter((function(t){if(t.handler===e)return t}))}},{key:\"findById\",value:function(e){return this.allListeners.find((function(t){return t.id===e}))}}]),e}();o.default=u,u.displayName=\"Listeners\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t],void 0===(i=\"function\"==typeof(o=function(n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0}),n.default=void 0;var o=function(e){var t={get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(t){e.stretched=t},get stretched(){return e.stretched},call:function(t,n){return e.call(t,n)},save:function(){return e.save()},validate:function(t){return e.validate(t)},dispatchChange:function(){e.dispatchChange()}};Object.setPrototypeOf(this,t)};n.default=o,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(377);function r(){return\"undefined\"!=typeof Reflect&&Reflect.get?(e.exports=r=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=r=function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(381)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e),this.lib=new a.default}return(0,i.default)(e,[{key:\"destroy\",value:function(){this.lib.destroy()}},{key:\"show\",value:function(e,t,n){this.lib.show(e,t,n)}},{key:\"hide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.lib.hide(e)}},{key:\"onHover\",value:function(e,t,n){this.lib.onHover(e,t,n)}}]),e}();o.default=l,l.displayName=\"Tooltip\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(41),n(2),n(3),n(385)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s){\"use strict\";var l=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=l(r),i=l(i),a=l(a),s=l(s);var c=function(){function e(){(0,i.default)(this,e),this.registeredShortcuts=new Map}return(0,a.default)(e,[{key:\"add\",value:function(e){if(this.findShortcut(e.on,e.name))throw Error(\"Shortcut \".concat(e.name,\" is already registered for \").concat(e.on,\". Please remove it before add a new handler.\"));var t=new s.default({name:e.name,on:e.on,callback:e.handler}),n=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[].concat((0,r.default)(n),[t]))}},{key:\"remove\",value:function(e,t){var n=this.findShortcut(e,t);if(n){n.remove();var o=this.registeredShortcuts.get(e);this.registeredShortcuts.set(e,o.filter((function(e){return e!==n})))}}},{key:\"findShortcut\",value:function(e,t){return(this.registeredShortcuts.get(e)||[]).find((function(e){return e.name===t}))}}]),e}();c.displayName=\"Shortcuts\";var u=new c;o.default=u,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){e.exports=!n(17)&&!n(11)((function(){return 7!=Object.defineProperty(n(86)(\"div\"),\"a\",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(10),r=n(16),i=n(46),a=n(87),s=n(18).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});\"_\"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var o=n(26),r=n(28),i=n(71)(!1),a=n(88)(\"IE_PROTO\");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var o=n(18),r=n(12),i=n(47);e.exports=n(17)?Object.defineProperties:function(e,t){r(e);for(var n,a=i(t),s=a.length,l=0;s>l;)o.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var o=n(28),r=n(50).f,i={}.toString,a=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&\"[object Window]\"==i.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(o(e))}},function(e,t,n){\"use strict\";var o=n(17),r=n(47),i=n(72),a=n(63),s=n(22),l=n(62),c=Object.assign;e.exports=!c||n(11)((function(){var e={},t={},n=Symbol(),o=\"abcdefghijklmnopqrst\";return e[n]=7,o.split(\"\").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join(\"\")!=o}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,f=i.f,d=a.f;c>u;)for(var p,h=l(arguments[u++]),v=f?r(h).concat(f(h)):r(h),g=v.length,y=0;g>y;)p=v[y++],o&&!d.call(h,p)||(n[p]=h[p]);return n}:c},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){\"use strict\";var o=n(32),r=n(13),i=n(125),a=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var o=[],r=0;r>>0||(a.test(n)?16:10))}:o},function(e,t,n){var o=n(10).parseFloat,r=n(56).trim;e.exports=1/o(n(92)+\"-0\")!=-1/0?function(e){var t=r(String(e),3),n=o(t);return 0===n&&\"-\"==t.charAt(0)?-0:n}:o},function(e,t,n){var o=n(38);e.exports=function(e,t){if(\"number\"!=typeof e&&\"Number\"!=o(e))throw TypeError(t);return+e}},function(e,t,n){var o=n(13),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){\"use strict\";var o=n(49),r=n(44),i=n(55),a={};n(27)(a,n(14)(\"iterator\"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(a,{next:r(1,n)}),i(e,t+\" Iterator\")}},function(e,t,n){var o=n(12);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(282);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(32),r=n(22),i=n(62),a=n(15);e.exports=function(e,t,n,s,l){o(t);var c=r(e),u=i(c),f=a(c.length),d=l?f-1:0,p=l?-1:1;if(n<2)for(;;){if(d in u){s=u[d],d+=p;break}if(d+=p,l?d<0:f<=d)throw TypeError(\"Reduce of empty array with no initial value\")}for(;l?d>=0:f>d;d+=p)d in u&&(s=t(s,u[d],d,c));return s}},function(e,t,n){\"use strict\";var o=n(22),r=n(48),i=n(15);e.exports=[].copyWithin||function(e,t){var n=o(this),a=i(n.length),s=r(e,a),l=r(t,a),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?a:r(c,a))-l,a-s),f=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=f,l+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){\"use strict\";var o=n(107);n(0)({target:\"RegExp\",proto:!0,forced:o!==/./.exec},{exec:o})},function(e,t,n){n(17)&&\"g\"!=/./g.flags&&n(18).f(RegExp.prototype,\"flags\",{configurable:!0,get:n(75)})},function(e,t,n){\"use strict\";var o,r,i,a,s=n(46),l=n(10),c=n(31),u=n(64),f=n(0),d=n(13),p=n(32),h=n(59),v=n(78),g=n(65),y=n(109).set,k=n(302)(),b=n(140),m=n(303),w=n(79),x=n(141),C=l.TypeError,S=l.process,T=S&&S.versions,E=T&&T.v8||\"\",B=l.Promise,M=\"process\"==u(S),_=function(){},O=r=b.f,I=!!function(){try{var e=B.resolve(1),t=(e.constructor={})[n(14)(\"species\")]=function(e){e(_,_)};return(M||\"function\"==typeof PromiseRejectionEvent)&&e.then(_)instanceof t&&0!==E.indexOf(\"6.6\")&&-1===w.indexOf(\"Chrome/66\")}catch(e){}}(),L=function(e){var t;return!(!d(e)||\"function\"!=typeof(t=e.then))&&t},P=function(e,t){if(!e._n){e._n=!0;var n=e._c;k((function(){for(var o=e._v,r=1==e._s,i=0,a=function(t){var n,i,a,s=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(r||(2==e._h&&A(e),e._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===t.promise?c(C(\"Promise-chain cycle\")):(i=L(n))?i.call(n,l,c):l(n)):c(o)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&j(e)}))}},j=function(e){y.call(l,(function(){var t,n,o,r=e._v,i=R(e);if(i&&(t=m((function(){M?S.emit(\"unhandledRejection\",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error(\"Unhandled promise rejection\",r)})),e._h=M||R(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){y.call(l,(function(){var t;M?S.emit(\"rejectionHandled\",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),P(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw C(\"Promise can't be resolved itself\");(t=L(e))?k((function(){var o={_w:n,_d:!1};try{t.call(e,c(D,o,1),c(N,o,1))}catch(e){N.call(o,e)}})):(n._v=e,n._s=1,P(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};I||(B=function(e){h(this,B,\"Promise\",\"_h\"),p(e),o.call(this);try{e(c(D,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(60)(B.prototype,{then:function(e,t){var n=O(g(this,B));return n.ok=\"function\"!=typeof e||e,n.fail=\"function\"==typeof t&&t,n.domain=M?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=c(D,e,1),this.reject=c(N,e,1)},b.f=O=function(e){return e===B||e===a?new i(e):r(e)}),f(f.G+f.W+f.F*!I,{Promise:B}),n(55)(B,\"Promise\"),n(58)(\"Promise\"),a=n(16).Promise,f(f.S+f.F*!I,\"Promise\",{reject:function(e){var t=O(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!I),\"Promise\",{resolve:function(e){return x(s&&this===a?B:this,e)}}),f(f.S+f.F*!(I&&n(74)((function(e){B.all(e).catch(_)}))),\"Promise\",{all:function(e){var t=this,n=O(t),o=n.resolve,r=n.reject,i=m((function(){var n=[],i=0,a=1;v(e,!1,(function(e){var s=i++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||o(n))}),r)})),--a||o(n)}));return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=O(t),o=n.reject,r=m((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){\"use strict\";var o=n(32);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError(\"Bad Promise constructor\");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){var o=n(12),r=n(13),i=n(140);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){\"use strict\";var o=n(18).f,r=n(49),i=n(60),a=n(31),s=n(59),l=n(78),c=n(98),u=n(136),f=n(58),d=n(17),p=n(43).fastKey,h=n(53),v=d?\"_s\":\"size\",g=function(e,t){var n,o=p(t);if(\"F\"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,o){s(e,u,t,\"_i\"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[v]=0,null!=o&&l(o,n,e[c],e)}));return i(u.prototype,{clear:function(){for(var e=h(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=h(this,t),o=g(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[v]--}return!!o},forEach:function(e){h(this,t);for(var n,o=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(h(this,t),e)}}),d&&o(u.prototype,\"size\",{get:function(){return h(this,t)[v]}}),u},def:function(e,t,n){var o,r,i=g(e,t);return i?i.v=n:(e._l=i={i:r=p(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[v]++,\"F\"!==r&&(e._i[r]=i)),e},getEntry:g,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?u(0,\"keys\"==e?t.k:\"values\"==e?t.v:[t.k,t.v]):(this._t=void 0,u(1))}),n?\"entries\":\"values\",!n,!0),f(t)}}},function(e,t,n){\"use strict\";var o=n(60),r=n(43).getWeak,i=n(12),a=n(13),s=n(59),l=n(78),c=n(36),u=n(26),f=n(53),d=c(5),p=c(6),h=0,v=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},y=function(e,t){return d(e.a,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var c=e((function(e,o){s(e,c,t,\"_i\"),e._t=t,e._i=h++,e._l=void 0,null!=o&&l(o,n,e[i],e)}));return o(c.prototype,{delete:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).delete(e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).has(e):n&&u(n,this._i)}}),c},def:function(e,t,n){var o=r(i(t),!0);return!0===o?v(e).set(t,n):o[e._i]=n,e},ufstore:v}},function(e,t,n){var o=n(33),r=n(15);e.exports=function(e){if(void 0===e)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError(\"Wrong length!\");return n}},function(e,t,n){var o=n(50),r=n(72),i=n(12),a=n(10).Reflect;e.exports=a&&a.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t,n){var o=n(15),r=n(94),i=n(39);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,c=void 0===n?\" \":String(n),u=o(t);if(u<=l||\"\"==c)return s;var f=u-l,d=r.call(c,Math.ceil(f/c.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(e,t,n){var o=n(17),r=n(47),i=n(28),a=n(63).f;e.exports=function(e){return function(t){for(var n,s=i(t),l=r(s),c=l.length,u=0,f=[];c>u;)n=l[u++],o&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}}},function(e,t,n){var o=n(149);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:e.config.defaultBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=e.Editor.BlockManager.insert({id:a,tool:t,data:n,index:o,needToFocus:r,replace:i});return new p.default(s)},e.composeBlockData=function(){var t=(0,i.default)(r.default.mark((function t(n){var o,i;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.Editor.Tools.blockTools.get(n),i=new v.default({tool:o,api:e.Editor.API,readOnly:!0,data:{},tunesData:{}}),t.abrupt(\"return\",i.data);case 3:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.update=function(t,n){var o=e.Editor.BlockManager,r=o.getBlockById(t);if(r){var i=o.getBlockIndex(r);o.insert({id:r.id,tool:r.name,data:n,index:i,replace:!0,tunes:r.tunes})}else d.log(\"blocks.update(): Block with passed id was not found\",\"warn\")},e}return(0,l.default)(n,[{key:\"methods\",get:function(){var e=this;return{clear:function(){return e.clear()},render:function(t){return e.render(t)},renderFromHTML:function(t){return e.renderFromHTML(t)},delete:function(t){return e.delete(t)},swap:function(t,n){return e.swap(t,n)},move:function(t,n){return e.move(t,n)},getBlockByIndex:function(t){return e.getBlockByIndex(t)},getById:function(t){return e.getById(t)},getCurrentBlockIndex:function(){return e.getCurrentBlockIndex()},getBlockIndex:function(t){return e.getBlockIndex(t)},getBlocksCount:function(){return e.getBlocksCount()},stretchBlock:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.stretchBlock(t,n)},insertNewBlock:function(){return e.insertNewBlock()},insert:this.insert,update:this.update,composeBlockData:this.composeBlockData}}},{key:\"getBlocksCount\",value:function(){return this.Editor.BlockManager.blocks.length}},{key:\"getCurrentBlockIndex\",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:\"getBlockIndex\",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);if(t)return this.Editor.BlockManager.getBlockIndex(t);d.logLabeled(\"There is no block with id `\"+e+\"`\",\"warn\")}},{key:\"getBlockByIndex\",value:function(e){var t=this.Editor.BlockManager.getBlockByIndex(e);if(void 0!==t)return new p.default(t);d.logLabeled(\"There is no block at index `\"+e+\"`\",\"warn\")}},{key:\"getById\",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);return void 0===t?(d.logLabeled(\"There is no block with id `\"+e+\"`\",\"warn\"),null):new p.default(t)}},{key:\"swap\",value:function(e,t){d.log(\"`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead\",\"info\"),this.Editor.BlockManager.swap(e,t)}},{key:\"move\",value:function(e,t){this.Editor.BlockManager.move(e,t)}},{key:\"delete\",value:function(e){try{this.Editor.BlockManager.removeBlock(e)}catch(e){return void d.logLabeled(e,\"warn\")}0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}},{key:\"clear\",value:function(){this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}},{key:\"render\",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(e.blocks)}},{key:\"renderFromHTML\",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}},{key:\"stretchBlock\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.deprecationAssert(!0,\"blocks.stretchBlock()\",\"BlockAPI\");var n=this.Editor.BlockManager.getBlockByIndex(e);n&&(n.stretched=t)}},{key:\"insertNewBlock\",value:function(){d.log(\"Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.\",\"warn\"),this.insert()}}]),n}(h.default);o.default=b,b.displayName=\"BlocksAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).setToFirstBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.firstBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.firstBlock,t,n),!0)},e.setToLastBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.lastBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.lastBlock,t,n),!0)},e.setToPreviousBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.previousBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.previousBlock,t,n),!0)},e.setToNextBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.nextBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.nextBlock,t,n),!0)},e.setToBlock=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!e.Editor.BlockManager.blocks[t]&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.blocks[t],n,o),!0)},e.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?e.setToLastBlock(e.Editor.Caret.positions.END):e.setToFirstBlock(e.Editor.Caret.positions.START)},e}return(0,i.default)(n,[{key:\"methods\",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"CaretAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{emit:function(t,n){return e.emit(t,n)},off:function(t,n){return e.off(t,n)},on:function(t,n){return e.on(t,n)}}}},{key:\"on\",value:function(e,t){this.eventsDispatcher.on(e,t)}},{key:\"emit\",value:function(e,t){this.eventsDispatcher.emit(e,t)}},{key:\"off\",value:function(e,t){this.eventsDispatcher.off(e,t)}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"EventsAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(54),n(8),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u,f){\"use strict\";var d=n(1);function p(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),l=d(l),c=d(c);var h=function(e){(0,a.default)(n,e);var t=p(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){return{t:function(){(0,u.logLabeled)(\"I18n.t() method can be accessed only from Tools\",\"warn\")}}}},{key:\"getMethodsForTool\",value:function(e){return Object.assign(this.methods,{t:function(t){return c.default.t(n.getNamespace(e),t)}})}}],[{key:\"getNamespace\",value:function(e){return e.isTune()?\"blockTunes.\".concat(e.name):\"tools.\".concat(e.name)}}]),n}((f=d(f)).default);o.default=h,h.displayName=\"I18nAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()}}}},{key:\"open\",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:\"close\",value:function(){this.Editor.InlineToolbar.close()}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"InlineToolbarAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{on:function(t,n,o,r){return e.on(t,n,o,r)},off:function(t,n,o,r){return e.off(t,n,o,r)},offById:function(t){return e.offById(t)}}}},{key:\"on\",value:function(e,t,n,o){return this.listeners.on(e,t,n,o)}},{key:\"off\",value:function(e,t,n,o){this.listeners.off(e,t,n,o)}},{key:\"offById\",value:function(e){this.listeners.offById(e)}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"ListenersAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(378),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u){\"use strict\";var f=n(1);function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).notifier=new c.default,o}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{show:function(t){return e.show(t)}}}},{key:\"show\",value:function(e){return this.notifier.show(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName=\"NotifierAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{toggle:function(t){return e.toggle(t)},get isEnabled(){return e.isEnabled}}}},{key:\"toggle\",value:function(e){return this.Editor.ReadOnly.toggle(e)}},{key:\"isEnabled\",get:function(){return this.Editor.ReadOnly.isEnabled}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"ReadOnlyAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(66)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u){\"use strict\";var f=n(1);function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{clean:function(t,n){return e.clean(t,n)}}}},{key:\"clean\",value:function(e,t){return(0,u.clean)(e,t)}}]),n}((c=f(c)).default);o.default=p,p.displayName=\"SanitizerAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(8),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f){\"use strict\";var d=n(1);function p(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{save:function(){return e.save()}}}},{key:\"save\",value:function(){var e=\"Editor's content can not be saved in read-only mode\";return this.Editor.ReadOnly.isEnabled?(u.logLabeled(e,\"warn\"),Promise.reject(new Error(e))):this.Editor.Saver.save()}}]),n}((f=d(f)).default);o.default=v,v.displayName=\"SaverAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u){\"use strict\";var f=n(1);function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{findParentTag:function(t,n){return e.findParentTag(t,n)},expandToTag:function(t){return e.expandToTag(t)}}}},{key:\"findParentTag\",value:function(e,t){return(new c.default).findParentTag(e,t)}},{key:\"expandToTag\",value:function(e){(new c.default).expandToTag(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName=\"SelectionAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"classes\",get:function(){return{block:\"cdx-block\",inlineToolButton:\"ce-inline-tool\",inlineToolButtonActive:\"ce-inline-tool--active\",input:\"cdx-input\",loader:\"cdx-loader\",button:\"cdx-button\",settingsButton:\"cdx-settings-button\",settingsButtonActive:\"cdx-settings-button--active\"}}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"StylesAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f){\"use strict\";var d=n(1);function p(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()},toggleBlockSettings:function(t){return e.toggleBlockSettings(t)}}}},{key:\"open\",value:function(){this.Editor.Toolbar.moveAndOpen()}},{key:\"close\",value:function(){this.Editor.Toolbar.close()}},{key:\"toggleBlockSettings\",value:function(e){-1!==this.Editor.BlockManager.currentBlockIndex?(null!=e?e:!this.Editor.BlockSettings.opened)?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close():f.logLabeled(\"Could't toggle the Toolbar because there is no block selected \",\"warn\")}}]),n}(u.default);o.default=v,v.displayName=\"ToolbarAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(115)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u){\"use strict\";var f=n(1);function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c),u=f(u);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).tooltip=new u.default,o}return(0,i.default)(n,[{key:\"destroy\",value:function(){this.tooltip.destroy()}},{key:\"methods\",get:function(){var e=this;return{show:function(t,n,o){return e.show(t,n,o)},hide:function(){return e.hide()},onHover:function(t,n,o){return e.onHover(t,n,o)}}}},{key:\"show\",value:function(e,t,n){this.tooltip.show(e,t,n)}},{key:\"hide\",value:function(){this.tooltip.hide()}},{key:\"onHover\",value:function(e,t,n){this.tooltip.onHover(e,t,n)}}]),n}(c.default);o.default=p,p.displayName=\"TooltipAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);function f(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"methods\",get:function(){return{nodes:this.editorNodes}}},{key:\"editorNodes\",get:function(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}]),n}((c=u(c)).default);o.default=d,d.displayName=\"UiAPI\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(25),n(67)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){\"use strict\";var h=n(1);function v(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function g(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=h(d),p=h(p);var y=function(e){(0,s.default)(n,e);var t=g(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"keydown\",value:function(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case f.keyCodes.BACKSPACE:this.backspace(e);break;case f.keyCodes.ENTER:this.enter(e);break;case f.keyCodes.DOWN:case f.keyCodes.RIGHT:this.arrowRightAndDown(e);break;case f.keyCodes.UP:case f.keyCodes.LEFT:this.arrowLeftAndUp(e);break;case f.keyCodes.TAB:this.tabPressed(e)}}},{key:\"beforeKeydownProcessing\",value:function(e){this.needToolbarClosing(e)&&f.isPrintableKey(e.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(e)))}},{key:\"keyup\",value:function(e){e.shiftKey||this.Editor.UI.checkEmptiness()}},{key:\"tabPressed\",value:function(e){this.Editor.BlockSelection.clearSelection(e);var t=this.Editor,n=t.BlockManager,o=t.InlineToolbar,r=t.ConversionToolbar,i=n.currentBlock;if(i){var a=i.isEmpty,s=i.tool.isDefault&&a,l=!a&&r.opened,c=!a&&!d.default.isCollapsed&&o.opened,u=!l&&!c;s?this.activateToolbox():u&&this.activateBlockSettings()}}},{key:\"dragOver\",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!0}},{key:\"dragLeave\",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!1}},{key:\"handleCommandC\",value:function(e){var t=this.Editor.BlockSelection;t.anyBlockSelected&&t.copySelectedBlocks(e)}},{key:\"handleCommandX\",value:function(e){var t=this.Editor,n=t.BlockSelection,o=t.BlockManager,r=t.Caret;n.anyBlockSelected&&n.copySelectedBlocks(e).then((function(){var t=o.removeSelectedBlocks(),i=o.insertDefaultBlockAtIndex(t,!0);r.setToBlock(i,r.positions.START),n.clearSelection(e)}))}},{key:\"enter\",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.UI;if(!n.currentBlock.tool.isLineBreaksEnabled&&!(o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey)){var r=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):r=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(r),this.Editor.Toolbar.moveAndOpen(r),e.preventDefault()}}},{key:\"backspace\",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.currentBlock,a=i.tool;if(i.selected||i.isEmpty&&i.currentInput===i.firstInput){e.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),r.setToBlock(n.currentBlock,s?r.positions.END:r.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(e)}if(!a.isLineBreaksEnabled||r.isAtStart){var l=0===n.currentBlockIndex;r.isAtStart&&d.default.isCollapsed&&i.currentInput===i.firstInput&&!l&&(e.preventDefault(),this.mergeBlocks())}}},{key:\"mergeBlocks\",value:function(){var e=this.Editor,t=e.BlockManager,n=e.Caret,o=e.Toolbar,r=t.previousBlock,i=t.currentBlock;if(i.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(t.removeBlock(t.currentBlockIndex-1),n.setToBlock(t.currentBlock),void o.close()):void(n.navigatePrevious()&&o.close());n.createShadow(r.pluginsContent),t.mergeBlocks(r,i).then((function(){n.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),o.close()}))}},{key:\"arrowRightAndDown\",value:function(e){var t=this,n=p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB);if(!this.Editor.UI.someToolbarOpened||!n){this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var o=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.DOWN&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((e.keyCode===f.keyCodes.DOWN||e.keyCode===f.keyCodes.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}}},{key:\"arrowLeftAndUp\",value:function(e){var t=this;if(this.Editor.UI.someToolbarOpened){if(p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var n=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((e.keyCode===f.keyCodes.UP||e.keyCode===f.keyCodes.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}},{key:\"needToolbarClosing\",value:function(e){var t=e.keyCode===f.keyCodes.ENTER&&this.Editor.Toolbar.toolbox.opened,n=e.keyCode===f.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=e.keyCode===f.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,r=e.keyCode===f.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,i=e.keyCode===f.keyCodes.TAB;return!(e.shiftKey||i||t||n||o||r)}},{key:\"activateToolbox\",value:function(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}},{key:\"activateBlockSettings\",value:function(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.moveAndOpen()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}]),n}(u.default);o.default=y,y.displayName=\"BlockEvents\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(61),n(9),n(19),n(8),n(383),n(113),n(384)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y,k){\"use strict\";var b=n(1);function m(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function x(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=b(r),i=b(i),s=b(s),l=b(l),c=b(c),u=b(u),f=b(f),d=w(d),p=b(p),h=b(h),v=w(v),g=b(g),y=b(y);var C=function(e){(0,c.default)(a,e);var t,n,o=x(a);function a(){var e;return(0,s.default)(this,a),(e=o.apply(this,arguments))._currentBlockIndex=-1,e._blocks=null,e}return(0,l.default)(a,[{key:\"currentBlockIndex\",get:function(){return this._currentBlockIndex},set:function(e){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[e]&&this._blocks[e].willSelect(),this._currentBlockIndex=e}},{key:\"firstBlock\",get:function(){return this._blocks[0]}},{key:\"lastBlock\",get:function(){return this._blocks[this._blocks.length-1]}},{key:\"currentBlock\",get:function(){return this._blocks[this.currentBlockIndex]},set:function(e){this.currentBlockIndex=this.getBlockIndex(e)}},{key:\"nextBlock\",get:function(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}},{key:\"nextContentfulBlock\",get:function(){return this.blocks.slice(this.currentBlockIndex+1).find((function(e){return!!e.inputs.length}))}},{key:\"previousContentfulBlock\",get:function(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((function(e){return!!e.inputs.length}))}},{key:\"previousBlock\",get:function(){return 0===this.currentBlockIndex?null:this._blocks[this.currentBlockIndex-1]}},{key:\"blocks\",get:function(){return this._blocks.array}},{key:\"isEditorEmpty\",get:function(){return this.blocks.every((function(e){return e.isEmpty}))}},{key:\"prepare\",value:function(){var e=this,t=new g.default(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(t,{set:g.default.set,get:g.default.get}),this.listeners.on(document,\"copy\",(function(t){return e.Editor.BlockEvents.handleCommandC(t)}))}},{key:\"toggleReadOnly\",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:\"composeBlock\",value:function(e){var t=e.tool,n=e.data,o=void 0===n?{}:n,r=e.id,i=void 0===r?void 0:r,a=e.tunes,s=void 0===a?{}:a,l=this.Editor.ReadOnly.isEnabled,c=this.Editor.Tools.blockTools.get(t),u=new d.default({id:i,data:o,tool:c,api:this.Editor.API,readOnly:l,tunesData:s});return l||this.bindBlockEvents(u),u}},{key:\"insert\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?void 0:t,o=e.tool,r=void 0===o?this.config.defaultBlock:o,i=e.data,a=void 0===i?{}:i,s=e.index,l=e.needToFocus,c=void 0===l||l,u=e.replace,f=void 0!==u&&u,d=e.tunes,p=void 0===d?{}:d,h=s;void 0===h&&(h=this.currentBlockIndex+(f?0:1));var v=this.composeBlock({id:n,tool:r,data:a,tunes:p});return f&&this.blockDidMutated(k.BlockMutationType.Removed,this.getBlockByIndex(h),{index:h}),this._blocks.insert(h,v,f),this.blockDidMutated(k.BlockMutationType.Added,v,{index:h}),c?this.currentBlockIndex=h:h<=this.currentBlockIndex&&this.currentBlockIndex++,v}},{key:\"replace\",value:function(e){var t=e.tool,n=void 0===t?this.config.defaultBlock:t,o=e.data,r=void 0===o?{}:o;return this.insert({tool:n,data:r,index:this.currentBlockIndex,replace:!0})}},{key:\"paste\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.insert({tool:e,replace:n});try{o.call(d.BlockToolAPI.ON_PASTE,t)}catch(t){v.log(\"\".concat(e,\": onPaste callback call is failed\"),\"error\",t)}return o}},{key:\"insertDefaultBlockAtIndex\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=n,this.blockDidMutated(k.BlockMutationType.Added,n,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:\"insertAtEnd\",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:\"mergeBlocks\",value:(n=(0,i.default)(r.default.mark((function e(t,n){var o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this._blocks.indexOf(n),!n.isEmpty){e.next=3;break}return e.abrupt(\"return\");case 3:return e.next=5,n.data;case 5:if(i=e.sent,v.isEmpty(i)){e.next=9;break}return e.next=9,t.mergeWith(i);case 9:this.removeBlock(o),this.currentBlockIndex=this._blocks.indexOf(t);case 11:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:\"removeBlock\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentBlockIndex;if(!this.validateIndex(e))throw new Error(\"Can't find a Block to remove\");var t=this._blocks[e];t.destroy(),this._blocks.remove(e),this.blockDidMutated(k.BlockMutationType.Removed,t,{index:e}),this.currentBlockIndex>=e&&this.currentBlockIndex--,this.blocks.length?0===e&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,this.insert())}},{key:\"removeSelectedBlocks\",value:function(){for(var e,t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(t),e=t);return e}},{key:\"removeAllBlocks\",value:function(){for(var e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:\"split\",value:function(){var e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=h.default.make(\"div\");t.appendChild(e);var n={text:h.default.isEmpty(t)?\"\":t.innerHTML};return this.insert({data:n})}},{key:\"getBlockByIndex\",value:function(e){return-1===e&&(e=this._blocks.length-1),this._blocks[e]}},{key:\"getBlockIndex\",value:function(e){return this._blocks.indexOf(e)}},{key:\"getBlockById\",value:function(e){return this._blocks.array.find((function(t){return t.id===e}))}},{key:\"getBlock\",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=this._blocks.nodes,n=e.closest(\".\".concat(d.default.CSS.wrapper)),o=t.indexOf(n);if(o>=0)return this._blocks[o]}},{key:\"highlightCurrentNode\",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:\"clearFocused\",value:function(){this.blocks.forEach((function(e){e.focused=!1}))}},{key:\"setCurrentBlockByChildNode\",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(\".\".concat(d.default.CSS.wrapper));if(t){var n=t.closest(\".\".concat(this.Editor.UI.CSS.editorWrapper));if(null==n?void 0:n.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}}},{key:\"getBlockByChildNode\",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(\".\".concat(d.default.CSS.wrapper));return this.blocks.find((function(e){return e.holder===t}))}},{key:\"swap\",value:function(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}},{key:\"move\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.currentBlockIndex;isNaN(e)||isNaN(t)?v.log(\"Warning during 'move' call: incorrect indices provided.\",\"warn\"):this.validateIndex(e)&&this.validateIndex(t)?(this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(k.BlockMutationType.Moved,this.currentBlock,{fromIndex:t,toIndex:e})):v.log(\"Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.\",\"warn\")}},{key:\"dropPointer\",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:\"clear\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),e&&this.insert(),this.Editor.UI.checkEmptiness()}},{key:\"destroy\",value:(t=(0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.blocks.map((function(e){return e.destroy()})));case 2:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"bindBlockEvents\",value:function(e){var t=this,n=this.Editor.BlockEvents;this.readOnlyMutableListeners.on(e.holder,\"keydown\",(function(e){n.keydown(e)})),this.readOnlyMutableListeners.on(e.holder,\"keyup\",(function(e){n.keyup(e)})),this.readOnlyMutableListeners.on(e.holder,\"dragover\",(function(e){n.dragOver(e)})),this.readOnlyMutableListeners.on(e.holder,\"dragleave\",(function(e){n.dragLeave(e)})),e.on(\"didMutated\",(function(e){return t.blockDidMutated(k.BlockMutationType.Changed,e,{index:t.getBlockIndex(e)})}))}},{key:\"disableModuleBindings\",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:\"enableModuleBindings\",value:function(){var e=this;this.readOnlyMutableListeners.on(document,\"cut\",(function(t){return e.Editor.BlockEvents.handleCommandX(t)})),this.blocks.forEach((function(t){e.bindBlockEvents(t)}))}},{key:\"validateIndex\",value:function(e){return!(e<0||e>=this._blocks.length)}},{key:\"blockDidMutated\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=new CustomEvent(e,{detail:Object.assign({target:new y.default(t)},n)});return this.Editor.ModificationsObserver.onChange(o),t}}]),a}(p.default);o.default=C,C.displayName=\"BlockManager\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(19),n(116),n(25),n(66)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v){\"use strict\";var g=n(1);function y(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function k(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=g(r),i=g(i),s=g(s),l=g(l),c=g(c),u=g(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=g(d),p=g(p),h=g(h);var b=function(e){(0,s.default)(n,e);var t=k(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).anyBlockSelectedCache=null,e.needToSelectAll=!1,e.nativeInputSelected=!1,e.readyToBlockSelection=!1,e}return(0,i.default)(n,[{key:\"sanitizerConfig\",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:\"allBlocksSelected\",get:function(){return this.Editor.BlockManager.blocks.every((function(e){return!0===e.selected}))},set:function(e){this.Editor.BlockManager.blocks.forEach((function(t){t.selected=e})),this.clearCache()}},{key:\"anyBlockSelected\",get:function(){var e=this.Editor.BlockManager;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=e.blocks.some((function(e){return!0===e.selected}))),this.anyBlockSelectedCache}},{key:\"selectedBlocks\",get:function(){return this.Editor.BlockManager.blocks.filter((function(e){return e.selected}))}},{key:\"prepare\",value:function(){var e=this;this.selection=new h.default,p.default.add({name:\"CMD+A\",handler:function(t){var n=e.Editor,o=n.BlockManager;if(n.ReadOnly.isEnabled)return t.preventDefault(),void e.selectAllBlocks();o.currentBlock&&e.handleCommandA(t)},on:this.Editor.UI.nodes.redactor})}},{key:\"toggleReadOnly\",value:function(){h.default.get().removeAllRanges(),this.allBlocksSelected=!1}},{key:\"unSelectBlockByIndex\",value:function(e){var t=this.Editor.BlockManager;(isNaN(e)?t.currentBlock:t.getBlockByIndex(e)).selected=!1,this.clearCache()}},{key:\"clearSelection\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,r=n.Caret,i=n.RectangleSelection;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;var a=e&&e instanceof KeyboardEvent,s=a&&f.isPrintableKey(e.keyCode);if(this.anyBlockSelected&&a&&s&&!h.default.isSelectionExists){var l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),r.setToBlock(o.currentBlock),f.delay((function(){var t=e.key;r.insertContentAtCaretPosition(t.length>1?\"\":t)}),20)()}this.Editor.CrossBlockSelection.clear(e),this.anyBlockSelected&&!i.isRectActivated()?(t&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:\"copySelectedBlocks\",value:function(e){var t=this;e.preventDefault();var n=d.default.make(\"div\");this.selectedBlocks.forEach((function(e){var o=(0,v.clean)(e.holder.innerHTML,t.sanitizerConfig),r=d.default.make(\"p\");r.innerHTML=o,n.appendChild(r)}));var o=Array.from(n.childNodes).map((function(e){return e.textContent})).join(\"\\n\\n\"),r=n.innerHTML;return e.clipboardData.setData(\"text/plain\",o),e.clipboardData.setData(\"text/html\",r),Promise.all(this.selectedBlocks.map((function(e){return e.save()}))).then((function(n){try{e.clipboardData.setData(t.Editor.Paste.MIME_TYPE,JSON.stringify(n))}catch(e){}}))}},{key:\"selectBlockByIndex\",value:function(e){var t,n=this.Editor.BlockManager;n.clearFocused(),t=isNaN(e)?n.currentBlock:n.getBlockByIndex(e),this.selection.save(),h.default.get().removeAllRanges(),t.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}},{key:\"clearCache\",value:function(){this.anyBlockSelectedCache=null}},{key:\"destroy\",value:function(){p.default.remove(this.Editor.UI.nodes.redactor,\"CMD+A\")}},{key:\"handleCommandA\",value:function(e){if(this.Editor.RectangleSelection.clearSelection(),!d.default.isNativeInput(e.target)||this.readyToBlockSelection){var t=this.Editor.BlockManager.getBlock(e.target).inputs;t.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==t.length||this.needToSelectAll?this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlockByIndex(),this.needToSelectAll=!0):this.needToSelectAll=!0}else this.readyToBlockSelection=!0}},{key:\"selectAllBlocks\",value:function(){this.selection.save(),h.default.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}]),n}(u.default);o.default=b,b.displayName=\"BlockSelection\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9),n(19),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){\"use strict\";var h=n(1);function v(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function g(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f),d=h(d),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(p);var y=function(e){(0,s.default)(n,e);var t=g(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:\"positions\",get:function(){return{START:\"start\",END:\"end\",DEFAULT:\"default\"}}},{key:\"isAtStart\",get:function(){var e=u.default.get(),t=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=e.focusNode;if(d.default.isNativeInput(t))return 0===t.selectionEnd;if(!e.anchorNode)return!1;var o=n.textContent.search(/\\S/);-1===o&&(o=0);var r=e.focusOffset;return n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[r]?(n=n.childNodes[r],r=0):r=(n=n.childNodes[r-1]).textContent.length),!(!d.default.isLineBreakTag(t)&&!d.default.isEmpty(t)||!this.getHigherLevelSiblings(n,\"left\").every((function(e){var t=d.default.isLineBreakTag(e),n=1===e.children.length&&d.default.isLineBreakTag(e.children[0]),o=t||n;return d.default.isEmpty(e)&&!o}))||r!==o)||(null===t||n===t&&r<=o)}},{key:\"isAtEnd\",get:function(){var e=u.default.get(),t=e.focusNode,n=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(d.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!e.focusNode)return!1;var o=e.focusOffset;if(t.nodeType!==Node.TEXT_NODE&&t.childNodes.length&&(t.childNodes[o-1]?o=(t=t.childNodes[o-1]).textContent.length:(t=t.childNodes[0],o=0)),d.default.isLineBreakTag(n)||d.default.isEmpty(n)){var r=this.getHigherLevelSiblings(t,\"right\");if(r.every((function(e,t){return t===r.length-1&&d.default.isLineBreakTag(e)||d.default.isEmpty(e)&&!d.default.isLineBreakTag(e)}))&&o===t.textContent.length)return!0}var i=n.textContent.replace(/\\s+$/,\"\");return t===n&&o>=i.length}},{key:\"setToBlock\",value:function(e){var t,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.Editor.BlockManager;switch(o){case this.positions.START:t=e.firstInput;break;case this.positions.END:t=e.lastInput;break;default:t=e.currentInput}if(t){var a=d.default.getDeepestNode(t,o===this.positions.END),s=d.default.getContentLength(a);switch(!0){case o===this.positions.START:r=0;break;case o===this.positions.END:case r>s:r=s}p.delay((function(){n.set(a,r)}),20)(),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=t}}},{key:\"setToInput\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,r=d.default.getDeepestNode(e);switch(t){case this.positions.START:this.set(r,0);break;case this.positions.END:this.set(r,d.default.getContentLength(r));break;default:n&&this.set(r,n)}o.currentInput=e}},{key:\"set\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=u.default.setCursor(e,t),o=n.top,r=n.bottom,i=window,a=i.innerHeight;o<0&&window.scrollBy(0,o),r>a&&window.scrollBy(0,r-a)}},{key:\"setToTheLastBlock\",value:function(){var e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{var t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}},{key:\"extractFragmentFromCaretPosition\",value:function(){var e=u.default.get();if(e.rangeCount){var t=e.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),n){if(d.default.isNativeInput(n)){var o=n,r=document.createDocumentFragment(),i=o.value.substring(0,o.selectionStart),a=o.value.substring(o.selectionStart);return r.textContent=a,o.value=i,r}var s=t.cloneRange();return s.selectNodeContents(n),s.setStart(t.endContainer,t.endOffset),s.extractContents()}}}},{key:\"navigateNext\",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.nextContentfulBlock,o=t.nextInput,r=this.isAtEnd,i=n;if(!i&&!o){if(t.tool.isDefault||!r)return!1;i=e.insertAtEnd()}return!!r&&(o?this.setToInput(o,this.positions.START):this.setToBlock(i,this.positions.START),!0)}},{key:\"navigatePrevious\",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.previousContentfulBlock;if(!t)return!1;var o=t.previousInput;return!(!n&&!o||!this.isAtStart||(o?this.setToInput(o,this.positions.END):this.setToBlock(n,this.positions.END),0))}},{key:\"createShadow\",value:function(e){var t=document.createElement(\"span\");t.classList.add(n.CSS.shadowCaret),e.insertAdjacentElement(\"beforeend\",t)}},{key:\"restoreCaret\",value:function(e){var t=e.querySelector(\".\".concat(n.CSS.shadowCaret));t&&((new u.default).expandToTag(t),setTimeout((function(){var e=document.createRange();e.selectNode(t),e.extractContents()}),50))}},{key:\"insertContentAtCaretPosition\",value:function(e){var t=document.createDocumentFragment(),n=document.createElement(\"div\"),o=u.default.get(),r=u.default.range;n.innerHTML=e,Array.from(n.childNodes).forEach((function(e){return t.appendChild(e)})),0===t.childNodes.length&&t.appendChild(new Text);var i=t.lastChild;r.deleteContents(),r.insertNode(t);var a=document.createRange();a.setStart(i,i.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:\"getHigherLevelSiblings\",value:function(e,t){for(var n=e,o=[];n.parentNode&&\"true\"!==n.parentNode.contentEditable;)n=n.parentNode;for(var r=\"left\"===t?\"previousSibling\":\"nextSibling\";n[r];)n=n[r],o.push(n);return o}}],[{key:\"CSS\",get:function(){return{shadowCaret:\"cdx-shadow-caret\"}}}]),n}(f.default);o.default=y,y.displayName=\"Caret\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(25),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){\"use strict\";var v=n(1);function g(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=v(r),i=v(i),s=v(s),l=v(l),c=v(c),u=v(u),f=v(f),d=v(d),p=v(p),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(h);var k=function(e){(0,c.default)(o,e);var t,n=y(o);function o(){var e;return(0,s.default)(this,o),(e=n.apply(this,arguments)).onMouseUp=function(){e.listeners.off(document,\"mouseover\",e.onMouseOver),e.listeners.off(document,\"mouseup\",e.onMouseUp)},e.onMouseOver=function(t){var n=e.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.getBlockByChildNode(t.relatedTarget)||e.lastSelectedBlock,a=o.getBlockByChildNode(t.target);if(i&&a&&a!==i){if(i===e.firstSelectedBlock)return p.default.get().removeAllRanges(),i.selected=!0,a.selected=!0,void r.clearCache();if(a===e.firstSelectedBlock)return i.selected=!1,a.selected=!1,void r.clearCache();e.Editor.InlineToolbar.close(),e.toggleBlocksSelectedState(i,a),e.lastSelectedBlock=a}},e}return(0,l.default)(o,[{key:\"prepare\",value:(t=(0,i.default)(r.default.mark((function e(){var t=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.listeners.on(document,\"mousedown\",(function(e){t.enableCrossBlockSelection(e)}));case 1:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"watchSelection\",value:function(e){if(e.button===h.mouseButtons.LEFT){var t=this.Editor.BlockManager;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,\"mouseover\",this.onMouseOver),this.listeners.on(document,\"mouseup\",this.onMouseUp)}}},{key:\"isCrossBlockSelectionStarted\",get:function(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}},{key:\"toggleBlockSelectedState\",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.Editor,n=t.BlockManager,o=t.BlockSelection;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=n.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),p.default.get().removeAllRanges());var r=n.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),i=n.blocks[r];i&&(this.lastSelectedBlock.selected!==i.selected?(i.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=i,this.Editor.InlineToolbar.close(),i.holder.scrollIntoView({block:\"nearest\"}))}},{key:\"clear\",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&i>-1&&a>-1)if(e&&e instanceof KeyboardEvent)switch(e.keyCode){case h.keyCodes.DOWN:case h.keyCodes.RIGHT:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);break;case h.keyCodes.UP:case h.keyCodes.LEFT:r.setToBlock(n.blocks[Math.min(i,a)],r.positions.START);break;default:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END)}else r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:\"enableCrossBlockSelection\",value:function(e){var t=this.Editor.UI;p.default.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}},{key:\"toggleBlocksSelectedState\",value:function(e,t){for(var n=this.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.blocks.indexOf(e),a=o.blocks.indexOf(t),s=e.selected!==t.selected,l=Math.min(i,a);l<=Math.max(i,a);l++){var c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(s?e:t)&&(o.blocks[l].selected=!o.blocks[l].selected,r.clearCache())}}}]),o}(d.default);o.default=k,k.displayName=\"CrossBlockSelection\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u,f,d){\"use strict\";var p=n(1);function h(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,u.default)(e);if(t){var r=(0,u.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,c.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),f=p(f);var v=function(e){(0,l.default)(o,e);var t,n=h(o);function o(){var e;return(0,a.default)(this,o),(e=n.apply(this,arguments)).isStartedAtEditor=!1,e}return(0,s.default)(o,[{key:\"toggleReadOnly\",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:\"enableModuleBindings\",value:function(){var e=this,t=this.Editor.UI;this.readOnlyMutableListeners.on(t.nodes.holder,\"drop\",function(){var t=(0,i.default)(r.default.mark((function t(n){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.processDrop(n);case 2:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),!0),this.readOnlyMutableListeners.on(t.nodes.holder,\"dragstart\",(function(){e.processDragStart()})),this.readOnlyMutableListeners.on(t.nodes.holder,\"dragover\",(function(t){e.processDragOver(t)}),!0)}},{key:\"disableModuleBindings\",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:\"processDrop\",value:(t=(0,i.default)(r.default.mark((function e(t){var n,o,i,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor,o=n.BlockManager,i=n.Caret,a=n.Paste,t.preventDefault(),o.blocks.forEach((function(e){e.dropTarget=!1})),f.default.isAtEditor&&!f.default.isCollapsed&&this.isStartedAtEditor&&document.execCommand(\"delete\"),this.isStartedAtEditor=!1,(s=o.setCurrentBlockByChildNode(t.target))?this.Editor.Caret.setToBlock(s,i.positions.END):(l=o.setCurrentBlockByChildNode(o.lastBlock.holder),this.Editor.Caret.setToBlock(l,i.positions.END)),e.next=9,a.processDataTransfer(t.dataTransfer,!0);case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:\"processDragStart\",value:function(){f.default.isAtEditor&&!f.default.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}},{key:\"processDragOver\",value:function(e){e.preventDefault()}}]),o}((d=p(d)).default);o.default=v,v.displayName=\"DragNDrop\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f){\"use strict\";var d=n(1);function p(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).disabled=!1,e}return(0,i.default)(n,[{key:\"enable\",value:function(){this.disabled=!1}},{key:\"disable\",value:function(){this.disabled=!0}},{key:\"onChange\",value:function(e){!this.disabled&&f.isFunction(this.config.onChange)&&this.config.onChange(this.Editor.API.methods,e)}}]),n}(u.default);o.default=v,v.displayName=\"ModificationsObserver\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(30),n(41),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(66)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y){\"use strict\";var k=n(1);function b(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function m(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=k(r),i=k(i),s=k(s),l=k(l),c=k(c),u=k(u),f=k(f),d=k(d),p=k(p),h=k(h),v=k(v),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g);var w=function(e){(0,f.default)(w,e);var t,n,o,a,d,p,h,k,b=m(w);function w(){var e;return(0,c.default)(this,w),(e=b.apply(this,arguments)).MIME_TYPE=\"application/x-editor-js\",e.toolsTags={},e.tagsByTool={},e.toolsPatterns=[],e.toolsFiles={},e.exceptionList=[],e.processTool=function(t){try{var n=t.create({},{},!1);if(!1===t.pasteConfig)return void e.exceptionList.push(t.name);if(!g.isFunction(n.onPaste))return;e.getTagsConfig(t),e.getFilesConfig(t),e.getPatternsConfig(t)}catch(e){g.log(\"Paste handling for «\".concat(t.name,\"» Tool hasn't been set up because of the error\"),\"warn\",e)}},e.handlePasteEvent=function(){var t=(0,l.default)(r.default.mark((function t(n){var o,i,a;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.Editor,i=o.BlockManager,a=o.Toolbar,i.currentBlock&&(!e.isNativeBehaviour(n.target)||n.clipboardData.types.includes(\"Files\"))){t.next=3;break}return t.abrupt(\"return\");case 3:if(!i.currentBlock||!e.exceptionList.includes(i.currentBlock.name)){t.next=5;break}return t.abrupt(\"return\");case 5:n.preventDefault(),e.processDataTransfer(n.clipboardData),i.clearFocused(),a.close();case 9:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,u.default)(w,[{key:\"prepare\",value:(k=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.processTools();case 1:case\"end\":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:\"toggleReadOnly\",value:function(e){e?this.unsetCallback():this.setCallback()}},{key:\"processDataTransfer\",value:(h=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u,f,d=this,p=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>1&&void 0!==p[1]&&p[1],o=this.Editor.Tools,!((i=t.types).includes?i.includes(\"Files\"):i.contains(\"Files\"))||g.isEmpty(this.toolsFiles)){e.next=8;break}return e.next=7,this.processFiles(t.files);case 7:return e.abrupt(\"return\");case 8:if(a=t.getData(this.MIME_TYPE),s=t.getData(\"text/plain\"),l=t.getData(\"text/html\"),!a){e.next=19;break}return e.prev=12,this.insertEditorJSData(JSON.parse(a)),e.abrupt(\"return\");case 17:e.prev=17,e.t0=e.catch(12);case 19:if(n&&s.trim()&&l.trim()&&(l=\"

\"+(l.trim()?l:s)+\"

\"),c=Object.keys(this.toolsTags).reduce((function(e,t){var n;return e[t.toLowerCase()]=null!==(n=d.toolsTags[t].sanitizationConfig)&&void 0!==n?n:{},e}),{}),u=Object.assign({},c,o.getAllInlineToolsSanitizeConfig(),{br:{}}),(f=(0,y.clean)(l,u)).trim()&&f.trim()!==s&&v.default.isHTMLString(f)){e.next=28;break}return e.next=26,this.processText(s);case 26:e.next=30;break;case 28:return e.next=30,this.processText(f,!0);case 30:case\"end\":return e.stop()}}),e,this,[[12,17]])}))),function(e){return h.apply(this,arguments)})},{key:\"processText\",value:(p=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,c,u,f=this,d=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=d.length>1&&void 0!==d[1]&&d[1],o=this.Editor,i=o.Caret,a=o.BlockManager,(s=n?this.processHTML(t):this.processPlain(t)).length){e.next=5;break}return e.abrupt(\"return\");case 5:if(1!==s.length){e.next=8;break}return s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop()),e.abrupt(\"return\");case 8:c=a.currentBlock&&a.currentBlock.tool.isDefault,u=c&&a.currentBlock.isEmpty,s.map(function(){var e=(0,l.default)(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",f.insertBlock(t,0===n&&u));case 1:case\"end\":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),a.currentBlock&&i.setToBlock(a.currentBlock,i.positions.END);case 12:case\"end\":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:\"setCallback\",value:function(){this.listeners.on(this.Editor.UI.nodes.holder,\"paste\",this.handlePasteEvent)}},{key:\"unsetCallback\",value:function(){this.listeners.off(this.Editor.UI.nodes.holder,\"paste\",this.handlePasteEvent)}},{key:\"processTools\",value:function(){var e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}},{key:\"collectTagNames\",value:function(e){return g.isString(e)?[e]:g.isObject(e)?Object.keys(e):[]}},{key:\"getTagsConfig\",value:function(e){var t=this,n=e.pasteConfig.tags||[],o=[];n.forEach((function(n){var r=t.collectTagNames(n);o.push.apply(o,(0,s.default)(r)),r.forEach((function(o){if(Object.prototype.hasOwnProperty.call(t.toolsTags,o))g.log(\"Paste handler for «\".concat(e.name,\"» Tool on «\").concat(o,\"» tag is skipped \")+\"because it is already used by «\".concat(t.toolsTags[o].tool.name,\"» Tool.\"),\"warn\");else{var r=g.isObject(n)?n[o]:null;t.toolsTags[o.toUpperCase()]={tool:e,sanitizationConfig:r}}}))})),this.tagsByTool[e.name]=o.map((function(e){return e.toUpperCase()}))}},{key:\"getFilesConfig\",value:function(e){var t=e.pasteConfig.files,n=void 0===t?{}:t,o=n.extensions,r=n.mimeTypes;(o||r)&&(o&&!Array.isArray(o)&&(g.log(\"«extensions» property of the onDrop config for «\".concat(e.name,\"» Tool should be an array\")),o=[]),r&&!Array.isArray(r)&&(g.log(\"«mimeTypes» property of the onDrop config for «\".concat(e.name,\"» Tool should be an array\")),r=[]),r&&(r=r.filter((function(t){return!!g.isValidMimeType(t)||(g.log(\"MIME type value «\".concat(t,\"» for the «\").concat(e.name,\"» Tool is not a valid MIME type\"),\"warn\"),!1)}))),this.toolsFiles[e.name]={extensions:o||[],mimeTypes:r||[]})}},{key:\"getPatternsConfig\",value:function(e){var t=this;e.pasteConfig.patterns&&!g.isEmpty(e.pasteConfig.patterns)&&Object.entries(e.pasteConfig.patterns).forEach((function(n){var o=(0,i.default)(n,2),r=o[0],a=o[1];a instanceof RegExp||g.log(\"Pattern \".concat(a,\" for «\").concat(e.name,\"» Tool is skipped because it should be a Regexp instance.\"),\"warn\"),t.toolsPatterns.push({key:r,pattern:a,tool:e})}))}},{key:\"isNativeBehaviour\",value:function(e){return v.default.isNativeInput(e)}},{key:\"processFiles\",value:(d=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor.BlockManager,e.next=3,Promise.all(Array.from(t).map((function(e){return s.processFile(e)})));case 3:o=(o=e.sent).filter((function(e){return!!e})),i=n.currentBlock.tool.isDefault,a=i&&n.currentBlock.isEmpty,o.forEach((function(e,t){n.paste(e.type,e.event,0===t&&a)}));case 8:case\"end\":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:\"processFile\",value:(a=(0,l.default)(r.default.mark((function e(t){var n,o,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.getFileExtension(t),o=Object.entries(this.toolsFiles).find((function(e){var o=(0,i.default)(e,2),r=(o[0],o[1]),a=r.mimeTypes,s=r.extensions,l=t.type.split(\"/\"),c=(0,i.default)(l,2),u=c[0],f=c[1],d=s.find((function(e){return e.toLowerCase()===n.toLowerCase()})),p=a.find((function(e){var t=e.split(\"/\"),n=(0,i.default)(t,2),o=n[0],r=n[1];return o===u&&(r===f||\"*\"===r)}));return!!d||!!p}))){e.next=4;break}return e.abrupt(\"return\");case 4:return a=(0,i.default)(o,1),s=a[0],l=this.composePasteEvent(\"file\",{file:t}),e.abrupt(\"return\",{event:l,type:s});case 7:case\"end\":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:\"processHTML\",value:function(e){var t=this,n=this.Editor.Tools,o=v.default.make(\"DIV\");return o.innerHTML=e,this.getNodes(o).map((function(e){var o,r=n.defaultTool,i=!1;switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(o=v.default.make(\"div\")).appendChild(e);break;case Node.ELEMENT_NODE:o=e,i=!0,t.toolsTags[o.tagName]&&(r=t.toolsTags[o.tagName].tool)}var a=r.pasteConfig.tags.reduce((function(e,n){return t.collectTagNames(n).forEach((function(t){var o=g.isObject(n)?n[t]:null;e[t.toLowerCase()]=o||{}})),e}),{}),s=Object.assign({},a,r.baseSanitizeConfig);if(\"table\"===o.tagName.toLowerCase()){var l=(0,y.clean)(o.outerHTML,s);o=v.default.make(\"div\",void 0,{innerHTML:l}).firstChild}else o.innerHTML=(0,y.clean)(o.innerHTML,s);var c=t.composePasteEvent(\"tag\",{data:o});return{content:o,isBlock:i,tool:r.name,event:c}})).filter((function(e){var t=v.default.isEmpty(e.content),n=v.default.isSingleTag(e.content);return!t||n}))}},{key:\"processPlain\",value:function(e){var t=this,n=this.config.defaultBlock;if(!e)return[];var o=n;return e.split(/\\r?\\n/).filter((function(e){return e.trim()})).map((function(e){var n=v.default.make(\"div\");n.textContent=e;var r=t.composePasteEvent(\"tag\",{data:n});return{content:n,tool:o,isBlock:!1,event:r}}))}},{key:\"processSingleBlock\",value:(o=(0,l.default)(r.default.mark((function e(t){var n,o,i,a;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.Caret,i=n.BlockManager,(a=i.currentBlock)&&t.tool===a.name&&v.default.containsOnlyInlineElements(t.content.innerHTML)){e.next=5;break}return this.insertBlock(t,(null==a?void 0:a.tool.isDefault)&&a.isEmpty),e.abrupt(\"return\");case 5:o.insertContentAtCaretPosition(t.content.innerHTML);case 6:case\"end\":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:\"processInlinePaste\",value:(n=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.BlockManager,i=n.Caret,a=t.content,!(o.currentBlock&&o.currentBlock.tool.isDefault&&a.textContent.length1&&void 0!==arguments[1]&&arguments[1],o=this.Editor,r=o.BlockManager,i=o.Caret,a=r.currentBlock;if(n&&a&&a.isEmpty)return t=r.paste(e.tool,e.event,!0),void i.setToBlock(t,i.positions.END);t=r.paste(e.tool,e.event),i.setToBlock(t,i.positions.END)}},{key:\"insertEditorJSData\",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.Caret,r=t.Tools;(0,y.sanitizeBlocks)(e,(function(e){return r.blockTools.get(e).sanitizeConfig})).forEach((function(e,t){var r=e.tool,i=e.data,a=!1;0===t&&(a=n.currentBlock&&n.currentBlock.tool.isDefault&&n.currentBlock.isEmpty);var s=n.insert({tool:r,data:i,replace:a});o.setToBlock(s,o.positions.END)}))}},{key:\"processElementNode\",value:function(e,t,n){var o=Object.keys(this.toolsTags),r=e,i=(this.toolsTags[r.tagName]||{}).tool,a=this.tagsByTool[null==i?void 0:i.name]||[],l=o.includes(r.tagName),c=v.default.blockElements.includes(r.tagName.toLowerCase()),u=Array.from(r.children).some((function(e){var t=e.tagName;return o.includes(t)&&!a.includes(t)})),f=Array.from(r.children).some((function(e){var t=e.tagName;return v.default.blockElements.includes(t.toLowerCase())}));return c||l||u?l&&!u||c&&!f&&!u?[].concat((0,s.default)(t),[n,r]):void 0:(n.appendChild(r),[].concat((0,s.default)(t),[n]))}},{key:\"getNodes\",value:function(e){var t,n=this;return Array.from(e.childNodes).reduce((function e(o,r){if(v.default.isEmpty(r)&&!v.default.isSingleTag(r))return o;var i=o[o.length-1],a=new DocumentFragment;switch(i&&v.default.isFragment(i)&&(a=o.pop()),r.nodeType){case Node.ELEMENT_NODE:if(t=n.processElementNode(r,o,a))return t;break;case Node.TEXT_NODE:return a.appendChild(r),[].concat((0,s.default)(o),[a]);default:return[].concat((0,s.default)(o),[a])}return[].concat((0,s.default)(o),(0,s.default)(Array.from(r.childNodes).reduce(e,[])))}),[])}},{key:\"composePasteEvent\",value:function(e,t){return new CustomEvent(e,{detail:t})}}]),w}(h.default);o.default=w,w.displayName=\"Paste\",w.PATTERN_PROCESSING_MAX_LENGTH=450,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(151)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u,f,d,p){\"use strict\";var h=n(1);function v(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f);var g=function(e){(0,c.default)(u,e);var t,n,o=v(u);function u(){var e;return(0,s.default)(this,u),(e=o.apply(this,arguments)).toolsDontSupportReadOnly=[],e.readOnlyEnabled=!1,e}return(0,l.default)(u,[{key:\"isEnabled\",get:function(){return this.readOnlyEnabled}},{key:\"prepare\",value:(n=(0,a.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.Editor.Tools,n=t.blockTools,o=[],Array.from(n.entries()).forEach((function(e){var t=(0,i.default)(e,2),n=t[0];t[1].isReadOnlySupported||o.push(n)})),this.toolsDontSupportReadOnly=o,this.config.readOnly&&o.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly);case 7:case\"end\":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:\"toggle\",value:(t=(0,a.default)(r.default.mark((function e(){var t,n,o,i,a=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.length>0&&void 0!==a[0]?a[0]:!this.readOnlyEnabled)&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError(),n=this.readOnlyEnabled,this.readOnlyEnabled=t,e.t0=r.default.keys(this.Editor);case 5:if((e.t1=e.t0()).done){e.next=12;break}if(o=e.t1.value,this.Editor[o].toggleReadOnly){e.next=9;break}return e.abrupt(\"continue\",5);case 9:this.Editor[o].toggleReadOnly(t),e.next=5;break;case 12:if(n!==t){e.next=14;break}return e.abrupt(\"return\",this.readOnlyEnabled);case 14:return e.next=16,this.Editor.Saver.save();case 16:return i=e.sent,e.next=19,this.Editor.BlockManager.clear();case 19:return e.next=21,this.Editor.Renderer.render(i.blocks);case 21:return e.abrupt(\"return\",this.readOnlyEnabled);case 22:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"throwCriticalError\",value:function(){throw new p.CriticalError(\"To enable read-only mode all connected tools should support it. Tools \".concat(this.toolsDontSupportReadOnly.join(\", \"),\" don't support read-only mode.\"))}}]),u}((d=h(d)).default);o.default=g,g.displayName=\"ReadOnly\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(61),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){\"use strict\";var v=n(1);function g(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e,t){var n=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(\"string\"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&\"number\"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn&&this.mouseX>n,a=this.startX=this.startY?(this.overlayRectangle.style.top=\"\".concat(this.startY-window.pageYOffset,\"px\"),this.overlayRectangle.style.bottom=\"calc(100% - \".concat(this.mouseY-window.pageYOffset,\"px\")):(this.overlayRectangle.style.bottom=\"calc(100% - \".concat(this.startY-window.pageYOffset,\"px\"),this.overlayRectangle.style.top=\"\".concat(this.mouseY-window.pageYOffset,\"px\")),this.mouseX>=this.startX?(this.overlayRectangle.style.left=\"\".concat(this.startX-window.pageXOffset,\"px\"),this.overlayRectangle.style.right=\"calc(100% - \".concat(this.mouseX-window.pageXOffset,\"px\")):(this.overlayRectangle.style.right=\"calc(100% - \".concat(this.startX-window.pageXOffset,\"px\"),this.overlayRectangle.style.left=\"\".concat(this.mouseX-window.pageXOffset,\"px\"))}},{key:\"genInfoForMouseSelection\",value:function(){var e,t=document.body.offsetWidth/2,n=this.mouseY-window.pageYOffset,o=document.elementFromPoint(t,n),r=this.Editor.BlockManager.getBlockByChildNode(o);void 0!==r&&(e=this.Editor.BlockManager.blocks.findIndex((function(e){return e.holder===r.holder})));var i=this.Editor.BlockManager.lastBlock.holder.querySelector(\".\"+p.default.CSS.content),a=Number.parseInt(window.getComputedStyle(i).width,10)/2;return{index:e,leftPos:t-a,rightPos:t+a}}},{key:\"addBlockInSelection\",value:function(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}},{key:\"trySelectNextBlock\",value:function(e){var t=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===e,o=this.stackOfSelected.length;if(!n){var r=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,i=0;o>1&&(i=r?1:-1);var a=e>this.stackOfSelected[o-1]&&1===i,s=ethis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&e=e;c--)this.addBlockInSelection(c);else if(l){var u,f=o-1;for(u=e>this.stackOfSelected[o-1]?function(){return e>t.stackOfSelected[f]}:function(){return e0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;this.opened=!0,this.selection.save(),t.selected=!0,this.Editor.BlockSelection.clearCache();var n=t.getTunes(),o=(0,r.default)(n,2),i=o[0],a=o[1];this.eventsDispatcher.emit(this.events.opened),this.popover=new h.default({className:this.CSS.settings,searchable:!0,filterLabel:v.default.ui(g.I18nInternalNS.ui.popover,\"Filter\"),nothingFoundLabel:v.default.ui(g.I18nInternalNS.ui.popover,\"Nothing found\"),items:i.map((function(t){return e.resolveTuneAliases(t)})),customContent:a,customContentFlippableItems:this.getControls(a),scopeElement:this.Editor.API.methods.ui.nodes.redactor}),this.popover.on(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.on(h.PopoverEvent.Close,(function(){return e.close()})),this.nodes.wrapper.append(this.popover.getElement()),this.popover.show()}},{key:\"getElement\",value:function(){return this.nodes.wrapper}},{key:\"close\",value:function(){this.opened=!1,p.default.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&(this.Editor.BlockManager.currentBlock.selected=!1),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null)}},{key:\"getControls\",value:function(e){var t=this.Editor.StylesAPI,n=e.querySelectorAll(\".\".concat(t.classes.settingsButton,\", \").concat(d.default.allInputsSelector));return Array.from(n)}},{key:\"resolveTuneAliases\",value:function(e){var t=(0,y.resolveAliases)(e,{label:\"title\"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}}]),n}(f.default);o.default=w,w.displayName=\"BlockSettings\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(41),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(67),n(54),n(68),n(66)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y,k,b,m){\"use strict\";var w=n(1);function x(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function C(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=w(r),i=w(i),s=w(s),l=w(l),c=w(c),u=w(u),f=w(f),d=w(d),p=w(p),h=w(h),v=w(v),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),y=w(y),k=w(k);var S=function(e){(0,f.default)(a,e);var t,n,o=C(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).opened=!1,e.tools=[],e.flipper=null,e.togglingCallback=null,e}return(0,u.default)(a,[{key:\"make\",value:function(){this.nodes.wrapper=v.default.make(\"div\",[a.CSS.conversionToolbarWrapper].concat((0,l.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.tools=v.default.make(\"div\",a.CSS.conversionToolbarTools);var e=v.default.make(\"div\",a.CSS.conversionToolbarLabel,{textContent:k.default.ui(b.I18nInternalNS.ui.inlineToolbar.converter,\"Convert to\")});return this.addTools(),this.enableFlipper(),v.default.append(this.nodes.wrapper,e),v.default.append(this.nodes.wrapper,this.nodes.tools),this.nodes.wrapper}},{key:\"destroy\",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:\"toggle\",value:function(e){this.opened?this.close():this.open(),g.isFunction(e)&&(this.togglingCallback=e)}},{key:\"open\",value:function(){var e=this;this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(a.CSS.conversionToolbarShowed),window.requestAnimationFrame((function(){e.flipper.activate(e.tools.map((function(e){return e.button})).filter((function(e){return!e.classList.contains(a.CSS.conversionToolHidden)}))),e.flipper.focusFirst(),g.isFunction(e.togglingCallback)&&e.togglingCallback(!0)}))}},{key:\"close\",value:function(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(a.CSS.conversionToolbarShowed),g.isFunction(this.togglingCallback)&&this.togglingCallback(!1)}},{key:\"hasTools\",value:function(){return 1!==this.tools.length||this.tools[0].name!==this.config.defaultBlock}},{key:\"replaceWithBlock\",value:(n=(0,s.default)(r.default.mark((function e(t,n){var o,i,a,s,l,c,u,f,d,p=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.Editor.BlockManager.currentBlock.tool,e.next=3,this.Editor.BlockManager.currentBlock.save();case 3:if(i=e.sent,a=i.data,s=this.Editor.Tools.blockTools.get(t),l=\"\",c=o.conversionConfig.export,!g.isFunction(c)){e.next=12;break}l=c(a),e.next=18;break;case 12:if(!g.isString(c)){e.next=16;break}l=a[c],e.next=18;break;case 16:return g.log(\"Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export.\"),e.abrupt(\"return\");case 18:if(u=(0,m.clean)(l,s.sanitizeConfig),f={},d=s.conversionConfig.import,!g.isFunction(d)){e.next=25;break}f=d(u),e.next=31;break;case 25:if(!g.isString(d)){e.next=29;break}f[d]=u,e.next=31;break;case 29:return g.log(\"Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data.\"),e.abrupt(\"return\");case 31:n&&(f=Object.assign(f,n)),this.Editor.BlockManager.replace({tool:t,data:f}),this.Editor.BlockSelection.clearSelection(),this.close(),this.Editor.InlineToolbar.close(),g.delay((function(){p.Editor.Caret.setToBlock(p.Editor.BlockManager.currentBlock)}),10)();case 37:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:\"addTools\",value:function(){var e=this,t=this.Editor.Tools.blockTools;Array.from(t.entries()).forEach((function(t){var n=(0,i.default)(t,2),o=n[0],r=n[1],a=r.conversionConfig;a&&a.import&&r.toolbox.forEach((function(t){return e.addToolIfValid(o,t)}))}))}},{key:\"addToolIfValid\",value:function(e,t){!g.isEmpty(t)&&t.icon&&this.addTool(e,t)}},{key:\"addTool\",value:function(e,t){var n=this,o=v.default.make(\"div\",[a.CSS.conversionTool]),i=v.default.make(\"div\",[a.CSS.conversionToolIcon]);o.dataset.tool=e,i.innerHTML=t.icon,v.default.append(o,i),v.default.append(o,v.default.text(k.default.t(b.I18nInternalNS.toolNames,t.title||g.capitalize(e)))),v.default.append(this.nodes.tools,o),this.tools.push({name:e,button:o,toolboxItem:t}),this.listeners.on(o,\"click\",(0,s.default)(r.default.mark((function o(){return r.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,n.replaceWithBlock(e,t.data);case 2:case\"end\":return o.stop()}}),o)}))))}},{key:\"filterTools\",value:(t=(0,s.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=function(e,t){return e.icon===t.icon&&e.title===t.title},t=this.Editor.BlockManager.currentBlock,e.next=4,t.getActiveToolboxEntry();case 4:n=e.sent,this.tools.forEach((function(e){var r=!1;if(n){var i=o(n,e.toolboxItem);r=e.button.dataset.tool===t.name&&i}e.button.hidden=r,e.button.classList.toggle(a.CSS.conversionToolHidden,r)}));case 6:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"enableFlipper\",value:function(){this.flipper=new y.default({focusedItemClass:a.CSS.conversionToolFocused})}}],[{key:\"CSS\",get:function(){return{conversionToolbarWrapper:\"ce-conversion-toolbar\",conversionToolbarShowed:\"ce-conversion-toolbar--showed\",conversionToolbarTools:\"ce-conversion-toolbar__tools\",conversionToolbarLabel:\"ce-conversion-toolbar__label\",conversionTool:\"ce-conversion-tool\",conversionToolHidden:\"ce-conversion-tool--hidden\",conversionToolIcon:\"ce-conversion-tool__icon\",conversionToolFocused:\"ce-conversion-tool--focused\",conversionToolActive:\"ce-conversion-tool--active\"}}}]),a}(h.default);o.default=S,S.displayName=\"ConversionToolbar\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(21),n(41),n(30),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(8),n(67),n(54),n(68),n(116),n(115),n(69),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y,k,b,m,w,x,C,S){\"use strict\";var T=n(1);function E(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function B(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=T(r),i=T(i),s=T(s),l=T(l),c=T(c),u=T(u),f=T(f),d=T(d),p=T(p),h=T(h),v=T(v),g=T(g),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),k=T(k),b=T(b),w=T(w),x=T(x);var M=function(e){(0,f.default)(o,e);var t,n=B(o);function o(e){var t,r=e.config,i=e.eventsDispatcher;return(0,c.default)(this,o),(t=n.call(this,{config:r,eventsDispatcher:i})).CSS={inlineToolbar:\"ce-inline-toolbar\",inlineToolbarShowed:\"ce-inline-toolbar--showed\",inlineToolbarLeftOriented:\"ce-inline-toolbar--left-oriented\",inlineToolbarRightOriented:\"ce-inline-toolbar--right-oriented\",inlineToolbarShortcut:\"ce-inline-toolbar__shortcut\",buttonsWrapper:\"ce-inline-toolbar__buttons\",actionsWrapper:\"ce-inline-toolbar__actions\",inlineToolButton:\"ce-inline-tool\",inputField:\"cdx-input\",focusedButton:\"ce-inline-tool--focused\",conversionToggler:\"ce-inline-toolbar__dropdown\",conversionTogglerArrow:\"ce-inline-toolbar__dropdown-arrow\",conversionTogglerHidden:\"ce-inline-toolbar__dropdown--hidden\",conversionTogglerContent:\"ce-inline-toolbar__dropdown-content\",togglerAndButtonsWrapper:\"ce-inline-toolbar__toggler-and-button-wrapper\"},t.opened=!1,t.toolbarVerticalMargin=y.isMobileScreen()?20:6,t.buttonsList=null,t.width=0,t.flipper=null,t.tooltip=new x.default,t}return(0,u.default)(o,[{key:\"toggleReadOnly\",value:function(e){e?(this.destroy(),this.Editor.ConversionToolbar.destroy()):this.make()}},{key:\"tryToShow\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.allowedToShow()?(this.move(),this.open(t),this.Editor.Toolbar.close()):e&&this.close()}},{key:\"move\",value:function(){var e=g.default.rect,t=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:e.x-t.left,y:e.y+e.height-t.top+this.toolbarVerticalMargin};e.width&&(n.x+=Math.floor(e.width/2));var o=n.x-this.width/2,r=n.x+this.width/2;this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented,othis.Editor.UI.contentRect.right),this.nodes.wrapper.style.left=Math.floor(n.x)+\"px\",this.nodes.wrapper.style.top=Math.floor(n.y)+\"px\"}},{key:\"close\",value:function(){var e=this;this.opened&&(this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),Array.from(this.toolsInstances.entries()).forEach((function(t){var n=(0,l.default)(t,2),o=n[0],r=n[1],i=e.getToolShortcut(o);i&&w.default.remove(e.Editor.UI.nodes.redactor,i),y.isFunction(r.clear)&&r.clear()})),this.opened=!1,this.flipper.deactivate(),this.Editor.ConversionToolbar.close()))}},{key:\"open\",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.opened){this.addToolsFiltered(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.buttonsList=this.nodes.buttons.querySelectorAll(\".\".concat(this.CSS.inlineToolButton)),this.opened=!0,e&&this.Editor.ConversionToolbar.hasTools()?this.setConversionTogglerContent():this.nodes.conversionToggler.hidden=!0;var t=Array.from(this.buttonsList);t.unshift(this.nodes.conversionToggler),t=t.filter((function(e){return!e.hidden})),this.flipper.activate(t)}}},{key:\"containsNode\",value:function(e){return this.nodes.wrapper.contains(e)}},{key:\"destroy\",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.tooltip.destroy()}},{key:\"make\",value:function(){var e=this;this.nodes.wrapper=v.default.make(\"div\",[this.CSS.inlineToolbar].concat((0,s.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.togglerAndButtonsWrapper=v.default.make(\"div\",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=v.default.make(\"div\",this.CSS.buttonsWrapper),this.nodes.actions=v.default.make(\"div\",this.CSS.actionsWrapper),this.listeners.on(this.nodes.wrapper,\"mousedown\",(function(t){t.target.closest(\".\".concat(e.CSS.actionsWrapper))||t.preventDefault()})),v.default.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),v.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),v.default.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),this.recalculateWidth(),this.enableFlipper()}},{key:\"allowedToShow\",value:function(){var e=g.default.get(),t=g.default.text;if(!e||!e.anchorNode)return!1;if(e.isCollapsed||t.length<1)return!1;var n=v.default.isElement(e.anchorNode)?e.anchorNode:e.anchorNode.parentElement;if(e&&[\"IMG\",\"INPUT\"].includes(n.tagName))return!1;if(null===n.closest('[contenteditable=\"true\"]'))return!1;var o=this.Editor.BlockManager.getBlock(e.anchorNode);return!!o&&0!==o.tool.inlineTools.size}},{key:\"recalculateWidth\",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:\"addConversionToggler\",value:function(){var e=this;this.nodes.conversionToggler=v.default.make(\"div\",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=v.default.make(\"div\",this.CSS.conversionTogglerContent);var t=v.default.make(\"div\",this.CSS.conversionTogglerArrow,{innerHTML:S.IconChevronDown});this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(t),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.listeners.on(this.nodes.conversionToggler,\"click\",(function(){e.Editor.ConversionToolbar.toggle((function(t){!t&&e.opened?e.flipper.activate():e.opened&&e.flipper.deactivate()}))})),!1===y.isMobileScreen()&&this.tooltip.onHover(this.nodes.conversionToggler,b.default.ui(m.I18nInternalNS.ui.inlineToolbar.converter,\"Convert to\"),{placement:\"top\",hidingDelay:100})}},{key:\"setConversionTogglerContent\",value:(t=(0,i.default)(r.default.mark((function e(){var t,n,o,i,a,s;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Editor.BlockManager,n=t.currentBlock,o=n.name,i=n.tool.conversionConfig,a=i&&i.export,this.nodes.conversionToggler.hidden=!a,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!a),e.next=9,n.getActiveToolboxEntry();case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0={};case 12:s=e.t0,this.nodes.conversionTogglerContent.innerHTML=s.icon||s.title||y.capitalize(o);case 14:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"prepareConversionToolbar\",value:function(){var e=this.Editor.ConversionToolbar.make();v.default.append(this.nodes.wrapper,e)}},{key:\"addToolsFiltered\",value:function(){var e=this,t=g.default.get(),n=this.Editor.BlockManager.getBlock(t.anchorNode);this.nodes.buttons.innerHTML=\"\",this.nodes.actions.innerHTML=\"\",this.toolsInstances=new Map,Array.from(n.tool.inlineTools.values()).forEach((function(t){e.addTool(t)})),this.recalculateWidth()}},{key:\"addTool\",value:function(e){var t=this,n=e.create(),o=n.render();if(o){if(o.dataset.tool=e.name,this.nodes.buttons.appendChild(o),this.toolsInstances.set(e.name,n),y.isFunction(n.renderActions)){var r=n.renderActions();this.nodes.actions.appendChild(r)}this.listeners.on(o,\"click\",(function(e){t.toolClicked(n),e.preventDefault()}));var i=this.getToolShortcut(e.name);if(i)try{this.enableShortcuts(n,i)}catch(e){}var a=v.default.make(\"div\"),s=b.default.t(m.I18nInternalNS.toolNames,e.title||y.capitalize(e.name));a.appendChild(v.default.text(s)),i&&a.appendChild(v.default.make(\"div\",this.CSS.inlineToolbarShortcut,{textContent:y.beautifyShortcut(i)})),!1===y.isMobileScreen()&&this.tooltip.onHover(o,a,{placement:\"top\",hidingDelay:100}),n.checkState(g.default.get())}else y.log(\"Render method must return an instance of Node\",\"warn\",e.name)}},{key:\"getToolShortcut\",value:function(e){var t=this.Editor.Tools,n=t.inlineTools.get(e),o=t.internal.inlineTools;return Array.from(o.keys()).includes(e)?this.inlineTools[e][C.CommonInternalSettings.Shortcut]:n.shortcut}},{key:\"enableShortcuts\",value:function(e,t){var n=this;w.default.add({name:t,handler:function(t){var o=n.Editor.BlockManager.currentBlock;o&&o.tool.enabledInlineTools&&(t.preventDefault(),n.toolClicked(e))},on:this.Editor.UI.nodes.redactor})}},{key:\"toolClicked\",value:function(e){var t=g.default.range;e.surround(t),this.checkToolsState(),void 0!==e.renderActions&&this.flipper.deactivate()}},{key:\"checkToolsState\",value:function(){this.toolsInstances.forEach((function(e){e.checkState(g.default.get())}))}},{key:\"inlineTools\",get:function(){var e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach((function(t){var n=(0,l.default)(t,2),o=n[0],r=n[1];e[o]=r.create()})),e}},{key:\"enableFlipper\",value:function(){this.flipper=new k.default({focusedItemClass:this.CSS.focusedButton,allowedKeys:[y.keyCodes.ENTER,y.keyCodes.TAB]})}}]),o}(h.default);o.default=M,M.displayName=\"InlineToolbar\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(41),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(7),n(390),n(9),n(8),n(391),n(392),n(393),n(394),n(395),n(399),n(400),n(401),n(185)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y,k,b,m,w,x,C,S,T,E){\"use strict\";var B=n(1);function M(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function _(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=B(r),i=B(i),s=B(s),l=B(l),c=B(c),u=B(u),f=B(f),d=B(d),p=B(p),h=B(h),v=B(v),g=B(g),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),k=B(k),b=B(b),m=B(m),w=B(w),x=B(x),C=B(C),S=B(S),T=B(T),E=B(E);var O=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if(\"object\"===(\"undefined\"==typeof Reflect?\"undefined\":(0,h.default)(Reflect))&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},I=function(e){(0,f.default)(o,e);var t,n=_(o);function o(){var e;return(0,c.default)(this,o),(e=n.apply(this,arguments)).stubTool=\"stub\",e.toolsAvailable=new E.default,e.toolsUnavailable=new E.default,e}return(0,u.default)(o,[{key:\"available\",get:function(){return this.toolsAvailable}},{key:\"unavailable\",get:function(){return this.toolsUnavailable}},{key:\"inlineTools\",get:function(){return this.available.inlineTools}},{key:\"blockTools\",get:function(){return this.available.blockTools}},{key:\"blockTunes\",get:function(){return this.available.blockTunes}},{key:\"defaultTool\",get:function(){return this.blockTools.get(this.config.defaultBlock)}},{key:\"internal\",get:function(){return this.available.internalTools}},{key:\"prepare\",value:(t=(0,l.default)(r.default.mark((function e(){var t,n,o=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateTools(),this.config.tools=y.deepMerge({},this.internalTools,this.config.tools),Object.prototype.hasOwnProperty.call(this.config,\"tools\")&&0!==Object.keys(this.config.tools).length){e.next=4;break}throw Error(\"Can't start without tools\");case 4:if(t=this.prepareConfig(),this.factory=new x.default(t,this.config,this.Editor.API),0!==(n=this.getListOfPrepareFunctions(t)).length){e.next=9;break}return e.abrupt(\"return\",Promise.resolve());case 9:return e.next=11,y.sequence(n,(function(e){o.toolPrepareMethodSuccess(e)}),(function(e){o.toolPrepareMethodFallback(e)}));case 11:this.prepareBlockTools();case 12:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"getAllInlineToolsSanitizeConfig\",value:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){Object.assign(e,t.sanitizeConfig)})),e}},{key:\"destroy\",value:function(){Object.values(this.available).forEach(function(){var e=(0,l.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!y.isFunction(t.reset)){e.next=3;break}return e.next=3,t.reset();case 3:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:\"internalTools\",get:function(){return{bold:{class:k.default,isInternal:!0},italic:{class:b.default,isInternal:!0},link:{class:m.default,isInternal:!0},paragraph:{class:v.default,inlineToolbar:!0,isInternal:!0},stub:{class:w.default,isInternal:!0},moveUp:{class:T.default,isInternal:!0},delete:{class:S.default,isInternal:!0},moveDown:{class:C.default,isInternal:!0}}}},{key:\"toolPrepareMethodSuccess\",value:function(e){var t=this.factory.get(e.toolName);if(t.isInline()){var n=[\"render\",\"surround\",\"checkState\"].filter((function(e){return!t.create()[e]}));if(n.length)return y.log(\"Incorrect Inline Tool: \".concat(t.name,\". Some of required methods is not implemented %o\"),\"warn\",n),void this.toolsUnavailable.set(t.name,t)}this.toolsAvailable.set(t.name,t)}},{key:\"toolPrepareMethodFallback\",value:function(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}},{key:\"getListOfPrepareFunctions\",value:function(e){var t=[];return Object.entries(e).forEach((function(e){var n=(0,s.default)(e,2),o=n[0],r=n[1];t.push({function:y.isFunction(r.class.prepare)?r.class.prepare:function(){},data:{toolName:o,config:r.config}})})),t}},{key:\"prepareBlockTools\",value:function(){var e=this;Array.from(this.blockTools.values()).forEach((function(t){e.assignInlineToolsToBlockTool(t),e.assignBlockTunesToBlockTool(t)}))}},{key:\"assignInlineToolsToBlockTool\",value:function(e){var t=this;!1!==this.config.inlineToolbar&&(!0!==e.enabledInlineTools?Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new E.default(e.enabledInlineTools.map((function(e){return[e,t.inlineTools.get(e)]})))):e.inlineTools=new E.default(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map((function(e){return[e,t.inlineTools.get(e)]})):Array.from(this.inlineTools.entries())))}},{key:\"assignBlockTunesToBlockTool\",value:function(e){var t=this;if(!1!==e.enabledBlockTunes)if(Array.isArray(e.enabledBlockTunes)){var n=new E.default(e.enabledBlockTunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(n),(0,i.default)(this.blockTunes.internalTools)))}else if(Array.isArray(this.config.tunes)){var o=new E.default(this.config.tunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(o),(0,i.default)(this.blockTunes.internalTools)))}else e.tunes=this.blockTunes.internalTools}},{key:\"validateTools\",value:function(){for(var e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;var t=this.config.tools[e];if(!y.isFunction(t)&&!y.isFunction(t.class))throw Error(\"Tool «\".concat(e,\"» must be a constructor function or an object with function in the «class» property\"))}}},{key:\"prepareConfig\",value:function(){var e={};for(var t in this.config.tools)y.isObject(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}]),o}(g.default);o.default=I,I.displayName=\"Tools\",O([y.cacheable],I.prototype,\"getAllInlineToolsSanitizeConfig\",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(5),n(6),n(4),n(153)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c,u){\"use strict\";var f=n(1);function d(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,s.default)(n,e);var t=d(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:\"blockTools\",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isBlock()})))}},{key:\"inlineTools\",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInline()})))}},{key:\"blockTunes\",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isTune()})))}},{key:\"internalTools\",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInternal})))}},{key:\"externalTools\",get:function(){return new n(Array.from(this.entries()).filter((function(e){return!(0,r.default)(e,2)[1].isInternal})))}}]),n}((0,(u=f(u)).default)(Map));o.default=p,p.displayName=\"ToolsCollection\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(41),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(25),n(61),n(67)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,g,y,k,b){\"use strict\";var m=n(1);function w(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function x(e){var t=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=m(r),i=m(i),s=m(s),l=m(l),c=m(c),u=m(u),f=m(f),d=m(d),p=m(p),h=m(h),v=m(v),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),y=m(y),k=m(k),b=m(b);var C=function(e){(0,f.default)(a,e);var t,o=x(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).isMobile=!1,e.contentRectCache=void 0,e.resizeDebouncer=g.debounce((function(){e.windowResize()}),200),e}return(0,u.default)(a,[{key:\"events\",get:function(){return{blockHovered:\"block-hovered\"}}},{key:\"CSS\",get:function(){return{editorWrapper:\"codex-editor\",editorWrapperNarrow:\"codex-editor--narrow\",editorZone:\"codex-editor__redactor\",editorZoneHidden:\"codex-editor__redactor--hidden\",editorLoader:\"codex-editor__loader\",editorEmpty:\"codex-editor--empty\",editorRtlFix:\"codex-editor--rtl\"}}},{key:\"contentRect\",get:function(){if(this.contentRectCache)return this.contentRectCache;var e=this.nodes.wrapper.querySelector(\".\".concat(k.default.CSS.content));return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}},{key:\"addLoader\",value:function(){this.nodes.loader=v.default.make(\"div\",this.CSS.editorLoader),this.nodes.wrapper.prepend(this.nodes.loader),this.nodes.redactor.classList.add(this.CSS.editorZoneHidden)}},{key:\"removeLoader\",value:function(){this.nodes.loader.remove(),this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden)}},{key:\"prepare\",value:(t=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.checkIsMobile(),this.make(),this.addLoader(),this.loadStyles();case 4:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"toggleReadOnly\",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:\"checkEmptiness\",value:function(){var e=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}},{key:\"someToolbarOpened\",get:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;return n.opened||o.opened||r.opened||t.toolbox.opened}},{key:\"someFlipperButtonFocused\",get:function(){return!!this.Editor.Toolbar.toolbox.hasFocus()||Object.entries(this.Editor).filter((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper instanceof b.default})).some((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper.hasFocus()}))}},{key:\"destroy\",value:function(){this.nodes.holder.innerHTML=\"\"}},{key:\"closeAllToolbars\",value:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;n.close(),o.close(),r.close(),t.toolbox.close()}},{key:\"checkIsMobile\",value:function(){this.isMobile=window.innerWidth=0;if(o.anyBlockSelected&&!y.default.isSelectionExists)return o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),void e.stopPropagation();if(!this.someToolbarOpened&&r&&\"BODY\"===e.target.tagName){var i=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(i),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}},{key:\"documentClicked\",value:function(e){if(e.isTrusted){var t=e.target;this.nodes.holder.contains(t)||y.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close());var n=this.Editor.BlockSettings.nodes.wrapper.contains(t),o=this.Editor.Toolbar.nodes.settingsToggler.contains(t),r=n||o;if(this.Editor.BlockSettings.opened&&!r){this.Editor.BlockSettings.close();var i=this.Editor.BlockManager.getBlockByChildNode(t);this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}}},{key:\"documentTouched\",value:function(e){var t=e.target;if(t===this.nodes.redactor){var n=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,o=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t),this.Editor.BlockManager.highlightCurrentNode()}catch(e){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.moveAndOpen()}},{key:\"redactorClicked\",value:function(e){var t=this.Editor.BlockSelection;if(y.default.isCollapsed){var n=function(){e.stopImmediatePropagation(),e.stopPropagation()},o=e.target,r=e.metaKey||e.ctrlKey;if(v.default.isAnchor(o)&&r){n();var i=o.getAttribute(\"href\"),a=g.getValidUrl(i);g.openTab(a)}else{var s=this.Editor.BlockManager.getBlockByIndex(-1),l=v.default.offset(s.holder).bottom,c=e.pageY;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!t.anyBlockSelected&&lr;)Z(e,n=o[r++],t[n]);return e},J=function(e){var t=D.call(this,e=x(e,!0));return!(this===U&&r(H,e)&&!r(W,e))&&(!(t||!r(this,e)||!r(H,e)||r(this,A)&&this[A][e])||t)},$=function(e,t){if(e=w(e),t=x(t,!0),e!==U||!r(H,t)||r(W,t)){var n=O(e,t);return!n||!r(H,t)||r(e,A)&&e[A][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=L(w(e)),o=[],i=0;n.length>i;)r(H,t=n[i++])||t==A||t==l||o.push(t);return o},ee=function(e){for(var t,n=e===U,o=L(n?W:w(e)),i=[],a=0;o.length>a;)!r(H,t=o[a++])||n&&!r(U,t)||i.push(H[t]);return i};z||(s((P=function(){if(this instanceof P)throw TypeError(\"Symbol is not a constructor!\");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call(W,n),r(this,A)&&r(this[A],e)&&(this[A][e]=!1),X(this,e,C(1,n))};return i&&Y&&X(U,e,{configurable:!0,set:t}),G(e)}).prototype,\"toString\",(function(){return this._k})),E.f=$,M.f=Z,n(50).f=T.f=Q,n(63).f=J,B.f=ee,i&&!n(46)&&s(U,\"propertyIsEnumerable\",J,!0),h.f=function(e){return G(p(e))}),a(a.G+a.W+a.F*!z,{Symbol:P});for(var te=\"hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables\".split(\",\"),ne=0;te.length>ne;)p(te[ne++]);for(var oe=_(p.store),re=0;oe.length>re;)v(oe[re++]);a(a.S+a.F*!z,\"Symbol\",{for:function(e){return r(F,e+=\"\")?F[e]:F[e]=P(e)},keyFor:function(e){if(!K(e))throw TypeError(e+\" is not a symbol!\");for(var t in F)if(F[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!z,\"Object\",{create:function(e,t){return void 0===t?S(e):q(S(e),t)},defineProperty:Z,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=c((function(){B.f(1)}));a(a.S+a.F*ie,\"Object\",{getOwnPropertySymbols:function(e){return B.f(m(e))}}),j&&a(a.S+a.F*(!z||c((function(){var e=P();return\"[null]\"!=R([e])||\"{}\"!=R({a:e})||\"{}\"!=R(Object(e))}))),\"JSON\",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(b(t)||void 0!==e)&&!K(e))return y(t)||(t=function(e,t){if(\"function\"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),o[1]=t,R.apply(j,o)}}),P.prototype[N]||n(27)(P.prototype,N,P.prototype.valueOf),f(P,\"Symbol\"),f(Math,\"Math\",!0),f(o.JSON,\"JSON\",!0)},function(e,t,n){e.exports=n(70)(\"native-function-to-string\",Function.toString)},function(e,t,n){var o=n(47),r=n(72),i=n(63);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var a,s=n(e),l=i.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var o=n(0);o(o.S,\"Object\",{create:n(49)})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),\"Object\",{defineProperty:n(18).f})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),\"Object\",{defineProperties:n(120)})},function(e,t,n){var o=n(28),r=n(34).f;n(35)(\"getOwnPropertyDescriptor\",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(22),r=n(51);n(35)(\"getPrototypeOf\",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(22),r=n(47);n(35)(\"keys\",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(35)(\"getOwnPropertyNames\",(function(){return n(121).f}))},function(e,t,n){var o=n(13),r=n(43).onFreeze;n(35)(\"freeze\",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(43).onFreeze;n(35)(\"seal\",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(43).onFreeze;n(35)(\"preventExtensions\",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13);n(35)(\"isFrozen\",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)(\"isSealed\",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)(\"isExtensible\",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(0);o(o.S+o.F,\"Object\",{assign:n(122)})},function(e,t,n){var o=n(0);o(o.S,\"Object\",{is:n(123)})},function(e,t,n){var o=n(0);o(o.S,\"Object\",{setPrototypeOf:n(91).set})},function(e,t,n){\"use strict\";var o=n(64),r={};r[n(14)(\"toStringTag\")]=\"z\",r+\"\"!=\"[object z]\"&&n(23)(Object.prototype,\"toString\",(function(){return\"[object \"+o(this)+\"]\"}),!0)},function(e,t,n){var o=n(0);o(o.P,\"Function\",{bind:n(124)})},function(e,t,n){var o=n(18).f,r=Function.prototype,i=/^\\s*function ([^ (]*)/;\"name\"in r||n(17)&&o(r,\"name\",{configurable:!0,get:function(){try{return(\"\"+this).match(i)[1]}catch(e){return\"\"}}})},function(e,t,n){\"use strict\";var o=n(13),r=n(51),i=n(14)(\"hasInstance\"),a=Function.prototype;i in a||n(18).f(a,i,{value:function(e){if(\"function\"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=r(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var o=n(0),r=n(126);o(o.G+o.F*(parseInt!=r),{parseInt:r})},function(e,t,n){var o=n(0),r=n(127);o(o.G+o.F*(parseFloat!=r),{parseFloat:r})},function(e,t,n){\"use strict\";var o=n(10),r=n(26),i=n(38),a=n(93),s=n(42),l=n(11),c=n(50).f,u=n(34).f,f=n(18).f,d=n(56).trim,p=o.Number,h=p,v=p.prototype,g=\"Number\"==i(n(49)(v)),y=\"trim\"in String.prototype,k=function(e){var t=s(e,!1);if(\"string\"==typeof t&&t.length>2){var n,o,r,i=(t=y?t.trim():d(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+t}for(var a,l=t.slice(2),c=0,u=l.length;cr)return NaN;return parseInt(l,o)}}return+t};if(!p(\" 0o1\")||!p(\"0b1\")||p(\"+0x1\")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(g?l((function(){v.valueOf.call(n)})):\"Number\"!=i(n))?a(new h(k(t)),n,p):k(t)};for(var b,m=n(17)?c(h):\"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger\".split(\",\"),w=0;m.length>w;w++)r(h,b=m[w])&&!r(p,b)&&f(p,b,u(h,b));p.prototype=v,v.constructor=p,n(23)(o,\"Number\",p)}},function(e,t,n){\"use strict\";var o=n(0),r=n(33),i=n(128),a=n(94),s=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u=\"Number.toFixed: incorrect invocation!\",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*c[n],c[n]=o%1e7,o=l(o/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=l(n/e),n=n%e*1e7},p=function(){for(var e=6,t=\"\";--e>=0;)if(\"\"!==t||0===e||0!==c[e]){var n=String(c[e]);t=\"\"===t?n:t+a.call(\"0\",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};o(o.P+o.F*(!!s&&(\"0.000\"!==8e-5.toFixed(3)||\"1\"!==.9.toFixed(0)||\"1.25\"!==1.255.toFixed(2)||\"1000000000000000128\"!==(0xde0b6b3a7640080).toFixed(0))||!n(11)((function(){s.call({})}))),\"Number\",{toFixed:function(e){var t,n,o,s,l=i(this,u),c=r(e),v=\"\",g=\"0\";if(c<0||c>20)throw RangeError(u);if(l!=l)return\"NaN\";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v=\"-\",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=c;o>=7;)f(1e7,0),o-=7;for(f(h(10,o,1),0),o=t-1;o>=23;)d(1<<23),o-=23;d(1<0?v+((s=g.length)<=c?\"0.\"+a.call(\"0\",c-s)+g:g.slice(0,s-c)+\".\"+g.slice(s-c)):v+g}})},function(e,t,n){\"use strict\";var o=n(0),r=n(11),i=n(128),a=1..toPrecision;o(o.P+o.F*(r((function(){return\"1\"!==a.call(1,void 0)}))||!r((function(){a.call({})}))),\"Number\",{toPrecision:function(e){var t=i(this,\"Number#toPrecision: incorrect invocation!\");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var o=n(0);o(o.S,\"Number\",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(0),r=n(10).isFinite;o(o.S,\"Number\",{isFinite:function(e){return\"number\"==typeof e&&r(e)}})},function(e,t,n){var o=n(0);o(o.S,\"Number\",{isInteger:n(129)})},function(e,t,n){var o=n(0);o(o.S,\"Number\",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(0),r=n(129),i=Math.abs;o(o.S,\"Number\",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){var o=n(0);o(o.S,\"Number\",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var o=n(0);o(o.S,\"Number\",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(0),r=n(127);o(o.S+o.F*(Number.parseFloat!=r),\"Number\",{parseFloat:r})},function(e,t,n){var o=n(0),r=n(126);o(o.S+o.F*(Number.parseInt!=r),\"Number\",{parseInt:r})},function(e,t,n){var o=n(0),r=n(130),i=Math.sqrt,a=Math.acosh;o(o.S+o.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),\"Math\",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:r(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var o=n(0),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),\"Math\",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var o=n(0),r=Math.atanh;o(o.S+o.F*!(r&&1/r(-0)<0),\"Math\",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var o=n(0),r=n(95);o(o.S,\"Math\",{cbrt:function(e){return r(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var o=n(0),r=Math.exp;o(o.S,\"Math\",{cosh:function(e){return(r(e=+e)+r(-e))/2}})},function(e,t,n){var o=n(0),r=n(96);o(o.S+o.F*(r!=Math.expm1),\"Math\",{expm1:r})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{fround:n(236)})},function(e,t,n){var o=n(95),r=Math.pow,i=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),l=r(2,-126);e.exports=Math.fround||function(e){var t,n,r=Math.abs(e),c=o(e);return rs||n!=n?c*(1/0):c*n}},function(e,t,n){var o=n(0),r=Math.abs;o(o.S,\"Math\",{hypot:function(e,t){for(var n,o,i=0,a=0,s=arguments.length,l=0;a0?(o=n/l)*o:n;return l===1/0?1/0:l*Math.sqrt(i)}})},function(e,t,n){var o=n(0),r=Math.imul;o(o.S+o.F*n(11)((function(){return-5!=r(4294967295,5)||2!=r.length})),\"Math\",{imul:function(e,t){var n=+e,o=+t,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{log1p:n(130)})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{sign:n(95)})},function(e,t,n){var o=n(0),r=n(96),i=Math.exp;o(o.S+o.F*n(11)((function(){return-2e-17!=!Math.sinh(-2e-17)})),\"Math\",{sinh:function(e){return Math.abs(e=+e)<1?(r(e)-r(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var o=n(0),r=n(96),i=Math.exp;o(o.S,\"Math\",{tanh:function(e){var t=r(e=+e),n=r(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var o=n(0);o(o.S,\"Math\",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var o=n(0),r=n(48),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),\"String\",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+\" is not a valid code point\");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join(\"\")}})},function(e,t,n){var o=n(0),r=n(28),i=n(15);o(o.S,\"String\",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){\"use strict\";var o=n(0),r=n(97)(!1);o(o.P,\"String\",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){\"use strict\";var o=n(0),r=n(15),i=n(99),a=\"\".endsWith;o(o.P+o.F*n(101)(\"endsWith\"),\"String\",{endsWith:function(e){var t=i(this,e,\"endsWith\"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),s=void 0===n?o:Math.min(r(n),o),l=String(e);return a?a.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){\"use strict\";var o=n(0),r=n(99);o(o.P+o.F*n(101)(\"includes\"),\"String\",{includes:function(e){return!!~r(this,e,\"includes\").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var o=n(0);o(o.P,\"String\",{repeat:n(94)})},function(e,t,n){\"use strict\";var o=n(0),r=n(15),i=n(99),a=\"\".startsWith;o(o.P+o.F*n(101)(\"startsWith\"),\"String\",{startsWith:function(e){var t=i(this,e,\"startsWith\"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return a?a.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){\"use strict\";n(24)(\"anchor\",(function(e){return function(t){return e(this,\"a\",\"name\",t)}}))},function(e,t,n){\"use strict\";n(24)(\"big\",(function(e){return function(){return e(this,\"big\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"blink\",(function(e){return function(){return e(this,\"blink\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"bold\",(function(e){return function(){return e(this,\"b\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"fixed\",(function(e){return function(){return e(this,\"tt\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"fontcolor\",(function(e){return function(t){return e(this,\"font\",\"color\",t)}}))},function(e,t,n){\"use strict\";n(24)(\"fontsize\",(function(e){return function(t){return e(this,\"font\",\"size\",t)}}))},function(e,t,n){\"use strict\";n(24)(\"italics\",(function(e){return function(){return e(this,\"i\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"link\",(function(e){return function(t){return e(this,\"a\",\"href\",t)}}))},function(e,t,n){\"use strict\";n(24)(\"small\",(function(e){return function(){return e(this,\"small\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"strike\",(function(e){return function(){return e(this,\"strike\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"sub\",(function(e){return function(){return e(this,\"sub\",\"\",\"\")}}))},function(e,t,n){\"use strict\";n(24)(\"sup\",(function(e){return function(){return e(this,\"sup\",\"\",\"\")}}))},function(e,t,n){var o=n(0);o(o.S,\"Date\",{now:function(){return(new Date).getTime()}})},function(e,t,n){\"use strict\";var o=n(0),r=n(22),i=n(42);o(o.P+o.F*n(11)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),\"Date\",{toJSON:function(e){var t=r(this),n=i(t);return\"number\"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var o=n(0),r=n(271);o(o.P+o.F*(Date.prototype.toISOString!==r),\"Date\",{toISOString:r})},function(e,t,n){\"use strict\";var o=n(11),r=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(e){return e>9?e:\"0\"+e};e.exports=o((function(){return\"0385-07-25T07:06:39.999Z\"!=i.call(new Date(-50000000000001))}))||!o((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(r.call(this)))throw RangeError(\"Invalid time value\");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),o=t<0?\"-\":t>9999?\"+\":\"\";return o+(\"00000\"+Math.abs(t)).slice(o?-6:-4)+\"-\"+a(e.getUTCMonth()+1)+\"-\"+a(e.getUTCDate())+\"T\"+a(e.getUTCHours())+\":\"+a(e.getUTCMinutes())+\":\"+a(e.getUTCSeconds())+\".\"+(n>99?n:\"0\"+a(n))+\"Z\"}:i},function(e,t,n){var o=Date.prototype,r=o.toString,i=o.getTime;new Date(NaN)+\"\"!=\"Invalid Date\"&&n(23)(o,\"toString\",(function(){var e=i.call(this);return e==e?r.call(this):\"Invalid Date\"}))},function(e,t,n){var o=n(14)(\"toPrimitive\"),r=Date.prototype;o in r||n(27)(r,o,n(274))},function(e,t,n){\"use strict\";var o=n(12),r=n(42);e.exports=function(e){if(\"string\"!==e&&\"number\"!==e&&\"default\"!==e)throw TypeError(\"Incorrect hint\");return r(o(this),\"number\"!=e)}},function(e,t,n){var o=n(0);o(o.S,\"Array\",{isArray:n(73)})},function(e,t,n){\"use strict\";var o=n(31),r=n(0),i=n(22),a=n(132),s=n(102),l=n(15),c=n(103),u=n(104);r(r.S+r.F*!n(74)((function(e){Array.from(e)})),\"Array\",{from:function(e){var t,n,r,f,d=i(e),p=\"function\"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,y=0,k=u(d);if(g&&(v=o(v,h>2?arguments[2]:void 0,2)),null==k||p==Array&&s(k))for(n=new p(t=l(d.length));t>y;y++)c(n,y,g?v(d[y],y):d[y]);else for(f=k.call(d),n=new p;!(r=f.next()).done;y++)c(n,y,g?a(f,v,[r.value,y],!0):r.value);return n.length=y,n}})},function(e,t,n){\"use strict\";var o=n(0),r=n(103);o(o.S+o.F*n(11)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),\"Array\",{of:function(){for(var e=0,t=arguments.length,n=new(\"function\"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){\"use strict\";var o=n(0),r=n(28),i=[].join;o(o.P+o.F*(n(62)!=Object||!n(29)(i)),\"Array\",{join:function(e){return i.call(r(this),void 0===e?\",\":e)}})},function(e,t,n){\"use strict\";var o=n(0),r=n(90),i=n(38),a=n(48),s=n(15),l=[].slice;o(o.P+o.F*n(11)((function(){r&&l.call(r)})),\"Array\",{slice:function(e,t){var n=s(this.length),o=i(this);if(t=void 0===t?n:t,\"Array\"==o)return l.call(this,e,t);for(var r=a(e,n),c=a(t,n),u=s(c-r),f=new Array(u),d=0;d1&&(o=Math.min(o,i(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}})},function(e,t,n){var o=n(0);o(o.P,\"Array\",{copyWithin:n(135)}),n(52)(\"copyWithin\")},function(e,t,n){var o=n(0);o(o.P,\"Array\",{fill:n(105)}),n(52)(\"fill\")},function(e,t,n){\"use strict\";var o=n(0),r=n(36)(5),i=!0;\"find\"in[]&&Array(1).find((function(){i=!1})),o(o.P+o.F*i,\"Array\",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(52)(\"find\")},function(e,t,n){\"use strict\";var o=n(0),r=n(36)(6),i=\"findIndex\",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,\"Array\",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(52)(i)},function(e,t,n){n(58)(\"Array\")},function(e,t,n){var o=n(10),r=n(93),i=n(18).f,a=n(50).f,s=n(100),l=n(75),c=o.RegExp,u=c,f=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(n(17)&&(!h||n(11)((function(){return p[n(14)(\"match\")]=!1,c(d)!=d||c(p)==p||\"/a/i\"!=c(d,\"i\")})))){c=function(e,t){var n=this instanceof c,o=s(e),i=void 0===t;return!n&&o&&e.constructor===c&&i?e:r(h?new u(o&&!i?e.source:e,t):u((o=e instanceof c)?e.source:e,o&&i?l.call(e):t),n?this:f,c)};for(var v=function(e){e in c||i(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},g=a(u),y=0;g.length>y;)v(g[y++]);f.constructor=c,c.prototype=f,n(23)(o,\"RegExp\",c)}n(58)(\"RegExp\")},function(e,t,n){\"use strict\";n(138);var o=n(12),r=n(75),i=n(17),a=/./.toString,s=function(e){n(23)(RegExp.prototype,\"toString\",e,!0)};n(11)((function(){return\"/a/b\"!=a.call({source:\"a\",flags:\"b\"})}))?s((function(){var e=o(this);return\"/\".concat(e.source,\"/\",\"flags\"in e?e.flags:!i&&e instanceof RegExp?r.call(e):void 0)})):\"toString\"!=a.name&&s((function(){return a.call(this)}))},function(e,t,n){\"use strict\";var o=n(12),r=n(15),i=n(108),a=n(76);n(77)(\"match\",1,(function(e,t,n,s){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=o(e),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var f,d=[],p=0;null!==(f=a(l,c));){var h=String(f[0]);d[p]=h,\"\"===h&&(l.lastIndex=i(c,r(l.lastIndex),u)),p++}return 0===p?null:d}]}))},function(e,t,n){\"use strict\";var o=n(12),r=n(22),i=n(15),a=n(33),s=n(108),l=n(76),c=Math.max,u=Math.min,f=Math.floor,d=/\\$([$&`']|\\d\\d?|<[^>]*>)/g,p=/\\$([$&`']|\\d\\d?)/g;n(77)(\"replace\",2,(function(e,t,n,h){return[function(o,r){var i=e(this),a=null==o?void 0:o[t];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},function(e,t){var r=h(n,e,this,t);if(r.done)return r.value;var f=o(e),d=String(this),p=\"function\"==typeof t;p||(t=String(t));var g=f.global;if(g){var y=f.unicode;f.lastIndex=0}for(var k=[];;){var b=l(f,d);if(null===b)break;if(k.push(b),!g)break;\"\"===String(b[0])&&(f.lastIndex=s(d,i(f.lastIndex),y))}for(var m,w=\"\",x=0,C=0;C=x&&(w+=d.slice(x,T)+O,x=T+S.length)}return w+d.slice(x)}];function v(e,t,o,i,a,s){var l=o+e.length,c=i.length,u=p;return void 0!==a&&(a=r(a),u=d),n.call(s,u,(function(n,r){var s;switch(r.charAt(0)){case\"$\":return\"$\";case\"&\":return e;case\"`\":return t.slice(0,o);case\"'\":return t.slice(l);case\"<\":s=a[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>c){var d=f(u/10);return 0===d?n:d<=c?void 0===i[d-1]?r.charAt(1):i[d-1]+r.charAt(1):n}s=i[u-1]}return void 0===s?\"\":s}))}}))},function(e,t,n){\"use strict\";var o=n(12),r=n(123),i=n(76);n(77)(\"search\",1,(function(e,t,n,a){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=o(e),l=String(this),c=s.lastIndex;r(c,0)||(s.lastIndex=0);var u=i(s,l);return r(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},function(e,t,n){\"use strict\";var o=n(100),r=n(12),i=n(65),a=n(108),s=n(15),l=n(76),c=n(107),u=n(11),f=Math.min,d=[].push,p=\"length\",h=!u((function(){RegExp(4294967295,\"y\")}));n(77)(\"split\",2,(function(e,t,n,u){var v;return v=\"c\"==\"abbc\".split(/(b)*/)[1]||4!=\"test\".split(/(?:)/,-1)[p]||2!=\"ab\".split(/(?:ab)*/)[p]||4!=\".\".split(/(.?)(.?)/)[p]||\".\".split(/()()/)[p]>1||\"\".split(/.?/)[p]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!o(e))return n.call(r,e,t);for(var i,a,s,l=[],u=(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.unicode?\"u\":\"\")+(e.sticky?\"y\":\"\"),f=0,h=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,u+\"g\");(i=c.call(v,r))&&!((a=v.lastIndex)>f&&(l.push(r.slice(f,i.index)),i[p]>1&&i.index=h));)v.lastIndex===i.index&&v.lastIndex++;return f===r[p]?!s&&v.test(\"\")||l.push(\"\"):l.push(r.slice(f)),l[p]>h?l.slice(0,h):l}:\"0\".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,o){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r,o):v.call(String(r),n,o)},function(e,t){var o=u(v,e,this,t,v!==n);if(o.done)return o.value;var c=r(e),d=String(this),p=i(c,RegExp),g=c.unicode,y=(c.ignoreCase?\"i\":\"\")+(c.multiline?\"m\":\"\")+(c.unicode?\"u\":\"\")+(h?\"y\":\"g\"),k=new p(h?c:\"^(?:\"+c.source+\")\",y),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===l(k,d)?[d]:[];for(var m=0,w=0,x=[];w0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,\"Map\"),e);return t&&t.v},set:function(e,t){return o.def(r(this,\"Map\"),0===e?0:e,t)}},o,!0)},function(e,t,n){\"use strict\";var o=n(142),r=n(53);e.exports=n(80)(\"Set\",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,\"Set\"),e=0===e?0:e,e)}},o)},function(e,t,n){\"use strict\";var o,r=n(10),i=n(36)(0),a=n(23),s=n(43),l=n(122),c=n(143),u=n(13),f=n(53),d=n(53),p=!r.ActiveXObject&&\"ActiveXObject\"in r,h=s.getWeak,v=Object.isExtensible,g=c.ufstore,y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},k={get:function(e){if(u(e)){var t=h(e);return!0===t?g(f(this,\"WeakMap\")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(f(this,\"WeakMap\"),e,t)}},b=e.exports=n(80)(\"WeakMap\",y,k,c,!0,!0);d&&p&&(l((o=c.getConstructor(y,\"WeakMap\")).prototype,k),s.NEED=!0,i([\"delete\",\"has\",\"get\",\"set\"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,r){if(u(t)&&!v(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return\"set\"==e?this:i}return n.call(this,t,r)}))})))},function(e,t,n){\"use strict\";var o=n(143),r=n(53);n(80)(\"WeakSet\",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,\"WeakSet\"),e,!0)}},o,!1,!0)},function(e,t,n){\"use strict\";var o=n(0),r=n(81),i=n(110),a=n(12),s=n(48),l=n(15),c=n(13),u=n(10).ArrayBuffer,f=n(65),d=i.ArrayBuffer,p=i.DataView,h=r.ABV&&u.isView,v=d.prototype.slice,g=r.VIEW;o(o.G+o.W+o.F*(u!==d),{ArrayBuffer:d}),o(o.S+o.F*!r.CONSTR,\"ArrayBuffer\",{isView:function(e){return h&&h(e)||c(e)&&g in e}}),o(o.P+o.U+o.F*n(11)((function(){return!new d(2).slice(1,void 0).byteLength})),\"ArrayBuffer\",{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,o=s(e,n),r=s(void 0===t?n:t,n),i=new(f(this,d))(l(r-o)),c=new p(this),u=new p(i),h=0;o=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),o(o.S,\"Reflect\",{enumerate:function(e){return new i(e)}})},function(e,t,n){var o=n(34),r=n(51),i=n(26),a=n(0),s=n(13),l=n(12);a(a.S,\"Reflect\",{get:function e(t,n){var a,c,u=arguments.length<3?t:arguments[2];return l(t)===u?t[n]:(a=o.f(t,n))?i(a,\"value\")?a.value:void 0!==a.get?a.get.call(u):void 0:s(c=r(t))?e(c,n,u):void 0}})},function(e,t,n){var o=n(34),r=n(0),i=n(12);r(r.S,\"Reflect\",{getOwnPropertyDescriptor:function(e,t){return o.f(i(e),t)}})},function(e,t,n){var o=n(0),r=n(51),i=n(12);o(o.S,\"Reflect\",{getPrototypeOf:function(e){return r(i(e))}})},function(e,t,n){var o=n(0);o(o.S,\"Reflect\",{has:function(e,t){return t in e}})},function(e,t,n){var o=n(0),r=n(12),i=Object.isExtensible;o(o.S,\"Reflect\",{isExtensible:function(e){return r(e),!i||i(e)}})},function(e,t,n){var o=n(0);o(o.S,\"Reflect\",{ownKeys:n(145)})},function(e,t,n){var o=n(0),r=n(12),i=Object.preventExtensions;o(o.S,\"Reflect\",{preventExtensions:function(e){r(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var o=n(18),r=n(34),i=n(51),a=n(26),s=n(0),l=n(44),c=n(12),u=n(13);s(s.S,\"Reflect\",{set:function e(t,n,s){var f,d,p=arguments.length<4?t:arguments[3],h=r.f(c(t),n);if(!h){if(u(d=i(t)))return e(d,n,s,p);h=l(0)}if(a(h,\"value\")){if(!1===h.writable||!u(p))return!1;if(f=r.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,o.f(p,n,f)}else o.f(p,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(e,t,n){var o=n(0),r=n(91);r&&o(o.S,\"Reflect\",{setPrototypeOf:function(e,t){r.check(e,t);try{return r.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(334),e.exports=n(16).Array.includes},function(e,t,n){\"use strict\";var o=n(0),r=n(71)(!0);o(o.P,\"Array\",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(52)(\"includes\")},function(e,t,n){n(336),e.exports=n(16).Array.flatMap},function(e,t,n){\"use strict\";var o=n(0),r=n(337),i=n(22),a=n(15),s=n(32),l=n(133);o(o.P,\"Array\",{flatMap:function(e){var t,n,o=i(this);return s(e),t=a(o.length),n=l(o,0),r(n,o,o,t,0,1,e,arguments[1]),n}}),n(52)(\"flatMap\")},function(e,t,n){\"use strict\";var o=n(73),r=n(13),i=n(15),a=n(31),s=n(14)(\"isConcatSpreadable\");e.exports=function e(t,n,l,c,u,f,d,p){for(var h,v,g=u,y=0,k=!!d&&a(d,p,3);y0)g=e(t,n,h,i(h.length),g,f-1)-1;else{if(g>=9007199254740991)throw TypeError();t[g]=h}g++}y++}return g}},function(e,t,n){n(339),e.exports=n(16).String.padStart},function(e,t,n){\"use strict\";var o=n(0),r=n(146),i=n(79),a=/Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(i);o(o.P+o.F*a,\"String\",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(341),e.exports=n(16).String.padEnd},function(e,t,n){\"use strict\";var o=n(0),r=n(146),i=n(79),a=/Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(i);o(o.P+o.F*a,\"String\",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(343),e.exports=n(16).String.trimLeft},function(e,t,n){\"use strict\";n(56)(\"trimLeft\",(function(e){return function(){return e(this,1)}}),\"trimStart\")},function(e,t,n){n(345),e.exports=n(16).String.trimRight},function(e,t,n){\"use strict\";n(56)(\"trimRight\",(function(e){return function(){return e(this,2)}}),\"trimEnd\")},function(e,t,n){n(347),e.exports=n(87).f(\"asyncIterator\")},function(e,t,n){n(118)(\"asyncIterator\")},function(e,t,n){n(349),e.exports=n(16).Object.getOwnPropertyDescriptors},function(e,t,n){var o=n(0),r=n(145),i=n(28),a=n(34),s=n(103);o(o.S,\"Object\",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=a.f,c=r(o),u={},f=0;c.length>f;)void 0!==(n=l(o,t=c[f++]))&&s(u,t,n);return u}})},function(e,t,n){n(351),e.exports=n(16).Object.values},function(e,t,n){var o=n(0),r=n(147)(!1);o(o.S,\"Object\",{values:function(e){return r(e)}})},function(e,t,n){n(353),e.exports=n(16).Object.entries},function(e,t,n){var o=n(0),r=n(147)(!0);o(o.S,\"Object\",{entries:function(e){return r(e)}})},function(e,t,n){\"use strict\";n(139),n(355),e.exports=n(16).Promise.finally},function(e,t,n){\"use strict\";var o=n(0),r=n(16),i=n(10),a=n(65),s=n(141);o(o.P+o.R,\"Promise\",{finally:function(e){var t=a(this,r.Promise||i.Promise),n=\"function\"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(357),n(358),n(359),e.exports=n(16)},function(e,t,n){var o=n(10),r=n(0),i=n(79),a=[].slice,s=/MSIE .\\./.test(i),l=function(e){return function(t,n){var o=arguments.length>2,r=!!o&&a.call(arguments,2);return e(o?function(){(\"function\"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};r(r.G+r.B+r.F*s,{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(e,t,n){var o=n(0),r=n(109);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(106),r=n(47),i=n(23),a=n(10),s=n(27),l=n(57),c=n(14),u=c(\"iterator\"),f=c(\"toStringTag\"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=r(p),v=0;v=0;--r){var i=this.tryEntries[r],a=i.completion;if(\"root\"===i.tryLoc)return o(\"end\");if(i.tryLoc<=this.prev){var s=n.call(i,\"catchLoc\"),l=n.call(i,\"finallyLoc\");if(s&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,\"finallyLoc\")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(\"throw\"===o.type){var r=o.arg;S(n)}return r}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},\"next\"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=o}catch(e){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=o:Function(\"r\",\"regeneratorRuntime = r\")(o)}},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(365),n(366),n(367),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f){\"use strict\";var d=n(1);function p(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var h=function(){function e(t){var n=this;(0,i.default)(this,e);var o=function(){};f.isObject(t)&&f.isFunction(t.onReady)&&(o=t.onReady);var r=new u.default(t);this.isReady=r.isReady.then((function(){n.exportAPI(r),o()}))}return(0,s.default)(e,[{key:\"exportAPI\",value:function(e){var t=this;[\"configuration\"].forEach((function(n){t[n]=e[n]})),this.destroy=function(){for(var n in Object.values(e.moduleInstances).forEach((function(e){f.isFunction(e.destroy)&&e.destroy(),e.listeners.removeAll()})),e=null,t)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];Object.setPrototypeOf(t,null)},Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:\"clear\",render:\"render\"},caret:{focus:\"focus\"},events:{on:\"on\",off:\"off\",emit:\"emit\"},saver:{save:\"save\"}}).forEach((function(n){var o=(0,r.default)(n,2),i=o[0],a=o[1];Object.entries(a).forEach((function(n){var o=(0,r.default)(n,2),a=o[0],s=o[1];t[s]=e.moduleInstances.API.methods[i][a]}))}))}}],[{key:\"version\",get:function(){return\"2.26.5\"}}]),e}();o.default=h,h.displayName=\"EditorJS\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=n){var o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){}e.exports=Object.assign(n,{default:n,register:n,revert:function(){},__esModule:!0})},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[],void 0===(i=\"function\"==typeof(o=function(){\"use strict\";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){var t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(e))})),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){e=0===arguments.length||!!e;var t=this.parentNode,n=window.getComputedStyle(t,null),o=parseInt(n.getPropertyValue(\"border-top-width\")),r=parseInt(n.getPropertyValue(\"border-left-width\")),i=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,s=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=i&&!a;(i||a)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(s||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-r+this.clientWidth/2),(i||a||s||l)&&!e&&this.scrollIntoView(c)})})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(19),n(8),n(54),n(151),n(82)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){\"use strict\";var h=n(1);function v(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u),f=h(f),p=h(p);var g=n(376),y=[];g.keys().forEach((function(e){e.match(/^\\.\\/[^_][\\w/]*\\.([tj])s$/)&&y.push(g(e))}));var k=function(){function e(t){var n,o,a=this;(0,s.default)(this,e),this.moduleInstances={},this.eventsDispatcher=new p.default,this.isReady=new Promise((function(e,t){n=e,o=t})),Promise.resolve().then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.configuration=t,e.next=3,a.validate();case 3:return e.next=5,a.init();case 5:return e.next=7,a.start();case 7:u.logLabeled(\"I'm ready! (ノ◕ヮ◕)ノ*:・゚✧\",\"log\",\"\",\"color: #E24A75\"),setTimeout((0,i.default)(r.default.mark((function e(){var t,o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.render();case 2:a.configuration.autofocus&&(t=a.moduleInstances,o=t.BlockManager,(i=t.Caret).setToBlock(o.blocks[0],i.positions.START),o.highlightCurrentNode()),a.moduleInstances.UI.removeLoader(),n();case 5:case\"end\":return e.stop()}}),e)}))),500);case 9:case\"end\":return e.stop()}}),e)})))).catch((function(e){u.log(\"Editor.js is not ready because of \".concat(e),\"error\"),o(e)}))}var t,n;return(0,l.default)(e,[{key:\"configuration\",get:function(){return this.config},set:function(e){var t,n;u.isObject(e)?this.config=Object.assign({},e):this.config={holder:e},u.deprecationAssert(!!this.config.holderId,\"config.holderId\",\"config.holder\"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),null==this.config.holder&&(this.config.holder=\"editorjs\"),this.config.logLevel||(this.config.logLevel=u.LogLevels.VERBOSE),u.setLogLevel(this.config.logLevel),u.deprecationAssert(Boolean(this.config.initialBlock),\"config.initialBlock\",\"config.defaultBlock\"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||\"paragraph\",this.config.minHeight=void 0!==this.config.minHeight?this.config.minHeight:300;var o={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||function(){},this.config.onChange=this.config.onChange||function(){},this.config.inlineToolbar=void 0===this.config.inlineToolbar||this.config.inlineToolbar,!u.isEmpty(this.config.data)&&this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data={blocks:[o]}),this.config.readOnly=this.config.readOnly||!1,(null===(t=this.config.i18n)||void 0===t?void 0:t.messages)&&f.default.setDictionary(this.config.i18n.messages),this.config.i18n.direction=(null===(n=this.config.i18n)||void 0===n?void 0:n.direction)||\"ltr\"}},{key:\"validate\",value:(n=(0,i.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,n=t.holderId,o=t.holder,!n||!o){e.next=3;break}throw Error(\"«holderId» and «holder» param can't assign at the same time.\");case 3:if(!u.isString(o)||c.default.get(o)){e.next=5;break}throw Error(\"element with ID «\".concat(o,\"» is missing. Pass correct holder's ID.\"));case 5:if(!o||!u.isObject(o)||c.default.isElement(o)){e.next=7;break}throw Error(\"«holder» value must be an Element node\");case 7:case\"end\":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:\"init\",value:function(){this.constructModules(),this.configureModules()}},{key:\"start\",value:(t=(0,i.default)(r.default.mark((function e(){var t,n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[\"Tools\",\"UI\",\"BlockManager\",\"Paste\",\"BlockSelection\",\"RectangleSelection\",\"CrossBlockSelection\",\"ReadOnly\"],e.next=3,t.reduce((function(e,t){return e.then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.moduleInstances[t].prepare();case 3:e.next=10;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(e.t0 instanceof d.CriticalError)){e.next=9;break}throw new Error(e.t0.message);case 9:u.log(\"Module \".concat(t,\" was skipped because of %o\"),\"warn\",e.t0);case 10:case\"end\":return e.stop()}}),e,null,[[0,5]])}))))}),Promise.resolve());case 3:case\"end\":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:\"render\",value:function(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}},{key:\"constructModules\",value:function(){var e=this;y.forEach((function(t){var n=u.isFunction(t)?t:t.default;try{e.moduleInstances[n.displayName]=new n({config:e.configuration,eventsDispatcher:e.eventsDispatcher})}catch(e){u.log(\"Module \".concat(n.displayName,\" skipped because\"),\"error\",e)}}))}},{key:\"configureModules\",value:function(){for(var e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}},{key:\"getModulesDiff\",value:function(e){var t={};for(var n in this.moduleInstances)n!==e&&(t[n]=this.moduleInstances[n]);return t}}]),e}();o.default=k,k.displayName=\"Core\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(7).default;function r(){\"use strict\";e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s=\"function\"==typeof Symbol?Symbol:{},l=s.iterator||\"@@iterator\",c=s.asyncIterator||\"@@asyncIterator\",u=s.toStringTag||\"@@toStringTag\";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},\"\")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,o){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),s=new M(o||[]);return a(i,\"_invoke\",{value:S(e,n,s)}),i}function p(e,t,n){try{return{type:\"normal\",arg:e.call(t,n)}}catch(e){return{type:\"throw\",arg:e}}}t.wrap=d;var h={};function v(){}function g(){}function y(){}var k={};f(k,l,(function(){return this}));var b=Object.getPrototypeOf,m=b&&b(b(_([])));m&&m!==n&&i.call(m,l)&&(k=m);var w=y.prototype=v.prototype=Object.create(k);function x(e){[\"next\",\"throw\",\"return\"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){var n;a(this,\"_invoke\",{value:function(r,a){function s(){return new t((function(n,s){!function n(r,a,s,l){var c=p(e[r],e,a);if(\"throw\"!==c.type){var u=c.arg,f=u.value;return f&&\"object\"==o(f)&&i.call(f,\"__await\")?t.resolve(f.__await).then((function(e){n(\"next\",e,s,l)}),(function(e){n(\"throw\",e,s,l)})):t.resolve(f).then((function(e){u.value=e,s(u)}),(function(e){return n(\"throw\",e,s,l)}))}l(c.arg)}(r,a,n,s)}))}return n=n?n.then(s,s):s()}})}function S(e,t,n){var o=\"suspendedStart\";return function(r,i){if(\"executing\"===o)throw new Error(\"Generator is already running\");if(\"completed\"===o){if(\"throw\"===r)throw i;return O()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===h)continue;return s}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(\"suspendedStart\"===o)throw o=\"completed\",n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);o=\"executing\";var l=p(e,t,n);if(\"normal\"===l.type){if(o=n.done?\"completed\":\"suspendedYield\",l.arg===h)continue;return{value:l.arg,done:n.done}}\"throw\"===l.type&&(o=\"completed\",n.method=\"throw\",n.arg=l.arg)}}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,\"throw\"===t.method){if(e.iterator.return&&(t.method=\"return\",t.arg=void 0,T(e,t),\"throw\"===t.method))return h;t.method=\"throw\",t.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return h}var o=p(n,e.iterator,t.arg);if(\"throw\"===o.type)return t.method=\"throw\",t.arg=o.arg,t.delegate=null,h;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,\"return\"!==t.method&&(t.method=\"next\",t.arg=void 0),t.delegate=null,h):r:(t.method=\"throw\",t.arg=new TypeError(\"iterator result is not an object\"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[l];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var r=this.tryEntries[o],a=r.completion;if(\"root\"===r.tryLoc)return n(\"end\");if(r.tryLoc<=this.prev){var s=i.call(r,\"catchLoc\"),l=i.call(r,\"finallyLoc\");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,\"finallyLoc\")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(\"throw\"===o.type){var r=o.arg;B(n)}return r}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},\"next\"===this.method&&(this.arg=void 0),h}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(149);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf(\"[native code]\")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(111),r=n(375);function i(t,n,a){return r()?(e.exports=i=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o={\"./api\":83,\"./api/\":83,\"./api/blocks\":154,\"./api/blocks.ts\":154,\"./api/caret\":155,\"./api/caret.ts\":155,\"./api/events\":156,\"./api/events.ts\":156,\"./api/i18n\":157,\"./api/i18n.ts\":157,\"./api/index\":83,\"./api/index.ts\":83,\"./api/inlineToolbar\":158,\"./api/inlineToolbar.ts\":158,\"./api/listeners\":159,\"./api/listeners.ts\":159,\"./api/notifier\":160,\"./api/notifier.ts\":160,\"./api/readonly\":161,\"./api/readonly.ts\":161,\"./api/sanitizer\":162,\"./api/sanitizer.ts\":162,\"./api/saver\":163,\"./api/saver.ts\":163,\"./api/selection\":164,\"./api/selection.ts\":164,\"./api/styles\":165,\"./api/styles.ts\":165,\"./api/toolbar\":166,\"./api/toolbar.ts\":166,\"./api/tooltip\":167,\"./api/tooltip.ts\":167,\"./api/ui\":168,\"./api/ui.ts\":168,\"./blockEvents\":169,\"./blockEvents.ts\":169,\"./blockManager\":170,\"./blockManager.ts\":170,\"./blockSelection\":171,\"./blockSelection.ts\":171,\"./caret\":172,\"./caret.ts\":172,\"./crossBlockSelection\":173,\"./crossBlockSelection.ts\":173,\"./dragNDrop\":174,\"./dragNDrop.ts\":174,\"./modificationsObserver\":175,\"./modificationsObserver.ts\":175,\"./paste\":176,\"./paste.ts\":176,\"./readonly\":177,\"./readonly.ts\":177,\"./rectangleSelection\":178,\"./rectangleSelection.ts\":178,\"./renderer\":179,\"./renderer.ts\":179,\"./saver\":180,\"./saver.ts\":180,\"./toolbar\":84,\"./toolbar/\":84,\"./toolbar/blockSettings\":181,\"./toolbar/blockSettings.ts\":181,\"./toolbar/conversion\":182,\"./toolbar/conversion.ts\":182,\"./toolbar/index\":84,\"./toolbar/index.ts\":84,\"./toolbar/inline\":183,\"./toolbar/inline.ts\":183,\"./tools\":184,\"./tools.ts\":184,\"./ui\":186,\"./ui.ts\":186};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error(\"Cannot find module '\"+e+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=376},function(e,t,n){var o=n(4);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(379)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:\"show\",value:function(e){a.default.show(e)}}]),e}();o.default=l,l.displayName=\"Notifier\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"/\",n(n.s=0)}([function(e,t,n){\"use strict\";n(1),e.exports=function(){var e=n(6),t=null;return{show:function(n){if(n.message){!function(){if(t)return!0;t=e.getWrapper(),document.body.appendChild(t)}();var o=null,r=n.time||8e3;switch(n.type){case\"confirm\":o=e.confirm(n);break;case\"prompt\":o=e.prompt(n);break;default:o=e.alert(n),window.setTimeout((function(){o.remove()}),r)}t.appendChild(o),o.classList.add(\"cdx-notify--bounce-in\")}}}}()},function(e,t,n){var o=n(2);\"string\"==typeof o&&(o=[[e.i,o,\"\"]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\\'\\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\\'\\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',\"\"])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||\"\",r=e[3];if(!r)return o;if(t&&\"function\"==typeof btoa){var i=(n=r,\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+\" */\"),a=r.sources.map((function(e){return\"/*# sourceURL=\"+r.sourceRoot+e+\" */\"}));return[o].concat(a).concat([i]).join(\"\\n\")}return[o].join(\"\\n\")}(t,e);return t[2]?\"@media \"+t[2]+\"{\"+n+\"}\":n})).join(\"\")},t.i=function(e,n){\"string\"==typeof e&&(e=[[null,e,\"\"]]);for(var o={},r=0;r=0&&u.splice(t,1)}function g(e){var t=document.createElement(\"style\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function k(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=g(t)),o=w.bind(null,n,a,!1),r=w.bind(null,n,a,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(e){var t=document.createElement(\"link\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),e.attrs.rel=\"stylesheet\",y(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+\" */\");var a=new Blob([o],{type:\"text/css\"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute(\"media\",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){v(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var n=p(e,t);return d(n,t),function(e){for(var o=[],r=0;r0;)t.insertBefore(l.childNodes[0],l);t.removeChild(l),this._sanitize(e,t);break}for(var v=0;v{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener(\"scroll\",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:\"ct\",tooltipContent:\"ct__content\",tooltipShown:\"ct--shown\",placement:{left:\"ct--left\",bottom:\"ct--bottom\",right:\"ct--right\",top:\"ct--top\"}}}show(e,t,n){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const o=Object.assign({placement:\"bottom\",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},n);if(o.hidingDelay&&(this.hidingDelay=o.hidingDelay),this.nodes.content.innerHTML=\"\",\"string\"==typeof t)this.nodes.content.appendChild(document.createTextNode(t));else{if(!(t instanceof Node))throw Error(\"[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But \"+typeof t+\" given.\");this.nodes.content.appendChild(t)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case\"top\":this.placeTop(e,o);break;case\"left\":this.placeLeft(e,o);break;case\"right\":this.placeRight(e,o);break;case\"bottom\":default:this.placeBottom(e,o)}o&&o.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},o.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(e=!1){if(this.hidingDelay&&!e)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(e,t,n){e.addEventListener(\"mouseenter\",()=>{this.show(e,t,n)}),e.addEventListener(\"mouseleave\",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener(\"scroll\",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make(\"div\",this.CSS.tooltip),this.nodes.content=this.make(\"div\",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const e=\"codex-tooltips-style\";if(document.getElementById(e))return;const t=n(2),o=this.make(\"style\",null,{textContent:t.toString(),id:e});this.prepend(document.head,o)}placeBottom(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.bottom+window.pageYOffset+this.offsetTop+t.marginTop;this.applyPlacement(\"bottom\",o,r)}placeTop(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement(\"top\",o,r)}placeLeft(e,t){const n=e.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-t.marginLeft,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement(\"left\",o,r)}placeRight(e,t){const n=e.getBoundingClientRect(),o=n.right+this.offsetRight+t.marginRight,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement(\"right\",o,r)}applyPlacement(e,t,n){this.nodes.wrapper.classList.add(this.CSS.placement[e]),this.nodes.wrapper.style.left=t+\"px\",this.nodes.wrapper.style.top=n+\"px\"}make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o}append(e,t){Array.isArray(t)?t.forEach(t=>e.appendChild(t)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach(t=>e.prepend(t)):e.prepend(t)}}},function(e,t){e.exports='.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:\"\";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url(\"\")){.ct:before{border-radius:0;-webkit-mask-box-image:url(\\'data:image/svg+xml;charset=utf-8,\\') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:\"\";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}'}]).default},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(19),n(8),n(25)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c){\"use strict\";var u=n(1);function f(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l),c=u(c);var d=function(){function e(t,n){(0,r.default)(this,e),this.cursor=-1,this.items=[],this.items=t||[],this.focusedCssClass=n}return(0,i.default)(e,[{key:\"currentItem\",get:function(){return-1===this.cursor?null:this.items[this.cursor]}},{key:\"setCursor\",value:function(e){e=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}},{key:\"setItems\",value:function(e){this.items=e}},{key:\"next\",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.RIGHT)}},{key:\"previous\",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.LEFT)}},{key:\"dropCursor\",value:function(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}},{key:\"leafNodesAndReturnIndex\",value:function(t){var n=this;if(0===this.items.length)return this.cursor;var o=this.cursor;return-1===o?o=t===e.directions.RIGHT?-1:0:this.items[o].classList.remove(this.focusedCssClass),o=t===e.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length,s.default.canSetCaret(this.items[o])&&l.delay((function(){return c.default.setCursor(n.items[o])}),50)(),this.items[o].classList.add(this.focusedCssClass),o}}]),e}();o.default=d,d.displayName=\"DomIterator\",d.directions={RIGHT:\"right\",LEFT:\"left\"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19),n(61)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c){\"use strict\";var u=n(1);function f(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=u(l);var d=function(){function e(t){(0,r.default)(this,e),this.blocks=[],this.workingArea=t}return(0,i.default)(e,[{key:\"length\",get:function(){return this.blocks.length}},{key:\"array\",get:function(){return this.blocks}},{key:\"nodes\",get:function(){return s.array(this.workingArea.children)}},{key:\"push\",value:function(e){this.blocks.push(e),this.insertToDOM(e)}},{key:\"swap\",value:function(e,t){var n=this.blocks[t];l.default.swap(this.blocks[e].holder,n.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=n}},{key:\"move\",value:function(e,t){var n=this.blocks.splice(t,1)[0],o=e-1,r=Math.max(0,o),i=this.blocks[r];e>0?this.insertToDOM(n,\"afterend\",i):this.insertToDOM(n,\"beforebegin\",i),this.blocks.splice(e,0,n);var a=this.composeBlockEvent(\"move\",{fromIndex:t,toIndex:e});n.call(c.BlockToolAPI.MOVED,a)}},{key:\"insert\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.length){e>this.length&&(e=this.length),n&&(this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED));var o=n?1:0;if(this.blocks.splice(e,o,t),e>0){var r=this.blocks[e-1];this.insertToDOM(t,\"afterend\",r)}else{var i=this.blocks[e+1];i?this.insertToDOM(t,\"beforebegin\",i):this.insertToDOM(t)}}else this.push(t)}},{key:\"remove\",value:function(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED),this.blocks.splice(e,1)}},{key:\"removeAll\",value:function(){this.workingArea.innerHTML=\"\",this.blocks.forEach((function(e){return e.call(c.BlockToolAPI.REMOVED)})),this.blocks.length=0}},{key:\"insertAfter\",value:function(e,t){var n=this.blocks.indexOf(e);this.insert(n+1,t)}},{key:\"get\",value:function(e){return this.blocks[e]}},{key:\"indexOf\",value:function(e){return this.blocks.indexOf(e)}},{key:\"insertToDOM\",value:function(e,t,n){t?n.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(c.BlockToolAPI.RENDERED)}},{key:\"composeBlockEvent\",value:function(e,t){return new CustomEvent(e,{detail:t})}}],[{key:\"set\",value:function(e,t,n){return isNaN(Number(t))?(Reflect.set(e,t,n),!0):(e.insert(+t,n),!0)}},{key:\"get\",value:function(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}}]),e}();o.default=d,d.displayName=\"Blocks\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t],void 0===(i=\"function\"==typeof(o=function(e){\"use strict\";var t;Object.defineProperty(e,\"__esModule\",{value:!0}),e.BlockMutationType=void 0,e.BlockMutationType=t,function(e){e.Added=\"block-added\",e.Removed=\"block-removed\",e.Moved=\"block-moved\",e.Changed=\"block-changed\"}(t||(e.BlockMutationType=t={}))})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=0)}([function(e,t,n){\"use strict\";function o(e,t){for(var n=0;n=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.ToolboxEvent=C,function(e){e.Opened=\"toolbox-opened\",e.Closed=\"toolbox-closed\",e.BlockAdded=\"toolbox-block-added\"}(C||(e.ToolboxEvent=C={}));var T=function(e){(0,l.default)(c,e);var n,a=x(c);function c(e){var t,n=e.api,o=e.tools,i=e.i18nLabels;return(0,r.default)(this,c),(t=a.call(this)).opened=!1,t.nodes={toolbox:null},t.onOverlayClicked=function(){t.close()},t.api=n,t.tools=o,t.i18nLabels=i,t}return(0,i.default)(c,[{key:\"isEmpty\",get:function(){return 0===this.toolsToBeDisplayed.length}},{key:\"make\",value:function(){return this.popover=new g.default({scopeElement:this.api.ui.nodes.redactor,className:c.CSS.toolbox,searchable:!0,filterLabel:this.i18nLabels.filter,nothingFoundLabel:this.i18nLabels.nothingFound,items:this.toolboxItemsToBeDisplayed}),this.popover.on(g.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.enableShortcuts(),this.nodes.toolbox=this.popover.getElement(),this.nodes.toolbox}},{key:\"hasFocus\",value:function(){var e;return null===(e=this.popover)||void 0===e?void 0:e.hasFocus()}},{key:\"destroy\",value:function(){var e;(0,s.default)((0,u.default)(c.prototype),\"destroy\",this).call(this),this.nodes&&this.nodes.toolbox&&(this.nodes.toolbox.remove(),this.nodes.toolbox=null),this.removeAllShortcuts(),null===(e=this.popover)||void 0===e||e.off(g.PopoverEvent.OverlayClicked,this.onOverlayClicked)}},{key:\"toolButtonActivated\",value:function(e,t){this.insertNewBlock(e,t)}},{key:\"open\",value:function(){var e;this.isEmpty||(null===(e=this.popover)||void 0===e||e.show(),this.opened=!0,this.emit(C.Opened))}},{key:\"close\",value:function(){var e;null===(e=this.popover)||void 0===e||e.hide(),this.opened=!1,this.emit(C.Closed)}},{key:\"toggle\",value:function(){this.opened?this.close():this.open()}},{key:\"toolsToBeDisplayed\",get:function(){var e=[];return this.tools.forEach((function(t){t.toolbox&&e.push(t)})),e}},{key:\"toolboxItemsToBeDisplayed\",get:function(){var e=this,t=function(t,n){return{icon:t.icon,title:y.default.t(k.I18nInternalNS.toolNames,t.title||d.capitalize(n.name)),name:n.name,onActivate:function(){e.toolButtonActivated(n.name,t.data)},secondaryLabel:n.shortcut?d.beautifyShortcut(n.shortcut):\"\"}};return this.toolsToBeDisplayed.reduce((function(e,n){return Array.isArray(n.toolbox)?n.toolbox.forEach((function(o){e.push(t(o,n))})):void 0!==n.toolbox&&e.push(t(n.toolbox,n)),e}),[])}},{key:\"enableShortcuts\",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&e.enableShortcutForTool(t.name,n)}))}},{key:\"enableShortcutForTool\",value:function(e,t){var n=this;h.default.add({name:t,on:this.api.ui.nodes.redactor,handler:function(t){t.preventDefault(),n.insertNewBlock(e)}})}},{key:\"removeAllShortcuts\",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&h.default.remove(e.api.ui.nodes.redactor,n)}))}},{key:\"insertNewBlock\",value:(n=(0,o.default)(t.default.mark((function e(n,o){var r,i,a,s,l,c;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(r)){e.next=4;break}return e.abrupt(\"return\");case 4:if(a=i.isEmpty?r:r+1,!o){e.next=10;break}return e.next=8,this.api.blocks.composeBlockData(n);case 8:l=e.sent,s=Object.assign(l,o);case 10:(c=this.api.blocks.insert(n,s,void 0,a,void 0,i.isEmpty)).call(p.BlockToolAPI.APPEND_CALLBACK),this.api.caret.setToBlock(a),this.emit(C.BlockAdded,{block:c}),this.api.toolbar.close();case 15:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})}],[{key:\"CSS\",get:function(){return{toolbox:\"ce-toolbox\"}}}]),c}(v.default);e.default=T,T.displayName=\"Toolbox\",S([d.cacheable],T.prototype,\"toolsToBeDisplayed\",null),S([d.cacheable],T.prototype,\"toolboxItemsToBeDisplayed\",null)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(19),n(112),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l){\"use strict\";var c=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=c(r),i=c(i),a=c(a),s=c(s);var u=function(){function e(t){var n=t.items,o=t.onSearch,i=t.placeholder;(0,r.default)(this,e),this.listeners=new s.default,this.items=n,this.onSearch=o,this.render(i)}return(0,i.default)(e,[{key:\"getElement\",value:function(){return this.wrapper}},{key:\"focus\",value:function(){this.input.focus()}},{key:\"clear\",value:function(){this.input.value=\"\",this.searchQuery=\"\",this.onSearch(this.foundItems)}},{key:\"destroy\",value:function(){this.listeners.removeAll()}},{key:\"render\",value:function(t){var n=this;this.wrapper=a.default.make(\"div\",e.CSS.wrapper);var o=a.default.make(\"div\",e.CSS.icon,{innerHTML:l.IconSearch});this.input=a.default.make(\"input\",e.CSS.input,{placeholder:t}),this.wrapper.appendChild(o),this.wrapper.appendChild(this.input),this.listeners.on(this.input,\"input\",(function(){n.searchQuery=n.input.value,n.onSearch(n.foundItems)}))}},{key:\"foundItems\",get:function(){var e=this;return this.items.filter((function(t){return e.checkItem(t)}))}},{key:\"checkItem\",value:function(e){var t,n=(null===(t=e.title)||void 0===t?void 0:t.toLowerCase())||\"\",o=this.searchQuery.toLowerCase();return n.includes(o)}}],[{key:\"CSS\",get:function(){return{wrapper:\"cdx-search-field\",icon:\"cdx-search-field__icon\",input:\"cdx-search-field__input\"}}}]),e}();o.default=u,u.displayName=\"SearchInput\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:\"lock\",value:function(){a.isIosDevice?this.lockHard():document.body.classList.add(e.CSS.scrollLocked)}},{key:\"unlock\",value:function(){a.isIosDevice?this.unlockHard():document.body.classList.remove(e.CSS.scrollLocked)}},{key:\"lockHard\",value:function(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty(\"--window-scroll-offset\",\"\".concat(this.scrollPosition,\"px\")),document.body.classList.add(e.CSS.scrollLockedHard)}},{key:\"unlockHard\",value:function(){document.body.classList.remove(e.CSS.scrollLockedHard),null!==this.scrollPosition&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}}]),e}();o.default=l,l.displayName=\"ScrollLocker\",l.CSS={scrollLocked:\"ce-scroll-locked\",scrollLockedHard:\"ce-scroll-locked--hard\"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t],void 0===(i=\"function\"==typeof(o=function(e){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.resolveAliases=function(e,t){var n={};return Object.keys(e).forEach((function(o){var r=t[o];void 0!==r?n[r]=e[o]:n[o]=e[o]})),n}})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"/\",n(n.s=4)}([function(e,t,n){var o=n(1),r=n(2);\"string\"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,\"\"]]),o(r,{insert:\"head\",singleton:!1}),e.exports=r.locals||{}},function(e,t,n){\"use strict\";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n',title:\"Text\"}}}]),e}()}]).default},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e),this.commandName=\"bold\",this.CSS={button:\"ce-inline-tool\",buttonActive:\"ce-inline-tool--active\",buttonModifier:\"ce-inline-tool--bold\"},this.nodes={button:void 0}}return(0,i.default)(e,[{key:\"render\",value:function(){return this.nodes.button=document.createElement(\"button\"),this.nodes.button.type=\"button\",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=a.IconBold,this.nodes.button}},{key:\"surround\",value:function(){document.execCommand(this.commandName)}},{key:\"checkState\",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:\"shortcut\",get:function(){return\"CMD+B\"}}],[{key:\"sanitize\",get:function(){return{b:{}}}}]),e}();o.default=l,l.displayName=\"BoldInlineTool\",l.isInline=!0,l.title=\"Bold\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e),this.commandName=\"italic\",this.CSS={button:\"ce-inline-tool\",buttonActive:\"ce-inline-tool--active\",buttonModifier:\"ce-inline-tool--italic\"},this.nodes={button:null}}return(0,i.default)(e,[{key:\"render\",value:function(){return this.nodes.button=document.createElement(\"button\"),this.nodes.button.type=\"button\",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=a.IconItalic,this.nodes.button}},{key:\"surround\",value:function(){document.execCommand(this.commandName)}},{key:\"checkState\",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:\"shortcut\",get:function(){return\"CMD+I\"}}],[{key:\"sanitize\",get:function(){return{i:{}}}}]),e}();o.default=l,l.displayName=\"ItalicInlineTool\",l.isInline=!0,l.title=\"Italic\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(25),n(8),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,s,l,c){\"use strict\";var u=n(1);function f(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var d=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.commandLink=\"createLink\",this.commandUnlink=\"unlink\",this.ENTER_KEY=13,this.CSS={button:\"ce-inline-tool\",buttonActive:\"ce-inline-tool--active\",buttonModifier:\"ce-inline-tool--link\",buttonUnlink:\"ce-inline-tool--unlink\",input:\"ce-inline-tool-input\",inputShowed:\"ce-inline-tool-input--showed\"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=n.toolbar,this.inlineToolbar=n.inlineToolbar,this.notifier=n.notifier,this.i18n=n.i18n,this.selection=new s.default}return(0,i.default)(e,[{key:\"render\",value:function(){return this.nodes.button=document.createElement(\"button\"),this.nodes.button.type=\"button\",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=c.IconLink,this.nodes.button}},{key:\"renderActions\",value:function(){var e=this;return this.nodes.input=document.createElement(\"input\"),this.nodes.input.placeholder=this.i18n.t(\"Add a link\"),this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener(\"keydown\",(function(t){t.keyCode===e.ENTER_KEY&&e.enterPressed(t)})),this.nodes.input}},{key:\"surround\",value:function(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());var t=this.selection.findParentTag(\"A\");if(t)return this.selection.expandToTag(t),this.unlink(),this.closeActions(),this.checkState(),void this.toolbar.close()}this.toggleActions()}},{key:\"checkState\",value:function(){var e=this.selection.findParentTag(\"A\");if(e){this.nodes.button.innerHTML=c.IconUnlink,this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();var t=e.getAttribute(\"href\");this.nodes.input.value=\"null\"!==t?t:\"\",this.selection.save()}else this.nodes.button.innerHTML=c.IconLink,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}},{key:\"clear\",value:function(){this.closeActions()}},{key:\"shortcut\",get:function(){return\"CMD+K\"}},{key:\"toggleActions\",value:function(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}},{key:\"openActions\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}},{key:\"closeActions\",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var t=new s.default;t.save(),this.selection.restore(),this.selection.removeFakeBackground(),t.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value=\"\",e&&this.selection.clearSaved(),this.inputOpened=!1}},{key:\"enterPressed\",value:function(e){var t=this.nodes.input.value||\"\";return t.trim()?this.validateURL(t)?(t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),void this.inlineToolbar.close()):(this.notifier.show({message:\"Pasted link is not valid.\",style:\"error\"}),void l.log(\"Incorrect Link pasted\",\"warn\",t)):(this.selection.restore(),this.unlink(),e.preventDefault(),void this.closeActions())}},{key:\"validateURL\",value:function(e){return!/\\s/.test(e)}},{key:\"prepareLink\",value:function(e){return e=e.trim(),e=this.addProtocol(e)}},{key:\"addProtocol\",value:function(e){if(/^(\\w+):(\\/\\/)?/.test(e))return e;var t=/^\\/[^/\\s]/.test(e),n=\"#\"===e.substring(0,1),o=/^\\/\\/[^/\\s]/.test(e);return t||n||o||(e=\"http://\"+e),e}},{key:\"insertLink\",value:function(e){var t=this.selection.findParentTag(\"A\");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}},{key:\"unlink\",value:function(){document.execCommand(this.commandUnlink)}}],[{key:\"sanitize\",get:function(){return{a:{href:!0,target:\"_blank\",rel:\"nofollow\"}}}}]),e}();o.default=d,d.displayName=\"LinkInlineTool\",d.isInline=!0,d.title=\"Link\",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(19)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a){\"use strict\";var s=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.data,o=t.api;(0,r.default)(this,e),this.CSS={wrapper:\"ce-stub\",info:\"ce-stub__info\",title:\"ce-stub__title\",subtitle:\"ce-stub__subtitle\"},this.api=o,this.title=n.title||this.api.i18n.t(\"Error\"),this.subtitle=this.api.i18n.t(\"The block can not be displayed correctly.\"),this.savedData=n.savedData,this.wrapper=this.make()}return(0,i.default)(e,[{key:\"render\",value:function(){return this.wrapper}},{key:\"save\",value:function(){return this.savedData}},{key:\"make\",value:function(){var e=a.default.make(\"div\",this.CSS.wrapper),t=a.default.make(\"div\",this.CSS.info),n=a.default.make(\"div\",this.CSS.title,{textContent:this.title}),o=a.default.make(\"div\",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML='',t.appendChild(n),t.appendChild(o),e.appendChild(t),e}}]),e}();o.default=l,l.displayName=\"Stub\",l.isReadOnlySupported=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(69),n(396),n(397),n(398)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s,l,c){\"use strict\";var u=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=u(l),c=u(c);var f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},m=function(e){(0,l.default)(n,e);var t=k(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).type=d.ToolType.Block,e.inlineTools=new h.default,e.tunes=new h.default,e}return(0,i.default)(n,[{key:\"create\",value:function(e,t,n){return new this.constructable({data:e,block:t,readOnly:n,api:this.api.getMethodsForTool(this),config:this.settings})}},{key:\"isReadOnlySupported\",get:function(){return!0===this.constructable[d.InternalBlockToolSettings.IsReadOnlySupported]}},{key:\"isLineBreaksEnabled\",get:function(){return this.constructable[d.InternalBlockToolSettings.IsEnabledLineBreaks]}},{key:\"toolbox\",get:function(){var e=this.constructable[d.InternalBlockToolSettings.Toolbox],t=this.config[d.UserSettings.Toolbox];if(!p.isEmpty(e)&&!1!==t)return t?Array.isArray(e)?Array.isArray(t)?t.map((function(t,n){var o=e[n];return o?Object.assign(Object.assign({},o),t):t})):[t]:Array.isArray(t)?t:[Object.assign(Object.assign({},e),t)]:Array.isArray(e)?e:[e]}},{key:\"conversionConfig\",get:function(){return this.constructable[d.InternalBlockToolSettings.ConversionConfig]}},{key:\"enabledInlineTools\",get:function(){return this.config[d.UserSettings.EnabledInlineTools]||!1}},{key:\"enabledBlockTunes\",get:function(){return this.config[d.UserSettings.EnabledBlockTunes]}},{key:\"pasteConfig\",get:function(){return this.constructable[d.InternalBlockToolSettings.PasteConfig]||{}}},{key:\"sanitizeConfig\",get:function(){var e=(0,s.default)((0,u.default)(n.prototype),\"sanitizeConfig\",this),t=this.baseSanitizeConfig;if(p.isEmpty(e))return t;var o={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];p.isObject(i)?o[r]=Object.assign({},t,i):o[r]=i}return o}},{key:\"baseSanitizeConfig\",get:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),Array.from(this.tunes.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),e}}]),n}(d.default);o.default=m,m.displayName=\"BlockTool\",b([p.cacheable],m.prototype,\"sanitizeConfig\",null),b([p.cacheable],m.prototype,\"baseSanitizeConfig\",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self&&self,r=[t,n(2),n(3),n(85),n(37)],void 0===(i=\"function\"==typeof(o=function(o,r,i,a,s){\"use strict\";var l=n(1);Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=void 0,r=l(r),i=l(i),a=l(a);var c=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.CSS={animation:\"wobble\"},this.api=n}return(0,i.default)(e,[{key:\"render\",value:function(){var e=this;return{icon:s.IconChevronDown,title:this.api.i18n.t(\"Move down\"),onActivate:function(t,n){return e.handleClick(n)},name:\"move-down\"}}},{key:\"handleClick\",value:function(e){var t=this,n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n+1);if(!o){var r=e.target.closest(\".\"+a.default.CSS.item).querySelector(\".\"+a.default.CSS.itemIcon);return r.classList.add(this.CSS.animation),void window.setTimeout((function(){r.classList.remove(t.CSS.animation)}),500)}var i=o.holder,s=i.getBoundingClientRect(),l=Math.abs(window.innerHeight-i.offsetHeight);s.top0?Math.abs(u.top)-Math.abs(f.top):window.innerHeight-Math.abs(u.top)+Math.abs(f.top),window.scrollBy(0,-1*s),this.api.blocks.move(n-1),this.api.toolbar.toggleBlockSettings(!0)}}]),e}();o.default=c,c.displayName=\"MoveUpTune\",c.isTune=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports='.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:\"\\\\feff \"}@media (min-width:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:\"\";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}::-moz-selection{background-color:#d4ecff}::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(var(--window-scroll-offset)*-1);position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width:650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus{-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width:650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #e8e8eb;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:6px;z-index:2}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__plus{position:static}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width:650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media (max-width:650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__settings-btn{margin-left:3px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width:651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width:650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #e8e8eb;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:6px;z-index:2}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__settings-btn{position:static}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{--gap:8px}@media (min-width:651px){.ce-toolbox{position:absolute;top:calc(26px + var(--gap));left:0}.ce-toolbox--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{left:auto;right:0}.codex-editor--narrow .ce-toolbox .ce-popover{right:0}}.ce-inline-toolbar{--y-offset:8px;position:absolute;background-color:#fff;border:1px solid #e8e8eb;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:6px;z-index:2}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar{-webkit-transform:translateX(-50%) translateY(8px) scale(.94);transform:translateX(-50%) translateY(8px) scale(.94);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity;top:0;left:0;z-index:3}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.94);transform:translateX(-23px) translateY(8px) scale(.94)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.94);transform:translateX(-100%) translateY(8px) scale(.94);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{width:100%;padding:0 6px}.ce-inline-toolbar__buttons,.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover:hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-arrow,.ce-inline-toolbar__dropdown-content{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-arrow svg,.ce-inline-toolbar__dropdown-content svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.ce-inline-tool svg{width:20px;height:20px}@media (max-width:650px){.ce-inline-tool svg{width:28px;height:28px}}@media (hover:hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool{border-radius:0;line-height:normal}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{outline:none;border:0;border-radius:0 0 4px 4px;margin:0;font-size:13px;padding:10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;border-top:1px solid rgba(201,201,204,.48);-webkit-appearance:none;font-family:inherit}@media (max-width:650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border:1px solid #e8e8eb;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:6px;z-index:2}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar{opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;-webkit-transform:translateY(-8px);transform:translateY(-8px);left:-1px;width:150px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-toolbar__label{color:#707684;font-size:11px;font-weight:500;letter-spacing:.33px;padding:10px 10px 5px;text-transform:uppercase}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px 10px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--hidden{display:none}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#eff2f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48);box-shadow:0 0 0 1px rgba(201,201,204,.48);border-radius:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-negative:0;flex-shrink:0;margin-right:10px}.ce-conversion-tool__icon svg{width:20px;height:20px}@media (max-width:650px){.ce-conversion-tool__icon{width:36px;height:36px;border-radius:8px}.ce-conversion-tool__icon svg{width:28px;height:28px}}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;z-index:2;--gap:8px}@media (min-width:651px){.ce-settings{position:absolute;top:calc(26px + var(--gap));left:0}.ce-settings--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.ce-settings__button svg{width:20px;height:20px}@media (max-width:650px){.ce-settings__button svg{width:28px;height:28px}}@media (hover:hover){.ce-settings__button:hover{background-color:#eff2f5}}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:none}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:\"\";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388ae5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:\"\";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:651px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important;display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.cdx-settings-button svg{width:20px;height:20px}@media (max-width:650px){.cdx-settings-button svg{width:28px;height:28px}}@media (hover:hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button{min-width:26px;min-height:26px}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width:650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:\"\";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}@media (hover:hover){.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width:650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0 solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.ce-popover{opacity:0;will-change:opacity,transform;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:6px;min-width:200px;width:200px;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;max-height:0;pointer-events:none;position:absolute;background-color:#fff;border:1px solid #e8e8eb;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:6px;z-index:2}.ce-popover--left-oriented:before{left:15px;margin-left:0}.ce-popover--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-popover{z-index:4;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ce-popover--opened{opacity:1;max-height:270px;pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease}@media (max-width:650px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover::-webkit-scrollbar{width:7px}.ce-popover::-webkit-scrollbar-thumb{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:inset 0 0 2px 2px #eff2f5;box-shadow:inset 0 0 2px 2px #eff2f5;border-color:transparent;border-style:solid;border-width:4px 3px 4px 0}@media (max-width:650px){.ce-popover{--offset:5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset)*2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (min-width:651px){.ce-popover__items{margin-top:5px}}.ce-popover__item{display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;white-space:nowrap;padding:3px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:6px}.ce-popover__item:not(:last-of-type){margin-bottom:1px}@media (max-width:650px){.ce-popover__item{font-size:16px;padding:4px}}@media (hover:hover){.ce-popover__item:hover:not(.ce-popover__item--no-visible-hover){background-color:#eff2f5}.ce-popover__item:hover .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover__item--disabled{color:#707684;cursor:default;pointer-events:none}.ce-popover__item--disabled .ce-popover__item-icon{-webkit-box-shadow:0 0 0 1px #eff0f1;box-shadow:0 0 0 1px #eff0f1}.ce-popover__item--focused:not(.ce-popover__item--no-visible-focus){-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-popover__item--hidden{display:none}.ce-popover__item--active{background:rgba(56,138,229,.1);color:#388ae5}.ce-popover__item--confirmation{background:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-icon{color:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-label{color:#fff}@media (hover:hover){.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-hover):hover{background:#ce4343}}.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-focus).ce-popover__item--focused{background:#ce4343!important}.ce-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48);box-shadow:0 0 0 1px rgba(201,201,204,.48);border-radius:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-negative:0;flex-shrink:0;margin-right:10px}.ce-popover__item-icon svg{width:20px;height:20px}@media (max-width:650px){.ce-popover__item-icon{width:36px;height:36px;border-radius:8px}.ce-popover__item-icon svg{width:28px;height:28px}}.ce-popover__item-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-popover__item-label:after{content:\"\";width:25px;display:inline-block}.ce-popover__item-secondary-label{color:#707684;font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width:650px){.ce-popover__item-secondary-label{display:none}}.ce-popover__item--active .ce-popover__item-icon,.ce-popover__item--confirmation .ce-popover__item-icon,.ce-popover__item--focused .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover__no-found{display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;white-space:nowrap;padding:3px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:6px}.ce-popover__no-found:not(:last-of-type){margin-bottom:1px}@media (max-width:650px){.ce-popover__no-found{font-size:16px;padding:4px}}.ce-popover__no-found{color:#707684;display:none;cursor:default}.ce-popover__no-found--shown{display:block}@media (max-width:650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1d202b;opacity:.5;z-index:3;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}.ce-popover .cdx-search-field{display:none}}.ce-popover__overlay--hidden{z-index:0;opacity:0;visibility:hidden}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width:651px){.ce-popover__custom-content:not(:empty){margin-top:5px;padding:0}}.ce-popover__custom-content--hidden{display:none}.cdx-search-field{--icon-margin-right:10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}'},function(e,t,n){\"use strict\";n.r(t),n.d(t,\"nanoid\",(function(){return s})),n.d(t,\"customAlphabet\",(function(){return a})),n.d(t,\"customRandom\",(function(){return i})),n.d(t,\"urlAlphabet\",(function(){return o})),n.d(t,\"random\",(function(){return r}));let o=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";let r=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t,n)=>{let o=(2<{let i=\"\";for(;;){let a=n(r),s=r;for(;s--;)if(i+=e[a[s]&o]||\"\",i.length===t)return i}}},a=(e,t)=>i(e,t,r),s=(e=21)=>{let t=\"\",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=63&n[e];t+=o<36?o.toString(36):o<62?(o-26).toString(36).toUpperCase():o<63?\"_\":\"-\"}return t}}])}));","import { get, writable, type Writable } from 'svelte/store';\nimport EditorJS, { type OutputData } from '@editorjs/editorjs';\nimport type * as Lexc from './types'; \n\nconst Default: Lexc.Language = {\n Version: '2.1.0',\n Name: 'Unnamed Language',\n CaseSensitive: false,\n IgnoreDiacritics: true,\n ShowEtymology: false,\n ShowInflection: false,\n Inflections: [],\n UseLects: false,\n HeaderTags: '',\n Alphabet: 'a b c d e f g h i j k l m n o p q r s t u v w x y z',\n Lexicon: { },\n Etymologies: { },\n Relatives: { },\n Pronunciations: {\n General: 'Use this field to write pronunciation rules to automatically transcribe your orthography in IPA. For example,\\n'\n + 'th > θ\\n'\n + 'This rule will automatically transcribe any ⟨th⟩ in your orthography as [θ].\\n'\n + 'Rules can be much more complex than this. You can read the section on pronunciation rules in the Help tab for more information.\\n\\n'\n + 'The most common mistake has to do with the fact that rules are applied in order from top to bottom. For example, if you have the following rules,\\n' \n + 'e > ɛ\\n'\n + 'ae > æ\\n'\n + 'then the second rule will never be applied, because the first rule will always change ⟨e⟩ to [ɛ] before the second rule can be applied.\\n'\n + 'The solution in almost all cases like this is to change the order of the rules so that the ones with the longest patterns are applied first.\\n'\n + 'ae > æ\\n'\n + 'e > ɛ\\n'\n + 'Now both rules will be applied correctly. You can test this by removing the first set of rules from this demo.'\n },\n Orthographies: [{\n name: 'Romanization',\n font: 'Gentium',\n root: 'rom',\n lect: 'General',\n rules: 'Your romanized orthography is the base form of input.',\n display: true\n }],\n ShowOrthography: false,\n ShowPronunciation: true,\n Phonotactics: {\n General: {\n Onsets: '',\n Medials: '',\n Codas: '',\n Vowels: '',\n Illegals: '',\n }\n },\n UseAdvancedPhonotactics: false,\n AdvancedPhonotactics: {\n Categories: { },\n Syllables: [ ],\n Constructs: [{enabled:true, structures:''}],\n Illegals: [ ],\n },\n Lects: ['General'],\n Phrasebook: { },\n Docs: {\n blocks: [ ]\n },\n Diagnostics: [ ],\n FileTheme: 'default',\n OrderByDate: false,\n SaveLocation: '',\n UploadToDatabase: false,\n};\nexport const defaultLanguage: Writable = writable(Default);\n\n// Initial state for the language data\nexport const Language: Writable = writable(structuredClone(Default));\n\nexport const selectedTab = writable(0);\n\n// Initial states for all the global variables across the app\ntype PronunciationInputs = {\n [index: string]: string\n}\nexport const wordInput = writable('');\nexport const pronunciations: Writable = writable((()=>{\n const inputs: PronunciationInputs = {};\n for (const lect of get(Language).Lects) {\n inputs[lect] = '';\n }\n return inputs;\n})());\n\nexport const phraseInput = writable('');\nexport const phrasePronunciations: Writable = writable((()=>{\n const inputs: PronunciationInputs = {};\n for (const lect of get(Language).Lects) {\n inputs[lect] = '';\n }\n return inputs;\n})());\n\nexport const categoryInput = writable('');\nexport const selectedCategory = writable('');\n\nexport const docsEditor: Writable = writable(new EditorJS());\n\nexport const theme = writable('styles/dark.css');\nexport const autosave = writable(true);\nexport const fileLoadIncrement = writable(0);\n\nexport const hideDropdowns = writable(false);\n\nexport const referenceLanguage: Writable|Writable = writable(false);\n\nexport const dbid = writable(''); \nexport const dbkey = writable('');\n","import type * as Lexc from '../types';\nimport { Language } from '../stores';\nimport { get } from 'svelte/store';\nimport { platform } from 'os';\nconst { ipcRenderer } = require('electron');\nconst fs = require('fs');\nconst path = require('path');\n\n// can't import this from utils/files because it causes a circular dependency\nasync function userData (callback: (user_path: string) => void): Promise {\n let path: string;\n await ipcRenderer.invoke('getUserDataPath').then((result: string) => {\n path = result;\n });\n callback(path);\n}\n\n/**\n * This function pushes a new diagnostic record to the diagnostics\n * data in the Language object, which is saved along with the save\n * file. \n * @param {string} action - The action that was being performed when the error occurred.\n * @param {string} error - The error message.\n */\nexport function logError(action: string, error: Error): void {\n get(Language).Diagnostics.push( {\n Time: Date(),\n Version: get(Language).Version,\n OS: platform(),\n Action: action,\n Error: error.stack\n });\n debug.error(error.stack);\n}\n\n/**\n * Takes a string and pushes it to the Diagnostics array in the Language object, along\n * with the current date, version, and OS.\n * @param {string} action - The action that was performed.\n */\nexport function logAction(action: string): void {\n get(Language).Diagnostics.push( {\n Time: Date(),\n Version: get(Language).Version,\n OS: platform(),\n Action: action\n });\n}\n\nfunction logToFile(message: string, report: 'info' | 'warning' | 'error'): void {\n userData(userPath => {\n const logsPath = userPath + path.sep + 'Diagnostics' + path.sep;\n if (!fs.existsSync(logsPath)) {\n fs.mkdirSync(logsPath);\n }\n const timestamp = new Date().toString();\n const logFile = logsPath + 'logs';\n const log = \n 'Report: ' + report + '\\n'\n + 'Time: ' + timestamp + '\\n' \n + 'Version: ' + ipcRenderer.invoke('getVersion') + '\\n'\n + 'File: (v' + get(Language).Version + ') ' + get(Language).Name + '\\n'\n + message + '\\n';\n if (!fs.existsSync(logFile)) {\n fs.writeFile(logFile, log, (err: Error) => {if (err) debug.error(String(err), false);});\n } else {\n fs.appendFile(logFile, log, (err: Error) => {if (err) debug.error(String(err), false);});\n }\n });\n}\n\nexport const debug = {\n log: (message: string, logFile = true) => {\n if (logFile) logToFile(message, 'info');\n const formatted = '\\x1B[22m\\x1B[4mLexc Debug\\x1B[24m:\\x1B[22m ' + '\\x1B[32m' + message + '\\x1B[39m';\n console.log(formatted);\n ipcRenderer.invoke('debug', formatted);\n },\n logObj: (obj: unknown, name = '', logFile = true) => {\n if (logFile) logToFile('Object: ' + name + '\\n' + JSON.stringify(obj, null, 2), 'info');\n const objString = JSON.stringify(obj, null, 2)\n .replace(/(.*):/g, '\\x1B[32m$1\\x1B[39m:');\n const formatted = '\\x1B[22m\\x1B[4mLexc Debug\\x1B[24m\\x1B[22m ' + '\\x1B[32m' + name + ':\\x1B[39m' + '\\n' + objString;\n ipcRenderer.invoke('debug', formatted);\n console.log(formatted);\n }, \n warn: (message: string, logFile = true) => {\n if (logFile) logToFile(message, 'warning');\n const formatted = '\\x1B[22m\\x1B[4mLexc Debug\\x1B[24m\\x1B[22m ' + '\\x1B[33m' + message + '\\x1B[39m';\n ipcRenderer.invoke('debug', formatted);\n console.log(formatted);\n },\n error: (message: string, logFile = true) => {\n if (logFile) logToFile(message, 'error');\n const formatted = '\\x1B[22m\\x1B[4mLexc Debug\\x1B[24m\\x1B[22m ' + '\\x1B[31m' + message + '\\x1B[39m';\n ipcRenderer.invoke('debug', formatted);\n console.log(formatted);\n },\n logAndReturn: (object:T, message = '', logFile = false): T => {\n debug.logObj(object, message, logFile);\n return object;\n }\n};\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport * as diagnostics from './diagnostics';\nimport { get } from 'svelte/store';\nimport { Language } from '../stores';\nimport type * as Lexc from '../types';\nconst Lang = () => get(Language);\n\n/**\n * Takes a Lexicon object and returns an array of words in the alphabetical order\n * of the language, defined by the Alphabet property in the language file, and \n * with the any words which contain any HeaderTags at the top.\n * @param lexicon - the lexicon object\n * @returns An array of words, sorted by the alphabetical order of the language.\n */\nexport function alphabetize(lexicon: Lexc.Lexicon): string[] {\n let priority_tags = Lang().HeaderTags.toLowerCase().trim().split(/\\s+/);\n if (!priority_tags[0]) priority_tags = [];\n let $alphabet = Lang().Alphabet;\n const $ignore_diacritics = Lang().IgnoreDiacritics;\n const $case_sensitive = Lang().CaseSensitive;\n const all_words = structuredClone(lexicon);\n const tag_ordered_lexes = [];\n for (const tag of priority_tags) {\n tag_ordered_lexes.push([]);\n for (const word in all_words) {\n if ((():string[] => {\n const tags = [];\n all_words[word].Senses.forEach((sense: Lexc.Sense) => {\n tags.push(...sense.tags);\n });\n return tags;\n })().includes(tag)) {\n tag_ordered_lexes[tag_ordered_lexes.length - 1].push(word);\n }\n }\n for (const w of tag_ordered_lexes[tag_ordered_lexes.length - 1]) {\n delete all_words[w];\n }\n }\n const remaining_words = [];\n for (const w in all_words) {\n remaining_words.push(w);\n }\n tag_ordered_lexes.push(remaining_words);\n\n // Lowercase alphabet if case-sensitivity is unticked\n $alphabet = $case_sensitive? $alphabet.trim() : $alphabet.trim().toLowerCase();\n const order = $alphabet.split(/\\s+/);\n // to make sure we find the largest tokens first, i.e. for cases where 'st' comes before 'str' alphabetically\n const find_in_order = Array.from(new Set(order)).sort(\n (a, b) => b.length - a.length\n ); // descending, ensures uniqueness\n\n const final_sort = [];\n for (const group of tag_ordered_lexes) {\n const lex = {};\n const list = [];\n for (const word of group) {\n // case sensitivity\n let w: string = $case_sensitive? word : word.toLowerCase();\n\n // diacritic sensitivity\n w = $ignore_diacritics? w.normalize('NFD').replace(/\\p{Diacritic}/gu, '') : w;\n\n for (const token of find_in_order) {\n w = w.replace(\n new RegExp(`${token}`, 'g'),\n `${order.indexOf(token)}.`\n );\n }\n const append: (string | number)[] = w.split('.');\n for (const i of append) {\n append[append.indexOf(i)] = +i || 0;\n }\n lex[word] = append;\n list.push(append);\n }\n list.sort((a, b) => {\n for (const i of a) {\n const j = b[a.indexOf(i)];\n if (i === j) {\n continue;\n }\n return i - j;\n }\n return 0;\n });\n const sorted = [];\n for (const key in lex) {\n sorted.push([key, list.indexOf(lex[key])]);\n } // [ [word, index], [word, index], ...]\n sorted.sort((a, b) => a[1] - b[1]);\n for (let i = 0; i < sorted.length; i++) {\n sorted[i] = sorted[i][0];\n }\n for (const i of sorted) {\n final_sort.push(i);\n }\n }\n return final_sort;\n}\n\ntype valid = string & { __brand: 'valid' };\n/**\n * Takes a word and returns false if it contains any characters not in the alphabet.\n * The function takes case sensitivity and diacritic sensitivity into account.\n * @param word - the word to check\n * @returns false if the word contains any characters not in the alphabet.\n */\nexport function alphabetPrecheck(word: string): word is valid {\n // check in order of length descending, solves combining diacritcs issue (i.e. 'a' would be removed from 'å', leaving the ring)\n const alphabet = Lang().Alphabet.trim().split(/\\s+/).sort((a, b) => b.length - a.length);\n word = Lang().CaseSensitive? word : word.toLowerCase();\n word = Lang().IgnoreDiacritics? word.normalize('NFD').replace(/\\p{Diacritic}/gu, '') : word;\n alphabet.forEach((token) => {\n word = word.replaceAll(token, '');\n // debug.log(`alphabetPrecheck: ${word} | ${token}`, false);\n });\n return !word.replaceAll(/\\s+/g, '');\n}\n","import * as diagnostics from './diagnostics';\nimport { Language } from '../stores';\nimport { get } from 'svelte/store';\nconst vex = require('vex-js');\n\nfunction applyRule(rule: string, input: string, categories: {[index: string]: string[]}): string {\n const caseSensitive = get(Language).CaseSensitive;\n const flags = caseSensitive? 'g' : 'gi';\n\n // eslint-disable-next-line prefer-const\n let [pattern, sub, context] = rule.split('/');\n input = ' ' + input + ' ';\n let result = input;\n\n //SECTION - Preprocess the rule\n const unionRule = /\\{(.+?)\\}/g;\n const boundaryRule = /\\^|#/g;\n const negativeRule = /\\{!(.+(?:\\s+.+)*)\\}/g;\n const commaUnionRule = /\\s*,\\s*/g;\n const spaceRule = /\\s+/g;\n const nullRule = /[∅⦰]/g;\n const Symbols: string[] = [\n '∆', '∇', '⊂', '⊃', '⊆', '⊇', '⊄', '⊅',\n '⊈', '⊉', '⊊', '⊋', '⊍', '⊎', '⊏', '⊐',\n '⊑', '⊒', '⊓', '⊔', '⊕', '⊖', '⊗', '⊘',\n '⊙', '⊚', '⊛', '⊜', '⊝', '⊞', '⊟', '⊠',\n '⊡', '⊢', '⊣', '⊤', '⊥', '⊦', '⊧', '⊨',\n '⊩', '⊪', '⊫', '⊬', '⊭', '⊮', '⊯', '⊰',\n '⊱', '⊲', '⊳', '⊴', '⊵', '⊶', '⊷', '⊸',\n '⊹', '⊺', '⊻', '⊼', '⊽', '⊾', '⊿', '⋀',\n '⋁', '⋂', '⋃', '⋄', '⋇', '⋈', '⋉', '⋊',\n '⋋', '⋌', '⋍', '⋎', '⋏', '⋐', '⋑', '⋒',\n '⋓', '⋔', '⋕', '⋖', '⋗', '⋘', '⋙', '⋚',\n '⋛', '⋜', '⋝', '⋞', '⋟', '⋠', '⋡', '⋢',\n '⋣', '⋤', '⋥', '⋦', '⋧', '⋨', '⋩', '⋪',\n '⋫', '⋬', '⋭', '⋮', '⋯', '⋰', '⋱', '⋲',\n '⋳', '⋴', '⋵', '⋶', '⋷', '⋸', '⋹', '⋺',\n '⋻', '⋼', '⋽', '⋾', '⌁', '⌂', '⌃', '⌄',\n '⌅', '⌆', '⌇', '⌈', '⌉', '⌊', '⌋', '⌑', \n '⌒', '⌓', '⌔', '⌕', '⌖', '⌗', '⌘', '⌙',\n ];\n let i = 0;\n pattern.match(unionRule)?.forEach((match) => {\n categories[Symbols[i]] = match.replace(unionRule, '$1').split(commaUnionRule);\n pattern = pattern.replace(match, Symbols[i]);\n i++;\n });\n sub.match(unionRule)?.forEach((match) => {\n categories[Symbols[i]] = match.replace(unionRule, '$1').split(commaUnionRule);\n sub = sub.replace(match, Symbols[i]);\n i++;\n });\n context.match(unionRule)?.forEach((match) => {\n categories[Symbols[i]] = match.replace(unionRule, '$1').split(commaUnionRule);\n context = context.replace(match, Symbols[i]);\n i++;\n });\n\n pattern = pattern\n .replaceAll(boundaryRule, '\\\\s')\n .replaceAll(negativeRule, '(?:(?!$1).)')\n .replaceAll(spaceRule, '')\n ;\n sub = sub\n .replaceAll(spaceRule, '')\n ;\n context = context\n .replaceAll(boundaryRule, '\\\\s')\n .replaceAll(negativeRule, '(?:(?!$1).)')\n .replaceAll(spaceRule, '')\n ;\n\n //SECTION - Construct RegExp rule string and map category appearances\n let regString = '(' + context.replace('_', `)${pattern}(`) + ')';\n Object.entries(categories).forEach(([symbol, values]: [string, string[]]) => {\n regString = regString.replaceAll(symbol, `(?:${values.join('|')})`);\n });\n const patternCatMap = pattern.split('').filter(char => char in categories);\n const subCatMap = sub.split('').filter(char => char in categories);\n const contextCatMap = context.split('').filter(char => char in categories);\n\n function getSlice(match): string {\n //SECTION - Get the index of the pattern in the context, accounting for varying category token lengths\n let expandedContext = context.replaceAll('\\\\b', '');\n let matchContext = [];\n if (contextCatMap.length > 0) {\n contextCatMap.forEach(symbol => {\n const matchMatches = match.match(new RegExp(`(?:${categories[symbol].join('|')})`, flags));\n matchContext.push([symbol, matchMatches]);\n });\n matchContext = [...new Set(matchContext)].sort((a, b) => b.length - a.length);\n }\n matchContext.forEach(([symbol, matches]) => {\n matches.forEach(match => {\n expandedContext = expandedContext.replace(symbol, match);\n });\n });\n\n expandedContext = expandedContext.replaceAll('\\\\s', ' ');\n for (const m of expandedContext.match(/\\(\\?:(.*)\\)\\?/g)? expandedContext.match(/\\(\\?:(.*)\\)\\?/g) : []) {\n const optional = m.replace(/\\(\\?:(.*)\\)\\?/g, '$1');\n /* console.log(\n 'm:', `'${m}'`, '|',\n 'optional:', `'${optional}'`\n ); */\n const testContext = expandedContext.replace(m, optional);\n let testRegString = '(' + testContext.replace('_', `)${pattern}(`) + ')';\n Object.entries(categories).forEach(([symbol, values]: [string, string[]]) => {\n testRegString = testRegString.replaceAll(symbol, `(?:${values.join('|')})`);\n });\n \n if (input.match(new RegExp(testRegString, flags))) {\n expandedContext = testContext;\n } else {\n expandedContext = expandedContext.replace(m, '');\n }\n }\n for (const m of expandedContext.match(/(.|\\s)\\?/g)? expandedContext.match(/(.|\\s)\\?/g) : []) {\n const optional = m.replace(/(.|\\s)\\?/g, '$1');\n const testContext = expandedContext.replace(m, optional);\n let testRegString = '(' + testContext.replace('_', `)${pattern}(`) + ')';\n Object.entries(categories).forEach(([symbol, values]: [string, string[]]) => {\n testRegString = testRegString.replaceAll(symbol, `(?:${values.join('|')})`);\n });\n \n if (input.match(new RegExp(testRegString, flags))) {\n expandedContext = testContext;\n } else {\n expandedContext = expandedContext.replace(m, '');\n }\n }\n\n const indexOfPattern = \n expandedContext\n .replaceAll('?', '')\n .indexOf('_');\n\n //SECTION - Get the slice of the match that corresponds to the pattern\n const patternLength = \n !patternCatMap[0]\n ? pattern.length \n : context === '_'\n ? match.length\n : (():number => {\n let length = 0;\n Object.entries(categories).filter(\n ([symbol,]: [string, string[]]) => patternCatMap.includes(symbol)\n ).forEach(([, values]: [string, string[]]) => {\n const candidate = values.find(value => match.includes(value));\n length += candidate? candidate.length : 0;\n });\n return length;\n })();\n match = match.slice( \n indexOfPattern, \n indexOfPattern + patternLength\n );\n return match;\n }\n\n //SECTION - Apply the rule\n const matches: string[] = input.match(new RegExp(regString, flags));\n if (matches && sub.includes('_')) {\n matches.forEach(match => {\n const slice = getSlice(match);\n result = result.replace(slice, sub.replaceAll('_', slice));\n });\n } else {\n result;\n regString;\n result = result.replaceAll(new RegExp(regString, flags), `$1${sub}$2`);\n result;\n }\n \n if (!!subCatMap[0] && !!patternCatMap[0]) {\n let catMap: string[][] = [];\n if (matches) { \n catMap = matches.map(match => {\n const slice = getSlice(match);\n //SECTION - Create the map\n const map = [\n slice,\n subCatMap[patternCatMap\n .indexOf(Object.keys(categories)\n .find(symbol => categories[symbol]\n .some( (value: string) => \n value === slice && patternCatMap.includes(symbol) \n )\n )\n )\n ]\n ];\n\n return [\n map[0],\n map[1],\n categories[map[1]][ categories[ patternCatMap[subCatMap.indexOf(map[1])] ].indexOf(map[0]) ]\n ? categories[map[1]][ categories[ patternCatMap[subCatMap.indexOf(map[1])] ].indexOf(map[0]) ]\n : map[0]\n ];\n });\n matches.forEach((match, i) => {\n result = result\n .replace(\n match.replace(catMap[i][0], catMap[i][1]), \n match.replace(catMap[i][0], catMap[i][2])\n );\n });\n }\n }\n /* console.log(\n input, '::', pattern + '/' + sub + '/' + context, '-> ', result\n ); */\n return result\n .replaceAll(nullRule, '')\n .replaceAll('␠', ' ')\n .trim();\n}\n\nlet indialog = false;\nexport function applyRules(rules: string[], input: string, categories): string {\n let result = input;\n rules.forEach(rule => {\n try {\n result = applyRule(rule, result, categories);\n } catch (err) {\n const error = err as Error;\n diagnostics.logError(`Attempted to apply rule '${rule}' to '${input}'`, error);\n if (!indialog) {\n indialog = true;\n vex.dialog.alert({\n message: `An error occurred while trying to apply rule '${rule}' to '${input}'. The rule may be invalid. If you think this is a bug, please contact the developer.`,\n callback: () => {\n indialog = false;\n }\n });\n }\n }\n });\n return result;\n}\n\nexport function parseRules(rules: string): {rules: string[], categories: {[index: string]: string[]}} {\n const result = {\n rules: rules\n .split(/\\n|;/)\n .map(rule => rule.trim())\n .filter(rule => rule.match(/^.*(?:\\/|>).*/)) // p > s || p / s\n .map(rule => rule.match(/\\/.*_.*$/) // p > s / _ || p / s / _\n ? rule \n : rule.match(/\\/\\s*$/) // p > s / || p / s /\n ? rule + '_'\n : rule + '/_'\n )\n .map(rule => rule.split(/(?:\\/|>)/)\n .map(part => part.trim())\n .join('/'))\n .filter(rule => rule.match(/^.+?\\/.*?\\/.*?_.*?$/) || rule.match(/^.*?\\/.+?\\/.*?_.*?$/)),\n categories: Object.fromEntries(\n rules\n .split('\\n')\n .map(rule => rule.trim())\n .filter(rule => rule.match(/^.*::.*$/))\n .map(rule => rule.split('::'))\n .map(([symbol, values]) => [ symbol.trim(), values.split(',').map(value => value.trim()) ])\n )\n };\n /* console.log(\n 'rules:', result.rules, '|| categories:', result.categories\n ); */\n return result;\n}\n\n\n/* const rules = `\na > e / {a, b}_{a}\n`;\nconst input = 'aaa';\nconsole.log(\n input, '-->',\n applyRules(parseRules(rules).rules, input, parseRules(rules).categories),\n); */\n","import { get } from 'svelte/store';\nimport { \n Language, wordInput, pronunciations, phraseInput, phrasePronunciations\n} from '../stores.js';\nimport { applyRules, parseRules } from './sca';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport * as diagnostics from './diagnostics.js';\nimport type * as Lexc from '../types.js';\nconst Lang = () => get(Language);\n\n/**\n * Takes a word and returns its pronunciation based on\n * the user-defined romanization rules.\n * @param {string} word\n * @returns {string}\n */\nexport function get_pronunciation(word: string, lect: string, reference: false | Lexc.Language = false): string {\n // console.log('Requested pronunciation for ' + word + ' in ' + lect + '.');\n let rules: string;\n if (!reference) rules = Lang().Pronunciations[lect];\n else rules = reference.Pronunciations[lect];\n const settings = parseRules(rules);\n return applyRules(settings.rules, word, settings.categories);\n}\n\n/**\n * Rewrites all pronunciations for a given lect.\n */\nexport function writeRomans (lect: string) {\n get(pronunciations)[lect] = get_pronunciation(get(wordInput), lect);\n\n const lexicon: Lexc.Lexicon = Lang().Lexicon;\n for (const word in lexicon) {\n if (lexicon[word].pronunciations.hasOwnProperty(lect)) {\n if (lexicon[word].pronunciations[lect].irregular === false) {\n lexicon[word].pronunciations[lect].ipa = get_pronunciation(word, lect);\n }\n }\n }\n Lang().Lexicon = lexicon;\n\n get(phrasePronunciations)[lect] = get_pronunciation(get(phraseInput), lect);\n const phrasebook: Lexc.Phrasebook = Lang().Phrasebook;\n for (const category in phrasebook) {\n for (const entry in phrasebook[category]) {\n if (phrasebook[category][entry].pronunciations.hasOwnProperty(lect)) {\n if (phrasebook[category][entry].pronunciations[lect].irregular === false) {\n phrasebook[category][entry].pronunciations[lect].ipa =\n get_pronunciation(entry, lect);\n }\n for (const variant in phrasebook[category][entry].variants) {\n phrasebook[category][entry].variants[variant].pronunciations[lect].ipa =\n get_pronunciation(variant, lect);\n }\n }\n }\n }\n Lang().Phrasebook = phrasebook;\n}\n\n/**\n * Attempts to complete a given word using the user's phonotactics.\n * @param {string} trial\n * @returns {string} The completed word, or an empty string if no word could be generated\n */\nexport function complete_word(trial) {\n const random_boolean = () => Math.floor(Math.random() * 2) === 0;\n const choice = arr => arr[Math.floor(Math.random() * arr.length)];\n const inventory = {\n Onsets: Lang().Phonotactics.General.Onsets.split(/\\s+/g),\n Medials: Lang().Phonotactics.General.Medials.split(/\\s+/g), \n Codas: Lang().Phonotactics.General.Codas.split(/\\s+/g),\n Vowels: Lang().Phonotactics.General.Vowels.split(/\\s+/g),\n Illegals: Lang().Phonotactics.General.Illegals.split(/\\s+/g)\n };\n let word = '^' + trial;\n\n const finalize = (word: string) => {\n word += '^';\n if (!inventory.Illegals.some(v => word.includes(v)) || !inventory.Illegals[0]) {\n return word.replace(/\\^/g, '');\n } else {\n return '';\n }\n };\n\n let ends_in_vowel = false;\n for (const v of inventory.Vowels) {\n // Check if word ends in vowel; add middle consonant and vowel, or coda and end\n if (\n word.includes(v) &&\n word.lastIndexOf(v) === word.length - v.length\n ) {\n if (random_boolean()) {\n word += choice(inventory.Medials) + choice(inventory.Vowels);\n ends_in_vowel = true;\n break;\n } else {\n word += choice(inventory.Codas);\n return finalize(word);\n }\n }\n }\n if (!ends_in_vowel) {\n // Add vowel to end of word, potentially end word with vowel or vowel + coda\n word += choice(inventory.Vowels);\n if (random_boolean()) {\n if (random_boolean()) {\n word += choice(inventory.Codas);\n }\n return finalize(word);\n }\n }\n // End word with one of: coda, middle + vowel, or middle + vowel + coda\n if (random_boolean()) {\n word += choice(inventory.Codas);\n } else {\n word += choice(inventory.Medials) + choice(inventory.Vowels);\n if (random_boolean()) {\n word += choice(inventory.Codas);\n }\n }\n return finalize(word);\n}\n\n/**\n * Generates a random word based on the given phonotactics. Will attempt\n * up to 50 times to generate a word that does not contain any illegal\n * combinations. If no word can be generated, returns an empty string.\n * @returns {string} The generated word, or an empty string if one could not be generated.\n */\nexport function generate_word() {\n const attempt = () => {\n const inventory = {\n Onsets: Lang().Phonotactics.General.Onsets.split(/\\s+/g),\n Medials: Lang().Phonotactics.General.Medials.split(/\\s+/g),\n Codas: Lang().Phonotactics.General.Codas.split(/\\s+/g),\n Vowels: Lang().Phonotactics.General.Vowels.split(/\\s+/g),\n Illegals: Lang().Phonotactics.General.Illegals.split(/\\s+/g)\n };\n const random_boolean = () => Math.floor(Math.random() * 2) === 0;\n const choice = arr => arr[Math.floor(Math.random() * arr.length)];\n let word = '^';\n \n if (random_boolean()) {\n word += choice(inventory.Vowels);\n } else {\n word += choice(inventory.Onsets);\n word += choice(inventory.Vowels);\n }\n \n for (let j = 0; j < 2; j++) {\n if (random_boolean() || word.length === 2 /* word is \"^vowel\" */) {\n word += choice(inventory.Medials);\n word += choice(inventory.Vowels);\n }\n }\n if (random_boolean()) {\n word += choice(inventory.Codas);\n }\n \n word += '^';\n if (!inventory.Illegals.some(v => word.includes(v)) || !inventory.Illegals[0]) {\n return word.replace(/\\^/g, '');\n } else {\n return '';\n }\n };\n for (let i = 0; i < 50; i++) {\n const word = attempt();\n if (!!word) {\n return word;\n }\n }\n return '';\n}\n","export const formatVariableKey = (str) => {\n return str\n .replace(/-_$/g, '')\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z])(?=[a-z])/g, '$1-$2')\n .toLowerCase();\n};\n\nexport const getMinWidth = (element, maxWidth) => {\n const extraCharPadding = 2;\n const elementWidth = element.getBoundingClientRect().width + extraCharPadding;\n const elementStyle = window.getComputedStyle(element);\n const elementPaddingLeft = parseInt(elementStyle.getPropertyValue('padding-left'), 10);\n const elementPaddingRight = parseInt(elementStyle.getPropertyValue('padding-right'), 10);\n const elementPadding = elementPaddingLeft + elementPaddingRight;\n const contentWidth = elementWidth - elementPadding;\n\n return Math.round(Math.min(maxWidth, contentWidth || maxWidth));\n};\n\nexport const isInViewport = (element) => {\n const rect = element.getBoundingClientRect();\n\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n};\n","export const inverse = {\n left: 'right',\n right: 'left',\n top: 'bottom',\n bottom: 'top'\n};\n","\n\n\n {#if !isComponent}\n {@html content}\n {/if}\n\n\n\n","import Tooltip from './action-tooltip.svelte';\n\nexport const tooltip = (element, props) => {\n\n\tlet component = null;\n\tlet title = element.getAttribute('title');\n\n\tif (title) {\n\t\telement.removeAttribute('title');\n\n\t\tprops = {\n\t\t\tcontent: title,\n\t\t\t...props\n\t\t}\n\t}\n\n\tconst onMouseEnter = () => {\n\t\tif (!component) {\n\t\t\tcomponent = new Tooltip({\n\t\t\t\ttarget: element,\n\t\t\t\tprops\n\t\t\t});\n\t\t}\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tif (component) {\n\t\t\tcomponent.$destroy();\n\t\t\tcomponent = null;\n\t\t}\n\t};\n\n\telement.addEventListener('mouseenter', onMouseEnter);\n\telement.addEventListener('mouseleave', onMouseLeave);\n\telement.style.position = 'relative';\n\n\treturn {\n\t\tdestroy() {\n\t\t\telement.removeEventListener('mouseenter', onMouseEnter);\n\t\t\telement.removeEventListener('mouseleave', onMouseLeave);\n\n\t\t\tif (title) {\n\t\t\t\telement.setAttribute('title', title);\n\t\t\t}\n\t\t}\n\t};\n}\n","\n{#if $Language.ShowPronunciation}\n {#if Object.keys(pronunciations).length > 1 || $Language.UseLects || pronunciations.General === undefined}\n {#each Object.keys(pronunciations) as lect}\n

\n {lect}\n \n {pronunciations[lect].ipa}\n {#if pronunciations[lect].irregular}\n \n lightbulb\n {/if}\n \n

\n {/each}\n {:else}\n

\n {pronunciations.General.ipa}\n {#if pronunciations.General.irregular}\n \n lightbulb\n {/if}\n

\n {/if}\n{/if}\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n let len = node.getTotalLength();\n const style = getComputedStyle(node);\n if (style.strokeLinecap !== 'butt') {\n len += parseInt(style.strokeWidth);\n }\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (_, u) => `\n\t\t\tstroke-dasharray: ${len};\n\t\t\tstroke-dashoffset: ${u * len};\n\t\t`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","\n\n{#if data[0]}\n \n {#if show && !$hideDropdowns}\n
\n {#each data.flat() as block}\n {#if block.type === 'header'}\n {@html block.data.text}\n {/if}\n {#if block.type === 'table'}\n \n {#each block.data.content as row}\n \n {#each row as cell}\n \n {/each}\n \n {/each}\n
{@html cell}
\n {/if}\n {#if block.type === 'paragraph'}\n

{@html block.data.text}

\n {/if}\n {/each}\n
\n {/if}\n{/if}\n","/**\n * marked v4.3.0 - a markdown parser\n * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction getDefaults() {\n return {\n async: false,\n baseUrl: null,\n breaks: false,\n extensions: null,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n hooks: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n}\n\nlet defaults = getDefaults();\n\nfunction changeDefaults(newDefaults) {\n defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n}\n\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n/**\n * @param {string} html\n */\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\n\nconst caret = /(^|[^\\[])\\^/g;\n\n/**\n * @param {string | RegExp} regex\n * @param {string} opt\n */\nfunction edit(regex, opt) {\n regex = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: () => {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n}\n\nconst nonWordAndColonTest = /[^\\w:]/g;\nconst originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n/**\n * @param {boolean} sanitize\n * @param {string} base\n * @param {string} href\n */\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n let prot;\n try {\n prot = decodeURIComponent(unescape(href))\n .replace(nonWordAndColonTest, '')\n .toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\n\nconst baseUrls = {};\nconst justDomain = /^[^:]+:\\/*[^/]*$/;\nconst protocol = /^([^:]+:)[\\s\\S]*$/;\nconst domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n/**\n * @param {string} base\n * @param {string} href\n */\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n const relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n}\n\nconst noopTest = { exec: function noopTest() {} };\n\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n let i = 0;\n\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) { cells.shift(); }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) { cells.pop(); }\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param {string} str\n * @param {string} c\n * @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.slice(0, l - suffLen);\n}\n\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n const l = str.length;\n let level = 0,\n i = 0;\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\n/**\n * @param {string} pattern\n * @param {number} count\n */\nfunction repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n let result = '';\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result + pattern;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text)\n };\n}\n\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n const indentToCode = matchIndentToCode[1];\n\n return text\n .split('\\n')\n .map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n\n const [indentInNode] = matchIndentInNode;\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n })\n .join('\\n');\n}\n\n/**\n * Tokenizer\n */\nclass Tokenizer {\n constructor(options) {\n this.options = options || defaults;\n }\n\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n }\n\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic\n ? rtrim(text, '\\n')\n : text\n };\n }\n }\n\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline._escapes, '$1') : cap[2],\n text\n };\n }\n }\n\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n }\n\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ *>[ \\t]?/gm, '');\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n const tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens,\n text\n };\n }\n }\n\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine,\n line, nextLine, rawLine, itemContents, endEarly;\n\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n\n // Check if current bullet point can start a new List Item\n while (src) {\n endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n\n if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n\n raw = cap[0];\n src = src.substring(raw.length);\n\n line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n nextLine = src.split('\\n', 1)[0];\n\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimLeft();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n\n blankLine = false;\n\n if (!line && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n\n // Check if following lines should be included in List Item\n while (src) {\n rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) { // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n\n itemContents += '\\n' + nextLine;\n }\n\n if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n blankLine = true;\n }\n\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents\n });\n\n list.raw += raw;\n }\n\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimRight();\n list.items[list.items.length - 1].text = itemContents.trimRight();\n list.raw = list.raw.trimRight();\n\n const l = list.items.length;\n\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (i = 0; i < l; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n\n list.loose = hasMultipleLineBreaks;\n }\n }\n\n // Set all items to loose if list is loose\n if (list.loose) {\n for (i = 0; i < l; i++) {\n list.items[i].loose = true;\n }\n }\n\n return list;\n }\n }\n\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n raw: cap[0],\n pre: !this.options.sanitizer\n && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n };\n if (this.options.sanitize) {\n const text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n token.type = 'paragraph';\n token.text = text;\n token.tokens = this.lexer.inline(text);\n }\n return token;\n }\n }\n\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline._escapes, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline._escapes, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title\n };\n }\n }\n\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (cap) {\n const item = {\n type: 'table',\n header: splitCells(cap[1]).map(c => { return { text: c }; }),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n\n let l = item.align.length;\n let i, j, k, row;\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.rows.length;\n for (i = 0; i < l; i++) {\n item.rows[i] = splitCells(item.rows[i], item.header.length).map(c => { return { text: c }; });\n }\n\n // parse child tokens inside headers and cells\n\n // header child tokens\n l = item.header.length;\n for (j = 0; j < l; j++) {\n item.header[j].tokens = this.lexer.inline(item.header[j].text);\n }\n\n // cell child tokens\n l = item.rows.length;\n for (j = 0; j < l; j++) {\n row = item.rows[j];\n for (k = 0; k < row.length; k++) {\n row[k].tokens = this.lexer.inline(row[k].text);\n }\n }\n\n return item;\n }\n }\n }\n\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n }\n\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n }\n\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1])\n };\n }\n }\n\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^
/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize\n ? 'text'\n : 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n text: this.options.sanitize\n ? (this.options.sanitizer\n ? this.options.sanitizer(cap[0])\n : escape(cap[0]))\n : cap[0]\n };\n }\n }\n\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl))) {\n return;\n }\n\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim();\n if (/^$/.test(trimmedUrl))) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0], this.lexer);\n }\n }\n\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src))\n || (cap = this.rules.inline.nolink.exec(src))) {\n let link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n\n const nextChar = match[1] || match[2] || '';\n\n if (!nextChar || (nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) {\n const lLength = match[0].length - 1;\n let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n\n if (!rDelim) continue; // skip single * in __abc*abc__\n\n rLength = rDelim.length;\n\n if (match[3] || match[4]) { // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) { // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n\n const raw = src.slice(0, lLength + match.index + (match[0].length - rDelim.length) + rLength);\n\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n }\n\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text\n };\n }\n }\n\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n }\n\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n }\n\n autolink(src, mangle) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text\n }\n ]\n };\n }\n }\n\n url(src, mangle) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text\n }\n ]\n };\n }\n }\n\n inlineText(src, smartypants) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0];\n } else {\n text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text\n };\n }\n }\n}\n\n/**\n * Block-Level Grammar\n */\nconst block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n hr: /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n table: noopTest,\n lheading: /^((?:.|\\n(?!\\n))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n .replace('label', block._label)\n .replace('title', block._title)\n .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */)\n .replace('bull', block.bullet)\n .getRegex();\n\nblock.list = edit(block.list)\n .replace(/bull/g, block.bullet)\n .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n .replace('def', '\\\\n+(?=' + block.def.source + ')')\n .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n + '|track|ul';\nblock._comment = /|$)/;\nblock.html = edit(block.html, 'i')\n .replace('comment', block._comment)\n .replace('tag', block._tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\n\nblock.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n .replace('paragraph', block.paragraph)\n .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = { ...block };\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = {\n ...block.normal,\n table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n};\n\nblock.gfm.table = edit(block.gfm.table)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('blockquote', ' {0,3}>')\n .replace('code', ' {4}[^\\\\n]')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.gfm.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('table', block.gfm.table) // interrupt paragraphs with table\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = {\n ...block.normal,\n html: edit(\n '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', block._comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest, // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(block.normal._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' *#{1,6} *[^\\n]')\n .replace('lheading', block.lheading)\n .replace('blockquote', ' {0,3}>')\n .replace('|fences', '')\n .replace('|list', '')\n .replace('|html', '')\n .getRegex()\n};\n\n/**\n * Inline-Level Grammar\n */\nconst inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment'\n + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^', // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /^(?:[^_*\\\\]|\\\\.)*?\\_\\_(?:[^_*\\\\]|\\\\.)*?\\*(?:[^_*\\\\]|\\\\.)*?(?=\\_\\_)|(?:[^*\\\\]|\\\\.)+(?=[^*])|[punct_](\\*+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /^(?:[^_*\\\\]|\\\\.)*?\\*\\*(?:[^_*\\\\]|\\\\.)*?\\_(?:[^_*\\\\]|\\\\.)*?(?=\\*\\*)|(?:[^_\\\\]|\\\\.)+(?=[^_])|[punct*](\\_+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, \ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n// lookbehind is not available on Safari as of version 16\n// inline.escapedEmSt = /(?<=(?:^|[^\\\\)(?:\\\\[^])*)\\\\[*_]/g;\ninline.escapedEmSt = /(?:^|[^\\\\])(?:\\\\\\\\)*\\\\[*_]/g;\n\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\n\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim)\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g')\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g')\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n .replace('scheme', inline._scheme)\n .replace('email', inline._email)\n .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n .replace('comment', inline._comment)\n .replace('attribute', inline._attribute)\n .getRegex();\n\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n .replace('label', inline._label)\n .replace('href', inline._href)\n .replace('title', inline._title)\n .getRegex();\n\ninline.reflink = edit(inline.reflink)\n .replace('label', inline._label)\n .replace('ref', block._label)\n .getRegex();\n\ninline.nolink = edit(inline.nolink)\n .replace('ref', block._label)\n .getRegex();\n\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g')\n .replace('reflink', inline.reflink)\n .replace('nolink', inline.nolink)\n .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = { ...inline };\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = {\n ...inline.normal,\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', inline._label)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', inline._label)\n .getRegex()\n};\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = {\n ...inline.normal,\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '&#' + ch + ';';\n }\n\n return out;\n}\n\n/**\n * Block Lexer\n */\nclass Lexer {\n constructor(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n this.tokenizer.lexer = this;\n this.inlineQueue = [];\n this.state = {\n inLink: false,\n inRawBlock: false,\n top: true\n };\n\n const rules = {\n block: block.normal,\n inline: inline.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n this.tokenizer.rules = rules;\n }\n\n /**\n * Expose Rules\n */\n static get rules() {\n return {\n block,\n inline\n };\n }\n\n /**\n * Static Lex Method\n */\n static lex(src, options) {\n const lexer = new Lexer(options);\n return lexer.lex(src);\n }\n\n /**\n * Static Lex Inline Method\n */\n static lexInline(src, options) {\n const lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n\n /**\n * Preprocessing\n */\n lex(src) {\n src = src\n .replace(/\\r\\n|\\r/g, '\\n');\n\n this.blockTokens(src, this.tokens);\n\n let next;\n while (next = this.inlineQueue.shift()) {\n this.inlineTokens(next.src, next.tokens);\n }\n\n return this.tokens;\n }\n\n /**\n * Lexing\n */\n blockTokens(src, tokens = []) {\n if (this.options.pedantic) {\n src = src.replace(/\\t/g, ' ').replace(/^ +$/gm, '');\n } else {\n src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n return leading + ' '.repeat(tabs.length);\n });\n }\n\n let token, lastToken, cutSrc, lastParagraphClipped;\n\n while (src) {\n if (this.options.extensions\n && this.options.extensions.block\n && this.options.extensions.block.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach(function(getStartIndex) {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = (cutSrc.length !== src.length);\n src = src.substring(token.raw.length);\n continue;\n }\n\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n this.state.top = true;\n return tokens;\n }\n\n inline(src, tokens = []) {\n this.inlineQueue.push({ src, tokens });\n return tokens;\n }\n\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n // Mask out escaped em & strong delimiters\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index + match[0].length - 2) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n this.tokenizer.rules.inline.escapedEmSt.lastIndex--;\n }\n\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n\n // extensions\n if (this.options.extensions\n && this.options.extensions.inline\n && this.options.extensions.inline.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // autolink\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach(function(getStartIndex) {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n }\n}\n\n/**\n * Renderer\n */\nclass Renderer {\n constructor(options) {\n this.options = options || defaults;\n }\n\n code(code, infostring, escaped) {\n const lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n const out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n\n code = code.replace(/\\n$/, '') + '\\n';\n\n if (!lang) {\n return '
'\n        + (escaped ? code : escape(code, true))\n        + '
\\n';\n }\n\n return '
'\n      + (escaped ? code : escape(code, true))\n      + '
\\n';\n }\n\n /**\n * @param {string} quote\n */\n blockquote(quote) {\n return `
\\n${quote}
\\n`;\n }\n\n html(html) {\n return html;\n }\n\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */\n heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n const id = this.options.headerPrefix + slugger.slug(raw);\n return `${text}\\n`;\n }\n\n // ignore IDs\n return `${text}\\n`;\n }\n\n hr() {\n return this.options.xhtml ? '
\\n' : '
\\n';\n }\n\n list(body, ordered, start) {\n const type = ordered ? 'ol' : 'ul',\n startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n }\n\n /**\n * @param {string} text\n */\n listitem(text) {\n return `
  • ${text}
  • \\n`;\n }\n\n checkbox(checked) {\n return ' ';\n }\n\n /**\n * @param {string} text\n */\n paragraph(text) {\n return `

    ${text}

    \\n`;\n }\n\n /**\n * @param {string} header\n * @param {string} body\n */\n table(header, body) {\n if (body) body = `${body}`;\n\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
    \\n';\n }\n\n /**\n * @param {string} content\n */\n tablerow(content) {\n return `\\n${content}\\n`;\n }\n\n tablecell(content, flags) {\n const type = flags.header ? 'th' : 'td';\n const tag = flags.align\n ? `<${type} align=\"${flags.align}\">`\n : `<${type}>`;\n return tag + content + `\\n`;\n }\n\n /**\n * span level renderer\n * @param {string} text\n */\n strong(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n em(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n codespan(text) {\n return `${text}`;\n }\n\n br() {\n return this.options.xhtml ? '
    ' : '
    ';\n }\n\n /**\n * @param {string} text\n */\n del(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = '
    ';\n return out;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n\n let out = `\"${text}\"`;\n' : '>';\n return out;\n }\n\n text(text) {\n return text;\n }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass TextRenderer {\n // no need for block level renderers\n strong(text) {\n return text;\n }\n\n em(text) {\n return text;\n }\n\n codespan(text) {\n return text;\n }\n\n del(text) {\n return text;\n }\n\n html(text) {\n return text;\n }\n\n text(text) {\n return text;\n }\n\n link(href, title, text) {\n return '' + text;\n }\n\n image(href, title, text) {\n return '' + text;\n }\n\n br() {\n return '';\n }\n}\n\n/**\n * Slugger generates header id\n */\nclass Slugger {\n constructor() {\n this.seen = {};\n }\n\n /**\n * @param {string} value\n */\n serialize(value) {\n return value\n .toLowerCase()\n .trim()\n // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '')\n // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '')\n .replace(/\\s/g, '-');\n }\n\n /**\n * Finds the next safe (unique) slug to use\n * @param {string} originalSlug\n * @param {boolean} isDryRun\n */\n getNextSafeSlug(originalSlug, isDryRun) {\n let slug = originalSlug;\n let occurenceAccumulator = 0;\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n return slug;\n }\n\n /**\n * Convert string to unique id\n * @param {object} [options]\n * @param {boolean} [options.dryrun] Generates the next unique slug without\n * updating the internal accumulator.\n */\n slug(value, options = {}) {\n const slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n }\n}\n\n/**\n * Parsing & Compiling\n */\nclass Parser {\n constructor(options) {\n this.options = options || defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer();\n this.slugger = new Slugger();\n }\n\n /**\n * Static Parse Method\n */\n static parse(tokens, options) {\n const parser = new Parser(options);\n return parser.parse(tokens);\n }\n\n /**\n * Static Parse Inline Method\n */\n static parseInline(tokens, options) {\n const parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n\n /**\n * Parse Loop\n */\n parse(tokens, top = true) {\n let out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox,\n ret;\n\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n\n switch (token.type) {\n case 'space': {\n continue;\n }\n case 'hr': {\n out += this.renderer.hr();\n continue;\n }\n case 'heading': {\n out += this.renderer.heading(\n this.parseInline(token.tokens),\n token.depth,\n unescape(this.parseInline(token.tokens, this.textRenderer)),\n this.slugger);\n continue;\n }\n case 'code': {\n out += this.renderer.code(token.text,\n token.lang,\n token.escaped);\n continue;\n }\n case 'table': {\n header = '';\n\n // header\n cell = '';\n l2 = token.header.length;\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(\n this.parseInline(token.header[j].tokens),\n { header: true, align: token.align[j] }\n );\n }\n header += this.renderer.tablerow(cell);\n\n body = '';\n l2 = token.rows.length;\n for (j = 0; j < l2; j++) {\n row = token.rows[j];\n\n cell = '';\n l3 = row.length;\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(\n this.parseInline(row[k].tokens),\n { header: false, align: token.align[k] }\n );\n }\n\n body += this.renderer.tablerow(cell);\n }\n out += this.renderer.table(header, body);\n continue;\n }\n case 'blockquote': {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n case 'list': {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n\n body = '';\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n\n itemBody = '';\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html': {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n case 'paragraph': {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n case 'text': {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default: {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n\n /**\n * Parse Inline Tokens\n */\n parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n let out = '',\n i,\n token,\n ret;\n\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n\n switch (token.type) {\n case 'escape': {\n out += renderer.text(token.text);\n break;\n }\n case 'html': {\n out += renderer.html(token.text);\n break;\n }\n case 'link': {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n case 'image': {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n case 'strong': {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'em': {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'codespan': {\n out += renderer.codespan(token.text);\n break;\n }\n case 'br': {\n out += renderer.br();\n break;\n }\n case 'del': {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'text': {\n out += renderer.text(token.text);\n break;\n }\n default: {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n}\n\nclass Hooks {\n constructor(options) {\n this.options = options || defaults;\n }\n\n static passThroughHooks = new Set([\n 'preprocess',\n 'postprocess'\n ]);\n\n /**\n * Process markdown before marked\n */\n preprocess(markdown) {\n return markdown;\n }\n\n /**\n * Process HTML after marked is finished\n */\n postprocess(html) {\n return html;\n }\n}\n\nfunction onError(silent, async, callback) {\n return (e) => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (silent) {\n const msg = '

    An error occurred:

    '\n        + escape(e.message + '', true)\n        + '
    ';\n if (async) {\n return Promise.resolve(msg);\n }\n if (callback) {\n callback(null, msg);\n return;\n }\n return msg;\n }\n\n if (async) {\n return Promise.reject(e);\n }\n if (callback) {\n callback(e);\n return;\n }\n throw e;\n };\n}\n\nfunction parseMarkdown(lexer, parser) {\n return (src, opt, callback) => {\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n const origOpt = { ...opt };\n opt = { ...marked.defaults, ...origOpt };\n const throwError = onError(opt.silent, opt.async, callback);\n\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected'));\n }\n\n checkSanitizeDeprecation(opt);\n\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n\n if (callback) {\n const highlight = opt.highlight;\n let tokens;\n\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n tokens = lexer(src, opt);\n } catch (e) {\n return throwError(e);\n }\n\n const done = function(err) {\n let out;\n\n if (!err) {\n try {\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n out = parser(tokens, opt);\n if (opt.hooks) {\n out = opt.hooks.postprocess(out);\n }\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n\n return err\n ? throwError(err)\n : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n\n if (!tokens.length) return done();\n\n let pending = 0;\n marked.walkTokens(tokens, function(token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(() => {\n highlight(token.text, token.lang, function(err, code) {\n if (err) {\n return done(err);\n }\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n .then(src => lexer(src, opt))\n .then(tokens => opt.walkTokens ? Promise.all(marked.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n .then(tokens => parser(tokens, opt))\n .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n .catch(throwError);\n }\n\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n const tokens = lexer(src, opt);\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n return parseMarkdown(Lexer.lex, Parser.parse)(src, opt, callback);\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n marked.defaults = { ...marked.defaults, ...opt };\n changeDefaults(marked.defaults);\n return marked;\n};\n\nmarked.getDefaults = getDefaults;\n\nmarked.defaults = defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function(...args) {\n const extensions = marked.defaults.extensions || { renderers: {}, childTokens: {} };\n\n args.forEach((pack) => {\n // copy options to new object\n const opts = { ...pack };\n\n // set async to true if it was set to true before\n opts.async = marked.defaults.async || opts.async || false;\n\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach((ext) => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if (ext.renderer) { // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function(...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if (ext.tokenizer) { // Tokenizer Extensions\n if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n if (extensions[ext.level]) {\n extensions[ext.level].unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) { // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if (ext.childTokens) { // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = marked.defaults.renderer || new Renderer();\n for (const prop in pack.renderer) {\n const prevRenderer = renderer[prop];\n // Replace renderer with func to run extension, but fall back if false\n renderer[prop] = (...args) => {\n let ret = pack.renderer[prop].apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret;\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = marked.defaults.tokenizer || new Tokenizer();\n for (const prop in pack.tokenizer) {\n const prevTokenizer = tokenizer[prop];\n // Replace tokenizer with func to run extension, but fall back if false\n tokenizer[prop] = (...args) => {\n let ret = pack.tokenizer[prop].apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = marked.defaults.hooks || new Hooks();\n for (const prop in pack.hooks) {\n const prevHook = hooks[prop];\n if (Hooks.passThroughHooks.has(prop)) {\n hooks[prop] = (arg) => {\n if (marked.defaults.async) {\n return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n\n const ret = pack.hooks[prop].call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n hooks[prop] = (...args) => {\n let ret = pack.hooks[prop].apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = marked.defaults.walkTokens;\n opts.walkTokens = function(token) {\n let values = [];\n values.push(pack.walkTokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n\n marked.setOptions(opts);\n });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function(tokens, callback) {\n let values = [];\n for (const token of tokens) {\n values = values.concat(callback.call(marked, token));\n switch (token.type) {\n case 'table': {\n for (const cell of token.header) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n for (const row of token.rows) {\n for (const cell of row) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n }\n break;\n }\n case 'list': {\n values = values.concat(marked.walkTokens(token.items, callback));\n break;\n }\n default: {\n if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) { // Walk any extensions\n marked.defaults.extensions.childTokens[token.type].forEach(function(childTokens) {\n values = values.concat(marked.walkTokens(token[childTokens], callback));\n });\n } else if (token.tokens) {\n values = values.concat(marked.walkTokens(token.tokens, callback));\n }\n }\n }\n }\n return values;\n};\n\n/**\n * Parse Inline\n * @param {string} src\n */\nmarked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline);\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.Hooks = Hooks;\nmarked.parse = marked;\n\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = Parser.parse;\nconst lexer = Lexer.lex;\n\nexport { Hooks, Lexer, Parser, Renderer, Slugger, TextRenderer, Tokenizer, defaults, getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n","import { marked } from 'marked';\nexport function markdownToHtml(text: string): string {\n text = text.replaceAll(/__(.+)__/g, '$1'); // manually handle underlining\n text = marked.parse(text, { \n breaks: true, \n smartypants: true,\n });\n return text;\n}\n","\n\n{#if $Language.Orthographies.find(o => o.name === 'Romanization').display}\n

    {word}

    \n{/if}\n{#each $Language.Orthographies as ortho}\n {#if ortho.name !== 'Romanization' && ortho.display && (ortho.root === 'rom' || (ortho.lect in source.pronunciations))}\n

    o.name === ortho.name).font}\n >{(()=>{\n const settings = parseRules($Language.Orthographies.find(o => o.name === ortho.name).rules);\n return applyRules(settings.rules, ortho.root === 'rom'? word : source.pronunciations[ortho.lect].ipa, settings.categories);\n })()}

    \n {/if}\n{/each}\n\n","\n\n
    \n \n \n {#each source.Senses as Sense, i}\n {#if source.Senses.length > 1} \n
    {i+1}.
    \n {/if}\n {#each Sense.tags as tag}\n {#if !!tag}\n
    {tag}
    \n {/if}\n {/each}\n {#if $Language.UseLects} \n

    \n {Sense.lects.join(', ')}\n

    \n {/if}\n

    {@html markdownToHtml(Sense.definition)}

    \n {#if $Language.ShowInflection || showInflections}\n \n {/if}\n {#if $Language.ShowEtymology && !!entryAncestors && showEtymology}\n
    etymology
    \n

    {entryAncestors}

    \n {/if}\n {/each}\n
    \n","\n\n","\n\n
    \n
    \n \n
    \n \n

    \n {#if $Language.UseAdvancedPhonotactics}\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n {#if typeof $referenceLanguage === 'object'}\n

    Reference Language: {$referenceLanguage.Name}

    \n \n {#if $Language.ShowEtymology}\n \n {/if}\n {/if}\n
    \n

    \n Evolve Language

    \n \n
    \n

    Export Lexicon

    \n

    HTML

    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n

    Import Lexicon from CSV

    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n
    \n \n \n \n
    \n

    Import Lexicon from Plain Text

    \n

    Check the Help tab to read about the plain text format Lexicanter can convert into lexicon entries.

    \n
    \n \n \n
    \n

    \n
    \n
    \n
    \n","\n\n
    \n
    \n
    \n

    \n

    Appearance Settings


    \n \n
    \n \n \n
    \n \n\n


    \n\n

    Save Settings


    \n \n\n
    \n \n
    \n\n


    \n\n

    Lexicon Settings


    \n \n\n


    \n\n

    Advanced Settings


    \n \n \n

    \n \n

    \n \n

    \n \n
    \n
    \n
    \n","
    \n
    \n
    \n

    \n Interested in testing the beta versions, talking about languages, or worldbuilding?
    \n Join
    Saturn's Sojourn, \n the home of the Lexicanter on Discord!\n

    \n
    \n

    \n Support the continued developement of the app as a patron,\n

    \n

    \n or by buying me a coffee!\n

    \n\n

    \n\n Below is a list of all changes made to the app since version 1.8, which is when the changelog was first added.
    \n If you're looking for more information about how to use the app, check the Help tab or visit the \n Wiki.
    There is also\n an overview tutorial video for release 2.0.\n
    If you're still having trouble, or need to contact the developer, visit us in the \n Discord server. \n\n


    \n\n

    Patch 2.1.14

    \n

    \n • Fixed a bug with the orthography pattern replacement features which caused it to only replace the first instance of a pattern in each word.
    \n • Added the ability to use ^ or # as word-end characters in the orthography pattern replacement fields.
    \n • Fixed a reported bug with the Illegals field of the Advanced Phonotactics word generator which caused that field not to save its contents.
    \n • Fixed a bug with database syncing which caused the setting to not save for files.\n • Files should now automatically detect when you have changes in the database on loading, and will prompt you to download the changes.\n

    \n
    \n

    Patch 2.1.13

    \n

    \n • Added an Illegals field to the Advanced Phonotactics word generator options.
    \n • Added the Structures inputs to the Advanced Phonotactics word generator options and the corresponding syllable category syntax for this feature.
    \n • (Finally) wrote the documentation on the word generator, which can be found in the Help tab.
    \n

    \n
    \n

    Patch 2.1.12

    \n

    \n • Added a new default text to the Pronunciations field in the Phonology tab to better guide beginners.
    \n • Added an indicator on entries in the lexicon tab to show if their pronunciation was manually edited and thus not automatically updated by pronunciation rules.
    \n

    \n
    \n

    Patch 2.1.11

    \n

    \n • Added secondary location file saving, for those of you who want your lexicon files to save to another location on your computer every time you save.
    \n • Added database syncing! Get your account credentials from the Lexicanter Discord bot, and then you can sync your files to the bot and between devices.
    \n • A minor change to how app settings are saved. The old app settings files are now deprecated and will eventually no longer be supported.
    \n

    \n
    \n

    Patch 2.1.10

    \n

    \n • New tooltips have been added throughout the app.
    \n • New All Hallow's Eve 2023 theme in the Holiday collection!
    \n

    \n
    \n

    Patch 2.1.9

    \n

    \n • Hot fix for a bug which caused data saved by the advanced word generator not to be loaded open re-opening a file.
    \n • A new feature will be coming in 2.2 which requires a change to the way lexicon entries are formatted internally, which this update prepares for.
    \n

    \n
    \n

    New in 2.1

    \n

    \n • Introduced a plain text import feature for convenient clonging on the move.
    \n • Added a reference window for loading secondary files in read-only mode.
    \n • Support for custom fonts via new Orthographies feature.
    \n • Under-the-hood file structure adjustments and read logic improvements.
    \n • New phonological evolution tools!
    \n • An alternative type of word generator for more advanced syllable structures.
    \n • The option to save theme preferences on a file-by-file basis.
    \n • New themes: Magnolia by Saturnine, Crabapple by Maarz, and Eostre 2023 (a holiday theme released for beta users earlier this year).
    \n • A number of bugs removed; probably some bugs added. Please report them if you find them!
    \n

    \n
    \n

    Patch 2.0.18

    \n

    \n • By request, added a new dropdown to Tag inputs which allows you to select from pre-existing tags in your lexicon.
    \n • By request, added a new Help tab. It hosts the same information as the wiki, but is accessible offline.
    \n • The Settings, Changelog, and Help tabs, as well as the window control buttons, now use Material Icons. \n

    \n

    \n

    Patch 2.0.17

    \n

    \n • Fixed an a reported bug with the inflections generation.
    \n • Fixed an issue with tag searching.
    \n • The font weight has been changed to an appropriate Book weight to improve readability on some systems and to many eyes.\n

    \n

    \n

    Patch 2.0.16

    \n

    \n • Fixed a small bug with the new sound change engine.
    \n

    \n

    \n

    Patch 2.0.15

    \n

    \n • Fixed a reported bug with HTML export.
    \n • Related to the above fix, technical limitations now prevent your theme from being exported with your HTML. Solutions are being investigated.\n

    \n

    \n

    Patch 2.0.14

    \n

    \n • Fixed CSV export.
    \n • Fixed a reported bug with HTML export.
    \n • Fixed some reported and unreported issues with the sound change engine.
    \n • There is now a text input designated for specifying categories for sound changes in an inflection group, to make everyone's life easier.
    \n • Minor optimizations and performance improvements.\n

    \n

    \n

    Patch 2.0.13

    \n

    \n • Linux support!\n

    \n

    \n

    Patch 2.0.12

    \n

    \n • Fixed a reported bug which caused HTML export to fail. Expect expanded HTML export options in the future.
    \n • Minor optimizations. \n

    \n

    \n

    Patch 2.0.11

    \n

    \n • Fixed a reported bug which caused a semi-rare soft-crash in certain cases when dealing with multiple lects. Again.\n

    \n

    \n

    Patch 2.0.10

    \n

    \n • Fixed a reported bug which caused a semi-rare soft-crash in certain cases when dealing with multiple lects.
    \n • Fixed a reported bug which caused CSV import to fail, and improved CSV import options. \n

    \n

    \n

    Patch 2.0.9

    \n

    \n • You can now write multple rules separated by a semicolon, which allows for multiple rules per table cell in the inflection tables.
    \n • Fixed a reported bug which caused a soft crash when attempting to edit the last word in the lexicon if it had an inflections dropdown open.\n

    \n

    \n

    New in 2.0

    \n

    \n • There is now a new sound change engine under the hood. Your old rules may no longer work; for assistance, you can contact the developer.
    \n • Lexicon entries can now be separated into multiple Senses, each of which can have their own tags.
    \n • There are new features accessible via new Advanced Settings. These include:
    \n • New Lect features allow you to denote the ways your language may vary, particularly in semantics and pronunciation.
    \n • New Inflection features, which include a new tab, which allows you to create inflectional paradigms for your language.
    \n • New Etymology features, which include a new tab, allows you to create etymologies trees and view them in the lexicon.
    \n • Check out the new wiki page \n or tutorial video for more in-depth information!
    \n • New app icons by Lyiusa!
    \n • New themes: Juniper by Saturnine, and Midnight and Bone by Maarz!\n

    \n

    \n

    Patch 1.11.4

    \n

    \n • Fixed a reported bug causing markdown not to work in variant descriptions of phrases.\n

    \n

    \n

    Patch 1.11.3

    \n

    \n • Fixed a reported bug causing the alphabetizer pre-check to send false alerts when certain combining diacritics on certain characters were in the alphabet in certain orders.\n

    \n

    \n

    Patch 1.11.2

    \n

    \n • The app now saves backup versions of your files in case things go wrong.
    \n • Fixed a reported bug that caused the app to sometimes exit too quickly and not save when autosave was enabled.\n

    \n

    \n

    Patch 1.11.1

    \n

    \n • Fixed a reported bug causing the Ignore Diacritics setting to be ignored during alphabet checks when adding words to the lexicon.
    \n

    \n
    \n

    New in 1.11

    \n

    \n • When you attempt to add a word to the lexicon, there is now an alert if the word contains characters (or polygraphs) not present in your alphabet.
    \n • Fixed a reported bug causing external links in to not display correctly in the Lexicon tab specifically.
    \n • Fixed a reported bug preventing the app from warning you that it will not save if there is no file name given.
    \n • Fixed a minor bug with the Terminal theme when exported for HTML.
    \n

    \n
    \n

    New in 1.10

    \n

    \n • Added three new themes: Pomegranate, Wisteria, and Terminal.
    \n • The word entry panel in the Lexicon tab is now collapsible.
    \n • The Phrasebook now has active overwrite protection to prevent you from deleting your work by mistake.
    \n • You can now search for an exact whole-word match in definitions and tags fields by using ! as a prefix.
    \n • For HTML exports, the appearance on mobile devices has been improved.
    \n • Minor bug fixes for opening new windows from the File tab.
    \n • Lots of uner-the-hood changes for the app's appearance in preparation for future features.
    \n

    \n
    \n

    Patch 1.9.5

    \n

    \n • Fixed a bug causing app-quit to be impossible sometimes.
    \n • Fixed some minor bugs with the styles.
    \n • Fixed a bug causing monospace toggle in the docs tab to be undoable.
    \n • Fixed a bug causing external hyperlinks not to use the preferred browser, and is some cases not open at all.
    \n

    \n
    \n

    Patch 1.9.4

    \n

    \n • You can now hyperlink to entries in the lexicon. The link format is lex::word.
    \n • The documentation tab would previously not adjust to the width of the window. That has been fixed.
    \n

    \n
    \n

    New in 1.9

    \n

    \n • Overhauled the Documentation tab, which now uses integrated EditorJS technology.
    Markdown is no longer supported in this tab, \n in favor of the new WYSIWYG style with a toolbar visible when you highlight text.
    \n • Note: The first time you load a file from an older version, there may be some formatting quirks. \n Most of these should sort themselves out after saving in the new version and re-loading. \n Please contact the developer if you run into persistent issues.
    \n • Fixed a bug with the Open New Window button which caused it to fail to open new windows.
    \n • The button to edit phrasebook entries has been change to right-click instead of left-click to\n make it more difficult to accidentally overwrite work in progress, and to allow for\n highlighting text.
    \n • An HTML Docs-Only export option has been added.
    \n

    \n
    \n

    Patch 1.8.14

    \n

    \n • Fixed a few minor bugs with markdown parsing.
    \n • Added monospace markdown with ``this`` syntax.
    \n • Fixed a reported bug which affected the orthography testing area.
    \n

    \n
    \n

    New in 1.8

    \n

    \n • File storage has been migrated to make auto-save possible.
    \n • Categories can now be defined and used in your Pronunciations rules. See the docs page for more info.
    \n • Five new color themes: Light, Marine, Glade, Leatherbound, and Purple Maar (contributed by Maarz).
    \n • You can now load in your own custom CSS color themes.
    \n • Definitions, descriptions, and documentation sections now support simple markdown.
    \n • There's a new space in the Phonology tab to test your pronunciation rules.
    \n • Tag searches no longer require an exact match.
    \n • Several minor bug fixes, including one reported about tables being editable in the HTML\n export.
    \n

    \n
    \n
    \n
    \n
    \n","\n
    \n
    \n
    \n {#each $Language.Inflections as inflection, i}\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n

    \n {/each}\n \n
    \n
    \n
    \n","\n
    \n
    \n
    \n\n {#each $Language.Orthographies as orthography, i}\n \n \n \n \n {#if $Language.UseLects && orthography.root === 'ipa'}\n \n {/if}\n
    \n \n {#if orthography.name !== 'Romanization'}\n {\n $Language.Orthographies = [\n ...$Language.Orthographies.slice(0, i),\n ...$Language.Orthographies.slice(i + 1)\n ];\n }}\n >Delete\n {/if}\n {/each}\n\n {\n $Language.Orthographies = [\n ...$Language.Orthographies,\n {\n name: `New Orthography ${$Language.Orthographies.length}`,\n font: 'Gentium',\n root: 'ipa',\n lect: $Language.Lects[0],\n rules: '',\n display: true\n }\n ];\n }}\n >New Orthography\n
    \n
    \n \n \n
    \n