`\",\n type: \"boolean\"\n
+ \ },\n ellipsis: {\n defaultValue: true,\n describe:
+ \"Replaces three dots with the ellipsis unicode character\",\n type:
+ \"boolean\"\n },\n completeHTMLDocument: {\n defaultValue:
+ false,\n describe: \"Outputs a complete html document, including
+ ``, `` and `` tags\",\n type: \"boolean\"\n },\n
+ \ metadata: {\n defaultValue: false,\n describe:
+ \"Enable support for document metadata (defined at the top of the document
+ between `«««` and `»»»` or between `---` and `---`).\",\n type:
+ \"boolean\"\n },\n splitAdjacentBlockquotes: {\n defaultValue:
+ false,\n describe: \"Split adjacent blockquote blocks\",\n type:
+ \"boolean\"\n }\n };\n if (simple === false) {\n return
+ JSON.parse(JSON.stringify(defaultOptions2));\n }\n var ret =
+ {};\n for (var opt in defaultOptions2) {\n if (defaultOptions2.hasOwnProperty(opt))
+ {\n ret[opt] = defaultOptions2[opt].defaultValue;\n }\n
+ \ }\n return ret;\n }\n function allOptionsOn() {\n
+ \ var options = getDefaultOpts(true), ret = {};\n for (var opt
+ in options) {\n if (options.hasOwnProperty(opt)) {\n ret[opt]
+ = true;\n }\n }\n return ret;\n }\n var showdown2
+ = {}, parsers = {}, extensions = {}, globalOptions = getDefaultOpts(true),
+ setFlavor = \"vanilla\", flavor = {\n github: {\n omitExtraWLInCodeBlocks:
+ true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs:
+ true,\n literalMidWordUnderscores: true,\n strikethrough:
+ true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks:
+ true,\n tasklists: true,\n disableForced4SpacesIndentedSublists:
+ true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText:
+ true,\n ghCompatibleHeaderId: true,\n ghMentions: true,\n
+ \ backslashEscapesHTMLTags: true,\n emoji: true,\n splitAdjacentBlockquotes:
+ true\n },\n original: {\n noHeaderId: true,\n ghCodeBlocks:
+ false\n },\n ghost: {\n omitExtraWLInCodeBlocks: true,\n
+ \ parseImgDimensions: true,\n simplifiedAutoLink: true,\n
+ \ excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores:
+ true,\n strikethrough: true,\n tables: true,\n tablesHeaderId:
+ true,\n ghCodeBlocks: true,\n tasklists: true,\n smoothLivePreview:
+ true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText:
+ true,\n ghMentions: false,\n encodeEmails: true\n },\n
+ \ vanilla: getDefaultOpts(true),\n allOn: allOptionsOn()\n };\n
+ \ showdown2.helper = {};\n showdown2.extensions = {};\n showdown2.setOption
+ = function(key, value) {\n globalOptions[key] = value;\n return
+ this;\n };\n showdown2.getOption = function(key) {\n return
+ globalOptions[key];\n };\n showdown2.getOptions = function() {\n
+ \ return globalOptions;\n };\n showdown2.resetOptions = function()
+ {\n globalOptions = getDefaultOpts(true);\n };\n showdown2.setFlavor
+ = function(name) {\n if (!flavor.hasOwnProperty(name)) {\n throw
+ Error(name + \" flavor was not found\");\n }\n showdown2.resetOptions();\n
+ \ var preset = flavor[name];\n setFlavor = name;\n for
+ (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n
+ \ globalOptions[option] = preset[option];\n }\n }\n
+ \ };\n showdown2.getFlavor = function() {\n return setFlavor;\n
+ \ };\n showdown2.getFlavorOptions = function(name) {\n if
+ (flavor.hasOwnProperty(name)) {\n return flavor[name];\n }\n
+ \ };\n showdown2.getDefaultOptions = function(simple) {\n return
+ getDefaultOpts(simple);\n };\n showdown2.subParser = function(name,
+ func) {\n if (showdown2.helper.isString(name)) {\n if (typeof
+ func !== \"undefined\") {\n parsers[name] = func;\n }
+ else {\n if (parsers.hasOwnProperty(name)) {\n return
+ parsers[name];\n } else {\n throw Error(\"SubParser
+ named \" + name + \" not registered!\");\n }\n }\n }\n
+ \ };\n showdown2.extension = function(name, ext) {\n if (!showdown2.helper.isString(name))
+ {\n throw Error(\"Extension 'name' must be a string\");\n }\n
+ \ name = showdown2.helper.stdExtName(name);\n if (showdown2.helper.isUndefined(ext))
+ {\n if (!extensions.hasOwnProperty(name)) {\n throw Error(\"Extension
+ named \" + name + \" is not registered!\");\n }\n return
+ extensions[name];\n } else {\n if (typeof ext === \"function\")
+ {\n ext = ext();\n }\n if (!showdown2.helper.isArray(ext))
+ {\n ext = [ext];\n }\n var validExtension = validate(ext,
+ name);\n if (validExtension.valid) {\n extensions[name]
+ = ext;\n } else {\n throw Error(validExtension.error);\n
+ \ }\n }\n };\n showdown2.getAllExtensions = function()
+ {\n return extensions;\n };\n showdown2.removeExtension =
+ function(name) {\n delete extensions[name];\n };\n showdown2.resetExtensions
+ = function() {\n extensions = {};\n };\n function validate(extension,
+ name) {\n var errMsg = name ? \"Error in \" + name + \" extension->\"
+ : \"Error in unnamed extension\", ret = {\n valid: true,\n error:
+ \"\"\n };\n if (!showdown2.helper.isArray(extension)) {\n extension
+ = [extension];\n }\n for (var i3 = 0; i3 < extension.length;
+ ++i3) {\n var baseMsg = errMsg + \" sub-extension \" + i3 + \": \",
+ ext = extension[i3];\n if (typeof ext !== \"object\") {\n ret.valid
+ = false;\n ret.error = baseMsg + \"must be an object, but \" +
+ typeof ext + \" given\";\n return ret;\n }\n if
+ (!showdown2.helper.isString(ext.type)) {\n ret.valid = false;\n
+ \ ret.error = baseMsg + 'property \"type\" must be a string, but
+ ' + typeof ext.type + \" given\";\n return ret;\n }\n
+ \ var type = ext.type = ext.type.toLowerCase();\n if (type
+ === \"language\") {\n type = ext.type = \"lang\";\n }\n
+ \ if (type === \"html\") {\n type = ext.type = \"output\";\n
+ \ }\n if (type !== \"lang\" && type !== \"output\" && type
+ !== \"listener\") {\n ret.valid = false;\n ret.error
+ = baseMsg + \"type \" + type + ' is not recognized. Valid values: \"lang/language\",
+ \"output/html\" or \"listener\"';\n return ret;\n }\n
+ \ if (type === \"listener\") {\n if (showdown2.helper.isUndefined(ext.listeners))
+ {\n ret.valid = false;\n ret.error = baseMsg + '.
+ Extensions of type \"listener\" must have a property called \"listeners\"';\n
+ \ return ret;\n }\n } else {\n if
+ (showdown2.helper.isUndefined(ext.filter) && showdown2.helper.isUndefined(ext.regex))
+ {\n ret.valid = false;\n ret.error = baseMsg + type
+ + ' extensions must define either a \"regex\" property or a \"filter\" method';\n
+ \ return ret;\n }\n }\n if (ext.listeners)
+ {\n if (typeof ext.listeners !== \"object\") {\n ret.valid
+ = false;\n ret.error = baseMsg + '\"listeners\" property must
+ be an object but ' + typeof ext.listeners + \" given\";\n return
+ ret;\n }\n for (var ln in ext.listeners) {\n if
+ (ext.listeners.hasOwnProperty(ln)) {\n if (typeof ext.listeners[ln]
+ !== \"function\") {\n ret.valid = false;\n ret.error
+ = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback].
+ listeners.' + ln + \" must be a function but \" + typeof ext.listeners[ln]
+ + \" given\";\n return ret;\n }\n }\n
+ \ }\n }\n if (ext.filter) {\n if (typeof
+ ext.filter !== \"function\") {\n ret.valid = false;\n ret.error
+ = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + \"
+ given\";\n return ret;\n }\n } else if (ext.regex)
+ {\n if (showdown2.helper.isString(ext.regex)) {\n ext.regex
+ = new RegExp(ext.regex, \"g\");\n }\n if (!(ext.regex
+ instanceof RegExp)) {\n ret.valid = false;\n ret.error
+ = baseMsg + '\"regex\" property must either be a string or a RegExp object,
+ but ' + typeof ext.regex + \" given\";\n return ret;\n }\n
+ \ if (showdown2.helper.isUndefined(ext.replace)) {\n ret.valid
+ = false;\n ret.error = baseMsg + '\"regex\" extensions must implement
+ a replace string or function';\n return ret;\n }\n
+ \ }\n }\n return ret;\n }\n showdown2.validateExtension
+ = function(ext) {\n var validateExtension = validate(ext, null);\n
+ \ if (!validateExtension.valid) {\n console.warn(validateExtension.error);\n
+ \ return false;\n }\n return true;\n };\n if
+ (!showdown2.hasOwnProperty(\"helper\")) {\n showdown2.helper = {};\n
+ \ }\n showdown2.helper.isString = function(a2) {\n return
+ typeof a2 === \"string\" || a2 instanceof String;\n };\n showdown2.helper.isFunction
+ = function(a2) {\n var getType = {};\n return a2 && getType.toString.call(a2)
+ === \"[object Function]\";\n };\n showdown2.helper.isArray = function(a2)
+ {\n return Array.isArray(a2);\n };\n showdown2.helper.isUndefined
+ = function(value) {\n return typeof value === \"undefined\";\n };\n
+ \ showdown2.helper.forEach = function(obj, callback) {\n if (showdown2.helper.isUndefined(obj))
+ {\n throw new Error(\"obj param is required\");\n }\n if
+ (showdown2.helper.isUndefined(callback)) {\n throw new Error(\"callback
+ param is required\");\n }\n if (!showdown2.helper.isFunction(callback))
+ {\n throw new Error(\"callback param must be a function/closure\");\n
+ \ }\n if (typeof obj.forEach === \"function\") {\n obj.forEach(callback);\n
+ \ } else if (showdown2.helper.isArray(obj)) {\n for (var i3
+ = 0; i3 < obj.length; i3++) {\n callback(obj[i3], i3, obj);\n }\n
+ \ } else if (typeof obj === \"object\") {\n for (var prop in
+ obj) {\n if (obj.hasOwnProperty(prop)) {\n callback(obj[prop],
+ prop, obj);\n }\n }\n } else {\n throw
+ new Error(\"obj does not seem to be an array or an iterable object\");\n }\n
+ \ };\n showdown2.helper.stdExtName = function(s2) {\n return
+ s2.replace(/[_?*+\\/\\\\.^-]/g, \"\").replace(/\\s/g, \"\").toLowerCase();\n
+ \ };\n function escapeCharactersCallback(wholeMatch, m1) {\n var
+ charCodeToEscape = m1.charCodeAt(0);\n return \"¨E\" + charCodeToEscape
+ + \"E\";\n }\n showdown2.helper.escapeCharactersCallback = escapeCharactersCallback;\n
+ \ showdown2.helper.escapeCharacters = function(text2, charsToEscape, afterBackslash)
+ {\n var regexString = \"([\" + charsToEscape.replace(/([\\[\\]\\\\])/g,
+ \"\\\\$1\") + \"])\";\n if (afterBackslash) {\n regexString
+ = \"\\\\\\\\\" + regexString;\n }\n var regex2 = new RegExp(regexString,
+ \"g\");\n text2 = text2.replace(regex2, escapeCharactersCallback);\n
+ \ return text2;\n };\n showdown2.helper.unescapeHTMLEntities
+ = function(txt) {\n return txt.replace(/"/g, '\"').replace(/</g,
+ \"<\").replace(/>/g, \">\").replace(/&/g, \"&\");\n };\n var
+ rgxFindMatchPos = function(str, left, right, flags) {\n var f2 = flags
+ || \"\", g2 = f2.indexOf(\"g\") > -1, x2 = new RegExp(left + \"|\" + right,
+ \"g\" + f2.replace(/g/g, \"\")), l2 = new RegExp(left, f2.replace(/g/g, \"\")),
+ pos = [], t2, s2, m2, start, end;\n do {\n t2 = 0;\n while
+ (m2 = x2.exec(str)) {\n if (l2.test(m2[0])) {\n if
+ (!t2++) {\n s2 = x2.lastIndex;\n start = s2
+ - m2[0].length;\n }\n } else if (t2) {\n if
+ (!--t2) {\n end = m2.index + m2[0].length;\n var
+ obj = {\n left: { start, end: s2 },\n match:
+ { start: s2, end: m2.index },\n right: { start: m2.index,
+ end },\n wholeMatch: { start, end }\n };\n
+ \ pos.push(obj);\n if (!g2) {\n return
+ pos;\n }\n }\n }\n }\n }
+ while (t2 && (x2.lastIndex = s2));\n return pos;\n };\n showdown2.helper.matchRecursiveRegExp
+ = function(str, left, right, flags) {\n var matchPos = rgxFindMatchPos(str,
+ left, right, flags), results = [];\n for (var i3 = 0; i3 < matchPos.length;
+ ++i3) {\n results.push([\n str.slice(matchPos[i3].wholeMatch.start,
+ matchPos[i3].wholeMatch.end),\n str.slice(matchPos[i3].match.start,
+ matchPos[i3].match.end),\n str.slice(matchPos[i3].left.start, matchPos[i3].left.end),\n
+ \ str.slice(matchPos[i3].right.start, matchPos[i3].right.end)\n
+ \ ]);\n }\n return results;\n };\n showdown2.helper.replaceRecursiveRegExp
+ = function(str, replacement, left, right, flags) {\n if (!showdown2.helper.isFunction(replacement))
+ {\n var repStr = replacement;\n replacement = function()
+ {\n return repStr;\n };\n }\n var matchPos
+ = rgxFindMatchPos(str, left, right, flags), finalStr = str, lng = matchPos.length;\n
+ \ if (lng > 0) {\n var bits = [];\n if (matchPos[0].wholeMatch.start
+ !== 0) {\n bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n
+ \ }\n for (var i3 = 0; i3 < lng; ++i3) {\n bits.push(\n
+ \ replacement(\n str.slice(matchPos[i3].wholeMatch.start,
+ matchPos[i3].wholeMatch.end),\n str.slice(matchPos[i3].match.start,
+ matchPos[i3].match.end),\n str.slice(matchPos[i3].left.start,
+ matchPos[i3].left.end),\n str.slice(matchPos[i3].right.start,
+ matchPos[i3].right.end)\n )\n );\n if (i3
+ < lng - 1) {\n bits.push(str.slice(matchPos[i3].wholeMatch.end,
+ matchPos[i3 + 1].wholeMatch.start));\n }\n }\n if
+ (matchPos[lng - 1].wholeMatch.end < str.length) {\n bits.push(str.slice(matchPos[lng
+ - 1].wholeMatch.end));\n }\n finalStr = bits.join(\"\");\n
+ \ }\n return finalStr;\n };\n showdown2.helper.regexIndexOf
+ = function(str, regex2, fromIndex) {\n if (!showdown2.helper.isString(str))
+ {\n throw \"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf
+ function must be a string\";\n }\n if (regex2 instanceof RegExp
+ === false) {\n throw \"InvalidArgumentError: second parameter of
+ showdown.helper.regexIndexOf function must be an instance of RegExp\";\n }\n
+ \ var indexOf = str.substring(fromIndex || 0).search(regex2);\n return
+ indexOf >= 0 ? indexOf + (fromIndex || 0) : indexOf;\n };\n showdown2.helper.splitAtIndex
+ = function(str, index2) {\n if (!showdown2.helper.isString(str)) {\n
+ \ throw \"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf
+ function must be a string\";\n }\n return [str.substring(0,
+ index2), str.substring(index2)];\n };\n showdown2.helper.encodeEmailAddress
+ = function(mail) {\n var encode2 = [\n function(ch) {\n return
+ \"\" + ch.charCodeAt(0) + \";\";\n },\n function(ch) {\n
+ \ return \"\" + ch.charCodeAt(0).toString(16) + \";\";\n },\n
+ \ function(ch) {\n return ch;\n }\n ];\n
+ \ mail = mail.replace(/./g, function(ch) {\n if (ch === \"@\")
+ {\n ch = encode2[Math.floor(Math.random() * 2)](ch);\n }
+ else {\n var r3 = Math.random();\n ch = r3 > 0.9 ? encode2[2](ch)
+ : r3 > 0.45 ? encode2[1](ch) : encode2[0](ch);\n }\n return
+ ch;\n });\n return mail;\n };\n showdown2.helper.padEnd
+ = function padEnd(str, targetLength, padString) {\n targetLength =
+ targetLength >> 0;\n padString = String(padString || \" \");\n if
+ (str.length > targetLength) {\n return String(str);\n } else
+ {\n targetLength = targetLength - str.length;\n if (targetLength
+ > padString.length) {\n padString += padString.repeat(targetLength
+ / padString.length);\n }\n return String(str) + padString.slice(0,
+ targetLength);\n }\n };\n if (typeof console === \"undefined\")
+ {\n console = {\n warn: function(msg) {\n alert(msg);\n
+ \ },\n log: function(msg) {\n alert(msg);\n },\n
+ \ error: function(msg) {\n throw msg;\n }\n };\n
+ \ }\n showdown2.helper.regexes = {\n asteriskDashAndColon:
+ /([*_:~])/g\n };\n showdown2.helper.emojis = {\n \"+1\":
+ \"\U0001F44D\",\n \"-1\": \"\U0001F44E\",\n \"100\": \"\U0001F4AF\",\n
+ \ \"1234\": \"\U0001F522\",\n \"1st_place_medal\": \"\U0001F947\",\n
+ \ \"2nd_place_medal\": \"\U0001F948\",\n \"3rd_place_medal\":
+ \"\U0001F949\",\n \"8ball\": \"\U0001F3B1\",\n \"a\": \"\U0001F170️\",\n
+ \ \"ab\": \"\U0001F18E\",\n \"abc\": \"\U0001F524\",\n \"abcd\":
+ \"\U0001F521\",\n \"accept\": \"\U0001F251\",\n \"aerial_tramway\":
+ \"\U0001F6A1\",\n \"airplane\": \"✈️\",\n \"alarm_clock\": \"⏰\",\n
+ \ \"alembic\": \"⚗️\",\n \"alien\": \"\U0001F47D\",\n \"ambulance\":
+ \"\U0001F691\",\n \"amphora\": \"\U0001F3FA\",\n \"anchor\":
+ \"⚓️\",\n \"angel\": \"\U0001F47C\",\n \"anger\": \"\U0001F4A2\",\n
+ \ \"angry\": \"\U0001F620\",\n \"anguished\": \"\U0001F627\",\n
+ \ \"ant\": \"\U0001F41C\",\n \"apple\": \"\U0001F34E\",\n \"aquarius\":
+ \"♒️\",\n \"aries\": \"♈️\",\n \"arrow_backward\": \"◀️\",\n
+ \ \"arrow_double_down\": \"⏬\",\n \"arrow_double_up\": \"⏫\",\n
+ \ \"arrow_down\": \"⬇️\",\n \"arrow_down_small\": \"\U0001F53D\",\n
+ \ \"arrow_forward\": \"▶️\",\n \"arrow_heading_down\": \"⤵️\",\n
+ \ \"arrow_heading_up\": \"⤴️\",\n \"arrow_left\": \"⬅️\",\n \"arrow_lower_left\":
+ \"↙️\",\n \"arrow_lower_right\": \"↘️\",\n \"arrow_right\":
+ \"➡️\",\n \"arrow_right_hook\": \"↪️\",\n \"arrow_up\": \"⬆️\",\n
+ \ \"arrow_up_down\": \"↕️\",\n \"arrow_up_small\": \"\U0001F53C\",\n
+ \ \"arrow_upper_left\": \"↖️\",\n \"arrow_upper_right\": \"↗️\",\n
+ \ \"arrows_clockwise\": \"\U0001F503\",\n \"arrows_counterclockwise\":
+ \"\U0001F504\",\n \"art\": \"\U0001F3A8\",\n \"articulated_lorry\":
+ \"\U0001F69B\",\n \"artificial_satellite\": \"\U0001F6F0\",\n \"astonished\":
+ \"\U0001F632\",\n \"athletic_shoe\": \"\U0001F45F\",\n \"atm\":
+ \"\U0001F3E7\",\n \"atom_symbol\": \"⚛️\",\n \"avocado\": \"\U0001F951\",\n
+ \ \"b\": \"\U0001F171️\",\n \"baby\": \"\U0001F476\",\n \"baby_bottle\":
+ \"\U0001F37C\",\n \"baby_chick\": \"\U0001F424\",\n \"baby_symbol\":
+ \"\U0001F6BC\",\n \"back\": \"\U0001F519\",\n \"bacon\": \"\U0001F953\",\n
+ \ \"badminton\": \"\U0001F3F8\",\n \"baggage_claim\": \"\U0001F6C4\",\n
+ \ \"baguette_bread\": \"\U0001F956\",\n \"balance_scale\": \"⚖️\",\n
+ \ \"balloon\": \"\U0001F388\",\n \"ballot_box\": \"\U0001F5F3\",\n
+ \ \"ballot_box_with_check\": \"☑️\",\n \"bamboo\": \"\U0001F38D\",\n
+ \ \"banana\": \"\U0001F34C\",\n \"bangbang\": \"‼️\",\n \"bank\":
+ \"\U0001F3E6\",\n \"bar_chart\": \"\U0001F4CA\",\n \"barber\":
+ \"\U0001F488\",\n \"baseball\": \"⚾️\",\n \"basketball\": \"\U0001F3C0\",\n
+ \ \"basketball_man\": \"⛹️\",\n \"basketball_woman\": \"⛹️♀️\",\n
+ \ \"bat\": \"\U0001F987\",\n \"bath\": \"\U0001F6C0\",\n \"bathtub\":
+ \"\U0001F6C1\",\n \"battery\": \"\U0001F50B\",\n \"beach_umbrella\":
+ \"\U0001F3D6\",\n \"bear\": \"\U0001F43B\",\n \"bed\": \"\U0001F6CF\",\n
+ \ \"bee\": \"\U0001F41D\",\n \"beer\": \"\U0001F37A\",\n \"beers\":
+ \"\U0001F37B\",\n \"beetle\": \"\U0001F41E\",\n \"beginner\":
+ \"\U0001F530\",\n \"bell\": \"\U0001F514\",\n \"bellhop_bell\":
+ \"\U0001F6CE\",\n \"bento\": \"\U0001F371\",\n \"biking_man\":
+ \"\U0001F6B4\",\n \"bike\": \"\U0001F6B2\",\n \"biking_woman\":
+ \"\U0001F6B4♀️\",\n \"bikini\": \"\U0001F459\",\n \"biohazard\":
+ \"☣️\",\n \"bird\": \"\U0001F426\",\n \"birthday\": \"\U0001F382\",\n
+ \ \"black_circle\": \"⚫️\",\n \"black_flag\": \"\U0001F3F4\",\n
+ \ \"black_heart\": \"\U0001F5A4\",\n \"black_joker\": \"\U0001F0CF\",\n
+ \ \"black_large_square\": \"⬛️\",\n \"black_medium_small_square\":
+ \"◾️\",\n \"black_medium_square\": \"◼️\",\n \"black_nib\":
+ \"✒️\",\n \"black_small_square\": \"▪️\",\n \"black_square_button\":
+ \"\U0001F532\",\n \"blonde_man\": \"\U0001F471\",\n \"blonde_woman\":
+ \"\U0001F471♀️\",\n \"blossom\": \"\U0001F33C\",\n \"blowfish\":
+ \"\U0001F421\",\n \"blue_book\": \"\U0001F4D8\",\n \"blue_car\":
+ \"\U0001F699\",\n \"blue_heart\": \"\U0001F499\",\n \"blush\":
+ \"\U0001F60A\",\n \"boar\": \"\U0001F417\",\n \"boat\": \"⛵️\",\n
+ \ \"bomb\": \"\U0001F4A3\",\n \"book\": \"\U0001F4D6\",\n \"bookmark\":
+ \"\U0001F516\",\n \"bookmark_tabs\": \"\U0001F4D1\",\n \"books\":
+ \"\U0001F4DA\",\n \"boom\": \"\U0001F4A5\",\n \"boot\": \"\U0001F462\",\n
+ \ \"bouquet\": \"\U0001F490\",\n \"bowing_man\": \"\U0001F647\",\n
+ \ \"bow_and_arrow\": \"\U0001F3F9\",\n \"bowing_woman\": \"\U0001F647♀️\",\n
+ \ \"bowling\": \"\U0001F3B3\",\n \"boxing_glove\": \"\U0001F94A\",\n
+ \ \"boy\": \"\U0001F466\",\n \"bread\": \"\U0001F35E\",\n \"bride_with_veil\":
+ \"\U0001F470\",\n \"bridge_at_night\": \"\U0001F309\",\n \"briefcase\":
+ \"\U0001F4BC\",\n \"broken_heart\": \"\U0001F494\",\n \"bug\":
+ \"\U0001F41B\",\n \"building_construction\": \"\U0001F3D7\",\n \"bulb\":
+ \"\U0001F4A1\",\n \"bullettrain_front\": \"\U0001F685\",\n \"bullettrain_side\":
+ \"\U0001F684\",\n \"burrito\": \"\U0001F32F\",\n \"bus\": \"\U0001F68C\",\n
+ \ \"business_suit_levitating\": \"\U0001F574\",\n \"busstop\":
+ \"\U0001F68F\",\n \"bust_in_silhouette\": \"\U0001F464\",\n \"busts_in_silhouette\":
+ \"\U0001F465\",\n \"butterfly\": \"\U0001F98B\",\n \"cactus\":
+ \"\U0001F335\",\n \"cake\": \"\U0001F370\",\n \"calendar\":
+ \"\U0001F4C6\",\n \"call_me_hand\": \"\U0001F919\",\n \"calling\":
+ \"\U0001F4F2\",\n \"camel\": \"\U0001F42B\",\n \"camera\": \"\U0001F4F7\",\n
+ \ \"camera_flash\": \"\U0001F4F8\",\n \"camping\": \"\U0001F3D5\",\n
+ \ \"cancer\": \"♋️\",\n \"candle\": \"\U0001F56F\",\n \"candy\":
+ \"\U0001F36C\",\n \"canoe\": \"\U0001F6F6\",\n \"capital_abcd\":
+ \"\U0001F520\",\n \"capricorn\": \"♑️\",\n \"car\": \"\U0001F697\",\n
+ \ \"card_file_box\": \"\U0001F5C3\",\n \"card_index\": \"\U0001F4C7\",\n
+ \ \"card_index_dividers\": \"\U0001F5C2\",\n \"carousel_horse\":
+ \"\U0001F3A0\",\n \"carrot\": \"\U0001F955\",\n \"cat\": \"\U0001F431\",\n
+ \ \"cat2\": \"\U0001F408\",\n \"cd\": \"\U0001F4BF\",\n \"chains\":
+ \"⛓\",\n \"champagne\": \"\U0001F37E\",\n \"chart\": \"\U0001F4B9\",\n
+ \ \"chart_with_downwards_trend\": \"\U0001F4C9\",\n \"chart_with_upwards_trend\":
+ \"\U0001F4C8\",\n \"checkered_flag\": \"\U0001F3C1\",\n \"cheese\":
+ \"\U0001F9C0\",\n \"cherries\": \"\U0001F352\",\n \"cherry_blossom\":
+ \"\U0001F338\",\n \"chestnut\": \"\U0001F330\",\n \"chicken\":
+ \"\U0001F414\",\n \"children_crossing\": \"\U0001F6B8\",\n \"chipmunk\":
+ \"\U0001F43F\",\n \"chocolate_bar\": \"\U0001F36B\",\n \"christmas_tree\":
+ \"\U0001F384\",\n \"church\": \"⛪️\",\n \"cinema\": \"\U0001F3A6\",\n
+ \ \"circus_tent\": \"\U0001F3AA\",\n \"city_sunrise\": \"\U0001F307\",\n
+ \ \"city_sunset\": \"\U0001F306\",\n \"cityscape\": \"\U0001F3D9\",\n
+ \ \"cl\": \"\U0001F191\",\n \"clamp\": \"\U0001F5DC\",\n \"clap\":
+ \"\U0001F44F\",\n \"clapper\": \"\U0001F3AC\",\n \"classical_building\":
+ \"\U0001F3DB\",\n \"clinking_glasses\": \"\U0001F942\",\n \"clipboard\":
+ \"\U0001F4CB\",\n \"clock1\": \"\U0001F550\",\n \"clock10\":
+ \"\U0001F559\",\n \"clock1030\": \"\U0001F565\",\n \"clock11\":
+ \"\U0001F55A\",\n \"clock1130\": \"\U0001F566\",\n \"clock12\":
+ \"\U0001F55B\",\n \"clock1230\": \"\U0001F567\",\n \"clock130\":
+ \"\U0001F55C\",\n \"clock2\": \"\U0001F551\",\n \"clock230\":
+ \"\U0001F55D\",\n \"clock3\": \"\U0001F552\",\n \"clock330\":
+ \"\U0001F55E\",\n \"clock4\": \"\U0001F553\",\n \"clock430\":
+ \"\U0001F55F\",\n \"clock5\": \"\U0001F554\",\n \"clock530\":
+ \"\U0001F560\",\n \"clock6\": \"\U0001F555\",\n \"clock630\":
+ \"\U0001F561\",\n \"clock7\": \"\U0001F556\",\n \"clock730\":
+ \"\U0001F562\",\n \"clock8\": \"\U0001F557\",\n \"clock830\":
+ \"\U0001F563\",\n \"clock9\": \"\U0001F558\",\n \"clock930\":
+ \"\U0001F564\",\n \"closed_book\": \"\U0001F4D5\",\n \"closed_lock_with_key\":
+ \"\U0001F510\",\n \"closed_umbrella\": \"\U0001F302\",\n \"cloud\":
+ \"☁️\",\n \"cloud_with_lightning\": \"\U0001F329\",\n \"cloud_with_lightning_and_rain\":
+ \"⛈\",\n \"cloud_with_rain\": \"\U0001F327\",\n \"cloud_with_snow\":
+ \"\U0001F328\",\n \"clown_face\": \"\U0001F921\",\n \"clubs\":
+ \"♣️\",\n \"cocktail\": \"\U0001F378\",\n \"coffee\": \"☕️\",\n
+ \ \"coffin\": \"⚰️\",\n \"cold_sweat\": \"\U0001F630\",\n \"comet\":
+ \"☄️\",\n \"computer\": \"\U0001F4BB\",\n \"computer_mouse\":
+ \"\U0001F5B1\",\n \"confetti_ball\": \"\U0001F38A\",\n \"confounded\":
+ \"\U0001F616\",\n \"confused\": \"\U0001F615\",\n \"congratulations\":
+ \"㊗️\",\n \"construction\": \"\U0001F6A7\",\n \"construction_worker_man\":
+ \"\U0001F477\",\n \"construction_worker_woman\": \"\U0001F477♀️\",\n
+ \ \"control_knobs\": \"\U0001F39B\",\n \"convenience_store\":
+ \"\U0001F3EA\",\n \"cookie\": \"\U0001F36A\",\n \"cool\": \"\U0001F192\",\n
+ \ \"policeman\": \"\U0001F46E\",\n \"copyright\": \"©️\",\n \"corn\":
+ \"\U0001F33D\",\n \"couch_and_lamp\": \"\U0001F6CB\",\n \"couple\":
+ \"\U0001F46B\",\n \"couple_with_heart_woman_man\": \"\U0001F491\",\n
+ \ \"couple_with_heart_man_man\": \"\U0001F468❤️\U0001F468\",\n
+ \ \"couple_with_heart_woman_woman\": \"\U0001F469❤️\U0001F469\",\n
+ \ \"couplekiss_man_man\": \"\U0001F468❤️\U0001F48B\U0001F468\",\n
+ \ \"couplekiss_man_woman\": \"\U0001F48F\",\n \"couplekiss_woman_woman\":
+ \"\U0001F469❤️\U0001F48B\U0001F469\",\n \"cow\": \"\U0001F42E\",\n
+ \ \"cow2\": \"\U0001F404\",\n \"cowboy_hat_face\": \"\U0001F920\",\n
+ \ \"crab\": \"\U0001F980\",\n \"crayon\": \"\U0001F58D\",\n \"credit_card\":
+ \"\U0001F4B3\",\n \"crescent_moon\": \"\U0001F319\",\n \"cricket\":
+ \"\U0001F3CF\",\n \"crocodile\": \"\U0001F40A\",\n \"croissant\":
+ \"\U0001F950\",\n \"crossed_fingers\": \"\U0001F91E\",\n \"crossed_flags\":
+ \"\U0001F38C\",\n \"crossed_swords\": \"⚔️\",\n \"crown\": \"\U0001F451\",\n
+ \ \"cry\": \"\U0001F622\",\n \"crying_cat_face\": \"\U0001F63F\",\n
+ \ \"crystal_ball\": \"\U0001F52E\",\n \"cucumber\": \"\U0001F952\",\n
+ \ \"cupid\": \"\U0001F498\",\n \"curly_loop\": \"➰\",\n \"currency_exchange\":
+ \"\U0001F4B1\",\n \"curry\": \"\U0001F35B\",\n \"custard\":
+ \"\U0001F36E\",\n \"customs\": \"\U0001F6C3\",\n \"cyclone\":
+ \"\U0001F300\",\n \"dagger\": \"\U0001F5E1\",\n \"dancer\":
+ \"\U0001F483\",\n \"dancing_women\": \"\U0001F46F\",\n \"dancing_men\":
+ \"\U0001F46F♂️\",\n \"dango\": \"\U0001F361\",\n \"dark_sunglasses\":
+ \"\U0001F576\",\n \"dart\": \"\U0001F3AF\",\n \"dash\": \"\U0001F4A8\",\n
+ \ \"date\": \"\U0001F4C5\",\n \"deciduous_tree\": \"\U0001F333\",\n
+ \ \"deer\": \"\U0001F98C\",\n \"department_store\": \"\U0001F3EC\",\n
+ \ \"derelict_house\": \"\U0001F3DA\",\n \"desert\": \"\U0001F3DC\",\n
+ \ \"desert_island\": \"\U0001F3DD\",\n \"desktop_computer\":
+ \"\U0001F5A5\",\n \"male_detective\": \"\U0001F575️\",\n \"diamond_shape_with_a_dot_inside\":
+ \"\U0001F4A0\",\n \"diamonds\": \"♦️\",\n \"disappointed\":
+ \"\U0001F61E\",\n \"disappointed_relieved\": \"\U0001F625\",\n \"dizzy\":
+ \"\U0001F4AB\",\n \"dizzy_face\": \"\U0001F635\",\n \"do_not_litter\":
+ \"\U0001F6AF\",\n \"dog\": \"\U0001F436\",\n \"dog2\": \"\U0001F415\",\n
+ \ \"dollar\": \"\U0001F4B5\",\n \"dolls\": \"\U0001F38E\",\n
+ \ \"dolphin\": \"\U0001F42C\",\n \"door\": \"\U0001F6AA\",\n
+ \ \"doughnut\": \"\U0001F369\",\n \"dove\": \"\U0001F54A\",\n
+ \ \"dragon\": \"\U0001F409\",\n \"dragon_face\": \"\U0001F432\",\n
+ \ \"dress\": \"\U0001F457\",\n \"dromedary_camel\": \"\U0001F42A\",\n
+ \ \"drooling_face\": \"\U0001F924\",\n \"droplet\": \"\U0001F4A7\",\n
+ \ \"drum\": \"\U0001F941\",\n \"duck\": \"\U0001F986\",\n \"dvd\":
+ \"\U0001F4C0\",\n \"e-mail\": \"\U0001F4E7\",\n \"eagle\": \"\U0001F985\",\n
+ \ \"ear\": \"\U0001F442\",\n \"ear_of_rice\": \"\U0001F33E\",\n
+ \ \"earth_africa\": \"\U0001F30D\",\n \"earth_americas\": \"\U0001F30E\",\n
+ \ \"earth_asia\": \"\U0001F30F\",\n \"egg\": \"\U0001F95A\",\n
+ \ \"eggplant\": \"\U0001F346\",\n \"eight_pointed_black_star\":
+ \"✴️\",\n \"eight_spoked_asterisk\": \"✳️\",\n \"electric_plug\":
+ \"\U0001F50C\",\n \"elephant\": \"\U0001F418\",\n \"email\":
+ \"✉️\",\n \"end\": \"\U0001F51A\",\n \"envelope_with_arrow\":
+ \"\U0001F4E9\",\n \"euro\": \"\U0001F4B6\",\n \"european_castle\":
+ \"\U0001F3F0\",\n \"european_post_office\": \"\U0001F3E4\",\n \"evergreen_tree\":
+ \"\U0001F332\",\n \"exclamation\": \"❗️\",\n \"expressionless\":
+ \"\U0001F611\",\n \"eye\": \"\U0001F441\",\n \"eye_speech_bubble\":
+ \"\U0001F441\U0001F5E8\",\n \"eyeglasses\": \"\U0001F453\",\n
+ \ \"eyes\": \"\U0001F440\",\n \"face_with_head_bandage\": \"\U0001F915\",\n
+ \ \"face_with_thermometer\": \"\U0001F912\",\n \"fist_oncoming\":
+ \"\U0001F44A\",\n \"factory\": \"\U0001F3ED\",\n \"fallen_leaf\":
+ \"\U0001F342\",\n \"family_man_woman_boy\": \"\U0001F46A\",\n \"family_man_boy\":
+ \"\U0001F468\U0001F466\",\n \"family_man_boy_boy\": \"\U0001F468\U0001F466\U0001F466\",\n
+ \ \"family_man_girl\": \"\U0001F468\U0001F467\",\n \"family_man_girl_boy\":
+ \"\U0001F468\U0001F467\U0001F466\",\n \"family_man_girl_girl\":
+ \"\U0001F468\U0001F467\U0001F467\",\n \"family_man_man_boy\":
+ \"\U0001F468\U0001F468\U0001F466\",\n \"family_man_man_boy_boy\":
+ \"\U0001F468\U0001F468\U0001F466\U0001F466\",\n \"family_man_man_girl\":
+ \"\U0001F468\U0001F468\U0001F467\",\n \"family_man_man_girl_boy\":
+ \"\U0001F468\U0001F468\U0001F467\U0001F466\",\n \"family_man_man_girl_girl\":
+ \"\U0001F468\U0001F468\U0001F467\U0001F467\",\n \"family_man_woman_boy_boy\":
+ \"\U0001F468\U0001F469\U0001F466\U0001F466\",\n \"family_man_woman_girl\":
+ \"\U0001F468\U0001F469\U0001F467\",\n \"family_man_woman_girl_boy\":
+ \"\U0001F468\U0001F469\U0001F467\U0001F466\",\n \"family_man_woman_girl_girl\":
+ \"\U0001F468\U0001F469\U0001F467\U0001F467\",\n \"family_woman_boy\":
+ \"\U0001F469\U0001F466\",\n \"family_woman_boy_boy\": \"\U0001F469\U0001F466\U0001F466\",\n
+ \ \"family_woman_girl\": \"\U0001F469\U0001F467\",\n \"family_woman_girl_boy\":
+ \"\U0001F469\U0001F467\U0001F466\",\n \"family_woman_girl_girl\":
+ \"\U0001F469\U0001F467\U0001F467\",\n \"family_woman_woman_boy\":
+ \"\U0001F469\U0001F469\U0001F466\",\n \"family_woman_woman_boy_boy\":
+ \"\U0001F469\U0001F469\U0001F466\U0001F466\",\n \"family_woman_woman_girl\":
+ \"\U0001F469\U0001F469\U0001F467\",\n \"family_woman_woman_girl_boy\":
+ \"\U0001F469\U0001F469\U0001F467\U0001F466\",\n \"family_woman_woman_girl_girl\":
+ \"\U0001F469\U0001F469\U0001F467\U0001F467\",\n \"fast_forward\":
+ \"⏩\",\n \"fax\": \"\U0001F4E0\",\n \"fearful\": \"\U0001F628\",\n
+ \ \"feet\": \"\U0001F43E\",\n \"female_detective\": \"\U0001F575️♀️\",\n
+ \ \"ferris_wheel\": \"\U0001F3A1\",\n \"ferry\": \"⛴\",\n \"field_hockey\":
+ \"\U0001F3D1\",\n \"file_cabinet\": \"\U0001F5C4\",\n \"file_folder\":
+ \"\U0001F4C1\",\n \"film_projector\": \"\U0001F4FD\",\n \"film_strip\":
+ \"\U0001F39E\",\n \"fire\": \"\U0001F525\",\n \"fire_engine\":
+ \"\U0001F692\",\n \"fireworks\": \"\U0001F386\",\n \"first_quarter_moon\":
+ \"\U0001F313\",\n \"first_quarter_moon_with_face\": \"\U0001F31B\",\n
+ \ \"fish\": \"\U0001F41F\",\n \"fish_cake\": \"\U0001F365\",\n
+ \ \"fishing_pole_and_fish\": \"\U0001F3A3\",\n \"fist_raised\":
+ \"✊\",\n \"fist_left\": \"\U0001F91B\",\n \"fist_right\": \"\U0001F91C\",\n
+ \ \"flags\": \"\U0001F38F\",\n \"flashlight\": \"\U0001F526\",\n
+ \ \"fleur_de_lis\": \"⚜️\",\n \"flight_arrival\": \"\U0001F6EC\",\n
+ \ \"flight_departure\": \"\U0001F6EB\",\n \"floppy_disk\": \"\U0001F4BE\",\n
+ \ \"flower_playing_cards\": \"\U0001F3B4\",\n \"flushed\": \"\U0001F633\",\n
+ \ \"fog\": \"\U0001F32B\",\n \"foggy\": \"\U0001F301\",\n \"football\":
+ \"\U0001F3C8\",\n \"footprints\": \"\U0001F463\",\n \"fork_and_knife\":
+ \"\U0001F374\",\n \"fountain\": \"⛲️\",\n \"fountain_pen\":
+ \"\U0001F58B\",\n \"four_leaf_clover\": \"\U0001F340\",\n \"fox_face\":
+ \"\U0001F98A\",\n \"framed_picture\": \"\U0001F5BC\",\n \"free\":
+ \"\U0001F193\",\n \"fried_egg\": \"\U0001F373\",\n \"fried_shrimp\":
+ \"\U0001F364\",\n \"fries\": \"\U0001F35F\",\n \"frog\": \"\U0001F438\",\n
+ \ \"frowning\": \"\U0001F626\",\n \"frowning_face\": \"☹️\",\n
+ \ \"frowning_man\": \"\U0001F64D♂️\",\n \"frowning_woman\":
+ \"\U0001F64D\",\n \"middle_finger\": \"\U0001F595\",\n \"fuelpump\":
+ \"⛽️\",\n \"full_moon\": \"\U0001F315\",\n \"full_moon_with_face\":
+ \"\U0001F31D\",\n \"funeral_urn\": \"⚱️\",\n \"game_die\": \"\U0001F3B2\",\n
+ \ \"gear\": \"⚙️\",\n \"gem\": \"\U0001F48E\",\n \"gemini\":
+ \"♊️\",\n \"ghost\": \"\U0001F47B\",\n \"gift\": \"\U0001F381\",\n
+ \ \"gift_heart\": \"\U0001F49D\",\n \"girl\": \"\U0001F467\",\n
+ \ \"globe_with_meridians\": \"\U0001F310\",\n \"goal_net\": \"\U0001F945\",\n
+ \ \"goat\": \"\U0001F410\",\n \"golf\": \"⛳️\",\n \"golfing_man\":
+ \"\U0001F3CC️\",\n \"golfing_woman\": \"\U0001F3CC️♀️\",\n \"gorilla\":
+ \"\U0001F98D\",\n \"grapes\": \"\U0001F347\",\n \"green_apple\":
+ \"\U0001F34F\",\n \"green_book\": \"\U0001F4D7\",\n \"green_heart\":
+ \"\U0001F49A\",\n \"green_salad\": \"\U0001F957\",\n \"grey_exclamation\":
+ \"❕\",\n \"grey_question\": \"❔\",\n \"grimacing\": \"\U0001F62C\",\n
+ \ \"grin\": \"\U0001F601\",\n \"grinning\": \"\U0001F600\",\n
+ \ \"guardsman\": \"\U0001F482\",\n \"guardswoman\": \"\U0001F482♀️\",\n
+ \ \"guitar\": \"\U0001F3B8\",\n \"gun\": \"\U0001F52B\",\n \"haircut_woman\":
+ \"\U0001F487\",\n \"haircut_man\": \"\U0001F487♂️\",\n \"hamburger\":
+ \"\U0001F354\",\n \"hammer\": \"\U0001F528\",\n \"hammer_and_pick\":
+ \"⚒\",\n \"hammer_and_wrench\": \"\U0001F6E0\",\n \"hamster\":
+ \"\U0001F439\",\n \"hand\": \"✋\",\n \"handbag\": \"\U0001F45C\",\n
+ \ \"handshake\": \"\U0001F91D\",\n \"hankey\": \"\U0001F4A9\",\n
+ \ \"hatched_chick\": \"\U0001F425\",\n \"hatching_chick\": \"\U0001F423\",\n
+ \ \"headphones\": \"\U0001F3A7\",\n \"hear_no_evil\": \"\U0001F649\",\n
+ \ \"heart\": \"❤️\",\n \"heart_decoration\": \"\U0001F49F\",\n
+ \ \"heart_eyes\": \"\U0001F60D\",\n \"heart_eyes_cat\": \"\U0001F63B\",\n
+ \ \"heartbeat\": \"\U0001F493\",\n \"heartpulse\": \"\U0001F497\",\n
+ \ \"hearts\": \"♥️\",\n \"heavy_check_mark\": \"✔️\",\n \"heavy_division_sign\":
+ \"➗\",\n \"heavy_dollar_sign\": \"\U0001F4B2\",\n \"heavy_heart_exclamation\":
+ \"❣️\",\n \"heavy_minus_sign\": \"➖\",\n \"heavy_multiplication_x\":
+ \"✖️\",\n \"heavy_plus_sign\": \"➕\",\n \"helicopter\": \"\U0001F681\",\n
+ \ \"herb\": \"\U0001F33F\",\n \"hibiscus\": \"\U0001F33A\",\n
+ \ \"high_brightness\": \"\U0001F506\",\n \"high_heel\": \"\U0001F460\",\n
+ \ \"hocho\": \"\U0001F52A\",\n \"hole\": \"\U0001F573\",\n \"honey_pot\":
+ \"\U0001F36F\",\n \"horse\": \"\U0001F434\",\n \"horse_racing\":
+ \"\U0001F3C7\",\n \"hospital\": \"\U0001F3E5\",\n \"hot_pepper\":
+ \"\U0001F336\",\n \"hotdog\": \"\U0001F32D\",\n \"hotel\": \"\U0001F3E8\",\n
+ \ \"hotsprings\": \"♨️\",\n \"hourglass\": \"⌛️\",\n \"hourglass_flowing_sand\":
+ \"⏳\",\n \"house\": \"\U0001F3E0\",\n \"house_with_garden\":
+ \"\U0001F3E1\",\n \"houses\": \"\U0001F3D8\",\n \"hugs\": \"\U0001F917\",\n
+ \ \"hushed\": \"\U0001F62F\",\n \"ice_cream\": \"\U0001F368\",\n
+ \ \"ice_hockey\": \"\U0001F3D2\",\n \"ice_skate\": \"⛸\",\n \"icecream\":
+ \"\U0001F366\",\n \"id\": \"\U0001F194\",\n \"ideograph_advantage\":
+ \"\U0001F250\",\n \"imp\": \"\U0001F47F\",\n \"inbox_tray\":
+ \"\U0001F4E5\",\n \"incoming_envelope\": \"\U0001F4E8\",\n \"tipping_hand_woman\":
+ \"\U0001F481\",\n \"information_source\": \"ℹ️\",\n \"innocent\":
+ \"\U0001F607\",\n \"interrobang\": \"⁉️\",\n \"iphone\": \"\U0001F4F1\",\n
+ \ \"izakaya_lantern\": \"\U0001F3EE\",\n \"jack_o_lantern\":
+ \"\U0001F383\",\n \"japan\": \"\U0001F5FE\",\n \"japanese_castle\":
+ \"\U0001F3EF\",\n \"japanese_goblin\": \"\U0001F47A\",\n \"japanese_ogre\":
+ \"\U0001F479\",\n \"jeans\": \"\U0001F456\",\n \"joy\": \"\U0001F602\",\n
+ \ \"joy_cat\": \"\U0001F639\",\n \"joystick\": \"\U0001F579\",\n
+ \ \"kaaba\": \"\U0001F54B\",\n \"key\": \"\U0001F511\",\n \"keyboard\":
+ \"⌨️\",\n \"keycap_ten\": \"\U0001F51F\",\n \"kick_scooter\":
+ \"\U0001F6F4\",\n \"kimono\": \"\U0001F458\",\n \"kiss\": \"\U0001F48B\",\n
+ \ \"kissing\": \"\U0001F617\",\n \"kissing_cat\": \"\U0001F63D\",\n
+ \ \"kissing_closed_eyes\": \"\U0001F61A\",\n \"kissing_heart\":
+ \"\U0001F618\",\n \"kissing_smiling_eyes\": \"\U0001F619\",\n \"kiwi_fruit\":
+ \"\U0001F95D\",\n \"koala\": \"\U0001F428\",\n \"koko\": \"\U0001F201\",\n
+ \ \"label\": \"\U0001F3F7\",\n \"large_blue_circle\": \"\U0001F535\",\n
+ \ \"large_blue_diamond\": \"\U0001F537\",\n \"large_orange_diamond\":
+ \"\U0001F536\",\n \"last_quarter_moon\": \"\U0001F317\",\n \"last_quarter_moon_with_face\":
+ \"\U0001F31C\",\n \"latin_cross\": \"✝️\",\n \"laughing\": \"\U0001F606\",\n
+ \ \"leaves\": \"\U0001F343\",\n \"ledger\": \"\U0001F4D2\",\n
+ \ \"left_luggage\": \"\U0001F6C5\",\n \"left_right_arrow\": \"↔️\",\n
+ \ \"leftwards_arrow_with_hook\": \"↩️\",\n \"lemon\": \"\U0001F34B\",\n
+ \ \"leo\": \"♌️\",\n \"leopard\": \"\U0001F406\",\n \"level_slider\":
+ \"\U0001F39A\",\n \"libra\": \"♎️\",\n \"light_rail\": \"\U0001F688\",\n
+ \ \"link\": \"\U0001F517\",\n \"lion\": \"\U0001F981\",\n \"lips\":
+ \"\U0001F444\",\n \"lipstick\": \"\U0001F484\",\n \"lizard\":
+ \"\U0001F98E\",\n \"lock\": \"\U0001F512\",\n \"lock_with_ink_pen\":
+ \"\U0001F50F\",\n \"lollipop\": \"\U0001F36D\",\n \"loop\":
+ \"➿\",\n \"loud_sound\": \"\U0001F50A\",\n \"loudspeaker\":
+ \"\U0001F4E2\",\n \"love_hotel\": \"\U0001F3E9\",\n \"love_letter\":
+ \"\U0001F48C\",\n \"low_brightness\": \"\U0001F505\",\n \"lying_face\":
+ \"\U0001F925\",\n \"m\": \"Ⓜ️\",\n \"mag\": \"\U0001F50D\",\n
+ \ \"mag_right\": \"\U0001F50E\",\n \"mahjong\": \"\U0001F004️\",\n
+ \ \"mailbox\": \"\U0001F4EB\",\n \"mailbox_closed\": \"\U0001F4EA\",\n
+ \ \"mailbox_with_mail\": \"\U0001F4EC\",\n \"mailbox_with_no_mail\":
+ \"\U0001F4ED\",\n \"man\": \"\U0001F468\",\n \"man_artist\":
+ \"\U0001F468\U0001F3A8\",\n \"man_astronaut\": \"\U0001F468\U0001F680\",\n
+ \ \"man_cartwheeling\": \"\U0001F938♂️\",\n \"man_cook\":
+ \"\U0001F468\U0001F373\",\n \"man_dancing\": \"\U0001F57A\",\n
+ \ \"man_facepalming\": \"\U0001F926♂️\",\n \"man_factory_worker\":
+ \"\U0001F468\U0001F3ED\",\n \"man_farmer\": \"\U0001F468\U0001F33E\",\n
+ \ \"man_firefighter\": \"\U0001F468\U0001F692\",\n \"man_health_worker\":
+ \"\U0001F468⚕️\",\n \"man_in_tuxedo\": \"\U0001F935\",\n \"man_judge\":
+ \"\U0001F468⚖️\",\n \"man_juggling\": \"\U0001F939♂️\",\n
+ \ \"man_mechanic\": \"\U0001F468\U0001F527\",\n \"man_office_worker\":
+ \"\U0001F468\U0001F4BC\",\n \"man_pilot\": \"\U0001F468✈️\",\n
+ \ \"man_playing_handball\": \"\U0001F93E♂️\",\n \"man_playing_water_polo\":
+ \"\U0001F93D♂️\",\n \"man_scientist\": \"\U0001F468\U0001F52C\",\n
+ \ \"man_shrugging\": \"\U0001F937♂️\",\n \"man_singer\":
+ \"\U0001F468\U0001F3A4\",\n \"man_student\": \"\U0001F468\U0001F393\",\n
+ \ \"man_teacher\": \"\U0001F468\U0001F3EB\",\n \"man_technologist\":
+ \"\U0001F468\U0001F4BB\",\n \"man_with_gua_pi_mao\": \"\U0001F472\",\n
+ \ \"man_with_turban\": \"\U0001F473\",\n \"tangerine\": \"\U0001F34A\",\n
+ \ \"mans_shoe\": \"\U0001F45E\",\n \"mantelpiece_clock\": \"\U0001F570\",\n
+ \ \"maple_leaf\": \"\U0001F341\",\n \"martial_arts_uniform\":
+ \"\U0001F94B\",\n \"mask\": \"\U0001F637\",\n \"massage_woman\":
+ \"\U0001F486\",\n \"massage_man\": \"\U0001F486♂️\",\n \"meat_on_bone\":
+ \"\U0001F356\",\n \"medal_military\": \"\U0001F396\",\n \"medal_sports\":
+ \"\U0001F3C5\",\n \"mega\": \"\U0001F4E3\",\n \"melon\": \"\U0001F348\",\n
+ \ \"memo\": \"\U0001F4DD\",\n \"men_wrestling\": \"\U0001F93C♂️\",\n
+ \ \"menorah\": \"\U0001F54E\",\n \"mens\": \"\U0001F6B9\",\n
+ \ \"metal\": \"\U0001F918\",\n \"metro\": \"\U0001F687\",\n \"microphone\":
+ \"\U0001F3A4\",\n \"microscope\": \"\U0001F52C\",\n \"milk_glass\":
+ \"\U0001F95B\",\n \"milky_way\": \"\U0001F30C\",\n \"minibus\":
+ \"\U0001F690\",\n \"minidisc\": \"\U0001F4BD\",\n \"mobile_phone_off\":
+ \"\U0001F4F4\",\n \"money_mouth_face\": \"\U0001F911\",\n \"money_with_wings\":
+ \"\U0001F4B8\",\n \"moneybag\": \"\U0001F4B0\",\n \"monkey\":
+ \"\U0001F412\",\n \"monkey_face\": \"\U0001F435\",\n \"monorail\":
+ \"\U0001F69D\",\n \"moon\": \"\U0001F314\",\n \"mortar_board\":
+ \"\U0001F393\",\n \"mosque\": \"\U0001F54C\",\n \"motor_boat\":
+ \"\U0001F6E5\",\n \"motor_scooter\": \"\U0001F6F5\",\n \"motorcycle\":
+ \"\U0001F3CD\",\n \"motorway\": \"\U0001F6E3\",\n \"mount_fuji\":
+ \"\U0001F5FB\",\n \"mountain\": \"⛰\",\n \"mountain_biking_man\":
+ \"\U0001F6B5\",\n \"mountain_biking_woman\": \"\U0001F6B5♀️\",\n
+ \ \"mountain_cableway\": \"\U0001F6A0\",\n \"mountain_railway\":
+ \"\U0001F69E\",\n \"mountain_snow\": \"\U0001F3D4\",\n \"mouse\":
+ \"\U0001F42D\",\n \"mouse2\": \"\U0001F401\",\n \"movie_camera\":
+ \"\U0001F3A5\",\n \"moyai\": \"\U0001F5FF\",\n \"mrs_claus\":
+ \"\U0001F936\",\n \"muscle\": \"\U0001F4AA\",\n \"mushroom\":
+ \"\U0001F344\",\n \"musical_keyboard\": \"\U0001F3B9\",\n \"musical_note\":
+ \"\U0001F3B5\",\n \"musical_score\": \"\U0001F3BC\",\n \"mute\":
+ \"\U0001F507\",\n \"nail_care\": \"\U0001F485\",\n \"name_badge\":
+ \"\U0001F4DB\",\n \"national_park\": \"\U0001F3DE\",\n \"nauseated_face\":
+ \"\U0001F922\",\n \"necktie\": \"\U0001F454\",\n \"negative_squared_cross_mark\":
+ \"❎\",\n \"nerd_face\": \"\U0001F913\",\n \"neutral_face\":
+ \"\U0001F610\",\n \"new\": \"\U0001F195\",\n \"new_moon\": \"\U0001F311\",\n
+ \ \"new_moon_with_face\": \"\U0001F31A\",\n \"newspaper\": \"\U0001F4F0\",\n
+ \ \"newspaper_roll\": \"\U0001F5DE\",\n \"next_track_button\":
+ \"⏭\",\n \"ng\": \"\U0001F196\",\n \"no_good_man\": \"\U0001F645♂️\",\n
+ \ \"no_good_woman\": \"\U0001F645\",\n \"night_with_stars\":
+ \"\U0001F303\",\n \"no_bell\": \"\U0001F515\",\n \"no_bicycles\":
+ \"\U0001F6B3\",\n \"no_entry\": \"⛔️\",\n \"no_entry_sign\":
+ \"\U0001F6AB\",\n \"no_mobile_phones\": \"\U0001F4F5\",\n \"no_mouth\":
+ \"\U0001F636\",\n \"no_pedestrians\": \"\U0001F6B7\",\n \"no_smoking\":
+ \"\U0001F6AD\",\n \"non-potable_water\": \"\U0001F6B1\",\n \"nose\":
+ \"\U0001F443\",\n \"notebook\": \"\U0001F4D3\",\n \"notebook_with_decorative_cover\":
+ \"\U0001F4D4\",\n \"notes\": \"\U0001F3B6\",\n \"nut_and_bolt\":
+ \"\U0001F529\",\n \"o\": \"⭕️\",\n \"o2\": \"\U0001F17E️\",\n
+ \ \"ocean\": \"\U0001F30A\",\n \"octopus\": \"\U0001F419\",\n
+ \ \"oden\": \"\U0001F362\",\n \"office\": \"\U0001F3E2\",\n \"oil_drum\":
+ \"\U0001F6E2\",\n \"ok\": \"\U0001F197\",\n \"ok_hand\": \"\U0001F44C\",\n
+ \ \"ok_man\": \"\U0001F646♂️\",\n \"ok_woman\": \"\U0001F646\",\n
+ \ \"old_key\": \"\U0001F5DD\",\n \"older_man\": \"\U0001F474\",\n
+ \ \"older_woman\": \"\U0001F475\",\n \"om\": \"\U0001F549\",\n
+ \ \"on\": \"\U0001F51B\",\n \"oncoming_automobile\": \"\U0001F698\",\n
+ \ \"oncoming_bus\": \"\U0001F68D\",\n \"oncoming_police_car\":
+ \"\U0001F694\",\n \"oncoming_taxi\": \"\U0001F696\",\n \"open_file_folder\":
+ \"\U0001F4C2\",\n \"open_hands\": \"\U0001F450\",\n \"open_mouth\":
+ \"\U0001F62E\",\n \"open_umbrella\": \"☂️\",\n \"ophiuchus\":
+ \"⛎\",\n \"orange_book\": \"\U0001F4D9\",\n \"orthodox_cross\":
+ \"☦️\",\n \"outbox_tray\": \"\U0001F4E4\",\n \"owl\": \"\U0001F989\",\n
+ \ \"ox\": \"\U0001F402\",\n \"package\": \"\U0001F4E6\",\n \"page_facing_up\":
+ \"\U0001F4C4\",\n \"page_with_curl\": \"\U0001F4C3\",\n \"pager\":
+ \"\U0001F4DF\",\n \"paintbrush\": \"\U0001F58C\",\n \"palm_tree\":
+ \"\U0001F334\",\n \"pancakes\": \"\U0001F95E\",\n \"panda_face\":
+ \"\U0001F43C\",\n \"paperclip\": \"\U0001F4CE\",\n \"paperclips\":
+ \"\U0001F587\",\n \"parasol_on_ground\": \"⛱\",\n \"parking\":
+ \"\U0001F17F️\",\n \"part_alternation_mark\": \"〽️\",\n \"partly_sunny\":
+ \"⛅️\",\n \"passenger_ship\": \"\U0001F6F3\",\n \"passport_control\":
+ \"\U0001F6C2\",\n \"pause_button\": \"⏸\",\n \"peace_symbol\":
+ \"☮️\",\n \"peach\": \"\U0001F351\",\n \"peanuts\": \"\U0001F95C\",\n
+ \ \"pear\": \"\U0001F350\",\n \"pen\": \"\U0001F58A\",\n \"pencil2\":
+ \"✏️\",\n \"penguin\": \"\U0001F427\",\n \"pensive\": \"\U0001F614\",\n
+ \ \"performing_arts\": \"\U0001F3AD\",\n \"persevere\": \"\U0001F623\",\n
+ \ \"person_fencing\": \"\U0001F93A\",\n \"pouting_woman\": \"\U0001F64E\",\n
+ \ \"phone\": \"☎️\",\n \"pick\": \"⛏\",\n \"pig\": \"\U0001F437\",\n
+ \ \"pig2\": \"\U0001F416\",\n \"pig_nose\": \"\U0001F43D\",\n
+ \ \"pill\": \"\U0001F48A\",\n \"pineapple\": \"\U0001F34D\",\n
+ \ \"ping_pong\": \"\U0001F3D3\",\n \"pisces\": \"♓️\",\n \"pizza\":
+ \"\U0001F355\",\n \"place_of_worship\": \"\U0001F6D0\",\n \"plate_with_cutlery\":
+ \"\U0001F37D\",\n \"play_or_pause_button\": \"⏯\",\n \"point_down\":
+ \"\U0001F447\",\n \"point_left\": \"\U0001F448\",\n \"point_right\":
+ \"\U0001F449\",\n \"point_up\": \"☝️\",\n \"point_up_2\": \"\U0001F446\",\n
+ \ \"police_car\": \"\U0001F693\",\n \"policewoman\": \"\U0001F46E♀️\",\n
+ \ \"poodle\": \"\U0001F429\",\n \"popcorn\": \"\U0001F37F\",\n
+ \ \"post_office\": \"\U0001F3E3\",\n \"postal_horn\": \"\U0001F4EF\",\n
+ \ \"postbox\": \"\U0001F4EE\",\n \"potable_water\": \"\U0001F6B0\",\n
+ \ \"potato\": \"\U0001F954\",\n \"pouch\": \"\U0001F45D\",\n
+ \ \"poultry_leg\": \"\U0001F357\",\n \"pound\": \"\U0001F4B7\",\n
+ \ \"rage\": \"\U0001F621\",\n \"pouting_cat\": \"\U0001F63E\",\n
+ \ \"pouting_man\": \"\U0001F64E♂️\",\n \"pray\": \"\U0001F64F\",\n
+ \ \"prayer_beads\": \"\U0001F4FF\",\n \"pregnant_woman\": \"\U0001F930\",\n
+ \ \"previous_track_button\": \"⏮\",\n \"prince\": \"\U0001F934\",\n
+ \ \"princess\": \"\U0001F478\",\n \"printer\": \"\U0001F5A8\",\n
+ \ \"purple_heart\": \"\U0001F49C\",\n \"purse\": \"\U0001F45B\",\n
+ \ \"pushpin\": \"\U0001F4CC\",\n \"put_litter_in_its_place\":
+ \"\U0001F6AE\",\n \"question\": \"❓\",\n \"rabbit\": \"\U0001F430\",\n
+ \ \"rabbit2\": \"\U0001F407\",\n \"racehorse\": \"\U0001F40E\",\n
+ \ \"racing_car\": \"\U0001F3CE\",\n \"radio\": \"\U0001F4FB\",\n
+ \ \"radio_button\": \"\U0001F518\",\n \"radioactive\": \"☢️\",\n
+ \ \"railway_car\": \"\U0001F683\",\n \"railway_track\": \"\U0001F6E4\",\n
+ \ \"rainbow\": \"\U0001F308\",\n \"rainbow_flag\": \"\U0001F3F3️\U0001F308\",\n
+ \ \"raised_back_of_hand\": \"\U0001F91A\",\n \"raised_hand_with_fingers_splayed\":
+ \"\U0001F590\",\n \"raised_hands\": \"\U0001F64C\",\n \"raising_hand_woman\":
+ \"\U0001F64B\",\n \"raising_hand_man\": \"\U0001F64B♂️\",\n \"ram\":
+ \"\U0001F40F\",\n \"ramen\": \"\U0001F35C\",\n \"rat\": \"\U0001F400\",\n
+ \ \"record_button\": \"⏺\",\n \"recycle\": \"♻️\",\n \"red_circle\":
+ \"\U0001F534\",\n \"registered\": \"®️\",\n \"relaxed\": \"☺️\",\n
+ \ \"relieved\": \"\U0001F60C\",\n \"reminder_ribbon\": \"\U0001F397\",\n
+ \ \"repeat\": \"\U0001F501\",\n \"repeat_one\": \"\U0001F502\",\n
+ \ \"rescue_worker_helmet\": \"⛑\",\n \"restroom\": \"\U0001F6BB\",\n
+ \ \"revolving_hearts\": \"\U0001F49E\",\n \"rewind\": \"⏪\",\n
+ \ \"rhinoceros\": \"\U0001F98F\",\n \"ribbon\": \"\U0001F380\",\n
+ \ \"rice\": \"\U0001F35A\",\n \"rice_ball\": \"\U0001F359\",\n
+ \ \"rice_cracker\": \"\U0001F358\",\n \"rice_scene\": \"\U0001F391\",\n
+ \ \"right_anger_bubble\": \"\U0001F5EF\",\n \"ring\": \"\U0001F48D\",\n
+ \ \"robot\": \"\U0001F916\",\n \"rocket\": \"\U0001F680\",\n
+ \ \"rofl\": \"\U0001F923\",\n \"roll_eyes\": \"\U0001F644\",\n
+ \ \"roller_coaster\": \"\U0001F3A2\",\n \"rooster\": \"\U0001F413\",\n
+ \ \"rose\": \"\U0001F339\",\n \"rosette\": \"\U0001F3F5\",\n
+ \ \"rotating_light\": \"\U0001F6A8\",\n \"round_pushpin\": \"\U0001F4CD\",\n
+ \ \"rowing_man\": \"\U0001F6A3\",\n \"rowing_woman\": \"\U0001F6A3♀️\",\n
+ \ \"rugby_football\": \"\U0001F3C9\",\n \"running_man\": \"\U0001F3C3\",\n
+ \ \"running_shirt_with_sash\": \"\U0001F3BD\",\n \"running_woman\":
+ \"\U0001F3C3♀️\",\n \"sa\": \"\U0001F202️\",\n \"sagittarius\":
+ \"♐️\",\n \"sake\": \"\U0001F376\",\n \"sandal\": \"\U0001F461\",\n
+ \ \"santa\": \"\U0001F385\",\n \"satellite\": \"\U0001F4E1\",\n
+ \ \"saxophone\": \"\U0001F3B7\",\n \"school\": \"\U0001F3EB\",\n
+ \ \"school_satchel\": \"\U0001F392\",\n \"scissors\": \"✂️\",\n
+ \ \"scorpion\": \"\U0001F982\",\n \"scorpius\": \"♏️\",\n \"scream\":
+ \"\U0001F631\",\n \"scream_cat\": \"\U0001F640\",\n \"scroll\":
+ \"\U0001F4DC\",\n \"seat\": \"\U0001F4BA\",\n \"secret\": \"㊙️\",\n
+ \ \"see_no_evil\": \"\U0001F648\",\n \"seedling\": \"\U0001F331\",\n
+ \ \"selfie\": \"\U0001F933\",\n \"shallow_pan_of_food\": \"\U0001F958\",\n
+ \ \"shamrock\": \"☘️\",\n \"shark\": \"\U0001F988\",\n \"shaved_ice\":
+ \"\U0001F367\",\n \"sheep\": \"\U0001F411\",\n \"shell\": \"\U0001F41A\",\n
+ \ \"shield\": \"\U0001F6E1\",\n \"shinto_shrine\": \"⛩\",\n \"ship\":
+ \"\U0001F6A2\",\n \"shirt\": \"\U0001F455\",\n \"shopping\":
+ \"\U0001F6CD\",\n \"shopping_cart\": \"\U0001F6D2\",\n \"shower\":
+ \"\U0001F6BF\",\n \"shrimp\": \"\U0001F990\",\n \"signal_strength\":
+ \"\U0001F4F6\",\n \"six_pointed_star\": \"\U0001F52F\",\n \"ski\":
+ \"\U0001F3BF\",\n \"skier\": \"⛷\",\n \"skull\": \"\U0001F480\",\n
+ \ \"skull_and_crossbones\": \"☠️\",\n \"sleeping\": \"\U0001F634\",\n
+ \ \"sleeping_bed\": \"\U0001F6CC\",\n \"sleepy\": \"\U0001F62A\",\n
+ \ \"slightly_frowning_face\": \"\U0001F641\",\n \"slightly_smiling_face\":
+ \"\U0001F642\",\n \"slot_machine\": \"\U0001F3B0\",\n \"small_airplane\":
+ \"\U0001F6E9\",\n \"small_blue_diamond\": \"\U0001F539\",\n \"small_orange_diamond\":
+ \"\U0001F538\",\n \"small_red_triangle\": \"\U0001F53A\",\n \"small_red_triangle_down\":
+ \"\U0001F53B\",\n \"smile\": \"\U0001F604\",\n \"smile_cat\":
+ \"\U0001F638\",\n \"smiley\": \"\U0001F603\",\n \"smiley_cat\":
+ \"\U0001F63A\",\n \"smiling_imp\": \"\U0001F608\",\n \"smirk\":
+ \"\U0001F60F\",\n \"smirk_cat\": \"\U0001F63C\",\n \"smoking\":
+ \"\U0001F6AC\",\n \"snail\": \"\U0001F40C\",\n \"snake\": \"\U0001F40D\",\n
+ \ \"sneezing_face\": \"\U0001F927\",\n \"snowboarder\": \"\U0001F3C2\",\n
+ \ \"snowflake\": \"❄️\",\n \"snowman\": \"⛄️\",\n \"snowman_with_snow\":
+ \"☃️\",\n \"sob\": \"\U0001F62D\",\n \"soccer\": \"⚽️\",\n \"soon\":
+ \"\U0001F51C\",\n \"sos\": \"\U0001F198\",\n \"sound\": \"\U0001F509\",\n
+ \ \"space_invader\": \"\U0001F47E\",\n \"spades\": \"♠️\",\n
+ \ \"spaghetti\": \"\U0001F35D\",\n \"sparkle\": \"❇️\",\n \"sparkler\":
+ \"\U0001F387\",\n \"sparkles\": \"✨\",\n \"sparkling_heart\":
+ \"\U0001F496\",\n \"speak_no_evil\": \"\U0001F64A\",\n \"speaker\":
+ \"\U0001F508\",\n \"speaking_head\": \"\U0001F5E3\",\n \"speech_balloon\":
+ \"\U0001F4AC\",\n \"speedboat\": \"\U0001F6A4\",\n \"spider\":
+ \"\U0001F577\",\n \"spider_web\": \"\U0001F578\",\n \"spiral_calendar\":
+ \"\U0001F5D3\",\n \"spiral_notepad\": \"\U0001F5D2\",\n \"spoon\":
+ \"\U0001F944\",\n \"squid\": \"\U0001F991\",\n \"stadium\":
+ \"\U0001F3DF\",\n \"star\": \"⭐️\",\n \"star2\": \"\U0001F31F\",\n
+ \ \"star_and_crescent\": \"☪️\",\n \"star_of_david\": \"✡️\",\n
+ \ \"stars\": \"\U0001F320\",\n \"station\": \"\U0001F689\",\n
+ \ \"statue_of_liberty\": \"\U0001F5FD\",\n \"steam_locomotive\":
+ \"\U0001F682\",\n \"stew\": \"\U0001F372\",\n \"stop_button\":
+ \"⏹\",\n \"stop_sign\": \"\U0001F6D1\",\n \"stopwatch\": \"⏱\",\n
+ \ \"straight_ruler\": \"\U0001F4CF\",\n \"strawberry\": \"\U0001F353\",\n
+ \ \"stuck_out_tongue\": \"\U0001F61B\",\n \"stuck_out_tongue_closed_eyes\":
+ \"\U0001F61D\",\n \"stuck_out_tongue_winking_eye\": \"\U0001F61C\",\n
+ \ \"studio_microphone\": \"\U0001F399\",\n \"stuffed_flatbread\":
+ \"\U0001F959\",\n \"sun_behind_large_cloud\": \"\U0001F325\",\n \"sun_behind_rain_cloud\":
+ \"\U0001F326\",\n \"sun_behind_small_cloud\": \"\U0001F324\",\n \"sun_with_face\":
+ \"\U0001F31E\",\n \"sunflower\": \"\U0001F33B\",\n \"sunglasses\":
+ \"\U0001F60E\",\n \"sunny\": \"☀️\",\n \"sunrise\": \"\U0001F305\",\n
+ \ \"sunrise_over_mountains\": \"\U0001F304\",\n \"surfing_man\":
+ \"\U0001F3C4\",\n \"surfing_woman\": \"\U0001F3C4♀️\",\n \"sushi\":
+ \"\U0001F363\",\n \"suspension_railway\": \"\U0001F69F\",\n \"sweat\":
+ \"\U0001F613\",\n \"sweat_drops\": \"\U0001F4A6\",\n \"sweat_smile\":
+ \"\U0001F605\",\n \"sweet_potato\": \"\U0001F360\",\n \"swimming_man\":
+ \"\U0001F3CA\",\n \"swimming_woman\": \"\U0001F3CA♀️\",\n \"symbols\":
+ \"\U0001F523\",\n \"synagogue\": \"\U0001F54D\",\n \"syringe\":
+ \"\U0001F489\",\n \"taco\": \"\U0001F32E\",\n \"tada\": \"\U0001F389\",\n
+ \ \"tanabata_tree\": \"\U0001F38B\",\n \"taurus\": \"♉️\",\n
+ \ \"taxi\": \"\U0001F695\",\n \"tea\": \"\U0001F375\",\n \"telephone_receiver\":
+ \"\U0001F4DE\",\n \"telescope\": \"\U0001F52D\",\n \"tennis\":
+ \"\U0001F3BE\",\n \"tent\": \"⛺️\",\n \"thermometer\": \"\U0001F321\",\n
+ \ \"thinking\": \"\U0001F914\",\n \"thought_balloon\": \"\U0001F4AD\",\n
+ \ \"ticket\": \"\U0001F3AB\",\n \"tickets\": \"\U0001F39F\",\n
+ \ \"tiger\": \"\U0001F42F\",\n \"tiger2\": \"\U0001F405\",\n
+ \ \"timer_clock\": \"⏲\",\n \"tipping_hand_man\": \"\U0001F481♂️\",\n
+ \ \"tired_face\": \"\U0001F62B\",\n \"tm\": \"™️\",\n \"toilet\":
+ \"\U0001F6BD\",\n \"tokyo_tower\": \"\U0001F5FC\",\n \"tomato\":
+ \"\U0001F345\",\n \"tongue\": \"\U0001F445\",\n \"top\": \"\U0001F51D\",\n
+ \ \"tophat\": \"\U0001F3A9\",\n \"tornado\": \"\U0001F32A\",\n
+ \ \"trackball\": \"\U0001F5B2\",\n \"tractor\": \"\U0001F69C\",\n
+ \ \"traffic_light\": \"\U0001F6A5\",\n \"train\": \"\U0001F68B\",\n
+ \ \"train2\": \"\U0001F686\",\n \"tram\": \"\U0001F68A\",\n \"triangular_flag_on_post\":
+ \"\U0001F6A9\",\n \"triangular_ruler\": \"\U0001F4D0\",\n \"trident\":
+ \"\U0001F531\",\n \"triumph\": \"\U0001F624\",\n \"trolleybus\":
+ \"\U0001F68E\",\n \"trophy\": \"\U0001F3C6\",\n \"tropical_drink\":
+ \"\U0001F379\",\n \"tropical_fish\": \"\U0001F420\",\n \"truck\":
+ \"\U0001F69A\",\n \"trumpet\": \"\U0001F3BA\",\n \"tulip\":
+ \"\U0001F337\",\n \"tumbler_glass\": \"\U0001F943\",\n \"turkey\":
+ \"\U0001F983\",\n \"turtle\": \"\U0001F422\",\n \"tv\": \"\U0001F4FA\",\n
+ \ \"twisted_rightwards_arrows\": \"\U0001F500\",\n \"two_hearts\":
+ \"\U0001F495\",\n \"two_men_holding_hands\": \"\U0001F46C\",\n \"two_women_holding_hands\":
+ \"\U0001F46D\",\n \"u5272\": \"\U0001F239\",\n \"u5408\": \"\U0001F234\",\n
+ \ \"u55b6\": \"\U0001F23A\",\n \"u6307\": \"\U0001F22F️\",\n
+ \ \"u6708\": \"\U0001F237️\",\n \"u6709\": \"\U0001F236\",\n
+ \ \"u6e80\": \"\U0001F235\",\n \"u7121\": \"\U0001F21A️\",\n
+ \ \"u7533\": \"\U0001F238\",\n \"u7981\": \"\U0001F232\",\n \"u7a7a\":
+ \"\U0001F233\",\n \"umbrella\": \"☔️\",\n \"unamused\": \"\U0001F612\",\n
+ \ \"underage\": \"\U0001F51E\",\n \"unicorn\": \"\U0001F984\",\n
+ \ \"unlock\": \"\U0001F513\",\n \"up\": \"\U0001F199\",\n \"upside_down_face\":
+ \"\U0001F643\",\n \"v\": \"✌️\",\n \"vertical_traffic_light\":
+ \"\U0001F6A6\",\n \"vhs\": \"\U0001F4FC\",\n \"vibration_mode\":
+ \"\U0001F4F3\",\n \"video_camera\": \"\U0001F4F9\",\n \"video_game\":
+ \"\U0001F3AE\",\n \"violin\": \"\U0001F3BB\",\n \"virgo\": \"♍️\",\n
+ \ \"volcano\": \"\U0001F30B\",\n \"volleyball\": \"\U0001F3D0\",\n
+ \ \"vs\": \"\U0001F19A\",\n \"vulcan_salute\": \"\U0001F596\",\n
+ \ \"walking_man\": \"\U0001F6B6\",\n \"walking_woman\": \"\U0001F6B6♀️\",\n
+ \ \"waning_crescent_moon\": \"\U0001F318\",\n \"waning_gibbous_moon\":
+ \"\U0001F316\",\n \"warning\": \"⚠️\",\n \"wastebasket\": \"\U0001F5D1\",\n
+ \ \"watch\": \"⌚️\",\n \"water_buffalo\": \"\U0001F403\",\n \"watermelon\":
+ \"\U0001F349\",\n \"wave\": \"\U0001F44B\",\n \"wavy_dash\":
+ \"〰️\",\n \"waxing_crescent_moon\": \"\U0001F312\",\n \"wc\":
+ \"\U0001F6BE\",\n \"weary\": \"\U0001F629\",\n \"wedding\":
+ \"\U0001F492\",\n \"weight_lifting_man\": \"\U0001F3CB️\",\n \"weight_lifting_woman\":
+ \"\U0001F3CB️♀️\",\n \"whale\": \"\U0001F433\",\n \"whale2\":
+ \"\U0001F40B\",\n \"wheel_of_dharma\": \"☸️\",\n \"wheelchair\":
+ \"♿️\",\n \"white_check_mark\": \"✅\",\n \"white_circle\": \"⚪️\",\n
+ \ \"white_flag\": \"\U0001F3F3️\",\n \"white_flower\": \"\U0001F4AE\",\n
+ \ \"white_large_square\": \"⬜️\",\n \"white_medium_small_square\":
+ \"◽️\",\n \"white_medium_square\": \"◻️\",\n \"white_small_square\":
+ \"▫️\",\n \"white_square_button\": \"\U0001F533\",\n \"wilted_flower\":
+ \"\U0001F940\",\n \"wind_chime\": \"\U0001F390\",\n \"wind_face\":
+ \"\U0001F32C\",\n \"wine_glass\": \"\U0001F377\",\n \"wink\":
+ \"\U0001F609\",\n \"wolf\": \"\U0001F43A\",\n \"woman\": \"\U0001F469\",\n
+ \ \"woman_artist\": \"\U0001F469\U0001F3A8\",\n \"woman_astronaut\":
+ \"\U0001F469\U0001F680\",\n \"woman_cartwheeling\": \"\U0001F938♀️\",\n
+ \ \"woman_cook\": \"\U0001F469\U0001F373\",\n \"woman_facepalming\":
+ \"\U0001F926♀️\",\n \"woman_factory_worker\": \"\U0001F469\U0001F3ED\",\n
+ \ \"woman_farmer\": \"\U0001F469\U0001F33E\",\n \"woman_firefighter\":
+ \"\U0001F469\U0001F692\",\n \"woman_health_worker\": \"\U0001F469⚕️\",\n
+ \ \"woman_judge\": \"\U0001F469⚖️\",\n \"woman_juggling\":
+ \"\U0001F939♀️\",\n \"woman_mechanic\": \"\U0001F469\U0001F527\",\n
+ \ \"woman_office_worker\": \"\U0001F469\U0001F4BC\",\n \"woman_pilot\":
+ \"\U0001F469✈️\",\n \"woman_playing_handball\": \"\U0001F93E♀️\",\n
+ \ \"woman_playing_water_polo\": \"\U0001F93D♀️\",\n \"woman_scientist\":
+ \"\U0001F469\U0001F52C\",\n \"woman_shrugging\": \"\U0001F937♀️\",\n
+ \ \"woman_singer\": \"\U0001F469\U0001F3A4\",\n \"woman_student\":
+ \"\U0001F469\U0001F393\",\n \"woman_teacher\": \"\U0001F469\U0001F3EB\",\n
+ \ \"woman_technologist\": \"\U0001F469\U0001F4BB\",\n \"woman_with_turban\":
+ \"\U0001F473♀️\",\n \"womans_clothes\": \"\U0001F45A\",\n \"womans_hat\":
+ \"\U0001F452\",\n \"women_wrestling\": \"\U0001F93C♀️\",\n \"womens\":
+ \"\U0001F6BA\",\n \"world_map\": \"\U0001F5FA\",\n \"worried\":
+ \"\U0001F61F\",\n \"wrench\": \"\U0001F527\",\n \"writing_hand\":
+ \"✍️\",\n \"x\": \"❌\",\n \"yellow_heart\": \"\U0001F49B\",\n
+ \ \"yen\": \"\U0001F4B4\",\n \"yin_yang\": \"☯️\",\n \"yum\":
+ \"\U0001F60B\",\n \"zap\": \"⚡️\",\n \"zipper_mouth_face\":
+ \"\U0001F910\",\n \"zzz\": \"\U0001F4A4\",\n /* special emojis
+ :P */\n \"octocat\": '
',\n
+ \ \"showdown\": `S`\n };\n showdown2.Converter
+ = function(converterOptions) {\n var options = {}, langExtensions =
+ [], outputModifiers = [], listeners = {}, setConvFlavor = setFlavor, metadata
+ = {\n parsed: {},\n raw: \"\",\n format: \"\"\n
+ \ };\n _constructor();\n function _constructor() {\n converterOptions
+ = converterOptions || {};\n for (var gOpt in globalOptions) {\n if
+ (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n
+ \ }\n }\n if (typeof converterOptions === \"object\")
+ {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt))
+ {\n options[opt] = converterOptions[opt];\n }\n
+ \ }\n } else {\n throw Error(\"Converter expects
+ the passed parameter to be an object, but \" + typeof converterOptions + \"
+ was passed instead.\");\n }\n if (options.extensions) {\n
+ \ showdown2.helper.forEach(options.extensions, _parseExtension);\n
+ \ }\n }\n function _parseExtension(ext, name) {\n name
+ = name || null;\n if (showdown2.helper.isString(ext)) {\n ext
+ = showdown2.helper.stdExtName(ext);\n name = ext;\n if
+ (showdown2.extensions[ext]) {\n console.warn(\"DEPRECATION WARNING:
+ \" + ext + \" is an old extension that uses a deprecated loading method.Please
+ inform the developer that the extension should be updated!\");\n legacyExtensionLoading(showdown2.extensions[ext],
+ ext);\n return;\n } else if (!showdown2.helper.isUndefined(extensions[ext]))
+ {\n ext = extensions[ext];\n } else {\n throw
+ Error('Extension \"' + ext + '\" could not be loaded. It was either not found
+ or is not a valid extension.');\n }\n }\n if
+ (typeof ext === \"function\") {\n ext = ext();\n }\n if
+ (!showdown2.helper.isArray(ext)) {\n ext = [ext];\n }\n
+ \ var validExt = validate(ext, name);\n if (!validExt.valid)
+ {\n throw Error(validExt.error);\n }\n for (var
+ i3 = 0; i3 < ext.length; ++i3) {\n switch (ext[i3].type) {\n case
+ \"lang\":\n langExtensions.push(ext[i3]);\n break;\n
+ \ case \"output\":\n outputModifiers.push(ext[i3]);\n
+ \ break;\n }\n if (ext[i3].hasOwnProperty(\"listeners\"))
+ {\n for (var ln in ext[i3].listeners) {\n if (ext[i3].listeners.hasOwnProperty(ln))
+ {\n listen(ln, ext[i3].listeners[ln]);\n }\n
+ \ }\n }\n }\n }\n function legacyExtensionLoading(ext,
+ name) {\n if (typeof ext === \"function\") {\n ext = ext(new
+ showdown2.Converter());\n }\n if (!showdown2.helper.isArray(ext))
+ {\n ext = [ext];\n }\n var valid = validate(ext,
+ name);\n if (!valid.valid) {\n throw Error(valid.error);\n
+ \ }\n for (var i3 = 0; i3 < ext.length; ++i3) {\n switch
+ (ext[i3].type) {\n case \"lang\":\n langExtensions.push(ext[i3]);\n
+ \ break;\n case \"output\":\n outputModifiers.push(ext[i3]);\n
+ \ break;\n default:\n throw Error(\"Extension
+ loader error: Type unrecognized!!!\");\n }\n }\n }\n
+ \ function listen(name, callback) {\n if (!showdown2.helper.isString(name))
+ {\n throw Error(\"Invalid argument in converter.listen() method:
+ name must be a string, but \" + typeof name + \" given\");\n }\n
+ \ if (typeof callback !== \"function\") {\n throw Error(\"Invalid
+ argument in converter.listen() method: callback must be a function, but \"
+ + typeof callback + \" given\");\n }\n if (!listeners.hasOwnProperty(name))
+ {\n listeners[name] = [];\n }\n listeners[name].push(callback);\n
+ \ }\n function rTrimInputText(text2) {\n var rsp = text2.match(/^\\s*/)[0].length,
+ rgx = new RegExp(\"^\\\\s{0,\" + rsp + \"}\", \"gm\");\n return text2.replace(rgx,
+ \"\");\n }\n this._dispatch = function dispatch(evtName, text2,
+ options2, globals) {\n if (listeners.hasOwnProperty(evtName)) {\n
+ \ for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n var
+ nText = listeners[evtName][ei](evtName, text2, this, options2, globals);\n
+ \ if (nText && typeof nText !== \"undefined\") {\n text2
+ = nText;\n }\n }\n }\n return text2;\n
+ \ };\n this.listen = function(name, callback) {\n listen(name,
+ callback);\n return this;\n };\n this.makeHtml = function(text2)
+ {\n if (!text2) {\n return text2;\n }\n var
+ globals = {\n gHtmlBlocks: [],\n gHtmlMdBlocks: [],\n
+ \ gHtmlSpans: [],\n gUrls: {},\n gTitles:
+ {},\n gDimensions: {},\n gListLevel: 0,\n hashLinkCounts:
+ {},\n langExtensions,\n outputModifiers,\n converter:
+ this,\n ghCodeBlocks: [],\n metadata: {\n parsed:
+ {},\n raw: \"\",\n format: \"\"\n }\n
+ \ };\n text2 = text2.replace(/¨/g, \"¨T\");\n text2
+ = text2.replace(/\\$/g, \"¨D\");\n text2 = text2.replace(/\\r\\n/g,
+ \"\\n\");\n text2 = text2.replace(/\\r/g, \"\\n\");\n text2
+ = text2.replace(/\\u00A0/g, \" \");\n if (options.smartIndentationFix)
+ {\n text2 = rTrimInputText(text2);\n }\n text2
+ = \"\\n\\n\" + text2 + \"\\n\\n\";\n text2 = showdown2.subParser(\"detab\")(text2,
+ options, globals);\n text2 = text2.replace(/^[ \\t]+$/mg, \"\");\n
+ \ showdown2.helper.forEach(langExtensions, function(ext) {\n text2
+ = showdown2.subParser(\"runExtension\")(ext, text2, options, globals);\n });\n
+ \ text2 = showdown2.subParser(\"metadata\")(text2, options, globals);\n
+ \ text2 = showdown2.subParser(\"hashPreCodeTags\")(text2, options,
+ globals);\n text2 = showdown2.subParser(\"githubCodeBlocks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"hashHTMLBlocks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"hashCodeTags\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"stripLinkDefinitions\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"blockGamut\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"unhashHTMLSpans\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"unescapeSpecialChars\")(text2,
+ options, globals);\n text2 = text2.replace(/¨D/g, \"$$\");\n text2
+ = text2.replace(/¨T/g, \"¨\");\n text2 = showdown2.subParser(\"completeHTMLDocument\")(text2,
+ options, globals);\n showdown2.helper.forEach(outputModifiers, function(ext)
+ {\n text2 = showdown2.subParser(\"runExtension\")(ext, text2, options,
+ globals);\n });\n metadata = globals.metadata;\n return
+ text2;\n };\n this.makeMarkdown = this.makeMd = function(src,
+ HTMLParser) {\n src = src.replace(/\\r\\n/g, \"\\n\");\n src
+ = src.replace(/\\r/g, \"\\n\");\n src = src.replace(/>[ \\t]+,
+ \">¨NBSP;<\");\n if (!HTMLParser) {\n if (window && window.document)
+ {\n HTMLParser = window.document;\n } else {\n throw
+ new Error(\"HTMLParser is undefined. If in a webworker or nodejs environment,
+ you need to provide a WHATWG DOM and HTML such as JSDOM\");\n }\n
+ \ }\n var doc = HTMLParser.createElement(\"div\");\n doc.innerHTML
+ = src;\n var globals = {\n preList: substitutePreCodeTags(doc)\n
+ \ };\n clean(doc);\n var nodes = doc.childNodes,
+ mdDoc = \"\";\n for (var i3 = 0; i3 < nodes.length; i3++) {\n mdDoc
+ += showdown2.subParser(\"makeMarkdown.node\")(nodes[i3], globals);\n }\n
+ \ function clean(node) {\n for (var n3 = 0; n3 < node.childNodes.length;
+ ++n3) {\n var child = node.childNodes[n3];\n if
+ (child.nodeType === 3) {\n if (!/\\S/.test(child.nodeValue)
+ && !/^[ ]+$/.test(child.nodeValue)) {\n node.removeChild(child);\n
+ \ --n3;\n } else {\n child.nodeValue
+ = child.nodeValue.split(\"\\n\").join(\" \");\n child.nodeValue
+ = child.nodeValue.replace(/(\\s)+/g, \"$1\");\n }\n }
+ else if (child.nodeType === 1) {\n clean(child);\n }\n
+ \ }\n }\n function substitutePreCodeTags(doc2)
+ {\n var pres = doc2.querySelectorAll(\"pre\"), presPH = [];\n for
+ (var i4 = 0; i4 < pres.length; ++i4) {\n if (pres[i4].childElementCount
+ === 1 && pres[i4].firstChild.tagName.toLowerCase() === \"code\") {\n var
+ content = pres[i4].firstChild.innerHTML.trim(), language = pres[i4].firstChild.getAttribute(\"data-language\")
+ || \"\";\n if (language === \"\") {\n var
+ classes = pres[i4].firstChild.className.split(\" \");\n for
+ (var c2 = 0; c2 < classes.length; ++c2) {\n var matches
+ = classes[c2].match(/^language-(.+)$/);\n if (matches !==
+ null) {\n language = matches[1];\n break;\n
+ \ }\n }\n }\n content
+ = showdown2.helper.unescapeHTMLEntities(content);\n presPH.push(content);\n
+ \ pres[i4].outerHTML = '';\n } else {\n
+ \ presPH.push(pres[i4].innerHTML);\n pres[i4].innerHTML
+ = \"\";\n pres[i4].setAttribute(\"prenum\", i4.toString());\n
+ \ }\n }\n return presPH;\n }\n
+ \ return mdDoc;\n };\n this.setOption = function(key,
+ value) {\n options[key] = value;\n };\n this.getOption
+ = function(key) {\n return options[key];\n };\n this.getOptions
+ = function() {\n return options;\n };\n this.addExtension
+ = function(extension, name) {\n name = name || null;\n _parseExtension(extension,
+ name);\n };\n this.useExtension = function(extensionName) {\n
+ \ _parseExtension(extensionName);\n };\n this.setFlavor
+ = function(name) {\n if (!flavor.hasOwnProperty(name)) {\n throw
+ Error(name + \" flavor was not found\");\n }\n var preset
+ = flavor[name];\n setConvFlavor = name;\n for (var option
+ in preset) {\n if (preset.hasOwnProperty(option)) {\n options[option]
+ = preset[option];\n }\n }\n };\n this.getFlavor
+ = function() {\n return setConvFlavor;\n };\n this.removeExtension
+ = function(extension) {\n if (!showdown2.helper.isArray(extension))
+ {\n extension = [extension];\n }\n for (var a2
+ = 0; a2 < extension.length; ++a2) {\n var ext = extension[a2];\n
+ \ for (var i3 = 0; i3 < langExtensions.length; ++i3) {\n if
+ (langExtensions[i3] === ext) {\n langExtensions.splice(i3,
+ 1);\n }\n }\n for (var ii = 0; ii < outputModifiers.length;
+ ++ii) {\n if (outputModifiers[ii] === ext) {\n outputModifiers.splice(ii,
+ 1);\n }\n }\n }\n };\n this.getAllExtensions
+ = function() {\n return {\n language: langExtensions,\n
+ \ output: outputModifiers\n };\n };\n this.getMetadata
+ = function(raw) {\n if (raw) {\n return metadata.raw;\n
+ \ } else {\n return metadata.parsed;\n }\n };\n
+ \ this.getMetadataFormat = function() {\n return metadata.format;\n
+ \ };\n this._setMetadataPair = function(key, value) {\n metadata.parsed[key]
+ = value;\n };\n this._setMetadataFormat = function(format2)
+ {\n metadata.format = format2;\n };\n this._setMetadataRaw
+ = function(raw) {\n metadata.raw = raw;\n };\n };\n showdown2.subParser(\"anchors\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"anchors.before\",
+ text2, options, globals);\n var writeAnchorTag = function(wholeMatch,
+ linkText, linkId, url2, m5, m6, title) {\n if (showdown2.helper.isUndefined(title))
+ {\n title = \"\";\n }\n linkId = linkId.toLowerCase();\n
+ \ if (wholeMatch.search(/\\(\\s*>? ?(['\"].*['\"])?\\)$/m) > -1)
+ {\n url2 = \"\";\n } else if (!url2) {\n if
+ (!linkId) {\n linkId = linkText.toLowerCase().replace(/ ?\\n/g,
+ \" \");\n }\n url2 = \"#\" + linkId;\n if
+ (!showdown2.helper.isUndefined(globals.gUrls[linkId])) {\n url2
+ = globals.gUrls[linkId];\n if (!showdown2.helper.isUndefined(globals.gTitles[linkId]))
+ {\n title = globals.gTitles[linkId];\n }\n }
+ else {\n return wholeMatch;\n }\n }\n url2
+ = url2.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);\n
+ \ var result = '\" + linkText + \"\";\n return
+ result;\n };\n text2 = text2.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]
+ ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n text2 = text2.replace(\n
+ \ /\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[
+ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag\n );\n
+ \ text2 = text2.replace(\n /\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[
+ \\t]*\\([ \\t]?([\\S]+?(?:\\([\\S]*?\\)[\\S]*?)?)>?(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[
+ \\t]?\\)/g,\n writeAnchorTag\n );\n text2 = text2.replace(/\\[([^\\[\\]]+)]()()()()()/g,
+ writeAnchorTag);\n if (options.ghMentions) {\n text2 = text2.replace(/(^|\\s)(\\\\)?(@([a-z\\d]+(?:[a-z\\d.-]+?[a-z\\d]+)*))/gmi,
+ function(wm, st, escape2, mentions, username) {\n if (escape2 ===
+ \"\\\\\") {\n return st + mentions;\n }\n if
+ (!showdown2.helper.isString(options.ghMentionsLink)) {\n throw
+ new Error(\"ghMentionsLink option must be a string\");\n }\n var
+ lnk = options.ghMentionsLink.replace(/\\{u}/g, username), target = \"\";\n
+ \ if (options.openLinksInNewWindow) {\n target = '
+ rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return
+ st + '\" + mentions + \"\";\n });\n
+ \ }\n text2 = globals.converter._dispatch(\"anchors.after\",
+ text2, options, globals);\n return text2;\n });\n var simpleURLRegex
+ = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+?\\.[^'\">\\s]+?)()(\\1)?(?=\\s|$)(?![\"<>])/gi,
+ simpleURLRegex2 = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]])?(\\1)?(?=\\s|$)(?![\"<>])/gi,
+ delimUrlRegex = /()<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>()/gi,
+ simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,
+ delimMailRegex = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,
+ replaceLink = function(options) {\n return function(wm, leadingMagicChars,
+ link2, m2, m3, trailingPunctuation, trailingMagicChars) {\n link2
+ = link2.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);\n
+ \ var lnkTxt = link2, append = \"\", target = \"\", lmc = leadingMagicChars
+ || \"\", tmc = trailingMagicChars || \"\";\n if (/^www\\./i.test(link2))
+ {\n link2 = link2.replace(/^www\\./i, \"http://www.\");\n }\n
+ \ if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation)
+ {\n append = trailingPunctuation;\n }\n if (options.openLinksInNewWindow)
+ {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n
+ \ }\n return lmc + '\" + lnkTxt + \"\" + append + tmc;\n };\n }, replaceMail
+ = function(options, globals) {\n return function(wholeMatch, b2, mail)
+ {\n var href = \"mailto:\";\n b2 = b2 || \"\";\n mail
+ = showdown2.subParser(\"unescapeSpecialChars\")(mail, options, globals);\n
+ \ if (options.encodeEmails) {\n href = showdown2.helper.encodeEmailAddress(href
+ + mail);\n mail = showdown2.helper.encodeEmailAddress(mail);\n
+ \ } else {\n href = href + mail;\n }\n return
+ b2 + '' + mail + \"\";\n };\n };\n
+ \ showdown2.subParser(\"autoLinks\", function(text2, options, globals)
+ {\n text2 = globals.converter._dispatch(\"autoLinks.before\", text2,
+ options, globals);\n text2 = text2.replace(delimUrlRegex, replaceLink(options));\n
+ \ text2 = text2.replace(delimMailRegex, replaceMail(options, globals));\n
+ \ text2 = globals.converter._dispatch(\"autoLinks.after\", text2, options,
+ globals);\n return text2;\n });\n showdown2.subParser(\"simplifiedAutoLinks\",
+ function(text2, options, globals) {\n if (!options.simplifiedAutoLink)
+ {\n return text2;\n }\n text2 = globals.converter._dispatch(\"simplifiedAutoLinks.before\",
+ text2, options, globals);\n if (options.excludeTrailingPunctuationFromURLs)
+ {\n text2 = text2.replace(simpleURLRegex2, replaceLink(options));\n
+ \ } else {\n text2 = text2.replace(simpleURLRegex, replaceLink(options));\n
+ \ }\n text2 = text2.replace(simpleMailRegex, replaceMail(options,
+ globals));\n text2 = globals.converter._dispatch(\"simplifiedAutoLinks.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"blockGamut\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"blockGamut.before\",
+ text2, options, globals);\n text2 = showdown2.subParser(\"blockQuotes\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"headers\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"horizontalRule\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"lists\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"codeBlocks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"tables\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"hashHTMLBlocks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"paragraphs\")(text2,
+ options, globals);\n text2 = globals.converter._dispatch(\"blockGamut.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"blockQuotes\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"blockQuotes.before\",
+ text2, options, globals);\n text2 = text2 + \"\\n\\n\";\n var
+ rgx = /(^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+/gm;\n if (options.splitAdjacentBlockquotes)
+ {\n rgx = /^ {0,3}>[\\s\\S]*?(?:\\n\\n)/gm;\n }\n text2
+ = text2.replace(rgx, function(bq) {\n bq = bq.replace(/^[ \\t]*>[
+ \\t]?/gm, \"\");\n bq = bq.replace(/¨0/g, \"\");\n bq =
+ bq.replace(/^[ \\t]+$/gm, \"\");\n bq = showdown2.subParser(\"githubCodeBlocks\")(bq,
+ options, globals);\n bq = showdown2.subParser(\"blockGamut\")(bq,
+ options, globals);\n bq = bq.replace(/(^|\\n)/g, \"$1 \");\n bq
+ = bq.replace(/(\\s*[^\\r]+?<\\/pre>)/gm, function(wholeMatch, m1) {\n
+ \ var pre = m1;\n pre = pre.replace(/^ /mg, \"¨0\");\n
+ \ pre = pre.replace(/¨0/g, \"\");\n return pre;\n });\n
+ \ return showdown2.subParser(\"hashBlock\")(\"\\n\" +
+ bq + \"\\n
\", options, globals);\n });\n text2
+ = globals.converter._dispatch(\"blockQuotes.after\", text2, options, globals);\n
+ \ return text2;\n });\n showdown2.subParser(\"codeBlocks\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"codeBlocks.before\",
+ text2, options, globals);\n text2 += \"¨0\";\n var pattern =
+ /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n
+ \ text2 = text2.replace(pattern, function(wholeMatch, m1, m2) {\n var
+ codeblock = m1, nextChar = m2, end = \"\\n\";\n codeblock = showdown2.subParser(\"outdent\")(codeblock,
+ options, globals);\n codeblock = showdown2.subParser(\"encodeCode\")(codeblock,
+ options, globals);\n codeblock = showdown2.subParser(\"detab\")(codeblock,
+ options, globals);\n codeblock = codeblock.replace(/^\\n+/g, \"\");\n
+ \ codeblock = codeblock.replace(/\\n+$/g, \"\");\n if (options.omitExtraWLInCodeBlocks)
+ {\n end = \"\";\n }\n codeblock = \"\"
+ + codeblock + end + \"
\";\n return showdown2.subParser(\"hashBlock\")(codeblock,
+ options, globals) + nextChar;\n });\n text2 = text2.replace(/¨0/,
+ \"\");\n text2 = globals.converter._dispatch(\"codeBlocks.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"codeSpans\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"codeSpans.before\",
+ text2, options, globals);\n if (typeof text2 === \"undefined\") {\n
+ \ text2 = \"\";\n }\n text2 = text2.replace(\n /(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n
+ \ function(wholeMatch, m1, m2, m3) {\n var c2 = m3;\n c2
+ = c2.replace(/^([ \\t]*)/g, \"\");\n c2 = c2.replace(/[ \\t]*$/g,
+ \"\");\n c2 = showdown2.subParser(\"encodeCode\")(c2, options,
+ globals);\n c2 = m1 + \"\" + c2 + \"\";\n c2
+ = showdown2.subParser(\"hashHTMLSpans\")(c2, options, globals);\n return
+ c2;\n }\n );\n text2 = globals.converter._dispatch(\"codeSpans.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"completeHTMLDocument\",
+ function(text2, options, globals) {\n if (!options.completeHTMLDocument)
+ {\n return text2;\n }\n text2 = globals.converter._dispatch(\"completeHTMLDocument.before\",
+ text2, options, globals);\n var doctype = \"html\", doctypeParsed =
+ \"\\n\", title = \"\", charset = '\\n',
+ lang = \"\", metadata = \"\";\n if (typeof globals.metadata.parsed.doctype
+ !== \"undefined\") {\n doctypeParsed = \"\\n\";\n doctype = globals.metadata.parsed.doctype.toString().toLowerCase();\n
+ \ if (doctype === \"html\" || doctype === \"html5\") {\n charset
+ = '';\n }\n }\n for (var meta
+ in globals.metadata.parsed) {\n if (globals.metadata.parsed.hasOwnProperty(meta))
+ {\n switch (meta.toLowerCase()) {\n case \"doctype\":\n
+ \ break;\n case \"title\":\n title
+ = \"\" + globals.metadata.parsed.title + \"\\n\";\n break;\n
+ \ case \"charset\":\n if (doctype === \"html\"
+ || doctype === \"html5\") {\n charset = '\\n';\n } else {\n
+ \ charset = '\\n';\n }\n break;\n case
+ \"language\":\n case \"lang\":\n lang = ' lang=\"'
+ + globals.metadata.parsed[meta] + '\"';\n metadata += '\\n';\n
+ \ break;\n default:\n metadata +=
+ '\\n';\n }\n }\n }\n text2 = doctypeParsed
+ + \"\\n\\n\" + title + charset + metadata + \"\\n\\n\"
+ + text2.trim() + \"\\n\\n\";\n text2 = globals.converter._dispatch(\"completeHTMLDocument.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"detab\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"detab.before\",
+ text2, options, globals);\n text2 = text2.replace(/\\t(?=\\t)/g, \"
+ \ \");\n text2 = text2.replace(/\\t/g, \"¨A¨B\");\n text2
+ = text2.replace(/¨B(.+?)¨A/g, function(wholeMatch, m1) {\n var leadingText
+ = m1, numSpaces = 4 - leadingText.length % 4;\n for (var i3 = 0;
+ i3 < numSpaces; i3++) {\n leadingText += \" \";\n }\n
+ \ return leadingText;\n });\n text2 = text2.replace(/¨A/g,
+ \" \");\n text2 = text2.replace(/¨B/g, \"\");\n text2 = globals.converter._dispatch(\"detab.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"ellipsis\",
+ function(text2, options, globals) {\n if (!options.ellipsis) {\n return
+ text2;\n }\n text2 = globals.converter._dispatch(\"ellipsis.before\",
+ text2, options, globals);\n text2 = text2.replace(/\\.\\.\\./g, \"…\");\n
+ \ text2 = globals.converter._dispatch(\"ellipsis.after\", text2, options,
+ globals);\n return text2;\n });\n showdown2.subParser(\"emoji\",
+ function(text2, options, globals) {\n if (!options.emoji) {\n return
+ text2;\n }\n text2 = globals.converter._dispatch(\"emoji.before\",
+ text2, options, globals);\n var emojiRgx = /:([\\S]+?):/g;\n text2
+ = text2.replace(emojiRgx, function(wm, emojiCode) {\n if (showdown2.helper.emojis.hasOwnProperty(emojiCode))
+ {\n return showdown2.helper.emojis[emojiCode];\n }\n return
+ wm;\n });\n text2 = globals.converter._dispatch(\"emoji.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"encodeAmpsAndAngles\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"encodeAmpsAndAngles.before\",
+ text2, options, globals);\n text2 = text2.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g,
+ \"&\");\n text2 = text2.replace(/<(?![a-z\\/?$!])/gi, \"<\");\n
+ \ text2 = text2.replace(//g,
+ \">\");\n text2 = globals.converter._dispatch(\"encodeAmpsAndAngles.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"encodeBackslashEscapes\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"encodeBackslashEscapes.before\",
+ text2, options, globals);\n text2 = text2.replace(/\\\\(\\\\)/g, showdown2.helper.escapeCharactersCallback);\n
+ \ text2 = text2.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|:-])/g, showdown2.helper.escapeCharactersCallback);\n
+ \ text2 = globals.converter._dispatch(\"encodeBackslashEscapes.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"encodeCode\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"encodeCode.before\",
+ text2, options, globals);\n text2 = text2.replace(/&/g, \"&\").replace(//g, \">\").replace(/([*_{}\\[\\]\\\\=~-])/g, showdown2.helper.escapeCharactersCallback);\n
+ \ text2 = globals.converter._dispatch(\"encodeCode.after\", text2, options,
+ globals);\n return text2;\n });\n showdown2.subParser(\"escapeSpecialCharsWithinTagAttributes\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"escapeSpecialCharsWithinTagAttributes.before\",
+ text2, options, globals);\n var tags = /<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,
+ comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;\n text2
+ = text2.replace(tags, function(wholeMatch) {\n return wholeMatch.replace(/(.)<\\/?code>(?=.)/g,
+ \"$1`\").replace(/([\\\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback);\n
+ \ });\n text2 = text2.replace(comments, function(wholeMatch)
+ {\n return wholeMatch.replace(/([\\\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback);\n
+ \ });\n text2 = globals.converter._dispatch(\"escapeSpecialCharsWithinTagAttributes.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"githubCodeBlocks\",
+ function(text2, options, globals) {\n if (!options.ghCodeBlocks) {\n
+ \ return text2;\n }\n text2 = globals.converter._dispatch(\"githubCodeBlocks.before\",
+ text2, options, globals);\n text2 += \"¨0\";\n text2 = text2.replace(/(?:^|\\n)(?:
+ {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g, function(wholeMatch,
+ delim, language, codeblock) {\n var end = options.omitExtraWLInCodeBlocks
+ ? \"\" : \"\\n\";\n codeblock = showdown2.subParser(\"encodeCode\")(codeblock,
+ options, globals);\n codeblock = showdown2.subParser(\"detab\")(codeblock,
+ options, globals);\n codeblock = codeblock.replace(/^\\n+/g, \"\");\n
+ \ codeblock = codeblock.replace(/\\n+$/g, \"\");\n codeblock
+ = \"\" + codeblock + end + \"
\";\n codeblock
+ = showdown2.subParser(\"hashBlock\")(codeblock, options, globals);\n return
+ \"\\n\\n¨G\" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock })
+ - 1) + \"G\\n\\n\";\n });\n text2 = text2.replace(/¨0/, \"\");\n
+ \ return globals.converter._dispatch(\"githubCodeBlocks.after\", text2,
+ options, globals);\n });\n showdown2.subParser(\"hashBlock\", function(text2,
+ options, globals) {\n text2 = globals.converter._dispatch(\"hashBlock.before\",
+ text2, options, globals);\n text2 = text2.replace(/(^\\n+|\\n+$)/g,
+ \"\");\n text2 = \"\\n\\n¨K\" + (globals.gHtmlBlocks.push(text2) -
+ 1) + \"K\\n\\n\";\n text2 = globals.converter._dispatch(\"hashBlock.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"hashCodeTags\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"hashCodeTags.before\",
+ text2, options, globals);\n var repFunc = function(wholeMatch, match3,
+ left, right) {\n var codeblock = left + showdown2.subParser(\"encodeCode\")(match3,
+ options, globals) + right;\n return \"¨C\" + (globals.gHtmlSpans.push(codeblock)
+ - 1) + \"C\";\n };\n text2 = showdown2.helper.replaceRecursiveRegExp(text2,
+ repFunc, \"]*>\", \"\", \"gim\");\n text2 = globals.converter._dispatch(\"hashCodeTags.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"hashElement\",
+ function(text2, options, globals) {\n return function(wholeMatch, m1)
+ {\n var blockText = m1;\n blockText = blockText.replace(/\\n\\n/g,
+ \"\\n\");\n blockText = blockText.replace(/^\\n/, \"\");\n blockText
+ = blockText.replace(/\\n+$/g, \"\");\n blockText = \"\\n\\n¨K\" +
+ (globals.gHtmlBlocks.push(blockText) - 1) + \"K\\n\\n\";\n return
+ blockText;\n };\n });\n showdown2.subParser(\"hashHTMLBlocks\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"hashHTMLBlocks.before\",
+ text2, options, globals);\n var blockTags = [\n \"pre\",\n
+ \ \"div\",\n \"h1\",\n \"h2\",\n \"h3\",\n
+ \ \"h4\",\n \"h5\",\n \"h6\",\n \"blockquote\",\n
+ \ \"table\",\n \"dl\",\n \"ol\",\n \"ul\",\n
+ \ \"script\",\n \"noscript\",\n \"form\",\n \"fieldset\",\n
+ \ \"iframe\",\n \"math\",\n \"style\",\n \"section\",\n
+ \ \"header\",\n \"footer\",\n \"nav\",\n \"article\",\n
+ \ \"aside\",\n \"address\",\n \"audio\",\n \"canvas\",\n
+ \ \"figure\",\n \"hgroup\",\n \"output\",\n \"video\",\n
+ \ \"p\"\n ], repFunc = function(wholeMatch, match3, left, right)
+ {\n var txt = wholeMatch;\n if (left.search(/\\bmarkdown\\b/)
+ !== -1) {\n txt = left + globals.converter.makeHtml(match3) + right;\n
+ \ }\n return \"\\n\\n¨K\" + (globals.gHtmlBlocks.push(txt)
+ - 1) + \"K\\n\\n\";\n };\n if (options.backslashEscapesHTMLTags)
+ {\n text2 = text2.replace(/\\\\<(\\/?[^>]+?)>/g, function(wm, inside)
+ {\n return \"<\" + inside + \">\";\n });\n }\n
+ \ for (var i3 = 0; i3 < blockTags.length; ++i3) {\n var opTagPos,
+ rgx1 = new RegExp(\"^ {0,3}(<\" + blockTags[i3] + \"\\\\b[^>]*>)\", \"im\"),
+ patLeft = \"<\" + blockTags[i3] + \"\\\\b[^>]*>\", patRight = \"\" + blockTags[i3]
+ + \">\";\n while ((opTagPos = showdown2.helper.regexIndexOf(text2,
+ rgx1)) !== -1) {\n var subTexts = showdown2.helper.splitAtIndex(text2,
+ opTagPos), newSubText1 = showdown2.helper.replaceRecursiveRegExp(subTexts[1],
+ repFunc, patLeft, patRight, \"im\");\n if (newSubText1 === subTexts[1])
+ {\n break;\n }\n text2 = subTexts[0].concat(newSubText1);\n
+ \ }\n }\n text2 = text2.replace(\n /(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[
+ \\t]*(?=\\n{2,}))/g,\n showdown2.subParser(\"hashElement\")(text2,
+ options, globals)\n );\n text2 = showdown2.helper.replaceRecursiveRegExp(text2,
+ function(txt) {\n return \"\\n\\n¨K\" + (globals.gHtmlBlocks.push(txt)
+ - 1) + \"K\\n\\n\";\n }, \"^ {0,3}\", \"gm\");\n text2
+ = text2.replace(\n /(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n
+ \ showdown2.subParser(\"hashElement\")(text2, options, globals)\n
+ \ );\n text2 = globals.converter._dispatch(\"hashHTMLBlocks.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"hashHTMLSpans\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"hashHTMLSpans.before\",
+ text2, options, globals);\n function hashHTMLSpan(html) {\n return
+ \"¨C\" + (globals.gHtmlSpans.push(html) - 1) + \"C\";\n }\n text2
+ = text2.replace(/<[^>]+?\\/>/gi, function(wm) {\n return hashHTMLSpan(wm);\n
+ \ });\n text2 = text2.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g,
+ function(wm) {\n return hashHTMLSpan(wm);\n });\n text2
+ = text2.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function(wm) {\n
+ \ return hashHTMLSpan(wm);\n });\n text2 = text2.replace(/<[^>]+?>/gi,
+ function(wm) {\n return hashHTMLSpan(wm);\n });\n text2
+ = globals.converter._dispatch(\"hashHTMLSpans.after\", text2, options, globals);\n
+ \ return text2;\n });\n showdown2.subParser(\"unhashHTMLSpans\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"unhashHTMLSpans.before\",
+ text2, options, globals);\n for (var i3 = 0; i3 < globals.gHtmlSpans.length;
+ ++i3) {\n var repText = globals.gHtmlSpans[i3], limit = 0;\n while
+ (/¨C(\\d+)C/.test(repText)) {\n var num = RegExp.$1;\n repText
+ = repText.replace(\"¨C\" + num + \"C\", globals.gHtmlSpans[num]);\n if
+ (limit === 10) {\n console.error(\"maximum nesting of 10 spans
+ reached!!!\");\n break;\n }\n ++limit;\n
+ \ }\n text2 = text2.replace(\"¨C\" + i3 + \"C\", repText);\n
+ \ }\n text2 = globals.converter._dispatch(\"unhashHTMLSpans.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"hashPreCodeTags\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"hashPreCodeTags.before\",
+ text2, options, globals);\n var repFunc = function(wholeMatch, match3,
+ left, right) {\n var codeblock = left + showdown2.subParser(\"encodeCode\")(match3,
+ options, globals) + right;\n return \"\\n\\n¨G\" + (globals.ghCodeBlocks.push({
+ text: wholeMatch, codeblock }) - 1) + \"G\\n\\n\";\n };\n text2
+ = showdown2.helper.replaceRecursiveRegExp(text2, repFunc, \"^ {0,3}]*>\\\\s*]*>\",
+ \"^ {0,3}\\\\s*
\", \"gim\");\n text2 = globals.converter._dispatch(\"hashPreCodeTags.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"headers\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"headers.before\",
+ text2, options, globals);\n var headerLevelStart = isNaN(parseInt(options.headerLevelStart))
+ ? 1 : parseInt(options.headerLevelStart), setextRegexH1 = options.smoothLivePreview
+ ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,
+ setextRegexH2 = options.smoothLivePreview ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm
+ : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n text2 = text2.replace(setextRegexH1,
+ function(wholeMatch, m1) {\n var spanGamut = showdown2.subParser(\"spanGamut\")(m1,
+ options, globals), hID = options.noHeaderId ? \"\" : ' id=\"' + headerId(m1)
+ + '\"', hLevel = headerLevelStart, hashBlock = \"\"
+ + spanGamut + \"\";\n return showdown2.subParser(\"hashBlock\")(hashBlock,
+ options, globals);\n });\n text2 = text2.replace(setextRegexH2,
+ function(matchFound, m1) {\n var spanGamut = showdown2.subParser(\"spanGamut\")(m1,
+ options, globals), hID = options.noHeaderId ? \"\" : ' id=\"' + headerId(m1)
+ + '\"', hLevel = headerLevelStart + 1, hashBlock = \"\" + spanGamut + \"\";\n return showdown2.subParser(\"hashBlock\")(hashBlock,
+ options, globals);\n });\n var atxStyle = options.requireSpaceBeforeHeadingText
+ ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n
+ \ text2 = text2.replace(atxStyle, function(wholeMatch, m1, m2) {\n var
+ hText = m2;\n if (options.customizedHeaderId) {\n hText
+ = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, \"\");\n }\n var span
+ = showdown2.subParser(\"spanGamut\")(hText, options, globals), hID = options.noHeaderId
+ ? \"\" : ' id=\"' + headerId(m2) + '\"', hLevel = headerLevelStart - 1 + m1.length,
+ header = \"\" + span + \"\";\n
+ \ return showdown2.subParser(\"hashBlock\")(header, options, globals);\n
+ \ });\n function headerId(m2) {\n var title, prefix;\n
+ \ if (options.customizedHeaderId) {\n var match3 = m2.match(/\\{([^{]+?)}\\s*$/);\n
+ \ if (match3 && match3[1]) {\n m2 = match3[1];\n }\n
+ \ }\n title = m2;\n if (showdown2.helper.isString(options.prefixHeaderId))
+ {\n prefix = options.prefixHeaderId;\n } else if (options.prefixHeaderId
+ === true) {\n prefix = \"section-\";\n } else {\n prefix
+ = \"\";\n }\n if (!options.rawPrefixHeaderId) {\n title
+ = prefix + title;\n }\n if (options.ghCompatibleHeaderId)
+ {\n title = title.replace(/ /g, \"-\").replace(/&/g, \"\").replace(/¨T/g,
+ \"\").replace(/¨D/g, \"\").replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g,
+ \"\").toLowerCase();\n } else if (options.rawHeaderId) {\n title
+ = title.replace(/ /g, \"-\").replace(/&/g, \"&\").replace(/¨T/g, \"¨\").replace(/¨D/g,
+ \"$\").replace(/[\"']/g, \"-\").toLowerCase();\n } else {\n title
+ = title.replace(/[^\\w]/g, \"\").toLowerCase();\n }\n if
+ (options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n
+ \ if (globals.hashLinkCounts[title]) {\n title = title
+ + \"-\" + globals.hashLinkCounts[title]++;\n } else {\n globals.hashLinkCounts[title]
+ = 1;\n }\n return title;\n }\n text2 = globals.converter._dispatch(\"headers.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"horizontalRule\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"horizontalRule.before\",
+ text2, options, globals);\n var key = showdown2.subParser(\"hashBlock\")(\"
\", options, globals);\n text2 = text2.replace(/^ {0,2}( ?-){3,}[
+ \\t]*$/gm, key);\n text2 = text2.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm,
+ key);\n text2 = text2.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n
+ \ text2 = globals.converter._dispatch(\"horizontalRule.after\", text2,
+ options, globals);\n return text2;\n });\n showdown2.subParser(\"images\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"images.before\",
+ text2, options, globals);\n var inlineRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([
+ \\t]?([\\S]+?(?:\\([\\S]*?\\)[\\S]*?)?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[
+ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g, crazyRegExp = /!\\[([^\\]]*?)][
+ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[
+ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g, base64RegExp = /!\\[([^\\]]*?)][
+ \\t]*()\\([ \\t]?(data:.+?\\/.+?;base64,[A-Za-z0-9+/=\\n]+?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[
+ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g, referenceRegExp = /!\\[([^\\]]*?)]
+ ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g, refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n
+ \ function writeImageTagBase64(wholeMatch, altText, linkId, url2, width,
+ height, m5, title) {\n url2 = url2.replace(/\\s/g, \"\");\n return
+ writeImageTag(wholeMatch, altText, linkId, url2, width, height, m5, title);\n
+ \ }\n function writeImageTag(wholeMatch, altText, linkId, url2,
+ width, height, m5, title) {\n var gUrls = globals.gUrls, gTitles
+ = globals.gTitles, gDims = globals.gDimensions;\n linkId = linkId.toLowerCase();\n
+ \ if (!title) {\n title = \"\";\n }\n if
+ (wholeMatch.search(/\\(\\s*>? ?(['\"].*['\"])?\\)$/m) > -1) {\n url2
+ = \"\";\n } else if (url2 === \"\" || url2 === null) {\n if
+ (linkId === \"\" || linkId === null) {\n linkId = altText.toLowerCase().replace(/
+ ?\\n/g, \" \");\n }\n url2 = \"#\" + linkId;\n if
+ (!showdown2.helper.isUndefined(gUrls[linkId])) {\n url2 = gUrls[linkId];\n
+ \ if (!showdown2.helper.isUndefined(gTitles[linkId])) {\n title
+ = gTitles[linkId];\n }\n if (!showdown2.helper.isUndefined(gDims[linkId]))
+ {\n width = gDims[linkId].width;\n height =
+ gDims[linkId].height;\n }\n } else {\n return
+ wholeMatch;\n }\n }\n altText = altText.replace(/\"/g,
+ \""\").replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);\n
+ \ url2 = url2.replace(showdown2.helper.regexes.asteriskDashAndColon,
+ showdown2.helper.escapeCharactersCallback);\n var result = '
\";\n return result;\n }\n text2 = text2.replace(referenceRegExp,
+ writeImageTag);\n text2 = text2.replace(base64RegExp, writeImageTagBase64);\n
+ \ text2 = text2.replace(crazyRegExp, writeImageTag);\n text2
+ = text2.replace(inlineRegExp, writeImageTag);\n text2 = text2.replace(refShortcutRegExp,
+ writeImageTag);\n text2 = globals.converter._dispatch(\"images.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"italicsAndBold\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"italicsAndBold.before\",
+ text2, options, globals);\n function parseInside(txt, left, right)
+ {\n return left + txt + right;\n }\n if (options.literalMidWordUnderscores)
+ {\n text2 = text2.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function(wm,
+ txt) {\n return parseInside(txt, \"\", \"\");\n
+ \ });\n text2 = text2.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g,
+ function(wm, txt) {\n return parseInside(txt, \"\", \"\");\n
+ \ });\n text2 = text2.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g,
+ function(wm, txt) {\n return parseInside(txt, \"\", \"\");\n
+ \ });\n } else {\n text2 = text2.replace(/___(\\S[\\s\\S]*?)___/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n text2 = text2.replace(/__(\\S[\\s\\S]*?)__/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n text2 = text2.replace(/_([^\\s_][\\s\\S]*?)_/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n }\n if (options.literalMidWordAsterisks)
+ {\n text2 = text2.replace(/([^*]|^)\\B\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*\\B(?!\\*)/g,
+ function(wm, lead, txt) {\n return parseInside(txt, lead + \"\",
+ \"\");\n });\n text2 = text2.replace(/([^*]|^)\\B\\*\\*(\\S[\\s\\S]*?)\\*\\*\\B(?!\\*)/g,
+ function(wm, lead, txt) {\n return parseInside(txt, lead + \"\",
+ \"\");\n });\n text2 = text2.replace(/([^*]|^)\\B\\*(\\S[\\s\\S]*?)\\*\\B(?!\\*)/g,
+ function(wm, lead, txt) {\n return parseInside(txt, lead + \"\",
+ \"\");\n });\n } else {\n text2 = text2.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n text2 = text2.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n text2 = text2.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g,
+ function(wm, m2) {\n return /\\S$/.test(m2) ? parseInside(m2, \"\",
+ \"\") : wm;\n });\n }\n text2 = globals.converter._dispatch(\"italicsAndBold.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"lists\",
+ function(text2, options, globals) {\n function processListItems(listStr,
+ trimTrailing) {\n globals.gListLevel++;\n listStr = listStr.replace(/\\n{2,}$/,
+ \"\\n\");\n listStr += \"¨0\";\n var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[
+ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[
+ \\t]+))/gm, isParagraphed = /\\n[ \\t]*\\n(?!¨0)/.test(listStr);\n if
+ (options.disableForced4SpacesIndentedSublists) {\n rgx = /(\\n)?(^
+ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[
+ \\t]+))/gm;\n }\n listStr = listStr.replace(rgx, function(wholeMatch,
+ m1, m2, m3, m4, taskbtn, checked) {\n checked = checked && checked.trim()
+ !== \"\";\n var item = showdown2.subParser(\"outdent\")(m4, options,
+ globals), bulletStyle = \"\";\n if (taskbtn && options.tasklists)
+ {\n bulletStyle = ' class=\"task-list-item\" style=\"list-style-type:
+ none;\"';\n item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function()
+ {\n var otp = '\";\n return otp;\n });\n }\n
+ \ item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function(wm2)
+ {\n return \"¨A\" + wm2;\n });\n if (m1
+ || item.search(/\\n{2,}/) > -1) {\n item = showdown2.subParser(\"githubCodeBlocks\")(item,
+ options, globals);\n item = showdown2.subParser(\"blockGamut\")(item,
+ options, globals);\n } else {\n item = showdown2.subParser(\"lists\")(item,
+ options, globals);\n item = item.replace(/\\n$/, \"\");\n item
+ = showdown2.subParser(\"hashHTMLBlocks\")(item, options, globals);\n item
+ = item.replace(/\\n\\n+/g, \"\\n\\n\");\n if (isParagraphed)
+ {\n item = showdown2.subParser(\"paragraphs\")(item, options,
+ globals);\n } else {\n item = showdown2.subParser(\"spanGamut\")(item,
+ options, globals);\n }\n }\n item = item.replace(\"¨A\",
+ \"\");\n item = \"\" + item + \"\\n\";\n
+ \ return item;\n });\n listStr = listStr.replace(/¨0/g,
+ \"\");\n globals.gListLevel--;\n if (trimTrailing) {\n listStr
+ = listStr.replace(/\\s+$/, \"\");\n }\n return listStr;\n
+ \ }\n function styleStartNumber(list2, listType) {\n if
+ (listType === \"ol\") {\n var res = list2.match(/^ *(\\d+)\\./);\n
+ \ if (res && res[1] !== \"1\") {\n return ' start=\"'
+ + res[1] + '\"';\n }\n }\n return \"\";\n }\n
+ \ function parseConsecutiveLists(list2, listType, trimTrailing) {\n
+ \ var olRgx = options.disableForced4SpacesIndentedSublists ? /^ ?\\d+\\.[
+ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm, ulRgx = options.disableForced4SpacesIndentedSublists
+ ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm, counterRxg = listType === \"ul\"
+ ? olRgx : ulRgx, result = \"\";\n if (list2.search(counterRxg) !==
+ -1) {\n (function parseCL(txt) {\n var pos = txt.search(counterRxg),
+ style2 = styleStartNumber(list2, listType);\n if (pos !== -1)
+ {\n result += \"\\n\\n<\" + listType + style2 + \">\\n\" +
+ processListItems(txt.slice(0, pos), !!trimTrailing) + \"\" + listType +
+ \">\\n\";\n listType = listType === \"ul\" ? \"ol\" : \"ul\";\n
+ \ counterRxg = listType === \"ul\" ? olRgx : ulRgx;\n parseCL(txt.slice(pos));\n
+ \ } else {\n result += \"\\n\\n<\" + listType +
+ style2 + \">\\n\" + processListItems(txt, !!trimTrailing) + \"\" + listType
+ + \">\\n\";\n }\n })(list2);\n } else {\n
+ \ var style = styleStartNumber(list2, listType);\n result
+ = \"\\n\\n<\" + listType + style + \">\\n\" + processListItems(list2, !!trimTrailing)
+ + \"\" + listType + \">\\n\";\n }\n return result;\n }\n
+ \ text2 = globals.converter._dispatch(\"lists.before\", text2, options,
+ globals);\n text2 += \"¨0\";\n if (globals.gListLevel) {\n text2
+ = text2.replace(\n /^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![
+ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function(wholeMatch, list2,
+ m2) {\n var listType = m2.search(/[*+-]/g) > -1 ? \"ul\" : \"ol\";\n
+ \ return parseConsecutiveLists(list2, listType, true);\n }\n
+ \ );\n } else {\n text2 = text2.replace(\n /(\\n\\n|^\\n?)((
+ {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[
+ \\t]+)))/gm,\n function(wholeMatch, m1, list2, m3) {\n var
+ listType = m3.search(/[*+-]/g) > -1 ? \"ul\" : \"ol\";\n return
+ parseConsecutiveLists(list2, listType, false);\n }\n );\n
+ \ }\n text2 = text2.replace(/¨0/, \"\");\n text2 = globals.converter._dispatch(\"lists.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"metadata\",
+ function(text2, options, globals) {\n if (!options.metadata) {\n return
+ text2;\n }\n text2 = globals.converter._dispatch(\"metadata.before\",
+ text2, options, globals);\n function parseMetadataContents(content)
+ {\n globals.metadata.raw = content;\n content = content.replace(/&/g,
+ \"&\").replace(/\"/g, \""\");\n content = content.replace(/\\n
+ {4}/g, \" \");\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm,
+ function(wm, key, value) {\n globals.metadata.parsed[key] = value;\n
+ \ return \"\";\n });\n }\n text2 = text2.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/,
+ function(wholematch, format2, content) {\n parseMetadataContents(content);\n
+ \ return \"¨M\";\n });\n text2 = text2.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/,
+ function(wholematch, format2, content) {\n if (format2) {\n globals.metadata.format
+ = format2;\n }\n parseMetadataContents(content);\n return
+ \"¨M\";\n });\n text2 = text2.replace(/¨M/g, \"\");\n text2
+ = globals.converter._dispatch(\"metadata.after\", text2, options, globals);\n
+ \ return text2;\n });\n showdown2.subParser(\"outdent\", function(text2,
+ options, globals) {\n text2 = globals.converter._dispatch(\"outdent.before\",
+ text2, options, globals);\n text2 = text2.replace(/^(\\t|[ ]{1,4})/gm,
+ \"¨0\");\n text2 = text2.replace(/¨0/g, \"\");\n text2 = globals.converter._dispatch(\"outdent.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"paragraphs\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"paragraphs.before\",
+ text2, options, globals);\n text2 = text2.replace(/^\\n+/g, \"\");\n
+ \ text2 = text2.replace(/\\n+$/g, \"\");\n var grafs = text2.split(/\\n{2,}/g),
+ grafsOut = [], end = grafs.length;\n for (var i3 = 0; i3 < end; i3++)
+ {\n var str = grafs[i3];\n if (str.search(/¨(K|G)(\\d+)\\1/g)
+ >= 0) {\n grafsOut.push(str);\n } else if (str.search(/\\S/)
+ >= 0) {\n str = showdown2.subParser(\"spanGamut\")(str, options,
+ globals);\n str = str.replace(/^([ \\t]*)/g, \"\");\n str
+ += \"
\";\n grafsOut.push(str);\n }\n }\n end
+ = grafsOut.length;\n for (i3 = 0; i3 < end; i3++) {\n var
+ blockText = \"\", grafsOutIt = grafsOut[i3], codeFlag = false;\n while
+ (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,
+ num = RegExp.$2;\n if (delim === \"K\") {\n blockText
+ = globals.gHtmlBlocks[num];\n } else {\n if (codeFlag)
+ {\n blockText = showdown2.subParser(\"encodeCode\")(globals.ghCodeBlocks[num].text,
+ options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n
+ \ }\n }\n blockText = blockText.replace(/\\$/g,
+ \"$$$$\");\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/,
+ blockText);\n if (/^]*>\\s*]*>/.test(grafsOutIt))
+ {\n codeFlag = true;\n }\n }\n grafsOut[i3]
+ = grafsOutIt;\n }\n text2 = grafsOut.join(\"\\n\");\n text2
+ = text2.replace(/^\\n+/g, \"\");\n text2 = text2.replace(/\\n+$/g,
+ \"\");\n return globals.converter._dispatch(\"paragraphs.after\", text2,
+ options, globals);\n });\n showdown2.subParser(\"runExtension\",
+ function(ext, text2, options, globals) {\n if (ext.filter) {\n text2
+ = ext.filter(text2, globals.converter, options);\n } else if (ext.regex)
+ {\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n
+ \ re = new RegExp(re, \"g\");\n }\n text2 = text2.replace(re,
+ ext.replace);\n }\n return text2;\n });\n showdown2.subParser(\"spanGamut\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"spanGamut.before\",
+ text2, options, globals);\n text2 = showdown2.subParser(\"codeSpans\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"escapeSpecialCharsWithinTagAttributes\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"encodeBackslashEscapes\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"images\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"anchors\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"autoLinks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"simplifiedAutoLinks\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"emoji\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"underline\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"italicsAndBold\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"strikethrough\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"ellipsis\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"hashHTMLSpans\")(text2,
+ options, globals);\n text2 = showdown2.subParser(\"encodeAmpsAndAngles\")(text2,
+ options, globals);\n if (options.simpleLineBreaks) {\n if
+ (!/\\n\\n¨K/.test(text2)) {\n text2 = text2.replace(/\\n+/g, \"
\\n\");\n }\n } else {\n text2 = text2.replace(/
+ \ +\\n/g, \"
\\n\");\n }\n text2 = globals.converter._dispatch(\"spanGamut.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"strikethrough\",
+ function(text2, options, globals) {\n function parseInside(txt) {\n
+ \ if (options.simplifiedAutoLink) {\n txt = showdown2.subParser(\"simplifiedAutoLinks\")(txt,
+ options, globals);\n }\n return \"\" + txt + \"\";\n
+ \ }\n if (options.strikethrough) {\n text2 = globals.converter._dispatch(\"strikethrough.before\",
+ text2, options, globals);\n text2 = text2.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g,
+ function(wm, txt) {\n return parseInside(txt);\n });\n
+ \ text2 = globals.converter._dispatch(\"strikethrough.after\", text2,
+ options, globals);\n }\n return text2;\n });\n showdown2.subParser(\"stripLinkDefinitions\",
+ function(text2, options, globals) {\n var regex2 = /^ {0,3}\\[([^\\]]+)]:[
+ \\t]*\\n?[ \\t]*([^>\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[
+ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm, base64Regex
+ = /^ {0,3}\\[([^\\]]+)]:[ \\t]*\\n?[ \\t]*(data:.+?\\/.+?;base64,[A-Za-z0-9+/=\\n]+?)>?(?:
+ =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][
+ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n text2 += \"¨0\";\n var
+ replaceFunc = function(wholeMatch, linkId, url2, width, height, blankLines,
+ title) {\n linkId = linkId.toLowerCase();\n if (text2.toLowerCase().split(linkId).length
+ - 1 < 2) {\n return wholeMatch;\n }\n if (url2.match(/^data:.+?\\/.+?;base64,/))
+ {\n globals.gUrls[linkId] = url2.replace(/\\s/g, \"\");\n }
+ else {\n globals.gUrls[linkId] = showdown2.subParser(\"encodeAmpsAndAngles\")(url2,
+ options, globals);\n }\n if (blankLines) {\n return
+ blankLines + title;\n } else {\n if (title) {\n globals.gTitles[linkId]
+ = title.replace(/\"|'/g, \""\");\n }\n if (options.parseImgDimensions
+ && width && height) {\n globals.gDimensions[linkId] = {\n width,\n
+ \ height\n };\n }\n }\n return
+ \"\";\n };\n text2 = text2.replace(base64Regex, replaceFunc);\n
+ \ text2 = text2.replace(regex2, replaceFunc);\n text2 = text2.replace(/¨0/,
+ \"\");\n return text2;\n });\n showdown2.subParser(\"tables\",
+ function(text2, options, globals) {\n if (!options.tables) {\n return
+ text2;\n }\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[
+ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,
+ singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[
+ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n function
+ parseStyles(sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return
+ ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine))
+ {\n return ' style=\"text-align:right;\"';\n } else if
+ (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n
+ \ } else {\n return \"\";\n }\n }\n function
+ parseHeaders(header, style) {\n var id = \"\";\n header
+ = header.trim();\n if (options.tablesHeaderId || options.tableHeaderId)
+ {\n id = ' id=\"' + header.replace(/ /g, \"_\").toLowerCase() +
+ '\"';\n }\n header = showdown2.subParser(\"spanGamut\")(header,
+ options, globals);\n return \"\" + header
+ + \" | \\n\";\n }\n function parseCells(cell, style) {\n var
+ subText = showdown2.subParser(\"spanGamut\")(cell, options, globals);\n return
+ \"\" + subText + \" | \\n\";\n }\n function
+ buildTable(headers, cells) {\n var tb = \"\\n\\n\\n\",
+ tblLgn = headers.length;\n for (var i3 = 0; i3 < tblLgn; ++i3) {\n
+ \ tb += headers[i3];\n }\n tb += \"
\\n\\n\\n\";\n
+ \ for (i3 = 0; i3 < cells.length; ++i3) {\n tb += \"\\n\";\n
+ \ for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i3][ii];\n
+ \ }\n tb += \"
\\n\";\n }\n tb
+ += \"\\n
\\n\";\n return tb;\n }\n function
+ parseTable(rawTable) {\n var i3, tableLines = rawTable.split(\"\\n\");\n
+ \ for (i3 = 0; i3 < tableLines.length; ++i3) {\n if (/^
+ {0,3}\\|/.test(tableLines[i3])) {\n tableLines[i3] = tableLines[i3].replace(/^
+ {0,3}\\|/, \"\");\n }\n if (/\\|[ \\t]*$/.test(tableLines[i3]))
+ {\n tableLines[i3] = tableLines[i3].replace(/\\|[ \\t]*$/, \"\");\n
+ \ }\n tableLines[i3] = showdown2.subParser(\"codeSpans\")(tableLines[i3],
+ options, globals);\n }\n var rawHeaders = tableLines[0].split(\"|\").map(function(s2)
+ {\n return s2.trim();\n }), rawStyles = tableLines[1].split(\"|\").map(function(s2)
+ {\n return s2.trim();\n }), rawCells = [], headers = [],
+ styles = [], cells = [];\n tableLines.shift();\n tableLines.shift();\n
+ \ for (i3 = 0; i3 < tableLines.length; ++i3) {\n if (tableLines[i3].trim()
+ === \"\") {\n continue;\n }\n rawCells.push(\n
+ \ tableLines[i3].split(\"|\").map(function(s2) {\n return
+ s2.trim();\n })\n );\n }\n if (rawHeaders.length
+ < rawStyles.length) {\n return rawTable;\n }\n for
+ (i3 = 0; i3 < rawStyles.length; ++i3) {\n styles.push(parseStyles(rawStyles[i3]));\n
+ \ }\n for (i3 = 0; i3 < rawHeaders.length; ++i3) {\n if
+ (showdown2.helper.isUndefined(styles[i3])) {\n styles[i3] = \"\";\n
+ \ }\n headers.push(parseHeaders(rawHeaders[i3], styles[i3]));\n
+ \ }\n for (i3 = 0; i3 < rawCells.length; ++i3) {\n var
+ row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if
+ (showdown2.helper.isUndefined(rawCells[i3][ii])) ;\n row.push(parseCells(rawCells[i3][ii],
+ styles[ii]));\n }\n cells.push(row);\n }\n
+ \ return buildTable(headers, cells);\n }\n text2 = globals.converter._dispatch(\"tables.before\",
+ text2, options, globals);\n text2 = text2.replace(/\\\\(\\|)/g, showdown2.helper.escapeCharactersCallback);\n
+ \ text2 = text2.replace(tableRgx, parseTable);\n text2 = text2.replace(singeColTblRgx,
+ parseTable);\n text2 = globals.converter._dispatch(\"tables.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"underline\",
+ function(text2, options, globals) {\n if (!options.underline) {\n return
+ text2;\n }\n text2 = globals.converter._dispatch(\"underline.before\",
+ text2, options, globals);\n if (options.literalMidWordUnderscores)
+ {\n text2 = text2.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function(wm,
+ txt) {\n return \"\" + txt + \"\";\n });\n text2
+ = text2.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function(wm, txt) {\n return
+ \"\" + txt + \"\";\n });\n } else {\n text2
+ = text2.replace(/___(\\S[\\s\\S]*?)___/g, function(wm, m2) {\n return
+ /\\S$/.test(m2) ? \"\" + m2 + \"\" : wm;\n });\n text2
+ = text2.replace(/__(\\S[\\s\\S]*?)__/g, function(wm, m2) {\n return
+ /\\S$/.test(m2) ? \"\" + m2 + \"\" : wm;\n });\n }\n
+ \ text2 = text2.replace(/(_)/g, showdown2.helper.escapeCharactersCallback);\n
+ \ text2 = globals.converter._dispatch(\"underline.after\", text2, options,
+ globals);\n return text2;\n });\n showdown2.subParser(\"unescapeSpecialChars\",
+ function(text2, options, globals) {\n text2 = globals.converter._dispatch(\"unescapeSpecialChars.before\",
+ text2, options, globals);\n text2 = text2.replace(/¨E(\\d+)E/g, function(wholeMatch,
+ m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n
+ \ });\n text2 = globals.converter._dispatch(\"unescapeSpecialChars.after\",
+ text2, options, globals);\n return text2;\n });\n showdown2.subParser(\"makeMarkdown.blockquote\",
+ function(node, globals) {\n var txt = \"\";\n if (node.hasChildNodes())
+ {\n var children = node.childNodes, childrenLength = children.length;\n
+ \ for (var i3 = 0; i3 < childrenLength; ++i3) {\n var innerTxt
+ = showdown2.subParser(\"makeMarkdown.node\")(children[i3], globals);\n if
+ (innerTxt === \"\") {\n continue;\n }\n txt
+ += innerTxt;\n }\n }\n txt = txt.trim();\n txt
+ = \"> \" + txt.split(\"\\n\").join(\"\\n> \");\n return txt;\n });\n
+ \ showdown2.subParser(\"makeMarkdown.codeBlock\", function(node, globals)
+ {\n var lang = node.getAttribute(\"language\"), num = node.getAttribute(\"precodenum\");\n
+ \ return \"```\" + lang + \"\\n\" + globals.preList[num] + \"\\n```\";\n
+ \ });\n showdown2.subParser(\"makeMarkdown.codeSpan\", function(node)
+ {\n return \"`\" + node.innerHTML + \"`\";\n });\n showdown2.subParser(\"makeMarkdown.emphasis\",
+ function(node, globals) {\n var txt = \"\";\n if (node.hasChildNodes())
+ {\n txt += \"*\";\n var children = node.childNodes, childrenLength
+ = children.length;\n for (var i3 = 0; i3 < childrenLength; ++i3)
+ {\n txt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals);\n }\n txt += \"*\";\n }\n return
+ txt;\n });\n showdown2.subParser(\"makeMarkdown.header\", function(node,
+ globals, headerLevel) {\n var headerMark = new Array(headerLevel +
+ 1).join(\"#\"), txt = \"\";\n if (node.hasChildNodes()) {\n txt
+ = headerMark + \" \";\n var children = node.childNodes, childrenLength
+ = children.length;\n for (var i3 = 0; i3 < childrenLength; ++i3)
+ {\n txt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals);\n }\n }\n return txt;\n });\n showdown2.subParser(\"makeMarkdown.hr\",
+ function() {\n return \"---\";\n });\n showdown2.subParser(\"makeMarkdown.image\",
+ function(node) {\n var txt = \"\";\n if (node.hasAttribute(\"src\"))
+ {\n txt += \" + \">\";\n if (node.hasAttribute(\"width\")
+ && node.hasAttribute(\"height\")) {\n txt += \" =\" + node.getAttribute(\"width\")
+ + \"x\" + node.getAttribute(\"height\");\n }\n if (node.hasAttribute(\"title\"))
+ {\n txt += ' \"' + node.getAttribute(\"title\") + '\"';\n }\n
+ \ txt += \")\";\n }\n return txt;\n });\n showdown2.subParser(\"makeMarkdown.links\",
+ function(node, globals) {\n var txt = \"\";\n if (node.hasChildNodes()
+ && node.hasAttribute(\"href\")) {\n var children = node.childNodes,
+ childrenLength = children.length;\n txt = \"[\";\n for (var
+ i3 = 0; i3 < childrenLength; ++i3) {\n txt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals);\n }\n txt += \"](\";\n txt += \"<\" +
+ node.getAttribute(\"href\") + \">\";\n if (node.hasAttribute(\"title\"))
+ {\n txt += ' \"' + node.getAttribute(\"title\") + '\"';\n }\n
+ \ txt += \")\";\n }\n return txt;\n });\n showdown2.subParser(\"makeMarkdown.list\",
+ function(node, globals, type) {\n var txt = \"\";\n if (!node.hasChildNodes())
+ {\n return \"\";\n }\n var listItems = node.childNodes,
+ listItemsLenght = listItems.length, listNum = node.getAttribute(\"start\")
+ || 1;\n for (var i3 = 0; i3 < listItemsLenght; ++i3) {\n if
+ (typeof listItems[i3].tagName === \"undefined\" || listItems[i3].tagName.toLowerCase()
+ !== \"li\") {\n continue;\n }\n var bullet =
+ \"\";\n if (type === \"ol\") {\n bullet = listNum.toString()
+ + \". \";\n } else {\n bullet = \"- \";\n }\n
+ \ txt += bullet + showdown2.subParser(\"makeMarkdown.listItem\")(listItems[i3],
+ globals);\n ++listNum;\n }\n txt += \"\\n\\n\";\n
+ \ return txt.trim();\n });\n showdown2.subParser(\"makeMarkdown.listItem\",
+ function(node, globals) {\n var listItemTxt = \"\";\n var children
+ = node.childNodes, childrenLenght = children.length;\n for (var i3
+ = 0; i3 < childrenLenght; ++i3) {\n listItemTxt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals);\n }\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt
+ += \"\\n\";\n } else {\n listItemTxt = listItemTxt.split(\"\\n\").join(\"\\n
+ \ \").replace(/^ {4}$/gm, \"\").replace(/\\n\\n+/g, \"\\n\\n\");\n }\n
+ \ return listItemTxt;\n });\n showdown2.subParser(\"makeMarkdown.node\",
+ function(node, globals, spansOnly) {\n spansOnly = spansOnly || false;\n
+ \ var txt = \"\";\n if (node.nodeType === 3) {\n return
+ showdown2.subParser(\"makeMarkdown.txt\")(node, globals);\n }\n if
+ (node.nodeType === 8) {\n return \"\\n\\n\";\n
+ \ }\n if (node.nodeType !== 1) {\n return \"\";\n }\n
+ \ var tagName = node.tagName.toLowerCase();\n switch (tagName)
+ {\n //\n // BLOCKS\n //\n case \"h1\":\n
+ \ if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 1) + \"\\n\\n\";\n }\n break;\n case
+ \"h2\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 2) + \"\\n\\n\";\n }\n break;\n case
+ \"h3\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 3) + \"\\n\\n\";\n }\n break;\n case
+ \"h4\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 4) + \"\\n\\n\";\n }\n break;\n case
+ \"h5\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 5) + \"\\n\\n\";\n }\n break;\n case
+ \"h6\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.header\")(node,
+ globals, 6) + \"\\n\\n\";\n }\n break;\n case
+ \"p\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.paragraph\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n case
+ \"blockquote\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.blockquote\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n case
+ \"hr\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.hr\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n case
+ \"ol\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.list\")(node,
+ globals, \"ol\") + \"\\n\\n\";\n }\n break;\n case
+ \"ul\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.list\")(node,
+ globals, \"ul\") + \"\\n\\n\";\n }\n break;\n case
+ \"precode\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.codeBlock\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n case
+ \"pre\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.pre\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n case
+ \"table\":\n if (!spansOnly) {\n txt = showdown2.subParser(\"makeMarkdown.table\")(node,
+ globals) + \"\\n\\n\";\n }\n break;\n //\n
+ \ // SPANS\n //\n case \"code\":\n txt
+ = showdown2.subParser(\"makeMarkdown.codeSpan\")(node, globals);\n break;\n
+ \ case \"em\":\n case \"i\":\n txt = showdown2.subParser(\"makeMarkdown.emphasis\")(node,
+ globals);\n break;\n case \"strong\":\n case
+ \"b\":\n txt = showdown2.subParser(\"makeMarkdown.strong\")(node,
+ globals);\n break;\n case \"del\":\n txt =
+ showdown2.subParser(\"makeMarkdown.strikethrough\")(node, globals);\n break;\n
+ \ case \"a\":\n txt = showdown2.subParser(\"makeMarkdown.links\")(node,
+ globals);\n break;\n case \"img\":\n txt =
+ showdown2.subParser(\"makeMarkdown.image\")(node, globals);\n break;\n
+ \ default:\n txt = node.outerHTML + \"\\n\\n\";\n }\n
+ \ return txt;\n });\n showdown2.subParser(\"makeMarkdown.paragraph\",
+ function(node, globals) {\n var txt = \"\";\n if (node.hasChildNodes())
+ {\n var children = node.childNodes, childrenLength = children.length;\n
+ \ for (var i3 = 0; i3 < childrenLength; ++i3) {\n txt +=
+ showdown2.subParser(\"makeMarkdown.node\")(children[i3], globals);\n }\n
+ \ }\n txt = txt.trim();\n return txt;\n });\n showdown2.subParser(\"makeMarkdown.pre\",
+ function(node, globals) {\n var num = node.getAttribute(\"prenum\");\n
+ \ return \"\" + globals.preList[num] + \"
\";\n });\n
+ \ showdown2.subParser(\"makeMarkdown.strikethrough\", function(node, globals)
+ {\n var txt = \"\";\n if (node.hasChildNodes()) {\n txt
+ += \"~~\";\n var children = node.childNodes, childrenLength = children.length;\n
+ \ for (var i3 = 0; i3 < childrenLength; ++i3) {\n txt +=
+ showdown2.subParser(\"makeMarkdown.node\")(children[i3], globals);\n }\n
+ \ txt += \"~~\";\n }\n return txt;\n });\n showdown2.subParser(\"makeMarkdown.strong\",
+ function(node, globals) {\n var txt = \"\";\n if (node.hasChildNodes())
+ {\n txt += \"**\";\n var children = node.childNodes, childrenLength
+ = children.length;\n for (var i3 = 0; i3 < childrenLength; ++i3)
+ {\n txt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals);\n }\n txt += \"**\";\n }\n return
+ txt;\n });\n showdown2.subParser(\"makeMarkdown.table\", function(node,
+ globals) {\n var txt = \"\", tableArray = [[], []], headings = node.querySelectorAll(\"thead>tr>th\"),
+ rows = node.querySelectorAll(\"tbody>tr\"), i3, ii;\n for (i3 = 0;
+ i3 < headings.length; ++i3) {\n var headContent = showdown2.subParser(\"makeMarkdown.tableCell\")(headings[i3],
+ globals), allign = \"---\";\n if (headings[i3].hasAttribute(\"style\"))
+ {\n var style = headings[i3].getAttribute(\"style\").toLowerCase().replace(/\\s/g,
+ \"\");\n switch (style) {\n case \"text-align:left;\":\n
+ \ allign = \":---\";\n break;\n case
+ \"text-align:right;\":\n allign = \"---:\";\n break;\n
+ \ case \"text-align:center;\":\n allign = \":---:\";\n
+ \ break;\n }\n }\n tableArray[0][i3]
+ = headContent.trim();\n tableArray[1][i3] = allign;\n }\n
+ \ for (i3 = 0; i3 < rows.length; ++i3) {\n var r3 = tableArray.push([])
+ - 1, cols = rows[i3].getElementsByTagName(\"td\");\n for (ii = 0;
+ ii < headings.length; ++ii) {\n var cellContent = \" \";\n if
+ (typeof cols[ii] !== \"undefined\") {\n cellContent = showdown2.subParser(\"makeMarkdown.tableCell\")(cols[ii],
+ globals);\n }\n tableArray[r3].push(cellContent);\n
+ \ }\n }\n var cellSpacesCount = 3;\n for (i3
+ = 0; i3 < tableArray.length; ++i3) {\n for (ii = 0; ii < tableArray[i3].length;
+ ++ii) {\n var strLen = tableArray[i3][ii].length;\n if
+ (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n
+ \ }\n }\n for (i3 = 0; i3 < tableArray.length; ++i3)
+ {\n for (ii = 0; ii < tableArray[i3].length; ++ii) {\n if
+ (i3 === 1) {\n if (tableArray[i3][ii].slice(-1) === \":\") {\n
+ \ tableArray[i3][ii] = showdown2.helper.padEnd(tableArray[i3][ii].slice(-1),
+ cellSpacesCount - 1, \"-\") + \":\";\n } else {\n tableArray[i3][ii]
+ = showdown2.helper.padEnd(tableArray[i3][ii], cellSpacesCount, \"-\");\n }\n
+ \ } else {\n tableArray[i3][ii] = showdown2.helper.padEnd(tableArray[i3][ii],
+ cellSpacesCount);\n }\n }\n txt += \"| \" + tableArray[i3].join(\"
+ | \") + \" |\\n\";\n }\n return txt.trim();\n });\n showdown2.subParser(\"makeMarkdown.tableCell\",
+ function(node, globals) {\n var txt = \"\";\n if (!node.hasChildNodes())
+ {\n return \"\";\n }\n var children = node.childNodes,
+ childrenLength = children.length;\n for (var i3 = 0; i3 < childrenLength;
+ ++i3) {\n txt += showdown2.subParser(\"makeMarkdown.node\")(children[i3],
+ globals, true);\n }\n return txt.trim();\n });\n showdown2.subParser(\"makeMarkdown.txt\",
+ function(node) {\n var txt = node.nodeValue;\n txt = txt.replace(/
+ +/g, \" \");\n txt = txt.replace(/¨NBSP;/g, \" \");\n txt =
+ showdown2.helper.unescapeHTMLEntities(txt);\n txt = txt.replace(/([*_~|`])/g,
+ \"\\\\$1\");\n txt = txt.replace(/^(\\s*)>/g, \"\\\\$1>\");\n txt
+ = txt.replace(/^#/gm, \"\\\\#\");\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/,
+ \"$1\\\\$2$3\");\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, \"$1\\\\.\");\n
+ \ txt = txt.replace(/^( {0,3})([+-])/gm, \"$1\\\\$2\");\n txt
+ = txt.replace(/]([\\s]*)\\(/g, \"\\\\]$1\\\\(\");\n txt = txt.replace(/^
+ {0,3}\\[([\\S \\t]*?)]:/gm, \"\\\\[$1]:\");\n return txt;\n });\n
+ \ var root2 = this;\n if (module2.exports) {\n module2.exports
+ = showdown2;\n } else {\n root2.showdown = showdown2;\n }\n
+ \ }).call(showdown$1);\n })(showdown$2);\n return showdown$2.exports;\n}\nvar
+ showdownExports = requireShowdown();\nconst showdown = /* @__PURE__ */ getDefaultExportFromCjs(showdownExports);\nconst
+ EditorMixin = {\n name: \"editor-mixin\",\n initialState: {\n tinymce:
+ null\n },\n created() {\n importCSS(\"https://cdn.skypack.dev/tinymce/skins/ui/oxide/skin.css\");\n
+ \ importCSS(\n \"https://cdn.skypack.dev/tinymce/skins/content/default/content.css\"\n
+ \ );\n importCSS(\"https://cdn.skypack.dev/tinymce/skins/ui/oxide/content.css\");\n
+ \ this.tinymce = null;\n this.listAttributes.id = uniqID();\n this.listCallbacks.attach(\n
+ \ this.addCallback.bind(this),\n \"EditorMixin:addCallback\"\n );\n
+ \ },\n addCallback(value, listCallbacks) {\n if (this.tinymce == null)
+ {\n const converter = new showdown.Converter();\n const htmlValue
+ = converter.makeHtml(this.value);\n tinymce$1.init({\n selector:
+ `#${this.listAttributes.id}`,\n max_height: 500,\n min_height:
+ 120,\n resize: true,\n menubar: false,\n plugins: [\"lists\",
+ \"link\", \"autoresize\"],\n toolbar: \"styles | bold italic | blockquote
+ | bullist numlist | link | removeformat\",\n style_formats: [\n {
+ title: \"Normal\", format: \"p\" },\n {\n title: \"Headings\",\n
+ \ items: [\n { title: \"Heading 1\", format: \"h1\"
+ },\n { title: \"Heading 2\", format: \"h2\" },\n {
+ title: \"Heading 3\", format: \"h3\" },\n { title: \"Heading
+ 4\", format: \"h4\" },\n { title: \"Heading 5\", format: \"h5\"
+ },\n { title: \"Heading 6\", format: \"h6\" }\n ]\n
+ \ }\n ],\n //to avoid simple line break\n setup:
+ (editor) => {\n editor.on(\"keydown\", (event) => {\n if
+ (event.code === \"Enter\" && event.shiftKey) {\n event.preventDefault();\n
+ \ event.stopPropagation();\n return false;\n }\n
+ \ return true;\n });\n editor.on(\"init\", ()
+ => {\n editor.setContent(htmlValue);\n });\n }\n
+ \ });\n if (this.value) {\n const converter2 = new showdown.Converter();\n
+ \ const htmlValue2 = converter2.makeHtml(this.value);\n const
+ editor = tinymce$1.get(this.listAttributes.id);\n if (editor != null)
+ editor.setContent(htmlValue2);\n }\n }\n const nextProcessor =
+ listCallbacks.shift();\n if (nextProcessor) nextProcessor(value, listCallbacks);\n
+ \ }\n};\nconst decodeCache = {};\nfunction getDecodeCache(exclude) {\n let
+ cache = decodeCache[exclude];\n if (cache) {\n return cache;\n }\n cache
+ = decodeCache[exclude] = [];\n for (let i3 = 0; i3 < 128; i3++) {\n const
+ ch = String.fromCharCode(i3);\n cache.push(ch);\n }\n for (let i3 = 0;
+ i3 < exclude.length; i3++) {\n const ch = exclude.charCodeAt(i3);\n cache[ch]
+ = \"%\" + (\"0\" + ch.toString(16).toUpperCase()).slice(-2);\n }\n return
+ cache;\n}\nfunction decode$1(string2, exclude) {\n if (typeof exclude !==
+ \"string\") {\n exclude = decode$1.defaultChars;\n }\n const cache =
+ getDecodeCache(exclude);\n return string2.replace(/(%[a-f0-9]{2})+/gi, function(seq)
+ {\n let result = \"\";\n for (let i3 = 0, l2 = seq.length; i3 < l2;
+ i3 += 3) {\n const b1 = parseInt(seq.slice(i3 + 1, i3 + 3), 16);\n if
+ (b1 < 128) {\n result += cache[b1];\n continue;\n }\n if
+ ((b1 & 224) === 192 && i3 + 3 < l2) {\n const b2 = parseInt(seq.slice(i3
+ + 4, i3 + 6), 16);\n if ((b2 & 192) === 128) {\n const chr
+ = b1 << 6 & 1984 | b2 & 63;\n if (chr < 128) {\n result
+ += \"��\";\n } else {\n result += String.fromCharCode(chr);\n
+ \ }\n i3 += 3;\n continue;\n }\n }\n
+ \ if ((b1 & 240) === 224 && i3 + 6 < l2) {\n const b2 = parseInt(seq.slice(i3
+ + 4, i3 + 6), 16);\n const b3 = parseInt(seq.slice(i3 + 7, i3 + 9),
+ 16);\n if ((b2 & 192) === 128 && (b3 & 192) === 128) {\n const
+ chr = b1 << 12 & 61440 | b2 << 6 & 4032 | b3 & 63;\n if (chr < 2048
+ || chr >= 55296 && chr <= 57343) {\n result += \"���\";\n }
+ else {\n result += String.fromCharCode(chr);\n }\n i3
+ += 6;\n continue;\n }\n }\n if ((b1 & 248) === 240
+ && i3 + 9 < l2) {\n const b2 = parseInt(seq.slice(i3 + 4, i3 + 6),
+ 16);\n const b3 = parseInt(seq.slice(i3 + 7, i3 + 9), 16);\n const
+ b4 = parseInt(seq.slice(i3 + 10, i3 + 12), 16);\n if ((b2 & 192) ===
+ 128 && (b3 & 192) === 128 && (b4 & 192) === 128) {\n let chr = b1
+ << 18 & 1835008 | b2 << 12 & 258048 | b3 << 6 & 4032 | b4 & 63;\n if
+ (chr < 65536 || chr > 1114111) {\n result += \"����\";\n }
+ else {\n chr -= 65536;\n result += String.fromCharCode(55296
+ + (chr >> 10), 56320 + (chr & 1023));\n }\n i3 += 9;\n continue;\n
+ \ }\n }\n result += \"�\";\n }\n return result;\n });\n}\ndecode$1.defaultChars
+ = \";/?:@&=+$,#\";\ndecode$1.componentChars = \"\";\nconst encodeCache = {};\nfunction
+ getEncodeCache(exclude) {\n let cache = encodeCache[exclude];\n if (cache)
+ {\n return cache;\n }\n cache = encodeCache[exclude] = [];\n for (let
+ i3 = 0; i3 < 128; i3++) {\n const ch = String.fromCharCode(i3);\n if
+ (/^[0-9a-z]$/i.test(ch)) {\n cache.push(ch);\n } else {\n cache.push(\"%\"
+ + (\"0\" + i3.toString(16).toUpperCase()).slice(-2));\n }\n }\n for (let
+ i3 = 0; i3 < exclude.length; i3++) {\n cache[exclude.charCodeAt(i3)] =
+ exclude[i3];\n }\n return cache;\n}\nfunction encode$1(string2, exclude,
+ keepEscaped) {\n if (typeof exclude !== \"string\") {\n keepEscaped =
+ exclude;\n exclude = encode$1.defaultChars;\n }\n if (typeof keepEscaped
+ === \"undefined\") {\n keepEscaped = true;\n }\n const cache = getEncodeCache(exclude);\n
+ \ let result = \"\";\n for (let i3 = 0, l2 = string2.length; i3 < l2; i3++)
+ {\n const code2 = string2.charCodeAt(i3);\n if (keepEscaped && code2
+ === 37 && i3 + 2 < l2) {\n if (/^[0-9a-f]{2}$/i.test(string2.slice(i3
+ + 1, i3 + 3))) {\n result += string2.slice(i3, i3 + 3);\n i3
+ += 2;\n continue;\n }\n }\n if (code2 < 128) {\n result
+ += cache[code2];\n continue;\n }\n if (code2 >= 55296 && code2
+ <= 57343) {\n if (code2 >= 55296 && code2 <= 56319 && i3 + 1 < l2) {\n
+ \ const nextCode = string2.charCodeAt(i3 + 1);\n if (nextCode
+ >= 56320 && nextCode <= 57343) {\n result += encodeURIComponent(string2[i3]
+ + string2[i3 + 1]);\n i3++;\n continue;\n }\n }\n
+ \ result += \"%EF%BF%BD\";\n continue;\n }\n result += encodeURIComponent(string2[i3]);\n
+ \ }\n return result;\n}\nencode$1.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode$1.componentChars
+ = \"-_.!~*'()\";\nfunction format(url2) {\n let result = \"\";\n result
+ += url2.protocol || \"\";\n result += url2.slashes ? \"//\" : \"\";\n result
+ += url2.auth ? url2.auth + \"@\" : \"\";\n if (url2.hostname && url2.hostname.indexOf(\":\")
+ !== -1) {\n result += \"[\" + url2.hostname + \"]\";\n } else {\n result
+ += url2.hostname || \"\";\n }\n result += url2.port ? \":\" + url2.port
+ : \"\";\n result += url2.pathname || \"\";\n result += url2.search || \"\";\n
+ \ result += url2.hash || \"\";\n return result;\n}\nfunction Url() {\n this.protocol
+ = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n
+ \ this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname
+ = null;\n}\nconst protocolPattern = /^([a-z0-9.+-]+:)/i;\nconst portPattern
+ = /:[0-9]*$/;\nconst simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/;\nconst
+ delims = [\"<\", \">\", '\"', \"`\", \" \", \"\\r\", \"\\n\", \"\t\"];\nconst
+ unwise = [\"{\", \"}\", \"|\", \"\\\\\", \"^\", \"`\"].concat(delims);\nconst
+ autoEscape = [\"'\"].concat(unwise);\nconst nonHostChars = [\"%\", \"/\",
+ \"?\", \";\", \"#\"].concat(autoEscape);\nconst hostEndingChars = [\"/\",
+ \"?\", \"#\"];\nconst hostnameMaxLen = 255;\nconst hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/;\nconst
+ hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/;\nconst hostlessProtocol
+ = {\n javascript: true,\n \"javascript:\": true\n};\nconst slashedProtocol
+ = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file:
+ true,\n \"http:\": true,\n \"https:\": true,\n \"ftp:\": true,\n \"gopher:\":
+ true,\n \"file:\": true\n};\nfunction urlParse(url2, slashesDenoteHost) {\n
+ \ if (url2 && url2 instanceof Url) return url2;\n const u2 = new Url();\n
+ \ u2.parse(url2, slashesDenoteHost);\n return u2;\n}\nUrl.prototype.parse
+ = function(url2, slashesDenoteHost) {\n let lowerProto, hec, slashes;\n let
+ rest = url2;\n rest = rest.trim();\n if (!slashesDenoteHost && url2.split(\"#\").length
+ === 1) {\n const simplePath = simplePathPattern.exec(rest);\n if (simplePath)
+ {\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search
+ = simplePath[2];\n }\n return this;\n }\n }\n let proto = protocolPattern.exec(rest);\n
+ \ if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n
+ \ this.protocol = proto;\n rest = rest.substr(proto.length);\n }\n if
+ (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n
+ \ slashes = rest.substr(0, 2) === \"//\";\n if (slashes && !(proto &&
+ hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes
+ = true;\n }\n }\n if (!hostlessProtocol[proto] && (slashes || proto &&
+ !slashedProtocol[proto])) {\n let hostEnd = -1;\n for (let i3 = 0; i3
+ < hostEndingChars.length; i3++) {\n hec = rest.indexOf(hostEndingChars[i3]);\n
+ \ if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd
+ = hec;\n }\n }\n let auth, atSign;\n if (hostEnd === -1) {\n
+ \ atSign = rest.lastIndexOf(\"@\");\n } else {\n atSign = rest.lastIndexOf(\"@\",
+ hostEnd);\n }\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n
+ \ rest = rest.slice(atSign + 1);\n this.auth = auth;\n }\n hostEnd
+ = -1;\n for (let i3 = 0; i3 < nonHostChars.length; i3++) {\n hec =
+ rest.indexOf(nonHostChars[i3]);\n if (hec !== -1 && (hostEnd === -1 ||
+ hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n if (hostEnd
+ === -1) {\n hostEnd = rest.length;\n }\n if (rest[hostEnd - 1]
+ === \":\") {\n hostEnd--;\n }\n const host = rest.slice(0, hostEnd);\n
+ \ rest = rest.slice(hostEnd);\n this.parseHost(host);\n this.hostname
+ = this.hostname || \"\";\n const ipv6Hostname = this.hostname[0] === \"[\"
+ && this.hostname[this.hostname.length - 1] === \"]\";\n if (!ipv6Hostname)
+ {\n const hostparts = this.hostname.split(/\\./);\n for (let i3
+ = 0, l2 = hostparts.length; i3 < l2; i3++) {\n const part = hostparts[i3];\n
+ \ if (!part) {\n continue;\n }\n if (!part.match(hostnamePartPattern))
+ {\n let newpart = \"\";\n for (let j2 = 0, k3 = part.length;
+ j2 < k3; j2++) {\n if (part.charCodeAt(j2) > 127) {\n newpart
+ += \"x\";\n } else {\n newpart += part[j2];\n }\n
+ \ }\n if (!newpart.match(hostnamePartPattern)) {\n const
+ validParts = hostparts.slice(0, i3);\n const notHost = hostparts.slice(i3
+ + 1);\n const bit = part.match(hostnamePartStart);\n if
+ (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n
+ \ }\n if (notHost.length) {\n rest = notHost.join(\".\")
+ + rest;\n }\n this.hostname = validParts.join(\".\");\n
+ \ break;\n }\n }\n }\n }\n if (this.hostname.length
+ > hostnameMaxLen) {\n this.hostname = \"\";\n }\n if (ipv6Hostname)
+ {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n
+ \ }\n }\n const hash = rest.indexOf(\"#\");\n if (hash !== -1) {\n this.hash
+ = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n const qm = rest.indexOf(\"?\");\n
+ \ if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0,
+ qm);\n }\n if (rest) {\n this.pathname = rest;\n }\n if (slashedProtocol[lowerProto]
+ && this.hostname && !this.pathname) {\n this.pathname = \"\";\n }\n return
+ this;\n};\nUrl.prototype.parseHost = function(host) {\n let port = portPattern.exec(host);\n
+ \ if (port) {\n port = port[0];\n if (port !== \":\") {\n this.port
+ = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n
+ \ }\n if (host) {\n this.hostname = host;\n }\n};\nconst mdurl = /* @__PURE__
+ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n
+ \ decode: decode$1,\n encode: encode$1,\n format,\n parse: urlParse\n},
+ Symbol.toStringTag, { value: \"Module\" }));\nconst Any = /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nconst
+ Cc = /[\\0-\\x1F\\x7F-\\x9F]/;\nconst regex$1 = /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC3F]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/;\nconst
+ P = /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDEAD\\uDF55-\\uDF59\\uDF86-\\uDF89]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5A\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDEB9\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDD44-\\uDD46\\uDDE2\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2\\uDF00-\\uDF09]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8\\uDF43-\\uDF4F\\uDFFF]|\\uD809[\\uDC70-\\uDC74]|\\uD80B[\\uDFF1\\uDFF2]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A\\uDFE2]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/;\nconst
+ regex = /[\\$\\+<->\\^`\\|~\\xA2-\\xA6\\xA8\\xA9\\xAC\\xAE-\\xB1\\xB4\\xB8\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u07FE\\u07FF\\u0888\\u09F2\\u09F3\\u09FA\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20C0\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u309B\\u309C\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A\\uAB6B\\uFB29\\uFBB2-\\uFBC2\\uFD40-\\uFD4F\\uFDCF\\uFDFC-\\uFDFF\\uFE62\\uFE64-\\uFE66\\uFE69\\uFF04\\uFF0B\\uFF1C-\\uFF1E\\uFF3E\\uFF40\\uFF5C\\uFF5E\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFFC\\uFFFD]|\\uD800[\\uDD37-\\uDD3F\\uDD79-\\uDD89\\uDD8C-\\uDD8E\\uDD90-\\uDD9C\\uDDA0\\uDDD0-\\uDDFC]|\\uD802[\\uDC77\\uDC78\\uDEC8]|\\uD805\\uDF3F|\\uD807[\\uDFD5-\\uDFF1]|\\uD81A[\\uDF3C-\\uDF3F\\uDF45]|\\uD82F\\uDC9C|\\uD833[\\uDF50-\\uDFC3]|\\uD834[\\uDC00-\\uDCF5\\uDD00-\\uDD26\\uDD29-\\uDD64\\uDD6A-\\uDD6C\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDDEA\\uDE00-\\uDE41\\uDE45\\uDF00-\\uDF56]|\\uD835[\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85\\uDE86]|\\uD838[\\uDD4F\\uDEFF]|\\uD83B[\\uDCAC\\uDCB0\\uDD2E\\uDEF0\\uDEF1]|\\uD83C[\\uDC00-\\uDC2B\\uDC30-\\uDC93\\uDCA0-\\uDCAE\\uDCB1-\\uDCBF\\uDCC1-\\uDCCF\\uDCD1-\\uDCF5\\uDD0D-\\uDDAD\\uDDE6-\\uDE02\\uDE10-\\uDE3B\\uDE40-\\uDE48\\uDE50\\uDE51\\uDE60-\\uDE65\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDED7\\uDEDC-\\uDEEC\\uDEF0-\\uDEFC\\uDF00-\\uDF76\\uDF7B-\\uDFD9\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDC00-\\uDC0B\\uDC10-\\uDC47\\uDC50-\\uDC59\\uDC60-\\uDC87\\uDC90-\\uDCAD\\uDCB0\\uDCB1\\uDD00-\\uDE53\\uDE60-\\uDE6D\\uDE70-\\uDE7C\\uDE80-\\uDE88\\uDE90-\\uDEBD\\uDEBF-\\uDEC5\\uDECE-\\uDEDB\\uDEE0-\\uDEE8\\uDEF0-\\uDEF8\\uDF00-\\uDF92\\uDF94-\\uDFCA]/;\nconst
+ Z = /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\nconst
+ ucmicro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n
+ \ __proto__: null,\n Any,\n Cc,\n Cf: regex$1,\n P,\n S: regex,\n Z\n},
+ Symbol.toStringTag, { value: \"Module\" }));\nconst htmlDecodeTree = new Uint16Array(\n
+ \ // prettier-ignore\n 'ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\\0\\0\\0\\0\\0\\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\\\bfms\x7F\x84\x8B\x90\x95\x98¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\U0001D504rave耻À䃀pha;䎑acr;䄀d;橓Āgp\x9D¡on;䄄f;쀀\U0001D538plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\U0001D49Cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\U0001D505pf;쀀\U0001D539eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\U0001D49EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\U0001D507Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\\0\\0\\0͔͂\\0Ѕf;쀀\U0001D53Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\\0\\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\\0\\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\\0ц\\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\U0001D49Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\U0001D508rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\\0\\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\U0001D53Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀\U0001D509lledɓ֗\\0\\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\\0ֿ\\0\\0ׄf;쀀\U0001D53DAll;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\U0001D50A;拙pf;쀀\U0001D53Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\U0001D4A2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\U0001D540a;䎙cr;愐ilde;䄨ǫޚ\\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀\U0001D50Dpf;쀀\U0001D541ǣ߇\\0ߌr;쀀\U0001D4A5rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀\U0001D50Epf;쀀\U0001D542cr;쀀\U0001D4A6րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\\0ࣃbleBracket;柦nǔࣈ\\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\U0001D50FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\U0001D543erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀\U0001D510nusPlus;戓pf;쀀\U0001D544cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀\U0001D511ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\U0001D4A9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀\U0001D512rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀\U0001D546enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\U0001D4AAash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀\U0001D513i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀\U0001D4AB;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀\U0001D514pf;愚cr;쀀\U0001D4ACBEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\\0စbleBracket;柧nǔည\\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\U0001D516ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀\U0001D54Aɲᅭ\\0\\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\U0001D4AEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\U0001D517ĀeiቻDzኀ\\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\U0001D54BipleDot;惛Āctዖዛr;쀀\U0001D4AFrok;䅦ૡዷጎጚጦ\\0ጬጱ\\0\\0\\0\\0\\0ጸጽ፷ᎅ\\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\U0001D518rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀\U0001D54CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\U0001D4B0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\U0001D519pf;쀀\U0001D54Dcr;쀀\U0001D4B1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\U0001D51Apf;쀀\U0001D54Ecr;쀀\U0001D4B2Ȁfiosᓋᓐᓒᓘr;쀀\U0001D51B;䎞pf;쀀\U0001D54Fcr;쀀\U0001D4B3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\U0001D51Cpf;쀀\U0001D550cr;쀀\U0001D4B4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀\U0001D4B5ᖃᖊᖐ\\0ᖰᖶᖿ\\0\\0\\0\\0ᗆᗛᗫᙟ᙭\\0ᚕ᚛ᚲᚹ\\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\U0001D51Erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\\0\\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\U0001D552;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\U0001D4B6;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀\U0001D51Fgcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\\0\\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\\0ᠳƲᠯ\\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\U0001D553Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\U0001D4B7mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\\0᧨ᨑᨕᨲ\\0ᨷᩐ\\0\\0᪴\\0\\0᫁\\0\\0ᬡᬮ᭒\\0᯽\\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\U0001D520ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\\0\\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\\0\\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\U0001D554oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\U0001D4B8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\\0\\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\\0\\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\U0001D521arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\\0\\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\U0001D555ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\\0\\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\U0001D4B9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\U0001D522ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\U0001D556ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\\0\\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\\0ᾞ\\0ᾡᾧ\\0\\0ῆῌ\\0ΐ\\0ῦῪ \\0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\\0\\0᾽g;耀ffig;耀ffl;쀀\U0001D523lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\\0ῳf;쀀\U0001D557ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\\0⁐β•‥‧\\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\\0‶;慔;慖ʴ‾⁁\\0\\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\U0001D4BBࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\U0001D524Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\U0001D558Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\U0001D525sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\U0001D559bar;怕ƀclt≯≴≸r;쀀\U0001D4BDasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\\0⊪\\0⊸⋅⋎\\0⋕⋳\\0\\0⋸⌢⍧⍢⍿\\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\U0001D526rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\U0001D55Aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\U0001D4BEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\U0001D527ath;䈷pf;쀀\U0001D55Bǣ⏬\\0⏱r;쀀\U0001D4BFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\U0001D528reen;䄸cy;䑅cy;䑜pf;쀀\U0001D55Ccr;쀀\U0001D4C0ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\\0⒪\\0⒱\\0\\0\\0\\0\\0⒵Ⓔ\\0ⓆⓈⓍ\\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\U0001D529Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\U0001D55Dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\U0001D4C1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\U0001D52Ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\U0001D55EĀct⣸⣽r;쀀\U0001D4C2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀\U0001D52BȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\U0001D55F膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀\U0001D4C3ortɭ⬅\\0\\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0ⴭ\\0ⴸⵈⵠⵥⶄᬇ\\0\\0ⶍⶫ\\0ⷈⷎ\\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀\U0001D52Cͯ\\0\\0\\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\U0001D560ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\\0\\0⺀⺝\\0⺢⺹\\0\\0⻋ຜ\\0⼓\\0\\0⼫⾼\\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\\0\\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\U0001D52Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\U0001D561nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀\U0001D4C5;䏈ncsp;怈̀fiopsu⋢⿱r;쀀\U0001D52Epf;쀀\U0001D562rime;恗cr;쀀\U0001D4C6ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\U0001D52FĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\U0001D563us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\U0001D4C7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\\0㍺㎤\\0\\0㏬㏰\\0㐨㑈㑚㒭㒱㓊㓱\\0㘖\\0\\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\U0001D530Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\\0\\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\U0001D564aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\U0001D4C8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\\0㙾㛂\\0\\0\\0\\0\\0㛛㜃\\0㜉㝬\\0\\0\\0㞇ɲ㙖\\0\\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\U0001D531Ȁeiko㚆㚝㚵㚼Dz㚋\\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\U0001D565rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\U0001D4C9;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\U0001D532rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\\0\\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\U0001D566̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\\0\\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\U0001D4CAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\U0001D533tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\U0001D567roðtré㦴Ācu㨆㨋r;쀀\U0001D4CBĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\U0001D534pf;쀀\U0001D568Ā;eᑹ㩦atèᑹcr;쀀\U0001D4CCૣណ㪇\\0㪋\\0㪐㪛\\0\\0㪝㪨㪫㪯\\0\\0㫃㫎\\0㫘ៜtré៑r;쀀\U0001D535ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\U0001D569imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\U0001D4CDĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\U0001D536cy;䑗pf;쀀\U0001D56Acr;쀀\U0001D4CEĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\U0001D537cy;䐶grarr;懝pf;쀀\U0001D56Bcr;쀀\U0001D4CFĀjn㮅㮇;怍j;怌'.split(\"\").map((c2)
+ => c2.charCodeAt(0))\n);\nconst xmlDecodeTree = new Uint16Array(\n // prettier-ignore\n
+ \ \"Ȁaglq\t\x15\x18\\x1Bɭ\x0F\\0\\0\x12p;䀦os;䀧t;䀾t;䀼uot;䀢\".split(\"\").map((c2)
+ => c2.charCodeAt(0))\n);\nvar _a;\nconst decodeMap = /* @__PURE__ */ new Map([\n
+ \ [0, 65533],\n // C1 Unicode control character reference replacements\n
+ \ [128, 8364],\n [130, 8218],\n [131, 402],\n [132, 8222],\n [133, 8230],\n
+ \ [134, 8224],\n [135, 8225],\n [136, 710],\n [137, 8240],\n [138, 352],\n
+ \ [139, 8249],\n [140, 338],\n [142, 381],\n [145, 8216],\n [146, 8217],\n
+ \ [147, 8220],\n [148, 8221],\n [149, 8226],\n [150, 8211],\n [151, 8212],\n
+ \ [152, 732],\n [153, 8482],\n [154, 353],\n [155, 8250],\n [156, 339],\n
+ \ [158, 382],\n [159, 376]\n]);\nconst fromCodePoint$1 = (\n // eslint-disable-next-line
+ @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n
+ \ (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint)
+ {\n let output = \"\";\n if (codePoint > 65535) {\n codePoint -=
+ 65536;\n output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);\n
+ \ codePoint = 56320 | codePoint & 1023;\n }\n output += String.fromCharCode(codePoint);\n
+ \ return output;\n }\n);\nfunction replaceCodePoint(codePoint) {\n var
+ _a3;\n if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111)
+ {\n return 65533;\n }\n return (_a3 = decodeMap.get(codePoint)) !== null
+ && _a3 !== void 0 ? _a3 : codePoint;\n}\nvar CharCodes;\n(function(CharCodes2)
+ {\n CharCodes2[CharCodes2[\"NUM\"] = 35] = \"NUM\";\n CharCodes2[CharCodes2[\"SEMI\"]
+ = 59] = \"SEMI\";\n CharCodes2[CharCodes2[\"EQUALS\"] = 61] = \"EQUALS\";\n
+ \ CharCodes2[CharCodes2[\"ZERO\"] = 48] = \"ZERO\";\n CharCodes2[CharCodes2[\"NINE\"]
+ = 57] = \"NINE\";\n CharCodes2[CharCodes2[\"LOWER_A\"] = 97] = \"LOWER_A\";\n
+ \ CharCodes2[CharCodes2[\"LOWER_F\"] = 102] = \"LOWER_F\";\n CharCodes2[CharCodes2[\"LOWER_X\"]
+ = 120] = \"LOWER_X\";\n CharCodes2[CharCodes2[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n
+ \ CharCodes2[CharCodes2[\"UPPER_A\"] = 65] = \"UPPER_A\";\n CharCodes2[CharCodes2[\"UPPER_F\"]
+ = 70] = \"UPPER_F\";\n CharCodes2[CharCodes2[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes
+ || (CharCodes = {}));\nconst TO_LOWER_BIT = 32;\nvar BinTrieFlags;\n(function(BinTrieFlags2)
+ {\n BinTrieFlags2[BinTrieFlags2[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n
+ \ BinTrieFlags2[BinTrieFlags2[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n
+ \ BinTrieFlags2[BinTrieFlags2[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags
+ || (BinTrieFlags = {}));\nfunction isNumber(code2) {\n return code2 >= CharCodes.ZERO
+ && code2 <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code2) {\n
+ \ return code2 >= CharCodes.UPPER_A && code2 <= CharCodes.UPPER_F || code2
+ >= CharCodes.LOWER_A && code2 <= CharCodes.LOWER_F;\n}\nfunction isAsciiAlphaNumeric(code2)
+ {\n return code2 >= CharCodes.UPPER_A && code2 <= CharCodes.UPPER_Z || code2
+ >= CharCodes.LOWER_A && code2 <= CharCodes.LOWER_Z || isNumber(code2);\n}\nfunction
+ isEntityInAttributeInvalidEnd(code2) {\n return code2 === CharCodes.EQUALS
+ || isAsciiAlphaNumeric(code2);\n}\nvar EntityDecoderState;\n(function(EntityDecoderState2)
+ {\n EntityDecoderState2[EntityDecoderState2[\"EntityStart\"] = 0] = \"EntityStart\";\n
+ \ EntityDecoderState2[EntityDecoderState2[\"NumericStart\"] = 1] = \"NumericStart\";\n
+ \ EntityDecoderState2[EntityDecoderState2[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n
+ \ EntityDecoderState2[EntityDecoderState2[\"NumericHex\"] = 3] = \"NumericHex\";\n
+ \ EntityDecoderState2[EntityDecoderState2[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState
+ || (EntityDecoderState = {}));\nvar DecodingMode;\n(function(DecodingMode2)
+ {\n DecodingMode2[DecodingMode2[\"Legacy\"] = 0] = \"Legacy\";\n DecodingMode2[DecodingMode2[\"Strict\"]
+ = 1] = \"Strict\";\n DecodingMode2[DecodingMode2[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode
+ || (DecodingMode = {}));\nclass EntityDecoder {\n constructor(decodeTree,
+ emitCodePoint, errors2) {\n this.decodeTree = decodeTree;\n this.emitCodePoint
+ = emitCodePoint;\n this.errors = errors2;\n this.state = EntityDecoderState.EntityStart;\n
+ \ this.consumed = 1;\n this.result = 0;\n this.treeIndex = 0;\n this.excess
+ = 1;\n this.decodeMode = DecodingMode.Strict;\n }\n /** Resets the instance
+ to make it reusable. */\n startEntity(decodeMode) {\n this.decodeMode
+ = decodeMode;\n this.state = EntityDecoderState.EntityStart;\n this.result
+ = 0;\n this.treeIndex = 0;\n this.excess = 1;\n this.consumed = 1;\n
+ \ }\n /**\n * Write an entity to the decoder. This can be called multiple
+ times with partial entities.\n * If the entity is incomplete, the decoder
+ will return -1.\n *\n * Mirrors the implementation of `getDecoder`, but
+ with the ability to stop decoding if the\n * entity is incomplete, and resume
+ when the next string is written.\n *\n * @param string The string containing
+ the entity (or a continuation of the entity).\n * @param offset The offset
+ at which the entity begins. Should be 0 if this is not the first call.\n *
+ @returns The number of characters that were consumed, or -1 if the entity
+ is incomplete.\n */\n write(str, offset) {\n switch (this.state) {\n
+ \ case EntityDecoderState.EntityStart: {\n if (str.charCodeAt(offset)
+ === CharCodes.NUM) {\n this.state = EntityDecoderState.NumericStart;\n
+ \ this.consumed += 1;\n return this.stateNumericStart(str,
+ offset + 1);\n }\n this.state = EntityDecoderState.NamedEntity;\n
+ \ return this.stateNamedEntity(str, offset);\n }\n case EntityDecoderState.NumericStart:
+ {\n return this.stateNumericStart(str, offset);\n }\n case
+ EntityDecoderState.NumericDecimal: {\n return this.stateNumericDecimal(str,
+ offset);\n }\n case EntityDecoderState.NumericHex: {\n return
+ this.stateNumericHex(str, offset);\n }\n case EntityDecoderState.NamedEntity:
+ {\n return this.stateNamedEntity(str, offset);\n }\n }\n }\n
+ \ /**\n * Switches between the numeric decimal and hexadecimal states.\n
+ \ *\n * Equivalent to the `Numeric character reference state` in the HTML
+ spec.\n *\n * @param str The string containing the entity (or a continuation
+ of the entity).\n * @param offset The current offset.\n * @returns The
+ number of characters that were consumed, or -1 if the entity is incomplete.\n
+ \ */\n stateNumericStart(str, offset) {\n if (offset >= str.length) {\n
+ \ return -1;\n }\n if ((str.charCodeAt(offset) | TO_LOWER_BIT) ===
+ CharCodes.LOWER_X) {\n this.state = EntityDecoderState.NumericHex;\n
+ \ this.consumed += 1;\n return this.stateNumericHex(str, offset +
+ 1);\n }\n this.state = EntityDecoderState.NumericDecimal;\n return
+ this.stateNumericDecimal(str, offset);\n }\n addToNumericResult(str, start,
+ end, base2) {\n if (start !== end) {\n const digitCount = end - start;\n
+ \ this.result = this.result * Math.pow(base2, digitCount) + parseInt(str.substr(start,
+ digitCount), base2);\n this.consumed += digitCount;\n }\n }\n /**\n
+ \ * Parses a hexadecimal numeric entity.\n *\n * Equivalent to the `Hexademical
+ character reference state` in the HTML spec.\n *\n * @param str The string
+ containing the entity (or a continuation of the entity).\n * @param offset
+ The current offset.\n * @returns The number of characters that were consumed,
+ or -1 if the entity is incomplete.\n */\n stateNumericHex(str, offset)
+ {\n const startIdx = offset;\n while (offset < str.length) {\n const
+ char = str.charCodeAt(offset);\n if (isNumber(char) || isHexadecimalCharacter(char))
+ {\n offset += 1;\n } else {\n this.addToNumericResult(str,
+ startIdx, offset, 16);\n return this.emitNumericEntity(char, 3);\n
+ \ }\n }\n this.addToNumericResult(str, startIdx, offset, 16);\n
+ \ return -1;\n }\n /**\n * Parses a decimal numeric entity.\n *\n
+ \ * Equivalent to the `Decimal character reference state` in the HTML spec.\n
+ \ *\n * @param str The string containing the entity (or a continuation
+ of the entity).\n * @param offset The current offset.\n * @returns The
+ number of characters that were consumed, or -1 if the entity is incomplete.\n
+ \ */\n stateNumericDecimal(str, offset) {\n const startIdx = offset;\n
+ \ while (offset < str.length) {\n const char = str.charCodeAt(offset);\n
+ \ if (isNumber(char)) {\n offset += 1;\n } else {\n this.addToNumericResult(str,
+ startIdx, offset, 10);\n return this.emitNumericEntity(char, 2);\n
+ \ }\n }\n this.addToNumericResult(str, startIdx, offset, 10);\n
+ \ return -1;\n }\n /**\n * Validate and emit a numeric entity.\n *\n
+ \ * Implements the logic from the `Hexademical character reference start\n
+ \ * state` and `Numeric character reference end state` in the HTML spec.\n
+ \ *\n * @param lastCp The last code point of the entity. Used to see if
+ the\n * entity was terminated with a semicolon.\n * @param
+ expectedLength The minimum number of characters that should be\n * consumed.
+ Used to validate that at least one digit\n * was consumed.\n
+ \ * @returns The number of characters that were consumed.\n */\n emitNumericEntity(lastCp,
+ expectedLength) {\n var _a3;\n if (this.consumed <= expectedLength)
+ {\n (_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);\n
+ \ return 0;\n }\n if (lastCp === CharCodes.SEMI) {\n this.consumed
+ += 1;\n } else if (this.decodeMode === DecodingMode.Strict) {\n return
+ 0;\n }\n this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n
+ \ if (this.errors) {\n if (lastCp !== CharCodes.SEMI) {\n this.errors.missingSemicolonAfterCharacterReference();\n
+ \ }\n this.errors.validateNumericCharacterReference(this.result);\n
+ \ }\n return this.consumed;\n }\n /**\n * Parses a named entity.\n
+ \ *\n * Equivalent to the `Named character reference state` in the HTML
+ spec.\n *\n * @param str The string containing the entity (or a continuation
+ of the entity).\n * @param offset The current offset.\n * @returns The
+ number of characters that were consumed, or -1 if the entity is incomplete.\n
+ \ */\n stateNamedEntity(str, offset) {\n const { decodeTree } = this;\n
+ \ let current = decodeTree[this.treeIndex];\n let valueLength = (current
+ & BinTrieFlags.VALUE_LENGTH) >> 14;\n for (; offset < str.length; offset++,
+ this.excess++) {\n const char = str.charCodeAt(offset);\n this.treeIndex
+ = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength),
+ char);\n if (this.treeIndex < 0) {\n return this.result === 0
+ || // If we are parsing an attribute\n this.decodeMode === DecodingMode.Attribute
+ && // We shouldn't have consumed any characters after the entity,\n (valueLength
+ === 0 || // And there should be no invalid characters.\n isEntityInAttributeInvalidEnd(char))
+ ? 0 : this.emitNotTerminatedNamedEntity();\n }\n current = decodeTree[this.treeIndex];\n
+ \ valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n if
+ (valueLength !== 0) {\n if (char === CharCodes.SEMI) {\n return
+ this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n
+ \ }\n if (this.decodeMode !== DecodingMode.Strict) {\n this.result
+ = this.treeIndex;\n this.consumed += this.excess;\n this.excess
+ = 0;\n }\n }\n }\n return -1;\n }\n /**\n * Emit a named
+ entity that was not terminated with a semicolon.\n *\n * @returns The
+ number of characters consumed.\n */\n emitNotTerminatedNamedEntity() {\n
+ \ var _a3;\n const { result, decodeTree } = this;\n const valueLength
+ = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n this.emitNamedEntityData(result,
+ valueLength, this.consumed);\n (_a3 = this.errors) === null || _a3 ===
+ void 0 ? void 0 : _a3.missingSemicolonAfterCharacterReference();\n return
+ this.consumed;\n }\n /**\n * Emit a named entity.\n *\n * @param result
+ The index of the entity in the decode tree.\n * @param valueLength The number
+ of bytes in the entity.\n * @param consumed The number of characters consumed.\n
+ \ *\n * @returns The number of characters consumed.\n */\n emitNamedEntityData(result,
+ valueLength, consumed) {\n const { decodeTree } = this;\n this.emitCodePoint(valueLength
+ === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result
+ + 1], consumed);\n if (valueLength === 3) {\n this.emitCodePoint(decodeTree[result
+ + 2], consumed);\n }\n return consumed;\n }\n /**\n * Signal to
+ the parser that the end of the input was reached.\n *\n * Remaining data
+ will be emitted and relevant errors will be produced.\n *\n * @returns
+ The number of characters consumed.\n */\n end() {\n var _a3;\n switch
+ (this.state) {\n case EntityDecoderState.NamedEntity: {\n return
+ this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result
+ === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;\n }\n
+ \ // Otherwise, emit a numeric entity if we have one.\n case EntityDecoderState.NumericDecimal:
+ {\n return this.emitNumericEntity(0, 2);\n }\n case EntityDecoderState.NumericHex:
+ {\n return this.emitNumericEntity(0, 3);\n }\n case EntityDecoderState.NumericStart:
+ {\n (_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);\n
+ \ return 0;\n }\n case EntityDecoderState.EntityStart: {\n
+ \ return 0;\n }\n }\n }\n}\nfunction getDecoder(decodeTree)
+ {\n let ret = \"\";\n const decoder = new EntityDecoder(decodeTree, (str)
+ => ret += fromCodePoint$1(str));\n return function decodeWithTrie(str, decodeMode)
+ {\n let lastIndex = 0;\n let offset = 0;\n while ((offset = str.indexOf(\"&\",
+ offset)) >= 0) {\n ret += str.slice(lastIndex, offset);\n decoder.startEntity(decodeMode);\n
+ \ const len = decoder.write(\n str,\n // Skip the \"&\"\n
+ \ offset + 1\n );\n if (len < 0) {\n lastIndex = offset
+ + decoder.end();\n break;\n }\n lastIndex = offset + len;\n
+ \ offset = len === 0 ? lastIndex + 1 : lastIndex;\n }\n const result
+ = ret + str.slice(lastIndex);\n ret = \"\";\n return result;\n };\n}\nfunction
+ determineBranch(decodeTree, current, nodeIdx, char) {\n const branchCount
+ = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n const jumpOffset = current
+ & BinTrieFlags.JUMP_TABLE;\n if (branchCount === 0) {\n return jumpOffset
+ !== 0 && char === jumpOffset ? nodeIdx : -1;\n }\n if (jumpOffset) {\n const
+ value = char - jumpOffset;\n return value < 0 || value >= branchCount ?
+ -1 : decodeTree[nodeIdx + value] - 1;\n }\n let lo = nodeIdx;\n let hi
+ = lo + branchCount - 1;\n while (lo <= hi) {\n const mid = lo + hi >>>
+ 1;\n const midVal = decodeTree[mid];\n if (midVal < char) {\n lo
+ = mid + 1;\n } else if (midVal > char) {\n hi = mid - 1;\n } else
+ {\n return decodeTree[mid + branchCount];\n }\n }\n return -1;\n}\nconst
+ htmlDecoder = getDecoder(htmlDecodeTree);\ngetDecoder(xmlDecodeTree);\nfunction
+ decodeHTML(str, mode = DecodingMode.Legacy) {\n return htmlDecoder(str, mode);\n}\nfunction
+ _class$1(obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction
+ isString$1(obj) {\n return _class$1(obj) === \"[object String]\";\n}\nconst
+ _hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction has(object2,
+ key) {\n return _hasOwnProperty.call(object2, key);\n}\nfunction assign$1(obj)
+ {\n const sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function(source)
+ {\n if (!source) {\n return;\n }\n if (typeof source !== \"object\")
+ {\n throw new TypeError(source + \"must be object\");\n }\n Object.keys(source).forEach(function(key)
+ {\n obj[key] = source[key];\n });\n });\n return obj;\n}\nfunction
+ arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos),
+ newElements, src.slice(pos + 1));\n}\nfunction isValidEntityCode(c2) {\n if
+ (c2 >= 55296 && c2 <= 57343) {\n return false;\n }\n if (c2 >= 64976
+ && c2 <= 65007) {\n return false;\n }\n if ((c2 & 65535) === 65535 ||
+ (c2 & 65535) === 65534) {\n return false;\n }\n if (c2 >= 0 && c2 <=
+ 8) {\n return false;\n }\n if (c2 === 11) {\n return false;\n }\n
+ \ if (c2 >= 14 && c2 <= 31) {\n return false;\n }\n if (c2 >= 127 &&
+ c2 <= 159) {\n return false;\n }\n if (c2 > 1114111) {\n return false;\n
+ \ }\n return true;\n}\nfunction fromCodePoint(c2) {\n if (c2 > 65535) {\n
+ \ c2 -= 65536;\n const surrogate1 = 55296 + (c2 >> 10);\n const surrogate2
+ = 56320 + (c2 & 1023);\n return String.fromCharCode(surrogate1, surrogate2);\n
+ \ }\n return String.fromCharCode(c2);\n}\nconst UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~])/g;\nconst
+ ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nconst UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source
+ + \"|\" + ENTITY_RE.source, \"gi\");\nconst DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;\nfunction
+ replaceEntityPattern(match3, name) {\n if (name.charCodeAt(0) === 35 && DIGITAL_ENTITY_TEST_RE.test(name))
+ {\n const code2 = name[1].toLowerCase() === \"x\" ? parseInt(name.slice(2),
+ 16) : parseInt(name.slice(1), 10);\n if (isValidEntityCode(code2)) {\n
+ \ return fromCodePoint(code2);\n }\n return match3;\n }\n const
+ decoded = decodeHTML(match3);\n if (decoded !== match3) {\n return decoded;\n
+ \ }\n return match3;\n}\nfunction unescapeMd(str) {\n if (str.indexOf(\"\\\\\")
+ < 0) {\n return str;\n }\n return str.replace(UNESCAPE_MD_RE, \"$1\");\n}\nfunction
+ unescapeAll(str) {\n if (str.indexOf(\"\\\\\") < 0 && str.indexOf(\"&\")
+ < 0) {\n return str;\n }\n return str.replace(UNESCAPE_ALL_RE, function(match3,
+ escaped, entity2) {\n if (escaped) {\n return escaped;\n }\n return
+ replaceEntityPattern(match3, entity2);\n });\n}\nconst HTML_ESCAPE_TEST_RE
+ = /[&<>\"]/;\nconst HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nconst HTML_REPLACEMENTS
+ = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n '\"':
+ \""\"\n};\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\nfunction
+ escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE,
+ replaceUnsafeChar);\n }\n return str;\n}\nconst REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\nfunction
+ escapeRE$1(str) {\n return str.replace(REGEXP_ESCAPE_RE, \"\\\\$&\");\n}\nfunction
+ isSpace(code2) {\n switch (code2) {\n case 9:\n case 32:\n return
+ true;\n }\n return false;\n}\nfunction isWhiteSpace(code2) {\n if (code2
+ >= 8192 && code2 <= 8202) {\n return true;\n }\n switch (code2) {\n case
+ 9:\n // \\t\n case 10:\n // \\n\n case 11:\n // \\v\n case
+ 12:\n // \\f\n case 13:\n // \\r\n case 32:\n case 160:\n case
+ 5760:\n case 8239:\n case 8287:\n case 12288:\n return true;\n
+ \ }\n return false;\n}\nfunction isPunctChar(ch) {\n return P.test(ch) ||
+ regex.test(ch);\n}\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case
+ 33:\n case 34:\n case 35:\n case 36:\n case 37:\n case 38:\n
+ \ case 39:\n case 40:\n case 41:\n case 42:\n case 43:\n case
+ 44:\n case 45:\n case 46:\n case 47:\n case 58:\n case 59:\n
+ \ case 60:\n case 61:\n case 62:\n case 63:\n case 64:\n case
+ 91:\n case 92:\n case 93:\n case 94:\n case 95:\n case 96:\n
+ \ case 123:\n case 124:\n case 125:\n case 126:\n return true;\n
+ \ default:\n return false;\n }\n}\nfunction normalizeReference(str)
+ {\n str = str.trim().replace(/\\s+/g, \" \");\n if (\"ẞ\".toLowerCase()
+ === \"Ṿ\") {\n str = str.replace(/ẞ/g, \"ß\");\n }\n return str.toLowerCase().toUpperCase();\n}\nconst
+ lib = { mdurl, ucmicro };\nconst utils = /* @__PURE__ */ Object.freeze(/*
+ @__PURE__ */ Object.defineProperty({\n __proto__: null,\n arrayReplaceAt,\n
+ \ assign: assign$1,\n escapeHtml,\n escapeRE: escapeRE$1,\n fromCodePoint,\n
+ \ has,\n isMdAsciiPunct,\n isPunctChar,\n isSpace,\n isString: isString$1,\n
+ \ isValidEntityCode,\n isWhiteSpace,\n lib,\n normalizeReference,\n unescapeAll,\n
+ \ unescapeMd\n}, Symbol.toStringTag, { value: \"Module\" }));\nfunction parseLinkLabel(state,
+ start, disableNested) {\n let level2, found, marker, prevPos;\n const max
+ = state.posMax;\n const oldPos = state.pos;\n state.pos = start + 1;\n level2
+ = 1;\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n
+ \ if (marker === 93) {\n level2--;\n if (level2 === 0) {\n found
+ = true;\n break;\n }\n }\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n
+ \ if (marker === 91) {\n if (prevPos === state.pos - 1) {\n level2++;\n
+ \ } else if (disableNested) {\n state.pos = oldPos;\n return
+ -1;\n }\n }\n }\n let labelEnd = -1;\n if (found) {\n labelEnd
+ = state.pos;\n }\n state.pos = oldPos;\n return labelEnd;\n}\nfunction
+ parseLinkDestination(str, start, max) {\n let code2;\n let pos = start;\n
+ \ const result = {\n ok: false,\n pos: 0,\n str: \"\"\n };\n if
+ (str.charCodeAt(pos) === 60) {\n pos++;\n while (pos < max) {\n code2
+ = str.charCodeAt(pos);\n if (code2 === 10) {\n return result;\n
+ \ }\n if (code2 === 60) {\n return result;\n }\n if
+ (code2 === 62) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start
+ + 1, pos));\n result.ok = true;\n return result;\n }\n
+ \ if (code2 === 92 && pos + 1 < max) {\n pos += 2;\n continue;\n
+ \ }\n pos++;\n }\n return result;\n }\n let level2 = 0;\n
+ \ while (pos < max) {\n code2 = str.charCodeAt(pos);\n if (code2 ===
+ 32) {\n break;\n }\n if (code2 < 32 || code2 === 127) {\n break;\n
+ \ }\n if (code2 === 92 && pos + 1 < max) {\n if (str.charCodeAt(pos
+ + 1) === 32) {\n break;\n }\n pos += 2;\n continue;\n
+ \ }\n if (code2 === 40) {\n level2++;\n if (level2 > 32) {\n
+ \ return result;\n }\n }\n if (code2 === 41) {\n if
+ (level2 === 0) {\n break;\n }\n level2--;\n }\n pos++;\n
+ \ }\n if (start === pos) {\n return result;\n }\n if (level2 !== 0)
+ {\n return result;\n }\n result.str = unescapeAll(str.slice(start, pos));\n
+ \ result.pos = pos;\n result.ok = true;\n return result;\n}\nfunction parseLinkTitle(str,
+ start, max, prev_state) {\n let code2;\n let pos = start;\n const state
+ = {\n // if `true`, this is a valid link title\n ok: false,\n //
+ if `true`, this link can be continued on the next line\n can_continue:
+ false,\n // if `ok`, it's the position of the first character after the
+ closing marker\n pos: 0,\n // if `ok`, it's the unescaped title\n str:
+ \"\",\n // expected closing marker character code\n marker: 0\n };\n
+ \ if (prev_state) {\n state.str = prev_state.str;\n state.marker = prev_state.marker;\n
+ \ } else {\n if (pos >= max) {\n return state;\n }\n let marker
+ = str.charCodeAt(pos);\n if (marker !== 34 && marker !== 39 && marker !==
+ 40) {\n return state;\n }\n start++;\n pos++;\n if (marker
+ === 40) {\n marker = 41;\n }\n state.marker = marker;\n }\n while
+ (pos < max) {\n code2 = str.charCodeAt(pos);\n if (code2 === state.marker)
+ {\n state.pos = pos + 1;\n state.str += unescapeAll(str.slice(start,
+ pos));\n state.ok = true;\n return state;\n } else if (code2
+ === 40 && state.marker === 41) {\n return state;\n } else if (code2
+ === 92 && pos + 1 < max) {\n pos++;\n }\n pos++;\n }\n state.can_continue
+ = true;\n state.str += unescapeAll(str.slice(start, pos));\n return state;\n}\nconst
+ helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n
+ \ __proto__: null,\n parseLinkDestination,\n parseLinkLabel,\n parseLinkTitle\n},
+ Symbol.toStringTag, { value: \"Module\" }));\nconst default_rules = {};\ndefault_rules.code_inline
+ = function(tokens, idx, options, env, slf) {\n const token = tokens[idx];\n
+ \ return \"\" + escapeHtml(token.content)
+ + \"\";\n};\ndefault_rules.code_block = function(tokens, idx, options,
+ env, slf) {\n const token = tokens[idx];\n return \"\" + escapeHtml(tokens[idx].content) + \"
\\n\";\n};\ndefault_rules.fence
+ = function(tokens, idx, options, env, slf) {\n const token = tokens[idx];\n
+ \ const info = token.info ? unescapeAll(token.info).trim() : \"\";\n let
+ langName = \"\";\n let langAttrs = \"\";\n if (info) {\n const arr =
+ info.split(/(\\s+)/g);\n langName = arr[0];\n langAttrs = arr.slice(2).join(\"\");\n
+ \ }\n let highlighted;\n if (options.highlight) {\n highlighted = options.highlight(token.content,
+ langName, langAttrs) || escapeHtml(token.content);\n } else {\n highlighted
+ = escapeHtml(token.content);\n }\n if (highlighted.indexOf(\"${highlighted}
\n`;\n
+ \ }\n return `${highlighted}
\n`;\n};\ndefault_rules.image
+ = function(tokens, idx, options, env, slf) {\n const token = tokens[idx];\n
+ \ token.attrs[token.attrIndex(\"alt\")][1] = slf.renderInlineAsText(token.children,
+ options, env);\n return slf.renderToken(tokens, idx, options);\n};\ndefault_rules.hardbreak
+ = function(tokens, idx, options) {\n return options.xhtmlOut ? \"
\\n\"
+ : \"
\\n\";\n};\ndefault_rules.softbreak = function(tokens, idx, options)
+ {\n return options.breaks ? options.xhtmlOut ? \"
\\n\" : \"
\\n\"
+ : \"\\n\";\n};\ndefault_rules.text = function(tokens, idx) {\n return escapeHtml(tokens[idx].content);\n};\ndefault_rules.html_block
+ = function(tokens, idx) {\n return tokens[idx].content;\n};\ndefault_rules.html_inline
+ = function(tokens, idx) {\n return tokens[idx].content;\n};\nfunction Renderer()
+ {\n this.rules = assign$1({}, default_rules);\n}\nRenderer.prototype.renderAttrs
+ = function renderAttrs(token) {\n let i3, l2, result;\n if (!token.attrs)
+ {\n return \"\";\n }\n result = \"\";\n for (i3 = 0, l2 = token.attrs.length;
+ i3 < l2; i3++) {\n result += \" \" + escapeHtml(token.attrs[i3][0]) + '=\"'
+ + escapeHtml(token.attrs[i3][1]) + '\"';\n }\n return result;\n};\nRenderer.prototype.renderToken
+ = function renderToken(tokens, idx, options) {\n const token = tokens[idx];\n
+ \ let result = \"\";\n if (token.hidden) {\n return \"\";\n }\n if (token.block
+ && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result +=
+ \"\\n\";\n }\n result += (token.nesting === -1 ? \"\" : \"<\") + token.tag;\n
+ \ result += this.renderAttrs(token);\n if (token.nesting === 0 && options.xhtmlOut)
+ {\n result += \" /\";\n }\n let needLf = false;\n if (token.block) {\n
+ \ needLf = true;\n if (token.nesting === 1) {\n if (idx + 1 < tokens.length)
+ {\n const nextToken = tokens[idx + 1];\n if (nextToken.type
+ === \"inline\" || nextToken.hidden) {\n needLf = false;\n }
+ else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n needLf
+ = false;\n }\n }\n }\n }\n result += needLf ? \">\\n\" :
+ \">\";\n return result;\n};\nRenderer.prototype.renderInline = function(tokens,
+ options, env) {\n let result = \"\";\n const rules = this.rules;\n for
+ (let i3 = 0, len = tokens.length; i3 < len; i3++) {\n const type = tokens[i3].type;\n
+ \ if (typeof rules[type] !== \"undefined\") {\n result += rules[type](tokens,
+ i3, options, env, this);\n } else {\n result += this.renderToken(tokens,
+ i3, options);\n }\n }\n return result;\n};\nRenderer.prototype.renderInlineAsText
+ = function(tokens, options, env) {\n let result = \"\";\n for (let i3 =
+ 0, len = tokens.length; i3 < len; i3++) {\n switch (tokens[i3].type) {\n
+ \ case \"text\":\n result += tokens[i3].content;\n break;\n
+ \ case \"image\":\n result += this.renderInlineAsText(tokens[i3].children,
+ options, env);\n break;\n case \"html_inline\":\n case \"html_block\":\n
+ \ result += tokens[i3].content;\n break;\n case \"softbreak\":\n
+ \ case \"hardbreak\":\n result += \"\\n\";\n break;\n }\n
+ \ }\n return result;\n};\nRenderer.prototype.render = function(tokens, options,
+ env) {\n let result = \"\";\n const rules = this.rules;\n for (let i3 =
+ 0, len = tokens.length; i3 < len; i3++) {\n const type = tokens[i3].type;\n
+ \ if (type === \"inline\") {\n result += this.renderInline(tokens[i3].children,
+ options, env);\n } else if (typeof rules[type] !== \"undefined\") {\n result
+ += rules[type](tokens, i3, options, env, this);\n } else {\n result
+ += this.renderToken(tokens, i3, options, env);\n }\n }\n return result;\n};\nfunction
+ Ruler() {\n this.__rules__ = [];\n this.__cache__ = null;\n}\nRuler.prototype.__find__
+ = function(name) {\n for (let i3 = 0; i3 < this.__rules__.length; i3++) {\n
+ \ if (this.__rules__[i3].name === name) {\n return i3;\n }\n }\n
+ \ return -1;\n};\nRuler.prototype.__compile__ = function() {\n const self2
+ = this;\n const chains = [\"\"];\n self2.__rules__.forEach(function(rule)
+ {\n if (!rule.enabled) {\n return;\n }\n rule.alt.forEach(function(altName)
+ {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n
+ \ }\n });\n });\n self2.__cache__ = {};\n chains.forEach(function(chain)
+ {\n self2.__cache__[chain] = [];\n self2.__rules__.forEach(function(rule)
+ {\n if (!rule.enabled) {\n return;\n }\n if (chain &&
+ rule.alt.indexOf(chain) < 0) {\n return;\n }\n self2.__cache__[chain].push(rule.fn);\n
+ \ });\n });\n};\nRuler.prototype.at = function(name, fn, options) {\n const
+ index2 = this.__find__(name);\n const opt = options || {};\n if (index2
+ === -1) {\n throw new Error(\"Parser rule not found: \" + name);\n }\n
+ \ this.__rules__[index2].fn = fn;\n this.__rules__[index2].alt = opt.alt
+ || [];\n this.__cache__ = null;\n};\nRuler.prototype.before = function(beforeName,
+ ruleName, fn, options) {\n const index2 = this.__find__(beforeName);\n const
+ opt = options || {};\n if (index2 === -1) {\n throw new Error(\"Parser
+ rule not found: \" + beforeName);\n }\n this.__rules__.splice(index2, 0,
+ {\n name: ruleName,\n enabled: true,\n fn,\n alt: opt.alt || []\n
+ \ });\n this.__cache__ = null;\n};\nRuler.prototype.after = function(afterName,
+ ruleName, fn, options) {\n const index2 = this.__find__(afterName);\n const
+ opt = options || {};\n if (index2 === -1) {\n throw new Error(\"Parser
+ rule not found: \" + afterName);\n }\n this.__rules__.splice(index2 + 1,
+ 0, {\n name: ruleName,\n enabled: true,\n fn,\n alt: opt.alt ||
+ []\n });\n this.__cache__ = null;\n};\nRuler.prototype.push = function(ruleName,
+ fn, options) {\n const opt = options || {};\n this.__rules__.push({\n name:
+ ruleName,\n enabled: true,\n fn,\n alt: opt.alt || []\n });\n this.__cache__
+ = null;\n};\nRuler.prototype.enable = function(list2, ignoreInvalid) {\n if
+ (!Array.isArray(list2)) {\n list2 = [list2];\n }\n const result = [];\n
+ \ list2.forEach(function(name) {\n const idx = this.__find__(name);\n if
+ (idx < 0) {\n if (ignoreInvalid) {\n return;\n }\n throw
+ new Error(\"Rules manager: invalid rule name \" + name);\n }\n this.__rules__[idx].enabled
+ = true;\n result.push(name);\n }, this);\n this.__cache__ = null;\n return
+ result;\n};\nRuler.prototype.enableOnly = function(list2, ignoreInvalid) {\n
+ \ if (!Array.isArray(list2)) {\n list2 = [list2];\n }\n this.__rules__.forEach(function(rule)
+ {\n rule.enabled = false;\n });\n this.enable(list2, ignoreInvalid);\n};\nRuler.prototype.disable
+ = function(list2, ignoreInvalid) {\n if (!Array.isArray(list2)) {\n list2
+ = [list2];\n }\n const result = [];\n list2.forEach(function(name) {\n
+ \ const idx = this.__find__(name);\n if (idx < 0) {\n if (ignoreInvalid)
+ {\n return;\n }\n throw new Error(\"Rules manager: invalid
+ rule name \" + name);\n }\n this.__rules__[idx].enabled = false;\n result.push(name);\n
+ \ }, this);\n this.__cache__ = null;\n return result;\n};\nRuler.prototype.getRules
+ = function(chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n
+ \ }\n return this.__cache__[chainName] || [];\n};\nfunction Token(type, tag,
+ nesting) {\n this.type = type;\n this.tag = tag;\n this.attrs = null;\n
+ \ this.map = null;\n this.nesting = nesting;\n this.level = 0;\n this.children
+ = null;\n this.content = \"\";\n this.markup = \"\";\n this.info = \"\";\n
+ \ this.meta = null;\n this.block = false;\n this.hidden = false;\n}\nToken.prototype.attrIndex
+ = function attrIndex(name) {\n if (!this.attrs) {\n return -1;\n }\n
+ \ const attrs = this.attrs;\n for (let i3 = 0, len = attrs.length; i3 < len;
+ i3++) {\n if (attrs[i3][0] === name) {\n return i3;\n }\n }\n
+ \ return -1;\n};\nToken.prototype.attrPush = function attrPush(attrData) {\n
+ \ if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs
+ = [attrData];\n }\n};\nToken.prototype.attrSet = function attrSet(name, value)
+ {\n const idx = this.attrIndex(name);\n const attrData = [name, value];\n
+ \ if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx]
+ = attrData;\n }\n};\nToken.prototype.attrGet = function attrGet(name) {\n
+ \ const idx = this.attrIndex(name);\n let value = null;\n if (idx >= 0)
+ {\n value = this.attrs[idx][1];\n }\n return value;\n};\nToken.prototype.attrJoin
+ = function attrJoin(name, value) {\n const idx = this.attrIndex(name);\n
+ \ if (idx < 0) {\n this.attrPush([name, value]);\n } else {\n this.attrs[idx][1]
+ = this.attrs[idx][1] + \" \" + value;\n }\n};\nfunction StateCore(src, md,
+ env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode
+ = false;\n this.md = md;\n}\nStateCore.prototype.Token = Token;\nconst NEWLINES_RE
+ = /\\r\\n?|\\n/g;\nconst NULL_RE = /\\0/g;\nfunction normalize$3(state) {\n
+ \ let str;\n str = state.src.replace(NEWLINES_RE, \"\\n\");\n str = str.replace(NULL_RE,
+ \"�\");\n state.src = str;\n}\nfunction block(state) {\n let token;\n if
+ (state.inlineMode) {\n token = new state.Token(\"inline\", \"\", 0);\n
+ \ token.content = state.src;\n token.map = [0, 1];\n token.children
+ = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src,
+ state.md, state.env, state.tokens);\n }\n}\nfunction inline(state) {\n const
+ tokens = state.tokens;\n for (let i3 = 0, l2 = tokens.length; i3 < l2; i3++)
+ {\n const tok = tokens[i3];\n if (tok.type === \"inline\") {\n state.md.inline.parse(tok.content,
+ state.md, state.env, tok.children);\n }\n }\n}\nfunction isLinkOpen$1(str)
+ {\n return /^\\s]/i.test(str);\n}\nfunction isLinkClose$1(str) {\n return
+ /^<\\/a\\s*>/i.test(str);\n}\nfunction linkify$1(state) {\n const blockTokens
+ = state.tokens;\n if (!state.md.options.linkify) {\n return;\n }\n for
+ (let j2 = 0, l2 = blockTokens.length; j2 < l2; j2++) {\n if (blockTokens[j2].type
+ !== \"inline\" || !state.md.linkify.pretest(blockTokens[j2].content)) {\n
+ \ continue;\n }\n let tokens = blockTokens[j2].children;\n let
+ htmlLinkLevel = 0;\n for (let i3 = tokens.length - 1; i3 >= 0; i3--) {\n
+ \ const currentToken = tokens[i3];\n if (currentToken.type === \"link_close\")
+ {\n i3--;\n while (tokens[i3].level !== currentToken.level &&
+ tokens[i3].type !== \"link_open\") {\n i3--;\n }\n continue;\n
+ \ }\n if (currentToken.type === \"html_inline\") {\n if (isLinkOpen$1(currentToken.content)
+ && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n if
+ (isLinkClose$1(currentToken.content)) {\n htmlLinkLevel++;\n }\n
+ \ }\n if (htmlLinkLevel > 0) {\n continue;\n }\n if
+ (currentToken.type === \"text\" && state.md.linkify.test(currentToken.content))
+ {\n const text2 = currentToken.content;\n let links = state.md.linkify.match(text2);\n
+ \ const nodes = [];\n let level2 = currentToken.level;\n let
+ lastPos = 0;\n if (links.length > 0 && links[0].index === 0 && i3 >
+ 0 && tokens[i3 - 1].type === \"text_special\") {\n links = links.slice(1);\n
+ \ }\n for (let ln = 0; ln < links.length; ln++) {\n const
+ url2 = links[ln].url;\n const fullUrl = state.md.normalizeLink(url2);\n
+ \ if (!state.md.validateLink(fullUrl)) {\n continue;\n
+ \ }\n let urlText = links[ln].text;\n if (!links[ln].schema)
+ {\n urlText = state.md.normalizeLinkText(\"http://\" + urlText).replace(/^http:\\/\\//,
+ \"\");\n } else if (links[ln].schema === \"mailto:\" && !/^mailto:/i.test(urlText))
+ {\n urlText = state.md.normalizeLinkText(\"mailto:\" + urlText).replace(/^mailto:/,
+ \"\");\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n
+ \ }\n const pos = links[ln].index;\n if (pos > lastPos)
+ {\n const token = new state.Token(\"text\", \"\", 0);\n token.content
+ = text2.slice(lastPos, pos);\n token.level = level2;\n nodes.push(token);\n
+ \ }\n const token_o = new state.Token(\"link_open\", \"a\",
+ 1);\n token_o.attrs = [[\"href\", fullUrl]];\n token_o.level
+ = level2++;\n token_o.markup = \"linkify\";\n token_o.info
+ = \"auto\";\n nodes.push(token_o);\n const token_t = new
+ state.Token(\"text\", \"\", 0);\n token_t.content = urlText;\n token_t.level
+ = level2;\n nodes.push(token_t);\n const token_c = new state.Token(\"link_close\",
+ \"a\", -1);\n token_c.level = --level2;\n token_c.markup
+ = \"linkify\";\n token_c.info = \"auto\";\n nodes.push(token_c);\n
+ \ lastPos = links[ln].lastIndex;\n }\n if (lastPos <
+ text2.length) {\n const token = new state.Token(\"text\", \"\", 0);\n
+ \ token.content = text2.slice(lastPos);\n token.level = level2;\n
+ \ nodes.push(token);\n }\n blockTokens[j2].children
+ = tokens = arrayReplaceAt(tokens, i3, nodes);\n }\n }\n }\n}\nconst
+ RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\nconst SCOPED_ABBR_TEST_RE
+ = /\\((c|tm|r)\\)/i;\nconst SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig;\nconst SCOPED_ABBR
+ = {\n c: \"©\",\n r: \"®\",\n tm: \"™\"\n};\nfunction replaceFn(match3,
+ name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\nfunction replace_scoped(inlineTokens)
+ {\n let inside_autolink = 0;\n for (let i3 = inlineTokens.length - 1; i3
+ >= 0; i3--) {\n const token = inlineTokens[i3];\n if (token.type ===
+ \"text\" && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE,
+ replaceFn);\n }\n if (token.type === \"link_open\" && token.info ===
+ \"auto\") {\n inside_autolink--;\n }\n if (token.type === \"link_close\"
+ && token.info === \"auto\") {\n inside_autolink++;\n }\n }\n}\nfunction
+ replace_rare(inlineTokens) {\n let inside_autolink = 0;\n for (let i3 =
+ inlineTokens.length - 1; i3 >= 0; i3--) {\n const token = inlineTokens[i3];\n
+ \ if (token.type === \"text\" && !inside_autolink) {\n if (RARE_RE.test(token.content))
+ {\n token.content = token.content.replace(/\\+-/g, \"±\").replace(/\\.{2,}/g,
+ \"…\").replace(/([?!])…/g, \"$1..\").replace(/([?!]){4,}/g, \"$1$1$1\").replace(/,{2,}/g,
+ \",\").replace(/(^|[^-])---(?=[^-]|$)/mg, \"$1—\").replace(/(^|\\s)--(?=\\s|$)/mg,
+ \"$1–\").replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, \"$1–\");\n }\n }\n
+ \ if (token.type === \"link_open\" && token.info === \"auto\") {\n inside_autolink--;\n
+ \ }\n if (token.type === \"link_close\" && token.info === \"auto\") {\n
+ \ inside_autolink++;\n }\n }\n}\nfunction replace(state) {\n let
+ blkIdx;\n if (!state.md.options.typographer) {\n return;\n }\n for (blkIdx
+ = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type
+ !== \"inline\") {\n continue;\n }\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content))
+ {\n replace_scoped(state.tokens[blkIdx].children);\n }\n if (RARE_RE.test(state.tokens[blkIdx].content))
+ {\n replace_rare(state.tokens[blkIdx].children);\n }\n }\n}\nconst
+ QUOTE_TEST_RE = /['\"]/;\nconst QUOTE_RE = /['\"]/g;\nconst APOSTROPHE = \"’\";\nfunction
+ replaceAt(str, index2, ch) {\n return str.slice(0, index2) + ch + str.slice(index2
+ + 1);\n}\nfunction process_inlines(tokens, state) {\n let j2;\n const stack
+ = [];\n for (let i3 = 0; i3 < tokens.length; i3++) {\n const token = tokens[i3];\n
+ \ const thisLevel = tokens[i3].level;\n for (j2 = stack.length - 1; j2
+ >= 0; j2--) {\n if (stack[j2].level <= thisLevel) {\n break;\n
+ \ }\n }\n stack.length = j2 + 1;\n if (token.type !== \"text\")
+ {\n continue;\n }\n let text2 = token.content;\n let pos = 0;\n
+ \ let max = text2.length;\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex
+ = pos;\n const t2 = QUOTE_RE.exec(text2);\n if (!t2) {\n break;\n
+ \ }\n let canOpen = true;\n let canClose = true;\n pos
+ = t2.index + 1;\n const isSingle = t2[0] === \"'\";\n let lastChar
+ = 32;\n if (t2.index - 1 >= 0) {\n lastChar = text2.charCodeAt(t2.index
+ - 1);\n } else {\n for (j2 = i3 - 1; j2 >= 0; j2--) {\n if
+ (tokens[j2].type === \"softbreak\" || tokens[j2].type === \"hardbreak\") break;\n
+ \ if (!tokens[j2].content) continue;\n lastChar = tokens[j2].content.charCodeAt(tokens[j2].content.length
+ - 1);\n break;\n }\n }\n let nextChar =
+ 32;\n if (pos < max) {\n nextChar = text2.charCodeAt(pos);\n
+ \ } else {\n for (j2 = i3 + 1; j2 < tokens.length; j2++) {\n
+ \ if (tokens[j2].type === \"softbreak\" || tokens[j2].type === \"hardbreak\")
+ break;\n if (!tokens[j2].content) continue;\n nextChar
+ = tokens[j2].content.charCodeAt(0);\n break;\n }\n }\n
+ \ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n
+ \ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n
+ \ const isLastWhiteSpace = isWhiteSpace(lastChar);\n const isNextWhiteSpace
+ = isWhiteSpace(nextChar);\n if (isNextWhiteSpace) {\n canOpen
+ = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace
+ || isLastPunctChar)) {\n canOpen = false;\n }\n }\n
+ \ if (isLastWhiteSpace) {\n canClose = false;\n } else
+ if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar))
+ {\n canClose = false;\n }\n }\n if (nextChar
+ === 34 && t2[0] === '\"') {\n if (lastChar >= 48 && lastChar <= 57)
+ {\n canClose = canOpen = false;\n }\n }\n if
+ (canOpen && canClose) {\n canOpen = isLastPunctChar;\n canClose
+ = isNextPunctChar;\n }\n if (!canOpen && !canClose) {\n if
+ (isSingle) {\n token.content = replaceAt(token.content, t2.index,
+ APOSTROPHE);\n }\n continue;\n }\n if (canClose)
+ {\n for (j2 = stack.length - 1; j2 >= 0; j2--) {\n let
+ item = stack[j2];\n if (stack[j2].level < thisLevel) {\n break;\n
+ \ }\n if (item.single === isSingle && stack[j2].level
+ === thisLevel) {\n item = stack[j2];\n let openQuote;\n
+ \ let closeQuote;\n if (isSingle) {\n openQuote
+ = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n
+ \ } else {\n openQuote = state.md.options.quotes[0];\n
+ \ closeQuote = state.md.options.quotes[1];\n }\n
+ \ token.content = replaceAt(token.content, t2.index, closeQuote);\n
+ \ tokens[item.token].content = replaceAt(\n tokens[item.token].content,\n
+ \ item.pos,\n openQuote\n );\n pos
+ += closeQuote.length - 1;\n if (item.token === i3) {\n pos
+ += openQuote.length - 1;\n }\n text2 = token.content;\n
+ \ max = text2.length;\n stack.length = j2;\n continue
+ OUTER;\n }\n }\n }\n if (canOpen) {\n stack.push({\n
+ \ token: i3,\n pos: t2.index,\n single: isSingle,\n
+ \ level: thisLevel\n });\n } else if (canClose &&
+ isSingle) {\n token.content = replaceAt(token.content, t2.index,
+ APOSTROPHE);\n }\n }\n }\n}\nfunction smartquotes(state) {\n
+ \ if (!state.md.options.typographer) {\n return;\n }\n for (let blkIdx
+ = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type
+ !== \"inline\" || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n
+ \ }\n process_inlines(state.tokens[blkIdx].children, state);\n }\n}\nfunction
+ text_join(state) {\n let curr, last;\n const blockTokens = state.tokens;\n
+ \ const l2 = blockTokens.length;\n for (let j2 = 0; j2 < l2; j2++) {\n if
+ (blockTokens[j2].type !== \"inline\") continue;\n const tokens = blockTokens[j2].children;\n
+ \ const max = tokens.length;\n for (curr = 0; curr < max; curr++) {\n
+ \ if (tokens[curr].type === \"text_special\") {\n tokens[curr].type
+ = \"text\";\n }\n }\n for (curr = last = 0; curr < max; curr++)
+ {\n if (tokens[curr].type === \"text\" && curr + 1 < max && tokens[curr
+ + 1].type === \"text\") {\n tokens[curr + 1].content = tokens[curr].content
+ + tokens[curr + 1].content;\n } else {\n if (curr !== last) {\n
+ \ tokens[last] = tokens[curr];\n }\n last++;\n }\n
+ \ }\n if (curr !== last) {\n tokens.length = last;\n }\n }\n}\nconst
+ _rules$2 = [\n [\"normalize\", normalize$3],\n [\"block\", block],\n [\"inline\",
+ inline],\n [\"linkify\", linkify$1],\n [\"replacements\", replace],\n [\"smartquotes\",
+ smartquotes],\n // `text_join` finds `text_special` tokens (for escape sequences)\n
+ \ // and joins them with the rest of the text\n [\"text_join\", text_join]\n];\nfunction
+ Core() {\n this.ruler = new Ruler();\n for (let i3 = 0; i3 < _rules$2.length;
+ i3++) {\n this.ruler.push(_rules$2[i3][0], _rules$2[i3][1]);\n }\n}\nCore.prototype.process
+ = function(state) {\n const rules = this.ruler.getRules(\"\");\n for (let
+ i3 = 0, l2 = rules.length; i3 < l2; i3++) {\n rules[i3](state);\n }\n};\nCore.prototype.State
+ = StateCore;\nfunction StateBlock(src, md, env, tokens) {\n this.src = src;\n
+ \ this.md = md;\n this.env = env;\n this.tokens = tokens;\n this.bMarks
+ = [];\n this.eMarks = [];\n this.tShift = [];\n this.sCount = [];\n this.bsCount
+ = [];\n this.blkIndent = 0;\n this.line = 0;\n this.lineMax = 0;\n this.tight
+ = false;\n this.ddIndent = -1;\n this.listIndent = -1;\n this.parentType
+ = \"root\";\n this.level = 0;\n const s2 = this.src;\n for (let start =
+ 0, pos = 0, indent = 0, offset = 0, len = s2.length, indent_found = false;
+ pos < len; pos++) {\n const ch = s2.charCodeAt(pos);\n if (!indent_found)
+ {\n if (isSpace(ch)) {\n indent++;\n if (ch === 9) {\n
+ \ offset += 4 - offset % 4;\n } else {\n offset++;\n
+ \ }\n continue;\n } else {\n indent_found = true;\n
+ \ }\n }\n if (ch === 10 || pos === len - 1) {\n if (ch !==
+ 10) {\n pos++;\n }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n
+ \ this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n
+ \ indent_found = false;\n indent = 0;\n offset = 0;\n start
+ = pos + 1;\n }\n }\n this.bMarks.push(s2.length);\n this.eMarks.push(s2.length);\n
+ \ this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n
+ \ this.lineMax = this.bMarks.length - 1;\n}\nStateBlock.prototype.push = function(type,
+ tag, nesting) {\n const token = new Token(type, tag, nesting);\n token.block
+ = true;\n if (nesting < 0) this.level--;\n token.level = this.level;\n if
+ (nesting > 0) this.level++;\n this.tokens.push(token);\n return token;\n};\nStateBlock.prototype.isEmpty
+ = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line]
+ >= this.eMarks[line];\n};\nStateBlock.prototype.skipEmptyLines = function
+ skipEmptyLines(from) {\n for (let max = this.lineMax; from < max; from++)
+ {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n
+ \ break;\n }\n }\n return from;\n};\nStateBlock.prototype.skipSpaces
+ = function skipSpaces(pos) {\n for (let max = this.src.length; pos < max;
+ pos++) {\n const ch = this.src.charCodeAt(pos);\n if (!isSpace(ch))
+ {\n break;\n }\n }\n return pos;\n};\nStateBlock.prototype.skipSpacesBack
+ = function skipSpacesBack(pos, min) {\n if (pos <= min) {\n return pos;\n
+ \ }\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos)))
+ {\n return pos + 1;\n }\n }\n return pos;\n};\nStateBlock.prototype.skipChars
+ = function skipChars(pos, code2) {\n for (let max = this.src.length; pos
+ < max; pos++) {\n if (this.src.charCodeAt(pos) !== code2) {\n break;\n
+ \ }\n }\n return pos;\n};\nStateBlock.prototype.skipCharsBack = function
+ skipCharsBack(pos, code2, min) {\n if (pos <= min) {\n return pos;\n }\n
+ \ while (pos > min) {\n if (code2 !== this.src.charCodeAt(--pos)) {\n return
+ pos + 1;\n }\n }\n return pos;\n};\nStateBlock.prototype.getLines = function
+ getLines(begin, end, indent, keepLastLF) {\n if (begin >= end) {\n return
+ \"\";\n }\n const queue = new Array(end - begin);\n for (let i3 = 0, line
+ = begin; line < end; line++, i3++) {\n let lineIndent = 0;\n const lineStart
+ = this.bMarks[line];\n let first = lineStart;\n let last;\n if (line
+ + 1 < end || keepLastLF) {\n last = this.eMarks[line] + 1;\n } else
+ {\n last = this.eMarks[line];\n }\n while (first < last && lineIndent
+ < indent) {\n const ch = this.src.charCodeAt(first);\n if (isSpace(ch))
+ {\n if (ch === 9) {\n lineIndent += 4 - (lineIndent + this.bsCount[line])
+ % 4;\n } else {\n lineIndent++;\n }\n } else if
+ (first - lineStart < this.tShift[line]) {\n lineIndent++;\n }
+ else {\n break;\n }\n first++;\n }\n if (lineIndent
+ > indent) {\n queue[i3] = new Array(lineIndent - indent + 1).join(\"
+ \") + this.src.slice(first, last);\n } else {\n queue[i3] = this.src.slice(first,
+ last);\n }\n }\n return queue.join(\"\");\n};\nStateBlock.prototype.Token
+ = Token;\nconst MAX_AUTOCOMPLETED_CELLS = 65536;\nfunction getLine(state,
+ line) {\n const pos = state.bMarks[line] + state.tShift[line];\n const max
+ = state.eMarks[line];\n return state.src.slice(pos, max);\n}\nfunction escapedSplit(str)
+ {\n const result = [];\n const max = str.length;\n let pos = 0;\n let
+ ch = str.charCodeAt(pos);\n let isEscaped = false;\n let lastPos = 0;\n
+ \ let current = \"\";\n while (pos < max) {\n if (ch === 124) {\n if
+ (!isEscaped) {\n result.push(current + str.substring(lastPos, pos));\n
+ \ current = \"\";\n lastPos = pos + 1;\n } else {\n current
+ += str.substring(lastPos, pos - 1);\n lastPos = pos;\n }\n }\n
+ \ isEscaped = ch === 92;\n pos++;\n ch = str.charCodeAt(pos);\n }\n
+ \ result.push(current + str.substring(lastPos));\n return result;\n}\nfunction
+ table(state, startLine, endLine, silent) {\n if (startLine + 2 > endLine)
+ {\n return false;\n }\n let nextLine = startLine + 1;\n if (state.sCount[nextLine]
+ < state.blkIndent) {\n return false;\n }\n if (state.sCount[nextLine]
+ - state.blkIndent >= 4) {\n return false;\n }\n let pos = state.bMarks[nextLine]
+ + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) {\n return
+ false;\n }\n const firstCh = state.src.charCodeAt(pos++);\n if (firstCh
+ !== 124 && firstCh !== 45 && firstCh !== 58) {\n return false;\n }\n if
+ (pos >= state.eMarks[nextLine]) {\n return false;\n }\n const secondCh
+ = state.src.charCodeAt(pos++);\n if (secondCh !== 124 && secondCh !== 45
+ && secondCh !== 58 && !isSpace(secondCh)) {\n return false;\n }\n if
+ (firstCh === 45 && isSpace(secondCh)) {\n return false;\n }\n while (pos
+ < state.eMarks[nextLine]) {\n const ch = state.src.charCodeAt(pos);\n if
+ (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) {\n return false;\n
+ \ }\n pos++;\n }\n let lineText = getLine(state, startLine + 1);\n
+ \ let columns = lineText.split(\"|\");\n const aligns = [];\n for (let i3
+ = 0; i3 < columns.length; i3++) {\n const t2 = columns[i3].trim();\n if
+ (!t2) {\n if (i3 === 0 || i3 === columns.length - 1) {\n continue;\n
+ \ } else {\n return false;\n }\n }\n if (!/^:?-+:?$/.test(t2))
+ {\n return false;\n }\n if (t2.charCodeAt(t2.length - 1) === 58)
+ {\n aligns.push(t2.charCodeAt(0) === 58 ? \"center\" : \"right\");\n
+ \ } else if (t2.charCodeAt(0) === 58) {\n aligns.push(\"left\");\n
+ \ } else {\n aligns.push(\"\");\n }\n }\n lineText = getLine(state,
+ startLine).trim();\n if (lineText.indexOf(\"|\") === -1) {\n return false;\n
+ \ }\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n
+ \ }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0]
+ === \"\") columns.shift();\n if (columns.length && columns[columns.length
+ - 1] === \"\") columns.pop();\n const columnCount = columns.length;\n if
+ (columnCount === 0 || columnCount !== aligns.length) {\n return false;\n
+ \ }\n if (silent) {\n return true;\n }\n const oldParentType = state.parentType;\n
+ \ state.parentType = \"table\";\n const terminatorRules = state.md.block.ruler.getRules(\"blockquote\");\n
+ \ const token_to = state.push(\"table_open\", \"table\", 1);\n const tableLines
+ = [startLine, 0];\n token_to.map = tableLines;\n const token_tho = state.push(\"thead_open\",
+ \"thead\", 1);\n token_tho.map = [startLine, startLine + 1];\n const token_htro
+ = state.push(\"tr_open\", \"tr\", 1);\n token_htro.map = [startLine, startLine
+ + 1];\n for (let i3 = 0; i3 < columns.length; i3++) {\n const token_ho
+ = state.push(\"th_open\", \"th\", 1);\n if (aligns[i3]) {\n token_ho.attrs
+ = [[\"style\", \"text-align:\" + aligns[i3]]];\n }\n const token_il
+ = state.push(\"inline\", \"\", 0);\n token_il.content = columns[i3].trim();\n
+ \ token_il.children = [];\n state.push(\"th_close\", \"th\", -1);\n }\n
+ \ state.push(\"tr_close\", \"tr\", -1);\n state.push(\"thead_close\", \"thead\",
+ -1);\n let tbodyLines;\n let autocompletedCells = 0;\n for (nextLine =
+ startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine]
+ < state.blkIndent) {\n break;\n }\n let terminate = false;\n for
+ (let i3 = 0, l2 = terminatorRules.length; i3 < l2; i3++) {\n if (terminatorRules[i3](state,
+ nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n
+ \ }\n if (terminate) {\n break;\n }\n lineText = getLine(state,
+ nextLine).trim();\n if (!lineText) {\n break;\n }\n if (state.sCount[nextLine]
+ - state.blkIndent >= 4) {\n break;\n }\n columns = escapedSplit(lineText);\n
+ \ if (columns.length && columns[0] === \"\") columns.shift();\n if (columns.length
+ && columns[columns.length - 1] === \"\") columns.pop();\n autocompletedCells
+ += columnCount - columns.length;\n if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS)
+ {\n break;\n }\n if (nextLine === startLine + 2) {\n const
+ token_tbo = state.push(\"tbody_open\", \"tbody\", 1);\n token_tbo.map
+ = tbodyLines = [startLine + 2, 0];\n }\n const token_tro = state.push(\"tr_open\",
+ \"tr\", 1);\n token_tro.map = [nextLine, nextLine + 1];\n for (let i3
+ = 0; i3 < columnCount; i3++) {\n const token_tdo = state.push(\"td_open\",
+ \"td\", 1);\n if (aligns[i3]) {\n token_tdo.attrs = [[\"style\",
+ \"text-align:\" + aligns[i3]]];\n }\n const token_il = state.push(\"inline\",
+ \"\", 0);\n token_il.content = columns[i3] ? columns[i3].trim() : \"\";\n
+ \ token_il.children = [];\n state.push(\"td_close\", \"td\", -1);\n
+ \ }\n state.push(\"tr_close\", \"tr\", -1);\n }\n if (tbodyLines) {\n
+ \ state.push(\"tbody_close\", \"tbody\", -1);\n tbodyLines[1] = nextLine;\n
+ \ }\n state.push(\"table_close\", \"table\", -1);\n tableLines[1] = nextLine;\n
+ \ state.parentType = oldParentType;\n state.line = nextLine;\n return true;\n}\nfunction
+ code(state, startLine, endLine) {\n if (state.sCount[startLine] - state.blkIndent
+ < 4) {\n return false;\n }\n let nextLine = startLine + 1;\n let last
+ = nextLine;\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine))
+ {\n nextLine++;\n continue;\n }\n if (state.sCount[nextLine]
+ - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n
+ \ }\n break;\n }\n state.line = last;\n const token = state.push(\"code_block\",
+ \"code\", 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent,
+ false) + \"\\n\";\n token.map = [startLine, state.line];\n return true;\n}\nfunction
+ fence(state, startLine, endLine, silent) {\n let pos = state.bMarks[startLine]
+ + state.tShift[startLine];\n let max = state.eMarks[startLine];\n if (state.sCount[startLine]
+ - state.blkIndent >= 4) {\n return false;\n }\n if (pos + 3 > max) {\n
+ \ return false;\n }\n const marker = state.src.charCodeAt(pos);\n if
+ (marker !== 126 && marker !== 96) {\n return false;\n }\n let mem = pos;\n
+ \ pos = state.skipChars(pos, marker);\n let len = pos - mem;\n if (len <
+ 3) {\n return false;\n }\n const markup = state.src.slice(mem, pos);\n
+ \ const params = state.src.slice(pos, max);\n if (marker === 96) {\n if
+ (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n
+ \ }\n }\n if (silent) {\n return true;\n }\n let nextLine = startLine;\n
+ \ let haveEndMarker = false;\n for (; ; ) {\n nextLine++;\n if (nextLine
+ >= endLine) {\n break;\n }\n pos = mem = state.bMarks[nextLine]
+ + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n if (pos
+ < max && state.sCount[nextLine] < state.blkIndent) {\n break;\n }\n
+ \ if (state.src.charCodeAt(pos) !== marker) {\n continue;\n }\n
+ \ if (state.sCount[nextLine] - state.blkIndent >= 4) {\n continue;\n
+ \ }\n pos = state.skipChars(pos, marker);\n if (pos - mem < len) {\n
+ \ continue;\n }\n pos = state.skipSpaces(pos);\n if (pos < max)
+ {\n continue;\n }\n haveEndMarker = true;\n break;\n }\n len
+ = state.sCount[startLine];\n state.line = nextLine + (haveEndMarker ? 1 :
+ 0);\n const token = state.push(\"fence\", \"code\", 0);\n token.info = params;\n
+ \ token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup
+ = markup;\n token.map = [startLine, state.line];\n return true;\n}\nfunction
+ blockquote(state, startLine, endLine, silent) {\n let pos = state.bMarks[startLine]
+ + state.tShift[startLine];\n let max = state.eMarks[startLine];\n const
+ oldLineMax = state.lineMax;\n if (state.sCount[startLine] - state.blkIndent
+ >= 4) {\n return false;\n }\n if (state.src.charCodeAt(pos) !== 62) {\n
+ \ return false;\n }\n if (silent) {\n return true;\n }\n const oldBMarks
+ = [];\n const oldBSCount = [];\n const oldSCount = [];\n const oldTShift
+ = [];\n const terminatorRules = state.md.block.ruler.getRules(\"blockquote\");\n
+ \ const oldParentType = state.parentType;\n state.parentType = \"blockquote\";\n
+ \ let lastLineEmpty = false;\n let nextLine;\n for (nextLine = startLine;
+ nextLine < endLine; nextLine++) {\n const isOutdented = state.sCount[nextLine]
+ < state.blkIndent;\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n
+ \ max = state.eMarks[nextLine];\n if (pos >= max) {\n break;\n }\n
+ \ if (state.src.charCodeAt(pos++) === 62 && !isOutdented) {\n let initial
+ = state.sCount[nextLine] + 1;\n let spaceAfterMarker;\n let adjustTab;\n
+ \ if (state.src.charCodeAt(pos) === 32) {\n pos++;\n initial++;\n
+ \ adjustTab = false;\n spaceAfterMarker = true;\n } else
+ if (state.src.charCodeAt(pos) === 9) {\n spaceAfterMarker = true;\n
+ \ if ((state.bsCount[nextLine] + initial) % 4 === 3) {\n pos++;\n
+ \ initial++;\n adjustTab = false;\n } else {\n adjustTab
+ = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n
+ \ let offset = initial;\n oldBMarks.push(state.bMarks[nextLine]);\n
+ \ state.bMarks[nextLine] = pos;\n while (pos < max) {\n const
+ ch = state.src.charCodeAt(pos);\n if (isSpace(ch)) {\n if
+ (ch === 9) {\n offset += 4 - (offset + state.bsCount[nextLine]
+ + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n
+ \ } else {\n break;\n }\n pos++;\n }\n lastLineEmpty
+ = pos >= max;\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine]
+ = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n oldSCount.push(state.sCount[nextLine]);\n
+ \ state.sCount[nextLine] = offset - initial;\n oldTShift.push(state.tShift[nextLine]);\n
+ \ state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n
+ \ }\n if (lastLineEmpty) {\n break;\n }\n let terminate =
+ false;\n for (let i3 = 0, l2 = terminatorRules.length; i3 < l2; i3++) {\n
+ \ if (terminatorRules[i3](state, nextLine, endLine, true)) {\n terminate
+ = true;\n break;\n }\n }\n if (terminate) {\n state.lineMax
+ = nextLine;\n if (state.blkIndent !== 0) {\n oldBMarks.push(state.bMarks[nextLine]);\n
+ \ oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n
+ \ oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine]
+ -= state.blkIndent;\n }\n break;\n }\n oldBMarks.push(state.bMarks[nextLine]);\n
+ \ oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n
+ \ oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] =
+ -1;\n }\n const oldIndent = state.blkIndent;\n state.blkIndent = 0;\n const
+ token_o = state.push(\"blockquote_open\", \"blockquote\", 1);\n token_o.markup
+ = \">\";\n const lines = [startLine, 0];\n token_o.map = lines;\n state.md.block.tokenize(state,
+ startLine, nextLine);\n const token_c = state.push(\"blockquote_close\",
+ \"blockquote\", -1);\n token_c.markup = \">\";\n state.lineMax = oldLineMax;\n
+ \ state.parentType = oldParentType;\n lines[1] = state.line;\n for (let
+ i3 = 0; i3 < oldTShift.length; i3++) {\n state.bMarks[i3 + startLine] =
+ oldBMarks[i3];\n state.tShift[i3 + startLine] = oldTShift[i3];\n state.sCount[i3
+ + startLine] = oldSCount[i3];\n state.bsCount[i3 + startLine] = oldBSCount[i3];\n
+ \ }\n state.blkIndent = oldIndent;\n return true;\n}\nfunction hr(state,
+ startLine, endLine, silent) {\n const max = state.eMarks[startLine];\n if
+ (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n
+ \ let pos = state.bMarks[startLine] + state.tShift[startLine];\n const marker
+ = state.src.charCodeAt(pos++);\n if (marker !== 42 && marker !== 45 && marker
+ !== 95) {\n return false;\n }\n let cnt = 1;\n while (pos < max) {\n
+ \ const ch = state.src.charCodeAt(pos++);\n if (ch !== marker && !isSpace(ch))
+ {\n return false;\n }\n if (ch === marker) {\n cnt++;\n }\n
+ \ }\n if (cnt < 3) {\n return false;\n }\n if (silent) {\n return
+ true;\n }\n state.line = startLine + 1;\n const token = state.push(\"hr\",
+ \"hr\", 0);\n token.map = [startLine, state.line];\n token.markup = Array(cnt
+ + 1).join(String.fromCharCode(marker));\n return true;\n}\nfunction skipBulletListMarker(state,
+ startLine) {\n const max = state.eMarks[startLine];\n let pos = state.bMarks[startLine]
+ + state.tShift[startLine];\n const marker = state.src.charCodeAt(pos++);\n
+ \ if (marker !== 42 && marker !== 45 && marker !== 43) {\n return -1;\n
+ \ }\n if (pos < max) {\n const ch = state.src.charCodeAt(pos);\n if
+ (!isSpace(ch)) {\n return -1;\n }\n }\n return pos;\n}\nfunction
+ skipOrderedListMarker(state, startLine) {\n const start = state.bMarks[startLine]
+ + state.tShift[startLine];\n const max = state.eMarks[startLine];\n let
+ pos = start;\n if (pos + 1 >= max) {\n return -1;\n }\n let ch = state.src.charCodeAt(pos++);\n
+ \ if (ch < 48 || ch > 57) {\n return -1;\n }\n for (; ; ) {\n if (pos
+ >= max) {\n return -1;\n }\n ch = state.src.charCodeAt(pos++);\n
+ \ if (ch >= 48 && ch <= 57) {\n if (pos - start >= 10) {\n return
+ -1;\n }\n continue;\n }\n if (ch === 41 || ch === 46) {\n
+ \ break;\n }\n return -1;\n }\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n
+ \ if (!isSpace(ch)) {\n return -1;\n }\n }\n return pos;\n}\nfunction
+ markTightParagraphs(state, idx) {\n const level2 = state.level + 2;\n for
+ (let i3 = idx + 2, l2 = state.tokens.length - 2; i3 < l2; i3++) {\n if
+ (state.tokens[i3].level === level2 && state.tokens[i3].type === \"paragraph_open\")
+ {\n state.tokens[i3 + 2].hidden = true;\n state.tokens[i3].hidden
+ = true;\n i3 += 2;\n }\n }\n}\nfunction list(state, startLine, endLine,
+ silent) {\n let max, pos, start, token;\n let nextLine = startLine;\n let
+ tight = true;\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n return
+ false;\n }\n if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent
+ >= 4 && state.sCount[nextLine] < state.blkIndent) {\n return false;\n }\n
+ \ let isTerminatingParagraph = false;\n if (silent && state.parentType ===
+ \"paragraph\") {\n if (state.sCount[nextLine] >= state.blkIndent) {\n isTerminatingParagraph
+ = true;\n }\n }\n let isOrdered;\n let markerValue;\n let posAfterMarker;\n
+ \ if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {\n
+ \ isOrdered = true;\n start = state.bMarks[nextLine] + state.tShift[nextLine];\n
+ \ markerValue = Number(state.src.slice(start, posAfterMarker - 1));\n if
+ (isTerminatingParagraph && markerValue !== 1) return false;\n } else if ((posAfterMarker
+ = skipBulletListMarker(state, nextLine)) >= 0) {\n isOrdered = false;\n
+ \ } else {\n return false;\n }\n if (isTerminatingParagraph) {\n if
+ (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;\n
+ \ }\n if (silent) {\n return true;\n }\n const markerCharCode = state.src.charCodeAt(posAfterMarker
+ - 1);\n const listTokIdx = state.tokens.length;\n if (isOrdered) {\n token
+ = state.push(\"ordered_list_open\", \"ol\", 1);\n if (markerValue !== 1)
+ {\n token.attrs = [[\"start\", markerValue]];\n }\n } else {\n token
+ = state.push(\"bullet_list_open\", \"ul\", 1);\n }\n const listLines = [nextLine,
+ 0];\n token.map = listLines;\n token.markup = String.fromCharCode(markerCharCode);\n
+ \ let prevEmptyEnd = false;\n const terminatorRules = state.md.block.ruler.getRules(\"list\");\n
+ \ const oldParentType = state.parentType;\n state.parentType = \"list\";\n
+ \ while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n
+ \ const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine]
+ + state.tShift[nextLine]);\n let offset = initial;\n while (pos < max)
+ {\n const ch = state.src.charCodeAt(pos);\n if (ch === 9) {\n offset
+ += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 32)
+ {\n offset++;\n } else {\n break;\n }\n pos++;\n
+ \ }\n const contentStart = pos;\n let indentAfterMarker;\n if (contentStart
+ >= max) {\n indentAfterMarker = 1;\n } else {\n indentAfterMarker
+ = offset - initial;\n }\n if (indentAfterMarker > 4) {\n indentAfterMarker
+ = 1;\n }\n const indent = initial + indentAfterMarker;\n token =
+ state.push(\"list_item_open\", \"li\", 1);\n token.markup = String.fromCharCode(markerCharCode);\n
+ \ const itemLines = [nextLine, 0];\n token.map = itemLines;\n if (isOrdered)
+ {\n token.info = state.src.slice(start, posAfterMarker - 1);\n }\n
+ \ const oldTight = state.tight;\n const oldTShift = state.tShift[nextLine];\n
+ \ const oldSCount = state.sCount[nextLine];\n const oldListIndent = state.listIndent;\n
+ \ state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n state.tight
+ = true;\n state.tShift[nextLine] = contentStart - state.bMarks[nextLine];\n
+ \ state.sCount[nextLine] = offset;\n if (contentStart >= max && state.isEmpty(nextLine
+ + 1)) {\n state.line = Math.min(state.line + 2, endLine);\n } else
+ {\n state.md.block.tokenize(state, nextLine, endLine, true);\n }\n
+ \ if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n prevEmptyEnd
+ = state.line - nextLine > 1 && state.isEmpty(state.line - 1);\n state.blkIndent
+ = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[nextLine]
+ = oldTShift;\n state.sCount[nextLine] = oldSCount;\n state.tight = oldTight;\n
+ \ token = state.push(\"list_item_close\", \"li\", -1);\n token.markup
+ = String.fromCharCode(markerCharCode);\n nextLine = state.line;\n itemLines[1]
+ = nextLine;\n if (nextLine >= endLine) {\n break;\n }\n if (state.sCount[nextLine]
+ < state.blkIndent) {\n break;\n }\n if (state.sCount[nextLine]
+ - state.blkIndent >= 4) {\n break;\n }\n let terminate = false;\n
+ \ for (let i3 = 0, l2 = terminatorRules.length; i3 < l2; i3++) {\n if
+ (terminatorRules[i3](state, nextLine, endLine, true)) {\n terminate
+ = true;\n break;\n }\n }\n if (terminate) {\n break;\n
+ \ }\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state,
+ nextLine);\n if (posAfterMarker < 0) {\n break;\n }\n start
+ = state.bMarks[nextLine] + state.tShift[nextLine];\n } else {\n posAfterMarker
+ = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) {\n
+ \ break;\n }\n }\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker
+ - 1)) {\n break;\n }\n }\n if (isOrdered) {\n token = state.push(\"ordered_list_close\",
+ \"ol\", -1);\n } else {\n token = state.push(\"bullet_list_close\", \"ul\",
+ -1);\n }\n token.markup = String.fromCharCode(markerCharCode);\n listLines[1]
+ = nextLine;\n state.line = nextLine;\n state.parentType = oldParentType;\n
+ \ if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n return
+ true;\n}\nfunction reference(state, startLine, _endLine, silent) {\n let
+ pos = state.bMarks[startLine] + state.tShift[startLine];\n let max = state.eMarks[startLine];\n
+ \ let nextLine = startLine + 1;\n if (state.sCount[startLine] - state.blkIndent
+ >= 4) {\n return false;\n }\n if (state.src.charCodeAt(pos) !== 91) {\n
+ \ return false;\n }\n function getNextLine(nextLine2) {\n const endLine
+ = state.lineMax;\n if (nextLine2 >= endLine || state.isEmpty(nextLine2))
+ {\n return null;\n }\n let isContinuation = false;\n if (state.sCount[nextLine2]
+ - state.blkIndent > 3) {\n isContinuation = true;\n }\n if (state.sCount[nextLine2]
+ < 0) {\n isContinuation = true;\n }\n if (!isContinuation) {\n
+ \ const terminatorRules = state.md.block.ruler.getRules(\"reference\");\n
+ \ const oldParentType = state.parentType;\n state.parentType = \"reference\";\n
+ \ let terminate = false;\n for (let i3 = 0, l2 = terminatorRules.length;
+ i3 < l2; i3++) {\n if (terminatorRules[i3](state, nextLine2, endLine,
+ true)) {\n terminate = true;\n break;\n }\n }\n
+ \ state.parentType = oldParentType;\n if (terminate) {\n return
+ null;\n }\n }\n const pos2 = state.bMarks[nextLine2] + state.tShift[nextLine2];\n
+ \ const max2 = state.eMarks[nextLine2];\n return state.src.slice(pos2,
+ max2 + 1);\n }\n let str = state.src.slice(pos, max + 1);\n max = str.length;\n
+ \ let labelEnd = -1;\n for (pos = 1; pos < max; pos++) {\n const ch =
+ str.charCodeAt(pos);\n if (ch === 91) {\n return false;\n } else
+ if (ch === 93) {\n labelEnd = pos;\n break;\n } else if (ch ===
+ 10) {\n const lineContent = getNextLine(nextLine);\n if (lineContent
+ !== null) {\n str += lineContent;\n max = str.length;\n nextLine++;\n
+ \ }\n } else if (ch === 92) {\n pos++;\n if (pos < max &&
+ str.charCodeAt(pos) === 10) {\n const lineContent = getNextLine(nextLine);\n
+ \ if (lineContent !== null) {\n str += lineContent;\n max
+ = str.length;\n nextLine++;\n }\n }\n }\n }\n if
+ (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) {\n return false;\n
+ \ }\n for (pos = labelEnd + 2; pos < max; pos++) {\n const ch = str.charCodeAt(pos);\n
+ \ if (ch === 10) {\n const lineContent = getNextLine(nextLine);\n if
+ (lineContent !== null) {\n str += lineContent;\n max = str.length;\n
+ \ nextLine++;\n }\n } else if (isSpace(ch)) ;\n else {\n
+ \ break;\n }\n }\n const destRes = state.md.helpers.parseLinkDestination(str,
+ pos, max);\n if (!destRes.ok) {\n return false;\n }\n const href = state.md.normalizeLink(destRes.str);\n
+ \ if (!state.md.validateLink(href)) {\n return false;\n }\n pos = destRes.pos;\n
+ \ const destEndPos = pos;\n const destEndLineNo = nextLine;\n const start
+ = pos;\n for (; pos < max; pos++) {\n const ch = str.charCodeAt(pos);\n
+ \ if (ch === 10) {\n const lineContent = getNextLine(nextLine);\n if
+ (lineContent !== null) {\n str += lineContent;\n max = str.length;\n
+ \ nextLine++;\n }\n } else if (isSpace(ch)) ;\n else {\n
+ \ break;\n }\n }\n let titleRes = state.md.helpers.parseLinkTitle(str,
+ pos, max);\n while (titleRes.can_continue) {\n const lineContent = getNextLine(nextLine);\n
+ \ if (lineContent === null) break;\n str += lineContent;\n pos = max;\n
+ \ max = str.length;\n nextLine++;\n titleRes = state.md.helpers.parseLinkTitle(str,
+ pos, max, titleRes);\n }\n let title;\n if (pos < max && start !== pos
+ && titleRes.ok) {\n title = titleRes.str;\n pos = titleRes.pos;\n }
+ else {\n title = \"\";\n pos = destEndPos;\n nextLine = destEndLineNo;\n
+ \ }\n while (pos < max) {\n const ch = str.charCodeAt(pos);\n if (!isSpace(ch))
+ {\n break;\n }\n pos++;\n }\n if (pos < max && str.charCodeAt(pos)
+ !== 10) {\n if (title) {\n title = \"\";\n pos = destEndPos;\n
+ \ nextLine = destEndLineNo;\n while (pos < max) {\n const
+ ch = str.charCodeAt(pos);\n if (!isSpace(ch)) {\n break;\n
+ \ }\n pos++;\n }\n }\n }\n if (pos < max && str.charCodeAt(pos)
+ !== 10) {\n return false;\n }\n const label = normalizeReference(str.slice(1,
+ labelEnd));\n if (!label) {\n return false;\n }\n if (silent) {\n return
+ true;\n }\n if (typeof state.env.references === \"undefined\") {\n state.env.references
+ = {};\n }\n if (typeof state.env.references[label] === \"undefined\") {\n
+ \ state.env.references[label] = { title, href };\n }\n state.line = nextLine;\n
+ \ return true;\n}\nconst block_names = [\n \"address\",\n \"article\",\n
+ \ \"aside\",\n \"base\",\n \"basefont\",\n \"blockquote\",\n \"body\",\n
+ \ \"caption\",\n \"center\",\n \"col\",\n \"colgroup\",\n \"dd\",\n \"details\",\n
+ \ \"dialog\",\n \"dir\",\n \"div\",\n \"dl\",\n \"dt\",\n \"fieldset\",\n
+ \ \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"frame\",\n
+ \ \"frameset\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n
+ \ \"head\",\n \"header\",\n \"hr\",\n \"html\",\n \"iframe\",\n \"legend\",\n
+ \ \"li\",\n \"link\",\n \"main\",\n \"menu\",\n \"menuitem\",\n \"nav\",\n
+ \ \"noframes\",\n \"ol\",\n \"optgroup\",\n \"option\",\n \"p\",\n \"param\",\n
+ \ \"search\",\n \"section\",\n \"summary\",\n \"table\",\n \"tbody\",\n
+ \ \"td\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"title\",\n \"tr\",\n
+ \ \"track\",\n \"ul\"\n];\nconst attr_name = \"[a-zA-Z_:][a-zA-Z0-9:._-]*\";\nconst
+ unquoted = \"[^\\\"'=<>`\\\\x00-\\\\x20]+\";\nconst single_quoted = \"'[^']*'\";\nconst
+ double_quoted = '\"[^\"]*\"';\nconst attr_value = \"(?:\" + unquoted + \"|\"
+ + single_quoted + \"|\" + double_quoted + \")\";\nconst attribute = \"(?:\\\\s+\"
+ + attr_name + \"(?:\\\\s*=\\\\s*\" + attr_value + \")?)\";\nconst open_tag
+ = \"<[A-Za-z][A-Za-z0-9\\\\-]*\" + attribute + \"*\\\\s*\\\\/?>\";\nconst
+ close_tag = \"<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>\";\nconst comment = \"\";\nconst
+ processing = \"<[?][\\\\s\\\\S]*?[?]>\";\nconst declaration = \"]*>\";\nconst
+ cdata = \"\";\nconst HTML_TAG_RE
+ = new RegExp(\"^(?:\" + open_tag + \"|\" + close_tag + \"|\" + comment + \"|\"
+ + processing + \"|\" + declaration + \"|\" + cdata + \")\");\nconst HTML_OPEN_CLOSE_TAG_RE
+ = new RegExp(\"^(?:\" + open_tag + \"|\" + close_tag + \")\");\nconst HTML_SEQUENCES
+ = [\n [/^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i,
+ true],\n [/^/, true],\n [/^<\\?/, /\\?>/, true],\n [/^/, true],\n [/^/, true],\n [new RegExp(\"^?(\"
+ + block_names.join(\"|\") + \")(?=(\\\\s|/?>|$))\", \"i\"), /^$/, true],\n
+ \ [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + \"\\\\s*$\"), /^$/, false]\n];\nfunction
+ html_block(state, startLine, endLine, silent) {\n let pos = state.bMarks[startLine]
+ + state.tShift[startLine];\n let max = state.eMarks[startLine];\n if (state.sCount[startLine]
+ - state.blkIndent >= 4) {\n return false;\n }\n if (!state.md.options.html)
+ {\n return false;\n }\n if (state.src.charCodeAt(pos) !== 60) {\n return
+ false;\n }\n let lineText = state.src.slice(pos, max);\n let i3 = 0;\n
+ \ for (; i3 < HTML_SEQUENCES.length; i3++) {\n if (HTML_SEQUENCES[i3][0].test(lineText))
+ {\n break;\n }\n }\n if (i3 === HTML_SEQUENCES.length) {\n return
+ false;\n }\n if (silent) {\n return HTML_SEQUENCES[i3][2];\n }\n let
+ nextLine = startLine + 1;\n if (!HTML_SEQUENCES[i3][1].test(lineText)) {\n
+ \ for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine]
+ < state.blkIndent) {\n break;\n }\n pos = state.bMarks[nextLine]
+ + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText
+ = state.src.slice(pos, max);\n if (HTML_SEQUENCES[i3][1].test(lineText))
+ {\n if (lineText.length !== 0) {\n nextLine++;\n }\n
+ \ break;\n }\n }\n }\n state.line = nextLine;\n const token
+ = state.push(\"html_block\", \"\", 0);\n token.map = [startLine, nextLine];\n
+ \ token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n
+ \ return true;\n}\nfunction heading(state, startLine, endLine, silent) {\n
+ \ let pos = state.bMarks[startLine] + state.tShift[startLine];\n let max
+ = state.eMarks[startLine];\n if (state.sCount[startLine] - state.blkIndent
+ >= 4) {\n return false;\n }\n let ch = state.src.charCodeAt(pos);\n if
+ (ch !== 35 || pos >= max) {\n return false;\n }\n let level2 = 1;\n ch
+ = state.src.charCodeAt(++pos);\n while (ch === 35 && pos < max && level2
+ <= 6) {\n level2++;\n ch = state.src.charCodeAt(++pos);\n }\n if (level2
+ > 6 || pos < max && !isSpace(ch)) {\n return false;\n }\n if (silent)
+ {\n return true;\n }\n max = state.skipSpacesBack(max, pos);\n const
+ tmp = state.skipCharsBack(max, 35, pos);\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp
+ - 1))) {\n max = tmp;\n }\n state.line = startLine + 1;\n const token_o
+ = state.push(\"heading_open\", \"h\" + String(level2), 1);\n token_o.markup
+ = \"########\".slice(0, level2);\n token_o.map = [startLine, state.line];\n
+ \ const token_i = state.push(\"inline\", \"\", 0);\n token_i.content = state.src.slice(pos,
+ max).trim();\n token_i.map = [startLine, state.line];\n token_i.children
+ = [];\n const token_c = state.push(\"heading_close\", \"h\" + String(level2),
+ -1);\n token_c.markup = \"########\".slice(0, level2);\n return true;\n}\nfunction
+ lheading(state, startLine, endLine) {\n const terminatorRules = state.md.block.ruler.getRules(\"paragraph\");\n
+ \ if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n
+ \ }\n const oldParentType = state.parentType;\n state.parentType = \"paragraph\";\n
+ \ let level2 = 0;\n let marker;\n let nextLine = startLine + 1;\n for (;
+ nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n if (state.sCount[nextLine]
+ - state.blkIndent > 3) {\n continue;\n }\n if (state.sCount[nextLine]
+ >= state.blkIndent) {\n let pos = state.bMarks[nextLine] + state.tShift[nextLine];\n
+ \ const max = state.eMarks[nextLine];\n if (pos < max) {\n marker
+ = state.src.charCodeAt(pos);\n if (marker === 45 || marker === 61)
+ {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n
+ \ if (pos >= max) {\n level2 = marker === 61 ? 1 : 2;\n
+ \ break;\n }\n }\n }\n }\n if (state.sCount[nextLine]
+ < 0) {\n continue;\n }\n let terminate = false;\n for (let i3
+ = 0, l2 = terminatorRules.length; i3 < l2; i3++) {\n if (terminatorRules[i3](state,
+ nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n
+ \ }\n if (terminate) {\n break;\n }\n }\n if (!level2) {\n
+ \ return false;\n }\n const content = state.getLines(startLine, nextLine,
+ state.blkIndent, false).trim();\n state.line = nextLine + 1;\n const token_o
+ = state.push(\"heading_open\", \"h\" + String(level2), 1);\n token_o.markup
+ = String.fromCharCode(marker);\n token_o.map = [startLine, state.line];\n
+ \ const token_i = state.push(\"inline\", \"\", 0);\n token_i.content = content;\n
+ \ token_i.map = [startLine, state.line - 1];\n token_i.children = [];\n const
+ token_c = state.push(\"heading_close\", \"h\" + String(level2), -1);\n token_c.markup
+ = String.fromCharCode(marker);\n state.parentType = oldParentType;\n return
+ true;\n}\nfunction paragraph(state, startLine, endLine) {\n const terminatorRules
+ = state.md.block.ruler.getRules(\"paragraph\");\n const oldParentType = state.parentType;\n
+ \ let nextLine = startLine + 1;\n state.parentType = \"paragraph\";\n for
+ (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n if (state.sCount[nextLine]
+ - state.blkIndent > 3) {\n continue;\n }\n if (state.sCount[nextLine]
+ < 0) {\n continue;\n }\n let terminate = false;\n for (let i3
+ = 0, l2 = terminatorRules.length; i3 < l2; i3++) {\n if (terminatorRules[i3](state,
+ nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n
+ \ }\n if (terminate) {\n break;\n }\n }\n const content = state.getLines(startLine,
+ nextLine, state.blkIndent, false).trim();\n state.line = nextLine;\n const
+ token_o = state.push(\"paragraph_open\", \"p\", 1);\n token_o.map = [startLine,
+ state.line];\n const token_i = state.push(\"inline\", \"\", 0);\n token_i.content
+ = content;\n token_i.map = [startLine, state.line];\n token_i.children =
+ [];\n state.push(\"paragraph_close\", \"p\", -1);\n state.parentType = oldParentType;\n
+ \ return true;\n}\nconst _rules$1 = [\n // First 2 params - rule name & source.
+ Secondary array - list of rules,\n // which can be terminated by this one.\n
+ \ [\"table\", table, [\"paragraph\", \"reference\"]],\n [\"code\", code],\n
+ \ [\"fence\", fence, [\"paragraph\", \"reference\", \"blockquote\", \"list\"]],\n
+ \ [\"blockquote\", blockquote, [\"paragraph\", \"reference\", \"blockquote\",
+ \"list\"]],\n [\"hr\", hr, [\"paragraph\", \"reference\", \"blockquote\",
+ \"list\"]],\n [\"list\", list, [\"paragraph\", \"reference\", \"blockquote\"]],\n
+ \ [\"reference\", reference],\n [\"html_block\", html_block, [\"paragraph\",
+ \"reference\", \"blockquote\"]],\n [\"heading\", heading, [\"paragraph\",
+ \"reference\", \"blockquote\"]],\n [\"lheading\", lheading],\n [\"paragraph\",
+ paragraph]\n];\nfunction ParserBlock() {\n this.ruler = new Ruler();\n for
+ (let i3 = 0; i3 < _rules$1.length; i3++) {\n this.ruler.push(_rules$1[i3][0],
+ _rules$1[i3][1], { alt: (_rules$1[i3][2] || []).slice() });\n }\n}\nParserBlock.prototype.tokenize
+ = function(state, startLine, endLine) {\n const rules = this.ruler.getRules(\"\");\n
+ \ const len = rules.length;\n const maxNesting = state.md.options.maxNesting;\n
+ \ let line = startLine;\n let hasEmptyLines = false;\n while (line < endLine)
+ {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine)
+ {\n break;\n }\n if (state.sCount[line] < state.blkIndent) {\n
+ \ break;\n }\n if (state.level >= maxNesting) {\n state.line
+ = endLine;\n break;\n }\n const prevLine = state.line;\n let
+ ok = false;\n for (let i3 = 0; i3 < len; i3++) {\n ok = rules[i3](state,
+ line, endLine, false);\n if (ok) {\n if (prevLine >= state.line)
+ {\n throw new Error(\"block rule didn't increment state.line\");\n
+ \ }\n break;\n }\n }\n if (!ok) throw new Error(\"none
+ of the block rules matched\");\n state.tight = !hasEmptyLines;\n if
+ (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n line
+ = state.line;\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines
+ = true;\n line++;\n state.line = line;\n }\n }\n};\nParserBlock.prototype.parse
+ = function(src, md, env, outTokens) {\n if (!src) {\n return;\n }\n const
+ state = new this.State(src, md, env, outTokens);\n this.tokenize(state, state.line,
+ state.lineMax);\n};\nParserBlock.prototype.State = StateBlock;\nfunction StateInline(src,
+ md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n
+ \ this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n
+ \ this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending
+ = \"\";\n this.pendingLevel = 0;\n this.cache = {};\n this.delimiters =
+ [];\n this._prev_delimiters = [];\n this.backticks = {};\n this.backticksScanned
+ = false;\n this.linkLevel = 0;\n}\nStateInline.prototype.pushPending = function()
+ {\n const token = new Token(\"text\", \"\", 0);\n token.content = this.pending;\n
+ \ token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending
+ = \"\";\n return token;\n};\nStateInline.prototype.push = function(type,
+ tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n const
+ token = new Token(type, tag, nesting);\n let token_meta = null;\n if (nesting
+ < 0) {\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n
+ \ }\n token.level = this.level;\n if (nesting > 0) {\n this.level++;\n
+ \ this._prev_delimiters.push(this.delimiters);\n this.delimiters = [];\n
+ \ token_meta = { delimiters: this.delimiters };\n }\n this.pendingLevel
+ = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n
+ \ return token;\n};\nStateInline.prototype.scanDelims = function(start, canSplitWord)
+ {\n const max = this.posMax;\n const marker = this.src.charCodeAt(start);\n
+ \ const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 32;\n let
+ pos = start;\n while (pos < max && this.src.charCodeAt(pos) === marker) {\n
+ \ pos++;\n }\n const count = pos - start;\n const nextChar = pos < max
+ ? this.src.charCodeAt(pos) : 32;\n const isLastPunctChar = isMdAsciiPunct(lastChar)
+ || isPunctChar(String.fromCharCode(lastChar));\n const isNextPunctChar =
+ isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n
+ \ const isLastWhiteSpace = isWhiteSpace(lastChar);\n const isNextWhiteSpace
+ = isWhiteSpace(nextChar);\n const left_flanking = !isNextWhiteSpace && (!isNextPunctChar
+ || isLastWhiteSpace || isLastPunctChar);\n const right_flanking = !isLastWhiteSpace
+ && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar);\n const can_open
+ = left_flanking && (canSplitWord || !right_flanking || isLastPunctChar);\n
+ \ const can_close = right_flanking && (canSplitWord || !left_flanking || isNextPunctChar);\n
+ \ return { can_open, can_close, length: count };\n};\nStateInline.prototype.Token
+ = Token;\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 10:\n
+ \ case 33:\n case 35:\n case 36:\n case 37:\n case 38:\n case
+ 42:\n case 43:\n case 45:\n case 58:\n case 60:\n case 61:\n
+ \ case 62:\n case 64:\n case 91:\n case 92:\n case 93:\n case
+ 94:\n case 95:\n case 96:\n case 123:\n case 125:\n case 126:\n
+ \ return true;\n default:\n return false;\n }\n}\nfunction text(state,
+ silent) {\n let pos = state.pos;\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos)))
+ {\n pos++;\n }\n if (pos === state.pos) {\n return false;\n }\n if
+ (!silent) {\n state.pending += state.src.slice(state.pos, pos);\n }\n
+ \ state.pos = pos;\n return true;\n}\nconst SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;\nfunction
+ linkify(state, silent) {\n if (!state.md.options.linkify) return false;\n
+ \ if (state.linkLevel > 0) return false;\n const pos = state.pos;\n const
+ max = state.posMax;\n if (pos + 3 > max) return false;\n if (state.src.charCodeAt(pos)
+ !== 58) return false;\n if (state.src.charCodeAt(pos + 1) !== 47) return
+ false;\n if (state.src.charCodeAt(pos + 2) !== 47) return false;\n const
+ match3 = state.pending.match(SCHEME_RE);\n if (!match3) return false;\n const
+ proto = match3[1];\n const link2 = state.md.linkify.matchAtStart(state.src.slice(pos
+ - proto.length));\n if (!link2) return false;\n let url2 = link2.url;\n
+ \ if (url2.length <= proto.length) return false;\n url2 = url2.replace(/\\*+$/,
+ \"\");\n const fullUrl = state.md.normalizeLink(url2);\n if (!state.md.validateLink(fullUrl))
+ return false;\n if (!silent) {\n state.pending = state.pending.slice(0,
+ -proto.length);\n const token_o = state.push(\"link_open\", \"a\", 1);\n
+ \ token_o.attrs = [[\"href\", fullUrl]];\n token_o.markup = \"linkify\";\n
+ \ token_o.info = \"auto\";\n const token_t = state.push(\"text\", \"\",
+ 0);\n token_t.content = state.md.normalizeLinkText(url2);\n const token_c
+ = state.push(\"link_close\", \"a\", -1);\n token_c.markup = \"linkify\";\n
+ \ token_c.info = \"auto\";\n }\n state.pos += url2.length - proto.length;\n
+ \ return true;\n}\nfunction newline(state, silent) {\n let pos = state.pos;\n
+ \ if (state.src.charCodeAt(pos) !== 10) {\n return false;\n }\n const
+ pmax = state.pending.length - 1;\n const max = state.posMax;\n if (!silent)
+ {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 32) {\n if
+ (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 32) {\n let ws
+ = pmax - 1;\n while (ws >= 1 && state.pending.charCodeAt(ws - 1) ===
+ 32) ws--;\n state.pending = state.pending.slice(0, ws);\n state.push(\"hardbreak\",
+ \"br\", 0);\n } else {\n state.pending = state.pending.slice(0,
+ -1);\n state.push(\"softbreak\", \"br\", 0);\n }\n } else {\n
+ \ state.push(\"softbreak\", \"br\", 0);\n }\n }\n pos++;\n while
+ (pos < max && isSpace(state.src.charCodeAt(pos))) {\n pos++;\n }\n state.pos
+ = pos;\n return true;\n}\nconst ESCAPED = [];\nfor (let i3 = 0; i3 < 256;
+ i3++) {\n ESCAPED.push(0);\n}\n\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach(function(ch)
+ {\n ESCAPED[ch.charCodeAt(0)] = 1;\n});\nfunction escape$1(state, silent)
+ {\n let pos = state.pos;\n const max = state.posMax;\n if (state.src.charCodeAt(pos)
+ !== 92) return false;\n pos++;\n if (pos >= max) return false;\n let ch1
+ = state.src.charCodeAt(pos);\n if (ch1 === 10) {\n if (!silent) {\n state.push(\"hardbreak\",
+ \"br\", 0);\n }\n pos++;\n while (pos < max) {\n ch1 = state.src.charCodeAt(pos);\n
+ \ if (!isSpace(ch1)) break;\n pos++;\n }\n state.pos = pos;\n
+ \ return true;\n }\n let escapedStr = state.src[pos];\n if (ch1 >= 55296
+ && ch1 <= 56319 && pos + 1 < max) {\n const ch2 = state.src.charCodeAt(pos
+ + 1);\n if (ch2 >= 56320 && ch2 <= 57343) {\n escapedStr += state.src[pos
+ + 1];\n pos++;\n }\n }\n const origStr = \"\\\\\" + escapedStr;\n
+ \ if (!silent) {\n const token = state.push(\"text_special\", \"\", 0);\n
+ \ if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n token.content = escapedStr;\n
+ \ } else {\n token.content = origStr;\n }\n token.markup = origStr;\n
+ \ token.info = \"escape\";\n }\n state.pos = pos + 1;\n return true;\n}\nfunction
+ backtick(state, silent) {\n let pos = state.pos;\n const ch = state.src.charCodeAt(pos);\n
+ \ if (ch !== 96) {\n return false;\n }\n const start = pos;\n pos++;\n
+ \ const max = state.posMax;\n while (pos < max && state.src.charCodeAt(pos)
+ === 96) {\n pos++;\n }\n const marker = state.src.slice(start, pos);\n
+ \ const openerLength = marker.length;\n if (state.backticksScanned && (state.backticks[openerLength]
+ || 0) <= start) {\n if (!silent) state.pending += marker;\n state.pos
+ += openerLength;\n return true;\n }\n let matchEnd = pos;\n let matchStart;\n
+ \ while ((matchStart = state.src.indexOf(\"`\", matchEnd)) !== -1) {\n matchEnd
+ = matchStart + 1;\n while (matchEnd < max && state.src.charCodeAt(matchEnd)
+ === 96) {\n matchEnd++;\n }\n const closerLength = matchEnd - matchStart;\n
+ \ if (closerLength === openerLength) {\n if (!silent) {\n const
+ token = state.push(\"code_inline\", \"code\", 0);\n token.markup =
+ marker;\n token.content = state.src.slice(pos, matchStart).replace(/\\n/g,
+ \" \").replace(/^ (.+) $/, \"$1\");\n }\n state.pos = matchEnd;\n
+ \ return true;\n }\n state.backticks[closerLength] = matchStart;\n
+ \ }\n state.backticksScanned = true;\n if (!silent) state.pending += marker;\n
+ \ state.pos += openerLength;\n return true;\n}\nfunction strikethrough_tokenize(state,
+ silent) {\n const start = state.pos;\n const marker = state.src.charCodeAt(start);\n
+ \ if (silent) {\n return false;\n }\n if (marker !== 126) {\n return
+ false;\n }\n const scanned = state.scanDelims(state.pos, true);\n let len
+ = scanned.length;\n const ch = String.fromCharCode(marker);\n if (len <
+ 2) {\n return false;\n }\n let token;\n if (len % 2) {\n token =
+ state.push(\"text\", \"\", 0);\n token.content = ch;\n len--;\n }\n
+ \ for (let i3 = 0; i3 < len; i3 += 2) {\n token = state.push(\"text\",
+ \"\", 0);\n token.content = ch + ch;\n state.delimiters.push({\n marker,\n
+ \ length: 0,\n // disable \"rule of 3\" length checks meant for emphasis\n
+ \ token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n
+ \ close: scanned.can_close\n });\n }\n state.pos += scanned.length;\n
+ \ return true;\n}\nfunction postProcess$1(state, delimiters) {\n let token;\n
+ \ const loneMarkers = [];\n const max = delimiters.length;\n for (let i3
+ = 0; i3 < max; i3++) {\n const startDelim = delimiters[i3];\n if (startDelim.marker
+ !== 126) {\n continue;\n }\n if (startDelim.end === -1) {\n continue;\n
+ \ }\n const endDelim = delimiters[startDelim.end];\n token = state.tokens[startDelim.token];\n
+ \ token.type = \"s_open\";\n token.tag = \"s\";\n token.nesting =
+ 1;\n token.markup = \"~~\";\n token.content = \"\";\n token = state.tokens[endDelim.token];\n
+ \ token.type = \"s_close\";\n token.tag = \"s\";\n token.nesting =
+ -1;\n token.markup = \"~~\";\n token.content = \"\";\n if (state.tokens[endDelim.token
+ - 1].type === \"text\" && state.tokens[endDelim.token - 1].content === \"~\")
+ {\n loneMarkers.push(endDelim.token - 1);\n }\n }\n while (loneMarkers.length)
+ {\n const i3 = loneMarkers.pop();\n let j2 = i3 + 1;\n while (j2
+ < state.tokens.length && state.tokens[j2].type === \"s_close\") {\n j2++;\n
+ \ }\n j2--;\n if (i3 !== j2) {\n token = state.tokens[j2];\n
+ \ state.tokens[j2] = state.tokens[i3];\n state.tokens[i3] = token;\n
+ \ }\n }\n}\nfunction strikethrough_postProcess(state) {\n const tokens_meta
+ = state.tokens_meta;\n const max = state.tokens_meta.length;\n postProcess$1(state,
+ state.delimiters);\n for (let curr = 0; curr < max; curr++) {\n if (tokens_meta[curr]
+ && tokens_meta[curr].delimiters) {\n postProcess$1(state, tokens_meta[curr].delimiters);\n
+ \ }\n }\n}\nconst r_strikethrough = {\n tokenize: strikethrough_tokenize,\n
+ \ postProcess: strikethrough_postProcess\n};\nfunction emphasis_tokenize(state,
+ silent) {\n const start = state.pos;\n const marker = state.src.charCodeAt(start);\n
+ \ if (silent) {\n return false;\n }\n if (marker !== 95 && marker !==
+ 42) {\n return false;\n }\n const scanned = state.scanDelims(state.pos,
+ marker === 42);\n for (let i3 = 0; i3 < scanned.length; i3++) {\n const
+ token = state.push(\"text\", \"\", 0);\n token.content = String.fromCharCode(marker);\n
+ \ state.delimiters.push({\n // Char code of the starting marker (number).\n
+ \ //\n marker,\n // Total length of these series of delimiters.\n
+ \ //\n length: scanned.length,\n // A position of the token
+ this delimiter corresponds to.\n //\n token: state.tokens.length
+ - 1,\n // If this delimiter is matched as a valid opener, `end` will
+ be\n // equal to its position, otherwise it's `-1`.\n //\n end:
+ -1,\n // Boolean flags that determine if this delimiter could open or
+ close\n // an emphasis.\n //\n open: scanned.can_open,\n close:
+ scanned.can_close\n });\n }\n state.pos += scanned.length;\n return
+ true;\n}\nfunction postProcess(state, delimiters) {\n const max = delimiters.length;\n
+ \ for (let i3 = max - 1; i3 >= 0; i3--) {\n const startDelim = delimiters[i3];\n
+ \ if (startDelim.marker !== 95 && startDelim.marker !== 42) {\n continue;\n
+ \ }\n if (startDelim.end === -1) {\n continue;\n }\n const
+ endDelim = delimiters[startDelim.end];\n const isStrong = i3 > 0 && delimiters[i3
+ - 1].end === startDelim.end + 1 && // check that first two markers match and
+ adjacent\n delimiters[i3 - 1].marker === startDelim.marker && delimiters[i3
+ - 1].token === startDelim.token - 1 && // check that last two markers are
+ adjacent (we can safely assume they match)\n delimiters[startDelim.end
+ + 1].token === endDelim.token + 1;\n const ch = String.fromCharCode(startDelim.marker);\n
+ \ const token_o = state.tokens[startDelim.token];\n token_o.type = isStrong
+ ? \"strong_open\" : \"em_open\";\n token_o.tag = isStrong ? \"strong\"
+ : \"em\";\n token_o.nesting = 1;\n token_o.markup = isStrong ? ch +
+ ch : ch;\n token_o.content = \"\";\n const token_c = state.tokens[endDelim.token];\n
+ \ token_c.type = isStrong ? \"strong_close\" : \"em_close\";\n token_c.tag
+ = isStrong ? \"strong\" : \"em\";\n token_c.nesting = -1;\n token_c.markup
+ = isStrong ? ch + ch : ch;\n token_c.content = \"\";\n if (isStrong)
+ {\n state.tokens[delimiters[i3 - 1].token].content = \"\";\n state.tokens[delimiters[startDelim.end
+ + 1].token].content = \"\";\n i3--;\n }\n }\n}\nfunction emphasis_post_process(state)
+ {\n const tokens_meta = state.tokens_meta;\n const max = state.tokens_meta.length;\n
+ \ postProcess(state, state.delimiters);\n for (let curr = 0; curr < max;
+ curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n
+ \ postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n}\nconst
+ r_emphasis = {\n tokenize: emphasis_tokenize,\n postProcess: emphasis_post_process\n};\nfunction
+ link(state, silent) {\n let code2, label, res, ref;\n let href = \"\";\n
+ \ let title = \"\";\n let start = state.pos;\n let parseReference = true;\n
+ \ if (state.src.charCodeAt(state.pos) !== 91) {\n return false;\n }\n
+ \ const oldPos = state.pos;\n const max = state.posMax;\n const labelStart
+ = state.pos + 1;\n const labelEnd = state.md.helpers.parseLinkLabel(state,
+ state.pos, true);\n if (labelEnd < 0) {\n return false;\n }\n let pos
+ = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 40) {\n
+ \ parseReference = false;\n pos++;\n for (; pos < max; pos++) {\n
+ \ code2 = state.src.charCodeAt(pos);\n if (!isSpace(code2) && code2
+ !== 10) {\n break;\n }\n }\n if (pos >= max) {\n return
+ false;\n }\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src,
+ pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n
+ \ if (state.md.validateLink(href)) {\n pos = res.pos;\n }
+ else {\n href = \"\";\n }\n start = pos;\n for (; pos
+ < max; pos++) {\n code2 = state.src.charCodeAt(pos);\n if (!isSpace(code2)
+ && code2 !== 10) {\n break;\n }\n }\n res = state.md.helpers.parseLinkTitle(state.src,
+ pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title
+ = res.str;\n pos = res.pos;\n for (; pos < max; pos++) {\n code2
+ = state.src.charCodeAt(pos);\n if (!isSpace(code2) && code2 !== 10)
+ {\n break;\n }\n }\n }\n }\n if (pos
+ >= max || state.src.charCodeAt(pos) !== 41) {\n parseReference = true;\n
+ \ }\n pos++;\n }\n if (parseReference) {\n if (typeof state.env.references
+ === \"undefined\") {\n return false;\n }\n if (pos < max && state.src.charCodeAt(pos)
+ === 91) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state,
+ pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n
+ \ } else {\n pos = labelEnd + 1;\n }\n } else {\n pos
+ = labelEnd + 1;\n }\n if (!label) {\n label = state.src.slice(labelStart,
+ labelEnd);\n }\n ref = state.env.references[normalizeReference(label)];\n
+ \ if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href
+ = ref.href;\n title = ref.title;\n }\n if (!silent) {\n state.pos
+ = labelStart;\n state.posMax = labelEnd;\n const token_o = state.push(\"link_open\",
+ \"a\", 1);\n const attrs = [[\"href\", href]];\n token_o.attrs = attrs;\n
+ \ if (title) {\n attrs.push([\"title\", title]);\n }\n state.linkLevel++;\n
+ \ state.md.inline.tokenize(state);\n state.linkLevel--;\n state.push(\"link_close\",
+ \"a\", -1);\n }\n state.pos = pos;\n state.posMax = max;\n return true;\n}\nfunction
+ image(state, silent) {\n let code2, content, label, pos, ref, res, title,
+ start;\n let href = \"\";\n const oldPos = state.pos;\n const max = state.posMax;\n
+ \ if (state.src.charCodeAt(state.pos) !== 33) {\n return false;\n }\n
+ \ if (state.src.charCodeAt(state.pos + 1) !== 91) {\n return false;\n }\n
+ \ const labelStart = state.pos + 2;\n const labelEnd = state.md.helpers.parseLinkLabel(state,
+ state.pos + 1, false);\n if (labelEnd < 0) {\n return false;\n }\n pos
+ = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 40) {\n
+ \ pos++;\n for (; pos < max; pos++) {\n code2 = state.src.charCodeAt(pos);\n
+ \ if (!isSpace(code2) && code2 !== 10) {\n break;\n }\n }\n
+ \ if (pos >= max) {\n return false;\n }\n start = pos;\n res
+ = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if
+ (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href))
+ {\n pos = res.pos;\n } else {\n href = \"\";\n }\n
+ \ }\n start = pos;\n for (; pos < max; pos++) {\n code2 = state.src.charCodeAt(pos);\n
+ \ if (!isSpace(code2) && code2 !== 10) {\n break;\n }\n }\n
+ \ res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n
+ \ if (pos < max && start !== pos && res.ok) {\n title = res.str;\n
+ \ pos = res.pos;\n for (; pos < max; pos++) {\n code2 = state.src.charCodeAt(pos);\n
+ \ if (!isSpace(code2) && code2 !== 10) {\n break;\n }\n
+ \ }\n } else {\n title = \"\";\n }\n if (pos >= max || state.src.charCodeAt(pos)
+ !== 41) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n
+ \ } else {\n if (typeof state.env.references === \"undefined\") {\n return
+ false;\n }\n if (pos < max && state.src.charCodeAt(pos) === 91) {\n
+ \ start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state,
+ pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n
+ \ } else {\n pos = labelEnd + 1;\n }\n } else {\n pos
+ = labelEnd + 1;\n }\n if (!label) {\n label = state.src.slice(labelStart,
+ labelEnd);\n }\n ref = state.env.references[normalizeReference(label)];\n
+ \ if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href
+ = ref.href;\n title = ref.title;\n }\n if (!silent) {\n content =
+ state.src.slice(labelStart, labelEnd);\n const tokens = [];\n state.md.inline.parse(\n
+ \ content,\n state.md,\n state.env,\n tokens\n );\n
+ \ const token = state.push(\"image\", \"img\", 0);\n const attrs = [[\"src\",
+ href], [\"alt\", \"\"]];\n token.attrs = attrs;\n token.children = tokens;\n
+ \ token.content = content;\n if (title) {\n attrs.push([\"title\",
+ title]);\n }\n }\n state.pos = pos;\n state.posMax = max;\n return
+ true;\n}\nconst EMAIL_RE = /^([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])?)*)$/;\nconst
+ AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\\x00-\\x20]*)$/;\nfunction
+ autolink(state, silent) {\n let pos = state.pos;\n if (state.src.charCodeAt(pos)
+ !== 60) {\n return false;\n }\n const start = state.pos;\n const max
+ = state.posMax;\n for (; ; ) {\n if (++pos >= max) return false;\n const
+ ch = state.src.charCodeAt(pos);\n if (ch === 60) return false;\n if
+ (ch === 62) break;\n }\n const url2 = state.src.slice(start + 1, pos);\n
+ \ if (AUTOLINK_RE.test(url2)) {\n const fullUrl = state.md.normalizeLink(url2);\n
+ \ if (!state.md.validateLink(fullUrl)) {\n return false;\n }\n if
+ (!silent) {\n const token_o = state.push(\"link_open\", \"a\", 1);\n
+ \ token_o.attrs = [[\"href\", fullUrl]];\n token_o.markup = \"autolink\";\n
+ \ token_o.info = \"auto\";\n const token_t = state.push(\"text\",
+ \"\", 0);\n token_t.content = state.md.normalizeLinkText(url2);\n const
+ token_c = state.push(\"link_close\", \"a\", -1);\n token_c.markup = \"autolink\";\n
+ \ token_c.info = \"auto\";\n }\n state.pos += url2.length + 2;\n
+ \ return true;\n }\n if (EMAIL_RE.test(url2)) {\n const fullUrl = state.md.normalizeLink(\"mailto:\"
+ + url2);\n if (!state.md.validateLink(fullUrl)) {\n return false;\n
+ \ }\n if (!silent) {\n const token_o = state.push(\"link_open\",
+ \"a\", 1);\n token_o.attrs = [[\"href\", fullUrl]];\n token_o.markup
+ = \"autolink\";\n token_o.info = \"auto\";\n const token_t = state.push(\"text\",
+ \"\", 0);\n token_t.content = state.md.normalizeLinkText(url2);\n const
+ token_c = state.push(\"link_close\", \"a\", -1);\n token_c.markup = \"autolink\";\n
+ \ token_c.info = \"auto\";\n }\n state.pos += url2.length + 2;\n
+ \ return true;\n }\n return false;\n}\nfunction isLinkOpen(str) {\n return
+ /^\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\nfunction
+ isLetter(ch) {\n const lc = ch | 32;\n return lc >= 97 && lc <= 122;\n}\nfunction
+ html_inline(state, silent) {\n if (!state.md.options.html) {\n return
+ false;\n }\n const max = state.posMax;\n const pos = state.pos;\n if (state.src.charCodeAt(pos)
+ !== 60 || pos + 2 >= max) {\n return false;\n }\n const ch = state.src.charCodeAt(pos
+ + 1);\n if (ch !== 33 && ch !== 63 && ch !== 47 && !isLetter(ch)) {\n return
+ false;\n }\n const match3 = state.src.slice(pos).match(HTML_TAG_RE);\n if
+ (!match3) {\n return false;\n }\n if (!silent) {\n const token = state.push(\"html_inline\",
+ \"\", 0);\n token.content = match3[0];\n if (isLinkOpen(token.content))
+ state.linkLevel++;\n if (isLinkClose(token.content)) state.linkLevel--;\n
+ \ }\n state.pos += match3[0].length;\n return true;\n}\nconst DIGITAL_RE
+ = /^((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nconst NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\nfunction
+ entity(state, silent) {\n const pos = state.pos;\n const max = state.posMax;\n
+ \ if (state.src.charCodeAt(pos) !== 38) return false;\n if (pos + 1 >= max)
+ return false;\n const ch = state.src.charCodeAt(pos + 1);\n if (ch === 35)
+ {\n const match3 = state.src.slice(pos).match(DIGITAL_RE);\n if (match3)
+ {\n if (!silent) {\n const code2 = match3[1][0].toLowerCase()
+ === \"x\" ? parseInt(match3[1].slice(1), 16) : parseInt(match3[1], 10);\n
+ \ const token = state.push(\"text_special\", \"\", 0);\n token.content
+ = isValidEntityCode(code2) ? fromCodePoint(code2) : fromCodePoint(65533);\n
+ \ token.markup = match3[0];\n token.info = \"entity\";\n }\n
+ \ state.pos += match3[0].length;\n return true;\n }\n } else
+ {\n const match3 = state.src.slice(pos).match(NAMED_RE);\n if (match3)
+ {\n const decoded = decodeHTML(match3[0]);\n if (decoded !== match3[0])
+ {\n if (!silent) {\n const token = state.push(\"text_special\",
+ \"\", 0);\n token.content = decoded;\n token.markup = match3[0];\n
+ \ token.info = \"entity\";\n }\n state.pos += match3[0].length;\n
+ \ return true;\n }\n }\n }\n return false;\n}\nfunction processDelimiters(delimiters)
+ {\n const openersBottom = {};\n const max = delimiters.length;\n if (!max)
+ return;\n let headerIdx = 0;\n let lastTokenIdx = -2;\n const jumps = [];\n
+ \ for (let closerIdx = 0; closerIdx < max; closerIdx++) {\n const closer
+ = delimiters[closerIdx];\n jumps.push(0);\n if (delimiters[headerIdx].marker
+ !== closer.marker || lastTokenIdx !== closer.token - 1) {\n headerIdx
+ = closerIdx;\n }\n lastTokenIdx = closer.token;\n closer.length =
+ closer.length || 0;\n if (!closer.close) continue;\n if (!openersBottom.hasOwnProperty(closer.marker))
+ {\n openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1];\n }\n
+ \ const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0)
+ + closer.length % 3];\n let openerIdx = headerIdx - jumps[headerIdx] -
+ 1;\n let newMinOpenerIdx = openerIdx;\n for (; openerIdx > minOpenerIdx;
+ openerIdx -= jumps[openerIdx] + 1) {\n const opener = delimiters[openerIdx];\n
+ \ if (opener.marker !== closer.marker) continue;\n if (opener.open
+ && opener.end < 0) {\n let isOddMatch = false;\n if (opener.close
+ || closer.open) {\n if ((opener.length + closer.length) % 3 === 0)
+ {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n
+ \ isOddMatch = true;\n }\n }\n }\n
+ \ if (!isOddMatch) {\n const lastJump = openerIdx > 0 && !delimiters[openerIdx
+ - 1].open ? jumps[openerIdx - 1] + 1 : 0;\n jumps[closerIdx] = closerIdx
+ - openerIdx + lastJump;\n jumps[openerIdx] = lastJump;\n closer.open
+ = false;\n opener.end = closerIdx;\n opener.close = false;\n
+ \ newMinOpenerIdx = -1;\n lastTokenIdx = -2;\n break;\n
+ \ }\n }\n }\n if (newMinOpenerIdx !== -1) {\n openersBottom[closer.marker][(closer.open
+ ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx;\n }\n }\n}\nfunction
+ link_pairs(state) {\n const tokens_meta = state.tokens_meta;\n const max
+ = state.tokens_meta.length;\n processDelimiters(state.delimiters);\n for
+ (let curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters)
+ {\n processDelimiters(tokens_meta[curr].delimiters);\n }\n }\n}\nfunction
+ fragments_join(state) {\n let curr, last;\n let level2 = 0;\n const tokens
+ = state.tokens;\n const max = state.tokens.length;\n for (curr = last =
+ 0; curr < max; curr++) {\n if (tokens[curr].nesting < 0) level2--;\n tokens[curr].level
+ = level2;\n if (tokens[curr].nesting > 0) level2++;\n if (tokens[curr].type
+ === \"text\" && curr + 1 < max && tokens[curr + 1].type === \"text\") {\n
+ \ tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n
+ \ } else {\n if (curr !== last) {\n tokens[last] = tokens[curr];\n
+ \ }\n last++;\n }\n }\n if (curr !== last) {\n tokens.length
+ = last;\n }\n}\nconst _rules = [\n [\"text\", text],\n [\"linkify\", linkify],\n
+ \ [\"newline\", newline],\n [\"escape\", escape$1],\n [\"backticks\", backtick],\n
+ \ [\"strikethrough\", r_strikethrough.tokenize],\n [\"emphasis\", r_emphasis.tokenize],\n
+ \ [\"link\", link],\n [\"image\", image],\n [\"autolink\", autolink],\n
+ \ [\"html_inline\", html_inline],\n [\"entity\", entity]\n];\nconst _rules2
+ = [\n [\"balance_pairs\", link_pairs],\n [\"strikethrough\", r_strikethrough.postProcess],\n
+ \ [\"emphasis\", r_emphasis.postProcess],\n // rules for pairs separate '**'
+ into its own text tokens, which may be left unused,\n // rule below merges
+ unused segments back with the rest of the text\n [\"fragments_join\", fragments_join]\n];\nfunction
+ ParserInline() {\n this.ruler = new Ruler();\n for (let i3 = 0; i3 < _rules.length;
+ i3++) {\n this.ruler.push(_rules[i3][0], _rules[i3][1]);\n }\n this.ruler2
+ = new Ruler();\n for (let i3 = 0; i3 < _rules2.length; i3++) {\n this.ruler2.push(_rules2[i3][0],
+ _rules2[i3][1]);\n }\n}\nParserInline.prototype.skipToken = function(state)
+ {\n const pos = state.pos;\n const rules = this.ruler.getRules(\"\");\n
+ \ const len = rules.length;\n const maxNesting = state.md.options.maxNesting;\n
+ \ const cache = state.cache;\n if (typeof cache[pos] !== \"undefined\") {\n
+ \ state.pos = cache[pos];\n return;\n }\n let ok = false;\n if (state.level
+ < maxNesting) {\n for (let i3 = 0; i3 < len; i3++) {\n state.level++;\n
+ \ ok = rules[i3](state, true);\n state.level--;\n if (ok) {\n
+ \ if (pos >= state.pos) {\n throw new Error(\"inline rule didn't
+ increment state.pos\");\n }\n break;\n }\n }\n } else
+ {\n state.pos = state.posMax;\n }\n if (!ok) {\n state.pos++;\n }\n
+ \ cache[pos] = state.pos;\n};\nParserInline.prototype.tokenize = function(state)
+ {\n const rules = this.ruler.getRules(\"\");\n const len = rules.length;\n
+ \ const end = state.posMax;\n const maxNesting = state.md.options.maxNesting;\n
+ \ while (state.pos < end) {\n const prevPos = state.pos;\n let ok =
+ false;\n if (state.level < maxNesting) {\n for (let i3 = 0; i3 < len;
+ i3++) {\n ok = rules[i3](state, false);\n if (ok) {\n if
+ (prevPos >= state.pos) {\n throw new Error(\"inline rule didn't
+ increment state.pos\");\n }\n break;\n }\n }\n
+ \ }\n if (ok) {\n if (state.pos >= end) {\n break;\n }\n
+ \ continue;\n }\n state.pending += state.src[state.pos++];\n }\n
+ \ if (state.pending) {\n state.pushPending();\n }\n};\nParserInline.prototype.parse
+ = function(str, md, env, outTokens) {\n const state = new this.State(str,
+ md, env, outTokens);\n this.tokenize(state);\n const rules = this.ruler2.getRules(\"\");\n
+ \ const len = rules.length;\n for (let i3 = 0; i3 < len; i3++) {\n rules[i3](state);\n
+ \ }\n};\nParserInline.prototype.State = StateInline;\nfunction reFactory(opts)
+ {\n const re = {};\n opts = opts || {};\n re.src_Any = Any.source;\n re.src_Cc
+ = Cc.source;\n re.src_Z = Z.source;\n re.src_P = P.source;\n re.src_ZPCc
+ = [re.src_Z, re.src_P, re.src_Cc].join(\"|\");\n re.src_ZCc = [re.src_Z,
+ re.src_Cc].join(\"|\");\n const text_separators = \"[><|]\";\n re.src_pseudo_letter
+ = \"(?:(?!\" + text_separators + \"|\" + re.src_ZPCc + \")\" + re.src_Any
+ + \")\";\n re.src_ip4 = \"(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n
+ \ re.src_auth = \"(?:(?:(?!\" + re.src_ZCc + \"|[@/\\\\[\\\\]()]).)+@)?\";\n
+ \ re.src_port = \"(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?\";\n
+ \ re.src_host_terminator = \"(?=$|\" + text_separators + \"|\" + re.src_ZPCc
+ + \")(?!\" + (opts[\"---\"] ? \"-(?!--)|\" : \"-|\") + \"_|:\\\\d|\\\\.-|\\\\.(?!$|\"
+ + re.src_ZPCc + \"))\";\n re.src_path = \"(?:[/?#](?:(?!\" + re.src_ZCc +
+ \"|\" + text_separators + `|[()[\\\\]{}.,\"'?!\\\\-;]).|\\\\[(?:(?!` + re.src_ZCc
+ + \"|\\\\]).)*\\\\]|\\\\((?:(?!\" + re.src_ZCc + \"|[)]).)*\\\\)|\\\\{(?:(?!\"
+ + re.src_ZCc + '|[}]).)*\\\\}|\\\\\"(?:(?!' + re.src_ZCc + `|[\"]).)+\\\\\"|\\\\'(?:(?!`
+ + re.src_ZCc + \"|[']).)+\\\\'|\\\\'(?=\" + re.src_pseudo_letter + \"|[-])|\\\\.{2,}[a-zA-Z0-9%/&]|\\\\.(?!\"
+ + re.src_ZCc + \"|[.]|$)|\" + (opts[\"---\"] ? \"\\\\-(?!--(?:[^-]|$))(?:-*)|\"
+ : \"\\\\-+|\") + // allow `,,,` in paths\n \",(?!\" + re.src_ZCc + \"|$)|;(?!\"
+ + re.src_ZCc + \"|$)|\\\\!+(?!\" + re.src_ZCc + \"|[!]|$)|\\\\?(?!\" + re.src_ZCc
+ + \"|[?]|$))+|\\\\/)?\";\n re.src_email_name = '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n
+ \ re.src_xn = \"xn--[a-z0-9\\\\-]{1,59}\";\n re.src_domain_root = // Allow
+ letters & digits (http://test1)\n \"(?:\" + re.src_xn + \"|\" + re.src_pseudo_letter
+ + \"{1,63})\";\n re.src_domain = \"(?:\" + re.src_xn + \"|(?:\" + re.src_pseudo_letter
+ + \")|(?:\" + re.src_pseudo_letter + \"(?:-|\" + re.src_pseudo_letter + \"){0,61}\"
+ + re.src_pseudo_letter + \"))\";\n re.src_host = \"(?:(?:(?:(?:\" + re.src_domain
+ + \")\\\\.)*\" + re.src_domain + \"))\";\n re.tpl_host_fuzzy = \"(?:\" +
+ re.src_ip4 + \"|(?:(?:(?:\" + re.src_domain + \")\\\\.)+(?:%TLDS%)))\";\n
+ \ re.tpl_host_no_ip_fuzzy = \"(?:(?:(?:\" + re.src_domain + \")\\\\.)+(?:%TLDS%))\";\n
+ \ re.src_host_strict = re.src_host + re.src_host_terminator;\n re.tpl_host_fuzzy_strict
+ = re.tpl_host_fuzzy + re.src_host_terminator;\n re.src_host_port_strict =
+ re.src_host + re.src_port + re.src_host_terminator;\n re.tpl_host_port_fuzzy_strict
+ = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n re.tpl_host_port_no_ip_fuzzy_strict
+ = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;\n re.tpl_host_fuzzy_test
+ = \"localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:\" + re.src_ZPCc
+ + \"|>|$))\";\n re.tpl_email_fuzzy = \"(^|\" + text_separators + '|\"|\\\\(|'
+ + re.src_ZCc + \")(\" + re.src_email_name + \"@\" + re.tpl_host_fuzzy_strict
+ + \")\";\n re.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\\-
+ and non punctuation.\n // but can start with > (markdown blockquote)\n \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`||]|\"
+ + re.src_ZPCc + \"))((?![$+<=>^`||])\" + re.tpl_host_port_fuzzy_strict + re.src_path
+ + \")\";\n re.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with
+ .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n
+ \ \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`||]|\" + re.src_ZPCc + \"))((?![$+<=>^`||])\"
+ + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + \")\";\n return re;\n}\nfunction
+ assign(obj) {\n const sources = Array.prototype.slice.call(arguments, 1);\n
+ \ sources.forEach(function(source) {\n if (!source) {\n return;\n
+ \ }\n Object.keys(source).forEach(function(key) {\n obj[key] = source[key];\n
+ \ });\n });\n return obj;\n}\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction
+ isString(obj) {\n return _class(obj) === \"[object String]\";\n}\nfunction
+ isObject$1(obj) {\n return _class(obj) === \"[object Object]\";\n}\nfunction
+ isRegExp(obj) {\n return _class(obj) === \"[object RegExp]\";\n}\nfunction
+ isFunction$1(obj) {\n return _class(obj) === \"[object Function]\";\n}\nfunction
+ escapeRE(str) {\n return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n}\nconst
+ defaultOptions$1 = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP:
+ false\n};\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function(acc,
+ k3) {\n return acc || defaultOptions$1.hasOwnProperty(k3);\n }, false);\n}\nconst
+ defaultSchemas = {\n \"http:\": {\n validate: function(text2, pos, self2)
+ {\n const tail = text2.slice(pos);\n if (!self2.re.http) {\n self2.re.http
+ = new RegExp(\n \"^\\\\/\\\\/\" + self2.re.src_auth + self2.re.src_host_port_strict
+ + self2.re.src_path,\n \"i\"\n );\n }\n if (self2.re.http.test(tail))
+ {\n return tail.match(self2.re.http)[0].length;\n }\n return
+ 0;\n }\n },\n \"https:\": \"http:\",\n \"ftp:\": \"http:\",\n \"//\":
+ {\n validate: function(text2, pos, self2) {\n const tail = text2.slice(pos);\n
+ \ if (!self2.re.no_http) {\n self2.re.no_http = new RegExp(\n \"^\"
+ + self2.re.src_auth + // Don't allow single-level domains, because of false
+ positives like '//test'\n // with code comments\n \"(?:localhost|(?:(?:\"
+ + self2.re.src_domain + \")\\\\.)+\" + self2.re.src_domain_root + \")\" +
+ self2.re.src_port + self2.re.src_host_terminator + self2.re.src_path,\n \"i\"\n
+ \ );\n }\n if (self2.re.no_http.test(tail)) {\n if
+ (pos >= 3 && text2[pos - 3] === \":\") {\n return 0;\n }\n
+ \ if (pos >= 3 && text2[pos - 3] === \"/\") {\n return 0;\n
+ \ }\n return tail.match(self2.re.no_http)[0].length;\n }\n
+ \ return 0;\n }\n },\n \"mailto:\": {\n validate: function(text2,
+ pos, self2) {\n const tail = text2.slice(pos);\n if (!self2.re.mailto)
+ {\n self2.re.mailto = new RegExp(\n \"^\" + self2.re.src_email_name
+ + \"@\" + self2.re.src_host_strict,\n \"i\"\n );\n }\n
+ \ if (self2.re.mailto.test(tail)) {\n return tail.match(self2.re.mailto)[0].length;\n
+ \ }\n return 0;\n }\n }\n};\nconst tlds_2ch_src_re = \"a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]\";\nconst
+ tlds_default = \"biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\".split(\"|\");\nfunction
+ resetScanCache(self2) {\n self2.__index__ = -1;\n self2.__text_cache__ =
+ \"\";\n}\nfunction createValidator(re) {\n return function(text2, pos) {\n
+ \ const tail = text2.slice(pos);\n if (re.test(tail)) {\n return
+ tail.match(re)[0].length;\n }\n return 0;\n };\n}\nfunction createNormalizer()
+ {\n return function(match3, self2) {\n self2.normalize(match3);\n };\n}\nfunction
+ compile(self2) {\n const re = self2.re = reFactory(self2.__opts__);\n const
+ tlds2 = self2.__tlds__.slice();\n self2.onCompile();\n if (!self2.__tlds_replaced__)
+ {\n tlds2.push(tlds_2ch_src_re);\n }\n tlds2.push(re.src_xn);\n re.src_tlds
+ = tlds2.join(\"|\");\n function untpl(tpl) {\n return tpl.replace(\"%TLDS%\",
+ re.src_tlds);\n }\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), \"i\");\n
+ \ re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), \"i\");\n re.link_no_ip_fuzzy
+ = RegExp(untpl(re.tpl_link_no_ip_fuzzy), \"i\");\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test),
+ \"i\");\n const aliases = [];\n self2.__compiled__ = {};\n function schemaError(name,
+ val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\":
+ ' + val);\n }\n Object.keys(self2.__schemas__).forEach(function(name) {\n
+ \ const val = self2.__schemas__[name];\n if (val === null) {\n return;\n
+ \ }\n const compiled = { validate: null, link: null };\n self2.__compiled__[name]
+ = compiled;\n if (isObject$1(val)) {\n if (isRegExp(val.validate))
+ {\n compiled.validate = createValidator(val.validate);\n } else
+ if (isFunction$1(val.validate)) {\n compiled.validate = val.validate;\n
+ \ } else {\n schemaError(name, val);\n }\n if (isFunction$1(val.normalize))
+ {\n compiled.normalize = val.normalize;\n } else if (!val.normalize)
+ {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name,
+ val);\n }\n return;\n }\n if (isString(val)) {\n aliases.push(name);\n
+ \ return;\n }\n schemaError(name, val);\n });\n aliases.forEach(function(alias)
+ {\n if (!self2.__compiled__[self2.__schemas__[alias]]) {\n return;\n
+ \ }\n self2.__compiled__[alias].validate = self2.__compiled__[self2.__schemas__[alias]].validate;\n
+ \ self2.__compiled__[alias].normalize = self2.__compiled__[self2.__schemas__[alias]].normalize;\n
+ \ });\n self2.__compiled__[\"\"] = { validate: null, normalize: createNormalizer()
+ };\n const slist = Object.keys(self2.__compiled__).filter(function(name)
+ {\n return name.length > 0 && self2.__compiled__[name];\n }).map(escapeRE).join(\"|\");\n
+ \ self2.re.schema_test = RegExp(\"(^|(?!_)(?:[><|]|\" + re.src_ZPCc + \"))(\"
+ + slist + \")\", \"i\");\n self2.re.schema_search = RegExp(\"(^|(?!_)(?:[><|]|\"
+ + re.src_ZPCc + \"))(\" + slist + \")\", \"ig\");\n self2.re.schema_at_start
+ = RegExp(\"^\" + self2.re.schema_search.source, \"i\");\n self2.re.pretest
+ = RegExp(\n \"(\" + self2.re.schema_test.source + \")|(\" + self2.re.host_fuzzy_test.source
+ + \")|@\",\n \"i\"\n );\n resetScanCache(self2);\n}\nfunction Match(self2,
+ shift) {\n const start = self2.__index__;\n const end = self2.__last_index__;\n
+ \ const text2 = self2.__text_cache__.slice(start, end);\n this.schema = self2.__schema__.toLowerCase();\n
+ \ this.index = start + shift;\n this.lastIndex = end + shift;\n this.raw
+ = text2;\n this.text = text2;\n this.url = text2;\n}\nfunction createMatch(self2,
+ shift) {\n const match3 = new Match(self2, shift);\n self2.__compiled__[match3.schema].normalize(match3,
+ self2);\n return match3;\n}\nfunction LinkifyIt(schemas, options) {\n if
+ (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n
+ \ }\n if (!options) {\n if (isOptionsObj(schemas)) {\n options =
+ schemas;\n schemas = {};\n }\n }\n this.__opts__ = assign({}, defaultOptions$1,
+ options);\n this.__index__ = -1;\n this.__last_index__ = -1;\n this.__schema__
+ = \"\";\n this.__text_cache__ = \"\";\n this.__schemas__ = assign({}, defaultSchemas,
+ schemas);\n this.__compiled__ = {};\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__
+ = false;\n this.re = {};\n compile(this);\n}\nLinkifyIt.prototype.add =
+ function add(schema, definition) {\n this.__schemas__[schema] = definition;\n
+ \ compile(this);\n return this;\n};\nLinkifyIt.prototype.set = function set(options)
+ {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\nLinkifyIt.prototype.test
+ = function test(text2) {\n this.__text_cache__ = text2;\n this.__index__
+ = -1;\n if (!text2.length) {\n return false;\n }\n let m2, ml, me, len,
+ shift, next, re, tld_pos, at_pos;\n if (this.re.schema_test.test(text2))
+ {\n re = this.re.schema_search;\n re.lastIndex = 0;\n while ((m2
+ = re.exec(text2)) !== null) {\n len = this.testSchemaAt(text2, m2[2],
+ re.lastIndex);\n if (len) {\n this.__schema__ = m2[2];\n this.__index__
+ = m2.index + m2[1].length;\n this.__last_index__ = m2.index + m2[0].length
+ + len;\n break;\n }\n }\n }\n if (this.__opts__.fuzzyLink
+ && this.__compiled__[\"http:\"]) {\n tld_pos = text2.search(this.re.host_fuzzy_test);\n
+ \ if (tld_pos >= 0) {\n if (this.__index__ < 0 || tld_pos < this.__index__)
+ {\n if ((ml = text2.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy
+ : this.re.link_no_ip_fuzzy)) !== null) {\n shift = ml.index + ml[1].length;\n
+ \ if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__
+ = \"\";\n this.__index__ = shift;\n this.__last_index__
+ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n
+ \ if (this.__opts__.fuzzyEmail && this.__compiled__[\"mailto:\"]) {\n at_pos
+ = text2.indexOf(\"@\");\n if (at_pos >= 0) {\n if ((me = text2.match(this.re.email_fuzzy))
+ !== null) {\n shift = me.index + me[1].length;\n next = me.index
+ + me[0].length;\n if (this.__index__ < 0 || shift < this.__index__
+ || shift === this.__index__ && next > this.__last_index__) {\n this.__schema__
+ = \"mailto:\";\n this.__index__ = shift;\n this.__last_index__
+ = next;\n }\n }\n }\n }\n return this.__index__ >= 0;\n};\nLinkifyIt.prototype.pretest
+ = function pretest(text2) {\n return this.re.pretest.test(text2);\n};\nLinkifyIt.prototype.testSchemaAt
+ = function testSchemaAt(text2, schema, pos) {\n if (!this.__compiled__[schema.toLowerCase()])
+ {\n return 0;\n }\n return this.__compiled__[schema.toLowerCase()].validate(text2,
+ pos, this);\n};\nLinkifyIt.prototype.match = function match(text2) {\n const
+ result = [];\n let shift = 0;\n if (this.__index__ >= 0 && this.__text_cache__
+ === text2) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n
+ \ }\n let tail = shift ? text2.slice(shift) : text2;\n while (this.test(tail))
+ {\n result.push(createMatch(this, shift));\n tail = tail.slice(this.__last_index__);\n
+ \ shift += this.__last_index__;\n }\n if (result.length) {\n return
+ result;\n }\n return null;\n};\nLinkifyIt.prototype.matchAtStart = function
+ matchAtStart(text2) {\n this.__text_cache__ = text2;\n this.__index__ =
+ -1;\n if (!text2.length) return null;\n const m2 = this.re.schema_at_start.exec(text2);\n
+ \ if (!m2) return null;\n const len = this.testSchemaAt(text2, m2[2], m2[0].length);\n
+ \ if (!len) return null;\n this.__schema__ = m2[2];\n this.__index__ = m2.index
+ + m2[1].length;\n this.__last_index__ = m2.index + m2[0].length + len;\n
+ \ return createMatch(this, 0);\n};\nLinkifyIt.prototype.tlds = function tlds(list2,
+ keepOld) {\n list2 = Array.isArray(list2) ? list2 : [list2];\n if (!keepOld)
+ {\n this.__tlds__ = list2.slice();\n this.__tlds_replaced__ = true;\n
+ \ compile(this);\n return this;\n }\n this.__tlds__ = this.__tlds__.concat(list2).sort().filter(function(el,
+ idx, arr) {\n return el !== arr[idx - 1];\n }).reverse();\n compile(this);\n
+ \ return this;\n};\nLinkifyIt.prototype.normalize = function normalize(match3)
+ {\n if (!match3.schema) {\n match3.url = \"http://\" + match3.url;\n }\n
+ \ if (match3.schema === \"mailto:\" && !/^mailto:/i.test(match3.url)) {\n
+ \ match3.url = \"mailto:\" + match3.url;\n }\n};\nLinkifyIt.prototype.onCompile
+ = function onCompile() {\n};\nconst maxInt = 2147483647;\nconst base = 36;\nconst
+ tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias
+ = 72;\nconst initialN = 128;\nconst delimiter = \"-\";\nconst regexPunycode
+ = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/;\nconst regexSeparators =
+ /[\\x2E\\u3002\\uFF0E\\uFF61]/g;\nconst errors = {\n \"overflow\": \"Overflow:
+ input needs wider integers to process\",\n \"not-basic\": \"Illegal input
+ >= 0x80 (not a basic code point)\",\n \"invalid-input\": \"Invalid input\"\n};\nconst
+ baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode
+ = String.fromCharCode;\nfunction error(type) {\n throw new RangeError(errors[type]);\n}\nfunction
+ map(array2, callback) {\n const result = [];\n let length = array2.length;\n
+ \ while (length--) {\n result[length] = callback(array2[length]);\n }\n
+ \ return result;\n}\nfunction mapDomain(domain, callback) {\n const parts
+ = domain.split(\"@\");\n let result = \"\";\n if (parts.length > 1) {\n
+ \ result = parts[0] + \"@\";\n domain = parts[1];\n }\n domain = domain.replace(regexSeparators,
+ \".\");\n const labels = domain.split(\".\");\n const encoded = map(labels,
+ callback).join(\".\");\n return result + encoded;\n}\nfunction ucs2decode(string2)
+ {\n const output = [];\n let counter = 0;\n const length = string2.length;\n
+ \ while (counter < length) {\n const value = string2.charCodeAt(counter++);\n
+ \ if (value >= 55296 && value <= 56319 && counter < length) {\n const
+ extra = string2.charCodeAt(counter++);\n if ((extra & 64512) == 56320)
+ {\n output.push(((value & 1023) << 10) + (extra & 1023) + 65536);\n
+ \ } else {\n output.push(value);\n counter--;\n }\n
+ \ } else {\n output.push(value);\n }\n }\n return output;\n}\nconst
+ ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);\nconst basicToDigit
+ = function(codePoint) {\n if (codePoint >= 48 && codePoint < 58) {\n return
+ 26 + (codePoint - 48);\n }\n if (codePoint >= 65 && codePoint < 91) {\n
+ \ return codePoint - 65;\n }\n if (codePoint >= 97 && codePoint < 123)
+ {\n return codePoint - 97;\n }\n return base;\n};\nconst digitToBasic
+ = function(digit, flag) {\n return digit + 22 + 75 * (digit < 26) - ((flag
+ != 0) << 5);\n};\nconst adapt = function(delta, numPoints, firstTime) {\n
+ \ let k3 = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta
+ += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1;
+ k3 += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k3
+ + (baseMinusTMin + 1) * delta / (delta + skew));\n};\nconst decode = function(input)
+ {\n const output = [];\n const inputLength = input.length;\n let i3 = 0;\n
+ \ let n3 = initialN;\n let bias = initialBias;\n let basic = input.lastIndexOf(delimiter);\n
+ \ if (basic < 0) {\n basic = 0;\n }\n for (let j2 = 0; j2 < basic; ++j2)
+ {\n if (input.charCodeAt(j2) >= 128) {\n error(\"not-basic\");\n }\n
+ \ output.push(input.charCodeAt(j2));\n }\n for (let index2 = basic > 0
+ ? basic + 1 : 0; index2 < inputLength; ) {\n const oldi = i3;\n for
+ (let w = 1, k3 = base; ; k3 += base) {\n if (index2 >= inputLength) {\n
+ \ error(\"invalid-input\");\n }\n const digit = basicToDigit(input.charCodeAt(index2++));\n
+ \ if (digit >= base) {\n error(\"invalid-input\");\n }\n if
+ (digit > floor((maxInt - i3) / w)) {\n error(\"overflow\");\n }\n
+ \ i3 += digit * w;\n const t2 = k3 <= bias ? tMin : k3 >= bias +
+ tMax ? tMax : k3 - bias;\n if (digit < t2) {\n break;\n }\n
+ \ const baseMinusT = base - t2;\n if (w > floor(maxInt / baseMinusT))
+ {\n error(\"overflow\");\n }\n w *= baseMinusT;\n }\n
+ \ const out = output.length + 1;\n bias = adapt(i3 - oldi, out, oldi
+ == 0);\n if (floor(i3 / out) > maxInt - n3) {\n error(\"overflow\");\n
+ \ }\n n3 += floor(i3 / out);\n i3 %= out;\n output.splice(i3++,
+ 0, n3);\n }\n return String.fromCodePoint(...output);\n};\nconst encode
+ = function(input) {\n const output = [];\n input = ucs2decode(input);\n
+ \ const inputLength = input.length;\n let n3 = initialN;\n let delta = 0;\n
+ \ let bias = initialBias;\n for (const currentValue of input) {\n if (currentValue
+ < 128) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n
+ \ const basicLength = output.length;\n let handledCPCount = basicLength;\n
+ \ if (basicLength) {\n output.push(delimiter);\n }\n while (handledCPCount
+ < inputLength) {\n let m2 = maxInt;\n for (const currentValue of input)
+ {\n if (currentValue >= n3 && currentValue < m2) {\n m2 = currentValue;\n
+ \ }\n }\n const handledCPCountPlusOne = handledCPCount + 1;\n if
+ (m2 - n3 > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error(\"overflow\");\n
+ \ }\n delta += (m2 - n3) * handledCPCountPlusOne;\n n3 = m2;\n for
+ (const currentValue of input) {\n if (currentValue < n3 && ++delta >
+ maxInt) {\n error(\"overflow\");\n }\n if (currentValue ===
+ n3) {\n let q = delta;\n for (let k3 = base; ; k3 += base) {\n
+ \ const t2 = k3 <= bias ? tMin : k3 >= bias + tMax ? tMax : k3 - bias;\n
+ \ if (q < t2) {\n break;\n }\n const
+ qMinusT = q - t2;\n const baseMinusT = base - t2;\n output.push(\n
+ \ stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0))\n
+ \ );\n q = floor(qMinusT / baseMinusT);\n }\n output.push(stringFromCharCode(digitToBasic(q,
+ 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount ===
+ basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n
+ \ ++delta;\n ++n3;\n }\n return output.join(\"\");\n};\nconst toUnicode
+ = function(input) {\n return mapDomain(input, function(string2) {\n return
+ regexPunycode.test(string2) ? decode(string2.slice(4).toLowerCase()) : string2;\n
+ \ });\n};\nconst toASCII = function(input) {\n return mapDomain(input, function(string2)
+ {\n return regexNonASCII.test(string2) ? \"xn--\" + encode(string2) : string2;\n
+ \ });\n};\nconst punycode = {\n /**\n * A string representing the current
+ Punycode.js version number.\n * @memberOf punycode\n * @type String\n
+ \ */\n \"version\": \"2.3.1\",\n /**\n * An object of methods to convert
+ from JavaScript's internal character\n * representation (UCS-2) to Unicode
+ code points, and back.\n * @see \n
+ \ * @memberOf punycode\n * @type Object\n */\n \"ucs2\": {\n \"decode\":
+ ucs2decode,\n \"encode\": ucs2encode\n },\n \"decode\": decode,\n \"encode\":
+ encode,\n \"toASCII\": toASCII,\n \"toUnicode\": toUnicode\n};\nconst cfg_default
+ = {\n options: {\n // Enable HTML tags in source\n html: false,\n //
+ Use '/' to close single tags (
)\n xhtmlOut: false,\n // Convert
+ '\\n' in paragraphs into
\n breaks: false,\n // CSS language prefix
+ for fenced blocks\n langPrefix: \"language-\",\n // autoconvert URL-like
+ texts to links\n linkify: false,\n // Enable some language-neutral replacements
+ + quotes beautification\n typographer: false,\n // Double + single quotes
+ replacement pairs, when typographer enabled,\n // and smartquotes on. Could
+ be either a String or an Array.\n //\n // For example, you can use '«»„“'
+ for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0',
+ '\\xA0›'] for French (including nbsp).\n quotes: \"“”‘’\",\n /* “”‘’
+ */\n // Highlighter function. Should return escaped HTML,\n // or ''
+ if the source string is not changed and should be escaped externaly.\n //
+ If result starts with )\n xhtmlOut: false,\n // Convert
+ '\\n' in paragraphs into
\n breaks: false,\n // CSS language prefix
+ for fenced blocks\n langPrefix: \"language-\",\n // autoconvert URL-like
+ texts to links\n linkify: false,\n // Enable some language-neutral replacements
+ + quotes beautification\n typographer: false,\n // Double + single quotes
+ replacement pairs, when typographer enabled,\n // and smartquotes on. Could
+ be either a String or an Array.\n //\n // For example, you can use '«»„“'
+ for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0',
+ '\\xA0›'] for French (including nbsp).\n quotes: \"“”‘’\",\n /* “”‘’
+ */\n // Highlighter function. Should return escaped HTML,\n // or ''
+ if the source string is not changed and should be escaped externaly.\n //
+ If result starts with )\n xhtmlOut: true,\n // Convert
+ '\\n' in paragraphs into
\n breaks: false,\n // CSS language prefix
+ for fenced blocks\n langPrefix: \"language-\",\n // autoconvert URL-like
+ texts to links\n linkify: false,\n // Enable some language-neutral replacements
+ + quotes beautification\n typographer: false,\n // Double + single quotes
+ replacement pairs, when typographer enabled,\n // and smartquotes on. Could
+ be either a String or an Array.\n //\n // For example, you can use '«»„“'
+ for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0',
+ '\\xA0›'] for French (including nbsp).\n quotes: \"“”‘’\",\n /* “”‘’
+ */\n // Highlighter function. Should return escaped HTML,\n // or ''
+ if the source string is not changed and should be escaped externaly.\n //
+ If result starts with = 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n
+ \ } catch (er) {\n }\n }\n }\n return encode$1(format(parsed));\n}\nfunction
+ normalizeLinkText(url2) {\n const parsed = urlParse(url2, true);\n if (parsed.hostname)
+ {\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol)
+ >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n
+ \ } catch (er) {\n }\n }\n }\n return decode$1(format(parsed),
+ decode$1.defaultChars + \"%\");\n}\nfunction MarkdownIt(presetName, options)
+ {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName,
+ options);\n }\n if (!options) {\n if (!isString$1(presetName)) {\n options
+ = presetName || {};\n presetName = \"default\";\n }\n }\n this.inline
+ = new ParserInline();\n this.block = new ParserBlock();\n this.core = new
+ Core();\n this.renderer = new Renderer();\n this.linkify = new LinkifyIt();\n
+ \ this.validateLink = validateLink;\n this.normalizeLink = normalizeLink;\n
+ \ this.normalizeLinkText = normalizeLinkText;\n this.utils = utils;\n this.helpers
+ = assign$1({}, helpers);\n this.options = {};\n this.configure(presetName);\n
+ \ if (options) {\n this.set(options);\n }\n}\nMarkdownIt.prototype.set
+ = function(options) {\n assign$1(this.options, options);\n return this;\n};\nMarkdownIt.prototype.configure
+ = function(presets) {\n const self2 = this;\n if (isString$1(presets)) {\n
+ \ const presetName = presets;\n presets = config$3[presetName];\n if
+ (!presets) {\n throw new Error('Wrong `markdown-it` preset \"' + presetName
+ + '\", check name');\n }\n }\n if (!presets) {\n throw new Error(\"Wrong
+ `markdown-it` preset, can't be empty\");\n }\n if (presets.options) {\n
+ \ self2.set(presets.options);\n }\n if (presets.components) {\n Object.keys(presets.components).forEach(function(name)
+ {\n if (presets.components[name].rules) {\n self2[name].ruler.enableOnly(presets.components[name].rules);\n
+ \ }\n if (presets.components[name].rules2) {\n self2[name].ruler2.enableOnly(presets.components[name].rules2);\n
+ \ }\n });\n }\n return this;\n};\nMarkdownIt.prototype.enable = function(list2,
+ ignoreInvalid) {\n let result = [];\n if (!Array.isArray(list2)) {\n list2
+ = [list2];\n }\n [\"core\", \"block\", \"inline\"].forEach(function(chain)
+ {\n result = result.concat(this[chain].ruler.enable(list2, true));\n },
+ this);\n result = result.concat(this.inline.ruler2.enable(list2, true));\n
+ \ const missed = list2.filter(function(name) {\n return result.indexOf(name)
+ < 0;\n });\n if (missed.length && !ignoreInvalid) {\n throw new Error(\"MarkdownIt.
+ Failed to enable unknown rule(s): \" + missed);\n }\n return this;\n};\nMarkdownIt.prototype.disable
+ = function(list2, ignoreInvalid) {\n let result = [];\n if (!Array.isArray(list2))
+ {\n list2 = [list2];\n }\n [\"core\", \"block\", \"inline\"].forEach(function(chain)
+ {\n result = result.concat(this[chain].ruler.disable(list2, true));\n },
+ this);\n result = result.concat(this.inline.ruler2.disable(list2, true));\n
+ \ const missed = list2.filter(function(name) {\n return result.indexOf(name)
+ < 0;\n });\n if (missed.length && !ignoreInvalid) {\n throw new Error(\"MarkdownIt.
+ Failed to disable unknown rule(s): \" + missed);\n }\n return this;\n};\nMarkdownIt.prototype.use
+ = function(plugin2) {\n const args = [this].concat(Array.prototype.slice.call(arguments,
+ 1));\n plugin2.apply(plugin2, args);\n return this;\n};\nMarkdownIt.prototype.parse
+ = function(src, env) {\n if (typeof src !== \"string\") {\n throw new
+ Error(\"Input data should be a String\");\n }\n const state = new this.core.State(src,
+ this, env);\n this.core.process(state);\n return state.tokens;\n};\nMarkdownIt.prototype.render
+ = function(src, env) {\n env = env || {};\n return this.renderer.render(this.parse(src,
+ env), this.options, env);\n};\nMarkdownIt.prototype.parseInline = function(src,
+ env) {\n const state = new this.core.State(src, this, env);\n state.inlineMode
+ = true;\n this.core.process(state);\n return state.tokens;\n};\nMarkdownIt.prototype.renderInline
+ = function(src, env) {\n env = env || {};\n return this.renderer.render(this.parseInline(src,
+ env), this.options, env);\n};\nvar freeGlobal = typeof global == \"object\"
+ && global && global.Object === Object && global;\nvar freeSelf = typeof self
+ == \"object\" && self && self.Object === Object && self;\nvar root = freeGlobal
+ || freeSelf || Function(\"return this\")();\nvar Symbol$1 = root.Symbol;\nvar
+ objectProto$f = Object.prototype;\nvar hasOwnProperty$c = objectProto$f.hasOwnProperty;\nvar
+ nativeObjectToString$1 = objectProto$f.toString;\nvar symToStringTag$1 = Symbol$1
+ ? Symbol$1.toStringTag : void 0;\nfunction getRawTag(value) {\n var isOwn
+ = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];\n
+ \ try {\n value[symToStringTag$1] = void 0;\n var unmasked = true;\n
+ \ } catch (e2) {\n }\n var result = nativeObjectToString$1.call(value);\n
+ \ if (unmasked) {\n if (isOwn) {\n value[symToStringTag$1] = tag;\n
+ \ } else {\n delete value[symToStringTag$1];\n }\n }\n return
+ result;\n}\nvar objectProto$e = Object.prototype;\nvar nativeObjectToString
+ = objectProto$e.toString;\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\nvar
+ nullTag = \"[object Null]\", undefinedTag = \"[object Undefined]\";\nvar symToStringTag
+ = Symbol$1 ? Symbol$1.toStringTag : void 0;\nfunction baseGetTag(value) {\n
+ \ if (value == null) {\n return value === void 0 ? undefinedTag : nullTag;\n
+ \ }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value)
+ : objectToString(value);\n}\nfunction isObjectLike(value) {\n return value
+ != null && typeof value == \"object\";\n}\nvar isArray = Array.isArray;\nfunction
+ isObject(value) {\n var type = typeof value;\n return value != null && (type
+ == \"object\" || type == \"function\");\n}\nfunction identity(value) {\n return
+ value;\n}\nvar asyncTag = \"[object AsyncFunction]\", funcTag$2 = \"[object
+ Function]\", genTag$1 = \"[object GeneratorFunction]\", proxyTag = \"[object
+ Proxy]\";\nfunction isFunction(value) {\n if (!isObject(value)) {\n return
+ false;\n }\n var tag = baseGetTag(value);\n return tag == funcTag$2 ||
+ tag == genTag$1 || tag == asyncTag || tag == proxyTag;\n}\nvar coreJsData
+ = root[\"__core-js_shared__\"];\nvar maskSrcKey = function() {\n var uid
+ = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO
+ || \"\");\n return uid ? \"Symbol(src)_1.\" + uid : \"\";\n}();\nfunction
+ isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\nvar funcProto$2
+ = Function.prototype;\nvar funcToString$2 = funcProto$2.toString;\nfunction
+ toSource(func) {\n if (func != null) {\n try {\n return funcToString$2.call(func);\n
+ \ } catch (e2) {\n }\n try {\n return func + \"\";\n } catch
+ (e2) {\n }\n }\n return \"\";\n}\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\nvar
+ reIsHostCtor = /^\\[object .+?Constructor\\]$/;\nvar funcProto$1 = Function.prototype,
+ objectProto$d = Object.prototype;\nvar funcToString$1 = funcProto$1.toString;\nvar
+ hasOwnProperty$b = objectProto$d.hasOwnProperty;\nvar reIsNative = RegExp(\n
+ \ \"^\" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()|
+ for .+?(?=\\\\\\])/g, \"$1.*?\") + \"$\"\n);\nfunction baseIsNative(value)
+ {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n
+ \ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\nfunction
+ getValue(object2, key) {\n return object2 == null ? void 0 : object2[key];\n}\nfunction
+ getNative(object2, key) {\n var value = getValue(object2, key);\n return
+ baseIsNative(value) ? value : void 0;\n}\nvar WeakMap$1 = getNative(root,
+ \"WeakMap\");\nvar objectCreate = Object.create;\nvar baseCreate = /* @__PURE__
+ */ function() {\n function object2() {\n }\n return function(proto) {\n
+ \ if (!isObject(proto)) {\n return {};\n }\n if (objectCreate)
+ {\n return objectCreate(proto);\n }\n object2.prototype = proto;\n
+ \ var result = new object2();\n object2.prototype = void 0;\n return
+ result;\n };\n}();\nfunction apply(func, thisArg, args) {\n switch (args.length)
+ {\n case 0:\n return func.call(thisArg);\n case 1:\n return
+ func.call(thisArg, args[0]);\n case 2:\n return func.call(thisArg,
+ args[0], args[1]);\n case 3:\n return func.call(thisArg, args[0],
+ args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\nfunction
+ copyArray(source, array2) {\n var index2 = -1, length = source.length;\n
+ \ array2 || (array2 = Array(length));\n while (++index2 < length) {\n array2[index2]
+ = source[index2];\n }\n return array2;\n}\nvar HOT_COUNT = 800, HOT_SPAN
+ = 16;\nvar nativeNow = Date.now;\nfunction shortOut(func) {\n var count =
+ 0, lastCalled = 0;\n return function() {\n var stamp = nativeNow(), remaining
+ = HOT_SPAN - (stamp - lastCalled);\n lastCalled = stamp;\n if (remaining
+ > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n
+ \ }\n } else {\n count = 0;\n }\n return func.apply(void
+ 0, arguments);\n };\n}\nfunction constant(value) {\n return function() {\n
+ \ return value;\n };\n}\nvar defineProperty = function() {\n try {\n var
+ func = getNative(Object, \"defineProperty\");\n func({}, \"\", {});\n return
+ func;\n } catch (e2) {\n }\n}();\nvar baseSetToString = !defineProperty
+ ? identity : function(func, string2) {\n return defineProperty(func, \"toString\",
+ {\n \"configurable\": true,\n \"enumerable\": false,\n \"value\":
+ constant(string2),\n \"writable\": true\n });\n};\nvar setToString = shortOut(baseSetToString);\nfunction
+ arrayEach(array2, iteratee) {\n var index2 = -1, length = array2 == null
+ ? 0 : array2.length;\n while (++index2 < length) {\n if (iteratee(array2[index2],
+ index2, array2) === false) {\n break;\n }\n }\n return array2;\n}\nvar
+ MAX_SAFE_INTEGER$1 = 9007199254740991;\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\nfunction
+ isIndex(value, length) {\n var type = typeof value;\n length = length ==
+ null ? MAX_SAFE_INTEGER$1 : length;\n return !!length && (type == \"number\"
+ || type != \"symbol\" && reIsUint.test(value)) && (value > -1 && value % 1
+ == 0 && value < length);\n}\nfunction baseAssignValue(object2, key, value)
+ {\n if (key == \"__proto__\" && defineProperty) {\n defineProperty(object2,
+ key, {\n \"configurable\": true,\n \"enumerable\": true,\n \"value\":
+ value,\n \"writable\": true\n });\n } else {\n object2[key] =
+ value;\n }\n}\nfunction eq(value, other) {\n return value === other || value
+ !== value && other !== other;\n}\nvar objectProto$c = Object.prototype;\nvar
+ hasOwnProperty$a = objectProto$c.hasOwnProperty;\nfunction assignValue(object2,
+ key, value) {\n var objValue = object2[key];\n if (!(hasOwnProperty$a.call(object2,
+ key) && eq(objValue, value)) || value === void 0 && !(key in object2)) {\n
+ \ baseAssignValue(object2, key, value);\n }\n}\nfunction copyObject(source,
+ props, object2, customizer) {\n var isNew = !object2;\n object2 || (object2
+ = {});\n var index2 = -1, length = props.length;\n while (++index2 < length)
+ {\n var key = props[index2];\n var newValue = void 0;\n if (newValue
+ === void 0) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object2,
+ key, newValue);\n } else {\n assignValue(object2, key, newValue);\n
+ \ }\n }\n return object2;\n}\nvar nativeMax = Math.max;\nfunction overRest(func,
+ start, transform) {\n start = nativeMax(start === void 0 ? func.length -
+ 1 : start, 0);\n return function() {\n var args = arguments, index2 =
+ -1, length = nativeMax(args.length - start, 0), array2 = Array(length);\n
+ \ while (++index2 < length) {\n array2[index2] = args[start + index2];\n
+ \ }\n index2 = -1;\n var otherArgs = Array(start + 1);\n while
+ (++index2 < start) {\n otherArgs[index2] = args[index2];\n }\n otherArgs[start]
+ = transform(array2);\n return apply(func, this, otherArgs);\n };\n}\nfunction
+ baseRest(func, start) {\n return setToString(overRest(func, start, identity),
+ func + \"\");\n}\nvar MAX_SAFE_INTEGER = 9007199254740991;\nfunction isLength(value)
+ {\n return typeof value == \"number\" && value > -1 && value % 1 == 0 &&
+ value <= MAX_SAFE_INTEGER;\n}\nfunction isArrayLike(value) {\n return value
+ != null && isLength(value.length) && !isFunction(value);\n}\nfunction isIterateeCall(value,
+ index2, object2) {\n if (!isObject(object2)) {\n return false;\n }\n
+ \ var type = typeof index2;\n if (type == \"number\" ? isArrayLike(object2)
+ && isIndex(index2, object2.length) : type == \"string\" && index2 in object2)
+ {\n return eq(object2[index2], value);\n }\n return false;\n}\nfunction
+ createAssigner(assigner) {\n return baseRest(function(object2, sources) {\n
+ \ var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length
+ - 1] : void 0, guard = length > 2 ? sources[2] : void 0;\n customizer =
+ assigner.length > 3 && typeof customizer == \"function\" ? (length--, customizer)
+ : void 0;\n if (guard && isIterateeCall(sources[0], sources[1], guard))
+ {\n customizer = length < 3 ? void 0 : customizer;\n length = 1;\n
+ \ }\n object2 = Object(object2);\n while (++index2 < length) {\n var
+ source = sources[index2];\n if (source) {\n assigner(object2,
+ source, index2, customizer);\n }\n }\n return object2;\n });\n}\nvar
+ objectProto$b = Object.prototype;\nfunction isPrototype(value) {\n var Ctor
+ = value && value.constructor, proto = typeof Ctor == \"function\" && Ctor.prototype
+ || objectProto$b;\n return value === proto;\n}\nfunction baseTimes(n3, iteratee)
+ {\n var index2 = -1, result = Array(n3);\n while (++index2 < n3) {\n result[index2]
+ = iteratee(index2);\n }\n return result;\n}\nvar argsTag$3 = \"[object Arguments]\";\nfunction
+ baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value)
+ == argsTag$3;\n}\nvar objectProto$a = Object.prototype;\nvar hasOwnProperty$9
+ = objectProto$a.hasOwnProperty;\nvar propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;\nvar
+ isArguments = baseIsArguments(/* @__PURE__ */ function() {\n return arguments;\n}())
+ ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty$9.call(value,
+ \"callee\") && !propertyIsEnumerable$1.call(value, \"callee\");\n};\nfunction
+ stubFalse() {\n return false;\n}\nvar freeExports$2 = typeof exports == \"object\"
+ && exports && !exports.nodeType && exports;\nvar freeModule$2 = freeExports$2
+ && typeof module == \"object\" && module && !module.nodeType && module;\nvar
+ moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;\nvar
+ Buffer$1 = moduleExports$2 ? root.Buffer : void 0;\nvar nativeIsBuffer = Buffer$1
+ ? Buffer$1.isBuffer : void 0;\nvar isBuffer = nativeIsBuffer || stubFalse;\nvar
+ argsTag$2 = \"[object Arguments]\", arrayTag$2 = \"[object Array]\", boolTag$3
+ = \"[object Boolean]\", dateTag$3 = \"[object Date]\", errorTag$2 = \"[object
+ Error]\", funcTag$1 = \"[object Function]\", mapTag$5 = \"[object Map]\",
+ numberTag$3 = \"[object Number]\", objectTag$4 = \"[object Object]\", regexpTag$3
+ = \"[object RegExp]\", setTag$5 = \"[object Set]\", stringTag$3 = \"[object
+ String]\", weakMapTag$2 = \"[object WeakMap]\";\nvar arrayBufferTag$3 = \"[object
+ ArrayBuffer]\", dataViewTag$4 = \"[object DataView]\", float32Tag$2 = \"[object
+ Float32Array]\", float64Tag$2 = \"[object Float64Array]\", int8Tag$2 = \"[object
+ Int8Array]\", int16Tag$2 = \"[object Int16Array]\", int32Tag$2 = \"[object
+ Int32Array]\", uint8Tag$2 = \"[object Uint8Array]\", uint8ClampedTag$2 = \"[object
+ Uint8ClampedArray]\", uint16Tag$2 = \"[object Uint16Array]\", uint32Tag$2
+ = \"[object Uint32Array]\";\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag$2]
+ = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2]
+ = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2]
+ = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;\ntypedArrayTags[argsTag$2]
+ = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3]
+ = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2]
+ = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3]
+ = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5]
+ = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;\nfunction
+ baseIsTypedArray(value) {\n return isObjectLike(value) && isLength(value.length)
+ && !!typedArrayTags[baseGetTag(value)];\n}\nfunction baseUnary(func) {\n return
+ function(value) {\n return func(value);\n };\n}\nvar freeExports$1 = typeof
+ exports == \"object\" && exports && !exports.nodeType && exports;\nvar freeModule$1
+ = freeExports$1 && typeof module == \"object\" && module && !module.nodeType
+ && module;\nvar moduleExports$1 = freeModule$1 && freeModule$1.exports ===
+ freeExports$1;\nvar freeProcess = moduleExports$1 && freeGlobal.process;\nvar
+ nodeUtil = function() {\n try {\n var types = freeModule$1 && freeModule$1.require
+ && freeModule$1.require(\"util\").types;\n if (types) {\n return types;\n
+ \ }\n return freeProcess && freeProcess.binding && freeProcess.binding(\"util\");\n
+ \ } catch (e2) {\n }\n}();\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\nvar
+ isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\nvar
+ objectProto$9 = Object.prototype;\nvar hasOwnProperty$8 = objectProto$9.hasOwnProperty;\nfunction
+ arrayLikeKeys(value, inherited) {\n var isArr = isArray(value), isArg = !isArr
+ && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType
+ = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr
+ || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length,
+ String) : [], length = result.length;\n for (var key in value) {\n if
+ ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && // Safari
+ 9 has enumerable `arguments.length` in strict mode.\n (key == \"length\"
+ || // Node.js 0.10 has enumerable non-index properties on buffers.\n isBuff
+ && (key == \"offset\" || key == \"parent\") || // PhantomJS 2 has enumerable
+ non-index properties on typed arrays.\n isType && (key == \"buffer\" ||
+ key == \"byteLength\" || key == \"byteOffset\") || // Skip index properties.\n
+ \ isIndex(key, length)))) {\n result.push(key);\n }\n }\n return
+ result;\n}\nfunction overArg(func, transform) {\n return function(arg) {\n
+ \ return func(transform(arg));\n };\n}\nvar nativeKeys = overArg(Object.keys,
+ Object);\nvar objectProto$8 = Object.prototype;\nvar hasOwnProperty$7 = objectProto$8.hasOwnProperty;\nfunction
+ baseKeys(object2) {\n if (!isPrototype(object2)) {\n return nativeKeys(object2);\n
+ \ }\n var result = [];\n for (var key in Object(object2)) {\n if (hasOwnProperty$7.call(object2,
+ key) && key != \"constructor\") {\n result.push(key);\n }\n }\n return
+ result;\n}\nfunction keys(object2) {\n return isArrayLike(object2) ? arrayLikeKeys(object2)
+ : baseKeys(object2);\n}\nfunction nativeKeysIn(object2) {\n var result =
+ [];\n if (object2 != null) {\n for (var key in Object(object2)) {\n result.push(key);\n
+ \ }\n }\n return result;\n}\nvar objectProto$7 = Object.prototype;\nvar
+ hasOwnProperty$6 = objectProto$7.hasOwnProperty;\nfunction baseKeysIn(object2)
+ {\n if (!isObject(object2)) {\n return nativeKeysIn(object2);\n }\n var
+ isProto = isPrototype(object2), result = [];\n for (var key in object2) {\n
+ \ if (!(key == \"constructor\" && (isProto || !hasOwnProperty$6.call(object2,
+ key)))) {\n result.push(key);\n }\n }\n return result;\n}\nfunction
+ keysIn(object2) {\n return isArrayLike(object2) ? arrayLikeKeys(object2,
+ true) : baseKeysIn(object2);\n}\nvar nativeCreate = getNative(Object, \"create\");\nfunction
+ hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n
+ \ this.size = 0;\n}\nfunction hashDelete(key) {\n var result = this.has(key)
+ && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\nvar
+ HASH_UNDEFINED$2 = \"__lodash_hash_undefined__\";\nvar objectProto$6 = Object.prototype;\nvar
+ hasOwnProperty$5 = objectProto$6.hasOwnProperty;\nfunction hashGet(key) {\n
+ \ var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n
+ \ return result === HASH_UNDEFINED$2 ? void 0 : result;\n }\n return hasOwnProperty$5.call(data,
+ key) ? data[key] : void 0;\n}\nvar objectProto$5 = Object.prototype;\nvar
+ hasOwnProperty$4 = objectProto$5.hasOwnProperty;\nfunction hashHas(key) {\n
+ \ var data = this.__data__;\n return nativeCreate ? data[key] !== void 0
+ : hasOwnProperty$4.call(data, key);\n}\nvar HASH_UNDEFINED$1 = \"__lodash_hash_undefined__\";\nfunction
+ hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key)
+ ? 0 : 1;\n data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1
+ : value;\n return this;\n}\nfunction Hash(entries) {\n var index2 = -1,
+ length = entries == null ? 0 : entries.length;\n this.clear();\n while (++index2
+ < length) {\n var entry = entries[index2];\n this.set(entry[0], entry[1]);\n
+ \ }\n}\nHash.prototype.clear = hashClear;\nHash.prototype[\"delete\"] = hashDelete;\nHash.prototype.get
+ = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\nfunction
+ listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\nfunction assocIndexOf(array2,
+ key) {\n var length = array2.length;\n while (length--) {\n if (eq(array2[length][0],
+ key)) {\n return length;\n }\n }\n return -1;\n}\nvar arrayProto
+ = Array.prototype;\nvar splice = arrayProto.splice;\nfunction listCacheDelete(key)
+ {\n var data = this.__data__, index2 = assocIndexOf(data, key);\n if (index2
+ < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index2
+ == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index2,
+ 1);\n }\n --this.size;\n return true;\n}\nfunction listCacheGet(key) {\n
+ \ var data = this.__data__, index2 = assocIndexOf(data, key);\n return index2
+ < 0 ? void 0 : data[index2][1];\n}\nfunction listCacheHas(key) {\n return
+ assocIndexOf(this.__data__, key) > -1;\n}\nfunction listCacheSet(key, value)
+ {\n var data = this.__data__, index2 = assocIndexOf(data, key);\n if (index2
+ < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index2][1]
+ = value;\n }\n return this;\n}\nfunction ListCache(entries) {\n var index2
+ = -1, length = entries == null ? 0 : entries.length;\n this.clear();\n while
+ (++index2 < length) {\n var entry = entries[index2];\n this.set(entry[0],
+ entry[1]);\n }\n}\nListCache.prototype.clear = listCacheClear;\nListCache.prototype[\"delete\"]
+ = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has
+ = listCacheHas;\nListCache.prototype.set = listCacheSet;\nvar Map$1 = getNative(root,
+ \"Map\");\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ =
+ {\n \"hash\": new Hash(),\n \"map\": new (Map$1 || ListCache)(),\n \"string\":
+ new Hash()\n };\n}\nfunction isKeyable(value) {\n var type = typeof value;\n
+ \ return type == \"string\" || type == \"number\" || type == \"symbol\" ||
+ type == \"boolean\" ? value !== \"__proto__\" : value === null;\n}\nfunction
+ getMapData(map2, key) {\n var data = map2.__data__;\n return isKeyable(key)
+ ? data[typeof key == \"string\" ? \"string\" : \"hash\"] : data.map;\n}\nfunction
+ mapCacheDelete(key) {\n var result = getMapData(this, key)[\"delete\"](key);\n
+ \ this.size -= result ? 1 : 0;\n return result;\n}\nfunction mapCacheGet(key)
+ {\n return getMapData(this, key).get(key);\n}\nfunction mapCacheHas(key)
+ {\n return getMapData(this, key).has(key);\n}\nfunction mapCacheSet(key,
+ value) {\n var data = getMapData(this, key), size = data.size;\n data.set(key,
+ value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\nfunction
+ MapCache(entries) {\n var index2 = -1, length = entries == null ? 0 : entries.length;\n
+ \ this.clear();\n while (++index2 < length) {\n var entry = entries[index2];\n
+ \ this.set(entry[0], entry[1]);\n }\n}\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype[\"delete\"]
+ = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has
+ = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\nfunction arrayPush(array2,
+ values) {\n var index2 = -1, length = values.length, offset = array2.length;\n
+ \ while (++index2 < length) {\n array2[offset + index2] = values[index2];\n
+ \ }\n return array2;\n}\nvar getPrototype = overArg(Object.getPrototypeOf,
+ Object);\nvar objectTag$3 = \"[object Object]\";\nvar funcProto = Function.prototype,
+ objectProto$4 = Object.prototype;\nvar funcToString = funcProto.toString;\nvar
+ hasOwnProperty$3 = objectProto$4.hasOwnProperty;\nvar objectCtorString = funcToString.call(Object);\nfunction
+ isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !=
+ objectTag$3) {\n return false;\n }\n var proto = getPrototype(value);\n
+ \ if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty$3.call(proto,
+ \"constructor\") && proto.constructor;\n return typeof Ctor == \"function\"
+ && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\nfunction
+ stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}\nfunction
+ stackDelete(key) {\n var data = this.__data__, result = data[\"delete\"](key);\n
+ \ this.size = data.size;\n return result;\n}\nfunction stackGet(key) {\n
+ \ return this.__data__.get(key);\n}\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\nvar
+ LARGE_ARRAY_SIZE = 200;\nfunction stackSet(key, value) {\n var data = this.__data__;\n
+ \ if (data instanceof ListCache) {\n var pairs = data.__data__;\n if
+ (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {\n pairs.push([key,
+ value]);\n this.size = ++data.size;\n return this;\n }\n data
+ = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size
+ = data.size;\n return this;\n}\nfunction Stack(entries) {\n var data = this.__data__
+ = new ListCache(entries);\n this.size = data.size;\n}\nStack.prototype.clear
+ = stackClear;\nStack.prototype[\"delete\"] = stackDelete;\nStack.prototype.get
+ = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\nvar
+ freeExports = typeof exports == \"object\" && exports && !exports.nodeType
+ && exports;\nvar freeModule = freeExports && typeof module == \"object\" &&
+ module && !module.nodeType && module;\nvar moduleExports = freeModule && freeModule.exports
+ === freeExports;\nvar Buffer2 = moduleExports ? root.Buffer : void 0, allocUnsafe
+ = Buffer2 ? Buffer2.allocUnsafe : void 0;\nfunction cloneBuffer(buffer, isDeep)
+ {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n
+ \ buffer.copy(result);\n return result;\n}\nfunction arrayFilter(array2,
+ predicate) {\n var index2 = -1, length = array2 == null ? 0 : array2.length,
+ resIndex = 0, result = [];\n while (++index2 < length) {\n var value =
+ array2[index2];\n if (predicate(value, index2, array2)) {\n result[resIndex++]
+ = value;\n }\n }\n return result;\n}\nfunction stubArray() {\n return
+ [];\n}\nvar objectProto$3 = Object.prototype;\nvar propertyIsEnumerable =
+ objectProto$3.propertyIsEnumerable;\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\nvar
+ getSymbols = !nativeGetSymbols ? stubArray : function(object2) {\n if (object2
+ == null) {\n return [];\n }\n object2 = Object(object2);\n return arrayFilter(nativeGetSymbols(object2),
+ function(symbol) {\n return propertyIsEnumerable.call(object2, symbol);\n
+ \ });\n};\nfunction baseGetAllKeys(object2, keysFunc, symbolsFunc) {\n var
+ result = keysFunc(object2);\n return isArray(object2) ? result : arrayPush(result,
+ symbolsFunc(object2));\n}\nfunction getAllKeys(object2) {\n return baseGetAllKeys(object2,
+ keys, getSymbols);\n}\nvar DataView = getNative(root, \"DataView\");\nvar
+ Promise$1 = getNative(root, \"Promise\");\nvar Set$1 = getNative(root, \"Set\");\nvar
+ mapTag$4 = \"[object Map]\", objectTag$2 = \"[object Object]\", promiseTag
+ = \"[object Promise]\", setTag$4 = \"[object Set]\", weakMapTag$1 = \"[object
+ WeakMap]\";\nvar dataViewTag$3 = \"[object DataView]\";\nvar dataViewCtorString
+ = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString =
+ toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString =
+ toSource(WeakMap$1);\nvar getTag = baseGetTag;\nif (DataView && getTag(new
+ DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1())
+ != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1
+ && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1())
+ != weakMapTag$1) {\n getTag = function(value) {\n var result = baseGetTag(value),
+ Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor
+ ? toSource(Ctor) : \"\";\n if (ctorString) {\n switch (ctorString)
+ {\n case dataViewCtorString:\n return dataViewTag$3;\n case
+ mapCtorString:\n return mapTag$4;\n case promiseCtorString:\n
+ \ return promiseTag;\n case setCtorString:\n return
+ setTag$4;\n case weakMapCtorString:\n return weakMapTag$1;\n
+ \ }\n }\n return result;\n };\n}\nvar objectProto$2 = Object.prototype;\nvar
+ hasOwnProperty$2 = objectProto$2.hasOwnProperty;\nfunction initCloneArray(array2)
+ {\n var length = array2.length, result = new array2.constructor(length);\n
+ \ if (length && typeof array2[0] == \"string\" && hasOwnProperty$2.call(array2,
+ \"index\")) {\n result.index = array2.index;\n result.input = array2.input;\n
+ \ }\n return result;\n}\nvar Uint8Array$1 = root.Uint8Array;\nfunction cloneArrayBuffer(arrayBuffer)
+ {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new
+ Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));\n return result;\n}\nfunction
+ cloneDataView(dataView, isDeep) {\n var buffer = cloneArrayBuffer(dataView.buffer);\n
+ \ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\nvar
+ reFlags = /\\w*$/;\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source,
+ reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\nvar
+ symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 =
+ symbolProto$1 ? symbolProto$1.valueOf : void 0;\nfunction cloneSymbol(symbol)
+ {\n return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};\n}\nfunction
+ cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer)
+ : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset,
+ typedArray.length);\n}\nvar boolTag$2 = \"[object Boolean]\", dateTag$2 =
+ \"[object Date]\", mapTag$3 = \"[object Map]\", numberTag$2 = \"[object Number]\",
+ regexpTag$2 = \"[object RegExp]\", setTag$3 = \"[object Set]\", stringTag$2
+ = \"[object String]\", symbolTag$2 = \"[object Symbol]\";\nvar arrayBufferTag$2
+ = \"[object ArrayBuffer]\", dataViewTag$2 = \"[object DataView]\", float32Tag$1
+ = \"[object Float32Array]\", float64Tag$1 = \"[object Float64Array]\", int8Tag$1
+ = \"[object Int8Array]\", int16Tag$1 = \"[object Int16Array]\", int32Tag$1
+ = \"[object Int32Array]\", uint8Tag$1 = \"[object Uint8Array]\", uint8ClampedTag$1
+ = \"[object Uint8ClampedArray]\", uint16Tag$1 = \"[object Uint16Array]\",
+ uint32Tag$1 = \"[object Uint32Array]\";\nfunction initCloneByTag(object2,
+ tag, isDeep) {\n var Ctor = object2.constructor;\n switch (tag) {\n case
+ arrayBufferTag$2:\n return cloneArrayBuffer(object2);\n case boolTag$2:\n
+ \ case dateTag$2:\n return new Ctor(+object2);\n case dataViewTag$2:\n
+ \ return cloneDataView(object2);\n case float32Tag$1:\n case float64Tag$1:\n
+ \ case int8Tag$1:\n case int16Tag$1:\n case int32Tag$1:\n case
+ uint8Tag$1:\n case uint8ClampedTag$1:\n case uint16Tag$1:\n case
+ uint32Tag$1:\n return cloneTypedArray(object2, isDeep);\n case mapTag$3:\n
+ \ return new Ctor();\n case numberTag$2:\n case stringTag$2:\n return
+ new Ctor(object2);\n case regexpTag$2:\n return cloneRegExp(object2);\n
+ \ case setTag$3:\n return new Ctor();\n case symbolTag$2:\n return
+ cloneSymbol(object2);\n }\n}\nfunction initCloneObject(object2) {\n return
+ typeof object2.constructor == \"function\" && !isPrototype(object2) ? baseCreate(getPrototype(object2))
+ : {};\n}\nvar mapTag$2 = \"[object Map]\";\nfunction baseIsMap(value) {\n
+ \ return isObjectLike(value) && getTag(value) == mapTag$2;\n}\nvar nodeIsMap
+ = nodeUtil && nodeUtil.isMap;\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap)
+ : baseIsMap;\nvar setTag$2 = \"[object Set]\";\nfunction baseIsSet(value)
+ {\n return isObjectLike(value) && getTag(value) == setTag$2;\n}\nvar nodeIsSet
+ = nodeUtil && nodeUtil.isSet;\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet)
+ : baseIsSet;\nvar CLONE_DEEP_FLAG$1 = 1;\nvar argsTag$1 = \"[object Arguments]\",
+ arrayTag$1 = \"[object Array]\", boolTag$1 = \"[object Boolean]\", dateTag$1
+ = \"[object Date]\", errorTag$1 = \"[object Error]\", funcTag = \"[object
+ Function]\", genTag = \"[object GeneratorFunction]\", mapTag$1 = \"[object
+ Map]\", numberTag$1 = \"[object Number]\", objectTag$1 = \"[object Object]\",
+ regexpTag$1 = \"[object RegExp]\", setTag$1 = \"[object Set]\", stringTag$1
+ = \"[object String]\", symbolTag$1 = \"[object Symbol]\", weakMapTag = \"[object
+ WeakMap]\";\nvar arrayBufferTag$1 = \"[object ArrayBuffer]\", dataViewTag$1
+ = \"[object DataView]\", float32Tag = \"[object Float32Array]\", float64Tag
+ = \"[object Float64Array]\", int8Tag = \"[object Int8Array]\", int16Tag =
+ \"[object Int16Array]\", int32Tag = \"[object Int32Array]\", uint8Tag = \"[object
+ Uint8Array]\", uint8ClampedTag = \"[object Uint8ClampedArray]\", uint16Tag
+ = \"[object Uint16Array]\", uint32Tag = \"[object Uint32Array]\";\nvar cloneableTags
+ = {};\ncloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1]
+ = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1]
+ = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag]
+ = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1]
+ = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1]
+ = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1]
+ = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag]
+ = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag$1] = cloneableTags[funcTag]
+ = cloneableTags[weakMapTag] = false;\nfunction baseClone(value, bitmask, customizer,
+ key, object2, stack) {\n var result, isDeep = bitmask & CLONE_DEEP_FLAG$1;\n
+ \ if (result !== void 0) {\n return result;\n }\n if (!isObject(value))
+ {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n
+ \ result = initCloneArray(value);\n } else {\n var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;\n if (isBuffer(value)) {\n return
+ cloneBuffer(value, isDeep);\n }\n if (tag == objectTag$1 || tag == argsTag$1
+ || isFunc && !object2) {\n result = isFunc ? {} : initCloneObject(value);\n
+ \ } else {\n if (!cloneableTags[tag]) {\n return object2 ? value
+ : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n
+ \ }\n stack || (stack = new Stack());\n var stacked = stack.get(value);\n
+ \ if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n
+ \ if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue,
+ bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value))
+ {\n value.forEach(function(subValue, key2) {\n result.set(key2, baseClone(subValue,
+ bitmask, customizer, key2, value, stack));\n });\n }\n var keysFunc =
+ getAllKeys;\n var props = isArr ? void 0 : keysFunc(value);\n arrayEach(props
+ || value, function(subValue, key2) {\n if (props) {\n key2 = subValue;\n
+ \ subValue = value[key2];\n }\n assignValue(result, key2, baseClone(subValue,
+ bitmask, customizer, key2, value, stack));\n });\n return result;\n}\nvar
+ CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;\nfunction cloneDeep(value) {\n
+ \ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\nvar HASH_UNDEFINED
+ = \"__lodash_hash_undefined__\";\nfunction setCacheAdd(value) {\n this.__data__.set(value,
+ HASH_UNDEFINED);\n return this;\n}\nfunction setCacheHas(value) {\n return
+ this.__data__.has(value);\n}\nfunction SetCache(values) {\n var index2 =
+ -1, length = values == null ? 0 : values.length;\n this.__data__ = new MapCache();\n
+ \ while (++index2 < length) {\n this.add(values[index2]);\n }\n}\nSetCache.prototype.add
+ = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\nfunction
+ arraySome(array2, predicate) {\n var index2 = -1, length = array2 == null
+ ? 0 : array2.length;\n while (++index2 < length) {\n if (predicate(array2[index2],
+ index2, array2)) {\n return true;\n }\n }\n return false;\n}\nfunction
+ cacheHas(cache, key) {\n return cache.has(key);\n}\nvar COMPARE_PARTIAL_FLAG$3
+ = 1, COMPARE_UNORDERED_FLAG$1 = 2;\nfunction equalArrays(array2, other, bitmask,
+ customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
+ arrLength = array2.length, othLength = other.length;\n if (arrLength != othLength
+ && !(isPartial && othLength > arrLength)) {\n return false;\n }\n var
+ arrStacked = stack.get(array2);\n var othStacked = stack.get(other);\n if
+ (arrStacked && othStacked) {\n return arrStacked == other && othStacked
+ == array2;\n }\n var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1
+ ? new SetCache() : void 0;\n stack.set(array2, other);\n stack.set(other,
+ array2);\n while (++index2 < arrLength) {\n var arrValue = array2[index2],
+ othValue = other[index2];\n if (customizer) {\n var compared = isPartial
+ ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue,
+ othValue, index2, array2, other, stack);\n }\n if (compared !== void
+ 0) {\n if (compared) {\n continue;\n }\n result = false;\n
+ \ break;\n }\n if (seen) {\n if (!arraySome(other, function(othValue2,
+ othIndex) {\n if (!cacheHas(seen, othIndex) && (arrValue === othValue2
+ || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {\n return
+ seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n
+ \ }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue,
+ bitmask, customizer, stack))) {\n result = false;\n break;\n }\n
+ \ }\n stack[\"delete\"](array2);\n stack[\"delete\"](other);\n return result;\n}\nfunction
+ mapToArray(map2) {\n var index2 = -1, result = Array(map2.size);\n map2.forEach(function(value,
+ key) {\n result[++index2] = [key, value];\n });\n return result;\n}\nfunction
+ setToArray(set2) {\n var index2 = -1, result = Array(set2.size);\n set2.forEach(function(value)
+ {\n result[++index2] = value;\n });\n return result;\n}\nvar COMPARE_PARTIAL_FLAG$2
+ = 1, COMPARE_UNORDERED_FLAG = 2;\nvar boolTag = \"[object Boolean]\", dateTag
+ = \"[object Date]\", errorTag = \"[object Error]\", mapTag = \"[object Map]\",
+ numberTag = \"[object Number]\", regexpTag = \"[object RegExp]\", setTag =
+ \"[object Set]\", stringTag = \"[object String]\", symbolTag = \"[object Symbol]\";\nvar
+ arrayBufferTag = \"[object ArrayBuffer]\", dataViewTag = \"[object DataView]\";\nvar
+ symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto
+ ? symbolProto.valueOf : void 0;\nfunction equalByTag(object2, other, tag,
+ bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n
+ \ if (object2.byteLength != other.byteLength || object2.byteOffset !=
+ other.byteOffset) {\n return false;\n }\n object2 = object2.buffer;\n
+ \ other = other.buffer;\n case arrayBufferTag:\n if (object2.byteLength
+ != other.byteLength || !equalFunc(new Uint8Array$1(object2), new Uint8Array$1(other)))
+ {\n return false;\n }\n return true;\n case boolTag:\n
+ \ case dateTag:\n case numberTag:\n return eq(+object2, +other);\n
+ \ case errorTag:\n return object2.name == other.name && object2.message
+ == other.message;\n case regexpTag:\n case stringTag:\n return
+ object2 == other + \"\";\n case mapTag:\n var convert = mapToArray;\n
+ \ case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;\n
+ \ convert || (convert = setToArray);\n if (object2.size != other.size
+ && !isPartial) {\n return false;\n }\n var stacked = stack.get(object2);\n
+ \ if (stacked) {\n return stacked == other;\n }\n bitmask
+ |= COMPARE_UNORDERED_FLAG;\n stack.set(object2, other);\n var result
+ = equalArrays(convert(object2), convert(other), bitmask, customizer, equalFunc,
+ stack);\n stack[\"delete\"](object2);\n return result;\n case
+ symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object2)
+ == symbolValueOf.call(other);\n }\n }\n return false;\n}\nvar COMPARE_PARTIAL_FLAG$1
+ = 1;\nvar objectProto$1 = Object.prototype;\nvar hasOwnProperty$1 = objectProto$1.hasOwnProperty;\nfunction
+ equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {\n var
+ isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object2),
+ objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;\n
+ \ if (objLength != othLength && !isPartial) {\n return false;\n }\n var
+ index2 = objLength;\n while (index2--) {\n var key = objProps[index2];\n
+ \ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {\n
+ \ return false;\n }\n }\n var objStacked = stack.get(object2);\n
+ \ var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n
+ \ return objStacked == other && othStacked == object2;\n }\n var result
+ = true;\n stack.set(object2, other);\n stack.set(other, object2);\n var
+ skipCtor = isPartial;\n while (++index2 < objLength) {\n key = objProps[index2];\n
+ \ var objValue = object2[key], othValue = other[key];\n if (customizer)
+ {\n var compared = isPartial ? customizer(othValue, objValue, key, other,
+ object2, stack) : customizer(objValue, othValue, key, object2, other, stack);\n
+ \ }\n if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue,
+ othValue, bitmask, customizer, stack) : compared)) {\n result = false;\n
+ \ break;\n }\n skipCtor || (skipCtor = key == \"constructor\");\n
+ \ }\n if (result && !skipCtor) {\n var objCtor = object2.constructor,
+ othCtor = other.constructor;\n if (objCtor != othCtor && (\"constructor\"
+ in object2 && \"constructor\" in other) && !(typeof objCtor == \"function\"
+ && objCtor instanceof objCtor && typeof othCtor == \"function\" && othCtor
+ instanceof othCtor)) {\n result = false;\n }\n }\n stack[\"delete\"](object2);\n
+ \ stack[\"delete\"](other);\n return result;\n}\nvar COMPARE_PARTIAL_FLAG
+ = 1;\nvar argsTag = \"[object Arguments]\", arrayTag = \"[object Array]\",
+ objectTag = \"[object Object]\";\nvar objectProto = Object.prototype;\nvar
+ hasOwnProperty = objectProto.hasOwnProperty;\nfunction baseIsEqualDeep(object2,
+ other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object2),
+ othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object2),
+ othTag = othIsArr ? arrayTag : getTag(other);\n objTag = objTag == argsTag
+ ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n
+ \ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag
+ = objTag == othTag;\n if (isSameTag && isBuffer(object2)) {\n if (!isBuffer(other))
+ {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n
+ \ }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack());\n
+ \ return objIsArr || isTypedArray(object2) ? equalArrays(object2, other,
+ bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag,
+ bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG))
+ {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object2, \"__wrapped__\"),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, \"__wrapped__\");\n
+ \ if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped
+ ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() :
+ other;\n stack || (stack = new Stack());\n return equalFunc(objUnwrapped,
+ othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag)
+ {\n return false;\n }\n stack || (stack = new Stack());\n return equalObjects(object2,
+ other, bitmask, customizer, equalFunc, stack);\n}\nfunction baseIsEqual(value,
+ other, bitmask, customizer, stack) {\n if (value === other) {\n return
+ true;\n }\n if (value == null || other == null || !isObjectLike(value) &&
+ !isObjectLike(other)) {\n return value !== value && other !== other;\n
+ \ }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual,
+ stack);\n}\nfunction createBaseFor(fromRight) {\n return function(object2,
+ iteratee, keysFunc) {\n var index2 = -1, iterable = Object(object2), props
+ = keysFunc(object2), length = props.length;\n while (length--) {\n var
+ key = props[++index2];\n if (iteratee(iterable[key], key, iterable) ===
+ false) {\n break;\n }\n }\n return object2;\n };\n}\nvar
+ baseFor = createBaseFor();\nfunction assignMergeValue(object2, key, value)
+ {\n if (value !== void 0 && !eq(object2[key], value) || value === void 0
+ && !(key in object2)) {\n baseAssignValue(object2, key, value);\n }\n}\nfunction
+ isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\nfunction
+ safeGet(object2, key) {\n if (key === \"constructor\" && typeof object2[key]
+ === \"function\") {\n return;\n }\n if (key == \"__proto__\") {\n return;\n
+ \ }\n return object2[key];\n}\nfunction toPlainObject(value) {\n return
+ copyObject(value, keysIn(value));\n}\nfunction baseMergeDeep(object2, source,
+ key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object2,
+ key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);\n if
+ (stacked) {\n assignMergeValue(object2, key, stacked);\n return;\n }\n
+ \ var newValue = customizer ? customizer(objValue, srcValue, key + \"\", object2,
+ source, stack) : void 0;\n var isCommon = newValue === void 0;\n if (isCommon)
+ {\n var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n newValue = srcValue;\n
+ \ if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue
+ = objValue;\n } else if (isArrayLikeObject(objValue)) {\n newValue
+ = copyArray(objValue);\n } else if (isBuff) {\n isCommon = false;\n
+ \ newValue = cloneBuffer(srcValue, true);\n } else if (isTyped)
+ {\n isCommon = false;\n newValue = cloneTypedArray(srcValue,
+ true);\n } else {\n newValue = [];\n }\n } else if (isPlainObject(srcValue)
+ || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue))
+ {\n newValue = toPlainObject(objValue);\n } else if (!isObject(objValue)
+ || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n
+ \ }\n } else {\n isCommon = false;\n }\n }\n if (isCommon)
+ {\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex,
+ customizer, stack);\n stack[\"delete\"](srcValue);\n }\n assignMergeValue(object2,
+ key, newValue);\n}\nfunction baseMerge(object2, source, srcIndex, customizer,
+ stack) {\n if (object2 === source) {\n return;\n }\n baseFor(source,
+ function(srcValue, key) {\n stack || (stack = new Stack());\n if (isObject(srcValue))
+ {\n baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer,
+ stack);\n } else {\n var newValue = customizer ? customizer(safeGet(object2,
+ key), srcValue, key + \"\", object2, source, stack) : void 0;\n if (newValue
+ === void 0) {\n newValue = srcValue;\n }\n assignMergeValue(object2,
+ key, newValue);\n }\n }, keysIn);\n}\nfunction isEqual$1(value, other)
+ {\n return baseIsEqual(value, other);\n}\nvar merge = createAssigner(function(object2,
+ source, srcIndex) {\n baseMerge(object2, source, srcIndex);\n});\nvar Scope
+ = /* @__PURE__ */ ((Scope2) => (Scope2[Scope2.TYPE = 3] = \"TYPE\", Scope2[Scope2.LEVEL
+ = 12] = \"LEVEL\", Scope2[Scope2.ATTRIBUTE = 13] = \"ATTRIBUTE\", Scope2[Scope2.BLOT
+ = 14] = \"BLOT\", Scope2[Scope2.INLINE = 7] = \"INLINE\", Scope2[Scope2.BLOCK
+ = 11] = \"BLOCK\", Scope2[Scope2.BLOCK_BLOT = 10] = \"BLOCK_BLOT\", Scope2[Scope2.INLINE_BLOT
+ = 6] = \"INLINE_BLOT\", Scope2[Scope2.BLOCK_ATTRIBUTE = 9] = \"BLOCK_ATTRIBUTE\",
+ Scope2[Scope2.INLINE_ATTRIBUTE = 5] = \"INLINE_ATTRIBUTE\", Scope2[Scope2.ANY
+ = 15] = \"ANY\", Scope2))(Scope || {});\nclass Attributor {\n constructor(attrName,
+ keyName, options = {}) {\n this.attrName = attrName, this.keyName = keyName;\n
+ \ const attributeBit = Scope.TYPE & Scope.ATTRIBUTE;\n this.scope = options.scope
+ != null ? (\n // Ignore type bits, force attribute bit\n options.scope
+ & Scope.LEVEL | attributeBit\n ) : Scope.ATTRIBUTE, options.whitelist !=
+ null && (this.whitelist = options.whitelist);\n }\n static keys(node) {\n
+ \ return Array.from(node.attributes).map((item) => item.name);\n }\n add(node,
+ value) {\n return this.canAdd(node, value) ? (node.setAttribute(this.keyName,
+ value), true) : false;\n }\n canAdd(_node, value) {\n return this.whitelist
+ == null ? true : typeof value == \"string\" ? this.whitelist.indexOf(value.replace(/[\"']/g,
+ \"\")) > -1 : this.whitelist.indexOf(value) > -1;\n }\n remove(node) {\n
+ \ node.removeAttribute(this.keyName);\n }\n value(node) {\n const value
+ = node.getAttribute(this.keyName);\n return this.canAdd(node, value) &&
+ value ? value : \"\";\n }\n}\nclass ParchmentError extends Error {\n constructor(message)
+ {\n message = \"[Parchment] \" + message, super(message), this.message
+ = message, this.name = this.constructor.name;\n }\n}\nconst _Registry = class
+ _Registry2 {\n constructor() {\n this.attributes = {}, this.classes =
+ {}, this.tags = {}, this.types = {};\n }\n static find(node, bubble = false)
+ {\n if (node == null)\n return null;\n if (this.blots.has(node))\n
+ \ return this.blots.get(node) || null;\n if (bubble) {\n let parentNode
+ = null;\n try {\n parentNode = node.parentNode;\n } catch
+ {\n return null;\n }\n return this.find(parentNode, bubble);\n
+ \ }\n return null;\n }\n create(scroll, input, value) {\n const
+ match22 = this.query(input);\n if (match22 == null)\n throw new ParchmentError(`Unable
+ to create ${input} blot`);\n const blotClass = match22, node = (\n //
+ @ts-expect-error Fix me later\n input instanceof Node || input.nodeType
+ === Node.TEXT_NODE ? input : blotClass.create(value)\n ), blot = new blotClass(scroll,
+ node, value);\n return _Registry2.blots.set(blot.domNode, blot), blot;\n
+ \ }\n find(node, bubble = false) {\n return _Registry2.find(node, bubble);\n
+ \ }\n query(query, scope = Scope.ANY) {\n let match22;\n return typeof
+ query == \"string\" ? match22 = this.types[query] || this.attributes[query]
+ : query instanceof Text || query.nodeType === Node.TEXT_NODE ? match22 = this.types.text
+ : typeof query == \"number\" ? query & Scope.LEVEL & Scope.BLOCK ? match22
+ = this.types.block : query & Scope.LEVEL & Scope.INLINE && (match22 = this.types.inline)
+ : query instanceof Element && ((query.getAttribute(\"class\") || \"\").split(/\\s+/).some((name)
+ => (match22 = this.classes[name], !!match22)), match22 = match22 || this.tags[query.tagName]),
+ match22 == null ? null : \"scope\" in match22 && scope & Scope.LEVEL & match22.scope
+ && scope & Scope.TYPE & match22.scope ? match22 : null;\n }\n register(...definitions)
+ {\n return definitions.map((definition) => {\n const isBlot = \"blotName\"
+ in definition, isAttr = \"attrName\" in definition;\n if (!isBlot &&
+ !isAttr)\n throw new ParchmentError(\"Invalid definition\");\n if
+ (isBlot && definition.blotName === \"abstract\")\n throw new ParchmentError(\"Cannot
+ register abstract class\");\n const key = isBlot ? definition.blotName
+ : isAttr ? definition.attrName : void 0;\n return this.types[key] = definition,
+ isAttr ? typeof definition.keyName == \"string\" && (this.attributes[definition.keyName]
+ = definition) : isBlot && (definition.className && (this.classes[definition.className]
+ = definition), definition.tagName && (Array.isArray(definition.tagName) ?
+ definition.tagName = definition.tagName.map((tagName) => tagName.toUpperCase())
+ : definition.tagName = definition.tagName.toUpperCase(), (Array.isArray(definition.tagName)
+ ? definition.tagName : [definition.tagName]).forEach((tag) => {\n (this.tags[tag]
+ == null || definition.className == null) && (this.tags[tag] = definition);\n
+ \ }))), definition;\n });\n }\n};\n_Registry.blots = /* @__PURE__
+ */ new WeakMap();\nlet Registry = _Registry;\nfunction match2(node, prefix)
+ {\n return (node.getAttribute(\"class\") || \"\").split(/\\s+/).filter((name)
+ => name.indexOf(`${prefix}-`) === 0);\n}\nclass ClassAttributor extends Attributor
+ {\n static keys(node) {\n return (node.getAttribute(\"class\") || \"\").split(/\\s+/).map((name)
+ => name.split(\"-\").slice(0, -1).join(\"-\"));\n }\n add(node, value) {\n
+ \ return this.canAdd(node, value) ? (this.remove(node), node.classList.add(`${this.keyName}-${value}`),
+ true) : false;\n }\n remove(node) {\n match2(node, this.keyName).forEach((name)
+ => {\n node.classList.remove(name);\n }), node.classList.length ===
+ 0 && node.removeAttribute(\"class\");\n }\n value(node) {\n const value
+ = (match2(node, this.keyName)[0] || \"\").slice(this.keyName.length + 1);\n
+ \ return this.canAdd(node, value) ? value : \"\";\n }\n}\nconst ClassAttributor$1
+ = ClassAttributor;\nfunction camelize(name) {\n const parts = name.split(\"-\"),
+ rest = parts.slice(1).map((part) => part[0].toUpperCase() + part.slice(1)).join(\"\");\n
+ \ return parts[0] + rest;\n}\nclass StyleAttributor extends Attributor {\n
+ \ static keys(node) {\n return (node.getAttribute(\"style\") || \"\").split(\";\").map((value)
+ => value.split(\":\")[0].trim());\n }\n add(node, value) {\n return this.canAdd(node,
+ value) ? (node.style[camelize(this.keyName)] = value, true) : false;\n }\n
+ \ remove(node) {\n node.style[camelize(this.keyName)] = \"\", node.getAttribute(\"style\")
+ || node.removeAttribute(\"style\");\n }\n value(node) {\n const value
+ = node.style[camelize(this.keyName)];\n return this.canAdd(node, value)
+ ? value : \"\";\n }\n}\nconst StyleAttributor$1 = StyleAttributor;\nclass
+ AttributorStore {\n constructor(domNode) {\n this.attributes = {}, this.domNode
+ = domNode, this.build();\n }\n attribute(attribute2, value) {\n value
+ ? attribute2.add(this.domNode, value) && (attribute2.value(this.domNode) !=
+ null ? this.attributes[attribute2.attrName] = attribute2 : delete this.attributes[attribute2.attrName])
+ : (attribute2.remove(this.domNode), delete this.attributes[attribute2.attrName]);\n
+ \ }\n build() {\n this.attributes = {};\n const blot = Registry.find(this.domNode);\n
+ \ if (blot == null)\n return;\n const attributes = Attributor.keys(this.domNode),
+ classes = ClassAttributor$1.keys(this.domNode), styles = StyleAttributor$1.keys(this.domNode);\n
+ \ attributes.concat(classes).concat(styles).forEach((name) => {\n const
+ attr = blot.scroll.query(name, Scope.ATTRIBUTE);\n attr instanceof Attributor
+ && (this.attributes[attr.attrName] = attr);\n });\n }\n copy(target)
+ {\n Object.keys(this.attributes).forEach((key) => {\n const value
+ = this.attributes[key].value(this.domNode);\n target.format(key, value);\n
+ \ });\n }\n move(target) {\n this.copy(target), Object.keys(this.attributes).forEach((key)
+ => {\n this.attributes[key].remove(this.domNode);\n }), this.attributes
+ = {};\n }\n values() {\n return Object.keys(this.attributes).reduce(\n
+ \ (attributes, name) => (attributes[name] = this.attributes[name].value(this.domNode),
+ attributes),\n {}\n );\n }\n}\nconst AttributorStore$1 = AttributorStore,
+ _ShadowBlot = class _ShadowBlot2 {\n constructor(scroll, domNode) {\n this.scroll
+ = scroll, this.domNode = domNode, Registry.blots.set(domNode, this), this.prev
+ = null, this.next = null;\n }\n static create(rawValue) {\n if (this.tagName
+ == null)\n throw new ParchmentError(\"Blot definition missing tagName\");\n
+ \ let node, value;\n return Array.isArray(this.tagName) ? (typeof rawValue
+ == \"string\" ? (value = rawValue.toUpperCase(), parseInt(value, 10).toString()
+ === value && (value = parseInt(value, 10))) : typeof rawValue == \"number\"
+ && (value = rawValue), typeof value == \"number\" ? node = document.createElement(this.tagName[value
+ - 1]) : value && this.tagName.indexOf(value) > -1 ? node = document.createElement(value)
+ : node = document.createElement(this.tagName[0])) : node = document.createElement(this.tagName),
+ this.className && node.classList.add(this.className), node;\n }\n // Hack
+ for accessing inherited static methods\n get statics() {\n return this.constructor;\n
+ \ }\n attach() {\n }\n clone() {\n const domNode = this.domNode.cloneNode(false);\n
+ \ return this.scroll.create(domNode);\n }\n detach() {\n this.parent
+ != null && this.parent.removeChild(this), Registry.blots.delete(this.domNode);\n
+ \ }\n deleteAt(index2, length) {\n this.isolate(index2, length).remove();\n
+ \ }\n formatAt(index2, length, name, value) {\n const blot = this.isolate(index2,
+ length);\n if (this.scroll.query(name, Scope.BLOT) != null && value)\n
+ \ blot.wrap(name, value);\n else if (this.scroll.query(name, Scope.ATTRIBUTE)
+ != null) {\n const parent = this.scroll.create(this.statics.scope);\n
+ \ blot.wrap(parent), parent.format(name, value);\n }\n }\n insertAt(index2,
+ value, def) {\n const blot = def == null ? this.scroll.create(\"text\",
+ value) : this.scroll.create(value, def), ref = this.split(index2);\n this.parent.insertBefore(blot,
+ ref || void 0);\n }\n isolate(index2, length) {\n const target = this.split(index2);\n
+ \ if (target == null)\n throw new Error(\"Attempt to isolate at end\");\n
+ \ return target.split(length), target;\n }\n length() {\n return 1;\n
+ \ }\n offset(root2 = this.parent) {\n return this.parent == null || this
+ === root2 ? 0 : this.parent.children.offset(this) + this.parent.offset(root2);\n
+ \ }\n optimize(_context) {\n this.statics.requiredContainer && !(this.parent
+ instanceof this.statics.requiredContainer) && this.wrap(this.statics.requiredContainer.blotName);\n
+ \ }\n remove() {\n this.domNode.parentNode != null && this.domNode.parentNode.removeChild(this.domNode),
+ this.detach();\n }\n replaceWith(name, value) {\n const replacement =
+ typeof name == \"string\" ? this.scroll.create(name, value) : name;\n return
+ this.parent != null && (this.parent.insertBefore(replacement, this.next ||
+ void 0), this.remove()), replacement;\n }\n split(index2, _force) {\n return
+ index2 === 0 ? this : this.next;\n }\n update(_mutations, _context) {\n
+ \ }\n wrap(name, value) {\n const wrapper = typeof name == \"string\"
+ ? this.scroll.create(name, value) : name;\n if (this.parent != null &&
+ this.parent.insertBefore(wrapper, this.next || void 0), typeof wrapper.appendChild
+ != \"function\")\n throw new ParchmentError(`Cannot wrap ${name}`);\n
+ \ return wrapper.appendChild(this), wrapper;\n }\n};\n_ShadowBlot.blotName
+ = \"abstract\";\nlet ShadowBlot = _ShadowBlot;\nconst _LeafBlot = class _LeafBlot2
+ extends ShadowBlot {\n /**\n * Returns the value represented by domNode
+ if it is this Blot's type\n * No checking that domNode can represent this
+ Blot type is required so\n * applications needing it should check externally
+ before calling.\n */\n static value(_domNode) {\n return true;\n }\n
+ \ /**\n * Given location represented by node and offset from DOM Selection
+ Range,\n * return index to that location.\n */\n index(node, offset)
+ {\n return this.domNode === node || this.domNode.compareDocumentPosition(node)
+ & Node.DOCUMENT_POSITION_CONTAINED_BY ? Math.min(offset, 1) : -1;\n }\n /**\n
+ \ * Given index to location within blot, return node and offset representing\n
+ \ * that location, consumable by DOM Selection Range\n */\n position(index2,
+ _inclusive) {\n let offset = Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);\n
+ \ return index2 > 0 && (offset += 1), [this.parent.domNode, offset];\n }\n
+ \ /**\n * Return value represented by this blot\n * Should not change
+ without interaction from API or\n * user change detectable by update()\n
+ \ */\n value() {\n return {\n [this.statics.blotName]: this.statics.value(this.domNode)
+ || true\n };\n }\n};\n_LeafBlot.scope = Scope.INLINE_BLOT;\nlet LeafBlot
+ = _LeafBlot;\nconst LeafBlot$1 = LeafBlot;\nclass LinkedList {\n constructor()
+ {\n this.head = null, this.tail = null, this.length = 0;\n }\n append(...nodes)
+ {\n if (this.insertBefore(nodes[0], null), nodes.length > 1) {\n const
+ rest = nodes.slice(1);\n this.append(...rest);\n }\n }\n at(index2)
+ {\n const next = this.iterator();\n let cur = next();\n for (; cur
+ && index2 > 0; )\n index2 -= 1, cur = next();\n return cur;\n }\n
+ \ contains(node) {\n const next = this.iterator();\n let cur = next();\n
+ \ for (; cur; ) {\n if (cur === node)\n return true;\n cur
+ = next();\n }\n return false;\n }\n indexOf(node) {\n const next
+ = this.iterator();\n let cur = next(), index2 = 0;\n for (; cur; ) {\n
+ \ if (cur === node)\n return index2;\n index2 += 1, cur =
+ next();\n }\n return -1;\n }\n insertBefore(node, refNode) {\n node
+ != null && (this.remove(node), node.next = refNode, refNode != null ? (node.prev
+ = refNode.prev, refNode.prev != null && (refNode.prev.next = node), refNode.prev
+ = node, refNode === this.head && (this.head = node)) : this.tail != null ?
+ (this.tail.next = node, node.prev = this.tail, this.tail = node) : (node.prev
+ = null, this.head = this.tail = node), this.length += 1);\n }\n offset(target)
+ {\n let index2 = 0, cur = this.head;\n for (; cur != null; ) {\n if
+ (cur === target)\n return index2;\n index2 += cur.length(), cur
+ = cur.next;\n }\n return -1;\n }\n remove(node) {\n this.contains(node)
+ && (node.prev != null && (node.prev.next = node.next), node.next != null &&
+ (node.next.prev = node.prev), node === this.head && (this.head = node.next),
+ node === this.tail && (this.tail = node.prev), this.length -= 1);\n }\n iterator(curNode
+ = this.head) {\n return () => {\n const ret = curNode;\n return
+ curNode != null && (curNode = curNode.next), ret;\n };\n }\n find(index2,
+ inclusive = false) {\n const next = this.iterator();\n let cur = next();\n
+ \ for (; cur; ) {\n const length = cur.length();\n if (index2
+ < length || inclusive && index2 === length && (cur.next == null || cur.next.length()
+ !== 0))\n return [cur, index2];\n index2 -= length, cur = next();\n
+ \ }\n return [null, 0];\n }\n forEach(callback) {\n const next =
+ this.iterator();\n let cur = next();\n for (; cur; )\n callback(cur),
+ cur = next();\n }\n forEachAt(index2, length, callback) {\n if (length
+ <= 0)\n return;\n const [startNode, offset] = this.find(index2);\n
+ \ let curIndex = index2 - offset;\n const next = this.iterator(startNode);\n
+ \ let cur = next();\n for (; cur && curIndex < index2 + length; ) {\n
+ \ const curLength = cur.length();\n index2 > curIndex ? callback(\n
+ \ cur,\n index2 - curIndex,\n Math.min(length, curIndex
+ + curLength - index2)\n ) : callback(cur, 0, Math.min(curLength, index2
+ + length - curIndex)), curIndex += curLength, cur = next();\n }\n }\n
+ \ map(callback) {\n return this.reduce((memo, cur) => (memo.push(callback(cur)),
+ memo), []);\n }\n reduce(callback, memo) {\n const next = this.iterator();\n
+ \ let cur = next();\n for (; cur; )\n memo = callback(memo, cur),
+ cur = next();\n return memo;\n }\n}\nfunction makeAttachedBlot(node, scroll)
+ {\n const found = scroll.find(node);\n if (found)\n return found;\n try
+ {\n return scroll.create(node);\n } catch {\n const blot = scroll.create(Scope.INLINE);\n
+ \ return Array.from(node.childNodes).forEach((child) => {\n blot.domNode.appendChild(child);\n
+ \ }), node.parentNode && node.parentNode.replaceChild(blot.domNode, node),
+ blot.attach(), blot;\n }\n}\nconst _ParentBlot = class _ParentBlot2 extends
+ ShadowBlot {\n constructor(scroll, domNode) {\n super(scroll, domNode),
+ this.uiNode = null, this.build();\n }\n appendChild(other) {\n this.insertBefore(other);\n
+ \ }\n attach() {\n super.attach(), this.children.forEach((child) => {\n
+ \ child.attach();\n });\n }\n attachUI(node) {\n this.uiNode !=
+ null && this.uiNode.remove(), this.uiNode = node, _ParentBlot2.uiClass &&
+ this.uiNode.classList.add(_ParentBlot2.uiClass), this.uiNode.setAttribute(\"contenteditable\",
+ \"false\"), this.domNode.insertBefore(this.uiNode, this.domNode.firstChild);\n
+ \ }\n /**\n * Called during construction, should fill its own children
+ LinkedList.\n */\n build() {\n this.children = new LinkedList(), Array.from(this.domNode.childNodes).filter((node)
+ => node !== this.uiNode).reverse().forEach((node) => {\n try {\n const
+ child = makeAttachedBlot(node, this.scroll);\n this.insertBefore(child,
+ this.children.head || void 0);\n } catch (err) {\n if (err instanceof
+ ParchmentError)\n return;\n throw err;\n }\n });\n
+ \ }\n deleteAt(index2, length) {\n if (index2 === 0 && length === this.length())\n
+ \ return this.remove();\n this.children.forEachAt(index2, length, (child,
+ offset, childLength) => {\n child.deleteAt(offset, childLength);\n });\n
+ \ }\n descendant(criteria, index2 = 0) {\n const [child, offset] = this.children.find(index2);\n
+ \ return criteria.blotName == null && criteria(child) || criteria.blotName
+ != null && child instanceof criteria ? [child, offset] : child instanceof
+ _ParentBlot2 ? child.descendant(criteria, offset) : [null, -1];\n }\n descendants(criteria,
+ index2 = 0, length = Number.MAX_VALUE) {\n let descendants = [], lengthLeft
+ = length;\n return this.children.forEachAt(\n index2,\n length,\n
+ \ (child, childIndex, childLength) => {\n (criteria.blotName ==
+ null && criteria(child) || criteria.blotName != null && child instanceof criteria)
+ && descendants.push(child), child instanceof _ParentBlot2 && (descendants
+ = descendants.concat(\n child.descendants(criteria, childIndex, lengthLeft)\n
+ \ )), lengthLeft -= childLength;\n }\n ), descendants;\n }\n
+ \ detach() {\n this.children.forEach((child) => {\n child.detach();\n
+ \ }), super.detach();\n }\n enforceAllowedChildren() {\n let done =
+ false;\n this.children.forEach((child) => {\n done || this.statics.allowedChildren.some(\n
+ \ (def) => child instanceof def\n ) || (child.statics.scope ===
+ Scope.BLOCK_BLOT ? (child.next != null && this.splitAfter(child), child.prev
+ != null && this.splitAfter(child.prev), child.parent.unwrap(), done = true)
+ : child instanceof _ParentBlot2 ? child.unwrap() : child.remove());\n });\n
+ \ }\n formatAt(index2, length, name, value) {\n this.children.forEachAt(index2,
+ length, (child, offset, childLength) => {\n child.formatAt(offset, childLength,
+ name, value);\n });\n }\n insertAt(index2, value, def) {\n const [child,
+ offset] = this.children.find(index2);\n if (child)\n child.insertAt(offset,
+ value, def);\n else {\n const blot = def == null ? this.scroll.create(\"text\",
+ value) : this.scroll.create(value, def);\n this.appendChild(blot);\n
+ \ }\n }\n insertBefore(childBlot, refBlot) {\n childBlot.parent !=
+ null && childBlot.parent.children.remove(childBlot);\n let refDomNode =
+ null;\n this.children.insertBefore(childBlot, refBlot || null), childBlot.parent
+ = this, refBlot != null && (refDomNode = refBlot.domNode), (this.domNode.parentNode
+ !== childBlot.domNode || this.domNode.nextSibling !== refDomNode) && this.domNode.insertBefore(childBlot.domNode,
+ refDomNode), childBlot.attach();\n }\n length() {\n return this.children.reduce((memo,
+ child) => memo + child.length(), 0);\n }\n moveChildren(targetParent, refNode)
+ {\n this.children.forEach((child) => {\n targetParent.insertBefore(child,
+ refNode);\n });\n }\n optimize(context) {\n if (super.optimize(context),
+ this.enforceAllowedChildren(), this.uiNode != null && this.uiNode !== this.domNode.firstChild
+ && this.domNode.insertBefore(this.uiNode, this.domNode.firstChild), this.children.length
+ === 0)\n if (this.statics.defaultChild != null) {\n const child
+ = this.scroll.create(this.statics.defaultChild.blotName);\n this.appendChild(child);\n
+ \ } else\n this.remove();\n }\n path(index2, inclusive = false)
+ {\n const [child, offset] = this.children.find(index2, inclusive), position
+ = [[this, index2]];\n return child instanceof _ParentBlot2 ? position.concat(child.path(offset,
+ inclusive)) : (child != null && position.push([child, offset]), position);\n
+ \ }\n removeChild(child) {\n this.children.remove(child);\n }\n replaceWith(name,
+ value) {\n const replacement = typeof name == \"string\" ? this.scroll.create(name,
+ value) : name;\n return replacement instanceof _ParentBlot2 && this.moveChildren(replacement),
+ super.replaceWith(replacement);\n }\n split(index2, force = false) {\n if
+ (!force) {\n if (index2 === 0)\n return this;\n if (index2
+ === this.length())\n return this.next;\n }\n const after = this.clone();\n
+ \ return this.parent && this.parent.insertBefore(after, this.next || void
+ 0), this.children.forEachAt(index2, this.length(), (child, offset, _length)
+ => {\n const split = child.split(offset, force);\n split != null
+ && after.appendChild(split);\n }), after;\n }\n splitAfter(child) {\n
+ \ const after = this.clone();\n for (; child.next != null; )\n after.appendChild(child.next);\n
+ \ return this.parent && this.parent.insertBefore(after, this.next || void
+ 0), after;\n }\n unwrap() {\n this.parent && this.moveChildren(this.parent,
+ this.next || void 0), this.remove();\n }\n update(mutations, _context) {\n
+ \ const addedNodes = [], removedNodes = [];\n mutations.forEach((mutation)
+ => {\n mutation.target === this.domNode && mutation.type === \"childList\"
+ && (addedNodes.push(...mutation.addedNodes), removedNodes.push(...mutation.removedNodes));\n
+ \ }), removedNodes.forEach((node) => {\n if (node.parentNode != null
+ && // @ts-expect-error Fix me later\n node.tagName !== \"IFRAME\" &&
+ document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY)\n
+ \ return;\n const blot = this.scroll.find(node);\n blot !=
+ null && (blot.domNode.parentNode == null || blot.domNode.parentNode === this.domNode)
+ && blot.detach();\n }), addedNodes.filter((node) => node.parentNode ===
+ this.domNode && node !== this.uiNode).sort((a2, b2) => a2 === b2 ? 0 : a2.compareDocumentPosition(b2)
+ & Node.DOCUMENT_POSITION_FOLLOWING ? 1 : -1).forEach((node) => {\n let
+ refBlot = null;\n node.nextSibling != null && (refBlot = this.scroll.find(node.nextSibling));\n
+ \ const blot = makeAttachedBlot(node, this.scroll);\n (blot.next
+ !== refBlot || blot.next == null) && (blot.parent != null && blot.parent.removeChild(this),
+ this.insertBefore(blot, refBlot || void 0));\n }), this.enforceAllowedChildren();\n
+ \ }\n};\n_ParentBlot.uiClass = \"\";\nlet ParentBlot = _ParentBlot;\nconst
+ ParentBlot$1 = ParentBlot;\nfunction isEqual(obj1, obj2) {\n if (Object.keys(obj1).length
+ !== Object.keys(obj2).length)\n return false;\n for (const prop in obj1)\n
+ \ if (obj1[prop] !== obj2[prop])\n return false;\n return true;\n}\nconst
+ _InlineBlot = class _InlineBlot2 extends ParentBlot$1 {\n static create(value)
+ {\n return super.create(value);\n }\n static formats(domNode, scroll)
+ {\n const match22 = scroll.query(_InlineBlot2.blotName);\n if (!(match22
+ != null && domNode.tagName === match22.tagName)) {\n if (typeof this.tagName
+ == \"string\")\n return true;\n if (Array.isArray(this.tagName))\n
+ \ return domNode.tagName.toLowerCase();\n }\n }\n constructor(scroll,
+ domNode) {\n super(scroll, domNode), this.attributes = new AttributorStore$1(this.domNode);\n
+ \ }\n format(name, value) {\n if (name === this.statics.blotName && !value)\n
+ \ this.children.forEach((child) => {\n child instanceof _InlineBlot2
+ || (child = child.wrap(_InlineBlot2.blotName, true)), this.attributes.copy(child);\n
+ \ }), this.unwrap();\n else {\n const format2 = this.scroll.query(name,
+ Scope.INLINE);\n if (format2 == null)\n return;\n format2
+ instanceof Attributor ? this.attributes.attribute(format2, value) : value
+ && (name !== this.statics.blotName || this.formats()[name] !== value) && this.replaceWith(name,
+ value);\n }\n }\n formats() {\n const formats = this.attributes.values(),
+ format2 = this.statics.formats(this.domNode, this.scroll);\n return format2
+ != null && (formats[this.statics.blotName] = format2), formats;\n }\n formatAt(index2,
+ length, name, value) {\n this.formats()[name] != null || this.scroll.query(name,
+ Scope.ATTRIBUTE) ? this.isolate(index2, length).format(name, value) : super.formatAt(index2,
+ length, name, value);\n }\n optimize(context) {\n super.optimize(context);\n
+ \ const formats = this.formats();\n if (Object.keys(formats).length ===
+ 0)\n return this.unwrap();\n const next = this.next;\n next instanceof
+ _InlineBlot2 && next.prev === this && isEqual(formats, next.formats()) &&
+ (next.moveChildren(this), next.remove());\n }\n replaceWith(name, value)
+ {\n const replacement = super.replaceWith(name, value);\n return this.attributes.copy(replacement),
+ replacement;\n }\n update(mutations, context) {\n super.update(mutations,
+ context), mutations.some(\n (mutation) => mutation.target === this.domNode
+ && mutation.type === \"attributes\"\n ) && this.attributes.build();\n }\n
+ \ wrap(name, value) {\n const wrapper = super.wrap(name, value);\n return
+ wrapper instanceof _InlineBlot2 && this.attributes.move(wrapper), wrapper;\n
+ \ }\n};\n_InlineBlot.allowedChildren = [_InlineBlot, LeafBlot$1], _InlineBlot.blotName
+ = \"inline\", _InlineBlot.scope = Scope.INLINE_BLOT, _InlineBlot.tagName =
+ \"SPAN\";\nlet InlineBlot = _InlineBlot;\nconst InlineBlot$1 = InlineBlot,
+ _BlockBlot = class _BlockBlot2 extends ParentBlot$1 {\n static create(value)
+ {\n return super.create(value);\n }\n static formats(domNode, scroll)
+ {\n const match22 = scroll.query(_BlockBlot2.blotName);\n if (!(match22
+ != null && domNode.tagName === match22.tagName)) {\n if (typeof this.tagName
+ == \"string\")\n return true;\n if (Array.isArray(this.tagName))\n
+ \ return domNode.tagName.toLowerCase();\n }\n }\n constructor(scroll,
+ domNode) {\n super(scroll, domNode), this.attributes = new AttributorStore$1(this.domNode);\n
+ \ }\n format(name, value) {\n const format2 = this.scroll.query(name,
+ Scope.BLOCK);\n format2 != null && (format2 instanceof Attributor ? this.attributes.attribute(format2,
+ value) : name === this.statics.blotName && !value ? this.replaceWith(_BlockBlot2.blotName)
+ : value && (name !== this.statics.blotName || this.formats()[name] !== value)
+ && this.replaceWith(name, value));\n }\n formats() {\n const formats
+ = this.attributes.values(), format2 = this.statics.formats(this.domNode, this.scroll);\n
+ \ return format2 != null && (formats[this.statics.blotName] = format2),
+ formats;\n }\n formatAt(index2, length, name, value) {\n this.scroll.query(name,
+ Scope.BLOCK) != null ? this.format(name, value) : super.formatAt(index2, length,
+ name, value);\n }\n insertAt(index2, value, def) {\n if (def == null
+ || this.scroll.query(value, Scope.INLINE) != null)\n super.insertAt(index2,
+ value, def);\n else {\n const after = this.split(index2);\n if
+ (after != null) {\n const blot = this.scroll.create(value, def);\n
+ \ after.parent.insertBefore(blot, after);\n } else\n throw
+ new Error(\"Attempt to insertAt after block boundaries\");\n }\n }\n replaceWith(name,
+ value) {\n const replacement = super.replaceWith(name, value);\n return
+ this.attributes.copy(replacement), replacement;\n }\n update(mutations,
+ context) {\n super.update(mutations, context), mutations.some(\n (mutation)
+ => mutation.target === this.domNode && mutation.type === \"attributes\"\n
+ \ ) && this.attributes.build();\n }\n};\n_BlockBlot.blotName = \"block\",
+ _BlockBlot.scope = Scope.BLOCK_BLOT, _BlockBlot.tagName = \"P\", _BlockBlot.allowedChildren
+ = [\n InlineBlot$1,\n _BlockBlot,\n LeafBlot$1\n];\nlet BlockBlot = _BlockBlot;\nconst
+ BlockBlot$1 = BlockBlot, _ContainerBlot = class _ContainerBlot2 extends ParentBlot$1
+ {\n checkMerge() {\n return this.next !== null && this.next.statics.blotName
+ === this.statics.blotName;\n }\n deleteAt(index2, length) {\n super.deleteAt(index2,
+ length), this.enforceAllowedChildren();\n }\n formatAt(index2, length, name,
+ value) {\n super.formatAt(index2, length, name, value), this.enforceAllowedChildren();\n
+ \ }\n insertAt(index2, value, def) {\n super.insertAt(index2, value, def),
+ this.enforceAllowedChildren();\n }\n optimize(context) {\n super.optimize(context),
+ this.children.length > 0 && this.next != null && this.checkMerge() && (this.next.moveChildren(this),
+ this.next.remove());\n }\n};\n_ContainerBlot.blotName = \"container\", _ContainerBlot.scope
+ = Scope.BLOCK_BLOT;\nlet ContainerBlot = _ContainerBlot;\nconst ContainerBlot$1
+ = ContainerBlot;\nclass EmbedBlot extends LeafBlot$1 {\n static formats(_domNode,
+ _scroll) {\n }\n format(name, value) {\n super.formatAt(0, this.length(),
+ name, value);\n }\n formatAt(index2, length, name, value) {\n index2
+ === 0 && length === this.length() ? this.format(name, value) : super.formatAt(index2,
+ length, name, value);\n }\n formats() {\n return this.statics.formats(this.domNode,
+ this.scroll);\n }\n}\nconst EmbedBlot$1 = EmbedBlot, OBSERVER_CONFIG = {\n
+ \ attributes: true,\n characterData: true,\n characterDataOldValue: true,\n
+ \ childList: true,\n subtree: true\n}, MAX_OPTIMIZE_ITERATIONS = 100, _ScrollBlot
+ = class _ScrollBlot2 extends ParentBlot$1 {\n constructor(registry, node)
+ {\n super(null, node), this.registry = registry, this.scroll = this, this.build(),
+ this.observer = new MutationObserver((mutations) => {\n this.update(mutations);\n
+ \ }), this.observer.observe(this.domNode, OBSERVER_CONFIG), this.attach();\n
+ \ }\n create(input, value) {\n return this.registry.create(this, input,
+ value);\n }\n find(node, bubble = false) {\n const blot = this.registry.find(node,
+ bubble);\n return blot ? blot.scroll === this ? blot : bubble ? this.find(blot.scroll.domNode.parentNode,
+ true) : null : null;\n }\n query(query, scope = Scope.ANY) {\n return
+ this.registry.query(query, scope);\n }\n register(...definitions) {\n return
+ this.registry.register(...definitions);\n }\n build() {\n this.scroll
+ != null && super.build();\n }\n detach() {\n super.detach(), this.observer.disconnect();\n
+ \ }\n deleteAt(index2, length) {\n this.update(), index2 === 0 && length
+ === this.length() ? this.children.forEach((child) => {\n child.remove();\n
+ \ }) : super.deleteAt(index2, length);\n }\n formatAt(index2, length,
+ name, value) {\n this.update(), super.formatAt(index2, length, name, value);\n
+ \ }\n insertAt(index2, value, def) {\n this.update(), super.insertAt(index2,
+ value, def);\n }\n optimize(mutations = [], context = {}) {\n super.optimize(context);\n
+ \ const mutationsMap = context.mutationsMap || /* @__PURE__ */ new WeakMap();\n
+ \ let records = Array.from(this.observer.takeRecords());\n for (; records.length
+ > 0; )\n mutations.push(records.pop());\n const mark = (blot, markParent
+ = true) => {\n blot == null || blot === this || blot.domNode.parentNode
+ != null && (mutationsMap.has(blot.domNode) || mutationsMap.set(blot.domNode,
+ []), markParent && mark(blot.parent));\n }, optimize = (blot) => {\n mutationsMap.has(blot.domNode)
+ && (blot instanceof ParentBlot$1 && blot.children.forEach(optimize), mutationsMap.delete(blot.domNode),
+ blot.optimize(context));\n };\n let remaining = mutations;\n for
+ (let i3 = 0; remaining.length > 0; i3 += 1) {\n if (i3 >= MAX_OPTIMIZE_ITERATIONS)\n
+ \ throw new Error(\"[Parchment] Maximum optimize iterations reached\");\n
+ \ for (remaining.forEach((mutation) => {\n const blot = this.find(mutation.target,
+ true);\n blot != null && (blot.domNode === mutation.target && (mutation.type
+ === \"childList\" ? (mark(this.find(mutation.previousSibling, false)), Array.from(mutation.addedNodes).forEach((node)
+ => {\n const child = this.find(node, false);\n mark(child,
+ false), child instanceof ParentBlot$1 && child.children.forEach((grandChild)
+ => {\n mark(grandChild, false);\n });\n })) : mutation.type
+ === \"attributes\" && mark(blot.prev)), mark(blot));\n }), this.children.forEach(optimize),
+ remaining = Array.from(this.observer.takeRecords()), records = remaining.slice();
+ records.length > 0; )\n mutations.push(records.pop());\n }\n }\n
+ \ update(mutations, context = {}) {\n mutations = mutations || this.observer.takeRecords();\n
+ \ const mutationsMap = /* @__PURE__ */ new WeakMap();\n mutations.map((mutation)
+ => {\n const blot = this.find(mutation.target, true);\n return blot
+ == null ? null : mutationsMap.has(blot.domNode) ? (mutationsMap.get(blot.domNode).push(mutation),
+ null) : (mutationsMap.set(blot.domNode, [mutation]), blot);\n }).forEach((blot)
+ => {\n blot != null && blot !== this && mutationsMap.has(blot.domNode)
+ && blot.update(mutationsMap.get(blot.domNode) || [], context);\n }), context.mutationsMap
+ = mutationsMap, mutationsMap.has(this.domNode) && super.update(mutationsMap.get(this.domNode),
+ context), this.optimize(mutations, context);\n }\n};\n_ScrollBlot.blotName
+ = \"scroll\", _ScrollBlot.defaultChild = BlockBlot$1, _ScrollBlot.allowedChildren
+ = [BlockBlot$1, ContainerBlot$1], _ScrollBlot.scope = Scope.BLOCK_BLOT, _ScrollBlot.tagName
+ = \"DIV\";\nlet ScrollBlot = _ScrollBlot;\nconst ScrollBlot$1 = ScrollBlot,
+ _TextBlot = class _TextBlot2 extends LeafBlot$1 {\n static create(value)
+ {\n return document.createTextNode(value);\n }\n static value(domNode)
+ {\n return domNode.data;\n }\n constructor(scroll, node) {\n super(scroll,
+ node), this.text = this.statics.value(this.domNode);\n }\n deleteAt(index2,
+ length) {\n this.domNode.data = this.text = this.text.slice(0, index2)
+ + this.text.slice(index2 + length);\n }\n index(node, offset) {\n return
+ this.domNode === node ? offset : -1;\n }\n insertAt(index2, value, def)
+ {\n def == null ? (this.text = this.text.slice(0, index2) + value + this.text.slice(index2),
+ this.domNode.data = this.text) : super.insertAt(index2, value, def);\n }\n
+ \ length() {\n return this.text.length;\n }\n optimize(context) {\n super.optimize(context),
+ this.text = this.statics.value(this.domNode), this.text.length === 0 ? this.remove()
+ : this.next instanceof _TextBlot2 && this.next.prev === this && (this.insertAt(this.length(),
+ this.next.value()), this.next.remove());\n }\n position(index2, _inclusive
+ = false) {\n return [this.domNode, index2];\n }\n split(index2, force
+ = false) {\n if (!force) {\n if (index2 === 0)\n return this;\n
+ \ if (index2 === this.length())\n return this.next;\n }\n const
+ after = this.scroll.create(this.domNode.splitText(index2));\n return this.parent.insertBefore(after,
+ this.next || void 0), this.text = this.statics.value(this.domNode), after;\n
+ \ }\n update(mutations, _context) {\n mutations.some((mutation) => mutation.type
+ === \"characterData\" && mutation.target === this.domNode) && (this.text =
+ this.statics.value(this.domNode));\n }\n value() {\n return this.text;\n
+ \ }\n};\n_TextBlot.blotName = \"text\", _TextBlot.scope = Scope.INLINE_BLOT;\nlet
+ TextBlot = _TextBlot;\nconst TextBlot$1 = TextBlot;\nconst Parchment = /*
+ @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__:
+ null,\n Attributor,\n AttributorStore: AttributorStore$1,\n BlockBlot:
+ BlockBlot$1,\n ClassAttributor: ClassAttributor$1,\n ContainerBlot: ContainerBlot$1,\n
+ \ EmbedBlot: EmbedBlot$1,\n InlineBlot: InlineBlot$1,\n LeafBlot: LeafBlot$1,\n
+ \ ParentBlot: ParentBlot$1,\n Registry,\n Scope,\n ScrollBlot: ScrollBlot$1,\n
+ \ StyleAttributor: StyleAttributor$1,\n TextBlot: TextBlot$1\n}, Symbol.toStringTag,
+ { value: \"Module\" }));\nvar Delta$1 = { exports: {} };\nvar diff_1;\nvar
+ hasRequiredDiff;\nfunction requireDiff() {\n if (hasRequiredDiff) return
+ diff_1;\n hasRequiredDiff = 1;\n var DIFF_DELETE = -1;\n var DIFF_INSERT
+ = 1;\n var DIFF_EQUAL = 0;\n function diff_main(text1, text2, cursor_pos,
+ cleanup, _fix_unicode) {\n if (text1 === text2) {\n if (text1) {\n
+ \ return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n
+ \ if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1,
+ text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n
+ \ }\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix
+ = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n
+ \ text2 = text2.substring(commonlength);\n commonlength = diff_commonSuffix(text1,
+ text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n
+ \ text1 = text1.substring(0, text1.length - commonlength);\n text2 =
+ text2.substring(0, text2.length - commonlength);\n var diffs = diff_compute_(text1,
+ text2);\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n
+ \ }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n
+ \ }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n
+ \ }\n return diffs;\n }\n function diff_compute_(text1, text2) {\n
+ \ var diffs;\n if (!text1) {\n return [[DIFF_INSERT, text2]];\n
+ \ }\n if (!text2) {\n return [[DIFF_DELETE, text1]];\n }\n var
+ longtext = text1.length > text2.length ? text1 : text2;\n var shorttext
+ = text1.length > text2.length ? text2 : text1;\n var i3 = longtext.indexOf(shorttext);\n
+ \ if (i3 !== -1) {\n diffs = [\n [DIFF_INSERT, longtext.substring(0,
+ i3)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i3
+ + shorttext.length)]\n ];\n if (text1.length > text2.length) {\n
+ \ diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n
+ \ }\n if (shorttext.length === 1) {\n return [\n [DIFF_DELETE,
+ text1],\n [DIFF_INSERT, text2]\n ];\n }\n var hm = diff_halfMatch_(text1,
+ text2);\n if (hm) {\n var text1_a = hm[0];\n var text1_b = hm[1];\n
+ \ var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common
+ = hm[4];\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b
+ = diff_main(text1_b, text2_b);\n return diffs_a.concat([[DIFF_EQUAL,
+ mid_common]], diffs_b);\n }\n return diff_bisect_(text1, text2);\n }\n
+ \ function diff_bisect_(text1, text2) {\n var text1_length = text1.length;\n
+ \ var text2_length = text2.length;\n var max_d = Math.ceil((text1_length
+ + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n
+ \ var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n for
+ (var x2 = 0; x2 < v_length; x2++) {\n v1[x2] = -1;\n v2[x2] = -1;\n
+ \ }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta
+ = text1_length - text2_length;\n var front = delta % 2 !== 0;\n var
+ k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n
+ \ for (var d2 = 0; d2 < max_d; d2++) {\n for (var k1 = -d2 + k1start;
+ k1 <= d2 - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var
+ x1;\n if (k1 === -d2 || k1 !== d2 && v1[k1_offset - 1] < v1[k1_offset
+ + 1]) {\n x1 = v1[k1_offset + 1];\n } else {\n x1
+ = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while
+ (x1 < text1_length && y1 < text2_length && text1.charAt(x1) === text2.charAt(y1))
+ {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n
+ \ if (x1 > text1_length) {\n k1end += 2;\n } else if
+ (y1 > text2_length) {\n k1start += 2;\n } else if (front)
+ {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset
+ >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n var x22
+ = text1_length - v2[k2_offset];\n if (x1 >= x22) {\n return
+ diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n
+ \ }\n for (var k22 = -d2 + k2start; k22 <= d2 - k2end; k22 += 2)
+ {\n var k2_offset = v_offset + k22;\n var x22;\n if (k22
+ === -d2 || k22 !== d2 && v2[k2_offset - 1] < v2[k2_offset + 1]) {\n x22
+ = v2[k2_offset + 1];\n } else {\n x22 = v2[k2_offset - 1]
+ + 1;\n }\n var y2 = x22 - k22;\n while (x22 < text1_length
+ && y2 < text2_length && text1.charAt(text1_length - x22 - 1) === text2.charAt(text2_length
+ - y2 - 1)) {\n x22++;\n y2++;\n }\n v2[k2_offset]
+ = x22;\n if (x22 > text1_length) {\n k2end += 2;\n }
+ else if (y2 > text2_length) {\n k2start += 2;\n } else if
+ (!front) {\n var k1_offset = v_offset + delta - k22;\n if
+ (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var
+ x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n x22
+ = text1_length - x22;\n if (x1 >= x22) {\n return
+ diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n
+ \ }\n }\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT,
+ text2]\n ];\n }\n function diff_bisectSplit_(text1, text2, x2, y2) {\n
+ \ var text1a = text1.substring(0, x2);\n var text2a = text2.substring(0,
+ y2);\n var text1b = text1.substring(x2);\n var text2b = text2.substring(y2);\n
+ \ var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b,
+ text2b);\n return diffs.concat(diffsb);\n }\n function diff_commonPrefix(text1,
+ text2) {\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0))
+ {\n return 0;\n }\n var pointermin = 0;\n var pointermax = Math.min(text1.length,
+ text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n
+ \ while (pointermin < pointermid) {\n if (text1.substring(pointerstart,
+ pointermid) == text2.substring(pointerstart, pointermid)) {\n pointermin
+ = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax
+ = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin)
+ / 2 + pointermin);\n }\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid
+ - 1))) {\n pointermid--;\n }\n return pointermid;\n }\n function
+ diff_commonOverlap_(text1, text2) {\n var text1_length = text1.length;\n
+ \ var text2_length = text2.length;\n if (text1_length == 0 || text2_length
+ == 0) {\n return 0;\n }\n if (text1_length > text2_length) {\n
+ \ text1 = text1.substring(text1_length - text2_length);\n } else if
+ (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n
+ \ }\n var text_length = Math.min(text1_length, text2_length);\n if
+ (text1 == text2) {\n return text_length;\n }\n var best = 0;\n
+ \ var length = 1;\n while (true) {\n var pattern = text1.substring(text_length
+ - length);\n var found = text2.indexOf(pattern);\n if (found ==
+ -1) {\n return best;\n }\n length += found;\n if (found
+ == 0 || text1.substring(text_length - length) == text2.substring(0, length))
+ {\n best = length;\n length++;\n }\n }\n }\n function
+ diff_commonSuffix(text1, text2) {\n if (!text1 || !text2 || text1.slice(-1)
+ !== text2.slice(-1)) {\n return 0;\n }\n var pointermin = 0;\n
+ \ var pointermax = Math.min(text1.length, text2.length);\n var pointermid
+ = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid)
+ {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend)
+ == text2.substring(text2.length - pointermid, text2.length - pointerend))
+ {\n pointermin = pointermid;\n pointerend = pointermin;\n }
+ else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax
+ - pointermin) / 2 + pointermin);\n }\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length
+ - pointermid))) {\n pointermid--;\n }\n return pointermid;\n }\n
+ \ function diff_halfMatch_(text1, text2) {\n var longtext = text1.length
+ > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length
+ ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length)
+ {\n return null;\n }\n function diff_halfMatchI_(longtext2, shorttext2,
+ i3) {\n var seed = longtext2.substring(i3, i3 + Math.floor(longtext2.length
+ / 4));\n var j2 = -1;\n var best_common = \"\";\n var best_longtext_a,
+ best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j2 = shorttext2.indexOf(seed,
+ j2 + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext2.substring(i3),\n
+ \ shorttext2.substring(j2)\n );\n var suffixLength =
+ diff_commonSuffix(\n longtext2.substring(0, i3),\n shorttext2.substring(0,
+ j2)\n );\n if (best_common.length < suffixLength + prefixLength)
+ {\n best_common = shorttext2.substring(j2 - suffixLength, j2) + shorttext2.substring(j2,
+ j2 + prefixLength);\n best_longtext_a = longtext2.substring(0, i3
+ - suffixLength);\n best_longtext_b = longtext2.substring(i3 + prefixLength);\n
+ \ best_shorttext_a = shorttext2.substring(0, j2 - suffixLength);\n
+ \ best_shorttext_b = shorttext2.substring(j2 + prefixLength);\n }\n
+ \ }\n if (best_common.length * 2 >= longtext2.length) {\n return
+ [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n
+ \ best_shorttext_b,\n best_common\n ];\n } else
+ {\n return null;\n }\n }\n var hm1 = diff_halfMatchI_(\n
+ \ longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n
+ \ );\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n
+ \ Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 &&
+ !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n }
+ else if (!hm1) {\n hm = hm2;\n } else {\n hm = hm1[4].length
+ > hm2[4].length ? hm1 : hm2;\n }\n var text1_a, text1_b, text2_a, text2_b;\n
+ \ if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b
+ = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a
+ = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b =
+ hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b,
+ text2_a, text2_b, mid_common];\n }\n function diff_cleanupSemantic(diffs)
+ {\n var changes = false;\n var equalities = [];\n var equalitiesLength
+ = 0;\n var lastequality = null;\n var pointer = 0;\n var length_insertions1
+ = 0;\n var length_deletions1 = 0;\n var length_insertions2 = 0;\n var
+ length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0]
+ == DIFF_EQUAL) {\n equalities[equalitiesLength++] = pointer;\n length_insertions1
+ = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2
+ = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n
+ \ } else {\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2
+ += diffs[pointer][1].length;\n } else {\n length_deletions2
+ += diffs[pointer][1].length;\n }\n if (lastequality && lastequality.length
+ <= Math.max(length_insertions1, length_deletions1) && lastequality.length
+ <= Math.max(length_insertions2, length_deletions2)) {\n diffs.splice(equalities[equalitiesLength
+ - 1], 0, [\n DIFF_DELETE,\n lastequality\n ]);\n
+ \ diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n
+ \ equalitiesLength--;\n equalitiesLength--;\n pointer
+ = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1
+ = 0;\n length_deletions1 = 0;\n length_insertions2 = 0;\n
+ \ length_deletions2 = 0;\n lastequality = null;\n changes
+ = true;\n }\n }\n pointer++;\n }\n if (changes) {\n
+ \ diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n
+ \ pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer
+ - 1][0] == DIFF_DELETE && diffs[pointer][0] == DIFF_INSERT) {\n var
+ deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n
+ \ var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n
+ \ var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n
+ \ if (overlap_length1 >= overlap_length2) {\n if (overlap_length1
+ >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) {\n diffs.splice(pointer,
+ 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1)\n
+ \ ]);\n diffs[pointer - 1][1] = deletion.substring(\n
+ \ 0,\n deletion.length - overlap_length1\n );\n
+ \ diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n
+ \ pointer++;\n }\n } else {\n if (overlap_length2
+ >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) {\n diffs.splice(pointer,
+ 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2)\n
+ \ ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer
+ - 1][1] = insertion.substring(\n 0,\n insertion.length
+ - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n
+ \ diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n
+ \ pointer++;\n }\n }\n pointer++;\n }\n
+ \ pointer++;\n }\n }\n var nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\n
+ \ var whitespaceRegex_ = /\\s/;\n var linebreakRegex_ = /[\\r\\n]/;\n var
+ blanklineEndRegex_ = /\\n\\r?\\n$/;\n var blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n
+ \ function diff_cleanupSemanticLossless(diffs) {\n function diff_cleanupSemanticScore_(one,
+ two) {\n if (!one || !two) {\n return 6;\n }\n var char1
+ = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var
+ nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2
+ = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1
+ && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2
+ && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n
+ \ var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var
+ blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2
+ = lineBreak2 && two.match(blanklineStartRegex_);\n if (blankLine1 ||
+ blankLine2) {\n return 5;\n } else if (lineBreak1 || lineBreak2)
+ {\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 &&
+ whitespace2) {\n return 3;\n } else if (whitespace1 || whitespace2)
+ {\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2)
+ {\n return 1;\n }\n return 0;\n }\n var pointer = 1;\n
+ \ while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0]
+ == DIFF_EQUAL && diffs[pointer + 1][0] == DIFF_EQUAL) {\n var equality1
+ = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var
+ equality2 = diffs[pointer + 1][1];\n var commonOffset = diff_commonSuffix(equality1,
+ edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length
+ - commonOffset);\n equality1 = equality1.substring(0, equality1.length
+ - commonOffset);\n edit = commonString + edit.substring(0, edit.length
+ - commonOffset);\n equality2 = commonString + equality2;\n }\n
+ \ var bestEquality1 = equality1;\n var bestEdit = edit;\n var
+ bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1,
+ edit) + diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0)
+ === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit
+ = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n
+ \ var score = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit,
+ equality2);\n if (score >= bestScore) {\n bestScore =
+ score;\n bestEquality1 = equality1;\n bestEdit = edit;\n
+ \ bestEquality2 = equality2;\n }\n }\n if
+ (diffs[pointer - 1][1] != bestEquality1) {\n if (bestEquality1) {\n
+ \ diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer
+ - 1, 1);\n pointer--;\n }\n diffs[pointer][1]
+ = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1]
+ = bestEquality2;\n } else {\n diffs.splice(pointer + 1,
+ 1);\n pointer--;\n }\n }\n }\n pointer++;\n
+ \ }\n }\n function diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL,
+ \"\"]);\n var pointer = 0;\n var count_delete = 0;\n var count_insert
+ = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n
+ \ while (pointer < diffs.length) {\n if (pointer < diffs.length - 1
+ && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n
+ \ }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n
+ \ text_insert += diffs[pointer][1];\n pointer++;\n break;\n
+ \ case DIFF_DELETE:\n count_delete++;\n text_delete
+ += diffs[pointer][1];\n pointer++;\n break;\n case
+ DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete
+ - 1;\n if (fix_unicode) {\n if (previous_equality >= 0
+ && ends_with_pair_start(diffs[previous_equality][1])) {\n var
+ stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1]
+ = diffs[previous_equality][1].slice(\n 0,\n -1\n
+ \ );\n text_delete = stray + text_delete;\n text_insert
+ = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n
+ \ diffs.splice(previous_equality, 1);\n pointer--;\n
+ \ var k3 = previous_equality - 1;\n if (diffs[k3]
+ && diffs[k3][0] === DIFF_INSERT) {\n count_insert++;\n text_insert
+ = diffs[k3][1] + text_insert;\n k3--;\n }\n
+ \ if (diffs[k3] && diffs[k3][0] === DIFF_DELETE) {\n count_delete++;\n
+ \ text_delete = diffs[k3][1] + text_delete;\n k3--;\n
+ \ }\n previous_equality = k3;\n }\n
+ \ }\n if (starts_with_pair_end(diffs[pointer][1])) {\n
+ \ var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1]
+ = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert
+ += stray;\n }\n }\n if (pointer < diffs.length
+ - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n break;\n
+ \ }\n if (text_delete.length > 0 || text_insert.length >
+ 0) {\n if (text_delete.length > 0 && text_insert.length > 0) {\n
+ \ commonlength = diff_commonPrefix(text_insert, text_delete);\n
+ \ if (commonlength !== 0) {\n if (previous_equality
+ >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n
+ \ 0,\n commonlength\n );\n
+ \ } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n
+ \ text_insert.substring(0, commonlength)\n ]);\n
+ \ pointer++;\n }\n text_insert
+ = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n
+ \ }\n commonlength = diff_commonSuffix(text_insert,
+ text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1]
+ = text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n
+ \ text_insert = text_insert.substring(\n 0,\n
+ \ text_insert.length - commonlength\n );\n
+ \ text_delete = text_delete.substring(\n 0,\n
+ \ text_delete.length - commonlength\n );\n
+ \ }\n }\n var n3 = count_insert + count_delete;\n
+ \ if (text_delete.length === 0 && text_insert.length === 0) {\n
+ \ diffs.splice(pointer - n3, n3);\n pointer = pointer
+ - n3;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer
+ - n3, n3, [DIFF_INSERT, text_insert]);\n pointer = pointer -
+ n3 + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer
+ - n3, n3, [DIFF_DELETE, text_delete]);\n pointer = pointer -
+ n3 + 1;\n } else {\n diffs.splice(\n pointer
+ - n3,\n n3,\n [DIFF_DELETE, text_delete],\n
+ \ [DIFF_INSERT, text_insert]\n );\n pointer
+ = pointer - n3 + 2;\n }\n }\n if (pointer !==
+ 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n diffs[pointer -
+ 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n }
+ else {\n pointer++;\n }\n count_insert = 0;\n
+ \ count_delete = 0;\n text_delete = \"\";\n text_insert
+ = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1]
+ === \"\") {\n diffs.pop();\n }\n var changes = false;\n pointer
+ = 1;\n while (pointer < diffs.length - 1) {\n if (diffs[pointer -
+ 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) {\n if
+ (diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer
+ - 1][1].length\n ) === diffs[pointer - 1][1]) {\n diffs[pointer][1]
+ = diffs[pointer - 1][1] + diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length
+ - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1]
+ = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer
+ - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0,
+ diffs[pointer + 1][1].length) == diffs[pointer + 1][1]) {\n diffs[pointer
+ - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer
+ + 1][1].length) + diffs[pointer + 1][1];\n diffs.splice(pointer +
+ 1, 1);\n changes = true;\n }\n }\n pointer++;\n
+ \ }\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n
+ \ }\n }\n function is_surrogate_pair_start(charCode) {\n return charCode
+ >= 55296 && charCode <= 56319;\n }\n function is_surrogate_pair_end(charCode)
+ {\n return charCode >= 56320 && charCode <= 57343;\n }\n function starts_with_pair_end(str)
+ {\n return is_surrogate_pair_end(str.charCodeAt(0));\n }\n function ends_with_pair_start(str)
+ {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n }\n
+ \ function remove_empty_tuples(tuples) {\n var ret = [];\n for (var
+ i3 = 0; i3 < tuples.length; i3++) {\n if (tuples[i3][1].length > 0) {\n
+ \ ret.push(tuples[i3]);\n }\n }\n return ret;\n }\n function
+ make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before)
+ || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n
+ \ [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT,
+ newMiddle],\n [DIFF_EQUAL, after]\n ]);\n }\n function find_cursor_edit_diff(oldText,
+ newText, cursor_pos) {\n var oldRange = typeof cursor_pos === \"number\"
+ ? { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n var newRange
+ = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n var
+ oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length
+ === 0 && (newRange === null || newRange.length === 0)) {\n var oldCursor
+ = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var
+ oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange
+ ? newRange.index : null;\n editBefore: {\n var newCursor = oldCursor
+ + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor
+ !== newCursor) {\n break editBefore;\n }\n if (newCursor
+ < 0 || newCursor > newLength) {\n break editBefore;\n }\n
+ \ var newBefore = newText.slice(0, newCursor);\n var newAfter
+ = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break
+ editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n
+ \ var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix
+ = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix)
+ {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n
+ \ var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix,
+ oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n if
+ (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break
+ editAfter;\n }\n var cursor = oldCursor;\n var newBefore
+ = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n
+ \ if (newBefore !== oldBefore) {\n break editAfter;\n }\n
+ \ var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n
+ \ var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n
+ \ var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n
+ \ if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n
+ \ var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n
+ \ var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n
+ \ return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n
+ \ }\n }\n if (oldRange.length > 0 && newRange && newRange.length
+ === 0) {\n replaceRange: {\n var oldPrefix = oldText.slice(0,
+ oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n
+ \ var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n
+ \ if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n
+ \ }\n var newPrefix = newText.slice(0, prefixLength);\n var
+ newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix
+ !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n
+ \ }\n var oldMiddle = oldText.slice(prefixLength, oldLength -
+ suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength
+ - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle,
+ oldSuffix);\n }\n }\n return null;\n }\n function diff(text1,
+ text2, cursor_pos, cleanup) {\n return diff_main(text1, text2, cursor_pos,
+ cleanup, true);\n }\n diff.INSERT = DIFF_INSERT;\n diff.DELETE = DIFF_DELETE;\n
+ \ diff.EQUAL = DIFF_EQUAL;\n diff_1 = diff;\n return diff_1;\n}\nvar lodash_clonedeep
+ = { exports: {} };\nlodash_clonedeep.exports;\nvar hasRequiredLodash_clonedeep;\nfunction
+ requireLodash_clonedeep() {\n if (hasRequiredLodash_clonedeep) return lodash_clonedeep.exports;\n
+ \ hasRequiredLodash_clonedeep = 1;\n (function(module2, exports2) {\n var
+ LARGE_ARRAY_SIZE2 = 200;\n var HASH_UNDEFINED2 = \"__lodash_hash_undefined__\";\n
+ \ var MAX_SAFE_INTEGER2 = 9007199254740991;\n var argsTag2 = \"[object
+ Arguments]\", arrayTag2 = \"[object Array]\", boolTag2 = \"[object Boolean]\",
+ dateTag2 = \"[object Date]\", errorTag2 = \"[object Error]\", funcTag2 = \"[object
+ Function]\", genTag2 = \"[object GeneratorFunction]\", mapTag2 = \"[object
+ Map]\", numberTag2 = \"[object Number]\", objectTag2 = \"[object Object]\",
+ promiseTag2 = \"[object Promise]\", regexpTag2 = \"[object RegExp]\", setTag2
+ = \"[object Set]\", stringTag2 = \"[object String]\", symbolTag2 = \"[object
+ Symbol]\", weakMapTag2 = \"[object WeakMap]\";\n var arrayBufferTag2 =
+ \"[object ArrayBuffer]\", dataViewTag2 = \"[object DataView]\", float32Tag2
+ = \"[object Float32Array]\", float64Tag2 = \"[object Float64Array]\", int8Tag2
+ = \"[object Int8Array]\", int16Tag2 = \"[object Int16Array]\", int32Tag2 =
+ \"[object Int32Array]\", uint8Tag2 = \"[object Uint8Array]\", uint8ClampedTag2
+ = \"[object Uint8ClampedArray]\", uint16Tag2 = \"[object Uint16Array]\", uint32Tag2
+ = \"[object Uint32Array]\";\n var reRegExpChar2 = /[\\\\^$.*+?()[\\]{}|]/g;\n
+ \ var reFlags2 = /\\w*$/;\n var reIsHostCtor2 = /^\\[object .+?Constructor\\]$/;\n
+ \ var reIsUint2 = /^(?:0|[1-9]\\d*)$/;\n var cloneableTags2 = {};\n cloneableTags2[argsTag2]
+ = cloneableTags2[arrayTag2] = cloneableTags2[arrayBufferTag2] = cloneableTags2[dataViewTag2]
+ = cloneableTags2[boolTag2] = cloneableTags2[dateTag2] = cloneableTags2[float32Tag2]
+ = cloneableTags2[float64Tag2] = cloneableTags2[int8Tag2] = cloneableTags2[int16Tag2]
+ = cloneableTags2[int32Tag2] = cloneableTags2[mapTag2] = cloneableTags2[numberTag2]
+ = cloneableTags2[objectTag2] = cloneableTags2[regexpTag2] = cloneableTags2[setTag2]
+ = cloneableTags2[stringTag2] = cloneableTags2[symbolTag2] = cloneableTags2[uint8Tag2]
+ = cloneableTags2[uint8ClampedTag2] = cloneableTags2[uint16Tag2] = cloneableTags2[uint32Tag2]
+ = true;\n cloneableTags2[errorTag2] = cloneableTags2[funcTag2] = cloneableTags2[weakMapTag2]
+ = false;\n var freeGlobal2 = typeof commonjsGlobal == \"object\" && commonjsGlobal
+ && commonjsGlobal.Object === Object && commonjsGlobal;\n var freeSelf2
+ = typeof self == \"object\" && self && self.Object === Object && self;\n var
+ root2 = freeGlobal2 || freeSelf2 || Function(\"return this\")();\n var
+ freeExports2 = exports2 && !exports2.nodeType && exports2;\n var freeModule2
+ = freeExports2 && true && module2 && !module2.nodeType && module2;\n var
+ moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;\n function
+ addMapEntry(map2, pair) {\n map2.set(pair[0], pair[1]);\n return
+ map2;\n }\n function addSetEntry(set2, value) {\n set2.add(value);\n
+ \ return set2;\n }\n function arrayEach2(array2, iteratee) {\n var
+ index2 = -1, length = array2 ? array2.length : 0;\n while (++index2 <
+ length) {\n if (iteratee(array2[index2], index2, array2) === false)
+ {\n break;\n }\n }\n return array2;\n }\n function
+ arrayPush2(array2, values) {\n var index2 = -1, length = values.length,
+ offset = array2.length;\n while (++index2 < length) {\n array2[offset
+ + index2] = values[index2];\n }\n return array2;\n }\n function
+ arrayReduce(array2, iteratee, accumulator, initAccum) {\n var index2
+ = -1, length = array2 ? array2.length : 0;\n while (++index2 < length)
+ {\n accumulator = iteratee(accumulator, array2[index2], index2, array2);\n
+ \ }\n return accumulator;\n }\n function baseTimes2(n3, iteratee)
+ {\n var index2 = -1, result = Array(n3);\n while (++index2 < n3)
+ {\n result[index2] = iteratee(index2);\n }\n return result;\n
+ \ }\n function getValue2(object2, key) {\n return object2 == null
+ ? void 0 : object2[key];\n }\n function isHostObject(value) {\n var
+ result = false;\n if (value != null && typeof value.toString != \"function\")
+ {\n try {\n result = !!(value + \"\");\n } catch (e2)
+ {\n }\n }\n return result;\n }\n function mapToArray2(map2)
+ {\n var index2 = -1, result = Array(map2.size);\n map2.forEach(function(value,
+ key) {\n result[++index2] = [key, value];\n });\n return
+ result;\n }\n function overArg2(func, transform) {\n return function(arg)
+ {\n return func(transform(arg));\n };\n }\n function setToArray2(set2)
+ {\n var index2 = -1, result = Array(set2.size);\n set2.forEach(function(value)
+ {\n result[++index2] = value;\n });\n return result;\n }\n
+ \ var arrayProto2 = Array.prototype, funcProto2 = Function.prototype, objectProto2
+ = Object.prototype;\n var coreJsData2 = root2[\"__core-js_shared__\"];\n
+ \ var maskSrcKey2 = function() {\n var uid = /[^.]+$/.exec(coreJsData2
+ && coreJsData2.keys && coreJsData2.keys.IE_PROTO || \"\");\n return uid
+ ? \"Symbol(src)_1.\" + uid : \"\";\n }();\n var funcToString2 = funcProto2.toString;\n
+ \ var hasOwnProperty2 = objectProto2.hasOwnProperty;\n var objectToString2
+ = objectProto2.toString;\n var reIsNative2 = RegExp(\n \"^\" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2,
+ \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,
+ \"$1.*?\") + \"$\"\n );\n var Buffer3 = moduleExports2 ? root2.Buffer
+ : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, getPrototype2
+ = overArg2(Object.getPrototypeOf, Object), objectCreate2 = Object.create,
+ propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice;\n
+ \ var nativeGetSymbols2 = Object.getOwnPropertySymbols, nativeIsBuffer2
+ = Buffer3 ? Buffer3.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys,
+ Object);\n var DataView2 = getNative2(root2, \"DataView\"), Map2 = getNative2(root2,
+ \"Map\"), Promise2 = getNative2(root2, \"Promise\"), Set2 = getNative2(root2,
+ \"Set\"), WeakMap2 = getNative2(root2, \"WeakMap\"), nativeCreate2 = getNative2(Object,
+ \"create\");\n var dataViewCtorString2 = toSource2(DataView2), mapCtorString2
+ = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2
+ = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2);\n var symbolProto2
+ = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf
+ : void 0;\n function Hash2(entries) {\n var index2 = -1, length =
+ entries ? entries.length : 0;\n this.clear();\n while (++index2
+ < length) {\n var entry = entries[index2];\n this.set(entry[0],
+ entry[1]);\n }\n }\n function hashClear2() {\n this.__data__
+ = nativeCreate2 ? nativeCreate2(null) : {};\n }\n function hashDelete2(key)
+ {\n return this.has(key) && delete this.__data__[key];\n }\n function
+ hashGet2(key) {\n var data = this.__data__;\n if (nativeCreate2)
+ {\n var result = data[key];\n return result === HASH_UNDEFINED2
+ ? void 0 : result;\n }\n return hasOwnProperty2.call(data, key)
+ ? data[key] : void 0;\n }\n function hashHas2(key) {\n var data
+ = this.__data__;\n return nativeCreate2 ? data[key] !== void 0 : hasOwnProperty2.call(data,
+ key);\n }\n function hashSet2(key, value) {\n var data = this.__data__;\n
+ \ data[key] = nativeCreate2 && value === void 0 ? HASH_UNDEFINED2 : value;\n
+ \ return this;\n }\n Hash2.prototype.clear = hashClear2;\n Hash2.prototype[\"delete\"]
+ = hashDelete2;\n Hash2.prototype.get = hashGet2;\n Hash2.prototype.has
+ = hashHas2;\n Hash2.prototype.set = hashSet2;\n function ListCache2(entries)
+ {\n var index2 = -1, length = entries ? entries.length : 0;\n this.clear();\n
+ \ while (++index2 < length) {\n var entry = entries[index2];\n
+ \ this.set(entry[0], entry[1]);\n }\n }\n function listCacheClear2()
+ {\n this.__data__ = [];\n }\n function listCacheDelete2(key) {\n
+ \ var data = this.__data__, index2 = assocIndexOf2(data, key);\n if
+ (index2 < 0) {\n return false;\n }\n var lastIndex = data.length
+ - 1;\n if (index2 == lastIndex) {\n data.pop();\n } else
+ {\n splice2.call(data, index2, 1);\n }\n return true;\n }\n
+ \ function listCacheGet2(key) {\n var data = this.__data__, index2
+ = assocIndexOf2(data, key);\n return index2 < 0 ? void 0 : data[index2][1];\n
+ \ }\n function listCacheHas2(key) {\n return assocIndexOf2(this.__data__,
+ key) > -1;\n }\n function listCacheSet2(key, value) {\n var data
+ = this.__data__, index2 = assocIndexOf2(data, key);\n if (index2 < 0)
+ {\n data.push([key, value]);\n } else {\n data[index2][1]
+ = value;\n }\n return this;\n }\n ListCache2.prototype.clear
+ = listCacheClear2;\n ListCache2.prototype[\"delete\"] = listCacheDelete2;\n
+ \ ListCache2.prototype.get = listCacheGet2;\n ListCache2.prototype.has
+ = listCacheHas2;\n ListCache2.prototype.set = listCacheSet2;\n function
+ MapCache2(entries) {\n var index2 = -1, length = entries ? entries.length
+ : 0;\n this.clear();\n while (++index2 < length) {\n var
+ entry = entries[index2];\n this.set(entry[0], entry[1]);\n }\n
+ \ }\n function mapCacheClear2() {\n this.__data__ = {\n \"hash\":
+ new Hash2(),\n \"map\": new (Map2 || ListCache2)(),\n \"string\":
+ new Hash2()\n };\n }\n function mapCacheDelete2(key) {\n return
+ getMapData2(this, key)[\"delete\"](key);\n }\n function mapCacheGet2(key)
+ {\n return getMapData2(this, key).get(key);\n }\n function mapCacheHas2(key)
+ {\n return getMapData2(this, key).has(key);\n }\n function mapCacheSet2(key,
+ value) {\n getMapData2(this, key).set(key, value);\n return this;\n
+ \ }\n MapCache2.prototype.clear = mapCacheClear2;\n MapCache2.prototype[\"delete\"]
+ = mapCacheDelete2;\n MapCache2.prototype.get = mapCacheGet2;\n MapCache2.prototype.has
+ = mapCacheHas2;\n MapCache2.prototype.set = mapCacheSet2;\n function
+ Stack2(entries) {\n this.__data__ = new ListCache2(entries);\n }\n
+ \ function stackClear2() {\n this.__data__ = new ListCache2();\n }\n
+ \ function stackDelete2(key) {\n return this.__data__[\"delete\"](key);\n
+ \ }\n function stackGet2(key) {\n return this.__data__.get(key);\n
+ \ }\n function stackHas2(key) {\n return this.__data__.has(key);\n
+ \ }\n function stackSet2(key, value) {\n var cache = this.__data__;\n
+ \ if (cache instanceof ListCache2) {\n var pairs = cache.__data__;\n
+ \ if (!Map2 || pairs.length < LARGE_ARRAY_SIZE2 - 1) {\n pairs.push([key,
+ value]);\n return this;\n }\n cache = this.__data__
+ = new MapCache2(pairs);\n }\n cache.set(key, value);\n return
+ this;\n }\n Stack2.prototype.clear = stackClear2;\n Stack2.prototype[\"delete\"]
+ = stackDelete2;\n Stack2.prototype.get = stackGet2;\n Stack2.prototype.has
+ = stackHas2;\n Stack2.prototype.set = stackSet2;\n function arrayLikeKeys2(value,
+ inherited) {\n var result = isArray2(value) || isArguments2(value) ?
+ baseTimes2(value.length, String) : [];\n var length = result.length,
+ skipIndexes = !!length;\n for (var key in value) {\n if (hasOwnProperty2.call(value,
+ key) && !(skipIndexes && (key == \"length\" || isIndex2(key, length)))) {\n
+ \ result.push(key);\n }\n }\n return result;\n }\n
+ \ function assignValue2(object2, key, value) {\n var objValue = object2[key];\n
+ \ if (!(hasOwnProperty2.call(object2, key) && eq2(objValue, value)) ||
+ value === void 0 && !(key in object2)) {\n object2[key] = value;\n
+ \ }\n }\n function assocIndexOf2(array2, key) {\n var length
+ = array2.length;\n while (length--) {\n if (eq2(array2[length][0],
+ key)) {\n return length;\n }\n }\n return -1;\n
+ \ }\n function baseAssign(object2, source) {\n return object2 &&
+ copyObject2(source, keys2(source), object2);\n }\n function baseClone2(value,
+ isDeep, isFull, customizer, key, object2, stack) {\n var result;\n if
+ (customizer) {\n result = object2 ? customizer(value, key, object2,
+ stack) : customizer(value);\n }\n if (result !== void 0) {\n return
+ result;\n }\n if (!isObject2(value)) {\n return value;\n
+ \ }\n var isArr = isArray2(value);\n if (isArr) {\n result
+ = initCloneArray2(value);\n if (!isDeep) {\n return copyArray2(value,
+ result);\n }\n } else {\n var tag = getTag2(value), isFunc
+ = tag == funcTag2 || tag == genTag2;\n if (isBuffer2(value)) {\n return
+ cloneBuffer2(value, isDeep);\n }\n if (tag == objectTag2 ||
+ tag == argsTag2 || isFunc && !object2) {\n if (isHostObject(value))
+ {\n return object2 ? value : {};\n }\n result
+ = initCloneObject2(isFunc ? {} : value);\n if (!isDeep) {\n return
+ copySymbols(value, baseAssign(result, value));\n }\n } else
+ {\n if (!cloneableTags2[tag]) {\n return object2 ? value
+ : {};\n }\n result = initCloneByTag2(value, tag, baseClone2,
+ isDeep);\n }\n }\n stack || (stack = new Stack2());\n var
+ stacked = stack.get(value);\n if (stacked) {\n return stacked;\n
+ \ }\n stack.set(value, result);\n if (!isArr) {\n var
+ props = isFull ? getAllKeys2(value) : keys2(value);\n }\n arrayEach2(props
+ || value, function(subValue, key2) {\n if (props) {\n key2
+ = subValue;\n subValue = value[key2];\n }\n assignValue2(result,
+ key2, baseClone2(subValue, isDeep, isFull, customizer, key2, value, stack));\n
+ \ });\n return result;\n }\n function baseCreate2(proto) {\n
+ \ return isObject2(proto) ? objectCreate2(proto) : {};\n }\n function
+ baseGetAllKeys2(object2, keysFunc, symbolsFunc) {\n var result = keysFunc(object2);\n
+ \ return isArray2(object2) ? result : arrayPush2(result, symbolsFunc(object2));\n
+ \ }\n function baseGetTag2(value) {\n return objectToString2.call(value);\n
+ \ }\n function baseIsNative2(value) {\n if (!isObject2(value) ||
+ isMasked2(value)) {\n return false;\n }\n var pattern = isFunction2(value)
+ || isHostObject(value) ? reIsNative2 : reIsHostCtor2;\n return pattern.test(toSource2(value));\n
+ \ }\n function baseKeys2(object2) {\n if (!isPrototype2(object2))
+ {\n return nativeKeys2(object2);\n }\n var result = [];\n
+ \ for (var key in Object(object2)) {\n if (hasOwnProperty2.call(object2,
+ key) && key != \"constructor\") {\n result.push(key);\n }\n
+ \ }\n return result;\n }\n function cloneBuffer2(buffer, isDeep)
+ {\n if (isDeep) {\n return buffer.slice();\n }\n var
+ result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n
+ \ return result;\n }\n function cloneArrayBuffer2(arrayBuffer) {\n
+ \ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n
+ \ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));\n return
+ result;\n }\n function cloneDataView2(dataView, isDeep) {\n var
+ buffer = isDeep ? cloneArrayBuffer2(dataView.buffer) : dataView.buffer;\n
+ \ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n
+ \ }\n function cloneMap(map2, isDeep, cloneFunc) {\n var array2
+ = isDeep ? cloneFunc(mapToArray2(map2), true) : mapToArray2(map2);\n return
+ arrayReduce(array2, addMapEntry, new map2.constructor());\n }\n function
+ cloneRegExp2(regexp) {\n var result = new regexp.constructor(regexp.source,
+ reFlags2.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return
+ result;\n }\n function cloneSet(set2, isDeep, cloneFunc) {\n var
+ array2 = isDeep ? cloneFunc(setToArray2(set2), true) : setToArray2(set2);\n
+ \ return arrayReduce(array2, addSetEntry, new set2.constructor());\n }\n
+ \ function cloneSymbol2(symbol) {\n return symbolValueOf2 ? Object(symbolValueOf2.call(symbol))
+ : {};\n }\n function cloneTypedArray2(typedArray, isDeep) {\n var
+ buffer = isDeep ? cloneArrayBuffer2(typedArray.buffer) : typedArray.buffer;\n
+ \ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n
+ \ }\n function copyArray2(source, array2) {\n var index2 = -1, length
+ = source.length;\n array2 || (array2 = Array(length));\n while (++index2
+ < length) {\n array2[index2] = source[index2];\n }\n return
+ array2;\n }\n function copyObject2(source, props, object2, customizer)
+ {\n object2 || (object2 = {});\n var index2 = -1, length = props.length;\n
+ \ while (++index2 < length) {\n var key = props[index2];\n var
+ newValue = void 0;\n assignValue2(object2, key, newValue === void 0
+ ? source[key] : newValue);\n }\n return object2;\n }\n function
+ copySymbols(source, object2) {\n return copyObject2(source, getSymbols2(source),
+ object2);\n }\n function getAllKeys2(object2) {\n return baseGetAllKeys2(object2,
+ keys2, getSymbols2);\n }\n function getMapData2(map2, key) {\n var
+ data = map2.__data__;\n return isKeyable2(key) ? data[typeof key == \"string\"
+ ? \"string\" : \"hash\"] : data.map;\n }\n function getNative2(object2,
+ key) {\n var value = getValue2(object2, key);\n return baseIsNative2(value)
+ ? value : void 0;\n }\n var getSymbols2 = nativeGetSymbols2 ? overArg2(nativeGetSymbols2,
+ Object) : stubArray2;\n var getTag2 = baseGetTag2;\n if (DataView2 &&
+ getTag2(new DataView2(new ArrayBuffer(1))) != dataViewTag2 || Map2 && getTag2(new
+ Map2()) != mapTag2 || Promise2 && getTag2(Promise2.resolve()) != promiseTag2
+ || Set2 && getTag2(new Set2()) != setTag2 || WeakMap2 && getTag2(new WeakMap2())
+ != weakMapTag2) {\n getTag2 = function(value) {\n var result =
+ objectToString2.call(value), Ctor = result == objectTag2 ? value.constructor
+ : void 0, ctorString = Ctor ? toSource2(Ctor) : void 0;\n if (ctorString)
+ {\n switch (ctorString) {\n case dataViewCtorString2:\n
+ \ return dataViewTag2;\n case mapCtorString2:\n return
+ mapTag2;\n case promiseCtorString2:\n return promiseTag2;\n
+ \ case setCtorString2:\n return setTag2;\n case
+ weakMapCtorString2:\n return weakMapTag2;\n }\n }\n
+ \ return result;\n };\n }\n function initCloneArray2(array2)
+ {\n var length = array2.length, result = array2.constructor(length);\n
+ \ if (length && typeof array2[0] == \"string\" && hasOwnProperty2.call(array2,
+ \"index\")) {\n result.index = array2.index;\n result.input
+ = array2.input;\n }\n return result;\n }\n function initCloneObject2(object2)
+ {\n return typeof object2.constructor == \"function\" && !isPrototype2(object2)
+ ? baseCreate2(getPrototype2(object2)) : {};\n }\n function initCloneByTag2(object2,
+ tag, cloneFunc, isDeep) {\n var Ctor = object2.constructor;\n switch
+ (tag) {\n case arrayBufferTag2:\n return cloneArrayBuffer2(object2);\n
+ \ case boolTag2:\n case dateTag2:\n return new Ctor(+object2);\n
+ \ case dataViewTag2:\n return cloneDataView2(object2, isDeep);\n
+ \ case float32Tag2:\n case float64Tag2:\n case int8Tag2:\n
+ \ case int16Tag2:\n case int32Tag2:\n case uint8Tag2:\n
+ \ case uint8ClampedTag2:\n case uint16Tag2:\n case uint32Tag2:\n
+ \ return cloneTypedArray2(object2, isDeep);\n case mapTag2:\n
+ \ return cloneMap(object2, isDeep, cloneFunc);\n case numberTag2:\n
+ \ case stringTag2:\n return new Ctor(object2);\n case
+ regexpTag2:\n return cloneRegExp2(object2);\n case setTag2:\n
+ \ return cloneSet(object2, isDeep, cloneFunc);\n case symbolTag2:\n
+ \ return cloneSymbol2(object2);\n }\n }\n function isIndex2(value,
+ length) {\n length = length == null ? MAX_SAFE_INTEGER2 : length;\n return
+ !!length && (typeof value == \"number\" || reIsUint2.test(value)) && (value
+ > -1 && value % 1 == 0 && value < length);\n }\n function isKeyable2(value)
+ {\n var type = typeof value;\n return type == \"string\" || type
+ == \"number\" || type == \"symbol\" || type == \"boolean\" ? value !== \"__proto__\"
+ : value === null;\n }\n function isMasked2(func) {\n return !!maskSrcKey2
+ && maskSrcKey2 in func;\n }\n function isPrototype2(value) {\n var
+ Ctor = value && value.constructor, proto = typeof Ctor == \"function\" &&
+ Ctor.prototype || objectProto2;\n return value === proto;\n }\n function
+ toSource2(func) {\n if (func != null) {\n try {\n return
+ funcToString2.call(func);\n } catch (e2) {\n }\n try
+ {\n return func + \"\";\n } catch (e2) {\n }\n }\n
+ \ return \"\";\n }\n function cloneDeep2(value) {\n return
+ baseClone2(value, true, true);\n }\n function eq2(value, other) {\n
+ \ return value === other || value !== value && other !== other;\n }\n
+ \ function isArguments2(value) {\n return isArrayLikeObject2(value)
+ && hasOwnProperty2.call(value, \"callee\") && (!propertyIsEnumerable2.call(value,
+ \"callee\") || objectToString2.call(value) == argsTag2);\n }\n var isArray2
+ = Array.isArray;\n function isArrayLike2(value) {\n return value !=
+ null && isLength2(value.length) && !isFunction2(value);\n }\n function
+ isArrayLikeObject2(value) {\n return isObjectLike2(value) && isArrayLike2(value);\n
+ \ }\n var isBuffer2 = nativeIsBuffer2 || stubFalse2;\n function isFunction2(value)
+ {\n var tag = isObject2(value) ? objectToString2.call(value) : \"\";\n
+ \ return tag == funcTag2 || tag == genTag2;\n }\n function isLength2(value)
+ {\n return typeof value == \"number\" && value > -1 && value % 1 == 0
+ && value <= MAX_SAFE_INTEGER2;\n }\n function isObject2(value) {\n var
+ type = typeof value;\n return !!value && (type == \"object\" || type
+ == \"function\");\n }\n function isObjectLike2(value) {\n return
+ !!value && typeof value == \"object\";\n }\n function keys2(object2)
+ {\n return isArrayLike2(object2) ? arrayLikeKeys2(object2) : baseKeys2(object2);\n
+ \ }\n function stubArray2() {\n return [];\n }\n function
+ stubFalse2() {\n return false;\n }\n module2.exports = cloneDeep2;\n
+ \ })(lodash_clonedeep, lodash_clonedeep.exports);\n return lodash_clonedeep.exports;\n}\nvar
+ lodash_isequal = { exports: {} };\nlodash_isequal.exports;\nvar hasRequiredLodash_isequal;\nfunction
+ requireLodash_isequal() {\n if (hasRequiredLodash_isequal) return lodash_isequal.exports;\n
+ \ hasRequiredLodash_isequal = 1;\n (function(module2, exports2) {\n var
+ LARGE_ARRAY_SIZE2 = 200;\n var HASH_UNDEFINED2 = \"__lodash_hash_undefined__\";\n
+ \ var COMPARE_PARTIAL_FLAG2 = 1, COMPARE_UNORDERED_FLAG2 = 2;\n var MAX_SAFE_INTEGER2
+ = 9007199254740991;\n var argsTag2 = \"[object Arguments]\", arrayTag2
+ = \"[object Array]\", asyncTag2 = \"[object AsyncFunction]\", boolTag2 = \"[object
+ Boolean]\", dateTag2 = \"[object Date]\", errorTag2 = \"[object Error]\",
+ funcTag2 = \"[object Function]\", genTag2 = \"[object GeneratorFunction]\",
+ mapTag2 = \"[object Map]\", numberTag2 = \"[object Number]\", nullTag2 = \"[object
+ Null]\", objectTag2 = \"[object Object]\", promiseTag2 = \"[object Promise]\",
+ proxyTag2 = \"[object Proxy]\", regexpTag2 = \"[object RegExp]\", setTag2
+ = \"[object Set]\", stringTag2 = \"[object String]\", symbolTag2 = \"[object
+ Symbol]\", undefinedTag2 = \"[object Undefined]\", weakMapTag2 = \"[object
+ WeakMap]\";\n var arrayBufferTag2 = \"[object ArrayBuffer]\", dataViewTag2
+ = \"[object DataView]\", float32Tag2 = \"[object Float32Array]\", float64Tag2
+ = \"[object Float64Array]\", int8Tag2 = \"[object Int8Array]\", int16Tag2
+ = \"[object Int16Array]\", int32Tag2 = \"[object Int32Array]\", uint8Tag2
+ = \"[object Uint8Array]\", uint8ClampedTag2 = \"[object Uint8ClampedArray]\",
+ uint16Tag2 = \"[object Uint16Array]\", uint32Tag2 = \"[object Uint32Array]\";\n
+ \ var reRegExpChar2 = /[\\\\^$.*+?()[\\]{}|]/g;\n var reIsHostCtor2 =
+ /^\\[object .+?Constructor\\]$/;\n var reIsUint2 = /^(?:0|[1-9]\\d*)$/;\n
+ \ var typedArrayTags2 = {};\n typedArrayTags2[float32Tag2] = typedArrayTags2[float64Tag2]
+ = typedArrayTags2[int8Tag2] = typedArrayTags2[int16Tag2] = typedArrayTags2[int32Tag2]
+ = typedArrayTags2[uint8Tag2] = typedArrayTags2[uint8ClampedTag2] = typedArrayTags2[uint16Tag2]
+ = typedArrayTags2[uint32Tag2] = true;\n typedArrayTags2[argsTag2] = typedArrayTags2[arrayTag2]
+ = typedArrayTags2[arrayBufferTag2] = typedArrayTags2[boolTag2] = typedArrayTags2[dataViewTag2]
+ = typedArrayTags2[dateTag2] = typedArrayTags2[errorTag2] = typedArrayTags2[funcTag2]
+ = typedArrayTags2[mapTag2] = typedArrayTags2[numberTag2] = typedArrayTags2[objectTag2]
+ = typedArrayTags2[regexpTag2] = typedArrayTags2[setTag2] = typedArrayTags2[stringTag2]
+ = typedArrayTags2[weakMapTag2] = false;\n var freeGlobal2 = typeof commonjsGlobal
+ == \"object\" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n
+ \ var freeSelf2 = typeof self == \"object\" && self && self.Object === Object
+ && self;\n var root2 = freeGlobal2 || freeSelf2 || Function(\"return this\")();\n
+ \ var freeExports2 = exports2 && !exports2.nodeType && exports2;\n var
+ freeModule2 = freeExports2 && true && module2 && !module2.nodeType && module2;\n
+ \ var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;\n
+ \ var freeProcess2 = moduleExports2 && freeGlobal2.process;\n var nodeUtil2
+ = function() {\n try {\n return freeProcess2 && freeProcess2.binding
+ && freeProcess2.binding(\"util\");\n } catch (e2) {\n }\n }();\n
+ \ var nodeIsTypedArray2 = nodeUtil2 && nodeUtil2.isTypedArray;\n function
+ arrayFilter2(array2, predicate) {\n var index2 = -1, length = array2
+ == null ? 0 : array2.length, resIndex = 0, result = [];\n while (++index2
+ < length) {\n var value = array2[index2];\n if (predicate(value,
+ index2, array2)) {\n result[resIndex++] = value;\n }\n }\n
+ \ return result;\n }\n function arrayPush2(array2, values) {\n var
+ index2 = -1, length = values.length, offset = array2.length;\n while
+ (++index2 < length) {\n array2[offset + index2] = values[index2];\n
+ \ }\n return array2;\n }\n function arraySome2(array2, predicate)
+ {\n var index2 = -1, length = array2 == null ? 0 : array2.length;\n while
+ (++index2 < length) {\n if (predicate(array2[index2], index2, array2))
+ {\n return true;\n }\n }\n return false;\n }\n
+ \ function baseTimes2(n3, iteratee) {\n var index2 = -1, result = Array(n3);\n
+ \ while (++index2 < n3) {\n result[index2] = iteratee(index2);\n
+ \ }\n return result;\n }\n function baseUnary2(func) {\n return
+ function(value) {\n return func(value);\n };\n }\n function
+ cacheHas2(cache, key) {\n return cache.has(key);\n }\n function
+ getValue2(object2, key) {\n return object2 == null ? void 0 : object2[key];\n
+ \ }\n function mapToArray2(map2) {\n var index2 = -1, result = Array(map2.size);\n
+ \ map2.forEach(function(value, key) {\n result[++index2] = [key,
+ value];\n });\n return result;\n }\n function overArg2(func,
+ transform) {\n return function(arg) {\n return func(transform(arg));\n
+ \ };\n }\n function setToArray2(set2) {\n var index2 = -1,
+ result = Array(set2.size);\n set2.forEach(function(value) {\n result[++index2]
+ = value;\n });\n return result;\n }\n var arrayProto2 = Array.prototype,
+ funcProto2 = Function.prototype, objectProto2 = Object.prototype;\n var
+ coreJsData2 = root2[\"__core-js_shared__\"];\n var funcToString2 = funcProto2.toString;\n
+ \ var hasOwnProperty2 = objectProto2.hasOwnProperty;\n var maskSrcKey2
+ = function() {\n var uid = /[^.]+$/.exec(coreJsData2 && coreJsData2.keys
+ && coreJsData2.keys.IE_PROTO || \"\");\n return uid ? \"Symbol(src)_1.\"
+ + uid : \"\";\n }();\n var nativeObjectToString2 = objectProto2.toString;\n
+ \ var reIsNative2 = RegExp(\n \"^\" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2,
+ \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,
+ \"$1.*?\") + \"$\"\n );\n var Buffer3 = moduleExports2 ? root2.Buffer
+ : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, propertyIsEnumerable2
+ = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice, symToStringTag2
+ = Symbol2 ? Symbol2.toStringTag : void 0;\n var nativeGetSymbols2 = Object.getOwnPropertySymbols,
+ nativeIsBuffer2 = Buffer3 ? Buffer3.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys,
+ Object);\n var DataView2 = getNative2(root2, \"DataView\"), Map2 = getNative2(root2,
+ \"Map\"), Promise2 = getNative2(root2, \"Promise\"), Set2 = getNative2(root2,
+ \"Set\"), WeakMap2 = getNative2(root2, \"WeakMap\"), nativeCreate2 = getNative2(Object,
+ \"create\");\n var dataViewCtorString2 = toSource2(DataView2), mapCtorString2
+ = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2
+ = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2);\n var symbolProto2
+ = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf
+ : void 0;\n function Hash2(entries) {\n var index2 = -1, length =
+ entries == null ? 0 : entries.length;\n this.clear();\n while (++index2
+ < length) {\n var entry = entries[index2];\n this.set(entry[0],
+ entry[1]);\n }\n }\n function hashClear2() {\n this.__data__
+ = nativeCreate2 ? nativeCreate2(null) : {};\n this.size = 0;\n }\n
+ \ function hashDelete2(key) {\n var result = this.has(key) && delete
+ this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n
+ \ }\n function hashGet2(key) {\n var data = this.__data__;\n if
+ (nativeCreate2) {\n var result = data[key];\n return result
+ === HASH_UNDEFINED2 ? void 0 : result;\n }\n return hasOwnProperty2.call(data,
+ key) ? data[key] : void 0;\n }\n function hashHas2(key) {\n var
+ data = this.__data__;\n return nativeCreate2 ? data[key] !== void 0 :
+ hasOwnProperty2.call(data, key);\n }\n function hashSet2(key, value)
+ {\n var data = this.__data__;\n this.size += this.has(key) ? 0 :
+ 1;\n data[key] = nativeCreate2 && value === void 0 ? HASH_UNDEFINED2
+ : value;\n return this;\n }\n Hash2.prototype.clear = hashClear2;\n
+ \ Hash2.prototype[\"delete\"] = hashDelete2;\n Hash2.prototype.get =
+ hashGet2;\n Hash2.prototype.has = hashHas2;\n Hash2.prototype.set =
+ hashSet2;\n function ListCache2(entries) {\n var index2 = -1, length
+ = entries == null ? 0 : entries.length;\n this.clear();\n while
+ (++index2 < length) {\n var entry = entries[index2];\n this.set(entry[0],
+ entry[1]);\n }\n }\n function listCacheClear2() {\n this.__data__
+ = [];\n this.size = 0;\n }\n function listCacheDelete2(key) {\n
+ \ var data = this.__data__, index2 = assocIndexOf2(data, key);\n if
+ (index2 < 0) {\n return false;\n }\n var lastIndex = data.length
+ - 1;\n if (index2 == lastIndex) {\n data.pop();\n } else
+ {\n splice2.call(data, index2, 1);\n }\n --this.size;\n return
+ true;\n }\n function listCacheGet2(key) {\n var data = this.__data__,
+ index2 = assocIndexOf2(data, key);\n return index2 < 0 ? void 0 : data[index2][1];\n
+ \ }\n function listCacheHas2(key) {\n return assocIndexOf2(this.__data__,
+ key) > -1;\n }\n function listCacheSet2(key, value) {\n var data
+ = this.__data__, index2 = assocIndexOf2(data, key);\n if (index2 < 0)
+ {\n ++this.size;\n data.push([key, value]);\n } else {\n
+ \ data[index2][1] = value;\n }\n return this;\n }\n ListCache2.prototype.clear
+ = listCacheClear2;\n ListCache2.prototype[\"delete\"] = listCacheDelete2;\n
+ \ ListCache2.prototype.get = listCacheGet2;\n ListCache2.prototype.has
+ = listCacheHas2;\n ListCache2.prototype.set = listCacheSet2;\n function
+ MapCache2(entries) {\n var index2 = -1, length = entries == null ? 0
+ : entries.length;\n this.clear();\n while (++index2 < length) {\n
+ \ var entry = entries[index2];\n this.set(entry[0], entry[1]);\n
+ \ }\n }\n function mapCacheClear2() {\n this.size = 0;\n this.__data__
+ = {\n \"hash\": new Hash2(),\n \"map\": new (Map2 || ListCache2)(),\n
+ \ \"string\": new Hash2()\n };\n }\n function mapCacheDelete2(key)
+ {\n var result = getMapData2(this, key)[\"delete\"](key);\n this.size
+ -= result ? 1 : 0;\n return result;\n }\n function mapCacheGet2(key)
+ {\n return getMapData2(this, key).get(key);\n }\n function mapCacheHas2(key)
+ {\n return getMapData2(this, key).has(key);\n }\n function mapCacheSet2(key,
+ value) {\n var data = getMapData2(this, key), size = data.size;\n data.set(key,
+ value);\n this.size += data.size == size ? 0 : 1;\n return this;\n
+ \ }\n MapCache2.prototype.clear = mapCacheClear2;\n MapCache2.prototype[\"delete\"]
+ = mapCacheDelete2;\n MapCache2.prototype.get = mapCacheGet2;\n MapCache2.prototype.has
+ = mapCacheHas2;\n MapCache2.prototype.set = mapCacheSet2;\n function
+ SetCache2(values) {\n var index2 = -1, length = values == null ? 0 :
+ values.length;\n this.__data__ = new MapCache2();\n while (++index2
+ < length) {\n this.add(values[index2]);\n }\n }\n function
+ setCacheAdd2(value) {\n this.__data__.set(value, HASH_UNDEFINED2);\n
+ \ return this;\n }\n function setCacheHas2(value) {\n return
+ this.__data__.has(value);\n }\n SetCache2.prototype.add = SetCache2.prototype.push
+ = setCacheAdd2;\n SetCache2.prototype.has = setCacheHas2;\n function
+ Stack2(entries) {\n var data = this.__data__ = new ListCache2(entries);\n
+ \ this.size = data.size;\n }\n function stackClear2() {\n this.__data__
+ = new ListCache2();\n this.size = 0;\n }\n function stackDelete2(key)
+ {\n var data = this.__data__, result = data[\"delete\"](key);\n this.size
+ = data.size;\n return result;\n }\n function stackGet2(key) {\n
+ \ return this.__data__.get(key);\n }\n function stackHas2(key) {\n
+ \ return this.__data__.has(key);\n }\n function stackSet2(key, value)
+ {\n var data = this.__data__;\n if (data instanceof ListCache2)
+ {\n var pairs = data.__data__;\n if (!Map2 || pairs.length <
+ LARGE_ARRAY_SIZE2 - 1) {\n pairs.push([key, value]);\n this.size
+ = ++data.size;\n return this;\n }\n data = this.__data__
+ = new MapCache2(pairs);\n }\n data.set(key, value);\n this.size
+ = data.size;\n return this;\n }\n Stack2.prototype.clear = stackClear2;\n
+ \ Stack2.prototype[\"delete\"] = stackDelete2;\n Stack2.prototype.get
+ = stackGet2;\n Stack2.prototype.has = stackHas2;\n Stack2.prototype.set
+ = stackSet2;\n function arrayLikeKeys2(value, inherited) {\n var isArr
+ = isArray2(value), isArg = !isArr && isArguments2(value), isBuff = !isArr
+ && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray2(value),
+ skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes2(value.length,
+ String) : [], length = result.length;\n for (var key in value) {\n if
+ (hasOwnProperty2.call(value, key) && !(skipIndexes && // Safari 9 has enumerable
+ `arguments.length` in strict mode.\n (key == \"length\" || // Node.js
+ 0.10 has enumerable non-index properties on buffers.\n isBuff && (key
+ == \"offset\" || key == \"parent\") || // PhantomJS 2 has enumerable non-index
+ properties on typed arrays.\n isType && (key == \"buffer\" || key ==
+ \"byteLength\" || key == \"byteOffset\") || // Skip index properties.\n isIndex2(key,
+ length)))) {\n result.push(key);\n }\n }\n return
+ result;\n }\n function assocIndexOf2(array2, key) {\n var length
+ = array2.length;\n while (length--) {\n if (eq2(array2[length][0],
+ key)) {\n return length;\n }\n }\n return -1;\n
+ \ }\n function baseGetAllKeys2(object2, keysFunc, symbolsFunc) {\n var
+ result = keysFunc(object2);\n return isArray2(object2) ? result : arrayPush2(result,
+ symbolsFunc(object2));\n }\n function baseGetTag2(value) {\n if
+ (value == null) {\n return value === void 0 ? undefinedTag2 : nullTag2;\n
+ \ }\n return symToStringTag2 && symToStringTag2 in Object(value)
+ ? getRawTag2(value) : objectToString2(value);\n }\n function baseIsArguments2(value)
+ {\n return isObjectLike2(value) && baseGetTag2(value) == argsTag2;\n
+ \ }\n function baseIsEqual2(value, other, bitmask, customizer, stack)
+ {\n if (value === other) {\n return true;\n }\n if (value
+ == null || other == null || !isObjectLike2(value) && !isObjectLike2(other))
+ {\n return value !== value && other !== other;\n }\n return
+ baseIsEqualDeep2(value, other, bitmask, customizer, baseIsEqual2, stack);\n
+ \ }\n function baseIsEqualDeep2(object2, other, bitmask, customizer,
+ equalFunc, stack) {\n var objIsArr = isArray2(object2), othIsArr = isArray2(other),
+ objTag = objIsArr ? arrayTag2 : getTag2(object2), othTag = othIsArr ? arrayTag2
+ : getTag2(other);\n objTag = objTag == argsTag2 ? objectTag2 : objTag;\n
+ \ othTag = othTag == argsTag2 ? objectTag2 : othTag;\n var objIsObj
+ = objTag == objectTag2, othIsObj = othTag == objectTag2, isSameTag = objTag
+ == othTag;\n if (isSameTag && isBuffer2(object2)) {\n if (!isBuffer2(other))
+ {\n return false;\n }\n objIsArr = true;\n objIsObj
+ = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack
+ = new Stack2());\n return objIsArr || isTypedArray2(object2) ? equalArrays2(object2,
+ other, bitmask, customizer, equalFunc, stack) : equalByTag2(object2, other,
+ objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask
+ & COMPARE_PARTIAL_FLAG2)) {\n var objIsWrapped = objIsObj && hasOwnProperty2.call(object2,
+ \"__wrapped__\"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, \"__wrapped__\");\n
+ \ if (objIsWrapped || othIsWrapped) {\n var objUnwrapped =
+ objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value()
+ : other;\n stack || (stack = new Stack2());\n return equalFunc(objUnwrapped,
+ othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag)
+ {\n return false;\n }\n stack || (stack = new Stack2());\n
+ \ return equalObjects2(object2, other, bitmask, customizer, equalFunc,
+ stack);\n }\n function baseIsNative2(value) {\n if (!isObject2(value)
+ || isMasked2(value)) {\n return false;\n }\n var pattern
+ = isFunction2(value) ? reIsNative2 : reIsHostCtor2;\n return pattern.test(toSource2(value));\n
+ \ }\n function baseIsTypedArray2(value) {\n return isObjectLike2(value)
+ && isLength2(value.length) && !!typedArrayTags2[baseGetTag2(value)];\n }\n
+ \ function baseKeys2(object2) {\n if (!isPrototype2(object2)) {\n return
+ nativeKeys2(object2);\n }\n var result = [];\n for (var key
+ in Object(object2)) {\n if (hasOwnProperty2.call(object2, key) && key
+ != \"constructor\") {\n result.push(key);\n }\n }\n return
+ result;\n }\n function equalArrays2(array2, other, bitmask, customizer,
+ equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG2,
+ arrLength = array2.length, othLength = other.length;\n if (arrLength
+ != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n
+ \ }\n var stacked = stack.get(array2);\n if (stacked && stack.get(other))
+ {\n return stacked == other;\n }\n var index2 = -1, result
+ = true, seen = bitmask & COMPARE_UNORDERED_FLAG2 ? new SetCache2() : void
+ 0;\n stack.set(array2, other);\n stack.set(other, array2);\n while
+ (++index2 < arrLength) {\n var arrValue = array2[index2], othValue
+ = other[index2];\n if (customizer) {\n var compared = isPartial
+ ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue,
+ othValue, index2, array2, other, stack);\n }\n if (compared
+ !== void 0) {\n if (compared) {\n continue;\n }\n
+ \ result = false;\n break;\n }\n if (seen)
+ {\n if (!arraySome2(other, function(othValue2, othIndex) {\n if
+ (!cacheHas2(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue,
+ othValue2, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n
+ \ }\n })) {\n result = false;\n break;\n
+ \ }\n } else if (!(arrValue === othValue || equalFunc(arrValue,
+ othValue, bitmask, customizer, stack))) {\n result = false;\n break;\n
+ \ }\n }\n stack[\"delete\"](array2);\n stack[\"delete\"](other);\n
+ \ return result;\n }\n function equalByTag2(object2, other, tag,
+ bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case
+ dataViewTag2:\n if (object2.byteLength != other.byteLength || object2.byteOffset
+ != other.byteOffset) {\n return false;\n }\n object2
+ = object2.buffer;\n other = other.buffer;\n case arrayBufferTag2:\n
+ \ if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2),
+ new Uint8Array2(other))) {\n return false;\n }\n return
+ true;\n case boolTag2:\n case dateTag2:\n case numberTag2:\n
+ \ return eq2(+object2, +other);\n case errorTag2:\n return
+ object2.name == other.name && object2.message == other.message;\n case
+ regexpTag2:\n case stringTag2:\n return object2 == other +
+ \"\";\n case mapTag2:\n var convert = mapToArray2;\n case
+ setTag2:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;\n convert
+ || (convert = setToArray2);\n if (object2.size != other.size && !isPartial)
+ {\n return false;\n }\n var stacked = stack.get(object2);\n
+ \ if (stacked) {\n return stacked == other;\n }\n
+ \ bitmask |= COMPARE_UNORDERED_FLAG2;\n stack.set(object2,
+ other);\n var result = equalArrays2(convert(object2), convert(other),
+ bitmask, customizer, equalFunc, stack);\n stack[\"delete\"](object2);\n
+ \ return result;\n case symbolTag2:\n if (symbolValueOf2)
+ {\n return symbolValueOf2.call(object2) == symbolValueOf2.call(other);\n
+ \ }\n }\n return false;\n }\n function equalObjects2(object2,
+ other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask
+ & COMPARE_PARTIAL_FLAG2, objProps = getAllKeys2(object2), objLength = objProps.length,
+ othProps = getAllKeys2(other), othLength = othProps.length;\n if (objLength
+ != othLength && !isPartial) {\n return false;\n }\n var index2
+ = objLength;\n while (index2--) {\n var key = objProps[index2];\n
+ \ if (!(isPartial ? key in other : hasOwnProperty2.call(other, key)))
+ {\n return false;\n }\n }\n var stacked = stack.get(object2);\n
+ \ if (stacked && stack.get(other)) {\n return stacked == other;\n
+ \ }\n var result = true;\n stack.set(object2, other);\n stack.set(other,
+ object2);\n var skipCtor = isPartial;\n while (++index2 < objLength)
+ {\n key = objProps[index2];\n var objValue = object2[key], othValue
+ = other[key];\n if (customizer) {\n var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue,
+ othValue, key, object2, other, stack);\n }\n if (!(compared
+ === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask,
+ customizer, stack) : compared)) {\n result = false;\n break;\n
+ \ }\n skipCtor || (skipCtor = key == \"constructor\");\n }\n
+ \ if (result && !skipCtor) {\n var objCtor = object2.constructor,
+ othCtor = other.constructor;\n if (objCtor != othCtor && (\"constructor\"
+ in object2 && \"constructor\" in other) && !(typeof objCtor == \"function\"
+ && objCtor instanceof objCtor && typeof othCtor == \"function\" && othCtor
+ instanceof othCtor)) {\n result = false;\n }\n }\n stack[\"delete\"](object2);\n
+ \ stack[\"delete\"](other);\n return result;\n }\n function
+ getAllKeys2(object2) {\n return baseGetAllKeys2(object2, keys2, getSymbols2);\n
+ \ }\n function getMapData2(map2, key) {\n var data = map2.__data__;\n
+ \ return isKeyable2(key) ? data[typeof key == \"string\" ? \"string\"
+ : \"hash\"] : data.map;\n }\n function getNative2(object2, key) {\n
+ \ var value = getValue2(object2, key);\n return baseIsNative2(value)
+ ? value : void 0;\n }\n function getRawTag2(value) {\n var isOwn
+ = hasOwnProperty2.call(value, symToStringTag2), tag = value[symToStringTag2];\n
+ \ try {\n value[symToStringTag2] = void 0;\n var unmasked
+ = true;\n } catch (e2) {\n }\n var result = nativeObjectToString2.call(value);\n
+ \ if (unmasked) {\n if (isOwn) {\n value[symToStringTag2]
+ = tag;\n } else {\n delete value[symToStringTag2];\n }\n
+ \ }\n return result;\n }\n var getSymbols2 = !nativeGetSymbols2
+ ? stubArray2 : function(object2) {\n if (object2 == null) {\n return
+ [];\n }\n object2 = Object(object2);\n return arrayFilter2(nativeGetSymbols2(object2),
+ function(symbol) {\n return propertyIsEnumerable2.call(object2, symbol);\n
+ \ });\n };\n var getTag2 = baseGetTag2;\n if (DataView2 && getTag2(new
+ DataView2(new ArrayBuffer(1))) != dataViewTag2 || Map2 && getTag2(new Map2())
+ != mapTag2 || Promise2 && getTag2(Promise2.resolve()) != promiseTag2 || Set2
+ && getTag2(new Set2()) != setTag2 || WeakMap2 && getTag2(new WeakMap2()) !=
+ weakMapTag2) {\n getTag2 = function(value) {\n var result = baseGetTag2(value),
+ Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor
+ ? toSource2(Ctor) : \"\";\n if (ctorString) {\n switch (ctorString)
+ {\n case dataViewCtorString2:\n return dataViewTag2;\n
+ \ case mapCtorString2:\n return mapTag2;\n case
+ promiseCtorString2:\n return promiseTag2;\n case setCtorString2:\n
+ \ return setTag2;\n case weakMapCtorString2:\n return
+ weakMapTag2;\n }\n }\n return result;\n };\n }\n
+ \ function isIndex2(value, length) {\n length = length == null ? MAX_SAFE_INTEGER2
+ : length;\n return !!length && (typeof value == \"number\" || reIsUint2.test(value))
+ && (value > -1 && value % 1 == 0 && value < length);\n }\n function
+ isKeyable2(value) {\n var type = typeof value;\n return type ==
+ \"string\" || type == \"number\" || type == \"symbol\" || type == \"boolean\"
+ ? value !== \"__proto__\" : value === null;\n }\n function isMasked2(func)
+ {\n return !!maskSrcKey2 && maskSrcKey2 in func;\n }\n function
+ isPrototype2(value) {\n var Ctor = value && value.constructor, proto
+ = typeof Ctor == \"function\" && Ctor.prototype || objectProto2;\n return
+ value === proto;\n }\n function objectToString2(value) {\n return
+ nativeObjectToString2.call(value);\n }\n function toSource2(func) {\n
+ \ if (func != null) {\n try {\n return funcToString2.call(func);\n
+ \ } catch (e2) {\n }\n try {\n return func +
+ \"\";\n } catch (e2) {\n }\n }\n return \"\";\n }\n
+ \ function eq2(value, other) {\n return value === other || value !==
+ value && other !== other;\n }\n var isArguments2 = baseIsArguments2(/*
+ @__PURE__ */ function() {\n return arguments;\n }()) ? baseIsArguments2
+ : function(value) {\n return isObjectLike2(value) && hasOwnProperty2.call(value,
+ \"callee\") && !propertyIsEnumerable2.call(value, \"callee\");\n };\n var
+ isArray2 = Array.isArray;\n function isArrayLike2(value) {\n return
+ value != null && isLength2(value.length) && !isFunction2(value);\n }\n
+ \ var isBuffer2 = nativeIsBuffer2 || stubFalse2;\n function isEqual2(value,
+ other) {\n return baseIsEqual2(value, other);\n }\n function isFunction2(value)
+ {\n if (!isObject2(value)) {\n return false;\n }\n var
+ tag = baseGetTag2(value);\n return tag == funcTag2 || tag == genTag2
+ || tag == asyncTag2 || tag == proxyTag2;\n }\n function isLength2(value)
+ {\n return typeof value == \"number\" && value > -1 && value % 1 == 0
+ && value <= MAX_SAFE_INTEGER2;\n }\n function isObject2(value) {\n var
+ type = typeof value;\n return value != null && (type == \"object\" ||
+ type == \"function\");\n }\n function isObjectLike2(value) {\n return
+ value != null && typeof value == \"object\";\n }\n var isTypedArray2
+ = nodeIsTypedArray2 ? baseUnary2(nodeIsTypedArray2) : baseIsTypedArray2;\n
+ \ function keys2(object2) {\n return isArrayLike2(object2) ? arrayLikeKeys2(object2)
+ : baseKeys2(object2);\n }\n function stubArray2() {\n return [];\n
+ \ }\n function stubFalse2() {\n return false;\n }\n module2.exports
+ = isEqual2;\n })(lodash_isequal, lodash_isequal.exports);\n return lodash_isequal.exports;\n}\nvar
+ AttributeMap = {};\nvar hasRequiredAttributeMap;\nfunction requireAttributeMap()
+ {\n if (hasRequiredAttributeMap) return AttributeMap;\n hasRequiredAttributeMap
+ = 1;\n Object.defineProperty(AttributeMap, \"__esModule\", { value: true
+ });\n const cloneDeep2 = requireLodash_clonedeep();\n const isEqual2 = requireLodash_isequal();\n
+ \ var AttributeMap$1;\n (function(AttributeMap2) {\n function compose(a2
+ = {}, b2 = {}, keepNull = false) {\n if (typeof a2 !== \"object\") {\n
+ \ a2 = {};\n }\n if (typeof b2 !== \"object\") {\n b2
+ = {};\n }\n let attributes = cloneDeep2(b2);\n if (!keepNull)
+ {\n attributes = Object.keys(attributes).reduce((copy, key) => {\n
+ \ if (attributes[key] != null) {\n copy[key] = attributes[key];\n
+ \ }\n return copy;\n }, {});\n }\n for (const
+ key in a2) {\n if (a2[key] !== void 0 && b2[key] === void 0) {\n attributes[key]
+ = a2[key];\n }\n }\n return Object.keys(attributes).length
+ > 0 ? attributes : void 0;\n }\n AttributeMap2.compose = compose;\n
+ \ function diff(a2 = {}, b2 = {}) {\n if (typeof a2 !== \"object\")
+ {\n a2 = {};\n }\n if (typeof b2 !== \"object\") {\n b2
+ = {};\n }\n const attributes = Object.keys(a2).concat(Object.keys(b2)).reduce((attrs,
+ key) => {\n if (!isEqual2(a2[key], b2[key])) {\n attrs[key]
+ = b2[key] === void 0 ? null : b2[key];\n }\n return attrs;\n
+ \ }, {});\n return Object.keys(attributes).length > 0 ? attributes
+ : void 0;\n }\n AttributeMap2.diff = diff;\n function invert(attr
+ = {}, base2 = {}) {\n attr = attr || {};\n const baseInverted =
+ Object.keys(base2).reduce((memo, key) => {\n if (base2[key] !== attr[key]
+ && attr[key] !== void 0) {\n memo[key] = base2[key];\n }\n
+ \ return memo;\n }, {});\n return Object.keys(attr).reduce((memo,
+ key) => {\n if (attr[key] !== base2[key] && base2[key] === void 0)
+ {\n memo[key] = null;\n }\n return memo;\n },
+ baseInverted);\n }\n AttributeMap2.invert = invert;\n function transform(a2,
+ b2, priority = false) {\n if (typeof a2 !== \"object\") {\n return
+ b2;\n }\n if (typeof b2 !== \"object\") {\n return void 0;\n
+ \ }\n if (!priority) {\n return b2;\n }\n const
+ attributes = Object.keys(b2).reduce((attrs, key) => {\n if (a2[key]
+ === void 0) {\n attrs[key] = b2[key];\n }\n return
+ attrs;\n }, {});\n return Object.keys(attributes).length > 0 ? attributes
+ : void 0;\n }\n AttributeMap2.transform = transform;\n })(AttributeMap$1
+ || (AttributeMap$1 = {}));\n AttributeMap.default = AttributeMap$1;\n return
+ AttributeMap;\n}\nvar Op = {};\nvar hasRequiredOp;\nfunction requireOp() {\n
+ \ if (hasRequiredOp) return Op;\n hasRequiredOp = 1;\n Object.defineProperty(Op,
+ \"__esModule\", { value: true });\n var Op$1;\n (function(Op2) {\n function
+ length(op) {\n if (typeof op.delete === \"number\") {\n return
+ op.delete;\n } else if (typeof op.retain === \"number\") {\n return
+ op.retain;\n } else if (typeof op.retain === \"object\" && op.retain
+ !== null) {\n return 1;\n } else {\n return typeof op.insert
+ === \"string\" ? op.insert.length : 1;\n }\n }\n Op2.length = length;\n
+ \ })(Op$1 || (Op$1 = {}));\n Op.default = Op$1;\n return Op;\n}\nvar OpIterator
+ = {};\nvar hasRequiredOpIterator;\nfunction requireOpIterator() {\n if (hasRequiredOpIterator)
+ return OpIterator;\n hasRequiredOpIterator = 1;\n Object.defineProperty(OpIterator,
+ \"__esModule\", { value: true });\n const Op_1 = requireOp();\n class Iterator
+ {\n constructor(ops) {\n this.ops = ops;\n this.index = 0;\n
+ \ this.offset = 0;\n }\n hasNext() {\n return this.peekLength()
+ < Infinity;\n }\n next(length) {\n if (!length) {\n length
+ = Infinity;\n }\n const nextOp = this.ops[this.index];\n if
+ (nextOp) {\n const offset = this.offset;\n const opLength =
+ Op_1.default.length(nextOp);\n if (length >= opLength - offset) {\n
+ \ length = opLength - offset;\n this.index += 1;\n this.offset
+ = 0;\n } else {\n this.offset += length;\n }\n if
+ (typeof nextOp.delete === \"number\") {\n return { delete: length
+ };\n } else {\n const retOp = {};\n if (nextOp.attributes)
+ {\n retOp.attributes = nextOp.attributes;\n }\n if
+ (typeof nextOp.retain === \"number\") {\n retOp.retain = length;\n
+ \ } else if (typeof nextOp.retain === \"object\" && nextOp.retain
+ !== null) {\n retOp.retain = nextOp.retain;\n } else if
+ (typeof nextOp.insert === \"string\") {\n retOp.insert = nextOp.insert.substr(offset,
+ length);\n } else {\n retOp.insert = nextOp.insert;\n
+ \ }\n return retOp;\n }\n } else {\n return
+ { retain: Infinity };\n }\n }\n peek() {\n return this.ops[this.index];\n
+ \ }\n peekLength() {\n if (this.ops[this.index]) {\n return
+ Op_1.default.length(this.ops[this.index]) - this.offset;\n } else {\n
+ \ return Infinity;\n }\n }\n peekType() {\n const op
+ = this.ops[this.index];\n if (op) {\n if (typeof op.delete ===
+ \"number\") {\n return \"delete\";\n } else if (typeof op.retain
+ === \"number\" || typeof op.retain === \"object\" && op.retain !== null) {\n
+ \ return \"retain\";\n } else {\n return \"insert\";\n
+ \ }\n }\n return \"retain\";\n }\n rest() {\n if
+ (!this.hasNext()) {\n return [];\n } else if (this.offset ===
+ 0) {\n return this.ops.slice(this.index);\n } else {\n const
+ offset = this.offset;\n const index2 = this.index;\n const next
+ = this.next();\n const rest = this.ops.slice(this.index);\n this.offset
+ = offset;\n this.index = index2;\n return [next].concat(rest);\n
+ \ }\n }\n }\n OpIterator.default = Iterator;\n return OpIterator;\n}\nvar
+ hasRequiredDelta;\nfunction requireDelta() {\n if (hasRequiredDelta) return
+ Delta$1.exports;\n hasRequiredDelta = 1;\n (function(module2, exports2)
+ {\n Object.defineProperty(exports2, \"__esModule\", { value: true });\n
+ \ exports2.AttributeMap = exports2.OpIterator = exports2.Op = void 0;\n
+ \ const diff = requireDiff();\n const cloneDeep2 = requireLodash_clonedeep();\n
+ \ const isEqual2 = requireLodash_isequal();\n const AttributeMap_1 =
+ requireAttributeMap();\n exports2.AttributeMap = AttributeMap_1.default;\n
+ \ const Op_1 = requireOp();\n exports2.Op = Op_1.default;\n const
+ OpIterator_1 = requireOpIterator();\n exports2.OpIterator = OpIterator_1.default;\n
+ \ const NULL_CHARACTER = String.fromCharCode(0);\n const getEmbedTypeAndData
+ = (a2, b2) => {\n if (typeof a2 !== \"object\" || a2 === null) {\n throw
+ new Error(`cannot retain a ${typeof a2}`);\n }\n if (typeof b2 !==
+ \"object\" || b2 === null) {\n throw new Error(`cannot retain a ${typeof
+ b2}`);\n }\n const embedType = Object.keys(a2)[0];\n if (!embedType
+ || embedType !== Object.keys(b2)[0]) {\n throw new Error(`embed types
+ not matched: ${embedType} != ${Object.keys(b2)[0]}`);\n }\n return
+ [embedType, a2[embedType], b2[embedType]];\n };\n class Delta2 {\n constructor(ops)
+ {\n if (Array.isArray(ops)) {\n this.ops = ops;\n }
+ else if (ops != null && Array.isArray(ops.ops)) {\n this.ops = ops.ops;\n
+ \ } else {\n this.ops = [];\n }\n }\n static
+ registerEmbed(embedType, handler) {\n this.handlers[embedType] = handler;\n
+ \ }\n static unregisterEmbed(embedType) {\n delete this.handlers[embedType];\n
+ \ }\n static getHandler(embedType) {\n const handler = this.handlers[embedType];\n
+ \ if (!handler) {\n throw new Error(`no handlers for embed
+ type \"${embedType}\"`);\n }\n return handler;\n }\n insert(arg,
+ attributes) {\n const newOp = {};\n if (typeof arg === \"string\"
+ && arg.length === 0) {\n return this;\n }\n newOp.insert
+ = arg;\n if (attributes != null && typeof attributes === \"object\"
+ && Object.keys(attributes).length > 0) {\n newOp.attributes = attributes;\n
+ \ }\n return this.push(newOp);\n }\n delete(length)
+ {\n if (length <= 0) {\n return this;\n }\n return
+ this.push({ delete: length });\n }\n retain(length, attributes)
+ {\n if (typeof length === \"number\" && length <= 0) {\n return
+ this;\n }\n const newOp = { retain: length };\n if (attributes
+ != null && typeof attributes === \"object\" && Object.keys(attributes).length
+ > 0) {\n newOp.attributes = attributes;\n }\n return
+ this.push(newOp);\n }\n push(newOp) {\n let index2 = this.ops.length;\n
+ \ let lastOp = this.ops[index2 - 1];\n newOp = cloneDeep2(newOp);\n
+ \ if (typeof lastOp === \"object\") {\n if (typeof newOp.delete
+ === \"number\" && typeof lastOp.delete === \"number\") {\n this.ops[index2
+ - 1] = { delete: lastOp.delete + newOp.delete };\n return this;\n
+ \ }\n if (typeof lastOp.delete === \"number\" && newOp.insert
+ != null) {\n index2 -= 1;\n lastOp = this.ops[index2
+ - 1];\n if (typeof lastOp !== \"object\") {\n this.ops.unshift(newOp);\n
+ \ return this;\n }\n }\n if (isEqual2(newOp.attributes,
+ lastOp.attributes)) {\n if (typeof newOp.insert === \"string\"
+ && typeof lastOp.insert === \"string\") {\n this.ops[index2 -
+ 1] = { insert: lastOp.insert + newOp.insert };\n if (typeof newOp.attributes
+ === \"object\") {\n this.ops[index2 - 1].attributes = newOp.attributes;\n
+ \ }\n return this;\n } else if (typeof
+ newOp.retain === \"number\" && typeof lastOp.retain === \"number\") {\n this.ops[index2
+ - 1] = { retain: lastOp.retain + newOp.retain };\n if (typeof
+ newOp.attributes === \"object\") {\n this.ops[index2 - 1].attributes
+ = newOp.attributes;\n }\n return this;\n }\n
+ \ }\n }\n if (index2 === this.ops.length) {\n this.ops.push(newOp);\n
+ \ } else {\n this.ops.splice(index2, 0, newOp);\n }\n
+ \ return this;\n }\n chop() {\n const lastOp = this.ops[this.ops.length
+ - 1];\n if (lastOp && typeof lastOp.retain === \"number\" && !lastOp.attributes)
+ {\n this.ops.pop();\n }\n return this;\n }\n filter(predicate)
+ {\n return this.ops.filter(predicate);\n }\n forEach(predicate)
+ {\n this.ops.forEach(predicate);\n }\n map(predicate) {\n
+ \ return this.ops.map(predicate);\n }\n partition(predicate)
+ {\n const passed = [];\n const failed = [];\n this.forEach((op)
+ => {\n const target = predicate(op) ? passed : failed;\n target.push(op);\n
+ \ });\n return [passed, failed];\n }\n reduce(predicate,
+ initialValue) {\n return this.ops.reduce(predicate, initialValue);\n
+ \ }\n changeLength() {\n return this.reduce((length, elem)
+ => {\n if (elem.insert) {\n return length + Op_1.default.length(elem);\n
+ \ } else if (elem.delete) {\n return length - elem.delete;\n
+ \ }\n return length;\n }, 0);\n }\n length()
+ {\n return this.reduce((length, elem) => {\n return length
+ + Op_1.default.length(elem);\n }, 0);\n }\n slice(start =
+ 0, end = Infinity) {\n const ops = [];\n const iter = new OpIterator_1.default(this.ops);\n
+ \ let index2 = 0;\n while (index2 < end && iter.hasNext()) {\n
+ \ let nextOp;\n if (index2 < start) {\n nextOp
+ = iter.next(start - index2);\n } else {\n nextOp = iter.next(end
+ - index2);\n ops.push(nextOp);\n }\n index2 +=
+ Op_1.default.length(nextOp);\n }\n return new Delta2(ops);\n
+ \ }\n compose(other) {\n const thisIter = new OpIterator_1.default(this.ops);\n
+ \ const otherIter = new OpIterator_1.default(other.ops);\n const
+ ops = [];\n const firstOther = otherIter.peek();\n if (firstOther
+ != null && typeof firstOther.retain === \"number\" && firstOther.attributes
+ == null) {\n let firstLeft = firstOther.retain;\n while
+ (thisIter.peekType() === \"insert\" && thisIter.peekLength() <= firstLeft)
+ {\n firstLeft -= thisIter.peekLength();\n ops.push(thisIter.next());\n
+ \ }\n if (firstOther.retain - firstLeft > 0) {\n otherIter.next(firstOther.retain
+ - firstLeft);\n }\n }\n const delta = new Delta2(ops);\n
+ \ while (thisIter.hasNext() || otherIter.hasNext()) {\n if
+ (otherIter.peekType() === \"insert\") {\n delta.push(otherIter.next());\n
+ \ } else if (thisIter.peekType() === \"delete\") {\n delta.push(thisIter.next());\n
+ \ } else {\n const length = Math.min(thisIter.peekLength(),
+ otherIter.peekLength());\n const thisOp = thisIter.next(length);\n
+ \ const otherOp = otherIter.next(length);\n if (otherOp.retain)
+ {\n const newOp = {};\n if (typeof thisOp.retain
+ === \"number\") {\n newOp.retain = typeof otherOp.retain ===
+ \"number\" ? length : otherOp.retain;\n } else {\n if
+ (typeof otherOp.retain === \"number\") {\n if (thisOp.retain
+ == null) {\n newOp.insert = thisOp.insert;\n }
+ else {\n newOp.retain = thisOp.retain;\n }\n
+ \ } else {\n const action = thisOp.retain ==
+ null ? \"insert\" : \"retain\";\n const [embedType, thisData,
+ otherData] = getEmbedTypeAndData(thisOp[action], otherOp.retain);\n const
+ handler = Delta2.getHandler(embedType);\n newOp[action] =
+ {\n [embedType]: handler.compose(thisData, otherData, action
+ === \"retain\")\n };\n }\n }\n
+ \ const attributes = AttributeMap_1.default.compose(thisOp.attributes,
+ otherOp.attributes, typeof thisOp.retain === \"number\");\n if
+ (attributes) {\n newOp.attributes = attributes;\n }\n
+ \ delta.push(newOp);\n if (!otherIter.hasNext() &&
+ isEqual2(delta.ops[delta.ops.length - 1], newOp)) {\n const
+ rest = new Delta2(thisIter.rest());\n return delta.concat(rest).chop();\n
+ \ }\n } else if (typeof otherOp.delete === \"number\"
+ && (typeof thisOp.retain === \"number\" || typeof thisOp.retain === \"object\"
+ && thisOp.retain !== null)) {\n delta.push(otherOp);\n }\n
+ \ }\n }\n return delta.chop();\n }\n concat(other)
+ {\n const delta = new Delta2(this.ops.slice());\n if (other.ops.length
+ > 0) {\n delta.push(other.ops[0]);\n delta.ops = delta.ops.concat(other.ops.slice(1));\n
+ \ }\n return delta;\n }\n diff(other, cursor) {\n if
+ (this.ops === other.ops) {\n return new Delta2();\n }\n const
+ strings = [this, other].map((delta) => {\n return delta.map((op)
+ => {\n if (op.insert != null) {\n return typeof op.insert
+ === \"string\" ? op.insert : NULL_CHARACTER;\n }\n const
+ prep = delta === other ? \"on\" : \"with\";\n throw new Error(\"diff()
+ called \" + prep + \" non-document\");\n }).join(\"\");\n });\n
+ \ const retDelta = new Delta2();\n const diffResult = diff(strings[0],
+ strings[1], cursor, true);\n const thisIter = new OpIterator_1.default(this.ops);\n
+ \ const otherIter = new OpIterator_1.default(other.ops);\n diffResult.forEach((component)
+ => {\n let length = component[1].length;\n while (length
+ > 0) {\n let opLength = 0;\n switch (component[0]) {\n
+ \ case diff.INSERT:\n opLength = Math.min(otherIter.peekLength(),
+ length);\n retDelta.push(otherIter.next(opLength));\n break;\n
+ \ case diff.DELETE:\n opLength = Math.min(length,
+ thisIter.peekLength());\n thisIter.next(opLength);\n retDelta.delete(opLength);\n
+ \ break;\n case diff.EQUAL:\n opLength
+ = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);\n const
+ thisOp = thisIter.next(opLength);\n const otherOp = otherIter.next(opLength);\n
+ \ if (isEqual2(thisOp.insert, otherOp.insert)) {\n retDelta.retain(opLength,
+ AttributeMap_1.default.diff(thisOp.attributes, otherOp.attributes));\n }
+ else {\n retDelta.push(otherOp).delete(opLength);\n }\n
+ \ break;\n }\n length -= opLength;\n }\n
+ \ });\n return retDelta.chop();\n }\n eachLine(predicate,
+ newline2 = \"\\n\") {\n const iter = new OpIterator_1.default(this.ops);\n
+ \ let line = new Delta2();\n let i3 = 0;\n while (iter.hasNext())
+ {\n if (iter.peekType() !== \"insert\") {\n return;\n
+ \ }\n const thisOp = iter.peek();\n const start
+ = Op_1.default.length(thisOp) - iter.peekLength();\n const index2
+ = typeof thisOp.insert === \"string\" ? thisOp.insert.indexOf(newline2, start)
+ - start : -1;\n if (index2 < 0) {\n line.push(iter.next());\n
+ \ } else if (index2 > 0) {\n line.push(iter.next(index2));\n
+ \ } else {\n if (predicate(line, iter.next(1).attributes
+ || {}, i3) === false) {\n return;\n }\n i3
+ += 1;\n line = new Delta2();\n }\n }\n if
+ (line.length() > 0) {\n predicate(line, {}, i3);\n }\n }\n
+ \ invert(base2) {\n const inverted = new Delta2();\n this.reduce((baseIndex,
+ op) => {\n if (op.insert) {\n inverted.delete(Op_1.default.length(op));\n
+ \ } else if (typeof op.retain === \"number\" && op.attributes == null)
+ {\n inverted.retain(op.retain);\n return baseIndex +
+ op.retain;\n } else if (op.delete || typeof op.retain === \"number\")
+ {\n const length = op.delete || op.retain;\n const slice
+ = base2.slice(baseIndex, baseIndex + length);\n slice.forEach((baseOp)
+ => {\n if (op.delete) {\n inverted.push(baseOp);\n
+ \ } else if (op.retain && op.attributes) {\n inverted.retain(Op_1.default.length(baseOp),
+ AttributeMap_1.default.invert(op.attributes, baseOp.attributes));\n }\n
+ \ });\n return baseIndex + length;\n } else
+ if (typeof op.retain === \"object\" && op.retain !== null) {\n const
+ slice = base2.slice(baseIndex, baseIndex + 1);\n const baseOp =
+ new OpIterator_1.default(slice.ops).next();\n const [embedType,
+ opData, baseOpData] = getEmbedTypeAndData(op.retain, baseOp.insert);\n const
+ handler = Delta2.getHandler(embedType);\n inverted.retain({ [embedType]:
+ handler.invert(opData, baseOpData) }, AttributeMap_1.default.invert(op.attributes,
+ baseOp.attributes));\n return baseIndex + 1;\n }\n return
+ baseIndex;\n }, 0);\n return inverted.chop();\n }\n transform(arg,
+ priority = false) {\n priority = !!priority;\n if (typeof arg
+ === \"number\") {\n return this.transformPosition(arg, priority);\n
+ \ }\n const other = arg;\n const thisIter = new OpIterator_1.default(this.ops);\n
+ \ const otherIter = new OpIterator_1.default(other.ops);\n const
+ delta = new Delta2();\n while (thisIter.hasNext() || otherIter.hasNext())
+ {\n if (thisIter.peekType() === \"insert\" && (priority || otherIter.peekType()
+ !== \"insert\")) {\n delta.retain(Op_1.default.length(thisIter.next()));\n
+ \ } else if (otherIter.peekType() === \"insert\") {\n delta.push(otherIter.next());\n
+ \ } else {\n const length = Math.min(thisIter.peekLength(),
+ otherIter.peekLength());\n const thisOp = thisIter.next(length);\n
+ \ const otherOp = otherIter.next(length);\n if (thisOp.delete)
+ {\n continue;\n } else if (otherOp.delete) {\n delta.push(otherOp);\n
+ \ } else {\n const thisData = thisOp.retain;\n const
+ otherData = otherOp.retain;\n let transformedData = typeof otherData
+ === \"object\" && otherData !== null ? otherData : length;\n if
+ (typeof thisData === \"object\" && thisData !== null && typeof otherData ===
+ \"object\" && otherData !== null) {\n const embedType = Object.keys(thisData)[0];\n
+ \ if (embedType === Object.keys(otherData)[0]) {\n const
+ handler = Delta2.getHandler(embedType);\n if (handler) {\n
+ \ transformedData = {\n [embedType]:
+ handler.transform(thisData[embedType], otherData[embedType], priority)\n };\n
+ \ }\n }\n }\n delta.retain(transformedData,
+ AttributeMap_1.default.transform(thisOp.attributes, otherOp.attributes, priority));\n
+ \ }\n }\n }\n return delta.chop();\n }\n
+ \ transformPosition(index2, priority = false) {\n priority = !!priority;\n
+ \ const thisIter = new OpIterator_1.default(this.ops);\n let
+ offset = 0;\n while (thisIter.hasNext() && offset <= index2) {\n const
+ length = thisIter.peekLength();\n const nextType = thisIter.peekType();\n
+ \ thisIter.next();\n if (nextType === \"delete\") {\n index2
+ -= Math.min(length, index2 - offset);\n continue;\n }
+ else if (nextType === \"insert\" && (offset < index2 || !priority)) {\n index2
+ += length;\n }\n offset += length;\n }\n return
+ index2;\n }\n }\n Delta2.Op = Op_1.default;\n Delta2.OpIterator
+ = OpIterator_1.default;\n Delta2.AttributeMap = AttributeMap_1.default;\n
+ \ Delta2.handlers = {};\n exports2.default = Delta2;\n {\n module2.exports
+ = Delta2;\n module2.exports.default = Delta2;\n }\n })(Delta$1, Delta$1.exports);\n
+ \ return Delta$1.exports;\n}\nvar DeltaExports = requireDelta();\nconst Delta
+ = /* @__PURE__ */ getDefaultExportFromCjs(DeltaExports);\nclass Break extends
+ EmbedBlot$1 {\n static value() {\n return void 0;\n }\n optimize() {\n
+ \ if (this.prev || this.next) {\n this.remove();\n }\n }\n length()
+ {\n return 0;\n }\n value() {\n return \"\";\n }\n}\nBreak.blotName
+ = \"break\";\nBreak.tagName = \"BR\";\nlet Text$1 = class Text2 extends TextBlot$1
+ {\n};\nconst entityMap = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\":
+ \">\",\n '\"': \""\",\n \"'\": \"'\"\n};\nfunction escapeText(text2)
+ {\n return text2.replace(/[&<>\"']/g, (s2) => entityMap[s2]);\n}\nconst _Inline
+ = class _Inline extends InlineBlot$1 {\n static compare(self2, other) {\n
+ \ const selfIndex = _Inline.order.indexOf(self2);\n const otherIndex
+ = _Inline.order.indexOf(other);\n if (selfIndex >= 0 || otherIndex >= 0)
+ {\n return selfIndex - otherIndex;\n }\n if (self2 === other) {\n
+ \ return 0;\n }\n if (self2 < other) {\n return -1;\n }\n
+ \ return 1;\n }\n formatAt(index2, length, name, value) {\n if (_Inline.compare(this.statics.blotName,
+ name) < 0 && this.scroll.query(name, Scope.BLOT)) {\n const blot = this.isolate(index2,
+ length);\n if (value) {\n blot.wrap(name, value);\n }\n }
+ else {\n super.formatAt(index2, length, name, value);\n }\n }\n optimize(context)
+ {\n super.optimize(context);\n if (this.parent instanceof _Inline &&
+ _Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0)
+ {\n const parent = this.parent.isolate(this.offset(), this.length());\n
+ \ this.moveChildren(parent);\n parent.wrap(this);\n }\n }\n};\n__publicField(_Inline,
+ \"allowedChildren\", [_Inline, Break, EmbedBlot$1, Text$1]);\n// Lower index
+ means deeper in the DOM tree, since not found (-1) is for embeds\n__publicField(_Inline,
+ \"order\", [\n \"cursor\",\n \"inline\",\n // Must be lower\n \"link\",\n
+ \ // Chrome wants to be lower\n \"underline\",\n \"strike\",\n \"italic\",\n
+ \ \"bold\",\n \"script\",\n \"code\"\n // Must be higher\n]);\nlet Inline
+ = _Inline;\nconst NEWLINE_LENGTH = 1;\nclass Block extends BlockBlot$1 {\n
+ \ constructor() {\n super(...arguments);\n __publicField(this, \"cache\",
+ {});\n }\n delta() {\n if (this.cache.delta == null) {\n this.cache.delta
+ = blockDelta(this);\n }\n return this.cache.delta;\n }\n deleteAt(index2,
+ length) {\n super.deleteAt(index2, length);\n this.cache = {};\n }\n
+ \ formatAt(index2, length, name, value) {\n if (length <= 0) return;\n
+ \ if (this.scroll.query(name, Scope.BLOCK)) {\n if (index2 + length
+ === this.length()) {\n this.format(name, value);\n }\n } else
+ {\n super.formatAt(index2, Math.min(length, this.length() - index2 -
+ 1), name, value);\n }\n this.cache = {};\n }\n insertAt(index2, value,
+ def) {\n if (def != null) {\n super.insertAt(index2, value, def);\n
+ \ this.cache = {};\n return;\n }\n if (value.length === 0)
+ return;\n const lines = value.split(\"\\n\");\n const text2 = lines.shift();\n
+ \ if (text2.length > 0) {\n if (index2 < this.length() - 1 || this.children.tail
+ == null) {\n super.insertAt(Math.min(index2, this.length() - 1), text2);\n
+ \ } else {\n this.children.tail.insertAt(this.children.tail.length(),
+ text2);\n }\n this.cache = {};\n }\n let block2 = this;\n
+ \ lines.reduce((lineIndex, line) => {\n block2 = block2.split(lineIndex,
+ true);\n block2.insertAt(0, line);\n return line.length;\n },
+ index2 + text2.length);\n }\n insertBefore(blot, ref) {\n const {\n head\n
+ \ } = this.children;\n super.insertBefore(blot, ref);\n if (head instanceof
+ Break) {\n head.remove();\n }\n this.cache = {};\n }\n length()
+ {\n if (this.cache.length == null) {\n this.cache.length = super.length()
+ + NEWLINE_LENGTH;\n }\n return this.cache.length;\n }\n moveChildren(target,
+ ref) {\n super.moveChildren(target, ref);\n this.cache = {};\n }\n
+ \ optimize(context) {\n super.optimize(context);\n this.cache = {};\n
+ \ }\n path(index2) {\n return super.path(index2, true);\n }\n removeChild(child)
+ {\n super.removeChild(child);\n this.cache = {};\n }\n split(index2)
+ {\n let force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : false;\n if (force && (index2 === 0 || index2 >= this.length() - NEWLINE_LENGTH))
+ {\n const clone = this.clone();\n if (index2 === 0) {\n this.parent.insertBefore(clone,
+ this);\n return this;\n }\n this.parent.insertBefore(clone,
+ this.next);\n return clone;\n }\n const next = super.split(index2,
+ force);\n this.cache = {};\n return next;\n }\n}\nBlock.blotName =
+ \"block\";\nBlock.tagName = \"P\";\nBlock.defaultChild = Break;\nBlock.allowedChildren
+ = [Break, Inline, EmbedBlot$1, Text$1];\nclass BlockEmbed extends EmbedBlot$1
+ {\n attach() {\n super.attach();\n this.attributes = new AttributorStore$1(this.domNode);\n
+ \ }\n delta() {\n return new Delta().insert(this.value(), {\n ...this.formats(),\n
+ \ ...this.attributes.values()\n });\n }\n format(name, value) {\n
+ \ const attribute2 = this.scroll.query(name, Scope.BLOCK_ATTRIBUTE);\n if
+ (attribute2 != null) {\n this.attributes.attribute(attribute2, value);\n
+ \ }\n }\n formatAt(index2, length, name, value) {\n this.format(name,
+ value);\n }\n insertAt(index2, value, def) {\n if (def != null) {\n super.insertAt(index2,
+ value, def);\n return;\n }\n const lines = value.split(\"\\n\");\n
+ \ const text2 = lines.pop();\n const blocks = lines.map((line) => {\n
+ \ const block2 = this.scroll.create(Block.blotName);\n block2.insertAt(0,
+ line);\n return block2;\n });\n const ref = this.split(index2);\n
+ \ blocks.forEach((block2) => {\n this.parent.insertBefore(block2, ref);\n
+ \ });\n if (text2) {\n this.parent.insertBefore(this.scroll.create(\"text\",
+ text2), ref);\n }\n }\n}\nBlockEmbed.scope = Scope.BLOCK_BLOT;\nfunction
+ blockDelta(blot) {\n let filter = arguments.length > 1 && arguments[1] !==
+ void 0 ? arguments[1] : true;\n return blot.descendants(LeafBlot$1).reduce((delta,
+ leaf) => {\n if (leaf.length() === 0) {\n return delta;\n }\n return
+ delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));\n }, new Delta()).insert(\"\\n\",
+ bubbleFormats(blot));\n}\nfunction bubbleFormats(blot) {\n let formats =
+ arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n let
+ filter = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
+ true;\n if (blot == null) return formats;\n if (\"formats\" in blot && typeof
+ blot.formats === \"function\") {\n formats = {\n ...formats,\n ...blot.formats()\n
+ \ };\n if (filter) {\n delete formats[\"code-token\"];\n }\n
+ \ }\n if (blot.parent == null || blot.parent.statics.blotName === \"scroll\"
+ || blot.parent.statics.scope !== blot.statics.scope) {\n return formats;\n
+ \ }\n return bubbleFormats(blot.parent, formats, filter);\n}\nconst _Cursor
+ = class _Cursor extends EmbedBlot$1 {\n // Zero width no break space\n static
+ value() {\n return void 0;\n }\n constructor(scroll, domNode, selection)
+ {\n super(scroll, domNode);\n this.selection = selection;\n this.textNode
+ = document.createTextNode(_Cursor.CONTENTS);\n this.domNode.appendChild(this.textNode);\n
+ \ this.savedLength = 0;\n }\n detach() {\n if (this.parent != null)
+ this.parent.removeChild(this);\n }\n format(name, value) {\n if (this.savedLength
+ !== 0) {\n super.format(name, value);\n return;\n }\n let
+ target = this;\n let index2 = 0;\n while (target != null && target.statics.scope
+ !== Scope.BLOCK_BLOT) {\n index2 += target.offset(target.parent);\n target
+ = target.parent;\n }\n if (target != null) {\n this.savedLength
+ = _Cursor.CONTENTS.length;\n target.optimize();\n target.formatAt(index2,
+ _Cursor.CONTENTS.length, name, value);\n this.savedLength = 0;\n }\n
+ \ }\n index(node, offset) {\n if (node === this.textNode) return 0;\n
+ \ return super.index(node, offset);\n }\n length() {\n return this.savedLength;\n
+ \ }\n position() {\n return [this.textNode, this.textNode.data.length];\n
+ \ }\n remove() {\n super.remove();\n this.parent = null;\n }\n restore()
+ {\n if (this.selection.composing || this.parent == null) return null;\n
+ \ const range = this.selection.getNativeRange();\n while (this.domNode.lastChild
+ != null && this.domNode.lastChild !== this.textNode) {\n this.domNode.parentNode.insertBefore(this.domNode.lastChild,
+ this.domNode);\n }\n const prevTextBlot = this.prev instanceof Text$1
+ ? this.prev : null;\n const prevTextLength = prevTextBlot ? prevTextBlot.length()
+ : 0;\n const nextTextBlot = this.next instanceof Text$1 ? this.next : null;\n
+ \ const nextText = nextTextBlot ? nextTextBlot.text : \"\";\n const {\n
+ \ textNode\n } = this;\n const newText = textNode.data.split(_Cursor.CONTENTS).join(\"\");\n
+ \ textNode.data = _Cursor.CONTENTS;\n let mergedTextBlot;\n if (prevTextBlot)
+ {\n mergedTextBlot = prevTextBlot;\n if (newText || nextTextBlot)
+ {\n prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);\n
+ \ if (nextTextBlot) {\n nextTextBlot.remove();\n }\n
+ \ }\n } else if (nextTextBlot) {\n mergedTextBlot = nextTextBlot;\n
+ \ nextTextBlot.insertAt(0, newText);\n } else {\n const newTextNode
+ = document.createTextNode(newText);\n mergedTextBlot = this.scroll.create(newTextNode);\n
+ \ this.parent.insertBefore(mergedTextBlot, this);\n }\n this.remove();\n
+ \ if (range) {\n const remapOffset = (node, offset) => {\n if
+ (prevTextBlot && node === prevTextBlot.domNode) {\n return offset;\n
+ \ }\n if (node === textNode) {\n return prevTextLength
+ + offset - 1;\n }\n if (nextTextBlot && node === nextTextBlot.domNode)
+ {\n return prevTextLength + newText.length + offset;\n }\n
+ \ return null;\n };\n const start = remapOffset(range.start.node,
+ range.start.offset);\n const end = remapOffset(range.end.node, range.end.offset);\n
+ \ if (start !== null && end !== null) {\n return {\n startNode:
+ mergedTextBlot.domNode,\n startOffset: start,\n endNode:
+ mergedTextBlot.domNode,\n endOffset: end\n };\n }\n }\n
+ \ return null;\n }\n update(mutations, context) {\n if (mutations.some((mutation)
+ => {\n return mutation.type === \"characterData\" && mutation.target
+ === this.textNode;\n })) {\n const range = this.restore();\n if
+ (range) context.range = range;\n }\n }\n // Avoid .ql-cursor being a
+ descendant of ``.\n // The reason is Safari pushes down `` on text
+ insertion.\n // That will cause DOM nodes not sync with the model.\n //\n
+ \ // For example ({I} is the caret), given the markup:\n // \\uFEFF{I}\n
+ \ // When typing a char \"x\", `` will be pushed down inside the ``
+ first:\n // \\uFEFF{I}\n // And
+ then \"x\" will be inserted after ``:\n // \\uFEFFd{I}\n
+ \ optimize(context) {\n super.optimize(context);\n let {\n parent\n
+ \ } = this;\n while (parent) {\n if (parent.domNode.tagName ===
+ \"A\") {\n this.savedLength = _Cursor.CONTENTS.length;\n parent.isolate(this.offset(parent),
+ this.length()).unwrap();\n this.savedLength = 0;\n break;\n
+ \ }\n parent = parent.parent;\n }\n }\n value() {\n return
+ \"\";\n }\n};\n__publicField(_Cursor, \"blotName\", \"cursor\");\n__publicField(_Cursor,
+ \"className\", \"ql-cursor\");\n__publicField(_Cursor, \"tagName\", \"span\");\n__publicField(_Cursor,
+ \"CONTENTS\", \"\\uFEFF\");\nlet Cursor = _Cursor;\nvar eventemitter3 = {
+ exports: {} };\nvar hasRequiredEventemitter3;\nfunction requireEventemitter3()
+ {\n if (hasRequiredEventemitter3) return eventemitter3.exports;\n hasRequiredEventemitter3
+ = 1;\n (function(module2) {\n var has2 = Object.prototype.hasOwnProperty,
+ prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n
+ \ Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new
+ Events().__proto__) prefix = false;\n }\n function EE(fn, context, once)
+ {\n this.fn = fn;\n this.context = context;\n this.once = once
+ || false;\n }\n function addListener(emitter, event, fn, context, once)
+ {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The
+ listener must be a function\");\n }\n var listener = new EE(fn,
+ context || emitter, once), evt = prefix ? prefix + event : event;\n if
+ (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n
+ \ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n
+ \ else emitter._events[evt] = [emitter._events[evt], listener];\n return
+ emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount
+ === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n
+ \ }\n function EventEmitter2() {\n this._events = new Events();\n
+ \ this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames
+ = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount
+ === 0) return names;\n for (name in events = this._events) {\n if
+ (has2.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n
+ \ if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n
+ \ }\n return names;\n };\n EventEmitter2.prototype.listeners
+ = function listeners(event) {\n var evt = prefix ? prefix + event : event,
+ handlers = this._events[evt];\n if (!handlers) return [];\n if (handlers.fn)
+ return [handlers.fn];\n for (var i3 = 0, l2 = handlers.length, ee = new
+ Array(l2); i3 < l2; i3++) {\n ee[i3] = handlers[i3].fn;\n }\n
+ \ return ee;\n };\n EventEmitter2.prototype.listenerCount = function
+ listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners
+ = this._events[evt];\n if (!listeners) return 0;\n if (listeners.fn)
+ return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit
+ = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix
+ + event : event;\n if (!this._events[evt]) return false;\n var listeners
+ = this._events[evt], len = arguments.length, args, i3;\n if (listeners.fn)
+ {\n if (listeners.once) this.removeListener(event, listeners.fn, void
+ 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context),
+ true;\n case 2:\n return listeners.fn.call(listeners.context,
+ a1), true;\n case 3:\n return listeners.fn.call(listeners.context,
+ a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context,
+ a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context,
+ a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context,
+ a1, a2, a3, a4, a5), true;\n }\n for (i3 = 1, args = new Array(len
+ - 1); i3 < len; i3++) {\n args[i3 - 1] = arguments[i3];\n }\n
+ \ listeners.fn.apply(listeners.context, args);\n } else {\n var
+ length = listeners.length, j2;\n for (i3 = 0; i3 < length; i3++) {\n
+ \ if (listeners[i3].once) this.removeListener(event, listeners[i3].fn,
+ void 0, true);\n switch (len) {\n case 1:\n listeners[i3].fn.call(listeners[i3].context);\n
+ \ break;\n case 2:\n listeners[i3].fn.call(listeners[i3].context,
+ a1);\n break;\n case 3:\n listeners[i3].fn.call(listeners[i3].context,
+ a1, a2);\n break;\n case 4:\n listeners[i3].fn.call(listeners[i3].context,
+ a1, a2, a3);\n break;\n default:\n if
+ (!args) for (j2 = 1, args = new Array(len - 1); j2 < len; j2++) {\n args[j2
+ - 1] = arguments[j2];\n }\n listeners[i3].fn.apply(listeners[i3].context,
+ args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on
+ = function on(event, fn, context) {\n return addListener(this, event,
+ fn, context, false);\n };\n EventEmitter2.prototype.once = function
+ once(event, fn, context) {\n return addListener(this, event, fn, context,
+ true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event,
+ fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if
+ (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this,
+ evt);\n return this;\n }\n var listeners = this._events[evt];\n
+ \ if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once)
+ && (!context || listeners.context === context)) {\n clearEvent(this,
+ evt);\n }\n } else {\n for (var i3 = 0, events = [], length
+ = listeners.length; i3 < length; i3++) {\n if (listeners[i3].fn !==
+ fn || once && !listeners[i3].once || context && listeners[i3].context !==
+ context) {\n events.push(listeners[i3]);\n }\n }\n
+ \ if (events.length) this._events[evt] = events.length === 1 ? events[0]
+ : events;\n else clearEvent(this, evt);\n }\n return this;\n
+ \ };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event)
+ {\n var evt;\n if (event) {\n evt = prefix ? prefix + event
+ : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else
+ {\n this._events = new Events();\n this._eventsCount = 0;\n
+ \ }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n
+ \ EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed
+ = prefix;\n EventEmitter2.EventEmitter = EventEmitter2;\n {\n module2.exports
+ = EventEmitter2;\n }\n })(eventemitter3);\n return eventemitter3.exports;\n}\nvar
+ eventemitter3Exports = requireEventemitter3();\nconst EventEmitter = /* @__PURE__
+ */ getDefaultExportFromCjs(eventemitter3Exports);\nconst instances = /* @__PURE__
+ */ new WeakMap();\nconst levels = [\"error\", \"warn\", \"log\", \"info\"];\nlet
+ level = \"warn\";\nfunction debug$6(method) {\n if (level) {\n if (levels.indexOf(method)
+ <= levels.indexOf(level)) {\n for (var _len = arguments.length, args
+ = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key
+ - 1] = arguments[_key];\n }\n console[method](...args);\n }\n
+ \ }\n}\nfunction namespace(ns) {\n return levels.reduce((logger, method)
+ => {\n logger[method] = debug$6.bind(console, method, ns);\n return
+ logger;\n }, {});\n}\nnamespace.level = (newLevel) => {\n level = newLevel;\n};\ndebug$6.level
+ = namespace.level;\nconst debug$5 = namespace(\"quill:events\");\nconst EVENTS
+ = [\"selectionchange\", \"mousedown\", \"mouseup\", \"click\"];\nEVENTS.forEach((eventName)
+ => {\n document.addEventListener(eventName, function() {\n for (var _len
+ = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
+ {\n args[_key] = arguments[_key];\n }\n Array.from(document.querySelectorAll(\".ql-container\")).forEach((node)
+ => {\n const quill = instances.get(node);\n if (quill && quill.emitter)
+ {\n quill.emitter.handleDOM(...args);\n }\n });\n });\n});\nclass
+ Emitter extends EventEmitter {\n constructor() {\n super();\n this.domListeners
+ = {};\n this.on(\"error\", debug$5.error);\n }\n emit() {\n for (var
+ _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2;
+ _key2++) {\n args[_key2] = arguments[_key2];\n }\n debug$5.log.call(debug$5,
+ ...args);\n return super.emit(...args);\n }\n handleDOM(event) {\n for
+ (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0),
+ _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n
+ \ }\n (this.domListeners[event.type] || []).forEach((_ref) => {\n let
+ {\n node,\n handler\n } = _ref;\n if (event.target
+ === node || node.contains(event.target)) {\n handler(event, ...args);\n
+ \ }\n });\n }\n listenDOM(eventName, node, handler) {\n if (!this.domListeners[eventName])
+ {\n this.domListeners[eventName] = [];\n }\n this.domListeners[eventName].push({\n
+ \ node,\n handler\n });\n }\n}\n__publicField(Emitter, \"events\",
+ {\n EDITOR_CHANGE: \"editor-change\",\n SCROLL_BEFORE_UPDATE: \"scroll-before-update\",\n
+ \ SCROLL_BLOT_MOUNT: \"scroll-blot-mount\",\n SCROLL_BLOT_UNMOUNT: \"scroll-blot-unmount\",\n
+ \ SCROLL_OPTIMIZE: \"scroll-optimize\",\n SCROLL_UPDATE: \"scroll-update\",\n
+ \ SCROLL_EMBED_UPDATE: \"scroll-embed-update\",\n SELECTION_CHANGE: \"selection-change\",\n
+ \ TEXT_CHANGE: \"text-change\",\n COMPOSITION_BEFORE_START: \"composition-before-start\",\n
+ \ COMPOSITION_START: \"composition-start\",\n COMPOSITION_BEFORE_END: \"composition-before-end\",\n
+ \ COMPOSITION_END: \"composition-end\"\n});\n__publicField(Emitter, \"sources\",
+ {\n API: \"api\",\n SILENT: \"silent\",\n USER: \"user\"\n});\nconst debug$4
+ = namespace(\"quill:selection\");\nlet Range$1 = class Range2 {\n constructor(index2)
+ {\n let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : 0;\n this.index = index2;\n this.length = length;\n }\n};\nclass
+ Selection {\n constructor(scroll, emitter) {\n this.emitter = emitter;\n
+ \ this.scroll = scroll;\n this.composing = false;\n this.mouseDown
+ = false;\n this.root = this.scroll.domNode;\n this.cursor = this.scroll.create(\"cursor\",
+ this);\n this.savedRange = new Range$1(0, 0);\n this.lastRange = this.savedRange;\n
+ \ this.lastNative = null;\n this.handleComposition();\n this.handleDragging();\n
+ \ this.emitter.listenDOM(\"selectionchange\", document, () => {\n if
+ (!this.mouseDown && !this.composing) {\n setTimeout(this.update.bind(this,
+ Emitter.sources.USER), 1);\n }\n });\n this.emitter.on(Emitter.events.SCROLL_BEFORE_UPDATE,
+ () => {\n if (!this.hasFocus()) return;\n const native = this.getNativeRange();\n
+ \ if (native == null) return;\n if (native.start.node === this.cursor.textNode)
+ return;\n this.emitter.once(Emitter.events.SCROLL_UPDATE, (source, mutations)
+ => {\n try {\n if (this.root.contains(native.start.node) &&
+ this.root.contains(native.end.node)) {\n this.setNativeRange(native.start.node,
+ native.start.offset, native.end.node, native.end.offset);\n }\n const
+ triggeredByTyping = mutations.some((mutation) => mutation.type === \"characterData\"
+ || mutation.type === \"childList\" || mutation.type === \"attributes\" &&
+ mutation.target === this.root);\n this.update(triggeredByTyping ?
+ Emitter.sources.SILENT : source);\n } catch (ignored) {\n }\n
+ \ });\n });\n this.emitter.on(Emitter.events.SCROLL_OPTIMIZE, (mutations,
+ context) => {\n if (context.range) {\n const {\n startNode,\n
+ \ startOffset,\n endNode,\n endOffset\n }
+ = context.range;\n this.setNativeRange(startNode, startOffset, endNode,
+ endOffset);\n this.update(Emitter.sources.SILENT);\n }\n });\n
+ \ this.update(Emitter.sources.SILENT);\n }\n handleComposition() {\n this.emitter.on(Emitter.events.COMPOSITION_BEFORE_START,
+ () => {\n this.composing = true;\n });\n this.emitter.on(Emitter.events.COMPOSITION_END,
+ () => {\n this.composing = false;\n if (this.cursor.parent) {\n
+ \ const range = this.cursor.restore();\n if (!range) return;\n
+ \ setTimeout(() => {\n this.setNativeRange(range.startNode,
+ range.startOffset, range.endNode, range.endOffset);\n }, 1);\n }\n
+ \ });\n }\n handleDragging() {\n this.emitter.listenDOM(\"mousedown\",
+ document.body, () => {\n this.mouseDown = true;\n });\n this.emitter.listenDOM(\"mouseup\",
+ document.body, () => {\n this.mouseDown = false;\n this.update(Emitter.sources.USER);\n
+ \ });\n }\n focus() {\n if (this.hasFocus()) return;\n this.root.focus({\n
+ \ preventScroll: true\n });\n this.setRange(this.savedRange);\n
+ \ }\n format(format2, value) {\n this.scroll.update();\n const nativeRange
+ = this.getNativeRange();\n if (nativeRange == null || !nativeRange.native.collapsed
+ || this.scroll.query(format2, Scope.BLOCK)) return;\n if (nativeRange.start.node
+ !== this.cursor.textNode) {\n const blot = this.scroll.find(nativeRange.start.node,
+ false);\n if (blot == null) return;\n if (blot instanceof LeafBlot$1)
+ {\n const after = blot.split(nativeRange.start.offset);\n blot.parent.insertBefore(this.cursor,
+ after);\n } else {\n blot.insertBefore(this.cursor, nativeRange.start.node);\n
+ \ }\n this.cursor.attach();\n }\n this.cursor.format(format2,
+ value);\n this.scroll.optimize();\n this.setNativeRange(this.cursor.textNode,
+ this.cursor.textNode.data.length);\n this.update();\n }\n getBounds(index2)
+ {\n let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : 0;\n const scrollLength = this.scroll.length();\n index2 = Math.min(index2,
+ scrollLength - 1);\n length = Math.min(index2 + length, scrollLength -
+ 1) - index2;\n let node;\n let [leaf, offset] = this.scroll.leaf(index2);\n
+ \ if (leaf == null) return null;\n if (length > 0 && offset === leaf.length())
+ {\n const [next] = this.scroll.leaf(index2 + 1);\n if (next) {\n
+ \ const [line] = this.scroll.line(index2);\n const [nextLine]
+ = this.scroll.line(index2 + 1);\n if (line === nextLine) {\n leaf
+ = next;\n offset = 0;\n }\n }\n }\n [node, offset]
+ = leaf.position(offset, true);\n const range = document.createRange();\n
+ \ if (length > 0) {\n range.setStart(node, offset);\n [leaf, offset]
+ = this.scroll.leaf(index2 + length);\n if (leaf == null) return null;\n
+ \ [node, offset] = leaf.position(offset, true);\n range.setEnd(node,
+ offset);\n return range.getBoundingClientRect();\n }\n let side
+ = \"left\";\n let rect;\n if (node instanceof Text) {\n if (!node.data.length)
+ {\n return null;\n }\n if (offset < node.data.length) {\n
+ \ range.setStart(node, offset);\n range.setEnd(node, offset +
+ 1);\n } else {\n range.setStart(node, offset - 1);\n range.setEnd(node,
+ offset);\n side = \"right\";\n }\n rect = range.getBoundingClientRect();\n
+ \ } else {\n if (!(leaf.domNode instanceof Element)) return null;\n
+ \ rect = leaf.domNode.getBoundingClientRect();\n if (offset > 0)
+ side = \"right\";\n }\n return {\n bottom: rect.top + rect.height,\n
+ \ height: rect.height,\n left: rect[side],\n right: rect[side],\n
+ \ top: rect.top,\n width: 0\n };\n }\n getNativeRange() {\n
+ \ const selection = document.getSelection();\n if (selection == null
+ || selection.rangeCount <= 0) return null;\n const nativeRange = selection.getRangeAt(0);\n
+ \ if (nativeRange == null) return null;\n const range = this.normalizeNative(nativeRange);\n
+ \ debug$4.info(\"getNativeRange\", range);\n return range;\n }\n getRange()
+ {\n const root2 = this.scroll.domNode;\n if (\"isConnected\" in root2
+ && !root2.isConnected) {\n return [null, null];\n }\n const normalized
+ = this.getNativeRange();\n if (normalized == null) return [null, null];\n
+ \ const range = this.normalizedToRange(normalized);\n return [range,
+ normalized];\n }\n hasFocus() {\n return document.activeElement === this.root
+ || document.activeElement != null && contains(this.root, document.activeElement);\n
+ \ }\n normalizedToRange(range) {\n const positions = [[range.start.node,
+ range.start.offset]];\n if (!range.native.collapsed) {\n positions.push([range.end.node,
+ range.end.offset]);\n }\n const indexes = positions.map((position) =>
+ {\n const [node, offset] = position;\n const blot = this.scroll.find(node,
+ true);\n const index2 = blot.offset(this.scroll);\n if (offset ===
+ 0) {\n return index2;\n }\n if (blot instanceof LeafBlot$1)
+ {\n return index2 + blot.index(node, offset);\n }\n return
+ index2 + blot.length();\n });\n const end = Math.min(Math.max(...indexes),
+ this.scroll.length() - 1);\n const start = Math.min(end, ...indexes);\n
+ \ return new Range$1(start, end - start);\n }\n normalizeNative(nativeRange)
+ {\n if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed
+ && !contains(this.root, nativeRange.endContainer)) {\n return null;\n
+ \ }\n const range = {\n start: {\n node: nativeRange.startContainer,\n
+ \ offset: nativeRange.startOffset\n },\n end: {\n node:
+ nativeRange.endContainer,\n offset: nativeRange.endOffset\n },\n
+ \ native: nativeRange\n };\n [range.start, range.end].forEach((position)
+ => {\n let {\n node,\n offset\n } = position;\n while
+ (!(node instanceof Text) && node.childNodes.length > 0) {\n if (node.childNodes.length
+ > offset) {\n node = node.childNodes[offset];\n offset =
+ 0;\n } else if (node.childNodes.length === offset) {\n node
+ = node.lastChild;\n if (node instanceof Text) {\n offset
+ = node.data.length;\n } else if (node.childNodes.length > 0) {\n
+ \ offset = node.childNodes.length;\n } else {\n offset
+ = node.childNodes.length + 1;\n }\n } else {\n break;\n
+ \ }\n }\n position.node = node;\n position.offset = offset;\n
+ \ });\n return range;\n }\n rangeToNative(range) {\n const scrollLength
+ = this.scroll.length();\n const getPosition = (index2, inclusive) => {\n
+ \ index2 = Math.min(scrollLength - 1, index2);\n const [leaf, leafOffset]
+ = this.scroll.leaf(index2);\n return leaf ? leaf.position(leafOffset,
+ inclusive) : [null, -1];\n };\n return [...getPosition(range.index,
+ false), ...getPosition(range.index + range.length, true)];\n }\n setNativeRange(startNode,
+ startOffset) {\n let endNode = arguments.length > 2 && arguments[2] !==
+ void 0 ? arguments[2] : startNode;\n let endOffset = arguments.length >
+ 3 && arguments[3] !== void 0 ? arguments[3] : startOffset;\n let force
+ = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;\n
+ \ debug$4.info(\"setNativeRange\", startNode, startOffset, endNode, endOffset);\n
+ \ if (startNode != null && (this.root.parentNode == null || startNode.parentNode
+ == null || // @ts-expect-error Fix me later\n endNode.parentNode == null))
+ {\n return;\n }\n const selection = document.getSelection();\n
+ \ if (selection == null) return;\n if (startNode != null) {\n if
+ (!this.hasFocus()) this.root.focus({\n preventScroll: true\n });\n
+ \ const {\n native\n } = this.getNativeRange() || {};\n if
+ (native == null || force || startNode !== native.startContainer || startOffset
+ !== native.startOffset || endNode !== native.endContainer || endOffset !==
+ native.endOffset) {\n if (startNode instanceof Element && startNode.tagName
+ === \"BR\") {\n startOffset = Array.from(startNode.parentNode.childNodes).indexOf(startNode);\n
+ \ startNode = startNode.parentNode;\n }\n if (endNode
+ instanceof Element && endNode.tagName === \"BR\") {\n endOffset =
+ Array.from(endNode.parentNode.childNodes).indexOf(endNode);\n endNode
+ = endNode.parentNode;\n }\n const range = document.createRange();\n
+ \ range.setStart(startNode, startOffset);\n range.setEnd(endNode,
+ endOffset);\n selection.removeAllRanges();\n selection.addRange(range);\n
+ \ }\n } else {\n selection.removeAllRanges();\n this.root.blur();\n
+ \ }\n }\n setRange(range) {\n let force = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : false;\n let source = arguments.length > 2
+ && arguments[2] !== void 0 ? arguments[2] : Emitter.sources.API;\n if (typeof
+ force === \"string\") {\n source = force;\n force = false;\n }\n
+ \ debug$4.info(\"setRange\", range);\n if (range != null) {\n const
+ args = this.rangeToNative(range);\n this.setNativeRange(...args, force);\n
+ \ } else {\n this.setNativeRange(null);\n }\n this.update(source);\n
+ \ }\n update() {\n let source = arguments.length > 0 && arguments[0] !==
+ void 0 ? arguments[0] : Emitter.sources.USER;\n const oldRange = this.lastRange;\n
+ \ const [lastRange, nativeRange] = this.getRange();\n this.lastRange
+ = lastRange;\n this.lastNative = nativeRange;\n if (this.lastRange !=
+ null) {\n this.savedRange = this.lastRange;\n }\n if (!isEqual$1(oldRange,
+ this.lastRange)) {\n if (!this.composing && nativeRange != null && nativeRange.native.collapsed
+ && nativeRange.start.node !== this.cursor.textNode) {\n const range
+ = this.cursor.restore();\n if (range) {\n this.setNativeRange(range.startNode,
+ range.startOffset, range.endNode, range.endOffset);\n }\n }\n
+ \ const args = [Emitter.events.SELECTION_CHANGE, cloneDeep(this.lastRange),
+ cloneDeep(oldRange), source];\n this.emitter.emit(Emitter.events.EDITOR_CHANGE,
+ ...args);\n if (source !== Emitter.sources.SILENT) {\n this.emitter.emit(...args);\n
+ \ }\n }\n }\n}\nfunction contains(parent, descendant) {\n try {\n
+ \ descendant.parentNode;\n } catch (e2) {\n return false;\n }\n return
+ parent.contains(descendant);\n}\nconst ASCII = /^[ -~]*$/;\nclass Editor {\n
+ \ constructor(scroll) {\n this.scroll = scroll;\n this.delta = this.getDelta();\n
+ \ }\n applyDelta(delta) {\n this.scroll.update();\n let scrollLength
+ = this.scroll.length();\n this.scroll.batchStart();\n const normalizedDelta
+ = normalizeDelta(delta);\n const deleteDelta = new Delta();\n const
+ normalizedOps = splitOpLines(normalizedDelta.ops.slice());\n normalizedOps.reduce((index2,
+ op) => {\n const length = DeltaExports.Op.length(op);\n let attributes
+ = op.attributes || {};\n let isImplicitNewlinePrepended = false;\n let
+ isImplicitNewlineAppended = false;\n if (op.insert != null) {\n deleteDelta.retain(length);\n
+ \ if (typeof op.insert === \"string\") {\n const text2 = op.insert;\n
+ \ isImplicitNewlineAppended = !text2.endsWith(\"\\n\") && (scrollLength
+ <= index2 || !!this.scroll.descendant(BlockEmbed, index2)[0]);\n this.scroll.insertAt(index2,
+ text2);\n const [line, offset] = this.scroll.line(index2);\n let
+ formats = merge({}, bubbleFormats(line));\n if (line instanceof Block)
+ {\n const [leaf] = line.descendant(LeafBlot$1, offset);\n if
+ (leaf) {\n formats = merge(formats, bubbleFormats(leaf));\n }\n
+ \ }\n attributes = DeltaExports.AttributeMap.diff(formats,
+ attributes) || {};\n } else if (typeof op.insert === \"object\") {\n
+ \ const key = Object.keys(op.insert)[0];\n if (key == null)
+ return index2;\n const isInlineEmbed = this.scroll.query(key, Scope.INLINE)
+ != null;\n if (isInlineEmbed) {\n if (scrollLength <=
+ index2 || !!this.scroll.descendant(BlockEmbed, index2)[0]) {\n isImplicitNewlineAppended
+ = true;\n }\n } else if (index2 > 0) {\n const
+ [leaf, offset] = this.scroll.descendant(LeafBlot$1, index2 - 1);\n if
+ (leaf instanceof Text$1) {\n const text2 = leaf.value();\n if
+ (text2[offset] !== \"\\n\") {\n isImplicitNewlinePrepended
+ = true;\n }\n } else if (leaf instanceof EmbedBlot$1
+ && leaf.statics.scope === Scope.INLINE_BLOT) {\n isImplicitNewlinePrepended
+ = true;\n }\n }\n this.scroll.insertAt(index2,
+ key, op.insert[key]);\n if (isInlineEmbed) {\n const [leaf]
+ = this.scroll.descendant(LeafBlot$1, index2);\n if (leaf) {\n const
+ formats = merge({}, bubbleFormats(leaf));\n attributes = DeltaExports.AttributeMap.diff(formats,
+ attributes) || {};\n }\n }\n }\n scrollLength
+ += length;\n } else {\n deleteDelta.push(op);\n if (op.retain
+ !== null && typeof op.retain === \"object\") {\n const key = Object.keys(op.retain)[0];\n
+ \ if (key == null) return index2;\n this.scroll.updateEmbedAt(index2,
+ key, op.retain[key]);\n }\n }\n Object.keys(attributes).forEach((name)
+ => {\n this.scroll.formatAt(index2, length, name, attributes[name]);\n
+ \ });\n const prependedLength = isImplicitNewlinePrepended ? 1 :
+ 0;\n const addedLength = isImplicitNewlineAppended ? 1 : 0;\n scrollLength
+ += prependedLength + addedLength;\n deleteDelta.retain(prependedLength);\n
+ \ deleteDelta.delete(addedLength);\n return index2 + length + prependedLength
+ + addedLength;\n }, 0);\n deleteDelta.reduce((index2, op) => {\n if
+ (typeof op.delete === \"number\") {\n this.scroll.deleteAt(index2,
+ op.delete);\n return index2;\n }\n return index2 + DeltaExports.Op.length(op);\n
+ \ }, 0);\n this.scroll.batchEnd();\n this.scroll.optimize();\n return
+ this.update(normalizedDelta);\n }\n deleteText(index2, length) {\n this.scroll.deleteAt(index2,
+ length);\n return this.update(new Delta().retain(index2).delete(length));\n
+ \ }\n formatLine(index2, length) {\n let formats = arguments.length >
+ 2 && arguments[2] !== void 0 ? arguments[2] : {};\n this.scroll.update();\n
+ \ Object.keys(formats).forEach((format2) => {\n this.scroll.lines(index2,
+ Math.max(length, 1)).forEach((line) => {\n line.format(format2, formats[format2]);\n
+ \ });\n });\n this.scroll.optimize();\n const delta = new Delta().retain(index2).retain(length,
+ cloneDeep(formats));\n return this.update(delta);\n }\n formatText(index2,
+ length) {\n let formats = arguments.length > 2 && arguments[2] !== void
+ 0 ? arguments[2] : {};\n Object.keys(formats).forEach((format2) => {\n
+ \ this.scroll.formatAt(index2, length, format2, formats[format2]);\n });\n
+ \ const delta = new Delta().retain(index2).retain(length, cloneDeep(formats));\n
+ \ return this.update(delta);\n }\n getContents(index2, length) {\n return
+ this.delta.slice(index2, index2 + length);\n }\n getDelta() {\n return
+ this.scroll.lines().reduce((delta, line) => {\n return delta.concat(line.delta());\n
+ \ }, new Delta());\n }\n getFormat(index2) {\n let length = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n let lines = [];\n
+ \ let leaves = [];\n if (length === 0) {\n this.scroll.path(index2).forEach((path)
+ => {\n const [blot] = path;\n if (blot instanceof Block) {\n
+ \ lines.push(blot);\n } else if (blot instanceof LeafBlot$1)
+ {\n leaves.push(blot);\n }\n });\n } else {\n lines
+ = this.scroll.lines(index2, length);\n leaves = this.scroll.descendants(LeafBlot$1,
+ index2, length);\n }\n const [lineFormats, leafFormats] = [lines, leaves].map((blots)
+ => {\n const blot = blots.shift();\n if (blot == null) return {};\n
+ \ let formats = bubbleFormats(blot);\n while (Object.keys(formats).length
+ > 0) {\n const blot2 = blots.shift();\n if (blot2 == null) return
+ formats;\n formats = combineFormats(bubbleFormats(blot2), formats);\n
+ \ }\n return formats;\n });\n return {\n ...lineFormats,\n
+ \ ...leafFormats\n };\n }\n getHTML(index2, length) {\n const
+ [line, lineOffset] = this.scroll.line(index2);\n if (line) {\n const
+ lineLength = line.length();\n const isWithinLine = line.length() >= lineOffset
+ + length;\n if (isWithinLine && !(lineOffset === 0 && length === lineLength))
+ {\n return convertHTML(line, lineOffset, length, true);\n }\n
+ \ return convertHTML(this.scroll, index2, length, true);\n }\n return
+ \"\";\n }\n getText(index2, length) {\n return this.getContents(index2,
+ length).filter((op) => typeof op.insert === \"string\").map((op) => op.insert).join(\"\");\n
+ \ }\n insertContents(index2, contents) {\n const normalizedDelta = normalizeDelta(contents);\n
+ \ const change = new Delta().retain(index2).concat(normalizedDelta);\n this.scroll.insertContents(index2,
+ normalizedDelta);\n return this.update(change);\n }\n insertEmbed(index2,
+ embed, value) {\n this.scroll.insertAt(index2, embed, value);\n return
+ this.update(new Delta().retain(index2).insert({\n [embed]: value\n }));\n
+ \ }\n insertText(index2, text2) {\n let formats = arguments.length > 2
+ && arguments[2] !== void 0 ? arguments[2] : {};\n text2 = text2.replace(/\\r\\n/g,
+ \"\\n\").replace(/\\r/g, \"\\n\");\n this.scroll.insertAt(index2, text2);\n
+ \ Object.keys(formats).forEach((format2) => {\n this.scroll.formatAt(index2,
+ text2.length, format2, formats[format2]);\n });\n return this.update(new
+ Delta().retain(index2).insert(text2, cloneDeep(formats)));\n }\n isBlank()
+ {\n if (this.scroll.children.length === 0) return true;\n if (this.scroll.children.length
+ > 1) return false;\n const blot = this.scroll.children.head;\n if ((blot
+ == null ? void 0 : blot.statics.blotName) !== Block.blotName) return false;\n
+ \ const block2 = blot;\n if (block2.children.length > 1) return false;\n
+ \ return block2.children.head instanceof Break;\n }\n removeFormat(index2,
+ length) {\n const text2 = this.getText(index2, length);\n const [line,
+ offset] = this.scroll.line(index2 + length);\n let suffixLength = 0;\n
+ \ let suffix = new Delta();\n if (line != null) {\n suffixLength
+ = line.length() - offset;\n suffix = line.delta().slice(offset, offset
+ + suffixLength - 1).insert(\"\\n\");\n }\n const contents = this.getContents(index2,
+ length + suffixLength);\n const diff = contents.diff(new Delta().insert(text2).concat(suffix));\n
+ \ const delta = new Delta().retain(index2).concat(diff);\n return this.applyDelta(delta);\n
+ \ }\n update(change) {\n let mutations = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : [];\n let selectionInfo = arguments.length
+ > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;\n const oldDelta
+ = this.delta;\n if (mutations.length === 1 && mutations[0].type === \"characterData\"
+ && // @ts-expect-error Fix me later\n mutations[0].target.data.match(ASCII)
+ && this.scroll.find(mutations[0].target)) {\n const textBlot = this.scroll.find(mutations[0].target);\n
+ \ const formats = bubbleFormats(textBlot);\n const index2 = textBlot.offset(this.scroll);\n
+ \ const oldValue = mutations[0].oldValue.replace(Cursor.CONTENTS, \"\");\n
+ \ const oldText = new Delta().insert(oldValue);\n const newText =
+ new Delta().insert(textBlot.value());\n const relativeSelectionInfo =
+ selectionInfo && {\n oldRange: shiftRange$1(selectionInfo.oldRange,
+ -index2),\n newRange: shiftRange$1(selectionInfo.newRange, -index2)\n
+ \ };\n const diffDelta = new Delta().retain(index2).concat(oldText.diff(newText,
+ relativeSelectionInfo));\n change = diffDelta.reduce((delta, op) => {\n
+ \ if (op.insert) {\n return delta.insert(op.insert, formats);\n
+ \ }\n return delta.push(op);\n }, new Delta());\n this.delta
+ = oldDelta.compose(change);\n } else {\n this.delta = this.getDelta();\n
+ \ if (!change || !isEqual$1(oldDelta.compose(change), this.delta)) {\n
+ \ change = oldDelta.diff(this.delta, selectionInfo);\n }\n }\n
+ \ return change;\n }\n}\nfunction convertListHTML(items, lastIndent, types)
+ {\n if (items.length === 0) {\n const [endTag2] = getListType(types.pop());\n
+ \ if (lastIndent <= 0) {\n return `${endTag2}>`;\n }\n return
+ `${endTag2}>${convertListHTML([], lastIndent - 1, types)}`;\n }\n
+ \ const [{\n child,\n offset,\n length,\n indent,\n type\n
+ \ }, ...rest] = items;\n const [tag, attribute2] = getListType(type);\n if
+ (indent > lastIndent) {\n types.push(type);\n if (indent === lastIndent
+ + 1) {\n return `<${tag}>${convertHTML(child, offset,
+ length)}${convertListHTML(rest, indent, types)}`;\n }\n return `<${tag}>${convertListHTML(items,
+ lastIndent + 1, types)}`;\n }\n const previousType = types[types.length
+ - 1];\n if (indent === lastIndent && type === previousType) {\n return
+ `${convertHTML(child, offset, length)}${convertListHTML(rest,
+ indent, types)}`;\n }\n const [endTag] = getListType(types.pop());\n return
+ `${endTag}>${convertListHTML(items, lastIndent - 1, types)}`;\n}\nfunction
+ convertHTML(blot, index2, length) {\n let isRoot = arguments.length > 3 &&
+ arguments[3] !== void 0 ? arguments[3] : false;\n if (\"html\" in blot &&
+ typeof blot.html === \"function\") {\n return blot.html(index2, length);\n
+ \ }\n if (blot instanceof Text$1) {\n const escapedText = escapeText(blot.value().slice(index2,
+ index2 + length));\n return escapedText.replaceAll(\" \", \" \");\n
+ \ }\n if (blot instanceof ParentBlot$1) {\n if (blot.statics.blotName
+ === \"list-container\") {\n const items = [];\n blot.children.forEachAt(index2,
+ length, (child, offset, childLength) => {\n const formats = \"formats\"
+ in child && typeof child.formats === \"function\" ? child.formats() : {};\n
+ \ items.push({\n child,\n offset,\n length:
+ childLength,\n indent: formats.indent || 0,\n type: formats.list\n
+ \ });\n });\n return convertListHTML(items, -1, []);\n }\n
+ \ const parts = [];\n blot.children.forEachAt(index2, length, (child,
+ offset, childLength) => {\n parts.push(convertHTML(child, offset, childLength));\n
+ \ });\n if (isRoot || blot.statics.blotName === \"list\") {\n return
+ parts.join(\"\");\n }\n const {\n outerHTML,\n innerHTML\n
+ \ } = blot.domNode;\n const [start, end] = outerHTML.split(`>${innerHTML}<`);\n
+ \ if (start === \"${parts.join(\"\")}<${end}`;\n }\n return `${start}>${parts.join(\"\")}<${end}`;\n
+ \ }\n return blot.domNode instanceof Element ? blot.domNode.outerHTML : \"\";\n}\nfunction
+ combineFormats(formats, combined) {\n return Object.keys(combined).reduce((merged,
+ name) => {\n if (formats[name] == null) return merged;\n const combinedValue
+ = combined[name];\n if (combinedValue === formats[name]) {\n merged[name]
+ = combinedValue;\n } else if (Array.isArray(combinedValue)) {\n if
+ (combinedValue.indexOf(formats[name]) < 0) {\n merged[name] = combinedValue.concat([formats[name]]);\n
+ \ } else {\n merged[name] = combinedValue;\n }\n } else
+ {\n merged[name] = [combinedValue, formats[name]];\n }\n return
+ merged;\n }, {});\n}\nfunction getListType(type) {\n const tag = type ===
+ \"ordered\" ? \"ol\" : \"ul\";\n switch (type) {\n case \"checked\":\n
+ \ return [tag, ' data-list=\"checked\"'];\n case \"unchecked\":\n return
+ [tag, ' data-list=\"unchecked\"'];\n default:\n return [tag, \"\"];\n
+ \ }\n}\nfunction normalizeDelta(delta) {\n return delta.reduce((normalizedDelta,
+ op) => {\n if (typeof op.insert === \"string\") {\n const text2 =
+ op.insert.replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n return
+ normalizedDelta.insert(text2, op.attributes);\n }\n return normalizedDelta.push(op);\n
+ \ }, new Delta());\n}\nfunction shiftRange$1(_ref, amount) {\n let {\n index:
+ index2,\n length\n } = _ref;\n return new Range$1(index2 + amount, length);\n}\nfunction
+ splitOpLines(ops) {\n const split = [];\n ops.forEach((op) => {\n if
+ (typeof op.insert === \"string\") {\n const lines = op.insert.split(\"\\n\");\n
+ \ lines.forEach((line, index2) => {\n if (index2) split.push({\n
+ \ insert: \"\\n\",\n attributes: op.attributes\n });\n
+ \ if (line) split.push({\n insert: line,\n attributes:
+ op.attributes\n });\n });\n } else {\n split.push(op);\n
+ \ }\n });\n return split;\n}\nclass Module {\n constructor(quill) {\n
+ \ let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : {};\n this.quill = quill;\n this.options = options;\n }\n}\n__publicField(Module,
+ \"DEFAULTS\", {});\nconst GUARD_TEXT = \"\\uFEFF\";\nclass Embed extends EmbedBlot$1
+ {\n constructor(scroll, node) {\n super(scroll, node);\n this.contentNode
+ = document.createElement(\"span\");\n this.contentNode.setAttribute(\"contenteditable\",
+ \"false\");\n Array.from(this.domNode.childNodes).forEach((childNode) =>
+ {\n this.contentNode.appendChild(childNode);\n });\n this.leftGuard
+ = document.createTextNode(GUARD_TEXT);\n this.rightGuard = document.createTextNode(GUARD_TEXT);\n
+ \ this.domNode.appendChild(this.leftGuard);\n this.domNode.appendChild(this.contentNode);\n
+ \ this.domNode.appendChild(this.rightGuard);\n }\n index(node, offset)
+ {\n if (node === this.leftGuard) return 0;\n if (node === this.rightGuard)
+ return 1;\n return super.index(node, offset);\n }\n restore(node) {\n
+ \ let range = null;\n let textNode;\n const text2 = node.data.split(GUARD_TEXT).join(\"\");\n
+ \ if (node === this.leftGuard) {\n if (this.prev instanceof Text$1)
+ {\n const prevLength = this.prev.length();\n this.prev.insertAt(prevLength,
+ text2);\n range = {\n startNode: this.prev.domNode,\n startOffset:
+ prevLength + text2.length\n };\n } else {\n textNode =
+ document.createTextNode(text2);\n this.parent.insertBefore(this.scroll.create(textNode),
+ this);\n range = {\n startNode: textNode,\n startOffset:
+ text2.length\n };\n }\n } else if (node === this.rightGuard)
+ {\n if (this.next instanceof Text$1) {\n this.next.insertAt(0,
+ text2);\n range = {\n startNode: this.next.domNode,\n startOffset:
+ text2.length\n };\n } else {\n textNode = document.createTextNode(text2);\n
+ \ this.parent.insertBefore(this.scroll.create(textNode), this.next);\n
+ \ range = {\n startNode: textNode,\n startOffset:
+ text2.length\n };\n }\n }\n node.data = GUARD_TEXT;\n return
+ range;\n }\n update(mutations, context) {\n mutations.forEach((mutation)
+ => {\n if (mutation.type === \"characterData\" && (mutation.target ===
+ this.leftGuard || mutation.target === this.rightGuard)) {\n const range
+ = this.restore(mutation.target);\n if (range) context.range = range;\n
+ \ }\n });\n }\n}\nclass Composition {\n constructor(scroll, emitter)
+ {\n __publicField(this, \"isComposing\", false);\n this.scroll = scroll;\n
+ \ this.emitter = emitter;\n this.setupListeners();\n }\n setupListeners()
+ {\n this.scroll.domNode.addEventListener(\"compositionstart\", (event)
+ => {\n if (!this.isComposing) {\n this.handleCompositionStart(event);\n
+ \ }\n });\n this.scroll.domNode.addEventListener(\"compositionend\",
+ (event) => {\n if (this.isComposing) {\n queueMicrotask(() =>
+ {\n this.handleCompositionEnd(event);\n });\n }\n });\n
+ \ }\n handleCompositionStart(event) {\n const blot = event.target instanceof
+ Node ? this.scroll.find(event.target, true) : null;\n if (blot && !(blot
+ instanceof Embed)) {\n this.emitter.emit(Emitter.events.COMPOSITION_BEFORE_START,
+ event);\n this.scroll.batchStart();\n this.emitter.emit(Emitter.events.COMPOSITION_START,
+ event);\n this.isComposing = true;\n }\n }\n handleCompositionEnd(event)
+ {\n this.emitter.emit(Emitter.events.COMPOSITION_BEFORE_END, event);\n
+ \ this.scroll.batchEnd();\n this.emitter.emit(Emitter.events.COMPOSITION_END,
+ event);\n this.isComposing = false;\n }\n}\nconst _Theme = class _Theme
+ {\n constructor(quill, options) {\n __publicField(this, \"modules\", {});\n
+ \ this.quill = quill;\n this.options = options;\n }\n init() {\n Object.keys(this.options.modules).forEach((name)
+ => {\n if (this.modules[name] == null) {\n this.addModule(name);\n
+ \ }\n });\n }\n addModule(name) {\n const ModuleClass = this.quill.constructor.import(`modules/${name}`);\n
+ \ this.modules[name] = new ModuleClass(this.quill, this.options.modules[name]
+ || {});\n return this.modules[name];\n }\n};\n__publicField(_Theme, \"DEFAULTS\",
+ {\n modules: {}\n});\n__publicField(_Theme, \"themes\", {\n default: _Theme\n});\nlet
+ Theme = _Theme;\nconst getParentElement = (element) => element.parentElement
+ || element.getRootNode().host || null;\nconst getElementRect = (element) =>
+ {\n const rect = element.getBoundingClientRect();\n const scaleX = \"offsetWidth\"
+ in element && Math.abs(rect.width) / element.offsetWidth || 1;\n const scaleY
+ = \"offsetHeight\" in element && Math.abs(rect.height) / element.offsetHeight
+ || 1;\n return {\n top: rect.top,\n right: rect.left + element.clientWidth
+ * scaleX,\n bottom: rect.top + element.clientHeight * scaleY,\n left:
+ rect.left\n };\n};\nconst paddingValueToInt = (value) => {\n const number
+ = parseInt(value, 10);\n return Number.isNaN(number) ? 0 : number;\n};\nconst
+ getScrollDistance = (targetStart, targetEnd, scrollStart, scrollEnd, scrollPaddingStart,
+ scrollPaddingEnd) => {\n if (targetStart < scrollStart && targetEnd > scrollEnd)
+ {\n return 0;\n }\n if (targetStart < scrollStart) {\n return -(scrollStart
+ - targetStart + scrollPaddingStart);\n }\n if (targetEnd > scrollEnd) {\n
+ \ return targetEnd - targetStart > scrollEnd - scrollStart ? targetStart
+ + scrollPaddingStart - scrollStart : targetEnd - scrollEnd + scrollPaddingEnd;\n
+ \ }\n return 0;\n};\nconst scrollRectIntoView = (root2, targetRect) => {\n
+ \ var _a3, _b, _c;\n const document2 = root2.ownerDocument;\n let rect =
+ targetRect;\n let current = root2;\n while (current) {\n const isDocumentBody
+ = current === document2.body;\n const bounding = isDocumentBody ? {\n top:
+ 0,\n right: ((_a3 = window.visualViewport) == null ? void 0 : _a3.width)
+ ?? document2.documentElement.clientWidth,\n bottom: ((_b = window.visualViewport)
+ == null ? void 0 : _b.height) ?? document2.documentElement.clientHeight,\n
+ \ left: 0\n } : getElementRect(current);\n const style = getComputedStyle(current);\n
+ \ const scrollDistanceX = getScrollDistance(rect.left, rect.right, bounding.left,
+ bounding.right, paddingValueToInt(style.scrollPaddingLeft), paddingValueToInt(style.scrollPaddingRight));\n
+ \ const scrollDistanceY = getScrollDistance(rect.top, rect.bottom, bounding.top,
+ bounding.bottom, paddingValueToInt(style.scrollPaddingTop), paddingValueToInt(style.scrollPaddingBottom));\n
+ \ if (scrollDistanceX || scrollDistanceY) {\n if (isDocumentBody) {\n
+ \ (_c = document2.defaultView) == null ? void 0 : _c.scrollBy(scrollDistanceX,
+ scrollDistanceY);\n } else {\n const {\n scrollLeft,\n
+ \ scrollTop\n } = current;\n if (scrollDistanceY) {\n
+ \ current.scrollTop += scrollDistanceY;\n }\n if (scrollDistanceX)
+ {\n current.scrollLeft += scrollDistanceX;\n }\n const
+ scrolledLeft = current.scrollLeft - scrollLeft;\n const scrolledTop
+ = current.scrollTop - scrollTop;\n rect = {\n left: rect.left
+ - scrolledLeft,\n top: rect.top - scrolledTop,\n right:
+ rect.right - scrolledLeft,\n bottom: rect.bottom - scrolledTop\n
+ \ };\n }\n }\n current = isDocumentBody || style.position
+ === \"fixed\" ? null : getParentElement(current);\n }\n};\nconst MAX_REGISTER_ITERATIONS
+ = 100;\nconst CORE_FORMATS = [\"block\", \"break\", \"cursor\", \"inline\",
+ \"scroll\", \"text\"];\nconst createRegistryWithFormats = (formats, sourceRegistry,
+ debug2) => {\n const registry = new Registry();\n CORE_FORMATS.forEach((name)
+ => {\n const coreBlot = sourceRegistry.query(name);\n if (coreBlot)
+ registry.register(coreBlot);\n });\n formats.forEach((name) => {\n let
+ format2 = sourceRegistry.query(name);\n if (!format2) {\n debug2.error(`Cannot
+ register \"${name}\" specified in \"formats\" config. Are you sure it was
+ registered?`);\n }\n let iterations = 0;\n while (format2) {\n registry.register(format2);\n
+ \ format2 = \"blotName\" in format2 ? format2.requiredContainer ?? null
+ : null;\n iterations += 1;\n if (iterations > MAX_REGISTER_ITERATIONS)
+ {\n debug2.error(`Cycle detected in registering blot requiredContainer:
+ \"${name}\"`);\n break;\n }\n }\n });\n return registry;\n};\nconst
+ debug$3 = namespace(\"quill\");\nconst globalRegistry = new Registry();\nParentBlot$1.uiClass
+ = \"ql-ui\";\nconst _Quill = class _Quill {\n static debug(limit) {\n if
+ (limit === true) {\n limit = \"log\";\n }\n namespace.level(limit);\n
+ \ }\n static find(node) {\n let bubble = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : false;\n return instances.get(node) || globalRegistry.find(node,
+ bubble);\n }\n static import(name) {\n if (this.imports[name] == null)
+ {\n debug$3.error(`Cannot import ${name}. Are you sure it was registered?`);\n
+ \ }\n return this.imports[name];\n }\n static register() {\n if
+ (typeof (arguments.length <= 0 ? void 0 : arguments[0]) !== \"string\") {\n
+ \ const target = arguments.length <= 0 ? void 0 : arguments[0];\n const
+ overwrite = !!(arguments.length <= 1 ? void 0 : arguments[1]);\n const
+ name = \"attrName\" in target ? target.attrName : target.blotName;\n if
+ (typeof name === \"string\") {\n this.register(`formats/${name}`, target,
+ overwrite);\n } else {\n Object.keys(target).forEach((key) =>
+ {\n this.register(key, target[key], overwrite);\n });\n }\n
+ \ } else {\n const path = arguments.length <= 0 ? void 0 : arguments[0];\n
+ \ const target = arguments.length <= 1 ? void 0 : arguments[1];\n const
+ overwrite = !!(arguments.length <= 2 ? void 0 : arguments[2]);\n if (this.imports[path]
+ != null && !overwrite) {\n debug$3.warn(`Overwriting ${path} with`,
+ target);\n }\n this.imports[path] = target;\n if ((path.startsWith(\"blots/\")
+ || path.startsWith(\"formats/\")) && target && typeof target !== \"boolean\"
+ && target.blotName !== \"abstract\") {\n globalRegistry.register(target);\n
+ \ }\n if (typeof target.register === \"function\") {\n target.register(globalRegistry);\n
+ \ }\n }\n }\n constructor(container) {\n let options = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n this.options = expandConfig(container,
+ options);\n this.container = this.options.container;\n if (this.container
+ == null) {\n debug$3.error(\"Invalid Quill container\", container);\n
+ \ return;\n }\n if (this.options.debug) {\n _Quill.debug(this.options.debug);\n
+ \ }\n const html = this.container.innerHTML.trim();\n this.container.classList.add(\"ql-container\");\n
+ \ this.container.innerHTML = \"\";\n instances.set(this.container, this);\n
+ \ this.root = this.addContainer(\"ql-editor\");\n this.root.classList.add(\"ql-blank\");\n
+ \ this.emitter = new Emitter();\n const scrollBlotName = ScrollBlot$1.blotName;\n
+ \ const ScrollBlot2 = this.options.registry.query(scrollBlotName);\n if
+ (!ScrollBlot2 || !(\"blotName\" in ScrollBlot2)) {\n throw new Error(`Cannot
+ initialize Quill without \"${scrollBlotName}\" blot`);\n }\n this.scroll
+ = new ScrollBlot2(this.options.registry, this.root, {\n emitter: this.emitter\n
+ \ });\n this.editor = new Editor(this.scroll);\n this.selection =
+ new Selection(this.scroll, this.emitter);\n this.composition = new Composition(this.scroll,
+ this.emitter);\n this.theme = new this.options.theme(this, this.options);\n
+ \ this.keyboard = this.theme.addModule(\"keyboard\");\n this.clipboard
+ = this.theme.addModule(\"clipboard\");\n this.history = this.theme.addModule(\"history\");\n
+ \ this.uploader = this.theme.addModule(\"uploader\");\n this.theme.addModule(\"input\");\n
+ \ this.theme.addModule(\"uiNode\");\n this.theme.init();\n this.emitter.on(Emitter.events.EDITOR_CHANGE,
+ (type) => {\n if (type === Emitter.events.TEXT_CHANGE) {\n this.root.classList.toggle(\"ql-blank\",
+ this.editor.isBlank());\n }\n });\n this.emitter.on(Emitter.events.SCROLL_UPDATE,
+ (source, mutations) => {\n const oldRange = this.selection.lastRange;\n
+ \ const [newRange] = this.selection.getRange();\n const selectionInfo
+ = oldRange && newRange ? {\n oldRange,\n newRange\n } :
+ void 0;\n modify.call(this, () => this.editor.update(null, mutations,
+ selectionInfo), source);\n });\n this.emitter.on(Emitter.events.SCROLL_EMBED_UPDATE,
+ (blot, delta) => {\n const oldRange = this.selection.lastRange;\n const
+ [newRange] = this.selection.getRange();\n const selectionInfo = oldRange
+ && newRange ? {\n oldRange,\n newRange\n } : void 0;\n
+ \ modify.call(this, () => {\n const change = new Delta().retain(blot.offset(this)).retain({\n
+ \ [blot.statics.blotName]: delta\n });\n return this.editor.update(change,
+ [], selectionInfo);\n }, _Quill.sources.USER);\n });\n if (html)
+ {\n const contents = this.clipboard.convert({\n html: `${html}
`,\n
+ \ text: \"\\n\"\n });\n this.setContents(contents);\n }\n
+ \ this.history.clear();\n if (this.options.placeholder) {\n this.root.setAttribute(\"data-placeholder\",
+ this.options.placeholder);\n }\n if (this.options.readOnly) {\n this.disable();\n
+ \ }\n this.allowReadOnlyEdits = false;\n }\n addContainer(container)
+ {\n let refNode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : null;\n if (typeof container === \"string\") {\n const className
+ = container;\n container = document.createElement(\"div\");\n container.classList.add(className);\n
+ \ }\n this.container.insertBefore(container, refNode);\n return container;\n
+ \ }\n blur() {\n this.selection.setRange(null);\n }\n deleteText(index2,
+ length, source) {\n [index2, length, , source] = overload(index2, length,
+ source);\n return modify.call(this, () => {\n return this.editor.deleteText(index2,
+ length);\n }, source, index2, -1 * length);\n }\n disable() {\n this.enable(false);\n
+ \ }\n editReadOnly(modifier) {\n this.allowReadOnlyEdits = true;\n const
+ value = modifier();\n this.allowReadOnlyEdits = false;\n return value;\n
+ \ }\n enable() {\n let enabled = arguments.length > 0 && arguments[0]
+ !== void 0 ? arguments[0] : true;\n this.scroll.enable(enabled);\n this.container.classList.toggle(\"ql-disabled\",
+ !enabled);\n }\n focus() {\n let options = arguments.length > 0 && arguments[0]
+ !== void 0 ? arguments[0] : {};\n this.selection.focus();\n if (!options.preventScroll)
+ {\n this.scrollSelectionIntoView();\n }\n }\n format(name, value)
+ {\n let source = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2]
+ : Emitter.sources.API;\n return modify.call(this, () => {\n const
+ range = this.getSelection(true);\n let change = new Delta();\n if
+ (range == null) return change;\n if (this.scroll.query(name, Scope.BLOCK))
+ {\n change = this.editor.formatLine(range.index, range.length, {\n
+ \ [name]: value\n });\n } else if (range.length === 0)
+ {\n this.selection.format(name, value);\n return change;\n }
+ else {\n change = this.editor.formatText(range.index, range.length,
+ {\n [name]: value\n });\n }\n this.setSelection(range,
+ Emitter.sources.SILENT);\n return change;\n }, source);\n }\n formatLine(index2,
+ length, name, value, source) {\n let formats;\n [index2, length, formats,
+ source] = overload(\n index2,\n length,\n // @ts-expect-error\n
+ \ name,\n value,\n source\n );\n return modify.call(this,
+ () => {\n return this.editor.formatLine(index2, length, formats);\n },
+ source, index2, 0);\n }\n formatText(index2, length, name, value, source)
+ {\n let formats;\n [index2, length, formats, source] = overload(\n //
+ @ts-expect-error\n index2,\n length,\n name,\n value,\n
+ \ source\n );\n return modify.call(this, () => {\n return this.editor.formatText(index2,
+ length, formats);\n }, source, index2, 0);\n }\n getBounds(index2) {\n
+ \ let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : 0;\n let bounds = null;\n if (typeof index2 === \"number\") {\n bounds
+ = this.selection.getBounds(index2, length);\n } else {\n bounds =
+ this.selection.getBounds(index2.index, index2.length);\n }\n if (!bounds)
+ return null;\n const containerBounds = this.container.getBoundingClientRect();\n
+ \ return {\n bottom: bounds.bottom - containerBounds.top,\n height:
+ bounds.height,\n left: bounds.left - containerBounds.left,\n right:
+ bounds.right - containerBounds.left,\n top: bounds.top - containerBounds.top,\n
+ \ width: bounds.width\n };\n }\n getContents() {\n let index2
+ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n let
+ length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
+ this.getLength() - index2;\n [index2, length] = overload(index2, length);\n
+ \ return this.editor.getContents(index2, length);\n }\n getFormat() {\n
+ \ let index2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : this.getSelection(true);\n let length = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : 0;\n if (typeof index2 === \"number\") {\n
+ \ return this.editor.getFormat(index2, length);\n }\n return this.editor.getFormat(index2.index,
+ index2.length);\n }\n getIndex(blot) {\n return blot.offset(this.scroll);\n
+ \ }\n getLength() {\n return this.scroll.length();\n }\n getLeaf(index2)
+ {\n return this.scroll.leaf(index2);\n }\n getLine(index2) {\n return
+ this.scroll.line(index2);\n }\n getLines() {\n let index2 = arguments.length
+ > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n let length = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE;\n if
+ (typeof index2 !== \"number\") {\n return this.scroll.lines(index2.index,
+ index2.length);\n }\n return this.scroll.lines(index2, length);\n }\n
+ \ getModule(name) {\n return this.theme.modules[name];\n }\n getSelection()
+ {\n let focus = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : false;\n if (focus) this.focus();\n this.update();\n return this.selection.getRange()[0];\n
+ \ }\n getSemanticHTML() {\n let index2 = arguments.length > 0 && arguments[0]
+ !== void 0 ? arguments[0] : 0;\n let length = arguments.length > 1 ? arguments[1]
+ : void 0;\n if (typeof index2 === \"number\") {\n length = length
+ ?? this.getLength() - index2;\n }\n [index2, length] = overload(index2,
+ length);\n return this.editor.getHTML(index2, length);\n }\n getText()
+ {\n let index2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : 0;\n let length = arguments.length > 1 ? arguments[1] : void 0;\n if
+ (typeof index2 === \"number\") {\n length = length ?? this.getLength()
+ - index2;\n }\n [index2, length] = overload(index2, length);\n return
+ this.editor.getText(index2, length);\n }\n hasFocus() {\n return this.selection.hasFocus();\n
+ \ }\n insertEmbed(index2, embed, value) {\n let source = arguments.length
+ > 3 && arguments[3] !== void 0 ? arguments[3] : _Quill.sources.API;\n return
+ modify.call(this, () => {\n return this.editor.insertEmbed(index2, embed,
+ value);\n }, source, index2);\n }\n insertText(index2, text2, name, value,
+ source) {\n let formats;\n [index2, , formats, source] = overload(index2,
+ 0, name, value, source);\n return modify.call(this, () => {\n return
+ this.editor.insertText(index2, text2, formats);\n }, source, index2, text2.length);\n
+ \ }\n isEnabled() {\n return this.scroll.isEnabled();\n }\n off() {\n
+ \ return this.emitter.off(...arguments);\n }\n on() {\n return this.emitter.on(...arguments);\n
+ \ }\n once() {\n return this.emitter.once(...arguments);\n }\n removeFormat(index2,
+ length, source) {\n [index2, length, , source] = overload(index2, length,
+ source);\n return modify.call(this, () => {\n return this.editor.removeFormat(index2,
+ length);\n }, source, index2);\n }\n scrollRectIntoView(rect) {\n scrollRectIntoView(this.root,
+ rect);\n }\n /**\n * @deprecated Use Quill#scrollSelectionIntoView() instead.\n
+ \ */\n scrollIntoView() {\n console.warn(\"Quill#scrollIntoView() has
+ been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView()
+ instead.\");\n this.scrollSelectionIntoView();\n }\n /**\n * Scroll
+ the current selection into the visible area.\n * If the selection is already
+ visible, no scrolling will occur.\n */\n scrollSelectionIntoView() {\n
+ \ const range = this.selection.lastRange;\n const bounds = range && this.selection.getBounds(range.index,
+ range.length);\n if (bounds) {\n this.scrollRectIntoView(bounds);\n
+ \ }\n }\n setContents(delta) {\n let source = arguments.length > 1
+ && arguments[1] !== void 0 ? arguments[1] : Emitter.sources.API;\n return
+ modify.call(this, () => {\n delta = new Delta(delta);\n const length
+ = this.getLength();\n const delete1 = this.editor.deleteText(0, length);\n
+ \ const applied = this.editor.insertContents(0, delta);\n const delete2
+ = this.editor.deleteText(this.getLength() - 1, 1);\n return delete1.compose(applied).compose(delete2);\n
+ \ }, source);\n }\n setSelection(index2, length, source) {\n if (index2
+ == null) {\n this.selection.setRange(null, length || _Quill.sources.API);\n
+ \ } else {\n [index2, length, , source] = overload(index2, length,
+ source);\n this.selection.setRange(new Range$1(Math.max(0, index2), length),
+ source);\n if (source !== Emitter.sources.SILENT) {\n this.scrollSelectionIntoView();\n
+ \ }\n }\n }\n setText(text2) {\n let source = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : Emitter.sources.API;\n const
+ delta = new Delta().insert(text2);\n return this.setContents(delta, source);\n
+ \ }\n update() {\n let source = arguments.length > 0 && arguments[0] !==
+ void 0 ? arguments[0] : Emitter.sources.USER;\n const change = this.scroll.update(source);\n
+ \ this.selection.update(source);\n return change;\n }\n updateContents(delta)
+ {\n let source = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : Emitter.sources.API;\n return modify.call(this, () => {\n delta
+ = new Delta(delta);\n return this.editor.applyDelta(delta);\n }, source,
+ true);\n }\n};\n__publicField(_Quill, \"DEFAULTS\", {\n bounds: null,\n
+ \ modules: {\n clipboard: true,\n keyboard: true,\n history: true,\n
+ \ uploader: true\n },\n placeholder: \"\",\n readOnly: false,\n registry:
+ globalRegistry,\n theme: \"default\"\n});\n__publicField(_Quill, \"events\",
+ Emitter.events);\n__publicField(_Quill, \"sources\", Emitter.sources);\n__publicField(_Quill,
+ \"version\", \"2.0.3\");\n__publicField(_Quill, \"imports\", {\n delta: Delta,\n
+ \ parchment: Parchment,\n \"core/module\": Module,\n \"core/theme\": Theme\n});\nlet
+ Quill = _Quill;\nfunction resolveSelector(selector) {\n return typeof selector
+ === \"string\" ? document.querySelector(selector) : selector;\n}\nfunction
+ expandModuleConfig(config2) {\n return Object.entries(config2 ?? {}).reduce((expanded,
+ _ref) => {\n let [key, value] = _ref;\n return {\n ...expanded,\n
+ \ [key]: value === true ? {} : value\n };\n }, {});\n}\nfunction omitUndefinedValuesFromOptions(obj)
+ {\n return Object.fromEntries(Object.entries(obj).filter((entry) => entry[1]
+ !== void 0));\n}\nfunction expandConfig(containerOrSelector, options) {\n
+ \ const container = resolveSelector(containerOrSelector);\n if (!container)
+ {\n throw new Error(\"Invalid Quill container\");\n }\n const shouldUseDefaultTheme
+ = !options.theme || options.theme === Quill.DEFAULTS.theme;\n const theme2
+ = shouldUseDefaultTheme ? Theme : Quill.import(`themes/${options.theme}`);\n
+ \ if (!theme2) {\n throw new Error(`Invalid theme ${options.theme}. Did
+ you register it?`);\n }\n const {\n modules: quillModuleDefaults,\n ...quillDefaults\n
+ \ } = Quill.DEFAULTS;\n const {\n modules: themeModuleDefaults,\n ...themeDefaults\n
+ \ } = theme2.DEFAULTS;\n let userModuleOptions = expandModuleConfig(options.modules);\n
+ \ if (userModuleOptions != null && userModuleOptions.toolbar && userModuleOptions.toolbar.constructor
+ !== Object) {\n userModuleOptions = {\n ...userModuleOptions,\n toolbar:
+ {\n container: userModuleOptions.toolbar\n }\n };\n }\n const
+ modules = merge({}, expandModuleConfig(quillModuleDefaults), expandModuleConfig(themeModuleDefaults),
+ userModuleOptions);\n const config2 = {\n ...quillDefaults,\n ...omitUndefinedValuesFromOptions(themeDefaults),\n
+ \ ...omitUndefinedValuesFromOptions(options)\n };\n let registry = options.registry;\n
+ \ if (registry) {\n if (options.formats) {\n debug$3.warn('Ignoring
+ \"formats\" option because \"registry\" is specified');\n }\n } else {\n
+ \ registry = options.formats ? createRegistryWithFormats(options.formats,
+ config2.registry, debug$3) : config2.registry;\n }\n return {\n ...config2,\n
+ \ registry,\n container,\n theme: theme2,\n modules: Object.entries(modules).reduce((modulesWithDefaults,
+ _ref2) => {\n let [name, value] = _ref2;\n if (!value) return modulesWithDefaults;\n
+ \ const moduleClass = Quill.import(`modules/${name}`);\n if (moduleClass
+ == null) {\n debug$3.error(`Cannot load ${name} module. Are you sure
+ you registered it?`);\n return modulesWithDefaults;\n }\n return
+ {\n ...modulesWithDefaults,\n // @ts-expect-error\n [name]:
+ merge({}, moduleClass.DEFAULTS || {}, value)\n };\n }, {}),\n bounds:
+ resolveSelector(config2.bounds)\n };\n}\nfunction modify(modifier, source,
+ index2, shift) {\n if (!this.isEnabled() && source === Emitter.sources.USER
+ && !this.allowReadOnlyEdits) {\n return new Delta();\n }\n let range
+ = index2 == null ? null : this.getSelection();\n const oldDelta = this.editor.delta;\n
+ \ const change = modifier();\n if (range != null) {\n if (index2 === true)
+ {\n index2 = range.index;\n }\n if (shift == null) {\n range
+ = shiftRange(range, change, source);\n } else if (shift !== 0) {\n range
+ = shiftRange(range, index2, shift, source);\n }\n this.setSelection(range,
+ Emitter.sources.SILENT);\n }\n if (change.length() > 0) {\n const args
+ = [Emitter.events.TEXT_CHANGE, change, oldDelta, source];\n this.emitter.emit(Emitter.events.EDITOR_CHANGE,
+ ...args);\n if (source !== Emitter.sources.SILENT) {\n this.emitter.emit(...args);\n
+ \ }\n }\n return change;\n}\nfunction overload(index2, length, name, value,
+ source) {\n let formats = {};\n if (typeof index2.index === \"number\" &&
+ typeof index2.length === \"number\") {\n if (typeof length !== \"number\")
+ {\n source = value;\n value = name;\n name = length;\n length
+ = index2.length;\n index2 = index2.index;\n } else {\n length
+ = index2.length;\n index2 = index2.index;\n }\n } else if (typeof
+ length !== \"number\") {\n source = value;\n value = name;\n name
+ = length;\n length = 0;\n }\n if (typeof name === \"object\") {\n formats
+ = name;\n source = value;\n } else if (typeof name === \"string\") {\n
+ \ if (value != null) {\n formats[name] = value;\n } else {\n source
+ = name;\n }\n }\n source = source || Emitter.sources.API;\n return [index2,
+ length, formats, source];\n}\nfunction shiftRange(range, index2, lengthOrSource,
+ source) {\n const length = typeof lengthOrSource === \"number\" ? lengthOrSource
+ : 0;\n if (range == null) return null;\n let start;\n let end;\n if (index2
+ && typeof index2.transformPosition === \"function\") {\n [start, end] =
+ [range.index, range.index + range.length].map((pos) => (\n // @ts-expect-error
+ -- TODO: add a better type guard around `index`\n index2.transformPosition(pos,
+ source !== Emitter.sources.USER)\n ));\n } else {\n [start, end] =
+ [range.index, range.index + range.length].map((pos) => {\n if (pos <
+ index2 || pos === index2 && source === Emitter.sources.USER) return pos;\n
+ \ if (length >= 0) {\n return pos + length;\n }\n return
+ Math.max(index2, pos + length);\n });\n }\n return new Range$1(start,
+ end - start);\n}\nclass Container extends ContainerBlot$1 {\n}\nfunction isLine$1(blot)
+ {\n return blot instanceof Block || blot instanceof BlockEmbed;\n}\nfunction
+ isUpdatable(blot) {\n return typeof blot.updateContent === \"function\";\n}\nclass
+ Scroll extends ScrollBlot$1 {\n constructor(registry, domNode, _ref) {\n
+ \ let {\n emitter\n } = _ref;\n super(registry, domNode);\n this.emitter
+ = emitter;\n this.batch = false;\n this.optimize();\n this.enable();\n
+ \ this.domNode.addEventListener(\"dragstart\", (e2) => this.handleDragStart(e2));\n
+ \ }\n batchStart() {\n if (!Array.isArray(this.batch)) {\n this.batch
+ = [];\n }\n }\n batchEnd() {\n if (!this.batch) return;\n const
+ mutations = this.batch;\n this.batch = false;\n this.update(mutations);\n
+ \ }\n emitMount(blot) {\n this.emitter.emit(Emitter.events.SCROLL_BLOT_MOUNT,
+ blot);\n }\n emitUnmount(blot) {\n this.emitter.emit(Emitter.events.SCROLL_BLOT_UNMOUNT,
+ blot);\n }\n emitEmbedUpdate(blot, change) {\n this.emitter.emit(Emitter.events.SCROLL_EMBED_UPDATE,
+ blot, change);\n }\n deleteAt(index2, length) {\n const [first, offset]
+ = this.line(index2);\n const [last] = this.line(index2 + length);\n super.deleteAt(index2,
+ length);\n if (last != null && first !== last && offset > 0) {\n if
+ (first instanceof BlockEmbed || last instanceof BlockEmbed) {\n this.optimize();\n
+ \ return;\n }\n const ref = last.children.head instanceof
+ Break ? null : last.children.head;\n first.moveChildren(last, ref);\n
+ \ first.remove();\n }\n this.optimize();\n }\n enable() {\n let
+ enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
+ true;\n this.domNode.setAttribute(\"contenteditable\", enabled ? \"true\"
+ : \"false\");\n }\n formatAt(index2, length, format2, value) {\n super.formatAt(index2,
+ length, format2, value);\n this.optimize();\n }\n insertAt(index2, value,
+ def) {\n if (index2 >= this.length()) {\n if (def == null || this.scroll.query(value,
+ Scope.BLOCK) == null) {\n const blot = this.scroll.create(this.statics.defaultChild.blotName);\n
+ \ this.appendChild(blot);\n if (def == null && value.endsWith(\"\\n\"))
+ {\n blot.insertAt(0, value.slice(0, -1), def);\n } else {\n
+ \ blot.insertAt(0, value, def);\n }\n } else {\n const
+ embed = this.scroll.create(value, def);\n this.appendChild(embed);\n
+ \ }\n } else {\n super.insertAt(index2, value, def);\n }\n
+ \ this.optimize();\n }\n insertBefore(blot, ref) {\n if (blot.statics.scope
+ === Scope.INLINE_BLOT) {\n const wrapper = this.scroll.create(this.statics.defaultChild.blotName);\n
+ \ wrapper.appendChild(blot);\n super.insertBefore(wrapper, ref);\n
+ \ } else {\n super.insertBefore(blot, ref);\n }\n }\n insertContents(index2,
+ delta) {\n const renderBlocks = this.deltaToRenderBlocks(delta.concat(new
+ Delta().insert(\"\\n\")));\n const last = renderBlocks.pop();\n if (last
+ == null) return;\n this.batchStart();\n const first = renderBlocks.shift();\n
+ \ if (first) {\n const shouldInsertNewlineChar = first.type === \"block\"
+ && (first.delta.length() === 0 || !this.descendant(BlockEmbed, index2)[0]
+ && index2 < this.length());\n const delta2 = first.type === \"block\"
+ ? first.delta : new Delta().insert({\n [first.key]: first.value\n });\n
+ \ insertInlineContents(this, index2, delta2);\n const newlineCharLength
+ = first.type === \"block\" ? 1 : 0;\n const lineEndIndex = index2 + delta2.length()
+ + newlineCharLength;\n if (shouldInsertNewlineChar) {\n this.insertAt(lineEndIndex
+ - 1, \"\\n\");\n }\n const formats = bubbleFormats(this.line(index2)[0]);\n
+ \ const attributes = DeltaExports.AttributeMap.diff(formats, first.attributes)
+ || {};\n Object.keys(attributes).forEach((name) => {\n this.formatAt(lineEndIndex
+ - 1, 1, name, attributes[name]);\n });\n index2 = lineEndIndex;\n
+ \ }\n let [refBlot, refBlotOffset] = this.children.find(index2);\n if
+ (renderBlocks.length) {\n if (refBlot) {\n refBlot = refBlot.split(refBlotOffset);\n
+ \ refBlotOffset = 0;\n }\n renderBlocks.forEach((renderBlock)
+ => {\n if (renderBlock.type === \"block\") {\n const block2
+ = this.createBlock(renderBlock.attributes, refBlot || void 0);\n insertInlineContents(block2,
+ 0, renderBlock.delta);\n } else {\n const blockEmbed = this.create(renderBlock.key,
+ renderBlock.value);\n this.insertBefore(blockEmbed, refBlot || void
+ 0);\n Object.keys(renderBlock.attributes).forEach((name) => {\n blockEmbed.format(name,
+ renderBlock.attributes[name]);\n });\n }\n });\n }\n
+ \ if (last.type === \"block\" && last.delta.length()) {\n const offset
+ = refBlot ? refBlot.offset(refBlot.scroll) + refBlotOffset : this.length();\n
+ \ insertInlineContents(this, offset, last.delta);\n }\n this.batchEnd();\n
+ \ this.optimize();\n }\n isEnabled() {\n return this.domNode.getAttribute(\"contenteditable\")
+ === \"true\";\n }\n leaf(index2) {\n const last = this.path(index2).pop();\n
+ \ if (!last) {\n return [null, -1];\n }\n const [blot, offset]
+ = last;\n return blot instanceof LeafBlot$1 ? [blot, offset] : [null, -1];\n
+ \ }\n line(index2) {\n if (index2 === this.length()) {\n return this.line(index2
+ - 1);\n }\n return this.descendant(isLine$1, index2);\n }\n lines()
+ {\n let index2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : 0;\n let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1]
+ : Number.MAX_VALUE;\n const getLines2 = (blot, blotIndex, blotLength) =>
+ {\n let lines = [];\n let lengthLeft = blotLength;\n blot.children.forEachAt(blotIndex,
+ blotLength, (child, childIndex, childLength) => {\n if (isLine$1(child))
+ {\n lines.push(child);\n } else if (child instanceof ContainerBlot$1)
+ {\n lines = lines.concat(getLines2(child, childIndex, lengthLeft));\n
+ \ }\n lengthLeft -= childLength;\n });\n return lines;\n
+ \ };\n return getLines2(this, index2, length);\n }\n optimize() {\n
+ \ let mutations = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : [];\n let context = arguments.length > 1 && arguments[1] !== void 0 ?
+ arguments[1] : {};\n if (this.batch) return;\n super.optimize(mutations,
+ context);\n if (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_OPTIMIZE,
+ mutations, context);\n }\n }\n path(index2) {\n return super.path(index2).slice(1);\n
+ \ }\n remove() {\n }\n update(mutations) {\n if (this.batch) {\n if
+ (Array.isArray(mutations)) {\n this.batch = this.batch.concat(mutations);\n
+ \ }\n return;\n }\n let source = Emitter.sources.USER;\n if
+ (typeof mutations === \"string\") {\n source = mutations;\n }\n if
+ (!Array.isArray(mutations)) {\n mutations = this.observer.takeRecords();\n
+ \ }\n mutations = mutations.filter((_ref2) => {\n let {\n target\n
+ \ } = _ref2;\n const blot = this.find(target, true);\n return
+ blot && !isUpdatable(blot);\n });\n if (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_BEFORE_UPDATE,
+ source, mutations);\n }\n super.update(mutations.concat([]));\n if
+ (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_UPDATE,
+ source, mutations);\n }\n }\n updateEmbedAt(index2, key, change) {\n
+ \ const [blot] = this.descendant((b2) => b2 instanceof BlockEmbed, index2);\n
+ \ if (blot && blot.statics.blotName === key && isUpdatable(blot)) {\n blot.updateContent(change);\n
+ \ }\n }\n handleDragStart(event) {\n event.preventDefault();\n }\n
+ \ deltaToRenderBlocks(delta) {\n const renderBlocks = [];\n let currentBlockDelta
+ = new Delta();\n delta.forEach((op) => {\n const insert = op == null
+ ? void 0 : op.insert;\n if (!insert) return;\n if (typeof insert
+ === \"string\") {\n const splitted = insert.split(\"\\n\");\n splitted.slice(0,
+ -1).forEach((text2) => {\n currentBlockDelta.insert(text2, op.attributes);\n
+ \ renderBlocks.push({\n type: \"block\",\n delta:
+ currentBlockDelta,\n attributes: op.attributes ?? {}\n });\n
+ \ currentBlockDelta = new Delta();\n });\n const last
+ = splitted[splitted.length - 1];\n if (last) {\n currentBlockDelta.insert(last,
+ op.attributes);\n }\n } else {\n const key = Object.keys(insert)[0];\n
+ \ if (!key) return;\n if (this.query(key, Scope.INLINE)) {\n
+ \ currentBlockDelta.push(op);\n } else {\n if (currentBlockDelta.length())
+ {\n renderBlocks.push({\n type: \"block\",\n delta:
+ currentBlockDelta,\n attributes: {}\n });\n }\n
+ \ currentBlockDelta = new Delta();\n renderBlocks.push({\n
+ \ type: \"blockEmbed\",\n key,\n value: insert[key],\n
+ \ attributes: op.attributes ?? {}\n });\n }\n }\n
+ \ });\n if (currentBlockDelta.length()) {\n renderBlocks.push({\n
+ \ type: \"block\",\n delta: currentBlockDelta,\n attributes:
+ {}\n });\n }\n return renderBlocks;\n }\n createBlock(attributes,
+ refBlot) {\n let blotName;\n const formats = {};\n Object.entries(attributes).forEach((_ref3)
+ => {\n let [key, value] = _ref3;\n const isBlockBlot = this.query(key,
+ Scope.BLOCK & Scope.BLOT) != null;\n if (isBlockBlot) {\n blotName
+ = key;\n } else {\n formats[key] = value;\n }\n });\n
+ \ const block2 = this.create(blotName || this.statics.defaultChild.blotName,
+ blotName ? attributes[blotName] : void 0);\n this.insertBefore(block2,
+ refBlot || void 0);\n const length = block2.length();\n Object.entries(formats).forEach((_ref4)
+ => {\n let [key, value] = _ref4;\n block2.formatAt(0, length, key,
+ value);\n });\n return block2;\n }\n}\n__publicField(Scroll, \"blotName\",
+ \"scroll\");\n__publicField(Scroll, \"className\", \"ql-editor\");\n__publicField(Scroll,
+ \"tagName\", \"DIV\");\n__publicField(Scroll, \"defaultChild\", Block);\n__publicField(Scroll,
+ \"allowedChildren\", [Block, BlockEmbed, Container]);\nfunction insertInlineContents(parent,
+ index2, inlineContents) {\n inlineContents.reduce((index3, op) => {\n const
+ length = DeltaExports.Op.length(op);\n let attributes = op.attributes ||
+ {};\n if (op.insert != null) {\n if (typeof op.insert === \"string\")
+ {\n const text2 = op.insert;\n parent.insertAt(index3, text2);\n
+ \ const [leaf] = parent.descendant(LeafBlot$1, index3);\n const
+ formats = bubbleFormats(leaf);\n attributes = DeltaExports.AttributeMap.diff(formats,
+ attributes) || {};\n } else if (typeof op.insert === \"object\") {\n
+ \ const key = Object.keys(op.insert)[0];\n if (key == null) return
+ index3;\n parent.insertAt(index3, key, op.insert[key]);\n const
+ isInlineEmbed = parent.scroll.query(key, Scope.INLINE) != null;\n if
+ (isInlineEmbed) {\n const [leaf] = parent.descendant(LeafBlot$1,
+ index3);\n const formats = bubbleFormats(leaf);\n attributes
+ = DeltaExports.AttributeMap.diff(formats, attributes) || {};\n }\n
+ \ }\n }\n Object.keys(attributes).forEach((key) => {\n parent.formatAt(index3,
+ length, key, attributes[key]);\n });\n return index3 + length;\n },
+ index2);\n}\nconst config$2 = {\n scope: Scope.BLOCK,\n whitelist: [\"right\",
+ \"center\", \"justify\"]\n};\nconst AlignAttribute = new Attributor(\"align\",
+ \"align\", config$2);\nconst AlignClass = new ClassAttributor$1(\"align\",
+ \"ql-align\", config$2);\nconst AlignStyle = new StyleAttributor$1(\"align\",
+ \"text-align\", config$2);\nclass ColorAttributor extends StyleAttributor$1
+ {\n value(domNode) {\n let value = super.value(domNode);\n if (!value.startsWith(\"rgb(\"))
+ return value;\n value = value.replace(/^[^\\d]+/, \"\").replace(/[^\\d]+$/,
+ \"\");\n const hex = value.split(\",\").map((component) => `00${parseInt(component,
+ 10).toString(16)}`.slice(-2)).join(\"\");\n return `#${hex}`;\n }\n}\nconst
+ ColorClass = new ClassAttributor$1(\"color\", \"ql-color\", {\n scope: Scope.INLINE\n});\nconst
+ ColorStyle = new ColorAttributor(\"color\", \"color\", {\n scope: Scope.INLINE\n});\nconst
+ BackgroundClass = new ClassAttributor$1(\"background\", \"ql-bg\", {\n scope:
+ Scope.INLINE\n});\nconst BackgroundStyle = new ColorAttributor(\"background\",
+ \"background-color\", {\n scope: Scope.INLINE\n});\nclass CodeBlockContainer
+ extends Container {\n static create(value) {\n const domNode = super.create(value);\n
+ \ domNode.setAttribute(\"spellcheck\", \"false\");\n return domNode;\n
+ \ }\n code(index2, length) {\n return this.children.map((child) => child.length()
+ <= 1 ? \"\" : child.domNode.innerText).join(\"\\n\").slice(index2, index2
+ + length);\n }\n html(index2, length) {\n return `\n${escapeText(this.code(index2,
+ length))}\n`;\n }\n}\nclass CodeBlock extends Block {\n static register()
+ {\n Quill.register(CodeBlockContainer);\n }\n}\n__publicField(CodeBlock,
+ \"TAB\", \" \");\nclass Code extends Inline {\n}\nCode.blotName = \"code\";\nCode.tagName
+ = \"CODE\";\nCodeBlock.blotName = \"code-block\";\nCodeBlock.className = \"ql-code-block\";\nCodeBlock.tagName
+ = \"DIV\";\nCodeBlockContainer.blotName = \"code-block-container\";\nCodeBlockContainer.className
+ = \"ql-code-block-container\";\nCodeBlockContainer.tagName = \"DIV\";\nCodeBlockContainer.allowedChildren
+ = [CodeBlock];\nCodeBlock.allowedChildren = [Text$1, Break, Cursor];\nCodeBlock.requiredContainer
+ = CodeBlockContainer;\nconst config$1 = {\n scope: Scope.BLOCK,\n whitelist:
+ [\"rtl\"]\n};\nconst DirectionAttribute = new Attributor(\"direction\", \"dir\",
+ config$1);\nconst DirectionClass = new ClassAttributor$1(\"direction\", \"ql-direction\",
+ config$1);\nconst DirectionStyle = new StyleAttributor$1(\"direction\", \"direction\",
+ config$1);\nconst config = {\n scope: Scope.INLINE,\n whitelist: [\"serif\",
+ \"monospace\"]\n};\nconst FontClass = new ClassAttributor$1(\"font\", \"ql-font\",
+ config);\nclass FontStyleAttributor extends StyleAttributor$1 {\n value(node)
+ {\n return super.value(node).replace(/[\"']/g, \"\");\n }\n}\nconst FontStyle
+ = new FontStyleAttributor(\"font\", \"font-family\", config);\nconst SizeClass
+ = new ClassAttributor$1(\"size\", \"ql-size\", {\n scope: Scope.INLINE,\n
+ \ whitelist: [\"small\", \"large\", \"huge\"]\n});\nconst SizeStyle = new
+ StyleAttributor$1(\"size\", \"font-size\", {\n scope: Scope.INLINE,\n whitelist:
+ [\"10px\", \"18px\", \"32px\"]\n});\nconst debug$2 = namespace(\"quill:keyboard\");\nconst
+ SHORTKEY = /Mac/i.test(navigator.platform) ? \"metaKey\" : \"ctrlKey\";\nclass
+ Keyboard extends Module {\n static match(evt, binding) {\n if ([\"altKey\",
+ \"ctrlKey\", \"metaKey\", \"shiftKey\"].some((key) => {\n return !!binding[key]
+ !== evt[key] && binding[key] !== null;\n })) {\n return false;\n }\n
+ \ return binding.key === evt.key || binding.key === evt.which;\n }\n constructor(quill,
+ options) {\n super(quill, options);\n this.bindings = {};\n Object.keys(this.options.bindings).forEach((name)
+ => {\n if (this.options.bindings[name]) {\n this.addBinding(this.options.bindings[name]);\n
+ \ }\n });\n this.addBinding({\n key: \"Enter\",\n shiftKey:
+ null\n }, this.handleEnter);\n this.addBinding({\n key: \"Enter\",\n
+ \ metaKey: null,\n ctrlKey: null,\n altKey: null\n }, ()
+ => {\n });\n if (/Firefox/i.test(navigator.userAgent)) {\n this.addBinding({\n
+ \ key: \"Backspace\"\n }, {\n collapsed: true\n },
+ this.handleBackspace);\n this.addBinding({\n key: \"Delete\"\n
+ \ }, {\n collapsed: true\n }, this.handleDelete);\n } else
+ {\n this.addBinding({\n key: \"Backspace\"\n }, {\n collapsed:
+ true,\n prefix: /^.?$/\n }, this.handleBackspace);\n this.addBinding({\n
+ \ key: \"Delete\"\n }, {\n collapsed: true,\n suffix:
+ /^.?$/\n }, this.handleDelete);\n }\n this.addBinding({\n key:
+ \"Backspace\"\n }, {\n collapsed: false\n }, this.handleDeleteRange);\n
+ \ this.addBinding({\n key: \"Delete\"\n }, {\n collapsed: false\n
+ \ }, this.handleDeleteRange);\n this.addBinding({\n key: \"Backspace\",\n
+ \ altKey: null,\n ctrlKey: null,\n metaKey: null,\n shiftKey:
+ null\n }, {\n collapsed: true,\n offset: 0\n }, this.handleBackspace);\n
+ \ this.listen();\n }\n addBinding(keyBinding) {\n let context = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n let handler = arguments.length
+ > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const binding = normalize$2(keyBinding);\n
+ \ if (binding == null) {\n debug$2.warn(\"Attempted to add invalid
+ keyboard binding\", binding);\n return;\n }\n if (typeof context
+ === \"function\") {\n context = {\n handler: context\n };\n
+ \ }\n if (typeof handler === \"function\") {\n handler = {\n handler\n
+ \ };\n }\n const keys2 = Array.isArray(binding.key) ? binding.key
+ : [binding.key];\n keys2.forEach((key) => {\n const singleBinding
+ = {\n ...binding,\n key,\n ...context,\n ...handler\n
+ \ };\n this.bindings[singleBinding.key] = this.bindings[singleBinding.key]
+ || [];\n this.bindings[singleBinding.key].push(singleBinding);\n });\n
+ \ }\n listen() {\n this.quill.root.addEventListener(\"keydown\", (evt)
+ => {\n if (evt.defaultPrevented || evt.isComposing) return;\n const
+ isComposing = evt.keyCode === 229 && (evt.key === \"Enter\" || evt.key ===
+ \"Backspace\");\n if (isComposing) return;\n const bindings = (this.bindings[evt.key]
+ || []).concat(this.bindings[evt.which] || []);\n const matches = bindings.filter((binding)
+ => Keyboard.match(evt, binding));\n if (matches.length === 0) return;\n
+ \ const blot = Quill.find(evt.target, true);\n if (blot && blot.scroll
+ !== this.quill.scroll) return;\n const range = this.quill.getSelection();\n
+ \ if (range == null || !this.quill.hasFocus()) return;\n const [line,
+ offset] = this.quill.getLine(range.index);\n const [leafStart, offsetStart]
+ = this.quill.getLeaf(range.index);\n const [leafEnd, offsetEnd] = range.length
+ === 0 ? [leafStart, offsetStart] : this.quill.getLeaf(range.index + range.length);\n
+ \ const prefixText = leafStart instanceof TextBlot$1 ? leafStart.value().slice(0,
+ offsetStart) : \"\";\n const suffixText = leafEnd instanceof TextBlot$1
+ ? leafEnd.value().slice(offsetEnd) : \"\";\n const curContext = {\n collapsed:
+ range.length === 0,\n // @ts-expect-error Fix me later\n empty:
+ range.length === 0 && line.length() <= 1,\n format: this.quill.getFormat(range),\n
+ \ line,\n offset,\n prefix: prefixText,\n suffix:
+ suffixText,\n event: evt\n };\n const prevented = matches.some((binding)
+ => {\n if (binding.collapsed != null && binding.collapsed !== curContext.collapsed)
+ {\n return false;\n }\n if (binding.empty != null &&
+ binding.empty !== curContext.empty) {\n return false;\n }\n
+ \ if (binding.offset != null && binding.offset !== curContext.offset)
+ {\n return false;\n }\n if (Array.isArray(binding.format))
+ {\n if (binding.format.every((name) => curContext.format[name] ==
+ null)) {\n return false;\n }\n } else if (typeof
+ binding.format === \"object\") {\n if (!Object.keys(binding.format).every((name)
+ => {\n if (binding.format[name] === true) return curContext.format[name]
+ != null;\n if (binding.format[name] === false) return curContext.format[name]
+ == null;\n return isEqual$1(binding.format[name], curContext.format[name]);\n
+ \ })) {\n return false;\n }\n }\n if
+ (binding.prefix != null && !binding.prefix.test(curContext.prefix)) {\n return
+ false;\n }\n if (binding.suffix != null && !binding.suffix.test(curContext.suffix))
+ {\n return false;\n }\n return binding.handler.call(this,
+ range, curContext, binding) !== true;\n });\n if (prevented) {\n
+ \ evt.preventDefault();\n }\n });\n }\n handleBackspace(range,
+ context) {\n const length = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(context.prefix)
+ ? 2 : 1;\n if (range.index === 0 || this.quill.getLength() <= 1) return;\n
+ \ let formats = {};\n const [line] = this.quill.getLine(range.index);\n
+ \ let delta = new Delta().retain(range.index - length).delete(length);\n
+ \ if (context.offset === 0) {\n const [prev] = this.quill.getLine(range.index
+ - 1);\n if (prev) {\n const isPrevLineEmpty = prev.statics.blotName
+ === \"block\" && prev.length() <= 1;\n if (!isPrevLineEmpty) {\n const
+ curFormats = line.formats();\n const prevFormats = this.quill.getFormat(range.index
+ - 1, 1);\n formats = DeltaExports.AttributeMap.diff(curFormats, prevFormats)
+ || {};\n if (Object.keys(formats).length > 0) {\n const
+ formatDelta = new Delta().retain(range.index + line.length() - 2).retain(1,
+ formats);\n delta = delta.compose(formatDelta);\n }\n
+ \ }\n }\n }\n this.quill.updateContents(delta, Quill.sources.USER);\n
+ \ this.quill.focus();\n }\n handleDelete(range, context) {\n const
+ length = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/.test(context.suffix) ? 2 :
+ 1;\n if (range.index >= this.quill.getLength() - length) return;\n let
+ formats = {};\n const [line] = this.quill.getLine(range.index);\n let
+ delta = new Delta().retain(range.index).delete(length);\n if (context.offset
+ >= line.length() - 1) {\n const [next] = this.quill.getLine(range.index
+ + 1);\n if (next) {\n const curFormats = line.formats();\n const
+ nextFormats = this.quill.getFormat(range.index, 1);\n formats = DeltaExports.AttributeMap.diff(curFormats,
+ nextFormats) || {};\n if (Object.keys(formats).length > 0) {\n delta
+ = delta.retain(next.length() - 1).retain(1, formats);\n }\n }\n
+ \ }\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.focus();\n
+ \ }\n handleDeleteRange(range) {\n deleteRange({\n range,\n quill:
+ this.quill\n });\n this.quill.focus();\n }\n handleEnter(range, context)
+ {\n const lineFormats = Object.keys(context.format).reduce((formats, format2)
+ => {\n if (this.quill.scroll.query(format2, Scope.BLOCK) && !Array.isArray(context.format[format2]))
+ {\n formats[format2] = context.format[format2];\n }\n return
+ formats;\n }, {});\n const delta = new Delta().retain(range.index).delete(range.length).insert(\"\\n\",
+ lineFormats);\n this.quill.updateContents(delta, Quill.sources.USER);\n
+ \ this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n this.quill.focus();\n
+ \ }\n}\nconst defaultOptions = {\n bindings: {\n bold: makeFormatHandler(\"bold\"),\n
+ \ italic: makeFormatHandler(\"italic\"),\n underline: makeFormatHandler(\"underline\"),\n
+ \ indent: {\n // highlight tab or tab at beginning of list, indent
+ or blockquote\n key: \"Tab\",\n format: [\"blockquote\", \"indent\",
+ \"list\"],\n handler(range, context) {\n if (context.collapsed
+ && context.offset !== 0) return true;\n this.quill.format(\"indent\",
+ \"+1\", Quill.sources.USER);\n return false;\n }\n },\n outdent:
+ {\n key: \"Tab\",\n shiftKey: true,\n format: [\"blockquote\",
+ \"indent\", \"list\"],\n // highlight tab or tab at beginning of list,
+ indent or blockquote\n handler(range, context) {\n if (context.collapsed
+ && context.offset !== 0) return true;\n this.quill.format(\"indent\",
+ \"-1\", Quill.sources.USER);\n return false;\n }\n },\n \"outdent
+ backspace\": {\n key: \"Backspace\",\n collapsed: true,\n shiftKey:
+ null,\n metaKey: null,\n ctrlKey: null,\n altKey: null,\n format:
+ [\"indent\", \"list\"],\n offset: 0,\n handler(range, context) {\n
+ \ if (context.format.indent != null) {\n this.quill.format(\"indent\",
+ \"-1\", Quill.sources.USER);\n } else if (context.format.list != null)
+ {\n this.quill.format(\"list\", false, Quill.sources.USER);\n }\n
+ \ }\n },\n \"indent code-block\": makeCodeBlockHandler(true),\n
+ \ \"outdent code-block\": makeCodeBlockHandler(false),\n \"remove tab\":
+ {\n key: \"Tab\",\n shiftKey: true,\n collapsed: true,\n prefix:
+ /\\t$/,\n handler(range) {\n this.quill.deleteText(range.index
+ - 1, 1, Quill.sources.USER);\n }\n },\n tab: {\n key: \"Tab\",\n
+ \ handler(range, context) {\n if (context.format.table) return
+ true;\n this.quill.history.cutoff();\n const delta = new Delta().retain(range.index).delete(range.length).insert(\"\t\");\n
+ \ this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.history.cutoff();\n
+ \ this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n
+ \ return false;\n }\n },\n \"blockquote empty enter\": {\n
+ \ key: \"Enter\",\n collapsed: true,\n format: [\"blockquote\"],\n
+ \ empty: true,\n handler() {\n this.quill.format(\"blockquote\",
+ false, Quill.sources.USER);\n }\n },\n \"list empty enter\": {\n
+ \ key: \"Enter\",\n collapsed: true,\n format: [\"list\"],\n
+ \ empty: true,\n handler(range, context) {\n const formats
+ = {\n list: false\n };\n if (context.format.indent)
+ {\n formats.indent = false;\n }\n this.quill.formatLine(range.index,
+ range.length, formats, Quill.sources.USER);\n }\n },\n \"checklist
+ enter\": {\n key: \"Enter\",\n collapsed: true,\n format: {\n
+ \ list: \"checked\"\n },\n handler(range) {\n const
+ [line, offset] = this.quill.getLine(range.index);\n const formats =
+ {\n // @ts-expect-error Fix me later\n ...line.formats(),\n
+ \ list: \"checked\"\n };\n const delta = new Delta().retain(range.index).insert(\"\\n\",
+ formats).retain(line.length() - offset - 1).retain(1, {\n list: \"unchecked\"\n
+ \ });\n this.quill.updateContents(delta, Quill.sources.USER);\n
+ \ this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n
+ \ this.quill.scrollSelectionIntoView();\n }\n },\n \"header
+ enter\": {\n key: \"Enter\",\n collapsed: true,\n format: [\"header\"],\n
+ \ suffix: /^$/,\n handler(range, context) {\n const [line,
+ offset] = this.quill.getLine(range.index);\n const delta = new Delta().retain(range.index).insert(\"\\n\",
+ context.format).retain(line.length() - offset - 1).retain(1, {\n header:
+ null\n });\n this.quill.updateContents(delta, Quill.sources.USER);\n
+ \ this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n
+ \ this.quill.scrollSelectionIntoView();\n }\n },\n \"table
+ backspace\": {\n key: \"Backspace\",\n format: [\"table\"],\n collapsed:
+ true,\n offset: 0,\n handler() {\n }\n },\n \"table delete\":
+ {\n key: \"Delete\",\n format: [\"table\"],\n collapsed: true,\n
+ \ suffix: /^$/,\n handler() {\n }\n },\n \"table enter\":
+ {\n key: \"Enter\",\n shiftKey: null,\n format: [\"table\"],\n
+ \ handler(range) {\n const module2 = this.quill.getModule(\"table\");\n
+ \ if (module2) {\n const [table2, row, cell, offset] = module2.getTable(range);\n
+ \ const shift = tableSide(table2, row, cell, offset);\n if
+ (shift == null) return;\n let index2 = table2.offset();\n if
+ (shift < 0) {\n const delta = new Delta().retain(index2).insert(\"\\n\");\n
+ \ this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index
+ + 1, range.length, Quill.sources.SILENT);\n } else if (shift > 0)
+ {\n index2 += table2.length();\n const delta = new Delta().retain(index2).insert(\"\\n\");\n
+ \ this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(index2,
+ Quill.sources.USER);\n }\n }\n }\n },\n \"table
+ tab\": {\n key: \"Tab\",\n shiftKey: null,\n format: [\"table\"],\n
+ \ handler(range, context) {\n const {\n event,\n line:
+ cell\n } = context;\n const offset = cell.offset(this.quill.scroll);\n
+ \ if (event.shiftKey) {\n this.quill.setSelection(offset -
+ 1, Quill.sources.USER);\n } else {\n this.quill.setSelection(offset
+ + cell.length(), Quill.sources.USER);\n }\n }\n },\n \"list
+ autofill\": {\n key: \" \",\n shiftKey: null,\n collapsed:
+ true,\n format: {\n \"code-block\": false,\n blockquote:
+ false,\n table: false\n },\n prefix: /^\\s*?(\\d+\\.|-|\\*|\\[
+ ?\\]|\\[x\\])$/,\n handler(range, context) {\n if (this.quill.scroll.query(\"list\")
+ == null) return true;\n const {\n length\n } = context.prefix;\n
+ \ const [line, offset] = this.quill.getLine(range.index);\n if
+ (offset > length) return true;\n let value;\n switch (context.prefix.trim())
+ {\n case \"[]\":\n case \"[ ]\":\n value = \"unchecked\";\n
+ \ break;\n case \"[x]\":\n value = \"checked\";\n
+ \ break;\n case \"-\":\n case \"*\":\n value
+ = \"bullet\";\n break;\n default:\n value =
+ \"ordered\";\n }\n this.quill.insertText(range.index, \" \",
+ Quill.sources.USER);\n this.quill.history.cutoff();\n const
+ delta = new Delta().retain(range.index - offset).delete(length + 1).retain(line.length()
+ - 2 - offset).retain(1, {\n list: value\n });\n this.quill.updateContents(delta,
+ Quill.sources.USER);\n this.quill.history.cutoff();\n this.quill.setSelection(range.index
+ - length, Quill.sources.SILENT);\n return false;\n }\n },\n
+ \ \"code exit\": {\n key: \"Enter\",\n collapsed: true,\n format:
+ [\"code-block\"],\n prefix: /^$/,\n suffix: /^\\s*$/,\n handler(range)
+ {\n const [line, offset] = this.quill.getLine(range.index);\n let
+ numLines = 2;\n let cur = line;\n while (cur != null && cur.length()
+ <= 1 && cur.formats()[\"code-block\"]) {\n cur = cur.prev;\n numLines
+ -= 1;\n if (numLines <= 0) {\n const delta = new Delta().retain(range.index
+ + line.length() - offset - 2).retain(1, {\n \"code-block\": null\n
+ \ }).delete(1);\n this.quill.updateContents(delta, Quill.sources.USER);\n
+ \ this.quill.setSelection(range.index - 1, Quill.sources.SILENT);\n
+ \ return false;\n }\n }\n return true;\n
+ \ }\n },\n \"embed left\": makeEmbedArrowHandler(\"ArrowLeft\",
+ false),\n \"embed left shift\": makeEmbedArrowHandler(\"ArrowLeft\", true),\n
+ \ \"embed right\": makeEmbedArrowHandler(\"ArrowRight\", false),\n \"embed
+ right shift\": makeEmbedArrowHandler(\"ArrowRight\", true),\n \"table down\":
+ makeTableArrowHandler(false),\n \"table up\": makeTableArrowHandler(true)\n
+ \ }\n};\nKeyboard.DEFAULTS = defaultOptions;\nfunction makeCodeBlockHandler(indent)
+ {\n return {\n key: \"Tab\",\n shiftKey: !indent,\n format: {\n
+ \ \"code-block\": true\n },\n handler(range, _ref) {\n let
+ {\n event\n } = _ref;\n const CodeBlock2 = this.quill.scroll.query(\"code-block\");\n
+ \ const {\n TAB\n } = CodeBlock2;\n if (range.length
+ === 0 && !event.shiftKey) {\n this.quill.insertText(range.index, TAB,
+ Quill.sources.USER);\n this.quill.setSelection(range.index + TAB.length,
+ Quill.sources.SILENT);\n return;\n }\n const lines = range.length
+ === 0 ? this.quill.getLines(range.index, 1) : this.quill.getLines(range);\n
+ \ let {\n index: index2,\n length\n } = range;\n lines.forEach((line,
+ i3) => {\n if (indent) {\n line.insertAt(0, TAB);\n if
+ (i3 === 0) {\n index2 += TAB.length;\n } else {\n length
+ += TAB.length;\n }\n } else if (line.domNode.textContent.startsWith(TAB))
+ {\n line.deleteAt(0, TAB.length);\n if (i3 === 0) {\n index2
+ -= TAB.length;\n } else {\n length -= TAB.length;\n }\n
+ \ }\n });\n this.quill.update(Quill.sources.USER);\n this.quill.setSelection(index2,
+ length, Quill.sources.SILENT);\n }\n };\n}\nfunction makeEmbedArrowHandler(key,
+ shiftKey) {\n const where = key === \"ArrowLeft\" ? \"prefix\" : \"suffix\";\n
+ \ return {\n key,\n shiftKey,\n altKey: null,\n [where]: /^$/,\n
+ \ handler(range) {\n let {\n index: index2\n } = range;\n
+ \ if (key === \"ArrowRight\") {\n index2 += range.length + 1;\n
+ \ }\n const [leaf] = this.quill.getLeaf(index2);\n if (!(leaf
+ instanceof EmbedBlot$1)) return true;\n if (key === \"ArrowLeft\") {\n
+ \ if (shiftKey) {\n this.quill.setSelection(range.index - 1,
+ range.length + 1, Quill.sources.USER);\n } else {\n this.quill.setSelection(range.index
+ - 1, Quill.sources.USER);\n }\n } else if (shiftKey) {\n this.quill.setSelection(range.index,
+ range.length + 1, Quill.sources.USER);\n } else {\n this.quill.setSelection(range.index
+ + range.length + 1, Quill.sources.USER);\n }\n return false;\n }\n
+ \ };\n}\nfunction makeFormatHandler(format2) {\n return {\n key: format2[0],\n
+ \ shortKey: true,\n handler(range, context) {\n this.quill.format(format2,
+ !context.format[format2], Quill.sources.USER);\n }\n };\n}\nfunction makeTableArrowHandler(up)
+ {\n return {\n key: up ? \"ArrowUp\" : \"ArrowDown\",\n collapsed:
+ true,\n format: [\"table\"],\n handler(range, context) {\n const
+ key = up ? \"prev\" : \"next\";\n const cell = context.line;\n const
+ targetRow = cell.parent[key];\n if (targetRow != null) {\n if
+ (targetRow.statics.blotName === \"table-row\") {\n let targetCell
+ = targetRow.children.head;\n let cur = cell;\n while (cur.prev
+ != null) {\n cur = cur.prev;\n targetCell = targetCell.next;\n
+ \ }\n const index2 = targetCell.offset(this.quill.scroll)
+ + Math.min(context.offset, targetCell.length() - 1);\n this.quill.setSelection(index2,
+ 0, Quill.sources.USER);\n }\n } else {\n const targetLine
+ = cell.table()[key];\n if (targetLine != null) {\n if (up)
+ {\n this.quill.setSelection(targetLine.offset(this.quill.scroll)
+ + targetLine.length() - 1, 0, Quill.sources.USER);\n } else {\n this.quill.setSelection(targetLine.offset(this.quill.scroll),
+ 0, Quill.sources.USER);\n }\n }\n }\n return false;\n
+ \ }\n };\n}\nfunction normalize$2(binding) {\n if (typeof binding ===
+ \"string\" || typeof binding === \"number\") {\n binding = {\n key:
+ binding\n };\n } else if (typeof binding === \"object\") {\n binding
+ = cloneDeep(binding);\n } else {\n return null;\n }\n if (binding.shortKey)
+ {\n binding[SHORTKEY] = binding.shortKey;\n delete binding.shortKey;\n
+ \ }\n return binding;\n}\nfunction deleteRange(_ref2) {\n let {\n quill,\n
+ \ range\n } = _ref2;\n const lines = quill.getLines(range);\n let formats
+ = {};\n if (lines.length > 1) {\n const firstFormats = lines[0].formats();\n
+ \ const lastFormats = lines[lines.length - 1].formats();\n formats =
+ DeltaExports.AttributeMap.diff(lastFormats, firstFormats) || {};\n }\n quill.deleteText(range,
+ Quill.sources.USER);\n if (Object.keys(formats).length > 0) {\n quill.formatLine(range.index,
+ 1, formats, Quill.sources.USER);\n }\n quill.setSelection(range.index, Quill.sources.SILENT);\n}\nfunction
+ tableSide(_table, row, cell, offset) {\n if (row.prev == null && row.next
+ == null) {\n if (cell.prev == null && cell.next == null) {\n return
+ offset === 0 ? -1 : 1;\n }\n return cell.prev == null ? -1 : 1;\n }\n
+ \ if (row.prev == null) {\n return -1;\n }\n if (row.next == null) {\n
+ \ return 1;\n }\n return null;\n}\nconst normalWeightRegexp = /font-weight:\\s*normal/;\nconst
+ blockTagNames = [\"P\", \"OL\", \"UL\"];\nconst isBlockElement = (element)
+ => {\n return element && blockTagNames.includes(element.tagName);\n};\nconst
+ normalizeEmptyLines = (doc) => {\n Array.from(doc.querySelectorAll(\"br\")).filter((br)
+ => isBlockElement(br.previousElementSibling) && isBlockElement(br.nextElementSibling)).forEach((br)
+ => {\n var _a3;\n (_a3 = br.parentNode) == null ? void 0 : _a3.removeChild(br);\n
+ \ });\n};\nconst normalizeFontWeight = (doc) => {\n Array.from(doc.querySelectorAll('b[style*=\"font-weight\"]')).filter((node)
+ => {\n var _a3;\n return (_a3 = node.getAttribute(\"style\")) == null
+ ? void 0 : _a3.match(normalWeightRegexp);\n }).forEach((node) => {\n var
+ _a3;\n const fragment = doc.createDocumentFragment();\n fragment.append(...node.childNodes);\n
+ \ (_a3 = node.parentNode) == null ? void 0 : _a3.replaceChild(fragment,
+ node);\n });\n};\nfunction normalize$1(doc) {\n if (doc.querySelector('[id^=\"docs-internal-guid-\"]'))
+ {\n normalizeFontWeight(doc);\n normalizeEmptyLines(doc);\n }\n}\nconst
+ ignoreRegexp = /\\bmso-list:[^;]*ignore/i;\nconst idRegexp = /\\bmso-list:[^;]*\\bl(\\d+)/i;\nconst
+ indentRegexp = /\\bmso-list:[^;]*\\blevel(\\d+)/i;\nconst parseListItem =
+ (element, html) => {\n const style = element.getAttribute(\"style\");\n const
+ idMatch = style == null ? void 0 : style.match(idRegexp);\n if (!idMatch)
+ {\n return null;\n }\n const id = Number(idMatch[1]);\n const indentMatch
+ = style == null ? void 0 : style.match(indentRegexp);\n const indent = indentMatch
+ ? Number(indentMatch[1]) : 1;\n const typeRegexp = new RegExp(`@list l${id}:level${indent}\\\\s*\\\\{[^\\\\}]*mso-level-number-format:\\\\s*([\\\\w-]+)`,
+ \"i\");\n const typeMatch = html.match(typeRegexp);\n const type = typeMatch
+ && typeMatch[1] === \"bullet\" ? \"bullet\" : \"ordered\";\n return {\n id,\n
+ \ indent,\n type,\n element\n };\n};\nconst normalizeListItem = (doc)
+ => {\n var _a3, _b;\n const msoList = Array.from(doc.querySelectorAll(\"[style*=mso-list]\"));\n
+ \ const ignored = [];\n const others = [];\n msoList.forEach((node) => {\n
+ \ const shouldIgnore = (node.getAttribute(\"style\") || \"\").match(ignoreRegexp);\n
+ \ if (shouldIgnore) {\n ignored.push(node);\n } else {\n others.push(node);\n
+ \ }\n });\n ignored.forEach((node) => {\n var _a4;\n return (_a4
+ = node.parentNode) == null ? void 0 : _a4.removeChild(node);\n });\n const
+ html = doc.documentElement.innerHTML;\n const listItems = others.map((element)
+ => parseListItem(element, html)).filter((parsed) => parsed);\n while (listItems.length)
+ {\n const childListItems = [];\n let current = listItems.shift();\n
+ \ while (current) {\n childListItems.push(current);\n current
+ = listItems.length && ((_a3 = listItems[0]) == null ? void 0 : _a3.element)
+ === current.element.nextElementSibling && // Different id means the next item
+ doesn't belong to this group.\n listItems[0].id === current.id ? listItems.shift()
+ : null;\n }\n const ul = document.createElement(\"ul\");\n childListItems.forEach((listItem)
+ => {\n const li = document.createElement(\"li\");\n li.setAttribute(\"data-list\",
+ listItem.type);\n if (listItem.indent > 1) {\n li.setAttribute(\"class\",
+ `ql-indent-${listItem.indent - 1}`);\n }\n li.innerHTML = listItem.element.innerHTML;\n
+ \ ul.appendChild(li);\n });\n const element = (_b = childListItems[0])
+ == null ? void 0 : _b.element;\n const {\n parentNode\n } = element
+ ?? {};\n if (element) {\n parentNode == null ? void 0 : parentNode.replaceChild(ul,
+ element);\n }\n childListItems.slice(1).forEach((_ref) => {\n let
+ {\n element: e2\n } = _ref;\n parentNode == null ? void 0
+ : parentNode.removeChild(e2);\n });\n }\n};\nfunction normalize2(doc)
+ {\n if (doc.documentElement.getAttribute(\"xmlns:w\") === \"urn:schemas-microsoft-com:office:word\")
+ {\n normalizeListItem(doc);\n }\n}\nconst NORMALIZERS = [normalize2, normalize$1];\nconst
+ normalizeExternalHTML = (doc) => {\n if (doc.documentElement) {\n NORMALIZERS.forEach((normalize3)
+ => {\n normalize3(doc);\n });\n }\n};\nconst debug$1 = namespace(\"quill:clipboard\");\nconst
+ CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline],
+ [\"br\", matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE,
+ matchBlot], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles],
+ [\"li\", matchIndent], [\"ol, ul\", matchList], [\"pre\", matchCodeBlock],
+ [\"tr\", matchTable], [\"b\", createMatchAlias(\"bold\")], [\"i\", createMatchAlias(\"italic\")],
+ [\"strike\", createMatchAlias(\"strike\")], [\"style\", matchIgnore]];\nconst
+ ATTRIBUTE_ATTRIBUTORS = [AlignAttribute, DirectionAttribute].reduce((memo,
+ attr) => {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\nconst STYLE_ATTRIBUTORS
+ = [AlignStyle, BackgroundStyle, ColorStyle, DirectionStyle, FontStyle, SizeStyle].reduce((memo,
+ attr) => {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\nclass Clipboard
+ extends Module {\n constructor(quill, options) {\n super(quill, options);\n
+ \ this.quill.root.addEventListener(\"copy\", (e2) => this.onCaptureCopy(e2,
+ false));\n this.quill.root.addEventListener(\"cut\", (e2) => this.onCaptureCopy(e2,
+ true));\n this.quill.root.addEventListener(\"paste\", this.onCapturePaste.bind(this));\n
+ \ this.matchers = [];\n CLIPBOARD_CONFIG.concat(this.options.matchers
+ ?? []).forEach((_ref) => {\n let [selector, matcher] = _ref;\n this.addMatcher(selector,
+ matcher);\n });\n }\n addMatcher(selector, matcher) {\n this.matchers.push([selector,
+ matcher]);\n }\n convert(_ref2) {\n let {\n html,\n text: text2\n
+ \ } = _ref2;\n let formats = arguments.length > 1 && arguments[1] !==
+ void 0 ? arguments[1] : {};\n if (formats[CodeBlock.blotName]) {\n return
+ new Delta().insert(text2 || \"\", {\n [CodeBlock.blotName]: formats[CodeBlock.blotName]\n
+ \ });\n }\n if (!html) {\n return new Delta().insert(text2
+ || \"\", formats);\n }\n const delta = this.convertHTML(html);\n if
+ (deltaEndsWith(delta, \"\\n\") && (delta.ops[delta.ops.length - 1].attributes
+ == null || formats.table)) {\n return delta.compose(new Delta().retain(delta.length()
+ - 1).delete(1));\n }\n return delta;\n }\n normalizeHTML(doc) {\n
+ \ normalizeExternalHTML(doc);\n }\n convertHTML(html) {\n const doc
+ = new DOMParser().parseFromString(html, \"text/html\");\n this.normalizeHTML(doc);\n
+ \ const container = doc.body;\n const nodeMatches = /* @__PURE__ */ new
+ WeakMap();\n const [elementMatchers, textMatchers] = this.prepareMatching(container,
+ nodeMatches);\n return traverse(this.quill.scroll, container, elementMatchers,
+ textMatchers, nodeMatches);\n }\n dangerouslyPasteHTML(index2, html) {\n
+ \ let source = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2]
+ : Quill.sources.API;\n if (typeof index2 === \"string\") {\n const
+ delta = this.convert({\n html: index2,\n text: \"\"\n });\n
+ \ this.quill.setContents(delta, html);\n this.quill.setSelection(0,
+ Quill.sources.SILENT);\n } else {\n const paste = this.convert({\n
+ \ html,\n text: \"\"\n });\n this.quill.updateContents(new
+ Delta().retain(index2).concat(paste), source);\n this.quill.setSelection(index2
+ + paste.length(), Quill.sources.SILENT);\n }\n }\n onCaptureCopy(e2)
+ {\n var _a3, _b;\n let isCut = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : false;\n if (e2.defaultPrevented) return;\n
+ \ e2.preventDefault();\n const [range] = this.quill.selection.getRange();\n
+ \ if (range == null) return;\n const {\n html,\n text: text2\n
+ \ } = this.onCopy(range, isCut);\n (_a3 = e2.clipboardData) == null ?
+ void 0 : _a3.setData(\"text/plain\", text2);\n (_b = e2.clipboardData)
+ == null ? void 0 : _b.setData(\"text/html\", html);\n if (isCut) {\n deleteRange({\n
+ \ range,\n quill: this.quill\n });\n }\n }\n /*\n *
+ https://www.iana.org/assignments/media-types/text/uri-list\n */\n normalizeURIList(urlList)
+ {\n return urlList.split(/\\r?\\n/).filter((url2) => url2[0] !== \"#\").join(\"\\n\");\n
+ \ }\n onCapturePaste(e2) {\n var _a3, _b, _c, _d, _e;\n if (e2.defaultPrevented
+ || !this.quill.isEnabled()) return;\n e2.preventDefault();\n const range
+ = this.quill.getSelection(true);\n if (range == null) return;\n const
+ html = (_a3 = e2.clipboardData) == null ? void 0 : _a3.getData(\"text/html\");\n
+ \ let text2 = (_b = e2.clipboardData) == null ? void 0 : _b.getData(\"text/plain\");\n
+ \ if (!html && !text2) {\n const urlList = (_c = e2.clipboardData)
+ == null ? void 0 : _c.getData(\"text/uri-list\");\n if (urlList) {\n
+ \ text2 = this.normalizeURIList(urlList);\n }\n }\n const
+ files = Array.from(((_d = e2.clipboardData) == null ? void 0 : _d.files) ||
+ []);\n if (!html && files.length > 0) {\n this.quill.uploader.upload(range,
+ files);\n return;\n }\n if (html && files.length > 0) {\n const
+ doc = new DOMParser().parseFromString(html, \"text/html\");\n if (doc.body.childElementCount
+ === 1 && ((_e = doc.body.firstElementChild) == null ? void 0 : _e.tagName)
+ === \"IMG\") {\n this.quill.uploader.upload(range, files);\n return;\n
+ \ }\n }\n this.onPaste(range, {\n html,\n text: text2\n
+ \ });\n }\n onCopy(range) {\n const text2 = this.quill.getText(range);\n
+ \ const html = this.quill.getSemanticHTML(range);\n return {\n html,\n
+ \ text: text2\n };\n }\n onPaste(range, _ref3) {\n let {\n text:
+ text2,\n html\n } = _ref3;\n const formats = this.quill.getFormat(range.index);\n
+ \ const pastedDelta = this.convert({\n text: text2,\n html\n },
+ formats);\n debug$1.log(\"onPaste\", pastedDelta, {\n text: text2,\n
+ \ html\n });\n const delta = new Delta().retain(range.index).delete(range.length).concat(pastedDelta);\n
+ \ this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(delta.length()
+ - range.length, Quill.sources.SILENT);\n this.quill.scrollSelectionIntoView();\n
+ \ }\n prepareMatching(container, nodeMatches) {\n const elementMatchers
+ = [];\n const textMatchers = [];\n this.matchers.forEach((pair) => {\n
+ \ const [selector, matcher] = pair;\n switch (selector) {\n case
+ Node.TEXT_NODE:\n textMatchers.push(matcher);\n break;\n
+ \ case Node.ELEMENT_NODE:\n elementMatchers.push(matcher);\n
+ \ break;\n default:\n Array.from(container.querySelectorAll(selector)).forEach((node)
+ => {\n if (nodeMatches.has(node)) {\n const matches
+ = nodeMatches.get(node);\n matches == null ? void 0 : matches.push(matcher);\n
+ \ } else {\n nodeMatches.set(node, [matcher]);\n }\n
+ \ });\n break;\n }\n });\n return [elementMatchers,
+ textMatchers];\n }\n}\n__publicField(Clipboard, \"DEFAULTS\", {\n matchers:
+ []\n});\nfunction applyFormat(delta, format2, value, scroll) {\n if (!scroll.query(format2))
+ {\n return delta;\n }\n return delta.reduce((newDelta, op) => {\n if
+ (!op.insert) return newDelta;\n if (op.attributes && op.attributes[format2])
+ {\n return newDelta.push(op);\n }\n const formats = value ? {\n
+ \ [format2]: value\n } : {};\n return newDelta.insert(op.insert,
+ {\n ...formats,\n ...op.attributes\n });\n }, new Delta());\n}\nfunction
+ deltaEndsWith(delta, text2) {\n let endText = \"\";\n for (let i3 = delta.ops.length
+ - 1; i3 >= 0 && endText.length < text2.length; --i3) {\n const op = delta.ops[i3];\n
+ \ if (typeof op.insert !== \"string\") break;\n endText = op.insert +
+ endText;\n }\n return endText.slice(-1 * text2.length) === text2;\n}\nfunction
+ isLine(node, scroll) {\n if (!(node instanceof Element)) return false;\n
+ \ const match3 = scroll.query(node);\n if (match3 && match3.prototype instanceof
+ EmbedBlot$1) return false;\n return [\"address\", \"article\", \"blockquote\",
+ \"canvas\", \"dd\", \"div\", \"dl\", \"dt\", \"fieldset\", \"figcaption\",
+ \"figure\", \"footer\", \"form\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\",
+ \"h6\", \"header\", \"iframe\", \"li\", \"main\", \"nav\", \"ol\", \"output\",
+ \"p\", \"pre\", \"section\", \"table\", \"td\", \"tr\", \"ul\", \"video\"].includes(node.tagName.toLowerCase());\n}\nfunction
+ isBetweenInlineElements(node, scroll) {\n return node.previousElementSibling
+ && node.nextElementSibling && !isLine(node.previousElementSibling, scroll)
+ && !isLine(node.nextElementSibling, scroll);\n}\nconst preNodes = /* @__PURE__
+ */ new WeakMap();\nfunction isPre(node) {\n if (node == null) return false;\n
+ \ if (!preNodes.has(node)) {\n if (node.tagName === \"PRE\") {\n preNodes.set(node,
+ true);\n } else {\n preNodes.set(node, isPre(node.parentNode));\n
+ \ }\n }\n return preNodes.get(node);\n}\nfunction traverse(scroll, node,
+ elementMatchers, textMatchers, nodeMatches) {\n if (node.nodeType === node.TEXT_NODE)
+ {\n return textMatchers.reduce((delta, matcher) => {\n return matcher(node,
+ delta, scroll);\n }, new Delta());\n }\n if (node.nodeType === node.ELEMENT_NODE)
+ {\n return Array.from(node.childNodes || []).reduce((delta, childNode)
+ => {\n let childrenDelta = traverse(scroll, childNode, elementMatchers,
+ textMatchers, nodeMatches);\n if (childNode.nodeType === node.ELEMENT_NODE)
+ {\n childrenDelta = elementMatchers.reduce((reducedDelta, matcher)
+ => {\n return matcher(childNode, reducedDelta, scroll);\n },
+ childrenDelta);\n childrenDelta = (nodeMatches.get(childNode) || []).reduce((reducedDelta,
+ matcher) => {\n return matcher(childNode, reducedDelta, scroll);\n
+ \ }, childrenDelta);\n }\n return delta.concat(childrenDelta);\n
+ \ }, new Delta());\n }\n return new Delta();\n}\nfunction createMatchAlias(format2)
+ {\n return (_node, delta, scroll) => {\n return applyFormat(delta, format2,
+ true, scroll);\n };\n}\nfunction matchAttributor(node, delta, scroll) {\n
+ \ const attributes = Attributor.keys(node);\n const classes = ClassAttributor$1.keys(node);\n
+ \ const styles = StyleAttributor$1.keys(node);\n const formats = {};\n attributes.concat(classes).concat(styles).forEach((name)
+ => {\n let attr = scroll.query(name, Scope.ATTRIBUTE);\n if (attr !=
+ null) {\n formats[attr.attrName] = attr.value(node);\n if (formats[attr.attrName])
+ return;\n }\n attr = ATTRIBUTE_ATTRIBUTORS[name];\n if (attr != null
+ && (attr.attrName === name || attr.keyName === name)) {\n formats[attr.attrName]
+ = attr.value(node) || void 0;\n }\n attr = STYLE_ATTRIBUTORS[name];\n
+ \ if (attr != null && (attr.attrName === name || attr.keyName === name))
+ {\n attr = STYLE_ATTRIBUTORS[name];\n formats[attr.attrName] = attr.value(node)
+ || void 0;\n }\n });\n return Object.entries(formats).reduce((newDelta,
+ _ref4) => {\n let [name, value] = _ref4;\n return applyFormat(newDelta,
+ name, value, scroll);\n }, delta);\n}\nfunction matchBlot(node, delta, scroll)
+ {\n const match3 = scroll.query(node);\n if (match3 == null) return delta;\n
+ \ if (match3.prototype instanceof EmbedBlot$1) {\n const embed = {};\n
+ \ const value = match3.value(node);\n if (value != null) {\n embed[match3.blotName]
+ = value;\n return new Delta().insert(embed, match3.formats(node, scroll));\n
+ \ }\n } else {\n if (match3.prototype instanceof BlockBlot$1 && !deltaEndsWith(delta,
+ \"\\n\")) {\n delta.insert(\"\\n\");\n }\n if (\"blotName\" in
+ match3 && \"formats\" in match3 && typeof match3.formats === \"function\")
+ {\n return applyFormat(delta, match3.blotName, match3.formats(node, scroll),
+ scroll);\n }\n }\n return delta;\n}\nfunction matchBreak(node, delta)
+ {\n if (!deltaEndsWith(delta, \"\\n\")) {\n delta.insert(\"\\n\");\n }\n
+ \ return delta;\n}\nfunction matchCodeBlock(node, delta, scroll) {\n const
+ match3 = scroll.query(\"code-block\");\n const language = match3 && \"formats\"
+ in match3 && typeof match3.formats === \"function\" ? match3.formats(node,
+ scroll) : true;\n return applyFormat(delta, \"code-block\", language, scroll);\n}\nfunction
+ matchIgnore() {\n return new Delta();\n}\nfunction matchIndent(node, delta,
+ scroll) {\n const match3 = scroll.query(node);\n if (match3 == null || //
+ @ts-expect-error\n match3.blotName !== \"list\" || !deltaEndsWith(delta,
+ \"\\n\")) {\n return delta;\n }\n let indent = -1;\n let parent = node.parentNode;\n
+ \ while (parent != null) {\n if ([\"OL\", \"UL\"].includes(parent.tagName))
+ {\n indent += 1;\n }\n parent = parent.parentNode;\n }\n if (indent
+ <= 0) return delta;\n return delta.reduce((composed, op) => {\n if (!op.insert)
+ return composed;\n if (op.attributes && typeof op.attributes.indent ===
+ \"number\") {\n return composed.push(op);\n }\n return composed.insert(op.insert,
+ {\n indent,\n ...op.attributes || {}\n });\n }, new Delta());\n}\nfunction
+ matchList(node, delta, scroll) {\n const element = node;\n let list2 = element.tagName
+ === \"OL\" ? \"ordered\" : \"bullet\";\n const checkedAttr = element.getAttribute(\"data-checked\");\n
+ \ if (checkedAttr) {\n list2 = checkedAttr === \"true\" ? \"checked\" :
+ \"unchecked\";\n }\n return applyFormat(delta, \"list\", list2, scroll);\n}\nfunction
+ matchNewline(node, delta, scroll) {\n if (!deltaEndsWith(delta, \"\\n\"))
+ {\n if (isLine(node, scroll) && (node.childNodes.length > 0 || node instanceof
+ HTMLParagraphElement)) {\n return delta.insert(\"\\n\");\n }\n if
+ (delta.length() > 0 && node.nextSibling) {\n let nextSibling = node.nextSibling;\n
+ \ while (nextSibling != null) {\n if (isLine(nextSibling, scroll))
+ {\n return delta.insert(\"\\n\");\n }\n const match3
+ = scroll.query(nextSibling);\n if (match3 && match3.prototype instanceof
+ BlockEmbed) {\n return delta.insert(\"\\n\");\n }\n nextSibling
+ = nextSibling.firstChild;\n }\n }\n }\n return delta;\n}\nfunction
+ matchStyles(node, delta, scroll) {\n var _a3;\n const formats = {};\n const
+ style = node.style || {};\n if (style.fontStyle === \"italic\") {\n formats.italic
+ = true;\n }\n if (style.textDecoration === \"underline\") {\n formats.underline
+ = true;\n }\n if (style.textDecoration === \"line-through\") {\n formats.strike
+ = true;\n }\n if (((_a3 = style.fontWeight) == null ? void 0 : _a3.startsWith(\"bold\"))
+ || // @ts-expect-error Fix me later\n parseInt(style.fontWeight, 10) >= 700)
+ {\n formats.bold = true;\n }\n delta = Object.entries(formats).reduce((newDelta,
+ _ref5) => {\n let [name, value] = _ref5;\n return applyFormat(newDelta,
+ name, value, scroll);\n }, delta);\n if (parseFloat(style.textIndent ||
+ 0) > 0) {\n return new Delta().insert(\"\t\").concat(delta);\n }\n return
+ delta;\n}\nfunction matchTable(node, delta, scroll) {\n var _a3, _b;\n const
+ table2 = ((_a3 = node.parentElement) == null ? void 0 : _a3.tagName) === \"TABLE\"
+ ? node.parentElement : (_b = node.parentElement) == null ? void 0 : _b.parentElement;\n
+ \ if (table2 != null) {\n const rows = Array.from(table2.querySelectorAll(\"tr\"));\n
+ \ const row = rows.indexOf(node) + 1;\n return applyFormat(delta, \"table\",
+ row, scroll);\n }\n return delta;\n}\nfunction matchText(node, delta, scroll)
+ {\n var _a3;\n let text2 = node.data;\n if (((_a3 = node.parentElement)
+ == null ? void 0 : _a3.tagName) === \"O:P\") {\n return delta.insert(text2.trim());\n
+ \ }\n if (!isPre(node)) {\n if (text2.trim().length === 0 && text2.includes(\"\\n\")
+ && !isBetweenInlineElements(node, scroll)) {\n return delta;\n }\n
+ \ text2 = text2.replace(/[^\\S\\u00a0]/g, \" \");\n text2 = text2.replace(/
+ {2,}/g, \" \");\n if (node.previousSibling == null && node.parentElement
+ != null && isLine(node.parentElement, scroll) || node.previousSibling instanceof
+ Element && isLine(node.previousSibling, scroll)) {\n text2 = text2.replace(/^
+ /, \"\");\n }\n if (node.nextSibling == null && node.parentElement !=
+ null && isLine(node.parentElement, scroll) || node.nextSibling instanceof
+ Element && isLine(node.nextSibling, scroll)) {\n text2 = text2.replace(/
+ $/, \"\");\n }\n text2 = text2.replaceAll(\" \", \" \");\n }\n return
+ delta.insert(text2);\n}\nclass History extends Module {\n constructor(quill,
+ options) {\n super(quill, options);\n __publicField(this, \"lastRecorded\",
+ 0);\n __publicField(this, \"ignoreChange\", false);\n __publicField(this,
+ \"stack\", {\n undo: [],\n redo: []\n });\n __publicField(this,
+ \"currentRange\", null);\n this.quill.on(Quill.events.EDITOR_CHANGE, (eventName,
+ value, oldValue, source) => {\n if (eventName === Quill.events.SELECTION_CHANGE)
+ {\n if (value && source !== Quill.sources.SILENT) {\n this.currentRange
+ = value;\n }\n } else if (eventName === Quill.events.TEXT_CHANGE)
+ {\n if (!this.ignoreChange) {\n if (!this.options.userOnly
+ || source === Quill.sources.USER) {\n this.record(value, oldValue);\n
+ \ } else {\n this.transform(value);\n }\n }\n
+ \ this.currentRange = transformRange(this.currentRange, value);\n }\n
+ \ });\n this.quill.keyboard.addBinding({\n key: \"z\",\n shortKey:
+ true\n }, this.undo.bind(this));\n this.quill.keyboard.addBinding({\n
+ \ key: [\"z\", \"Z\"],\n shortKey: true,\n shiftKey: true\n
+ \ }, this.redo.bind(this));\n if (/Win/i.test(navigator.platform)) {\n
+ \ this.quill.keyboard.addBinding({\n key: \"y\",\n shortKey:
+ true\n }, this.redo.bind(this));\n }\n this.quill.root.addEventListener(\"beforeinput\",
+ (event) => {\n if (event.inputType === \"historyUndo\") {\n this.undo();\n
+ \ event.preventDefault();\n } else if (event.inputType === \"historyRedo\")
+ {\n this.redo();\n event.preventDefault();\n }\n });\n
+ \ }\n change(source, dest) {\n if (this.stack[source].length === 0) return;\n
+ \ const item = this.stack[source].pop();\n if (!item) return;\n const
+ base2 = this.quill.getContents();\n const inverseDelta = item.delta.invert(base2);\n
+ \ this.stack[dest].push({\n delta: inverseDelta,\n range: transformRange(item.range,
+ inverseDelta)\n });\n this.lastRecorded = 0;\n this.ignoreChange
+ = true;\n this.quill.updateContents(item.delta, Quill.sources.USER);\n
+ \ this.ignoreChange = false;\n this.restoreSelection(item);\n }\n clear()
+ {\n this.stack = {\n undo: [],\n redo: []\n };\n }\n cutoff()
+ {\n this.lastRecorded = 0;\n }\n record(changeDelta, oldDelta) {\n if
+ (changeDelta.ops.length === 0) return;\n this.stack.redo = [];\n let
+ undoDelta = changeDelta.invert(oldDelta);\n let undoRange = this.currentRange;\n
+ \ const timestamp = Date.now();\n if (\n // @ts-expect-error Fix
+ me later\n this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length
+ > 0\n ) {\n const item = this.stack.undo.pop();\n if (item) {\n
+ \ undoDelta = undoDelta.compose(item.delta);\n undoRange = item.range;\n
+ \ }\n } else {\n this.lastRecorded = timestamp;\n }\n if
+ (undoDelta.length() === 0) return;\n this.stack.undo.push({\n delta:
+ undoDelta,\n range: undoRange\n });\n if (this.stack.undo.length
+ > this.options.maxStack) {\n this.stack.undo.shift();\n }\n }\n redo()
+ {\n this.change(\"redo\", \"undo\");\n }\n transform(delta) {\n transformStack(this.stack.undo,
+ delta);\n transformStack(this.stack.redo, delta);\n }\n undo() {\n this.change(\"undo\",
+ \"redo\");\n }\n restoreSelection(stackItem) {\n if (stackItem.range)
+ {\n this.quill.setSelection(stackItem.range, Quill.sources.USER);\n }
+ else {\n const index2 = getLastChangeIndex(this.quill.scroll, stackItem.delta);\n
+ \ this.quill.setSelection(index2, Quill.sources.USER);\n }\n }\n}\n__publicField(History,
+ \"DEFAULTS\", {\n delay: 1e3,\n maxStack: 100,\n userOnly: false\n});\nfunction
+ transformStack(stack, delta) {\n let remoteDelta = delta;\n for (let i3
+ = stack.length - 1; i3 >= 0; i3 -= 1) {\n const oldItem = stack[i3];\n
+ \ stack[i3] = {\n delta: remoteDelta.transform(oldItem.delta, true),\n
+ \ range: oldItem.range && transformRange(oldItem.range, remoteDelta)\n
+ \ };\n remoteDelta = oldItem.delta.transform(remoteDelta);\n if (stack[i3].delta.length()
+ === 0) {\n stack.splice(i3, 1);\n }\n }\n}\nfunction endsWithNewlineChange(scroll,
+ delta) {\n const lastOp = delta.ops[delta.ops.length - 1];\n if (lastOp
+ == null) return false;\n if (lastOp.insert != null) {\n return typeof
+ lastOp.insert === \"string\" && lastOp.insert.endsWith(\"\\n\");\n }\n if
+ (lastOp.attributes != null) {\n return Object.keys(lastOp.attributes).some((attr)
+ => {\n return scroll.query(attr, Scope.BLOCK) != null;\n });\n }\n
+ \ return false;\n}\nfunction getLastChangeIndex(scroll, delta) {\n const
+ deleteLength = delta.reduce((length, op) => {\n return length + (op.delete
+ || 0);\n }, 0);\n let changeIndex = delta.length() - deleteLength;\n if
+ (endsWithNewlineChange(scroll, delta)) {\n changeIndex -= 1;\n }\n return
+ changeIndex;\n}\nfunction transformRange(range, delta) {\n if (!range) return
+ range;\n const start = delta.transformPosition(range.index);\n const end
+ = delta.transformPosition(range.index + range.length);\n return {\n index:
+ start,\n length: end - start\n };\n}\nclass Uploader extends Module {\n
+ \ constructor(quill, options) {\n super(quill, options);\n quill.root.addEventListener(\"drop\",
+ (e2) => {\n var _a3;\n e2.preventDefault();\n let native =
+ null;\n if (document.caretRangeFromPoint) {\n native = document.caretRangeFromPoint(e2.clientX,
+ e2.clientY);\n } else if (document.caretPositionFromPoint) {\n const
+ position = document.caretPositionFromPoint(e2.clientX, e2.clientY);\n native
+ = document.createRange();\n native.setStart(position.offsetNode, position.offset);\n
+ \ native.setEnd(position.offsetNode, position.offset);\n }\n const
+ normalized = native && quill.selection.normalizeNative(native);\n if
+ (normalized) {\n const range = quill.selection.normalizedToRange(normalized);\n
+ \ if ((_a3 = e2.dataTransfer) == null ? void 0 : _a3.files) {\n this.upload(range,
+ e2.dataTransfer.files);\n }\n }\n });\n }\n upload(range,
+ files) {\n const uploads = [];\n Array.from(files).forEach((file) =>
+ {\n var _a3;\n if (file && ((_a3 = this.options.mimetypes) == null
+ ? void 0 : _a3.includes(file.type))) {\n uploads.push(file);\n }\n
+ \ });\n if (uploads.length > 0) {\n this.options.handler.call(this,
+ range, uploads);\n }\n }\n}\nUploader.DEFAULTS = {\n mimetypes: [\"image/png\",
+ \"image/jpeg\"],\n handler(range, files) {\n if (!this.quill.scroll.query(\"image\"))
+ {\n return;\n }\n const promises = files.map((file) => {\n return
+ new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload
+ = () => {\n resolve(reader.result);\n };\n reader.readAsDataURL(file);\n
+ \ });\n });\n Promise.all(promises).then((images) => {\n const
+ update = images.reduce((delta, image2) => {\n return delta.insert({\n
+ \ image: image2\n });\n }, new Delta().retain(range.index).delete(range.length));\n
+ \ this.quill.updateContents(update, Emitter.sources.USER);\n this.quill.setSelection(range.index
+ + images.length, Emitter.sources.SILENT);\n });\n }\n};\nconst INSERT_TYPES
+ = [\"insertText\", \"insertReplacementText\"];\nclass Input extends Module
+ {\n constructor(quill, options) {\n super(quill, options);\n quill.root.addEventListener(\"beforeinput\",
+ (event) => {\n this.handleBeforeInput(event);\n });\n if (!/Android/i.test(navigator.userAgent))
+ {\n quill.on(Quill.events.COMPOSITION_BEFORE_START, () => {\n this.handleCompositionStart();\n
+ \ });\n }\n }\n deleteRange(range) {\n deleteRange({\n range,\n
+ \ quill: this.quill\n });\n }\n replaceText(range) {\n let text2
+ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n
+ \ if (range.length === 0) return false;\n if (text2) {\n const formats
+ = this.quill.getFormat(range.index, 1);\n this.deleteRange(range);\n
+ \ this.quill.updateContents(new Delta().retain(range.index).insert(text2,
+ formats), Quill.sources.USER);\n } else {\n this.deleteRange(range);\n
+ \ }\n this.quill.setSelection(range.index + text2.length, 0, Quill.sources.SILENT);\n
+ \ return true;\n }\n handleBeforeInput(event) {\n if (this.quill.composition.isComposing
+ || event.defaultPrevented || !INSERT_TYPES.includes(event.inputType)) {\n
+ \ return;\n }\n const staticRange = event.getTargetRanges ? event.getTargetRanges()[0]
+ : null;\n if (!staticRange || staticRange.collapsed === true) {\n return;\n
+ \ }\n const text2 = getPlainTextFromInputEvent(event);\n if (text2
+ == null) {\n return;\n }\n const normalized = this.quill.selection.normalizeNative(staticRange);\n
+ \ const range = normalized ? this.quill.selection.normalizedToRange(normalized)
+ : null;\n if (range && this.replaceText(range, text2)) {\n event.preventDefault();\n
+ \ }\n }\n handleCompositionStart() {\n const range = this.quill.getSelection();\n
+ \ if (range) {\n this.replaceText(range);\n }\n }\n}\nfunction
+ getPlainTextFromInputEvent(event) {\n var _a3;\n if (typeof event.data ===
+ \"string\") {\n return event.data;\n }\n if ((_a3 = event.dataTransfer)
+ == null ? void 0 : _a3.types.includes(\"text/plain\")) {\n return event.dataTransfer.getData(\"text/plain\");\n
+ \ }\n return null;\n}\nconst isMac = /Mac/i.test(navigator.platform);\nconst
+ TTL_FOR_VALID_SELECTION_CHANGE = 100;\nconst canMoveCaretBeforeUINode = (event)
+ => {\n if (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\" ||
+ // RTL scripts or moving from the end of the previous line\n event.key ===
+ \"ArrowUp\" || event.key === \"ArrowDown\" || event.key === \"Home\") {\n
+ \ return true;\n }\n if (isMac && event.key === \"a\" && event.ctrlKey
+ === true) {\n return true;\n }\n return false;\n};\nclass UINode extends
+ Module {\n constructor(quill, options) {\n super(quill, options);\n __publicField(this,
+ \"isListening\", false);\n __publicField(this, \"selectionChangeDeadline\",
+ 0);\n this.handleArrowKeys();\n this.handleNavigationShortcuts();\n
+ \ }\n handleArrowKeys() {\n this.quill.keyboard.addBinding({\n key:
+ [\"ArrowLeft\", \"ArrowRight\"],\n offset: 0,\n shiftKey: null,\n
+ \ handler(range, _ref) {\n let {\n line,\n event\n
+ \ } = _ref;\n if (!(line instanceof ParentBlot$1) || !line.uiNode)
+ {\n return true;\n }\n const isRTL = getComputedStyle(line.domNode)[\"direction\"]
+ === \"rtl\";\n if (isRTL && event.key !== \"ArrowRight\" || !isRTL
+ && event.key !== \"ArrowLeft\") {\n return true;\n }\n this.quill.setSelection(range.index
+ - 1, range.length + (event.shiftKey ? 1 : 0), Quill.sources.USER);\n return
+ false;\n }\n });\n }\n handleNavigationShortcuts() {\n this.quill.root.addEventListener(\"keydown\",
+ (event) => {\n if (!event.defaultPrevented && canMoveCaretBeforeUINode(event))
+ {\n this.ensureListeningToSelectionChange();\n }\n });\n }\n
+ \ /**\n * We only listen to the `selectionchange` event when\n * there
+ is an intention of moving the caret to the beginning using shortcuts.\n *
+ This is primarily implemented to prevent infinite loops, as we are changing\n
+ \ * the selection within the handler of a `selectionchange` event.\n */\n
+ \ ensureListeningToSelectionChange() {\n this.selectionChangeDeadline =
+ Date.now() + TTL_FOR_VALID_SELECTION_CHANGE;\n if (this.isListening) return;\n
+ \ this.isListening = true;\n const listener = () => {\n this.isListening
+ = false;\n if (Date.now() <= this.selectionChangeDeadline) {\n this.handleSelectionChange();\n
+ \ }\n };\n document.addEventListener(\"selectionchange\", listener,
+ {\n once: true\n });\n }\n handleSelectionChange() {\n const
+ selection = document.getSelection();\n if (!selection) return;\n const
+ range = selection.getRangeAt(0);\n if (range.collapsed !== true || range.startOffset
+ !== 0) return;\n const line = this.quill.scroll.find(range.startContainer);\n
+ \ if (!(line instanceof ParentBlot$1) || !line.uiNode) return;\n const
+ newRange = document.createRange();\n newRange.setStartAfter(line.uiNode);\n
+ \ newRange.setEndAfter(line.uiNode);\n selection.removeAllRanges();\n
+ \ selection.addRange(newRange);\n }\n}\nQuill.register({\n \"blots/block\":
+ Block,\n \"blots/block/embed\": BlockEmbed,\n \"blots/break\": Break,\n
+ \ \"blots/container\": Container,\n \"blots/cursor\": Cursor,\n \"blots/embed\":
+ Embed,\n \"blots/inline\": Inline,\n \"blots/scroll\": Scroll,\n \"blots/text\":
+ Text$1,\n \"modules/clipboard\": Clipboard,\n \"modules/history\": History,\n
+ \ \"modules/keyboard\": Keyboard,\n \"modules/uploader\": Uploader,\n \"modules/input\":
+ Input,\n \"modules/uiNode\": UINode\n});\nclass IndentAttributor extends
+ ClassAttributor$1 {\n add(node, value) {\n let normalizedValue = 0;\n
+ \ if (value === \"+1\" || value === \"-1\") {\n const indent = this.value(node)
+ || 0;\n normalizedValue = value === \"+1\" ? indent + 1 : indent - 1;\n
+ \ } else if (typeof value === \"number\") {\n normalizedValue = value;\n
+ \ }\n if (normalizedValue === 0) {\n this.remove(node);\n return
+ true;\n }\n return super.add(node, normalizedValue.toString());\n }\n
+ \ canAdd(node, value) {\n return super.canAdd(node, value) || super.canAdd(node,
+ parseInt(value, 10));\n }\n value(node) {\n return parseInt(super.value(node),
+ 10) || void 0;\n }\n}\nconst IndentClass = new IndentAttributor(\"indent\",
+ \"ql-indent\", {\n scope: Scope.BLOCK,\n // @ts-expect-error\n whitelist:
+ [1, 2, 3, 4, 5, 6, 7, 8]\n});\nclass Blockquote extends Block {\n}\n__publicField(Blockquote,
+ \"blotName\", \"blockquote\");\n__publicField(Blockquote, \"tagName\", \"blockquote\");\nclass
+ Header extends Block {\n static formats(domNode) {\n return this.tagName.indexOf(domNode.tagName)
+ + 1;\n }\n}\n__publicField(Header, \"blotName\", \"header\");\n__publicField(Header,
+ \"tagName\", [\"H1\", \"H2\", \"H3\", \"H4\", \"H5\", \"H6\"]);\nclass ListContainer
+ extends Container {\n}\nListContainer.blotName = \"list-container\";\nListContainer.tagName
+ = \"OL\";\nclass ListItem extends Block {\n static create(value) {\n const
+ node = super.create();\n node.setAttribute(\"data-list\", value);\n return
+ node;\n }\n static formats(domNode) {\n return domNode.getAttribute(\"data-list\")
+ || void 0;\n }\n static register() {\n Quill.register(ListContainer);\n
+ \ }\n constructor(scroll, domNode) {\n super(scroll, domNode);\n const
+ ui = domNode.ownerDocument.createElement(\"span\");\n const listEventHandler
+ = (e2) => {\n if (!scroll.isEnabled()) return;\n const format2 =
+ this.statics.formats(domNode, scroll);\n if (format2 === \"checked\")
+ {\n this.format(\"list\", \"unchecked\");\n e2.preventDefault();\n
+ \ } else if (format2 === \"unchecked\") {\n this.format(\"list\",
+ \"checked\");\n e2.preventDefault();\n }\n };\n ui.addEventListener(\"mousedown\",
+ listEventHandler);\n ui.addEventListener(\"touchstart\", listEventHandler);\n
+ \ this.attachUI(ui);\n }\n format(name, value) {\n if (name === this.statics.blotName
+ && value) {\n this.domNode.setAttribute(\"data-list\", value);\n }
+ else {\n super.format(name, value);\n }\n }\n}\nListItem.blotName
+ = \"list\";\nListItem.tagName = \"LI\";\nListContainer.allowedChildren = [ListItem];\nListItem.requiredContainer
+ = ListContainer;\nclass Bold extends Inline {\n static create() {\n return
+ super.create();\n }\n static formats() {\n return true;\n }\n optimize(context)
+ {\n super.optimize(context);\n if (this.domNode.tagName !== this.statics.tagName[0])
+ {\n this.replaceWith(this.statics.blotName);\n }\n }\n}\n__publicField(Bold,
+ \"blotName\", \"bold\");\n__publicField(Bold, \"tagName\", [\"STRONG\", \"B\"]);\nclass
+ Italic extends Bold {\n}\n__publicField(Italic, \"blotName\", \"italic\");\n__publicField(Italic,
+ \"tagName\", [\"EM\", \"I\"]);\nclass Link extends Inline {\n static create(value)
+ {\n const node = super.create(value);\n node.setAttribute(\"href\",
+ this.sanitize(value));\n node.setAttribute(\"rel\", \"noopener noreferrer\");\n
+ \ node.setAttribute(\"target\", \"_blank\");\n return node;\n }\n static
+ formats(domNode) {\n return domNode.getAttribute(\"href\");\n }\n static
+ sanitize(url2) {\n return sanitize(url2, this.PROTOCOL_WHITELIST) ? url2
+ : this.SANITIZED_URL;\n }\n format(name, value) {\n if (name !== this.statics.blotName
+ || !value) {\n super.format(name, value);\n } else {\n this.domNode.setAttribute(\"href\",
+ this.constructor.sanitize(value));\n }\n }\n}\n__publicField(Link, \"blotName\",
+ \"link\");\n__publicField(Link, \"tagName\", \"A\");\n__publicField(Link,
+ \"SANITIZED_URL\", \"about:blank\");\n__publicField(Link, \"PROTOCOL_WHITELIST\",
+ [\"http\", \"https\", \"mailto\", \"tel\", \"sms\"]);\nfunction sanitize(url2,
+ protocols) {\n const anchor = document.createElement(\"a\");\n anchor.href
+ = url2;\n const protocol = anchor.href.slice(0, anchor.href.indexOf(\":\"));\n
+ \ return protocols.indexOf(protocol) > -1;\n}\nclass Script extends Inline
+ {\n static create(value) {\n if (value === \"super\") {\n return
+ document.createElement(\"sup\");\n }\n if (value === \"sub\") {\n return
+ document.createElement(\"sub\");\n }\n return super.create(value);\n
+ \ }\n static formats(domNode) {\n if (domNode.tagName === \"SUB\") return
+ \"sub\";\n if (domNode.tagName === \"SUP\") return \"super\";\n return
+ void 0;\n }\n}\n__publicField(Script, \"blotName\", \"script\");\n__publicField(Script,
+ \"tagName\", [\"SUB\", \"SUP\"]);\nclass Strike extends Bold {\n}\n__publicField(Strike,
+ \"blotName\", \"strike\");\n__publicField(Strike, \"tagName\", [\"S\", \"STRIKE\"]);\nclass
+ Underline extends Inline {\n}\n__publicField(Underline, \"blotName\", \"underline\");\n__publicField(Underline,
+ \"tagName\", \"U\");\nclass Formula extends Embed {\n static create(value)
+ {\n if (window.katex == null) {\n throw new Error(\"Formula module
+ requires KaTeX.\");\n }\n const node = super.create(value);\n if
+ (typeof value === \"string\") {\n window.katex.render(value, node, {\n
+ \ throwOnError: false,\n errorColor: \"#f00\"\n });\n node.setAttribute(\"data-value\",
+ value);\n }\n return node;\n }\n static value(domNode) {\n return
+ domNode.getAttribute(\"data-value\");\n }\n html() {\n const {\n formula\n
+ \ } = this.value();\n return `${formula}`;\n }\n}\n__publicField(Formula,
+ \"blotName\", \"formula\");\n__publicField(Formula, \"className\", \"ql-formula\");\n__publicField(Formula,
+ \"tagName\", \"SPAN\");\nconst ATTRIBUTES$1 = [\"alt\", \"height\", \"width\"];\nclass
+ Image extends EmbedBlot$1 {\n static create(value) {\n const node = super.create(value);\n
+ \ if (typeof value === \"string\") {\n node.setAttribute(\"src\", this.sanitize(value));\n
+ \ }\n return node;\n }\n static formats(domNode) {\n return ATTRIBUTES$1.reduce((formats,
+ attribute2) => {\n if (domNode.hasAttribute(attribute2)) {\n formats[attribute2]
+ = domNode.getAttribute(attribute2);\n }\n return formats;\n },
+ {});\n }\n static match(url2) {\n return /\\.(jpe?g|gif|png)$/.test(url2)
+ || /^data:image\\/.+;base64/.test(url2);\n }\n static sanitize(url2) {\n
+ \ return sanitize(url2, [\"http\", \"https\", \"data\"]) ? url2 : \"//:0\";\n
+ \ }\n static value(domNode) {\n return domNode.getAttribute(\"src\");\n
+ \ }\n format(name, value) {\n if (ATTRIBUTES$1.indexOf(name) > -1) {\n
+ \ if (value) {\n this.domNode.setAttribute(name, value);\n }
+ else {\n this.domNode.removeAttribute(name);\n }\n } else {\n
+ \ super.format(name, value);\n }\n }\n}\n__publicField(Image, \"blotName\",
+ \"image\");\n__publicField(Image, \"tagName\", \"IMG\");\nconst ATTRIBUTES
+ = [\"height\", \"width\"];\nclass Video extends BlockEmbed {\n static create(value)
+ {\n const node = super.create(value);\n node.setAttribute(\"frameborder\",
+ \"0\");\n node.setAttribute(\"allowfullscreen\", \"true\");\n node.setAttribute(\"src\",
+ this.sanitize(value));\n return node;\n }\n static formats(domNode) {\n
+ \ return ATTRIBUTES.reduce((formats, attribute2) => {\n if (domNode.hasAttribute(attribute2))
+ {\n formats[attribute2] = domNode.getAttribute(attribute2);\n }\n
+ \ return formats;\n }, {});\n }\n static sanitize(url2) {\n return
+ Link.sanitize(url2);\n }\n static value(domNode) {\n return domNode.getAttribute(\"src\");\n
+ \ }\n format(name, value) {\n if (ATTRIBUTES.indexOf(name) > -1) {\n if
+ (value) {\n this.domNode.setAttribute(name, value);\n } else {\n
+ \ this.domNode.removeAttribute(name);\n }\n } else {\n super.format(name,
+ value);\n }\n }\n html() {\n const {\n video\n } = this.value();\n
+ \ return `${video}`;\n }\n}\n__publicField(Video,
+ \"blotName\", \"video\");\n__publicField(Video, \"className\", \"ql-video\");\n__publicField(Video,
+ \"tagName\", \"IFRAME\");\nconst TokenAttributor = new ClassAttributor$1(\"code-token\",
+ \"hljs\", {\n scope: Scope.INLINE\n});\nclass CodeToken extends Inline {\n
+ \ static formats(node, scroll) {\n while (node != null && node !== scroll.domNode)
+ {\n if (node.classList && node.classList.contains(CodeBlock.className))
+ {\n return super.formats(node, scroll);\n }\n node = node.parentNode;\n
+ \ }\n return void 0;\n }\n constructor(scroll, domNode, value) {\n
+ \ super(scroll, domNode, value);\n TokenAttributor.add(this.domNode,
+ value);\n }\n format(format2, value) {\n if (format2 !== CodeToken.blotName)
+ {\n super.format(format2, value);\n } else if (value) {\n TokenAttributor.add(this.domNode,
+ value);\n } else {\n TokenAttributor.remove(this.domNode);\n this.domNode.classList.remove(this.statics.className);\n
+ \ }\n }\n optimize() {\n super.optimize(...arguments);\n if (!TokenAttributor.value(this.domNode))
+ {\n this.unwrap();\n }\n }\n}\nCodeToken.blotName = \"code-token\";\nCodeToken.className
+ = \"ql-token\";\nclass SyntaxCodeBlock extends CodeBlock {\n static create(value)
+ {\n const domNode = super.create(value);\n if (typeof value === \"string\")
+ {\n domNode.setAttribute(\"data-language\", value);\n }\n return
+ domNode;\n }\n static formats(domNode) {\n return domNode.getAttribute(\"data-language\")
+ || \"plain\";\n }\n static register() {\n }\n // Syntax module will register\n
+ \ format(name, value) {\n if (name === this.statics.blotName && value)
+ {\n this.domNode.setAttribute(\"data-language\", value);\n } else
+ {\n super.format(name, value);\n }\n }\n replaceWith(name, value)
+ {\n this.formatAt(0, this.length(), CodeToken.blotName, false);\n return
+ super.replaceWith(name, value);\n }\n}\nclass SyntaxCodeBlockContainer extends
+ CodeBlockContainer {\n attach() {\n super.attach();\n this.forceNext
+ = false;\n this.scroll.emitMount(this);\n }\n format(name, value) {\n
+ \ if (name === SyntaxCodeBlock.blotName) {\n this.forceNext = true;\n
+ \ this.children.forEach((child) => {\n child.format(name, value);\n
+ \ });\n }\n }\n formatAt(index2, length, name, value) {\n if (name
+ === SyntaxCodeBlock.blotName) {\n this.forceNext = true;\n }\n super.formatAt(index2,
+ length, name, value);\n }\n highlight(highlight2) {\n let forced = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (this.children.head
+ == null) return;\n const nodes = Array.from(this.domNode.childNodes).filter((node)
+ => node !== this.uiNode);\n const text2 = `${nodes.map((node) => node.textContent).join(\"\\n\")}\n`;\n
+ \ const language = SyntaxCodeBlock.formats(this.children.head.domNode);\n
+ \ if (forced || this.forceNext || this.cachedText !== text2) {\n if
+ (text2.trim().length > 0 || this.cachedText == null) {\n const oldDelta
+ = this.children.reduce((delta2, child) => {\n return delta2.concat(blockDelta(child,
+ false));\n }, new Delta());\n const delta = highlight2(text2,
+ language);\n oldDelta.diff(delta).reduce((index2, _ref) => {\n let
+ {\n retain,\n attributes\n } = _ref;\n if
+ (!retain) return index2;\n if (attributes) {\n Object.keys(attributes).forEach((format2)
+ => {\n if ([SyntaxCodeBlock.blotName, CodeToken.blotName].includes(format2))
+ {\n this.formatAt(index2, retain, format2, attributes[format2]);\n
+ \ }\n });\n }\n return index2 + retain;\n
+ \ }, 0);\n }\n this.cachedText = text2;\n this.forceNext
+ = false;\n }\n }\n html(index2, length) {\n const [codeBlock] = this.children.find(index2);\n
+ \ const language = codeBlock ? SyntaxCodeBlock.formats(codeBlock.domNode)
+ : \"plain\";\n return `\n${escapeText(this.code(index2,
+ length))}\n`;\n }\n optimize(context) {\n super.optimize(context);\n
+ \ if (this.parent != null && this.children.head != null && this.uiNode !=
+ null) {\n const language = SyntaxCodeBlock.formats(this.children.head.domNode);\n
+ \ if (language !== this.uiNode.value) {\n this.uiNode.value = language;\n
+ \ }\n }\n }\n}\nSyntaxCodeBlockContainer.allowedChildren = [SyntaxCodeBlock];\nSyntaxCodeBlock.requiredContainer
+ = SyntaxCodeBlockContainer;\nSyntaxCodeBlock.allowedChildren = [CodeToken,
+ Cursor, Text$1, Break];\nconst highlight = (lib2, language, text2) => {\n
+ \ if (typeof lib2.versionString === \"string\") {\n const majorVersion
+ = lib2.versionString.split(\".\")[0];\n if (parseInt(majorVersion, 10)
+ >= 11) {\n return lib2.highlight(text2, {\n language\n }).value;\n
+ \ }\n }\n return lib2.highlight(language, text2).value;\n};\nclass Syntax
+ extends Module {\n static register() {\n Quill.register(CodeToken, true);\n
+ \ Quill.register(SyntaxCodeBlock, true);\n Quill.register(SyntaxCodeBlockContainer,
+ true);\n }\n constructor(quill, options) {\n super(quill, options);\n
+ \ if (this.options.hljs == null) {\n throw new Error(\"Syntax module
+ requires highlight.js. Please include the library on the page before Quill.\");\n
+ \ }\n this.languages = this.options.languages.reduce((memo, _ref2) =>
+ {\n let {\n key\n } = _ref2;\n memo[key] = true;\n return
+ memo;\n }, {});\n this.highlightBlot = this.highlightBlot.bind(this);\n
+ \ this.initListener();\n this.initTimer();\n }\n initListener() {\n
+ \ this.quill.on(Quill.events.SCROLL_BLOT_MOUNT, (blot) => {\n if (!(blot
+ instanceof SyntaxCodeBlockContainer)) return;\n const select = this.quill.root.ownerDocument.createElement(\"select\");\n
+ \ this.options.languages.forEach((_ref3) => {\n let {\n key,\n
+ \ label\n } = _ref3;\n const option = select.ownerDocument.createElement(\"option\");\n
+ \ option.textContent = label;\n option.setAttribute(\"value\",
+ key);\n select.appendChild(option);\n });\n select.addEventListener(\"change\",
+ () => {\n blot.format(SyntaxCodeBlock.blotName, select.value);\n this.quill.root.focus();\n
+ \ this.highlight(blot, true);\n });\n if (blot.uiNode == null)
+ {\n blot.attachUI(select);\n if (blot.children.head) {\n select.value
+ = SyntaxCodeBlock.formats(blot.children.head.domNode);\n }\n }\n
+ \ });\n }\n initTimer() {\n let timer = null;\n this.quill.on(Quill.events.SCROLL_OPTIMIZE,
+ () => {\n if (timer) {\n clearTimeout(timer);\n }\n timer
+ = setTimeout(() => {\n this.highlight();\n timer = null;\n },
+ this.options.interval);\n });\n }\n highlight() {\n let blot = arguments.length
+ > 0 && arguments[0] !== void 0 ? arguments[0] : null;\n let force = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (this.quill.selection.composing)
+ return;\n this.quill.update(Quill.sources.USER);\n const range = this.quill.getSelection();\n
+ \ const blots = blot == null ? this.quill.scroll.descendants(SyntaxCodeBlockContainer)
+ : [blot];\n blots.forEach((container) => {\n container.highlight(this.highlightBlot,
+ force);\n });\n this.quill.update(Quill.sources.SILENT);\n if (range
+ != null) {\n this.quill.setSelection(range, Quill.sources.SILENT);\n
+ \ }\n }\n highlightBlot(text2) {\n let language = arguments.length
+ > 1 && arguments[1] !== void 0 ? arguments[1] : \"plain\";\n language =
+ this.languages[language] ? language : \"plain\";\n if (language === \"plain\")
+ {\n return escapeText(text2).split(\"\\n\").reduce((delta, line, i3)
+ => {\n if (i3 !== 0) {\n delta.insert(\"\\n\", {\n [CodeBlock.blotName]:
+ language\n });\n }\n return delta.insert(line);\n },
+ new Delta());\n }\n const container = this.quill.root.ownerDocument.createElement(\"div\");\n
+ \ container.classList.add(CodeBlock.className);\n container.innerHTML
+ = highlight(this.options.hljs, language, text2);\n return traverse(this.quill.scroll,
+ container, [(node, delta) => {\n const value = TokenAttributor.value(node);\n
+ \ if (value) {\n return delta.compose(new Delta().retain(delta.length(),
+ {\n [CodeToken.blotName]: value\n }));\n }\n return
+ delta;\n }], [(node, delta) => {\n return node.data.split(\"\\n\").reduce((memo,
+ nodeText, i3) => {\n if (i3 !== 0) memo.insert(\"\\n\", {\n [CodeBlock.blotName]:
+ language\n });\n return memo.insert(nodeText);\n }, delta);\n
+ \ }], /* @__PURE__ */ new WeakMap());\n }\n}\nSyntax.DEFAULTS = {\n hljs:
+ (() => {\n return window.hljs;\n })(),\n interval: 1e3,\n languages:
+ [{\n key: \"plain\",\n label: \"Plain\"\n }, {\n key: \"bash\",\n
+ \ label: \"Bash\"\n }, {\n key: \"cpp\",\n label: \"C++\"\n }, {\n
+ \ key: \"cs\",\n label: \"C#\"\n }, {\n key: \"css\",\n label:
+ \"CSS\"\n }, {\n key: \"diff\",\n label: \"Diff\"\n }, {\n key:
+ \"xml\",\n label: \"HTML/XML\"\n }, {\n key: \"java\",\n label:
+ \"Java\"\n }, {\n key: \"javascript\",\n label: \"JavaScript\"\n },
+ {\n key: \"markdown\",\n label: \"Markdown\"\n }, {\n key: \"php\",\n
+ \ label: \"PHP\"\n }, {\n key: \"python\",\n label: \"Python\"\n
+ \ }, {\n key: \"ruby\",\n label: \"Ruby\"\n }, {\n key: \"sql\",\n
+ \ label: \"SQL\"\n }]\n};\nconst _TableCell = class _TableCell extends
+ Block {\n static create(value) {\n const node = super.create();\n if
+ (value) {\n node.setAttribute(\"data-row\", value);\n } else {\n node.setAttribute(\"data-row\",
+ tableId());\n }\n return node;\n }\n static formats(domNode) {\n if
+ (domNode.hasAttribute(\"data-row\")) {\n return domNode.getAttribute(\"data-row\");\n
+ \ }\n return void 0;\n }\n cellOffset() {\n if (this.parent) {\n
+ \ return this.parent.children.indexOf(this);\n }\n return -1;\n
+ \ }\n format(name, value) {\n if (name === _TableCell.blotName && value)
+ {\n this.domNode.setAttribute(\"data-row\", value);\n } else {\n super.format(name,
+ value);\n }\n }\n row() {\n return this.parent;\n }\n rowOffset()
+ {\n if (this.row()) {\n return this.row().rowOffset();\n }\n return
+ -1;\n }\n table() {\n return this.row() && this.row().table();\n }\n};\n__publicField(_TableCell,
+ \"blotName\", \"table\");\n__publicField(_TableCell, \"tagName\", \"TD\");\nlet
+ TableCell = _TableCell;\nclass TableRow extends Container {\n checkMerge()
+ {\n if (super.checkMerge() && this.next.children.head != null) {\n const
+ thisHead = this.children.head.formats();\n const thisTail = this.children.tail.formats();\n
+ \ const nextHead = this.next.children.head.formats();\n const nextTail
+ = this.next.children.tail.formats();\n return thisHead.table === thisTail.table
+ && thisHead.table === nextHead.table && thisHead.table === nextTail.table;\n
+ \ }\n return false;\n }\n optimize(context) {\n super.optimize(context);\n
+ \ this.children.forEach((child) => {\n if (child.next == null) return;\n
+ \ const childFormats = child.formats();\n const nextFormats = child.next.formats();\n
+ \ if (childFormats.table !== nextFormats.table) {\n const next
+ = this.splitAfter(child);\n if (next) {\n next.optimize();\n
+ \ }\n if (this.prev) {\n this.prev.optimize();\n }\n
+ \ }\n });\n }\n rowOffset() {\n if (this.parent) {\n return
+ this.parent.children.indexOf(this);\n }\n return -1;\n }\n table()
+ {\n return this.parent && this.parent.parent;\n }\n}\n__publicField(TableRow,
+ \"blotName\", \"table-row\");\n__publicField(TableRow, \"tagName\", \"TR\");\nclass
+ TableBody extends Container {\n}\n__publicField(TableBody, \"blotName\", \"table-body\");\n__publicField(TableBody,
+ \"tagName\", \"TBODY\");\nclass TableContainer extends Container {\n balanceCells()
+ {\n const rows = this.descendants(TableRow);\n const maxColumns = rows.reduce((max,
+ row) => {\n return Math.max(row.children.length, max);\n }, 0);\n
+ \ rows.forEach((row) => {\n new Array(maxColumns - row.children.length).fill(0).forEach(()
+ => {\n let value;\n if (row.children.head != null) {\n value
+ = TableCell.formats(row.children.head.domNode);\n }\n const
+ blot = this.scroll.create(TableCell.blotName, value);\n row.appendChild(blot);\n
+ \ blot.optimize();\n });\n });\n }\n cells(column) {\n return
+ this.rows().map((row) => row.children.at(column));\n }\n deleteColumn(index2)
+ {\n const [body] = this.descendant(TableBody);\n if (body == null ||
+ body.children.head == null) return;\n body.children.forEach((row) => {\n
+ \ const cell = row.children.at(index2);\n if (cell != null) {\n cell.remove();\n
+ \ }\n });\n }\n insertColumn(index2) {\n const [body] = this.descendant(TableBody);\n
+ \ if (body == null || body.children.head == null) return;\n body.children.forEach((row)
+ => {\n const ref = row.children.at(index2);\n const value = TableCell.formats(row.children.head.domNode);\n
+ \ const cell = this.scroll.create(TableCell.blotName, value);\n row.insertBefore(cell,
+ ref);\n });\n }\n insertRow(index2) {\n const [body] = this.descendant(TableBody);\n
+ \ if (body == null || body.children.head == null) return;\n const id
+ = tableId();\n const row = this.scroll.create(TableRow.blotName);\n body.children.head.children.forEach(()
+ => {\n const cell = this.scroll.create(TableCell.blotName, id);\n row.appendChild(cell);\n
+ \ });\n const ref = body.children.at(index2);\n body.insertBefore(row,
+ ref);\n }\n rows() {\n const body = this.children.head;\n if (body
+ == null) return [];\n return body.children.map((row) => row);\n }\n}\n__publicField(TableContainer,
+ \"blotName\", \"table-container\");\n__publicField(TableContainer, \"tagName\",
+ \"TABLE\");\nTableContainer.allowedChildren = [TableBody];\nTableBody.requiredContainer
+ = TableContainer;\nTableBody.allowedChildren = [TableRow];\nTableRow.requiredContainer
+ = TableBody;\nTableRow.allowedChildren = [TableCell];\nTableCell.requiredContainer
+ = TableRow;\nfunction tableId() {\n const id = Math.random().toString(36).slice(2,
+ 6);\n return `row-${id}`;\n}\nclass Table extends Module {\n static register()
+ {\n Quill.register(TableCell);\n Quill.register(TableRow);\n Quill.register(TableBody);\n
+ \ Quill.register(TableContainer);\n }\n constructor() {\n super(...arguments);\n
+ \ this.listenBalanceCells();\n }\n balanceTables() {\n this.quill.scroll.descendants(TableContainer).forEach((table2)
+ => {\n table2.balanceCells();\n });\n }\n deleteColumn() {\n const
+ [table2, , cell] = this.getTable();\n if (cell == null) return;\n table2.deleteColumn(cell.cellOffset());\n
+ \ this.quill.update(Quill.sources.USER);\n }\n deleteRow() {\n const
+ [, row] = this.getTable();\n if (row == null) return;\n row.remove();\n
+ \ this.quill.update(Quill.sources.USER);\n }\n deleteTable() {\n const
+ [table2] = this.getTable();\n if (table2 == null) return;\n const offset
+ = table2.offset();\n table2.remove();\n this.quill.update(Quill.sources.USER);\n
+ \ this.quill.setSelection(offset, Quill.sources.SILENT);\n }\n getTable()
+ {\n let range = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0]
+ : this.quill.getSelection();\n if (range == null) return [null, null, null,
+ -1];\n const [cell, offset] = this.quill.getLine(range.index);\n if
+ (cell == null || cell.statics.blotName !== TableCell.blotName) {\n return
+ [null, null, null, -1];\n }\n const row = cell.parent;\n const table2
+ = row.parent.parent;\n return [table2, row, cell, offset];\n }\n insertColumn(offset)
+ {\n const range = this.quill.getSelection();\n if (!range) return;\n
+ \ const [table2, row, cell] = this.getTable(range);\n if (cell == null)
+ return;\n const column = cell.cellOffset();\n table2.insertColumn(column
+ + offset);\n this.quill.update(Quill.sources.USER);\n let shift = row.rowOffset();\n
+ \ if (offset === 0) {\n shift += 1;\n }\n this.quill.setSelection(range.index
+ + shift, range.length, Quill.sources.SILENT);\n }\n insertColumnLeft() {\n
+ \ this.insertColumn(0);\n }\n insertColumnRight() {\n this.insertColumn(1);\n
+ \ }\n insertRow(offset) {\n const range = this.quill.getSelection();\n
+ \ if (!range) return;\n const [table2, row, cell] = this.getTable(range);\n
+ \ if (cell == null) return;\n const index2 = row.rowOffset();\n table2.insertRow(index2
+ + offset);\n this.quill.update(Quill.sources.USER);\n if (offset > 0)
+ {\n this.quill.setSelection(range, Quill.sources.SILENT);\n } else
+ {\n this.quill.setSelection(range.index + row.children.length, range.length,
+ Quill.sources.SILENT);\n }\n }\n insertRowAbove() {\n this.insertRow(0);\n
+ \ }\n insertRowBelow() {\n this.insertRow(1);\n }\n insertTable(rows,
+ columns) {\n const range = this.quill.getSelection();\n if (range ==
+ null) return;\n const delta = new Array(rows).fill(0).reduce((memo) =>
+ {\n const text2 = new Array(columns).fill(\"\\n\").join(\"\");\n return
+ memo.insert(text2, {\n table: tableId()\n });\n }, new Delta().retain(range.index));\n
+ \ this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index,
+ Quill.sources.SILENT);\n this.balanceTables();\n }\n listenBalanceCells()
+ {\n this.quill.on(Quill.events.SCROLL_OPTIMIZE, (mutations) => {\n mutations.some((mutation)
+ => {\n if ([\"TD\", \"TR\", \"TBODY\", \"TABLE\"].includes(mutation.target.tagName))
+ {\n this.quill.once(Quill.events.TEXT_CHANGE, (delta, old, source)
+ => {\n if (source !== Quill.sources.USER) return;\n this.balanceTables();\n
+ \ });\n return true;\n }\n return false;\n
+ \ });\n });\n }\n}\nconst debug = namespace(\"quill:toolbar\");\nclass
+ Toolbar extends Module {\n constructor(quill, options) {\n var _a3, _b;\n
+ \ super(quill, options);\n if (Array.isArray(this.options.container))
+ {\n const container = document.createElement(\"div\");\n container.setAttribute(\"role\",
+ \"toolbar\");\n addControls(container, this.options.container);\n (_b
+ = (_a3 = quill.container) == null ? void 0 : _a3.parentNode) == null ? void
+ 0 : _b.insertBefore(container, quill.container);\n this.container = container;\n
+ \ } else if (typeof this.options.container === \"string\") {\n this.container
+ = document.querySelector(this.options.container);\n } else {\n this.container
+ = this.options.container;\n }\n if (!(this.container instanceof HTMLElement))
+ {\n debug.error(\"Container required for toolbar\", this.options);\n
+ \ return;\n }\n this.container.classList.add(\"ql-toolbar\");\n
+ \ this.controls = [];\n this.handlers = {};\n if (this.options.handlers)
+ {\n Object.keys(this.options.handlers).forEach((format2) => {\n var
+ _a4;\n const handler = (_a4 = this.options.handlers) == null ? void
+ 0 : _a4[format2];\n if (handler) {\n this.addHandler(format2,
+ handler);\n }\n });\n }\n Array.from(this.container.querySelectorAll(\"button,
+ select\")).forEach((input) => {\n this.attach(input);\n });\n this.quill.on(Quill.events.EDITOR_CHANGE,
+ () => {\n const [range] = this.quill.selection.getRange();\n this.update(range);\n
+ \ });\n }\n addHandler(format2, handler) {\n this.handlers[format2]
+ = handler;\n }\n attach(input) {\n let format2 = Array.from(input.classList).find((className)
+ => {\n return className.indexOf(\"ql-\") === 0;\n });\n if (!format2)
+ return;\n format2 = format2.slice(\"ql-\".length);\n if (input.tagName
+ === \"BUTTON\") {\n input.setAttribute(\"type\", \"button\");\n }\n
+ \ if (this.handlers[format2] == null && this.quill.scroll.query(format2)
+ == null) {\n debug.warn(\"ignoring attaching to nonexistent format\",
+ format2, input);\n return;\n }\n const eventName = input.tagName
+ === \"SELECT\" ? \"change\" : \"click\";\n input.addEventListener(eventName,
+ (e2) => {\n let value;\n if (input.tagName === \"SELECT\") {\n if
+ (input.selectedIndex < 0) return;\n const selected = input.options[input.selectedIndex];\n
+ \ if (selected.hasAttribute(\"selected\")) {\n value = false;\n
+ \ } else {\n value = selected.value || false;\n }\n
+ \ } else {\n if (input.classList.contains(\"ql-active\")) {\n value
+ = false;\n } else {\n value = input.value || !input.hasAttribute(\"value\");\n
+ \ }\n e2.preventDefault();\n }\n this.quill.focus();\n
+ \ const [range] = this.quill.selection.getRange();\n if (this.handlers[format2]
+ != null) {\n this.handlers[format2].call(this, value);\n } else
+ if (\n // @ts-expect-error\n this.quill.scroll.query(format2).prototype
+ instanceof EmbedBlot$1\n ) {\n value = prompt(`Enter ${format2}`);\n
+ \ if (!value) return;\n this.quill.updateContents(new Delta().retain(range.index).delete(range.length).insert({\n
+ \ [format2]: value\n }), Quill.sources.USER);\n } else
+ {\n this.quill.format(format2, value, Quill.sources.USER);\n }\n
+ \ this.update(range);\n });\n this.controls.push([format2, input]);\n
+ \ }\n update(range) {\n const formats = range == null ? {} : this.quill.getFormat(range);\n
+ \ this.controls.forEach((pair) => {\n const [format2, input] = pair;\n
+ \ if (input.tagName === \"SELECT\") {\n let option = null;\n if
+ (range == null) {\n option = null;\n } else if (formats[format2]
+ == null) {\n option = input.querySelector(\"option[selected]\");\n
+ \ } else if (!Array.isArray(formats[format2])) {\n let value
+ = formats[format2];\n if (typeof value === \"string\") {\n value
+ = value.replace(/\"/g, '\\\\\"');\n }\n option = input.querySelector(`option[value=\"${value}\"]`);\n
+ \ }\n if (option == null) {\n input.value = \"\";\n
+ \ input.selectedIndex = -1;\n } else {\n option.selected
+ = true;\n }\n } else if (range == null) {\n input.classList.remove(\"ql-active\");\n
+ \ input.setAttribute(\"aria-pressed\", \"false\");\n } else if
+ (input.hasAttribute(\"value\")) {\n const value = formats[format2];\n
+ \ const isActive = value === input.getAttribute(\"value\") || value
+ != null && value.toString() === input.getAttribute(\"value\") || value ==
+ null && !input.getAttribute(\"value\");\n input.classList.toggle(\"ql-active\",
+ isActive);\n input.setAttribute(\"aria-pressed\", isActive.toString());\n
+ \ } else {\n const isActive = formats[format2] != null;\n input.classList.toggle(\"ql-active\",
+ isActive);\n input.setAttribute(\"aria-pressed\", isActive.toString());\n
+ \ }\n });\n }\n}\nToolbar.DEFAULTS = {};\nfunction addButton(container,
+ format2, value) {\n const input = document.createElement(\"button\");\n input.setAttribute(\"type\",
+ \"button\");\n input.classList.add(`ql-${format2}`);\n input.setAttribute(\"aria-pressed\",
+ \"false\");\n if (value != null) {\n input.value = value;\n input.setAttribute(\"aria-label\",
+ `${format2}: ${value}`);\n } else {\n input.setAttribute(\"aria-label\",
+ format2);\n }\n container.appendChild(input);\n}\nfunction addControls(container,
+ groups) {\n if (!Array.isArray(groups[0])) {\n groups = [groups];\n }\n
+ \ groups.forEach((controls) => {\n const group = document.createElement(\"span\");\n
+ \ group.classList.add(\"ql-formats\");\n controls.forEach((control) =>
+ {\n if (typeof control === \"string\") {\n addButton(group, control);\n
+ \ } else {\n const format2 = Object.keys(control)[0];\n const
+ value = control[format2];\n if (Array.isArray(value)) {\n addSelect(group,
+ format2, value);\n } else {\n addButton(group, format2, value);\n
+ \ }\n }\n });\n container.appendChild(group);\n });\n}\nfunction
+ addSelect(container, format2, values) {\n const input = document.createElement(\"select\");\n
+ \ input.classList.add(`ql-${format2}`);\n values.forEach((value) => {\n const
+ option = document.createElement(\"option\");\n if (value !== false) {\n
+ \ option.setAttribute(\"value\", String(value));\n } else {\n option.setAttribute(\"selected\",
+ \"selected\");\n }\n input.appendChild(option);\n });\n container.appendChild(input);\n}\nToolbar.DEFAULTS
+ = {\n container: null,\n handlers: {\n clean() {\n const range =
+ this.quill.getSelection();\n if (range == null) return;\n if (range.length
+ === 0) {\n const formats = this.quill.getFormat();\n Object.keys(formats).forEach((name)
+ => {\n if (this.quill.scroll.query(name, Scope.INLINE) != null) {\n
+ \ this.quill.format(name, false, Quill.sources.USER);\n }\n
+ \ });\n } else {\n this.quill.removeFormat(range.index,
+ range.length, Quill.sources.USER);\n }\n },\n direction(value)
+ {\n const {\n align\n } = this.quill.getFormat();\n if
+ (value === \"rtl\" && align == null) {\n this.quill.format(\"align\",
+ \"right\", Quill.sources.USER);\n } else if (!value && align === \"right\")
+ {\n this.quill.format(\"align\", false, Quill.sources.USER);\n }\n
+ \ this.quill.format(\"direction\", value, Quill.sources.USER);\n },\n
+ \ indent(value) {\n const range = this.quill.getSelection();\n const
+ formats = this.quill.getFormat(range);\n const indent = parseInt(formats.indent
+ || 0, 10);\n if (value === \"+1\" || value === \"-1\") {\n let
+ modifier = value === \"+1\" ? 1 : -1;\n if (formats.direction === \"rtl\")
+ modifier *= -1;\n this.quill.format(\"indent\", indent + modifier,
+ Quill.sources.USER);\n }\n },\n link(value) {\n if (value
+ === true) {\n value = prompt(\"Enter link URL:\");\n }\n this.quill.format(\"link\",
+ value, Quill.sources.USER);\n },\n list(value) {\n const range
+ = this.quill.getSelection();\n const formats = this.quill.getFormat(range);\n
+ \ if (value === \"check\") {\n if (formats.list === \"checked\"
+ || formats.list === \"unchecked\") {\n this.quill.format(\"list\",
+ false, Quill.sources.USER);\n } else {\n this.quill.format(\"list\",
+ \"unchecked\", Quill.sources.USER);\n }\n } else {\n this.quill.format(\"list\",
+ value, Quill.sources.USER);\n }\n }\n }\n};\nconst alignLeftIcon
+ = '';\nconst
+ alignCenterIcon = '';\nconst
+ alignRightIcon = '';\nconst
+ alignJustifyIcon = '';\nconst
+ backgroundIcon = '';\nconst
+ blockquoteIcon = '';\nconst
+ boldIcon = '';\nconst
+ cleanIcon = '';\nconst
+ codeIcon = '';\nconst
+ colorIcon = '';\nconst directionLeftToRightIcon = '';\nconst directionRightToLeftIcon = '';\nconst formulaIcon = '';\nconst
+ headerIcon = '';\nconst
+ header2Icon = '';\nconst
+ header3Icon = '';\nconst
+ header4Icon = '';\nconst
+ header5Icon = '';\nconst
+ header6Icon = '';\nconst
+ italicIcon = '';\nconst imageIcon = '';\nconst indentIcon = '';\nconst outdentIcon = '';\nconst linkIcon = '';\nconst
+ listBulletIcon = '';\nconst listCheckIcon = '';\nconst
+ listOrderedIcon = '';\nconst
+ subscriptIcon = '';\nconst
+ superscriptIcon = '';\nconst
+ strikeIcon = '';\nconst
+ tableIcon = '';\nconst
+ underlineIcon = '';\nconst videoIcon = '';\nconst
+ Icons = {\n align: {\n \"\": alignLeftIcon,\n center: alignCenterIcon,\n
+ \ right: alignRightIcon,\n justify: alignJustifyIcon\n },\n background:
+ backgroundIcon,\n blockquote: blockquoteIcon,\n bold: boldIcon,\n clean:
+ cleanIcon,\n code: codeIcon,\n \"code-block\": codeIcon,\n color: colorIcon,\n
+ \ direction: {\n \"\": directionLeftToRightIcon,\n rtl: directionRightToLeftIcon\n
+ \ },\n formula: formulaIcon,\n header: {\n \"1\": headerIcon,\n \"2\":
+ header2Icon,\n \"3\": header3Icon,\n \"4\": header4Icon,\n \"5\":
+ header5Icon,\n \"6\": header6Icon\n },\n italic: italicIcon,\n image:
+ imageIcon,\n indent: {\n \"+1\": indentIcon,\n \"-1\": outdentIcon\n
+ \ },\n link: linkIcon,\n list: {\n bullet: listBulletIcon,\n check:
+ listCheckIcon,\n ordered: listOrderedIcon\n },\n script: {\n sub:
+ subscriptIcon,\n super: superscriptIcon\n },\n strike: strikeIcon,\n
+ \ table: tableIcon,\n underline: underlineIcon,\n video: videoIcon\n};\nconst
+ DropdownIcon = '';\nlet optionsCounter = 0;\nfunction toggleAriaAttribute(element,
+ attribute2) {\n element.setAttribute(attribute2, `${!(element.getAttribute(attribute2)
+ === \"true\")}`);\n}\nclass Picker {\n constructor(select) {\n this.select
+ = select;\n this.container = document.createElement(\"span\");\n this.buildPicker();\n
+ \ this.select.style.display = \"none\";\n this.select.parentNode.insertBefore(this.container,
+ this.select);\n this.label.addEventListener(\"mousedown\", () => {\n this.togglePicker();\n
+ \ });\n this.label.addEventListener(\"keydown\", (event) => {\n switch
+ (event.key) {\n case \"Enter\":\n this.togglePicker();\n break;\n
+ \ case \"Escape\":\n this.escape();\n event.preventDefault();\n
+ \ break;\n }\n });\n this.select.addEventListener(\"change\",
+ this.update.bind(this));\n }\n togglePicker() {\n this.container.classList.toggle(\"ql-expanded\");\n
+ \ toggleAriaAttribute(this.label, \"aria-expanded\");\n toggleAriaAttribute(this.options,
+ \"aria-hidden\");\n }\n buildItem(option) {\n const item = document.createElement(\"span\");\n
+ \ item.tabIndex = \"0\";\n item.setAttribute(\"role\", \"button\");\n
+ \ item.classList.add(\"ql-picker-item\");\n const value = option.getAttribute(\"value\");\n
+ \ if (value) {\n item.setAttribute(\"data-value\", value);\n }\n
+ \ if (option.textContent) {\n item.setAttribute(\"data-label\", option.textContent);\n
+ \ }\n item.addEventListener(\"click\", () => {\n this.selectItem(item,
+ true);\n });\n item.addEventListener(\"keydown\", (event) => {\n switch
+ (event.key) {\n case \"Enter\":\n this.selectItem(item, true);\n
+ \ event.preventDefault();\n break;\n case \"Escape\":\n
+ \ this.escape();\n event.preventDefault();\n break;\n
+ \ }\n });\n return item;\n }\n buildLabel() {\n const label
+ = document.createElement(\"span\");\n label.classList.add(\"ql-picker-label\");\n
+ \ label.innerHTML = DropdownIcon;\n label.tabIndex = \"0\";\n label.setAttribute(\"role\",
+ \"button\");\n label.setAttribute(\"aria-expanded\", \"false\");\n this.container.appendChild(label);\n
+ \ return label;\n }\n buildOptions() {\n const options = document.createElement(\"span\");\n
+ \ options.classList.add(\"ql-picker-options\");\n options.setAttribute(\"aria-hidden\",
+ \"true\");\n options.tabIndex = \"-1\";\n options.id = `ql-picker-options-${optionsCounter}`;\n
+ \ optionsCounter += 1;\n this.label.setAttribute(\"aria-controls\", options.id);\n
+ \ this.options = options;\n Array.from(this.select.options).forEach((option)
+ => {\n const item = this.buildItem(option);\n options.appendChild(item);\n
+ \ if (option.selected === true) {\n this.selectItem(item);\n }\n
+ \ });\n this.container.appendChild(options);\n }\n buildPicker() {\n
+ \ Array.from(this.select.attributes).forEach((item) => {\n this.container.setAttribute(item.name,
+ item.value);\n });\n this.container.classList.add(\"ql-picker\");\n
+ \ this.label = this.buildLabel();\n this.buildOptions();\n }\n escape()
+ {\n this.close();\n setTimeout(() => this.label.focus(), 1);\n }\n
+ \ close() {\n this.container.classList.remove(\"ql-expanded\");\n this.label.setAttribute(\"aria-expanded\",
+ \"false\");\n this.options.setAttribute(\"aria-hidden\", \"true\");\n }\n
+ \ selectItem(item) {\n let trigger = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : false;\n const selected = this.container.querySelector(\".ql-selected\");\n
+ \ if (item === selected) return;\n if (selected != null) {\n selected.classList.remove(\"ql-selected\");\n
+ \ }\n if (item == null) return;\n item.classList.add(\"ql-selected\");\n
+ \ this.select.selectedIndex = Array.from(item.parentNode.children).indexOf(item);\n
+ \ if (item.hasAttribute(\"data-value\")) {\n this.label.setAttribute(\"data-value\",
+ item.getAttribute(\"data-value\"));\n } else {\n this.label.removeAttribute(\"data-value\");\n
+ \ }\n if (item.hasAttribute(\"data-label\")) {\n this.label.setAttribute(\"data-label\",
+ item.getAttribute(\"data-label\"));\n } else {\n this.label.removeAttribute(\"data-label\");\n
+ \ }\n if (trigger) {\n this.select.dispatchEvent(new Event(\"change\"));\n
+ \ this.close();\n }\n }\n update() {\n let option;\n if (this.select.selectedIndex
+ > -1) {\n const item = (\n // @ts-expect-error Fix me later\n
+ \ this.container.querySelector(\".ql-picker-options\").children[this.select.selectedIndex]\n
+ \ );\n option = this.select.options[this.select.selectedIndex];\n
+ \ this.selectItem(item);\n } else {\n this.selectItem(null);\n
+ \ }\n const isActive = option != null && option !== this.select.querySelector(\"option[selected]\");\n
+ \ this.label.classList.toggle(\"ql-active\", isActive);\n }\n}\nclass ColorPicker
+ extends Picker {\n constructor(select, label) {\n super(select);\n this.label.innerHTML
+ = label;\n this.container.classList.add(\"ql-color-picker\");\n Array.from(this.container.querySelectorAll(\".ql-picker-item\")).slice(0,
+ 7).forEach((item) => {\n item.classList.add(\"ql-primary\");\n });\n
+ \ }\n buildItem(option) {\n const item = super.buildItem(option);\n item.style.backgroundColor
+ = option.getAttribute(\"value\") || \"\";\n return item;\n }\n selectItem(item,
+ trigger) {\n super.selectItem(item, trigger);\n const colorLabel = this.label.querySelector(\".ql-color-label\");\n
+ \ const value = item ? item.getAttribute(\"data-value\") || \"\" : \"\";\n
+ \ if (colorLabel) {\n if (colorLabel.tagName === \"line\") {\n colorLabel.style.stroke
+ = value;\n } else {\n colorLabel.style.fill = value;\n }\n
+ \ }\n }\n}\nclass IconPicker extends Picker {\n constructor(select, icons2)
+ {\n super(select);\n this.container.classList.add(\"ql-icon-picker\");\n
+ \ Array.from(this.container.querySelectorAll(\".ql-picker-item\")).forEach((item)
+ => {\n item.innerHTML = icons2[item.getAttribute(\"data-value\") || \"\"];\n
+ \ });\n this.defaultItem = this.container.querySelector(\".ql-selected\");\n
+ \ this.selectItem(this.defaultItem);\n }\n selectItem(target, trigger)
+ {\n super.selectItem(target, trigger);\n const item = target || this.defaultItem;\n
+ \ if (item != null) {\n if (this.label.innerHTML === item.innerHTML)
+ return;\n this.label.innerHTML = item.innerHTML;\n }\n }\n}\nconst
+ isScrollable = (el) => {\n const {\n overflowY\n } = getComputedStyle(el,
+ null);\n return overflowY !== \"visible\" && overflowY !== \"clip\";\n};\nclass
+ Tooltip {\n constructor(quill, boundsContainer) {\n this.quill = quill;\n
+ \ this.boundsContainer = boundsContainer || document.body;\n this.root
+ = quill.addContainer(\"ql-tooltip\");\n this.root.innerHTML = this.constructor.TEMPLATE;\n
+ \ if (isScrollable(this.quill.root)) {\n this.quill.root.addEventListener(\"scroll\",
+ () => {\n this.root.style.marginTop = `${-1 * this.quill.root.scrollTop}px`;\n
+ \ });\n }\n this.hide();\n }\n hide() {\n this.root.classList.add(\"ql-hidden\");\n
+ \ }\n position(reference2) {\n const left = reference2.left + reference2.width
+ / 2 - this.root.offsetWidth / 2;\n const top = reference2.bottom + this.quill.root.scrollTop;\n
+ \ this.root.style.left = `${left}px`;\n this.root.style.top = `${top}px`;\n
+ \ this.root.classList.remove(\"ql-flip\");\n const containerBounds =
+ this.boundsContainer.getBoundingClientRect();\n const rootBounds = this.root.getBoundingClientRect();\n
+ \ let shift = 0;\n if (rootBounds.right > containerBounds.right) {\n
+ \ shift = containerBounds.right - rootBounds.right;\n this.root.style.left
+ = `${left + shift}px`;\n }\n if (rootBounds.left < containerBounds.left)
+ {\n shift = containerBounds.left - rootBounds.left;\n this.root.style.left
+ = `${left + shift}px`;\n }\n if (rootBounds.bottom > containerBounds.bottom)
+ {\n const height = rootBounds.bottom - rootBounds.top;\n const verticalShift
+ = reference2.bottom - reference2.top + height;\n this.root.style.top
+ = `${top - verticalShift}px`;\n this.root.classList.add(\"ql-flip\");\n
+ \ }\n return shift;\n }\n show() {\n this.root.classList.remove(\"ql-editing\");\n
+ \ this.root.classList.remove(\"ql-hidden\");\n }\n}\nconst ALIGNS = [false,
+ \"center\", \"right\", \"justify\"];\nconst COLORS = [\"#000000\", \"#e60000\",
+ \"#ff9900\", \"#ffff00\", \"#008a00\", \"#0066cc\", \"#9933ff\", \"#ffffff\",
+ \"#facccc\", \"#ffebcc\", \"#ffffcc\", \"#cce8cc\", \"#cce0f5\", \"#ebd6ff\",
+ \"#bbbbbb\", \"#f06666\", \"#ffc266\", \"#ffff66\", \"#66b966\", \"#66a3e0\",
+ \"#c285ff\", \"#888888\", \"#a10000\", \"#b26b00\", \"#b2b200\", \"#006100\",
+ \"#0047b2\", \"#6b24b2\", \"#444444\", \"#5c0000\", \"#663d00\", \"#666600\",
+ \"#003700\", \"#002966\", \"#3d1466\"];\nconst FONTS = [false, \"serif\",
+ \"monospace\"];\nconst HEADERS = [\"1\", \"2\", \"3\", false];\nconst SIZES
+ = [\"small\", false, \"large\", \"huge\"];\nclass BaseTheme extends Theme
+ {\n constructor(quill, options) {\n super(quill, options);\n const
+ listener = (e2) => {\n if (!document.body.contains(quill.root)) {\n document.body.removeEventListener(\"click\",
+ listener);\n return;\n }\n if (this.tooltip != null && //
+ @ts-expect-error\n !this.tooltip.root.contains(e2.target) && // @ts-expect-error\n
+ \ document.activeElement !== this.tooltip.textbox && !this.quill.hasFocus())
+ {\n this.tooltip.hide();\n }\n if (this.pickers != null)
+ {\n this.pickers.forEach((picker) => {\n if (!picker.container.contains(e2.target))
+ {\n picker.close();\n }\n });\n }\n };\n
+ \ quill.emitter.listenDOM(\"click\", document.body, listener);\n }\n addModule(name)
+ {\n const module2 = super.addModule(name);\n if (name === \"toolbar\")
+ {\n this.extendToolbar(module2);\n }\n return module2;\n }\n buildButtons(buttons,
+ icons2) {\n Array.from(buttons).forEach((button) => {\n const className
+ = button.getAttribute(\"class\") || \"\";\n className.split(/\\s+/).forEach((name)
+ => {\n if (!name.startsWith(\"ql-\")) return;\n name = name.slice(\"ql-\".length);\n
+ \ if (icons2[name] == null) return;\n if (name === \"direction\")
+ {\n button.innerHTML = icons2[name][\"\"] + icons2[name].rtl;\n }
+ else if (typeof icons2[name] === \"string\") {\n button.innerHTML
+ = icons2[name];\n } else {\n const value = button.value ||
+ \"\";\n if (value != null && icons2[name][value]) {\n button.innerHTML
+ = icons2[name][value];\n }\n }\n });\n });\n }\n
+ \ buildPickers(selects, icons2) {\n this.pickers = Array.from(selects).map((select)
+ => {\n if (select.classList.contains(\"ql-align\")) {\n if (select.querySelector(\"option\")
+ == null) {\n fillSelect(select, ALIGNS);\n }\n if (typeof
+ icons2.align === \"object\") {\n return new IconPicker(select, icons2.align);\n
+ \ }\n }\n if (select.classList.contains(\"ql-background\")
+ || select.classList.contains(\"ql-color\")) {\n const format2 = select.classList.contains(\"ql-background\")
+ ? \"background\" : \"color\";\n if (select.querySelector(\"option\")
+ == null) {\n fillSelect(select, COLORS, format2 === \"background\"
+ ? \"#ffffff\" : \"#000000\");\n }\n return new ColorPicker(select,
+ icons2[format2]);\n }\n if (select.querySelector(\"option\") ==
+ null) {\n if (select.classList.contains(\"ql-font\")) {\n fillSelect(select,
+ FONTS);\n } else if (select.classList.contains(\"ql-header\")) {\n
+ \ fillSelect(select, HEADERS);\n } else if (select.classList.contains(\"ql-size\"))
+ {\n fillSelect(select, SIZES);\n }\n }\n return
+ new Picker(select);\n });\n const update = () => {\n this.pickers.forEach((picker)
+ => {\n picker.update();\n });\n };\n this.quill.on(Emitter.events.EDITOR_CHANGE,
+ update);\n }\n}\nBaseTheme.DEFAULTS = merge({}, Theme.DEFAULTS, {\n modules:
+ {\n toolbar: {\n handlers: {\n formula() {\n this.quill.theme.tooltip.edit(\"formula\");\n
+ \ },\n image() {\n let fileInput = this.container.querySelector(\"input.ql-image[type=file]\");\n
+ \ if (fileInput == null) {\n fileInput = document.createElement(\"input\");\n
+ \ fileInput.setAttribute(\"type\", \"file\");\n fileInput.setAttribute(\"accept\",
+ this.quill.uploader.options.mimetypes.join(\", \"));\n fileInput.classList.add(\"ql-image\");\n
+ \ fileInput.addEventListener(\"change\", () => {\n const
+ range = this.quill.getSelection(true);\n this.quill.uploader.upload(range,
+ fileInput.files);\n fileInput.value = \"\";\n });\n
+ \ this.container.appendChild(fileInput);\n }\n fileInput.click();\n
+ \ },\n video() {\n this.quill.theme.tooltip.edit(\"video\");\n
+ \ }\n }\n }\n }\n});\nclass BaseTooltip extends Tooltip {\n
+ \ constructor(quill, boundsContainer) {\n super(quill, boundsContainer);\n
+ \ this.textbox = this.root.querySelector('input[type=\"text\"]');\n this.listen();\n
+ \ }\n listen() {\n this.textbox.addEventListener(\"keydown\", (event)
+ => {\n if (event.key === \"Enter\") {\n this.save();\n event.preventDefault();\n
+ \ } else if (event.key === \"Escape\") {\n this.cancel();\n event.preventDefault();\n
+ \ }\n });\n }\n cancel() {\n this.hide();\n this.restoreFocus();\n
+ \ }\n edit() {\n let mode = arguments.length > 0 && arguments[0] !== void
+ 0 ? arguments[0] : \"link\";\n let preview = arguments.length > 1 && arguments[1]
+ !== void 0 ? arguments[1] : null;\n this.root.classList.remove(\"ql-hidden\");\n
+ \ this.root.classList.add(\"ql-editing\");\n if (this.textbox == null)
+ return;\n if (preview != null) {\n this.textbox.value = preview;\n
+ \ } else if (mode !== this.root.getAttribute(\"data-mode\")) {\n this.textbox.value
+ = \"\";\n }\n const bounds = this.quill.getBounds(this.quill.selection.savedRange);\n
+ \ if (bounds != null) {\n this.position(bounds);\n }\n this.textbox.select();\n
+ \ this.textbox.setAttribute(\"placeholder\", this.textbox.getAttribute(`data-${mode}`)
+ || \"\");\n this.root.setAttribute(\"data-mode\", mode);\n }\n restoreFocus()
+ {\n this.quill.focus({\n preventScroll: true\n });\n }\n save()
+ {\n let {\n value\n } = this.textbox;\n switch (this.root.getAttribute(\"data-mode\"))
+ {\n case \"link\": {\n const {\n scrollTop\n }
+ = this.quill.root;\n if (this.linkRange) {\n this.quill.formatText(this.linkRange,
+ \"link\", value, Emitter.sources.USER);\n delete this.linkRange;\n
+ \ } else {\n this.restoreFocus();\n this.quill.format(\"link\",
+ value, Emitter.sources.USER);\n }\n this.quill.root.scrollTop
+ = scrollTop;\n break;\n }\n case \"video\": {\n value
+ = extractVideoUrl(value);\n }\n // eslint-disable-next-line no-fallthrough\n
+ \ case \"formula\": {\n if (!value) break;\n const range
+ = this.quill.getSelection(true);\n if (range != null) {\n const
+ index2 = range.index + range.length;\n this.quill.insertEmbed(\n
+ \ index2,\n // @ts-expect-error Fix me later\n this.root.getAttribute(\"data-mode\"),\n
+ \ value,\n Emitter.sources.USER\n );\n if
+ (this.root.getAttribute(\"data-mode\") === \"formula\") {\n this.quill.insertText(index2
+ + 1, \" \", Emitter.sources.USER);\n }\n this.quill.setSelection(index2
+ + 2, Emitter.sources.USER);\n }\n break;\n }\n }\n this.textbox.value
+ = \"\";\n this.hide();\n }\n}\nfunction extractVideoUrl(url2) {\n let
+ match3 = url2.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtube\\.com\\/watch.*v=([a-zA-Z0-9_-]+)/)
+ || url2.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtu\\.be\\/([a-zA-Z0-9_-]+)/);\n
+ \ if (match3) {\n return `${match3[1] || \"https\"}://www.youtube.com/embed/${match3[2]}?showinfo=0`;\n
+ \ }\n if (match3 = url2.match(/^(?:(https?):\\/\\/)?(?:www\\.)?vimeo\\.com\\/(\\d+)/))
+ {\n return `${match3[1] || \"https\"}://player.vimeo.com/video/${match3[2]}/`;\n
+ \ }\n return url2;\n}\nfunction fillSelect(select, values) {\n let defaultValue
+ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n
+ \ values.forEach((value) => {\n const option = document.createElement(\"option\");\n
+ \ if (value === defaultValue) {\n option.setAttribute(\"selected\",
+ \"selected\");\n } else {\n option.setAttribute(\"value\", String(value));\n
+ \ }\n select.appendChild(option);\n });\n}\nconst TOOLBAR_CONFIG$1 =
+ [[\"bold\", \"italic\", \"link\"], [{\n header: 1\n}, {\n header: 2\n},
+ \"blockquote\"]];\nclass BubbleTooltip extends BaseTooltip {\n constructor(quill,
+ bounds) {\n super(quill, bounds);\n this.quill.on(Emitter.events.EDITOR_CHANGE,
+ (type, range, oldRange, source) => {\n if (type !== Emitter.events.SELECTION_CHANGE)
+ return;\n if (range != null && range.length > 0 && source === Emitter.sources.USER)
+ {\n this.show();\n this.root.style.left = \"0px\";\n this.root.style.width
+ = \"\";\n this.root.style.width = `${this.root.offsetWidth}px`;\n const
+ lines = this.quill.getLines(range.index, range.length);\n if (lines.length
+ === 1) {\n const bounds2 = this.quill.getBounds(range);\n if
+ (bounds2 != null) {\n this.position(bounds2);\n }\n }
+ else {\n const lastLine = lines[lines.length - 1];\n const
+ index2 = this.quill.getIndex(lastLine);\n const length = Math.min(lastLine.length()
+ - 1, range.index + range.length - index2);\n const indexBounds =
+ this.quill.getBounds(new Range$1(index2, length));\n if (indexBounds
+ != null) {\n this.position(indexBounds);\n }\n }\n
+ \ } else if (document.activeElement !== this.textbox && this.quill.hasFocus())
+ {\n this.hide();\n }\n });\n }\n listen() {\n super.listen();\n
+ \ this.root.querySelector(\".ql-close\").addEventListener(\"click\", ()
+ => {\n this.root.classList.remove(\"ql-editing\");\n });\n this.quill.on(Emitter.events.SCROLL_OPTIMIZE,
+ () => {\n setTimeout(() => {\n if (this.root.classList.contains(\"ql-hidden\"))
+ return;\n const range = this.quill.getSelection();\n if (range
+ != null) {\n const bounds = this.quill.getBounds(range);\n if
+ (bounds != null) {\n this.position(bounds);\n }\n }\n
+ \ }, 1);\n });\n }\n cancel() {\n this.show();\n }\n position(reference2)
+ {\n const shift = super.position(reference2);\n const arrow = this.root.querySelector(\".ql-tooltip-arrow\");\n
+ \ arrow.style.marginLeft = \"\";\n if (shift !== 0) {\n arrow.style.marginLeft
+ = `${-1 * shift - arrow.offsetWidth / 2}px`;\n }\n return shift;\n }\n}\n__publicField(BubbleTooltip,
+ \"TEMPLATE\", ['', '\"].join(\"\"));\nclass
+ BubbleTheme extends BaseTheme {\n constructor(quill, options) {\n if (options.modules.toolbar
+ != null && options.modules.toolbar.container == null) {\n options.modules.toolbar.container
+ = TOOLBAR_CONFIG$1;\n }\n super(quill, options);\n this.quill.container.classList.add(\"ql-bubble\");\n
+ \ }\n extendToolbar(toolbar) {\n this.tooltip = new BubbleTooltip(this.quill,
+ this.options.bounds);\n if (toolbar.container != null) {\n this.tooltip.root.appendChild(toolbar.container);\n
+ \ this.buildButtons(toolbar.container.querySelectorAll(\"button\"), Icons);\n
+ \ this.buildPickers(toolbar.container.querySelectorAll(\"select\"), Icons);\n
+ \ }\n }\n}\nBubbleTheme.DEFAULTS = merge({}, BaseTheme.DEFAULTS, {\n modules:
+ {\n toolbar: {\n handlers: {\n link(value) {\n if
+ (!value) {\n this.quill.format(\"link\", false, Quill.sources.USER);\n
+ \ } else {\n this.quill.theme.tooltip.edit();\n }\n
+ \ }\n }\n }\n }\n});\nconst TOOLBAR_CONFIG = [[{\n header:
+ [\"1\", \"2\", \"3\", false]\n}], [\"bold\", \"italic\", \"underline\", \"link\"],
+ [{\n list: \"ordered\"\n}, {\n list: \"bullet\"\n}], [\"clean\"]];\nclass
+ SnowTooltip extends BaseTooltip {\n constructor() {\n super(...arguments);\n
+ \ __publicField(this, \"preview\", this.root.querySelector(\"a.ql-preview\"));\n
+ \ }\n listen() {\n super.listen();\n this.root.querySelector(\"a.ql-action\").addEventListener(\"click\",
+ (event) => {\n if (this.root.classList.contains(\"ql-editing\")) {\n
+ \ this.save();\n } else {\n this.edit(\"link\", this.preview.textContent);\n
+ \ }\n event.preventDefault();\n });\n this.root.querySelector(\"a.ql-remove\").addEventListener(\"click\",
+ (event) => {\n if (this.linkRange != null) {\n const range = this.linkRange;\n
+ \ this.restoreFocus();\n this.quill.formatText(range, \"link\",
+ false, Emitter.sources.USER);\n delete this.linkRange;\n }\n event.preventDefault();\n
+ \ this.hide();\n });\n this.quill.on(Emitter.events.SELECTION_CHANGE,
+ (range, oldRange, source) => {\n if (range == null) return;\n if
+ (range.length === 0 && source === Emitter.sources.USER) {\n const [link2,
+ offset] = this.quill.scroll.descendant(Link, range.index);\n if (link2
+ != null) {\n this.linkRange = new Range$1(range.index - offset, link2.length());\n
+ \ const preview = Link.formats(link2.domNode);\n this.preview.textContent
+ = preview;\n this.preview.setAttribute(\"href\", preview);\n this.show();\n
+ \ const bounds = this.quill.getBounds(this.linkRange);\n if
+ (bounds != null) {\n this.position(bounds);\n }\n return;\n
+ \ }\n } else {\n delete this.linkRange;\n }\n this.hide();\n
+ \ });\n }\n show() {\n super.show();\n this.root.removeAttribute(\"data-mode\");\n
+ \ }\n}\n__publicField(SnowTooltip, \"TEMPLATE\", ['',
+ '', '', ''].join(\"\"));\nclass
+ SnowTheme extends BaseTheme {\n constructor(quill, options) {\n if (options.modules.toolbar
+ != null && options.modules.toolbar.container == null) {\n options.modules.toolbar.container
+ = TOOLBAR_CONFIG;\n }\n super(quill, options);\n this.quill.container.classList.add(\"ql-snow\");\n
+ \ }\n extendToolbar(toolbar) {\n if (toolbar.container != null) {\n toolbar.container.classList.add(\"ql-snow\");\n
+ \ this.buildButtons(toolbar.container.querySelectorAll(\"button\"), Icons);\n
+ \ this.buildPickers(toolbar.container.querySelectorAll(\"select\"), Icons);\n
+ \ this.tooltip = new SnowTooltip(this.quill, this.options.bounds);\n if
+ (toolbar.container.querySelector(\".ql-link\")) {\n this.quill.keyboard.addBinding({\n
+ \ key: \"k\",\n shortKey: true\n }, (_range, context)
+ => {\n toolbar.handlers.link.call(toolbar, !context.format.link);\n
+ \ });\n }\n }\n }\n}\nSnowTheme.DEFAULTS = merge({}, BaseTheme.DEFAULTS,
+ {\n modules: {\n toolbar: {\n handlers: {\n link(value) {\n
+ \ if (value) {\n const range = this.quill.getSelection();\n
+ \ if (range == null || range.length === 0) return;\n let
+ preview = this.quill.getText(range);\n if (/^\\S+@\\S+\\.\\S+$/.test(preview)
+ && preview.indexOf(\"mailto:\") !== 0) {\n preview = `mailto:${preview}`;\n
+ \ }\n const {\n tooltip\n } =
+ this.quill.theme;\n tooltip.edit(\"link\", preview);\n }
+ else {\n this.quill.format(\"link\", false, Quill.sources.USER);\n
+ \ }\n }\n }\n }\n }\n});\nQuill.register({\n \"attributors/attribute/direction\":
+ DirectionAttribute,\n \"attributors/class/align\": AlignClass,\n \"attributors/class/background\":
+ BackgroundClass,\n \"attributors/class/color\": ColorClass,\n \"attributors/class/direction\":
+ DirectionClass,\n \"attributors/class/font\": FontClass,\n \"attributors/class/size\":
+ SizeClass,\n \"attributors/style/align\": AlignStyle,\n \"attributors/style/background\":
+ BackgroundStyle,\n \"attributors/style/color\": ColorStyle,\n \"attributors/style/direction\":
+ DirectionStyle,\n \"attributors/style/font\": FontStyle,\n \"attributors/style/size\":
+ SizeStyle\n}, true);\nQuill.register({\n \"formats/align\": AlignClass,\n
+ \ \"formats/direction\": DirectionClass,\n \"formats/indent\": IndentClass,\n
+ \ \"formats/background\": BackgroundStyle,\n \"formats/color\": ColorStyle,\n
+ \ \"formats/font\": FontClass,\n \"formats/size\": SizeClass,\n \"formats/blockquote\":
+ Blockquote,\n \"formats/code-block\": CodeBlock,\n \"formats/header\": Header,\n
+ \ \"formats/list\": ListItem,\n \"formats/bold\": Bold,\n \"formats/code\":
+ Code,\n \"formats/italic\": Italic,\n \"formats/link\": Link,\n \"formats/script\":
+ Script,\n \"formats/strike\": Strike,\n \"formats/underline\": Underline,\n
+ \ \"formats/formula\": Formula,\n \"formats/image\": Image,\n \"formats/video\":
+ Video,\n \"modules/syntax\": Syntax,\n \"modules/table\": Table,\n \"modules/toolbar\":
+ Toolbar,\n \"themes/bubble\": BubbleTheme,\n \"themes/snow\": SnowTheme,\n
+ \ \"ui/icons\": Icons,\n \"ui/picker\": Picker,\n \"ui/icon-picker\": IconPicker,\n
+ \ \"ui/color-picker\": ColorPicker,\n \"ui/tooltip\": Tooltip\n}, true);\nconst
+ RichtextMixin = {\n name: \"richtext-mixin\",\n initialState: {\n quill:
+ null\n },\n created() {\n importInlineCSS(\"quill\", () => import(\"./quill.snow-BMrontFB.js\"));\n
+ \ this.quill = null;\n this.listCallbacks.attach(\n this.addCallback.bind(this),\n
+ \ \"RichtextMixin:addCallback\"\n );\n },\n getPlaceHolderValue()
+ {\n return this.element.hasAttribute(\"placeholder\") ? this.element.getAttribute(\"placeholder\")
+ : \"\";\n },\n addCallback(value, listCallbacks) {\n if (this.quill ==
+ null) {\n const toolbarOptions = [\n [\"bold\", \"italic\"],\n
+ \ [\"blockquote\"],\n [{ header: [1, 2, 3, 4, 5, 6, false] }],\n
+ \ [{ list: \"ordered\" }, { list: \"bullet\" }],\n [\"link\"],\n
+ \ [\"clean\"]\n ];\n const richtext = this.element.querySelector(\n
+ \ \"[data-richtext]\"\n );\n this.quill = new Quill(richtext,
+ {\n modules: { toolbar: toolbarOptions },\n placeholder: this.getPlaceHolderValue(),\n
+ \ theme: \"snow\"\n });\n }\n const mdParser = new MarkdownIt({\n
+ \ html: true\n });\n const formattedValue = this.value.replace(/\\r\\n|\\n/g,
+ \"
\");\n const html = mdParser.render(formattedValue);\n const delta
+ = this.quill.clipboard.convert({ html });\n this.quill.setContents(delta);\n
+ \ if (this.isRequired()) {\n this.createHiddenRequiredInput();\n this.quill.on(\"text-change\",
+ this.onTextChange.bind(this));\n }\n const nextProcessor = listCallbacks.shift();\n
+ \ if (nextProcessor) nextProcessor(value, listCallbacks);\n },\n isRequired()
+ {\n return Array.from(this.element.attributes).some(\n (attr) => attr.name
+ === \"required\"\n );\n },\n createHiddenRequiredInput() {\n const
+ attributeName = this.getAttributeValue(\"name\");\n this.hiddenInput =
+ document.querySelector(\n `input[name=\"${`${attributeName}-hidden`}\"]`\n
+ \ );\n if (!this.hiddenInput) {\n this.hiddenInput = this.createHiddenInput(`${attributeName}-hidden`);\n
+ \ this.element.appendChild(this.hiddenInput);\n this.addInvalidEventListener();\n
+ \ }\n this.hiddenInput.value = this.quill.getText();\n },\n createHiddenInput(attributeName)
+ {\n const input = document.createElement(\"input\");\n input.name =
+ attributeName;\n input.setAttribute(\"required\", \"true\");\n input.style.opacity
+ = \"0\";\n input.style.position = \"absolute\";\n input.style.pointerEvents
+ = \"none\";\n return input;\n },\n getAttributeValue(attributeName) {\n
+ \ const attribute2 = Array.from(this.element.attributes).find(\n (attr)
+ => attr.name === attributeName\n );\n return attribute2 ? attribute2.value
+ : \"\";\n },\n displayCustomErrorMessage(message) {\n const richtext
+ = this.element.querySelector(\"[data-richtext]\");\n if (richtext) {\n
+ \ let errorMessageElement = richtext.querySelector(\n \".required-error-message\"\n
+ \ );\n if (!errorMessageElement) {\n errorMessageElement =
+ document.createElement(\"div\");\n errorMessageElement.className =
+ \"required-error-message\";\n }\n richtext.appendChild(errorMessageElement);\n
+ \ errorMessageElement.textContent = message;\n richtext.classList.add(\"error-border-richtext\");\n
+ \ }\n },\n addInvalidEventListener() {\n this.hiddenInput.addEventListener(\"invalid\",
+ (e2) => {\n e2.preventDefault();\n this.displayCustomErrorMessage(\"Please
+ fill out this field.\");\n });\n },\n onTextChange() {\n this.hiddenInput.value
+ = this.quill.getText();\n this.removeErrorMessageAndStyling();\n },\n
+ \ removeErrorMessageAndStyling() {\n const richtext = this.element.querySelector(\"[data-richtext]\");\n
+ \ const errorMessageElement = richtext.querySelector(\n \".required-error-message\"\n
+ \ );\n if (errorMessageElement) errorMessageElement.remove();\n richtext.classList.remove(\"error-border-richtext\");\n
+ \ }\n};\nconst callbackDirectory = {\n autocompletion: AutocompletionMixin,\n
+ \ richtext: RichtextMixin,\n editor: EditorMixin\n};\nconst index$3 = /*
+ @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__:
+ null,\n AutocompletionMixin,\n EditorMixin,\n RichtextMixin,\n callbackDirectory\n},
+ Symbol.toStringTag, { value: \"Module\" }));\nconst AddableMixin = {\n name:
+ \"addable-mixin\",\n created() {\n this.listTemplateAdditions.attach(\n
+ \ this.addableValue.bind(this),\n \"AddableMixin:addableValue\"\n
+ \ );\n },\n getAddableAttributes() {\n const addableAttr = Array.from(this.element.attributes).filter(\n
+ \ (a2) => a2.name.startsWith(\"addable-\")\n );\n const cleanAddableAttr
+ = {};\n for (const attr of addableAttr)\n cleanAddableAttr[attr.name.replace(\"addable-\",
+ \"\")] = attr.value;\n if (!Object.hasOwn(cleanAddableAttr, \"data-src\"))\n
+ \ cleanAddableAttr[\"data-src\"] = this.range;\n return cleanAddableAttr;\n
+ \ },\n addableValue(template, listTemplateAdditions, attributes) {\n const
+ addables = this.getAddableAttributes(attributes);\n const newTemplate =
+ x`\n ${template}\n \n \n
+ \ `;\n const nextProcessor = listTemplateAdditions.shift();\n if (nextProcessor)
+ nextProcessor(newTemplate, listTemplateAdditions);\n }\n};\nconst LabelLastMixin
+ = {\n name: \"label-last-mixin\",\n created() {\n this.listTemplateAdditions.attach(\n
+ \ this.addLabelLast.bind(this),\n \"LabelLastMixin:addLabelLast\"\n
+ \ );\n },\n addLabelLast(template, listTemplateAdditions) {\n const
+ newTemplate = x`${template}`;\n const
+ nextProcessor = listTemplateAdditions.shift();\n if (nextProcessor) nextProcessor(newTemplate,
+ listTemplateAdditions);\n }\n};\nconst LabelMixin = {\n name: \"label-mixin\",\n
+ \ created() {\n this.listAttributes.id = uniqID();\n this.listTemplateAdditions.attach(\n
+ \ this.addLabel.bind(this),\n \"LabelMixin:addLabel\"\n );\n },\n
+ \ addLabel(template, listTemplateAdditions) {\n const newTemplate = x`${template}`;\n
+ \ const nextProcessor = listTemplateAdditions.shift();\n if (nextProcessor)
+ nextProcessor(newTemplate, listTemplateAdditions);\n }\n};\nconst templateAdditionDirectory
+ = {\n label: LabelMixin,\n labellast: LabelLastMixin,\n addable: AddableMixin\n};\nconst
+ index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n
+ \ __proto__: null,\n AddableMixin,\n LabelLastMixin,\n LabelMixin,\n templateAdditionDirectory\n},
+ Symbol.toStringTag, { value: \"Module\" }));\nconst LinkTextMixin = {\n name:
+ \"link-text-mixin\",\n attributes: {\n linkText: {\n type: String,\n
+ \ default: \"\",\n callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"linkText\");\n }\n }\n }\n};\nconst defaultTemplates = {\n action:
+ {\n template: (value, attributes) => x`\n \n ${attributes.linkText == null ? attributes.name || \"\" :
+ attributes.linkText}\n \n `,\n dependencies: [LinkTextMixin]\n
+ \ },\n multiple: {\n template: (value, attributes) => x`\n \n `,\n dependencies: []\n }\n};\nconst AltMixin
+ = {\n name: \"alt-mixin\",\n attributes: {\n alt: {\n type: String,\n
+ \ callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"alt\");\n }\n }\n }\n};\nconst EditableMixin = {\n name: \"editable-mixin\",\n
+ \ use: [StoreMixin],\n // used to get context\n attributes: {\n editable:
+ {\n type: Boolean,\n default: null,\n callback: function(newValue)
+ {\n if (newValue !== null) this.listAttributes.editable = true;\n }\n
+ \ },\n valueId: {\n type: String,\n default: \"\"\n },\n
+ \ buttonLabel: {\n type: String,\n default: \"Modifier\"\n }\n
+ \ },\n created() {\n this.listTemplateAdditions.attach(\n this.addEditButton.bind(this),\n
+ \ \"EditableMixin:addEditButton\"\n );\n },\n addEditButton(template,
+ listTemplateAdditions) {\n let newTemplate = null;\n if (this.editable
+ !== null) {\n newTemplate = x`${template}`;\n
+ \ }\n const nextProcessor = listTemplateAdditions.shift();\n if (nextProcessor)\n
+ \ nextProcessor(newTemplate || template, listTemplateAdditions);\n },\n
+ \ activateEditableField(e2) {\n const editableField = this.element.querySelector(\"[data-editable]\");\n
+ \ const editButton = e2.target;\n editableField.toggleAttribute(\"contenteditable\",
+ true);\n editableField.focus();\n editButton.toggleAttribute(\"disabled\",
+ true);\n editableField.addEventListener(\n \"focusout\",\n ()
+ => this.save(editableField, editButton)\n );\n },\n save(editableField,
+ editButton) {\n editableField.toggleAttribute(\"contenteditable\", false);\n
+ \ editButton.removeAttribute(\"disabled\");\n if (!this.name || !this.valueId)
+ {\n console.warn(\"Some attributes are missing to perform the update\");\n
+ \ return;\n }\n const resource = {};\n resource[this.name] =
+ editableField.innerText;\n resource[\"@context\"] = this.context;\n store.patch(resource,
+ this.valueId);\n }\n};\nconst displayTemplates = {\n value: {\n template:
+ (value) => x`${value}`,\n dependencies: []\n },\n div: {\n template:
+ (value, attributes) => x`${value}
`,\n
+ \ dependencies: [EditableMixin]\n },\n link: {\n template: (value,
+ attributes) => x`\n \n ${attributes.linkText
+ || value || \"\"}\n \n `,\n dependencies: [EditableMixin, LinkTextMixin]\n
+ \ },\n img: {\n template: (value, attributes) => x`\n
\n `,\n dependencies: [AltMixin]\n
+ \ },\n boolean: {\n template: (value, attributes) => x`${value === \"true\"
+ ? x`` : \"\"}`,\n
+ \ dependencies: []\n }\n};\nconst FilterRangeFormMixin = {\n name: \"filter-range-form-mixin\",\n
+ \ attributes: {\n startValue: {\n type: String,\n default: \"\",\n
+ \ callback: function(value) {\n this.addToAttributes(this.getDefaultValue(value),
+ \"startValue\");\n }\n },\n endValue: {\n type: String,\n
+ \ default: \"\",\n callback: function(value) {\n this.addToAttributes(this.getDefaultValue(value),
+ \"endValue\");\n }\n }\n },\n getDefaultValue(value) {\n if (value
+ === \"today\") return (/* @__PURE__ */ new Date()).toISOString().split(\"T\")[0];\n
+ \ return value;\n },\n getValue() {\n if (!this.dataHolder) return
+ [];\n if (this.dataHolder.length !== 2)\n this.showDataHolderError(2,
+ this.dataHolder.length);\n return [\n // we expect 2 values, one min
+ and one max\n this.getValueFromElement(this.dataHolder[0]),\n this.getValueFromElement(this.dataHolder[1])\n
+ \ ];\n },\n get type() {\n return \"range\";\n }\n};\nconst FormCheckboxMixin
+ = {\n name: \"form-checkbox-mixin\",\n getValueFromElement(element) {\n
+ \ return element.checked;\n },\n get type() {\n return \"boolean\";\n
+ \ }\n};\nconst FormCheckboxesMixin = {\n name: \"form-checkboxes-mixin\",\n
+ \ attributes: {\n values: {\n type: String,\n default: \"\",\n
+ \ callback: function(value) {\n if (!value) return;\n try
+ {\n this.listAttributes.values = JSON.parse(value);\n } catch
+ (e2) {\n console.error(e2);\n this.listAttributes.values
+ = [];\n }\n this.render();\n this.element.dispatchEvent(new
+ Event(\"change\"));\n }\n }\n },\n created() {\n this.listAttributes.values
+ = [];\n },\n getValue() {\n const options = Array.from(\n this.element.querySelectorAll(\"input\")\n
+ \ );\n return options.filter((el) => el.checked).map((el) => {\n if
+ (!el.value) return null;\n let value = el.value;\n try {\n value
+ = JSON.parse(el.value);\n } catch {\n }\n return value;\n });\n
+ \ },\n get type() {\n return this.enum === \"\" ? \"resource\" : \"string\";\n
+ \ },\n get multiple() {\n return true;\n }\n};\nconst FormDropdownMixin
+ = {\n name: \"form-dropdown-mixin\",\n attributes: {\n values: {\n //
+ used to set more than 1 value, for multiple select\n type: String,\n
+ \ default: \"\",\n callback: function(value) {\n if (value)
+ {\n try {\n this.listAttributes.values = JSON.parse(value);\n
+ \ } catch (e2) {\n console.error(e2);\n this.listAttributes.values
+ = [];\n }\n this.render();\n this.dispatchChange();\n
+ \ }\n }\n },\n dataId: {\n type: String,\n default:
+ \"\",\n callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"id\");\n }\n }\n },\n created() {\n this.listAttributes.values
+ = [];\n if (this.listAttributes.value && !JSON.parse(this.listAttributes.value[\"@id\"])
+ && Array.isArray(JSON.parse(this.listAttributes.value))) {\n this.listAttributes.values
+ = this.listAttributes.value;\n }\n if (this.multiple) this.listAttributes.multiple
+ = true;\n },\n dispatchChange() {\n if (!this.element.querySelector(\"select\"))
+ return;\n this.element.querySelector(\"select\").dispatchEvent(new Event(\"change\"));\n
+ \ },\n getValue() {\n if (!this.dataHolder) return \"\";\n if (!this.multiple)
+ {\n if (this.dataHolder.length > 1)\n this.showDataHolderError(1,
+ this.dataHolder.length);\n return this.getValueFromElement(this.dataHolder[0]);\n
+ \ }\n const options = Array.from(\n this.element.querySelectorAll(\"option\")\n
+ \ );\n return options.filter((el) => el.selected).map((el) => el.value
+ ? JSON.parse(el.value) : null);\n },\n get type() {\n return this.enum
+ === \"\" ? \"resource\" : \"string\";\n },\n get multiple() {\n return
+ this.element.hasAttribute(\"multiple\");\n }\n};\nconst FormFileMixin = {\n
+ \ name: \"form-file-mixin\",\n attributes: {\n uploadUrl: {\n type:
+ String,\n default: \"\"\n }\n },\n initialState: {\n initialValue:
+ \"\"\n },\n created() {\n this.listAttributes.output = \"\";\n this.listAttributes.resetButtonHidden
+ = true;\n this.listAttributes.selectFile = this.selectFile.bind(this);\n
+ \ this.listAttributes.resetFile = this.resetFile.bind(this);\n },\n attached()
+ {\n this.element.closest(\"form\").addEventListener(\"reset\", this.resetFormFile.bind(this));\n
+ \ this.element.closest(\"solid-form\").addEventListener(\"populate\", this.onPopulate.bind(this));\n
+ \ },\n onPopulate() {\n const dataHolder = this.element.querySelector(\"input[data-holder]\");\n
+ \ dataHolder.value = this.value;\n dataHolder.dispatchEvent(new Event(\"change\"));\n
+ \ },\n resetFormFile(e2) {\n if (e2.target && e2.target.contains(this.element))
+ {\n if (this.initialValue !== \"\") {\n this.value = this.initialValue;\n
+ \ }\n this.listAttributes.resetButtonHidden = true;\n this.planRender();\n
+ \ const dataHolder = this.element.querySelector(\"input[data-holder]\");\n
+ \ dataHolder.value = this.value;\n dataHolder.dispatchEvent(new Event(\"change\"));\n
+ \ }\n },\n selectFile() {\n var _a3, _b;\n if (this.uploadUrl ===
+ null) return;\n if (this.initialValue === \"\") {\n this.initialValue
+ = this.value;\n }\n const filePicker = this.element.querySelector('input[type=\"file\"]');\n
+ \ if (((_a3 = filePicker.files) == null ? void 0 : _a3.length) === 0) return;\n
+ \ const dataHolder = this.element.querySelector(\"input[data-holder]\");\n
+ \ this.listAttributes.output = \"⏳\";\n this.planRender();\n const
+ file = (_b = filePicker.files) == null ? void 0 : _b[0];\n const formData
+ = new FormData();\n formData.append(\"file\", file);\n store.fetchAuthn(this.uploadUrl,
+ {\n method: \"POST\",\n body: formData\n }).then((response) =>
+ this.updateFile(dataHolder, response)).catch((error2) => {\n this.listAttributes.fileValue
+ = \"\";\n this.listAttributes.output = \"upload error\";\n this.planRender();\n
+ \ console.error(error2);\n });\n },\n updateFile(dataHolder, response)
+ {\n const location2 = response.headers.get(\"location\");\n if (location2
+ == null) {\n this.listAttributes.output = \"header location not found!\";\n
+ \ } else {\n this.value = location2;\n this.listAttributes.output
+ = \"\";\n this.listAttributes.resetButtonHidden = false;\n dataHolder.value
+ = location2;\n dataHolder.dispatchEvent(new Event(\"change\"));\n this.planRender();\n
+ \ }\n },\n resetFile(event) {\n event.preventDefault();\n this.value
+ = \"\";\n const filePicker = this.element.querySelector('input[type=\"file\"]');\n
+ \ const dataHolder = this.element.querySelector(\"input[data-holder]\");\n
+ \ if (filePicker && dataHolder) {\n filePicker.value = dataHolder.value
+ = \"\";\n }\n this.listAttributes.fileValue = \"\";\n this.listAttributes.output
+ = \"\";\n this.listAttributes.resetButtonHidden = true;\n dataHolder.dispatchEvent(new
+ Event(\"change\"));\n this.planRender();\n }\n};\nconst FormLengthMixin
+ = {\n name: \"form-length-mixin\",\n attributes: {\n maxlength: {\n type:
+ Number,\n callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"maxlength\");\n }\n },\n minlength: {\n type: Number,\n
+ \ callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"minlength\");\n }\n }\n }\n};\nconst FormMinMaxMixin = {\n name:
+ \"form-min-max-mixin\",\n attributes: {\n min: {\n type: Number,\n
+ \ callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"min\");\n }\n },\n max: {\n type: Number,\n callback:
+ function(newValue) {\n this.addToAttributes(newValue, \"max\");\n }\n
+ \ }\n }\n};\nconst FormMixin = {\n name: \"form-mixin\",\n attributes:
+ {\n required: {\n type: Boolean,\n default: false,\n callback:
+ function() {\n this.listAttributes.required = true;\n }\n },\n
+ \ autocomplete: {\n type: String,\n default: \"\",\n callback:
+ function(value) {\n this.addToAttributes(value, \"autocomplete\");\n
+ \ }\n }\n },\n attached() {\n this.listAttributes.onChange = this.onChange.bind(this);\n
+ \ },\n onChange(e2) {\n e2.preventDefault();\n e2.stopPropagation();\n
+ \ this.element.dispatchEvent(new Event(\"change\", { bubbles: true }));\n
+ \ },\n getValue() {\n if (!this.dataHolder || this.dataHolder.length ===
+ 0) return this.value;\n if (this.dataHolder.length > 1)\n this.showDataHolderError(1,
+ this.dataHolder.length);\n return this.getValueFromElement(this.dataHolder[0]);\n
+ \ },\n get type() {\n return \"string\";\n },\n get multiple() {\n return
+ false;\n },\n get dataHolder() {\n const dataHolders = Array.from(\n
+ \ this.element.querySelectorAll(\"[data-holder]\")\n );\n const
+ widgetDataHolders = dataHolders.filter((element) => {\n const dataHolderAncestor
+ = element.parentElement ? element.parentElement.closest(\"[data-holder]\")
+ : null;\n return dataHolderAncestor === this.element || !dataHolderAncestor
+ || !this.element.contains(dataHolderAncestor);\n });\n return widgetDataHolders.length
+ > 0 ? widgetDataHolders : null;\n },\n getValueFromElement(element) {\n
+ \ return element.component ? element.component.getValue() : element.value;\n
+ \ },\n showDataHolderError(expected, found) {\n console.warn(\n `Expected
+ ${expected} data-holder element in ${this.element.tagName}. Found ${found}`\n
+ \ );\n }\n};\nconst FormNumberMixin = {\n name: \"form-number-mixin\",\n
+ \ getValueFromElement(element) {\n return element.value ? Number(element.value)
+ : \"\";\n },\n get type() {\n return \"number\";\n }\n};\nconst FormRadioMixin
+ = {\n name: \"form-radio-mixin\",\n created() {\n this.listAttributes.id
+ = uniqID();\n },\n getValue() {\n const checkedElement = this.element.querySelector(\n
+ \ \"input[type=radio]:checked\"\n );\n return checkedElement ? checkedElement.value
+ : \"\";\n }\n};\nconst FormStepMixin = {\n name: \"form-time-mixin\",\n
+ \ attributes: {\n step: {\n type: Number,\n callback: function(newValue)
+ {\n this.addToAttributes(newValue, \"step\");\n }\n }\n }\n};\nconst
+ MultipleFormMixin = {\n name: \"multiple-form-mixin\",\n use: [StoreMixin],\n
+ \ attributes: {\n widget: {\n type: String,\n default: \"solid-form-text\"\n
+ \ },\n addLabel: {\n type: String,\n default: \"+\",\n callback:
+ function(value) {\n if (value !== this.listAttributes.addLabel)\n this.listAttributes.addLabel
+ = value;\n this.planRender();\n }\n },\n removeLabel: {\n
+ \ type: String,\n default: \"×\",\n callback: function(value)
+ {\n if (value !== this.listAttributes.removeLabel)\n this.listAttributes.removeLabel
+ = value;\n this.planRender();\n }\n },\n range: {\n type:
+ String,\n default: \"\"\n },\n addClass: {\n type: String,\n
+ \ default: void 0,\n callback: function(value) {\n if (value
+ !== this.listAttributes.addClass)\n this.listAttributes.addClass
+ = value;\n this.planRender();\n }\n },\n removeClass: {\n
+ \ type: String,\n default: void 0,\n callback: function(value)
+ {\n if (value !== this.listAttributes.removeClass)\n this.listAttributes.removeClass
+ = value;\n this.planRender();\n }\n }\n },\n created() {\n
+ \ this.listValueTransformations.attach(\n this.setDataSrc.bind(this),\n
+ \ \"MultipleFormMixin:setDataSrc\"\n );\n this.listAttributes.children
+ = [];\n this.listAttributes.addLabel = this.addLabel;\n this.listAttributes.removeLabel
+ = this.removeLabel;\n this.listAttributes.addClass = this.addClass;\n this.listAttributes.removeClass
+ = this.removeClass;\n this.listAttributes.addItem = () => {\n this.insertWidget();\n
+ \ this.planRender();\n };\n this.listAttributes.removeItem = (index2)
+ => {\n this.element.querySelector(`[data-index=\"${this.name + index2}\"]`).remove();\n
+ \ this.element.dispatchEvent(new Event(\"change\", { bubbles: true }));\n
+ \ };\n },\n setDataSrc(value, listValueTransformations) {\n if (value
+ && value !== this.dataSrc) {\n try {\n if (Array.isArray(JSON.parse(value)))
+ {\n this.setValue(JSON.parse(value));\n }\n } catch {\n
+ \ this.dataSrc = value;\n }\n }\n const nextProcessor = listValueTransformations.shift();\n
+ \ if (nextProcessor) nextProcessor(value, listValueTransformations);\n },\n
+ \ populate() {\n var _a3;\n const resources = (_a3 = this.resource)
+ == null ? void 0 : _a3[\"listPredicate\"];\n if (!resources) return;\n
+ \ this.listAttributes.children = [];\n for (const resource of resources)
+ {\n this.insertWidget(resource[\"@id\"]);\n }\n this.planRender();\n
+ \ },\n insertWidget(value = \"\") {\n if (!this.widget) return;\n const
+ widget = document.createElement(this.widget);\n const attributes = {\n
+ \ \"data-holder\": true,\n name: this.name,\n value,\n range:
+ this.range,\n class: this.widget\n };\n for (const name of Object.keys(attributes))
+ {\n if (typeof attributes[name] === \"boolean\")\n widget.toggleAttribute(name,
+ attributes[name]);\n else widget.setAttribute(name, attributes[name]);\n
+ \ }\n this.listAttributes.children.push(widget);\n },\n empty() {\n
+ \ this.listAttributes.children = [];\n this.planRender();\n },\n getValue()
+ {\n if (!this.dataHolder) return [];\n return Array.from(this.dataHolder).map((element)
+ => {\n const elValue = this.getValueFromElement(element);\n return
+ elValue;\n });\n },\n get type() {\n return \"resource\";\n },\n
+ \ get multiple() {\n return true;\n }\n};\nconst MultipleselectFormMixin
+ = {\n name: \"multipleselect-form-mixin\",\n use: [StoreMixin],\n attributes:
+ {\n range: {\n // range attribute is passed to the solid-dropdown\n
+ \ type: String,\n default: \"\",\n callback: function(value)
+ {\n if (value && value !== this.listAttributes.range)\n this.listAttributes.range
+ = value;\n }\n },\n enum: {\n // enum attribute is passed
+ to the solid-dropdown\n type: String,\n default: \"\",\n callback:
+ function(value) {\n if (value && value !== this.listAttributes.enum)\n
+ \ this.listAttributes.enum = value;\n }\n },\n orderAsc:
+ {\n type: String,\n default: \"name\",\n callback: function(newValue)
+ {\n this.addToAttributes(newValue, \"orderAsc\");\n }\n },\n
+ \ orderDesc: {\n type: String,\n default: \"name\",\n callback:
+ function(newValue) {\n this.addToAttributes(newValue, \"orderDesc\");\n
+ \ }\n }\n },\n created() {\n this.listValueTransformations.attach(\n
+ \ this.setDataSrc.bind(this),\n \"MultipleselectFormMixin:setDataSrc\"\n
+ \ );\n },\n setDataSrc(value, listValueTransformations) {\n if (value
+ && value !== this.dataSrc) {\n try {\n const values = JSON.parse(value);\n
+ \ if (values && Array.isArray(values)) {\n this.setValue(values);\n
+ \ } else {\n this.setValue([value]);\n }\n } catch
+ {\n this.dataSrc = value;\n this.setValue([{ \"@id\": value
+ }]);\n }\n }\n const nextProcessor = listValueTransformations.shift();\n
+ \ if (nextProcessor) nextProcessor(value, listValueTransformations);\n },\n
+ \ populate() {\n var _a3;\n const resources = (_a3 = this.resource)
+ == null ? void 0 : _a3[\"listPredicate\"];\n if (!this.resource || !resources
+ && !Array.isArray(this.resource)) return;\n this.setValue(resources);\n
+ \ this.planRender();\n },\n setValue(values) {\n this.listAttributes.values
+ = JSON.stringify(values.map((r3) => r3[\"@id\"]));\n },\n empty() {\n this.listAttributes.values
+ = [];\n this.planRender();\n },\n get type() {\n return this.enum
+ === \"\" ? \"resource\" : \"string\";\n },\n get multiple() {\n return
+ true;\n }\n};\nconst PatternMixin = {\n name: \"pattern-mixin\",\n attributes:
+ {\n pattern: {\n type: String,\n callback: function(newValue)
+ {\n this.addToAttributes(newValue, \"pattern\");\n }\n },\n
+ \ title: {\n type: String,\n callback: function(newValue) {\n
+ \ this.addToAttributes(newValue, \"title\");\n }\n }\n }\n};\nconst
+ RangeMixin = {\n name: \"range-mixin\",\n use: [StoreMixin, SorterMixin,
+ FederationMixin],\n attributes: {\n range: {\n type: String,\n default:
+ \"\",\n callback: function(value) {\n if (value !== this.dataSrc)
+ this.dataSrc = value;\n }\n },\n enum: {\n type: String,\n
+ \ default: \"\",\n callback: function(value) {\n if (value
+ !== null) {\n const optional = value.trim().split(\",\");\n const
+ list2 = {};\n for (const element of optional) {\n if (element.includes(\"=\"))
+ {\n const option = element.trim().split(\"=\");\n const
+ key = option[1].trim();\n const keyValue = option[0].trim();\n
+ \ list2[key] = keyValue;\n } else {\n const
+ elem = element.trim();\n list2[elem] = elem;\n }\n
+ \ }\n this.addToAttributes(list2, \"enum\");\n }\n
+ \ }\n },\n optionLabel: {\n type: String,\n default: \"name\",\n
+ \ callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"optionLabel\");\n }\n },\n optionValue: {\n type: String,\n
+ \ default: \"@id\",\n callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"optionValue\");\n }\n }\n },\n initialState: {\n listPostProcessors:
+ new PostProcessorRegistry()\n },\n created() {\n this.listPostProcessors
+ = new PostProcessorRegistry();\n this.listAttributes.optionLabel = this.optionLabel;\n
+ \ this.listAttributes.optionValue = this.optionValue;\n },\n async populate()
+ {\n const resources = this.resource ? this.resource[\"listPredicate\"]
+ : [];\n const listPostProcessorsCopy = this.listPostProcessors.deepCopy();\n
+ \ listPostProcessorsCopy.attach(\n this.setRangeAttribute.bind(this),\n
+ \ \"RangeMixin:setRangeAttribute\"\n );\n const nextProcessor =
+ listPostProcessorsCopy.shift();\n await nextProcessor(resources, listPostProcessorsCopy,
+ null, this.dataSrc);\n },\n async setRangeAttribute(resources) {\n if
+ (resources) {\n const getRangeValue = async (resource) => {\n let
+ res = await store.getData(\n resource[\"@id\"],\n this.context
+ || base_context\n );\n if (res === null) {\n res =
+ resource;\n }\n const selectedValue = await resource[this.optionValue];\n
+ \ const value = this.optionValue.includes(\"@id\") || selectedValue[\"@id\"]
+ ? `{\"@id\": \"${selectedValue}\"}` : (\n // resource\n selectedValue\n
+ \ );\n const labelProperty = this.optionLabel.split(/[.]+/).pop();\n
+ \ const label = await res[labelProperty];\n return { value, label,
+ selectedValue };\n };\n this.listAttributes.range = await Promise.all(\n
+ \ resources.filter((el) => el !== null).map((r3) => getRangeValue(r3))\n
+ \ );\n }\n this.planRender();\n },\n empty() {\n this.listAttributes.range
+ = [];\n this.planRender();\n },\n get type() {\n return this.enum
+ === \"\" ? \"resource\" : \"string\";\n }\n};\nconst ValueEditorMixin = {\n
+ \ name: \"valueeditor-mixin\",\n getValue() {\n const editor = document.getElementById(this.listAttributes.id);\n
+ \ if (editor == null) return;\n const converter = new showdown.Converter();\n
+ \ const editorObj = tinymce$1.get(editor.id);\n if (editorObj == null)
+ return;\n const markdown = converter.makeMarkdown(editorObj.getContent());\n
+ \ const comment2 = \"\\n\\n\";\n return markdown.includes(comment2)
+ ? markdown.split(comment2).join(\"\") : markdown;\n }\n};\nvar main = {};\nvar
+ QuillDeltaToHtmlConverter = {};\nvar InsertOpsConverter = {};\nvar DeltaInsertOp
+ = {};\nvar valueTypes = {};\nvar hasRequiredValueTypes;\nfunction requireValueTypes()
+ {\n if (hasRequiredValueTypes) return valueTypes;\n hasRequiredValueTypes
+ = 1;\n Object.defineProperty(valueTypes, \"__esModule\", { value: true });\n
+ \ var NewLine = \"\\n\";\n valueTypes.NewLine = NewLine;\n var ListType;\n
+ \ (function(ListType2) {\n ListType2[\"Ordered\"] = \"ordered\";\n ListType2[\"Bullet\"]
+ = \"bullet\";\n ListType2[\"Checked\"] = \"checked\";\n ListType2[\"Unchecked\"]
+ = \"unchecked\";\n })(ListType || (ListType = {}));\n valueTypes.ListType
+ = ListType;\n var ScriptType;\n (function(ScriptType2) {\n ScriptType2[\"Sub\"]
+ = \"sub\";\n ScriptType2[\"Super\"] = \"super\";\n })(ScriptType || (ScriptType
+ = {}));\n valueTypes.ScriptType = ScriptType;\n var DirectionType;\n (function(DirectionType2)
+ {\n DirectionType2[\"Rtl\"] = \"rtl\";\n })(DirectionType || (DirectionType
+ = {}));\n valueTypes.DirectionType = DirectionType;\n var AlignType;\n (function(AlignType2)
+ {\n AlignType2[\"Left\"] = \"left\";\n AlignType2[\"Center\"] = \"center\";\n
+ \ AlignType2[\"Right\"] = \"right\";\n AlignType2[\"Justify\"] = \"justify\";\n
+ \ })(AlignType || (AlignType = {}));\n valueTypes.AlignType = AlignType;\n
+ \ var DataType;\n (function(DataType2) {\n DataType2[\"Image\"] = \"image\";\n
+ \ DataType2[\"Video\"] = \"video\";\n DataType2[\"Formula\"] = \"formula\";\n
+ \ DataType2[\"Text\"] = \"text\";\n })(DataType || (DataType = {}));\n
+ \ valueTypes.DataType = DataType;\n var GroupType;\n (function(GroupType2)
+ {\n GroupType2[\"Block\"] = \"block\";\n GroupType2[\"InlineGroup\"]
+ = \"inline-group\";\n GroupType2[\"List\"] = \"list\";\n GroupType2[\"Video\"]
+ = \"video\";\n GroupType2[\"Table\"] = \"table\";\n })(GroupType || (GroupType
+ = {}));\n valueTypes.GroupType = GroupType;\n return valueTypes;\n}\nvar
+ InsertData = {};\nvar hasRequiredInsertData;\nfunction requireInsertData()
+ {\n if (hasRequiredInsertData) return InsertData;\n hasRequiredInsertData
+ = 1;\n Object.defineProperty(InsertData, \"__esModule\", { value: true });\n
+ \ var InsertDataQuill = /* @__PURE__ */ function() {\n function InsertDataQuill2(type,
+ value) {\n this.type = type;\n this.value = value;\n }\n return
+ InsertDataQuill2;\n }();\n InsertData.InsertDataQuill = InsertDataQuill;\n
+ \ var InsertDataCustom = /* @__PURE__ */ function() {\n function InsertDataCustom2(type,
+ value) {\n this.type = type;\n this.value = value;\n }\n return
+ InsertDataCustom2;\n }();\n InsertData.InsertDataCustom = InsertDataCustom;\n
+ \ return InsertData;\n}\nvar hasRequiredDeltaInsertOp;\nfunction requireDeltaInsertOp()
+ {\n if (hasRequiredDeltaInsertOp) return DeltaInsertOp;\n hasRequiredDeltaInsertOp
+ = 1;\n var __importDefault = DeltaInsertOp && DeltaInsertOp.__importDefault
+ || function(mod) {\n return mod && mod.__esModule ? mod : { \"default\":
+ mod };\n };\n Object.defineProperty(DeltaInsertOp, \"__esModule\", { value:
+ true });\n var value_types_1 = requireValueTypes();\n var InsertData_1 =
+ requireInsertData();\n var lodash_isequal_1 = __importDefault(requireLodash_isequal());\n
+ \ var DeltaInsertOp$1 = function() {\n function DeltaInsertOp2(insertVal,
+ attrs) {\n if (typeof insertVal === \"string\") {\n insertVal
+ = new InsertData_1.InsertDataQuill(value_types_1.DataType.Text, insertVal
+ + \"\");\n }\n this.insert = insertVal;\n this.attributes =
+ attrs || {};\n }\n DeltaInsertOp2.createNewLineOp = function() {\n return
+ new DeltaInsertOp2(value_types_1.NewLine);\n };\n DeltaInsertOp2.prototype.isContainerBlock
+ = function() {\n return this.isBlockquote() || this.isList() || this.isTable()
+ || this.isCodeBlock() || this.isHeader() || this.isBlockAttribute() || this.isCustomTextBlock();\n
+ \ };\n DeltaInsertOp2.prototype.isBlockAttribute = function() {\n var
+ attrs = this.attributes;\n return !!(attrs.align || attrs.direction ||
+ attrs.indent);\n };\n DeltaInsertOp2.prototype.isBlockquote = function()
+ {\n return !!this.attributes.blockquote;\n };\n DeltaInsertOp2.prototype.isHeader
+ = function() {\n return !!this.attributes.header;\n };\n DeltaInsertOp2.prototype.isTable
+ = function() {\n return !!this.attributes.table;\n };\n DeltaInsertOp2.prototype.isSameHeaderAs
+ = function(op) {\n return op.attributes.header === this.attributes.header
+ && this.isHeader();\n };\n DeltaInsertOp2.prototype.hasSameAdiAs = function(op)
+ {\n return this.attributes.align === op.attributes.align && this.attributes.direction
+ === op.attributes.direction && this.attributes.indent === op.attributes.indent;\n
+ \ };\n DeltaInsertOp2.prototype.hasSameIndentationAs = function(op) {\n
+ \ return this.attributes.indent === op.attributes.indent;\n };\n DeltaInsertOp2.prototype.hasSameAttr
+ = function(op) {\n return lodash_isequal_1.default(this.attributes, op.attributes);\n
+ \ };\n DeltaInsertOp2.prototype.hasHigherIndentThan = function(op) {\n
+ \ return (Number(this.attributes.indent) || 0) > (Number(op.attributes.indent)
+ || 0);\n };\n DeltaInsertOp2.prototype.isInline = function() {\n return
+ !(this.isContainerBlock() || this.isVideo() || this.isCustomEmbedBlock());\n
+ \ };\n DeltaInsertOp2.prototype.isCodeBlock = function() {\n return
+ !!this.attributes[\"code-block\"];\n };\n DeltaInsertOp2.prototype.hasSameLangAs
+ = function(op) {\n return this.attributes[\"code-block\"] === op.attributes[\"code-block\"];\n
+ \ };\n DeltaInsertOp2.prototype.isJustNewline = function() {\n return
+ this.insert.value === value_types_1.NewLine;\n };\n DeltaInsertOp2.prototype.isList
+ = function() {\n return this.isOrderedList() || this.isBulletList() ||
+ this.isCheckedList() || this.isUncheckedList();\n };\n DeltaInsertOp2.prototype.isOrderedList
+ = function() {\n return this.attributes.list === value_types_1.ListType.Ordered;\n
+ \ };\n DeltaInsertOp2.prototype.isBulletList = function() {\n return
+ this.attributes.list === value_types_1.ListType.Bullet;\n };\n DeltaInsertOp2.prototype.isCheckedList
+ = function() {\n return this.attributes.list === value_types_1.ListType.Checked;\n
+ \ };\n DeltaInsertOp2.prototype.isUncheckedList = function() {\n return
+ this.attributes.list === value_types_1.ListType.Unchecked;\n };\n DeltaInsertOp2.prototype.isACheckList
+ = function() {\n return this.attributes.list == value_types_1.ListType.Unchecked
+ || this.attributes.list === value_types_1.ListType.Checked;\n };\n DeltaInsertOp2.prototype.isSameListAs
+ = function(op) {\n return !!op.attributes.list && (this.attributes.list
+ === op.attributes.list || op.isACheckList() && this.isACheckList());\n };\n
+ \ DeltaInsertOp2.prototype.isSameTableRowAs = function(op) {\n return
+ !!op.isTable() && this.isTable() && this.attributes.table === op.attributes.table;\n
+ \ };\n DeltaInsertOp2.prototype.isText = function() {\n return this.insert.type
+ === value_types_1.DataType.Text;\n };\n DeltaInsertOp2.prototype.isImage
+ = function() {\n return this.insert.type === value_types_1.DataType.Image;\n
+ \ };\n DeltaInsertOp2.prototype.isFormula = function() {\n return
+ this.insert.type === value_types_1.DataType.Formula;\n };\n DeltaInsertOp2.prototype.isVideo
+ = function() {\n return this.insert.type === value_types_1.DataType.Video;\n
+ \ };\n DeltaInsertOp2.prototype.isLink = function() {\n return this.isText()
+ && !!this.attributes.link;\n };\n DeltaInsertOp2.prototype.isCustomEmbed
+ = function() {\n return this.insert instanceof InsertData_1.InsertDataCustom;\n
+ \ };\n DeltaInsertOp2.prototype.isCustomEmbedBlock = function() {\n return
+ this.isCustomEmbed() && !!this.attributes.renderAsBlock;\n };\n DeltaInsertOp2.prototype.isCustomTextBlock
+ = function() {\n return this.isText() && !!this.attributes.renderAsBlock;\n
+ \ };\n DeltaInsertOp2.prototype.isMentions = function() {\n return
+ this.isText() && !!this.attributes.mentions;\n };\n return DeltaInsertOp2;\n
+ \ }();\n DeltaInsertOp.DeltaInsertOp = DeltaInsertOp$1;\n return DeltaInsertOp;\n}\nvar
+ OpAttributeSanitizer = {};\nvar MentionSanitizer = {};\nvar OpLinkSanitizer
+ = {};\nvar url = {};\nvar hasRequiredUrl;\nfunction requireUrl() {\n if (hasRequiredUrl)
+ return url;\n hasRequiredUrl = 1;\n Object.defineProperty(url, \"__esModule\",
+ { value: true });\n function sanitize2(str) {\n var val = str;\n val
+ = val.replace(/^\\s*/gm, \"\");\n var whiteList = /^((https?|s?ftp|file|blob|mailto|tel):|#|\\/|data:image\\/)/;\n
+ \ if (whiteList.test(val)) {\n return val;\n }\n return \"unsafe:\"
+ + val;\n }\n url.sanitize = sanitize2;\n return url;\n}\nvar funcsHtml
+ = {};\nvar hasRequiredFuncsHtml;\nfunction requireFuncsHtml() {\n if (hasRequiredFuncsHtml)
+ return funcsHtml;\n hasRequiredFuncsHtml = 1;\n Object.defineProperty(funcsHtml,
+ \"__esModule\", { value: true });\n var EncodeTarget;\n (function(EncodeTarget2)
+ {\n EncodeTarget2[EncodeTarget2[\"Html\"] = 0] = \"Html\";\n EncodeTarget2[EncodeTarget2[\"Url\"]
+ = 1] = \"Url\";\n })(EncodeTarget || (EncodeTarget = {}));\n function makeStartTag(tag,
+ attrs) {\n if (attrs === void 0) {\n attrs = void 0;\n }\n if
+ (!tag) {\n return \"\";\n }\n var attrsStr = \"\";\n if (attrs)
+ {\n var arrAttrs = [].concat(attrs);\n attrsStr = arrAttrs.map(function(attr)
+ {\n return attr.key + (attr.value ? '=\"' + attr.value + '\"' : \"\");\n
+ \ }).join(\" \");\n }\n var closing = \">\";\n if (tag === \"img\"
+ || tag === \"br\") {\n closing = \"/>\";\n }\n return attrsStr
+ ? \"<\" + tag + \" \" + attrsStr + closing : \"<\" + tag + closing;\n }\n
+ \ funcsHtml.makeStartTag = makeStartTag;\n function makeEndTag(tag) {\n if
+ (tag === void 0) {\n tag = \"\";\n }\n return tag && \"\" + tag
+ + \">\" || \"\";\n }\n funcsHtml.makeEndTag = makeEndTag;\n function decodeHtml(str)
+ {\n return encodeMappings(EncodeTarget.Html).reduce(decodeMapping, str);\n
+ \ }\n funcsHtml.decodeHtml = decodeHtml;\n function encodeHtml(str, preventDoubleEncoding)
+ {\n if (preventDoubleEncoding === void 0) {\n preventDoubleEncoding
+ = true;\n }\n if (preventDoubleEncoding) {\n str = decodeHtml(str);\n
+ \ }\n return encodeMappings(EncodeTarget.Html).reduce(encodeMapping,
+ str);\n }\n funcsHtml.encodeHtml = encodeHtml;\n function encodeLink(str)
+ {\n var linkMaps = encodeMappings(EncodeTarget.Url);\n var decoded =
+ linkMaps.reduce(decodeMapping, str);\n return linkMaps.reduce(encodeMapping,
+ decoded);\n }\n funcsHtml.encodeLink = encodeLink;\n function encodeMappings(mtype)
+ {\n var maps = [\n [\"&\", \"&\"],\n [\"<\", \"<\"],\n
+ \ [\">\", \">\"],\n ['\"', \""\"],\n [\"'\", \"'\"],\n
+ \ [\"\\\\/\", \"/\"],\n [\"\\\\(\", \"(\"],\n [\"\\\\)\",
+ \")\"]\n ];\n if (mtype === EncodeTarget.Html) {\n return maps.filter(function(_a3)
+ {\n var v2 = _a3[0];\n _a3[1];\n return v2.indexOf(\"(\")
+ === -1 && v2.indexOf(\")\") === -1;\n });\n } else {\n return
+ maps.filter(function(_a3) {\n var v2 = _a3[0];\n _a3[1];\n return
+ v2.indexOf(\"/\") === -1;\n });\n }\n }\n function encodeMapping(str,
+ mapping) {\n return str.replace(new RegExp(mapping[0], \"g\"), mapping[1]);\n
+ \ }\n function decodeMapping(str, mapping) {\n return str.replace(new
+ RegExp(mapping[1], \"g\"), mapping[0].replace(\"\\\\\", \"\"));\n }\n return
+ funcsHtml;\n}\nvar hasRequiredOpLinkSanitizer;\nfunction requireOpLinkSanitizer()
+ {\n if (hasRequiredOpLinkSanitizer) return OpLinkSanitizer;\n hasRequiredOpLinkSanitizer
+ = 1;\n var __importStar = OpLinkSanitizer && OpLinkSanitizer.__importStar
+ || function(mod) {\n if (mod && mod.__esModule) return mod;\n var result
+ = {};\n if (mod != null) {\n for (var k3 in mod) if (Object.hasOwnProperty.call(mod,
+ k3)) result[k3] = mod[k3];\n }\n result[\"default\"] = mod;\n return
+ result;\n };\n Object.defineProperty(OpLinkSanitizer, \"__esModule\", {
+ value: true });\n var url2 = __importStar(requireUrl());\n var funcs_html_1
+ = requireFuncsHtml();\n var OpLinkSanitizer$1 = function() {\n function
+ OpLinkSanitizer2() {\n }\n OpLinkSanitizer2.sanitize = function(link2,
+ options) {\n var sanitizerFn = function() {\n return void 0;\n
+ \ };\n if (options && typeof options.urlSanitizer === \"function\")
+ {\n sanitizerFn = options.urlSanitizer;\n }\n var result
+ = sanitizerFn(link2);\n return typeof result === \"string\" ? result
+ : funcs_html_1.encodeLink(url2.sanitize(link2));\n };\n return OpLinkSanitizer2;\n
+ \ }();\n OpLinkSanitizer.OpLinkSanitizer = OpLinkSanitizer$1;\n return OpLinkSanitizer;\n}\nvar
+ hasRequiredMentionSanitizer;\nfunction requireMentionSanitizer() {\n if (hasRequiredMentionSanitizer)
+ return MentionSanitizer;\n hasRequiredMentionSanitizer = 1;\n Object.defineProperty(MentionSanitizer,
+ \"__esModule\", { value: true });\n var OpLinkSanitizer_1 = requireOpLinkSanitizer();\n
+ \ var MentionSanitizer$1 = function() {\n function MentionSanitizer2()
+ {\n }\n MentionSanitizer2.sanitize = function(dirtyObj, sanitizeOptions)
+ {\n var cleanObj = {};\n if (!dirtyObj || typeof dirtyObj !== \"object\")
+ {\n return cleanObj;\n }\n if (dirtyObj.class && MentionSanitizer2.IsValidClass(dirtyObj.class))
+ {\n cleanObj.class = dirtyObj.class;\n }\n if (dirtyObj.id
+ && MentionSanitizer2.IsValidId(dirtyObj.id)) {\n cleanObj.id = dirtyObj.id;\n
+ \ }\n if (MentionSanitizer2.IsValidTarget(dirtyObj.target + \"\"))
+ {\n cleanObj.target = dirtyObj.target;\n }\n if (dirtyObj.avatar)
+ {\n cleanObj.avatar = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj.avatar
+ + \"\", sanitizeOptions);\n }\n if (dirtyObj[\"end-point\"]) {\n
+ \ cleanObj[\"end-point\"] = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj[\"end-point\"]
+ + \"\", sanitizeOptions);\n }\n if (dirtyObj.slug) {\n cleanObj.slug
+ = dirtyObj.slug + \"\";\n }\n return cleanObj;\n };\n MentionSanitizer2.IsValidClass
+ = function(classAttr) {\n return !!classAttr.match(/^[a-zA-Z0-9_\\-]{1,500}$/i);\n
+ \ };\n MentionSanitizer2.IsValidId = function(idAttr) {\n return
+ !!idAttr.match(/^[a-zA-Z0-9_\\-\\:\\.]{1,500}$/i);\n };\n MentionSanitizer2.IsValidTarget
+ = function(target) {\n return [\"_self\", \"_blank\", \"_parent\", \"_top\"].indexOf(target)
+ > -1;\n };\n return MentionSanitizer2;\n }();\n MentionSanitizer.MentionSanitizer
+ = MentionSanitizer$1;\n return MentionSanitizer;\n}\nvar array = {};\nvar
+ hasRequiredArray;\nfunction requireArray() {\n if (hasRequiredArray) return
+ array;\n hasRequiredArray = 1;\n Object.defineProperty(array, \"__esModule\",
+ { value: true });\n function preferSecond(arr) {\n if (arr.length ===
+ 0) {\n return null;\n }\n return arr.length >= 2 ? arr[1] : arr[0];\n
+ \ }\n array.preferSecond = preferSecond;\n function flatten(arr) {\n return
+ arr.reduce(function(pv, v2) {\n return pv.concat(Array.isArray(v2) ?
+ flatten(v2) : v2);\n }, []);\n }\n array.flatten = flatten;\n function
+ find(arr, predicate) {\n if (Array.prototype.find) {\n return Array.prototype.find.call(arr,
+ predicate);\n }\n for (var i3 = 0; i3 < arr.length; i3++) {\n if
+ (predicate(arr[i3]))\n return arr[i3];\n }\n return void 0;\n
+ \ }\n array.find = find;\n function groupConsecutiveElementsWhile(arr, predicate)
+ {\n var groups = [];\n var currElm, currGroup;\n for (var i3 = 0;
+ i3 < arr.length; i3++) {\n currElm = arr[i3];\n if (i3 > 0 && predicate(currElm,
+ arr[i3 - 1])) {\n currGroup = groups[groups.length - 1];\n currGroup.push(currElm);\n
+ \ } else {\n groups.push([currElm]);\n }\n }\n return
+ groups.map(function(g2) {\n return g2.length === 1 ? g2[0] : g2;\n });\n
+ \ }\n array.groupConsecutiveElementsWhile = groupConsecutiveElementsWhile;\n
+ \ function sliceFromReverseWhile(arr, startIndex, predicate) {\n var result
+ = {\n elements: [],\n sliceStartsAt: -1\n };\n for (var i3
+ = startIndex; i3 >= 0; i3--) {\n if (!predicate(arr[i3])) {\n break;\n
+ \ }\n result.sliceStartsAt = i3;\n result.elements.unshift(arr[i3]);\n
+ \ }\n return result;\n }\n array.sliceFromReverseWhile = sliceFromReverseWhile;\n
+ \ function intersperse(arr, item) {\n return arr.reduce(function(pv, v2,
+ index2) {\n pv.push(v2);\n if (index2 < arr.length - 1) {\n pv.push(item);\n
+ \ }\n return pv;\n }, []);\n }\n array.intersperse = intersperse;\n
+ \ return array;\n}\nvar hasRequiredOpAttributeSanitizer;\nfunction requireOpAttributeSanitizer()
+ {\n if (hasRequiredOpAttributeSanitizer) return OpAttributeSanitizer;\n hasRequiredOpAttributeSanitizer
+ = 1;\n Object.defineProperty(OpAttributeSanitizer, \"__esModule\", { value:
+ true });\n var value_types_1 = requireValueTypes();\n var MentionSanitizer_1
+ = requireMentionSanitizer();\n var array_1 = requireArray();\n var OpLinkSanitizer_1
+ = requireOpLinkSanitizer();\n var OpAttributeSanitizer$1 = function() {\n
+ \ function OpAttributeSanitizer2() {\n }\n OpAttributeSanitizer2.sanitize
+ = function(dirtyAttrs, sanitizeOptions) {\n var cleanAttrs = {};\n if
+ (!dirtyAttrs || typeof dirtyAttrs !== \"object\") {\n return cleanAttrs;\n
+ \ }\n var booleanAttrs = [\n \"bold\",\n \"italic\",\n
+ \ \"underline\",\n \"strike\",\n \"code\",\n \"blockquote\",\n
+ \ \"code-block\",\n \"renderAsBlock\"\n ];\n var colorAttrs
+ = [\"background\", \"color\"];\n var font = dirtyAttrs.font, size = dirtyAttrs.size,
+ link2 = dirtyAttrs.link, script = dirtyAttrs.script, list2 = dirtyAttrs.list,
+ header = dirtyAttrs.header, align = dirtyAttrs.align, direction = dirtyAttrs.direction,
+ indent = dirtyAttrs.indent, mentions = dirtyAttrs.mentions, mention = dirtyAttrs.mention,
+ width = dirtyAttrs.width, target = dirtyAttrs.target, rel = dirtyAttrs.rel;\n
+ \ var codeBlock = dirtyAttrs[\"code-block\"];\n var sanitizedAttrs
+ = booleanAttrs.concat(colorAttrs, [\n \"font\",\n \"size\",\n
+ \ \"link\",\n \"script\",\n \"list\",\n \"header\",\n
+ \ \"align\",\n \"direction\",\n \"indent\",\n \"mentions\",\n
+ \ \"mention\",\n \"width\",\n \"target\",\n \"rel\",\n
+ \ \"code-block\"\n ]);\n booleanAttrs.forEach(function(prop)
+ {\n var v2 = dirtyAttrs[prop];\n if (v2) {\n cleanAttrs[prop]
+ = !!v2;\n }\n });\n colorAttrs.forEach(function(prop) {\n
+ \ var val = dirtyAttrs[prop];\n if (val && (OpAttributeSanitizer2.IsValidHexColor(val
+ + \"\") || OpAttributeSanitizer2.IsValidColorLiteral(val + \"\") || OpAttributeSanitizer2.IsValidRGBColor(val
+ + \"\"))) {\n cleanAttrs[prop] = val;\n }\n });\n if
+ (font && OpAttributeSanitizer2.IsValidFontName(font + \"\")) {\n cleanAttrs.font
+ = font;\n }\n if (size && OpAttributeSanitizer2.IsValidSize(size
+ + \"\")) {\n cleanAttrs.size = size;\n }\n if (width && OpAttributeSanitizer2.IsValidWidth(width
+ + \"\")) {\n cleanAttrs.width = width;\n }\n if (link2) {\n
+ \ cleanAttrs.link = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(link2
+ + \"\", sanitizeOptions);\n }\n if (target && OpAttributeSanitizer2.isValidTarget(target))
+ {\n cleanAttrs.target = target;\n }\n if (rel && OpAttributeSanitizer2.IsValidRel(rel))
+ {\n cleanAttrs.rel = rel;\n }\n if (codeBlock) {\n if
+ (OpAttributeSanitizer2.IsValidLang(codeBlock)) {\n cleanAttrs[\"code-block\"]
+ = codeBlock;\n } else {\n cleanAttrs[\"code-block\"] = !!codeBlock;\n
+ \ }\n }\n if (script === value_types_1.ScriptType.Sub || value_types_1.ScriptType.Super
+ === script) {\n cleanAttrs.script = script;\n }\n if (list2
+ === value_types_1.ListType.Bullet || list2 === value_types_1.ListType.Ordered
+ || list2 === value_types_1.ListType.Checked || list2 === value_types_1.ListType.Unchecked)
+ {\n cleanAttrs.list = list2;\n }\n if (Number(header)) {\n
+ \ cleanAttrs.header = Math.min(Number(header), 6);\n }\n if
+ (array_1.find([value_types_1.AlignType.Center, value_types_1.AlignType.Right,
+ value_types_1.AlignType.Justify, value_types_1.AlignType.Left], function(a2)
+ {\n return a2 === align;\n })) {\n cleanAttrs.align = align;\n
+ \ }\n if (direction === value_types_1.DirectionType.Rtl) {\n cleanAttrs.direction
+ = direction;\n }\n if (indent && Number(indent)) {\n cleanAttrs.indent
+ = Math.min(Number(indent), 30);\n }\n if (mentions && mention) {\n
+ \ var sanitizedMention = MentionSanitizer_1.MentionSanitizer.sanitize(mention,
+ sanitizeOptions);\n if (Object.keys(sanitizedMention).length > 0) {\n
+ \ cleanAttrs.mentions = !!mentions;\n cleanAttrs.mention
+ = mention;\n }\n }\n return Object.keys(dirtyAttrs).reduce(function(cleaned,
+ k3) {\n if (sanitizedAttrs.indexOf(k3) === -1) {\n cleaned[k3]
+ = dirtyAttrs[k3];\n }\n return cleaned;\n }, cleanAttrs);\n
+ \ };\n OpAttributeSanitizer2.IsValidHexColor = function(colorStr) {\n
+ \ return !!colorStr.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i);\n };\n
+ \ OpAttributeSanitizer2.IsValidColorLiteral = function(colorStr) {\n return
+ !!colorStr.match(/^[a-z]{1,50}$/i);\n };\n OpAttributeSanitizer2.IsValidRGBColor
+ = function(colorStr) {\n var re = /^rgb\\(((0|25[0-5]|2[0-4]\\d|1\\d\\d|0?\\d?\\d),\\s*){2}(0|25[0-5]|2[0-4]\\d|1\\d\\d|0?\\d?\\d)\\)$/i;\n
+ \ return !!colorStr.match(re);\n };\n OpAttributeSanitizer2.IsValidFontName
+ = function(fontName) {\n return !!fontName.match(/^[a-z\\s0-9\\- ]{1,30}$/i);\n
+ \ };\n OpAttributeSanitizer2.IsValidSize = function(size) {\n return
+ !!size.match(/^[a-z0-9\\-]{1,20}$/i);\n };\n OpAttributeSanitizer2.IsValidWidth
+ = function(width) {\n return !!width.match(/^[0-9]*(px|em|%)?$/);\n };\n
+ \ OpAttributeSanitizer2.isValidTarget = function(target) {\n return
+ !!target.match(/^[_a-zA-Z0-9\\-]{1,50}$/);\n };\n OpAttributeSanitizer2.IsValidRel
+ = function(relStr) {\n return !!relStr.match(/^[a-zA-Z\\s\\-]{1,250}$/i);\n
+ \ };\n OpAttributeSanitizer2.IsValidLang = function(lang) {\n if
+ (typeof lang === \"boolean\") {\n return true;\n }\n return
+ !!lang.match(/^[a-zA-Z\\s\\-\\\\\\/\\+]{1,50}$/i);\n };\n return OpAttributeSanitizer2;\n
+ \ }();\n OpAttributeSanitizer.OpAttributeSanitizer = OpAttributeSanitizer$1;\n
+ \ return OpAttributeSanitizer;\n}\nvar InsertOpDenormalizer = {};\nvar string
+ = {};\nvar hasRequiredString;\nfunction requireString() {\n if (hasRequiredString)
+ return string;\n hasRequiredString = 1;\n Object.defineProperty(string,
+ \"__esModule\", { value: true });\n function tokenizeWithNewLines(str) {\n
+ \ var NewLine = \"\\n\";\n if (str === NewLine) {\n return [str];\n
+ \ }\n var lines = str.split(NewLine);\n if (lines.length === 1) {\n
+ \ return lines;\n }\n var lastIndex = lines.length - 1;\n return
+ lines.reduce(function(pv, line, ind) {\n if (ind !== lastIndex) {\n if
+ (line !== \"\") {\n pv = pv.concat(line, NewLine);\n } else
+ {\n pv.push(NewLine);\n }\n } else if (line !== \"\")
+ {\n pv.push(line);\n }\n return pv;\n }, []);\n }\n string.tokenizeWithNewLines
+ = tokenizeWithNewLines;\n return string;\n}\nvar object = {};\nvar hasRequiredObject;\nfunction
+ requireObject() {\n if (hasRequiredObject) return object;\n hasRequiredObject
+ = 1;\n Object.defineProperty(object, \"__esModule\", { value: true });\n
+ \ function assign2(target) {\n var sources = [];\n for (var _i = 1;
+ _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n
+ \ if (target == null) {\n throw new TypeError(\"Cannot convert undefined
+ or null to object\");\n }\n var to = Object(target);\n for (var index2
+ = 0; index2 < sources.length; index2++) {\n var nextSource = sources[index2];\n
+ \ if (nextSource != null) {\n for (var nextKey in nextSource) {\n
+ \ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n
+ \ to[nextKey] = nextSource[nextKey];\n }\n }\n }\n
+ \ }\n return to;\n }\n object.assign = assign2;\n return object;\n}\nvar
+ hasRequiredInsertOpDenormalizer;\nfunction requireInsertOpDenormalizer() {\n
+ \ if (hasRequiredInsertOpDenormalizer) return InsertOpDenormalizer;\n hasRequiredInsertOpDenormalizer
+ = 1;\n var __importStar = InsertOpDenormalizer && InsertOpDenormalizer.__importStar
+ || function(mod) {\n if (mod && mod.__esModule) return mod;\n var result
+ = {};\n if (mod != null) {\n for (var k3 in mod) if (Object.hasOwnProperty.call(mod,
+ k3)) result[k3] = mod[k3];\n }\n result[\"default\"] = mod;\n return
+ result;\n };\n Object.defineProperty(InsertOpDenormalizer, \"__esModule\",
+ { value: true });\n var value_types_1 = requireValueTypes();\n var str =
+ __importStar(requireString());\n var obj = __importStar(requireObject());\n
+ \ var InsertOpDenormalizer$1 = function() {\n function InsertOpDenormalizer2()
+ {\n }\n InsertOpDenormalizer2.denormalize = function(op) {\n if
+ (!op || typeof op !== \"object\") {\n return [];\n }\n if
+ (typeof op.insert === \"object\" || op.insert === value_types_1.NewLine) {\n
+ \ return [op];\n }\n var newlinedArray = str.tokenizeWithNewLines(op.insert
+ + \"\");\n if (newlinedArray.length === 1) {\n return [op];\n
+ \ }\n var nlObj = obj.assign({}, op, { insert: value_types_1.NewLine
+ });\n return newlinedArray.map(function(line) {\n if (line ===
+ value_types_1.NewLine) {\n return nlObj;\n }\n return
+ obj.assign({}, op, {\n insert: line\n });\n });\n };\n
+ \ return InsertOpDenormalizer2;\n }();\n InsertOpDenormalizer.InsertOpDenormalizer
+ = InsertOpDenormalizer$1;\n return InsertOpDenormalizer;\n}\nvar hasRequiredInsertOpsConverter;\nfunction
+ requireInsertOpsConverter() {\n if (hasRequiredInsertOpsConverter) return
+ InsertOpsConverter;\n hasRequiredInsertOpsConverter = 1;\n Object.defineProperty(InsertOpsConverter,
+ \"__esModule\", { value: true });\n var DeltaInsertOp_1 = requireDeltaInsertOp();\n
+ \ var value_types_1 = requireValueTypes();\n var InsertData_1 = requireInsertData();\n
+ \ var OpAttributeSanitizer_1 = requireOpAttributeSanitizer();\n var InsertOpDenormalizer_1
+ = requireInsertOpDenormalizer();\n var OpLinkSanitizer_1 = requireOpLinkSanitizer();\n
+ \ var InsertOpsConverter$1 = function() {\n function InsertOpsConverter2()
+ {\n }\n InsertOpsConverter2.convert = function(deltaOps, options) {\n
+ \ if (!Array.isArray(deltaOps)) {\n return [];\n }\n var
+ denormalizedOps = [].concat.apply([], deltaOps.map(InsertOpDenormalizer_1.InsertOpDenormalizer.denormalize));\n
+ \ var results = [];\n var insertVal, attributes;\n for (var
+ _i = 0, denormalizedOps_1 = denormalizedOps; _i < denormalizedOps_1.length;
+ _i++) {\n var op = denormalizedOps_1[_i];\n if (!op.insert)
+ {\n continue;\n }\n insertVal = InsertOpsConverter2.convertInsertVal(op.insert,
+ options);\n if (!insertVal) {\n continue;\n }\n attributes
+ = OpAttributeSanitizer_1.OpAttributeSanitizer.sanitize(op.attributes, options);\n
+ \ results.push(new DeltaInsertOp_1.DeltaInsertOp(insertVal, attributes));\n
+ \ }\n return results;\n };\n InsertOpsConverter2.convertInsertVal
+ = function(insertPropVal, sanitizeOptions) {\n if (typeof insertPropVal
+ === \"string\") {\n return new InsertData_1.InsertDataQuill(value_types_1.DataType.Text,
+ insertPropVal);\n }\n if (!insertPropVal || typeof insertPropVal
+ !== \"object\") {\n return null;\n }\n var keys2 = Object.keys(insertPropVal);\n
+ \ if (!keys2.length) {\n return null;\n }\n return value_types_1.DataType.Image
+ in insertPropVal ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Image,
+ OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Image]
+ + \"\", sanitizeOptions)) : value_types_1.DataType.Video in insertPropVal
+ ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Video, OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Video]
+ + \"\", sanitizeOptions)) : value_types_1.DataType.Formula in insertPropVal
+ ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Formula, insertPropVal[value_types_1.DataType.Formula])
+ : new InsertData_1.InsertDataCustom(keys2[0], insertPropVal[keys2[0]]);\n
+ \ };\n return InsertOpsConverter2;\n }();\n InsertOpsConverter.InsertOpsConverter
+ = InsertOpsConverter$1;\n return InsertOpsConverter;\n}\nvar OpToHtmlConverter
+ = {};\nvar hasRequiredOpToHtmlConverter;\nfunction requireOpToHtmlConverter()
+ {\n if (hasRequiredOpToHtmlConverter) return OpToHtmlConverter;\n hasRequiredOpToHtmlConverter
+ = 1;\n (function(exports2) {\n var __importStar = OpToHtmlConverter &&
+ OpToHtmlConverter.__importStar || function(mod) {\n if (mod && mod.__esModule)
+ return mod;\n var result = {};\n if (mod != null) {\n for
+ (var k3 in mod) if (Object.hasOwnProperty.call(mod, k3)) result[k3] = mod[k3];\n
+ \ }\n result[\"default\"] = mod;\n return result;\n };\n
+ \ Object.defineProperty(exports2, \"__esModule\", { value: true });\n var
+ funcs_html_1 = requireFuncsHtml();\n var value_types_1 = requireValueTypes();\n
+ \ var obj = __importStar(requireObject());\n var arr = __importStar(requireArray());\n
+ \ var OpAttributeSanitizer_1 = requireOpAttributeSanitizer();\n var DEFAULT_INLINE_FONTS
+ = {\n serif: \"font-family: Georgia, Times New Roman, serif\",\n monospace:
+ \"font-family: Monaco, Courier New, monospace\"\n };\n exports2.DEFAULT_INLINE_STYLES
+ = {\n font: function(value) {\n return DEFAULT_INLINE_FONTS[value]
+ || \"font-family:\" + value;\n },\n size: {\n small: \"font-size:
+ 0.75em\",\n large: \"font-size: 1.5em\",\n huge: \"font-size:
+ 2.5em\"\n },\n indent: function(value, op) {\n var indentSize
+ = parseInt(value, 10) * 3;\n var side = op.attributes[\"direction\"]
+ === \"rtl\" ? \"right\" : \"left\";\n return \"padding-\" + side +
+ \":\" + indentSize + \"em\";\n },\n direction: function(value, op)
+ {\n if (value === \"rtl\") {\n return \"direction:rtl\" +
+ (op.attributes[\"align\"] ? \"\" : \"; text-align:inherit\");\n } else
+ {\n return void 0;\n }\n }\n };\n var OpToHtmlConverter$1
+ = function() {\n function OpToHtmlConverter2(op, options) {\n this.op
+ = op;\n this.options = obj.assign({}, {\n classPrefix: \"ql\",\n
+ \ inlineStyles: void 0,\n encodeHtml: true,\n listItemTag:
+ \"li\",\n paragraphTag: \"p\"\n }, options);\n }\n OpToHtmlConverter2.prototype.prefixClass
+ = function(className) {\n if (!this.options.classPrefix) {\n return
+ className + \"\";\n }\n return this.options.classPrefix + \"-\"
+ + className;\n };\n OpToHtmlConverter2.prototype.getHtml = function()
+ {\n var parts = this.getHtmlParts();\n return parts.openingTag
+ + parts.content + parts.closingTag;\n };\n OpToHtmlConverter2.prototype.getHtmlParts
+ = function() {\n var _this = this;\n if (this.op.isJustNewline()
+ && !this.op.isContainerBlock()) {\n return { openingTag: \"\", closingTag:
+ \"\", content: value_types_1.NewLine };\n }\n var tags = this.getTags(),
+ attrs = this.getTagAttributes();\n if (!tags.length && attrs.length)
+ {\n tags.push(\"span\");\n }\n var beginTags = [],
+ endTags = [];\n var imgTag = \"img\";\n var isImageLink = function(tag2)
+ {\n return tag2 === imgTag && !!_this.op.attributes.link;\n };\n
+ \ for (var _i = 0, tags_1 = tags; _i < tags_1.length; _i++) {\n var
+ tag = tags_1[_i];\n if (isImageLink(tag)) {\n beginTags.push(funcs_html_1.makeStartTag(\"a\",
+ this.getLinkAttrs()));\n }\n beginTags.push(funcs_html_1.makeStartTag(tag,
+ attrs));\n endTags.push(tag === \"img\" ? \"\" : funcs_html_1.makeEndTag(tag));\n
+ \ if (isImageLink(tag)) {\n endTags.push(funcs_html_1.makeEndTag(\"a\"));\n
+ \ }\n attrs = [];\n }\n endTags.reverse();\n
+ \ return {\n openingTag: beginTags.join(\"\"),\n content:
+ this.getContent(),\n closingTag: endTags.join(\"\")\n };\n
+ \ };\n OpToHtmlConverter2.prototype.getContent = function() {\n if
+ (this.op.isContainerBlock()) {\n return \"\";\n }\n if
+ (this.op.isMentions()) {\n return this.op.insert.value;\n }\n
+ \ var content = this.op.isFormula() || this.op.isText() ? this.op.insert.value
+ : \"\";\n return this.options.encodeHtml && funcs_html_1.encodeHtml(content)
+ || content;\n };\n OpToHtmlConverter2.prototype.getCssClasses =
+ function() {\n var attrs = this.op.attributes;\n if (this.options.inlineStyles)
+ {\n return [];\n }\n var propsArr = [\"indent\", \"align\",
+ \"direction\", \"font\", \"size\"];\n if (this.options.allowBackgroundClasses)
+ {\n propsArr.push(\"background\");\n }\n return (this.getCustomCssClasses()
+ || []).concat(propsArr.filter(function(prop) {\n return !!attrs[prop];\n
+ \ }).filter(function(prop) {\n return prop === \"background\"
+ ? OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidColorLiteral(attrs[prop])
+ : true;\n }).map(function(prop) {\n return prop + \"-\" +
+ attrs[prop];\n }).concat(this.op.isFormula() ? \"formula\" : []).concat(this.op.isVideo()
+ ? \"video\" : []).concat(this.op.isImage() ? \"image\" : []).map(this.prefixClass.bind(this)));\n
+ \ };\n OpToHtmlConverter2.prototype.getCssStyles = function() {\n
+ \ var _this = this;\n var attrs = this.op.attributes;\n var
+ propsArr = [[\"color\"]];\n if (!!this.options.inlineStyles || !this.options.allowBackgroundClasses)
+ {\n propsArr.push([\"background\", \"background-color\"]);\n }\n
+ \ if (this.options.inlineStyles) {\n propsArr = propsArr.concat([\n
+ \ [\"indent\"],\n [\"align\", \"text-align\"],\n [\"direction\"],\n
+ \ [\"font\", \"font-family\"],\n [\"size\"]\n ]);\n
+ \ }\n return (this.getCustomCssStyles() || []).concat(propsArr.filter(function(item)
+ {\n return !!attrs[item[0]];\n }).map(function(item) {\n var
+ attribute2 = item[0];\n var attrValue = attrs[attribute2];\n var
+ attributeConverter = _this.options.inlineStyles && _this.options.inlineStyles[attribute2]
+ || exports2.DEFAULT_INLINE_STYLES[attribute2];\n if (typeof attributeConverter
+ === \"object\") {\n return attributeConverter[attrValue];\n }
+ else if (typeof attributeConverter === \"function\") {\n var converterFn
+ = attributeConverter;\n return converterFn(attrValue, _this.op);\n
+ \ } else {\n return arr.preferSecond(item) + \":\" + attrValue;\n
+ \ }\n })).filter(function(item) {\n return item !==
+ void 0;\n });\n };\n OpToHtmlConverter2.prototype.getTagAttributes
+ = function() {\n if (this.op.attributes.code && !this.op.isLink())
+ {\n return [];\n }\n var makeAttr = this.makeAttr.bind(this);\n
+ \ var customTagAttributes = this.getCustomTagAttributes();\n var
+ customAttr = customTagAttributes ? Object.keys(this.getCustomTagAttributes()).map(function(k3)
+ {\n return makeAttr(k3, customTagAttributes[k3]);\n }) : [];\n
+ \ var classes = this.getCssClasses();\n var tagAttrs = classes.length
+ ? customAttr.concat([makeAttr(\"class\", classes.join(\" \"))]) : customAttr;\n
+ \ if (this.op.isImage()) {\n this.op.attributes.width && (tagAttrs
+ = tagAttrs.concat(makeAttr(\"width\", this.op.attributes.width)));\n return
+ tagAttrs.concat(makeAttr(\"src\", this.op.insert.value));\n }\n if
+ (this.op.isACheckList()) {\n return tagAttrs.concat(makeAttr(\"data-checked\",
+ this.op.isCheckedList() ? \"true\" : \"false\"));\n }\n if (this.op.isFormula())
+ {\n return tagAttrs;\n }\n if (this.op.isVideo()) {\n
+ \ return tagAttrs.concat(makeAttr(\"frameborder\", \"0\"), makeAttr(\"allowfullscreen\",
+ \"true\"), makeAttr(\"src\", this.op.insert.value));\n }\n if
+ (this.op.isMentions()) {\n var mention = this.op.attributes.mention;\n
+ \ if (mention.class) {\n tagAttrs = tagAttrs.concat(makeAttr(\"class\",
+ mention.class));\n }\n if (mention[\"end-point\"] && mention.slug)
+ {\n tagAttrs = tagAttrs.concat(makeAttr(\"href\", mention[\"end-point\"]
+ + \"/\" + mention.slug));\n } else {\n tagAttrs = tagAttrs.concat(makeAttr(\"href\",
+ \"about:blank\"));\n }\n if (mention.target) {\n tagAttrs
+ = tagAttrs.concat(makeAttr(\"target\", mention.target));\n }\n return
+ tagAttrs;\n }\n var styles = this.getCssStyles();\n if
+ (styles.length) {\n tagAttrs.push(makeAttr(\"style\", styles.join(\";\")));\n
+ \ }\n if (this.op.isCodeBlock() && typeof this.op.attributes[\"code-block\"]
+ === \"string\") {\n return tagAttrs.concat(makeAttr(\"data-language\",
+ this.op.attributes[\"code-block\"]));\n }\n if (this.op.isContainerBlock())
+ {\n return tagAttrs;\n }\n if (this.op.isLink()) {\n
+ \ tagAttrs = tagAttrs.concat(this.getLinkAttrs());\n }\n return
+ tagAttrs;\n };\n OpToHtmlConverter2.prototype.makeAttr = function(k3,
+ v2) {\n return { key: k3, value: v2 };\n };\n OpToHtmlConverter2.prototype.getLinkAttrs
+ = function() {\n var tagAttrs = [];\n var targetForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.isValidTarget(this.options.linkTarget
+ || \"\") ? this.options.linkTarget : void 0;\n var relForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidRel(this.options.linkRel
+ || \"\") ? this.options.linkRel : void 0;\n var target = this.op.attributes.target
+ || targetForAll;\n var rel = this.op.attributes.rel || relForAll;\n
+ \ return tagAttrs.concat(this.makeAttr(\"href\", this.op.attributes.link)).concat(target
+ ? this.makeAttr(\"target\", target) : []).concat(rel ? this.makeAttr(\"rel\",
+ rel) : []);\n };\n OpToHtmlConverter2.prototype.getCustomTag = function(format2)
+ {\n if (this.options.customTag && typeof this.options.customTag ===
+ \"function\") {\n return this.options.customTag.apply(null, [format2,
+ this.op]);\n }\n };\n OpToHtmlConverter2.prototype.getCustomTagAttributes
+ = function() {\n if (this.options.customTagAttributes && typeof this.options.customTagAttributes
+ === \"function\") {\n return this.options.customTagAttributes.apply(null,
+ [this.op]);\n }\n };\n OpToHtmlConverter2.prototype.getCustomCssClasses
+ = function() {\n if (this.options.customCssClasses && typeof this.options.customCssClasses
+ === \"function\") {\n var res = this.options.customCssClasses.apply(null,
+ [this.op]);\n if (res) {\n return Array.isArray(res) ?
+ res : [res];\n }\n }\n };\n OpToHtmlConverter2.prototype.getCustomCssStyles
+ = function() {\n if (this.options.customCssStyles && typeof this.options.customCssStyles
+ === \"function\") {\n var res = this.options.customCssStyles.apply(null,
+ [this.op]);\n if (res) {\n return Array.isArray(res) ?
+ res : [res];\n }\n }\n };\n OpToHtmlConverter2.prototype.getTags
+ = function() {\n var _this = this;\n var attrs = this.op.attributes;\n
+ \ if (!this.op.isText()) {\n return [\n this.op.isVideo()
+ ? \"iframe\" : this.op.isImage() ? \"img\" : \"span\"\n ];\n }\n
+ \ var positionTag = this.options.paragraphTag || \"p\";\n var
+ blocks = [\n [\"blockquote\"],\n [\"code-block\", \"pre\"],\n
+ \ [\"list\", this.options.listItemTag],\n [\"header\"],\n
+ \ [\"align\", positionTag],\n [\"direction\", positionTag],\n
+ \ [\"indent\", positionTag]\n ];\n for (var _i = 0,
+ blocks_1 = blocks; _i < blocks_1.length; _i++) {\n var item = blocks_1[_i];\n
+ \ var firstItem = item[0];\n if (attrs[firstItem]) {\n var
+ customTag = this.getCustomTag(firstItem);\n return customTag ?
+ [customTag] : firstItem === \"header\" ? [\"h\" + attrs[firstItem]] : [arr.preferSecond(item)];\n
+ \ }\n }\n if (this.op.isCustomTextBlock()) {\n var
+ customTag = this.getCustomTag(\"renderAsBlock\");\n return customTag
+ ? [customTag] : [positionTag];\n }\n var customTagsMap = Object.keys(attrs).reduce(function(res,
+ it) {\n var customTag2 = _this.getCustomTag(it);\n if (customTag2)
+ {\n res[it] = customTag2;\n }\n return res;\n
+ \ }, {});\n var inlineTags = [\n [\"link\", \"a\"],\n
+ \ [\"mentions\", \"a\"],\n [\"script\"],\n [\"bold\",
+ \"strong\"],\n [\"italic\", \"em\"],\n [\"strike\", \"s\"],\n
+ \ [\"underline\", \"u\"],\n [\"code\"]\n ];\n return
+ inlineTags.filter(function(item2) {\n return !!attrs[item2[0]];\n
+ \ }).concat(Object.keys(customTagsMap).filter(function(t2) {\n return
+ !inlineTags.some(function(it) {\n return it[0] == t2;\n });\n
+ \ }).map(function(t2) {\n return [t2, customTagsMap[t2]];\n
+ \ })).map(function(item2) {\n return customTagsMap[item2[0]]
+ ? customTagsMap[item2[0]] : item2[0] === \"script\" ? attrs[item2[0]] ===
+ value_types_1.ScriptType.Sub ? \"sub\" : \"sup\" : arr.preferSecond(item2);\n
+ \ });\n };\n return OpToHtmlConverter2;\n }();\n exports2.OpToHtmlConverter
+ = OpToHtmlConverter$1;\n })(OpToHtmlConverter);\n return OpToHtmlConverter;\n}\nvar
+ Grouper = {};\nvar groupTypes = {};\nvar hasRequiredGroupTypes;\nfunction
+ requireGroupTypes() {\n if (hasRequiredGroupTypes) return groupTypes;\n hasRequiredGroupTypes
+ = 1;\n var __extends2 = groupTypes && groupTypes.__extends || function()
+ {\n var extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof
+ Array && function(d2, b2) {\n d2.__proto__ = b2;\n } || function(d2,
+ b2) {\n for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2];\n
+ \ };\n return function(d2, b2) {\n extendStatics2(d2, b2);\n function
+ __() {\n this.constructor = d2;\n }\n d2.prototype = b2 ===
+ null ? Object.create(b2) : (__.prototype = b2.prototype, new __());\n };\n
+ \ }();\n Object.defineProperty(groupTypes, \"__esModule\", { value: true
+ });\n var InlineGroup = /* @__PURE__ */ function() {\n function InlineGroup2(ops)
+ {\n this.ops = ops;\n }\n return InlineGroup2;\n }();\n groupTypes.InlineGroup
+ = InlineGroup;\n var SingleItem = /* @__PURE__ */ function() {\n function
+ SingleItem2(op) {\n this.op = op;\n }\n return SingleItem2;\n }();\n
+ \ var VideoItem = function(_super) {\n __extends2(VideoItem2, _super);\n
+ \ function VideoItem2() {\n return _super !== null && _super.apply(this,
+ arguments) || this;\n }\n return VideoItem2;\n }(SingleItem);\n groupTypes.VideoItem
+ = VideoItem;\n var BlotBlock = function(_super) {\n __extends2(BlotBlock2,
+ _super);\n function BlotBlock2() {\n return _super !== null && _super.apply(this,
+ arguments) || this;\n }\n return BlotBlock2;\n }(SingleItem);\n groupTypes.BlotBlock
+ = BlotBlock;\n var BlockGroup = /* @__PURE__ */ function() {\n function
+ BlockGroup2(op, ops) {\n this.op = op;\n this.ops = ops;\n }\n
+ \ return BlockGroup2;\n }();\n groupTypes.BlockGroup = BlockGroup;\n var
+ ListGroup = /* @__PURE__ */ function() {\n function ListGroup2(items) {\n
+ \ this.items = items;\n }\n return ListGroup2;\n }();\n groupTypes.ListGroup
+ = ListGroup;\n var ListItem2 = /* @__PURE__ */ function() {\n function
+ ListItem3(item, innerList) {\n if (innerList === void 0) {\n innerList
+ = null;\n }\n this.item = item;\n this.innerList = innerList;\n
+ \ }\n return ListItem3;\n }();\n groupTypes.ListItem = ListItem2;\n
+ \ var TableGroup = /* @__PURE__ */ function() {\n function TableGroup2(rows)
+ {\n this.rows = rows;\n }\n return TableGroup2;\n }();\n groupTypes.TableGroup
+ = TableGroup;\n var TableRow2 = /* @__PURE__ */ function() {\n function
+ TableRow3(cells) {\n this.cells = cells;\n }\n return TableRow3;\n
+ \ }();\n groupTypes.TableRow = TableRow2;\n var TableCell2 = /* @__PURE__
+ */ function() {\n function TableCell3(item) {\n this.item = item;\n
+ \ }\n return TableCell3;\n }();\n groupTypes.TableCell = TableCell2;\n
+ \ return groupTypes;\n}\nvar hasRequiredGrouper;\nfunction requireGrouper()
+ {\n if (hasRequiredGrouper) return Grouper;\n hasRequiredGrouper = 1;\n
+ \ Object.defineProperty(Grouper, \"__esModule\", { value: true });\n var
+ DeltaInsertOp_1 = requireDeltaInsertOp();\n var array_1 = requireArray();\n
+ \ var group_types_1 = requireGroupTypes();\n var Grouper$1 = function() {\n
+ \ function Grouper2() {\n }\n Grouper2.pairOpsWithTheirBlock = function(ops)
+ {\n var result = [];\n var canBeInBlock = function(op2) {\n return
+ !(op2.isJustNewline() || op2.isCustomEmbedBlock() || op2.isVideo() || op2.isContainerBlock());\n
+ \ };\n var isInlineData = function(op2) {\n return op2.isInline();\n
+ \ };\n var lastInd = ops.length - 1;\n var opsSlice;\n for
+ (var i3 = lastInd; i3 >= 0; i3--) {\n var op = ops[i3];\n if
+ (op.isVideo()) {\n result.push(new group_types_1.VideoItem(op));\n
+ \ } else if (op.isCustomEmbedBlock()) {\n result.push(new group_types_1.BlotBlock(op));\n
+ \ } else if (op.isContainerBlock()) {\n opsSlice = array_1.sliceFromReverseWhile(ops,
+ i3 - 1, canBeInBlock);\n result.push(new group_types_1.BlockGroup(op,
+ opsSlice.elements));\n i3 = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt
+ : i3;\n } else {\n opsSlice = array_1.sliceFromReverseWhile(ops,
+ i3 - 1, isInlineData);\n result.push(new group_types_1.InlineGroup(opsSlice.elements.concat(op)));\n
+ \ i3 = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i3;\n
+ \ }\n }\n result.reverse();\n return result;\n };\n
+ \ Grouper2.groupConsecutiveSameStyleBlocks = function(groups, blocksOf)
+ {\n if (blocksOf === void 0) {\n blocksOf = {\n header:
+ true,\n codeBlocks: true,\n blockquotes: true,\n customBlocks:
+ true\n };\n }\n return array_1.groupConsecutiveElementsWhile(groups,
+ function(g2, gPrev) {\n if (!(g2 instanceof group_types_1.BlockGroup)
+ || !(gPrev instanceof group_types_1.BlockGroup)) {\n return false;\n
+ \ }\n return blocksOf.codeBlocks && Grouper2.areBothCodeblocksWithSameLang(g2,
+ gPrev) || blocksOf.blockquotes && Grouper2.areBothBlockquotesWithSameAdi(g2,
+ gPrev) || blocksOf.header && Grouper2.areBothSameHeadersWithSameAdi(g2, gPrev)
+ || blocksOf.customBlocks && Grouper2.areBothCustomBlockWithSameAttr(g2, gPrev);\n
+ \ });\n };\n Grouper2.reduceConsecutiveSameStyleBlocksToOne = function(groups)
+ {\n var newLineOp = DeltaInsertOp_1.DeltaInsertOp.createNewLineOp();\n
+ \ return groups.map(function(elm) {\n if (!Array.isArray(elm))
+ {\n if (elm instanceof group_types_1.BlockGroup && !elm.ops.length)
+ {\n elm.ops.push(newLineOp);\n }\n return elm;\n
+ \ }\n var groupsLastInd = elm.length - 1;\n elm[0].ops
+ = array_1.flatten(elm.map(function(g2, i3) {\n if (!g2.ops.length)
+ {\n return [newLineOp];\n }\n return g2.ops.concat(i3
+ < groupsLastInd ? [newLineOp] : []);\n }));\n return elm[0];\n
+ \ });\n };\n Grouper2.areBothCodeblocksWithSameLang = function(g1,
+ gOther) {\n return g1.op.isCodeBlock() && gOther.op.isCodeBlock() &&
+ g1.op.hasSameLangAs(gOther.op);\n };\n Grouper2.areBothSameHeadersWithSameAdi
+ = function(g1, gOther) {\n return g1.op.isSameHeaderAs(gOther.op) &&
+ g1.op.hasSameAdiAs(gOther.op);\n };\n Grouper2.areBothBlockquotesWithSameAdi
+ = function(g2, gOther) {\n return g2.op.isBlockquote() && gOther.op.isBlockquote()
+ && g2.op.hasSameAdiAs(gOther.op);\n };\n Grouper2.areBothCustomBlockWithSameAttr
+ = function(g2, gOther) {\n return g2.op.isCustomTextBlock() && gOther.op.isCustomTextBlock()
+ && g2.op.hasSameAttr(gOther.op);\n };\n return Grouper2;\n }();\n Grouper.Grouper
+ = Grouper$1;\n return Grouper;\n}\nvar ListNester = {};\nvar hasRequiredListNester;\nfunction
+ requireListNester() {\n if (hasRequiredListNester) return ListNester;\n hasRequiredListNester
+ = 1;\n Object.defineProperty(ListNester, \"__esModule\", { value: true });\n
+ \ var group_types_1 = requireGroupTypes();\n var array_1 = requireArray();\n
+ \ var ListNester$1 = function() {\n function ListNester2() {\n }\n ListNester2.prototype.nest
+ = function(groups) {\n var _this = this;\n var listBlocked = this.convertListBlocksToListGroups(groups);\n
+ \ var groupedByListGroups = this.groupConsecutiveListGroups(listBlocked);\n
+ \ var nested = array_1.flatten(groupedByListGroups.map(function(group)
+ {\n if (!Array.isArray(group)) {\n return group;\n }\n
+ \ return _this.nestListSection(group);\n }));\n var groupRootLists
+ = array_1.groupConsecutiveElementsWhile(nested, function(curr, prev) {\n if
+ (!(curr instanceof group_types_1.ListGroup && prev instanceof group_types_1.ListGroup))
+ {\n return false;\n }\n return curr.items[0].item.op.isSameListAs(prev.items[0].item.op);\n
+ \ });\n return groupRootLists.map(function(v2) {\n if (!Array.isArray(v2))
+ {\n return v2;\n }\n var litems = v2.map(function(g2)
+ {\n return g2.items;\n });\n return new group_types_1.ListGroup(array_1.flatten(litems));\n
+ \ });\n };\n ListNester2.prototype.convertListBlocksToListGroups
+ = function(items) {\n var grouped = array_1.groupConsecutiveElementsWhile(items,
+ function(g2, gPrev) {\n return g2 instanceof group_types_1.BlockGroup
+ && gPrev instanceof group_types_1.BlockGroup && g2.op.isList() && gPrev.op.isList()
+ && g2.op.isSameListAs(gPrev.op) && g2.op.hasSameIndentationAs(gPrev.op);\n
+ \ });\n return grouped.map(function(item) {\n if (!Array.isArray(item))
+ {\n if (item instanceof group_types_1.BlockGroup && item.op.isList())
+ {\n return new group_types_1.ListGroup([new group_types_1.ListItem(item)]);\n
+ \ }\n return item;\n }\n return new group_types_1.ListGroup(item.map(function(g2)
+ {\n return new group_types_1.ListItem(g2);\n }));\n });\n
+ \ };\n ListNester2.prototype.groupConsecutiveListGroups = function(items)
+ {\n return array_1.groupConsecutiveElementsWhile(items, function(curr,
+ prev) {\n return curr instanceof group_types_1.ListGroup && prev instanceof
+ group_types_1.ListGroup;\n });\n };\n ListNester2.prototype.nestListSection
+ = function(sectionItems) {\n var _this = this;\n var indentGroups
+ = this.groupByIndent(sectionItems);\n Object.keys(indentGroups).map(Number).sort().reverse().forEach(function(indent)
+ {\n indentGroups[indent].forEach(function(lg) {\n var idx
+ = sectionItems.indexOf(lg);\n if (_this.placeUnderParent(lg, sectionItems.slice(0,
+ idx))) {\n sectionItems.splice(idx, 1);\n }\n });\n
+ \ });\n return sectionItems;\n };\n ListNester2.prototype.groupByIndent
+ = function(items) {\n return items.reduce(function(pv, cv) {\n var
+ indent = cv.items[0].item.op.attributes.indent;\n if (indent) {\n pv[indent]
+ = pv[indent] || [];\n pv[indent].push(cv);\n }\n return
+ pv;\n }, {});\n };\n ListNester2.prototype.placeUnderParent = function(target,
+ items) {\n for (var i3 = items.length - 1; i3 >= 0; i3--) {\n var
+ elm = items[i3];\n if (target.items[0].item.op.hasHigherIndentThan(elm.items[0].item.op))
+ {\n var parent = elm.items[elm.items.length - 1];\n if (parent.innerList)
+ {\n parent.innerList.items = parent.innerList.items.concat(target.items);\n
+ \ } else {\n parent.innerList = target;\n }\n
+ \ return true;\n }\n }\n return false;\n };\n
+ \ return ListNester2;\n }();\n ListNester.ListNester = ListNester$1;\n
+ \ return ListNester;\n}\nvar TableGrouper = {};\nvar hasRequiredTableGrouper;\nfunction
+ requireTableGrouper() {\n if (hasRequiredTableGrouper) return TableGrouper;\n
+ \ hasRequiredTableGrouper = 1;\n Object.defineProperty(TableGrouper, \"__esModule\",
+ { value: true });\n var group_types_1 = requireGroupTypes();\n var array_1
+ = requireArray();\n var TableGrouper$1 = function() {\n function TableGrouper2()
+ {\n }\n TableGrouper2.prototype.group = function(groups) {\n var
+ tableBlocked = this.convertTableBlocksToTableGroups(groups);\n return
+ tableBlocked;\n };\n TableGrouper2.prototype.convertTableBlocksToTableGroups
+ = function(items) {\n var _this = this;\n var grouped = array_1.groupConsecutiveElementsWhile(items,
+ function(g2, gPrev) {\n return g2 instanceof group_types_1.BlockGroup
+ && gPrev instanceof group_types_1.BlockGroup && g2.op.isTable() && gPrev.op.isTable();\n
+ \ });\n return grouped.map(function(item) {\n if (!Array.isArray(item))
+ {\n if (item instanceof group_types_1.BlockGroup && item.op.isTable())
+ {\n return new group_types_1.TableGroup([new group_types_1.TableRow([new
+ group_types_1.TableCell(item)])]);\n }\n return item;\n
+ \ }\n return new group_types_1.TableGroup(_this.convertTableBlocksToTableRows(item));\n
+ \ });\n };\n TableGrouper2.prototype.convertTableBlocksToTableRows
+ = function(items) {\n var grouped = array_1.groupConsecutiveElementsWhile(items,
+ function(g2, gPrev) {\n return g2 instanceof group_types_1.BlockGroup
+ && gPrev instanceof group_types_1.BlockGroup && g2.op.isTable() && gPrev.op.isTable()
+ && g2.op.isSameTableRowAs(gPrev.op);\n });\n return grouped.map(function(item)
+ {\n return new group_types_1.TableRow(Array.isArray(item) ? item.map(function(it)
+ {\n return new group_types_1.TableCell(it);\n }) : [new group_types_1.TableCell(item)]);\n
+ \ });\n };\n return TableGrouper2;\n }();\n TableGrouper.TableGrouper
+ = TableGrouper$1;\n return TableGrouper;\n}\nvar hasRequiredQuillDeltaToHtmlConverter;\nfunction
+ requireQuillDeltaToHtmlConverter() {\n if (hasRequiredQuillDeltaToHtmlConverter)
+ return QuillDeltaToHtmlConverter;\n hasRequiredQuillDeltaToHtmlConverter
+ = 1;\n var __importStar = QuillDeltaToHtmlConverter && QuillDeltaToHtmlConverter.__importStar
+ || function(mod) {\n if (mod && mod.__esModule) return mod;\n var result
+ = {};\n if (mod != null) {\n for (var k3 in mod) if (Object.hasOwnProperty.call(mod,
+ k3)) result[k3] = mod[k3];\n }\n result[\"default\"] = mod;\n return
+ result;\n };\n Object.defineProperty(QuillDeltaToHtmlConverter, \"__esModule\",
+ { value: true });\n var InsertOpsConverter_1 = requireInsertOpsConverter();\n
+ \ var OpToHtmlConverter_1 = requireOpToHtmlConverter();\n var Grouper_1 =
+ requireGrouper();\n var group_types_1 = requireGroupTypes();\n var ListNester_1
+ = requireListNester();\n var funcs_html_1 = requireFuncsHtml();\n var obj
+ = __importStar(requireObject());\n var value_types_1 = requireValueTypes();\n
+ \ var TableGrouper_1 = requireTableGrouper();\n var BrTag = \"
\";\n
+ \ var QuillDeltaToHtmlConverter$1 = function() {\n function QuillDeltaToHtmlConverter2(deltaOps,
+ options) {\n this.rawDeltaOps = [];\n this.callbacks = {};\n this.options
+ = obj.assign({\n paragraphTag: \"p\",\n encodeHtml: true,\n
+ \ classPrefix: \"ql\",\n inlineStyles: false,\n multiLineBlockquote:
+ true,\n multiLineHeader: true,\n multiLineCodeblock: true,\n
+ \ multiLineParagraph: true,\n multiLineCustomBlock: true,\n allowBackgroundClasses:
+ false,\n linkTarget: \"_blank\"\n }, options, {\n orderedListTag:
+ \"ol\",\n bulletListTag: \"ul\",\n listItemTag: \"li\"\n });\n
+ \ var inlineStyles;\n if (!this.options.inlineStyles) {\n inlineStyles
+ = void 0;\n } else if (typeof this.options.inlineStyles === \"object\")
+ {\n inlineStyles = this.options.inlineStyles;\n } else {\n inlineStyles
+ = {};\n }\n this.converterOptions = {\n encodeHtml: this.options.encodeHtml,\n
+ \ classPrefix: this.options.classPrefix,\n inlineStyles,\n listItemTag:
+ this.options.listItemTag,\n paragraphTag: this.options.paragraphTag,\n
+ \ linkRel: this.options.linkRel,\n linkTarget: this.options.linkTarget,\n
+ \ allowBackgroundClasses: this.options.allowBackgroundClasses,\n customTag:
+ this.options.customTag,\n customTagAttributes: this.options.customTagAttributes,\n
+ \ customCssClasses: this.options.customCssClasses,\n customCssStyles:
+ this.options.customCssStyles\n };\n this.rawDeltaOps = deltaOps;\n
+ \ }\n QuillDeltaToHtmlConverter2.prototype._getListTag = function(op)
+ {\n return op.isOrderedList() ? this.options.orderedListTag + \"\" :
+ op.isBulletList() ? this.options.bulletListTag + \"\" : op.isCheckedList()
+ ? this.options.bulletListTag + \"\" : op.isUncheckedList() ? this.options.bulletListTag
+ + \"\" : \"\";\n };\n QuillDeltaToHtmlConverter2.prototype.getGroupedOps
+ = function() {\n var deltaOps = InsertOpsConverter_1.InsertOpsConverter.convert(this.rawDeltaOps,
+ this.options);\n var pairedOps = Grouper_1.Grouper.pairOpsWithTheirBlock(deltaOps);\n
+ \ var groupedSameStyleBlocks = Grouper_1.Grouper.groupConsecutiveSameStyleBlocks(pairedOps,
+ {\n blockquotes: !!this.options.multiLineBlockquote,\n header:
+ !!this.options.multiLineHeader,\n codeBlocks: !!this.options.multiLineCodeblock,\n
+ \ customBlocks: !!this.options.multiLineCustomBlock\n });\n var
+ groupedOps = Grouper_1.Grouper.reduceConsecutiveSameStyleBlocksToOne(groupedSameStyleBlocks);\n
+ \ var tableGrouper = new TableGrouper_1.TableGrouper();\n groupedOps
+ = tableGrouper.group(groupedOps);\n var listNester = new ListNester_1.ListNester();\n
+ \ return listNester.nest(groupedOps);\n };\n QuillDeltaToHtmlConverter2.prototype.convert
+ = function() {\n var _this = this;\n var groups = this.getGroupedOps();\n
+ \ return groups.map(function(group) {\n if (group instanceof group_types_1.ListGroup)
+ {\n return _this._renderWithCallbacks(value_types_1.GroupType.List,
+ group, function() {\n return _this._renderList(group);\n });\n
+ \ } else if (group instanceof group_types_1.TableGroup) {\n return
+ _this._renderWithCallbacks(value_types_1.GroupType.Table, group, function()
+ {\n return _this._renderTable(group);\n });\n }
+ else if (group instanceof group_types_1.BlockGroup) {\n var g2 =
+ group;\n return _this._renderWithCallbacks(value_types_1.GroupType.Block,
+ group, function() {\n return _this._renderBlock(g2.op, g2.ops);\n
+ \ });\n } else if (group instanceof group_types_1.BlotBlock)
+ {\n return _this._renderCustom(group.op, null);\n } else if
+ (group instanceof group_types_1.VideoItem) {\n return _this._renderWithCallbacks(value_types_1.GroupType.Video,
+ group, function() {\n var g3 = group;\n var converter
+ = new OpToHtmlConverter_1.OpToHtmlConverter(g3.op, _this.converterOptions);\n
+ \ return converter.getHtml();\n });\n } else {\n
+ \ return _this._renderWithCallbacks(value_types_1.GroupType.InlineGroup,
+ group, function() {\n return _this._renderInlines(group.ops, true);\n
+ \ });\n }\n }).join(\"\");\n };\n QuillDeltaToHtmlConverter2.prototype._renderWithCallbacks
+ = function(groupType, group, myRenderFn) {\n var html = \"\";\n var
+ beforeCb = this.callbacks[\"beforeRender_cb\"];\n html = typeof beforeCb
+ === \"function\" ? beforeCb.apply(null, [groupType, group]) : \"\";\n if
+ (!html) {\n html = myRenderFn();\n }\n var afterCb = this.callbacks[\"afterRender_cb\"];\n
+ \ html = typeof afterCb === \"function\" ? afterCb.apply(null, [groupType,
+ html]) : html;\n return html;\n };\n QuillDeltaToHtmlConverter2.prototype._renderList
+ = function(list2) {\n var _this = this;\n var firstItem = list2.items[0];\n
+ \ return funcs_html_1.makeStartTag(this._getListTag(firstItem.item.op))
+ + list2.items.map(function(li) {\n return _this._renderListItem(li);\n
+ \ }).join(\"\") + funcs_html_1.makeEndTag(this._getListTag(firstItem.item.op));\n
+ \ };\n QuillDeltaToHtmlConverter2.prototype._renderListItem = function(li)
+ {\n li.item.op.attributes.indent = 0;\n var converter = new OpToHtmlConverter_1.OpToHtmlConverter(li.item.op,
+ this.converterOptions);\n var parts = converter.getHtmlParts();\n var
+ liElementsHtml = this._renderInlines(li.item.ops, false);\n return parts.openingTag
+ + liElementsHtml + (li.innerList ? this._renderList(li.innerList) : \"\")
+ + parts.closingTag;\n };\n QuillDeltaToHtmlConverter2.prototype._renderTable
+ = function(table2) {\n var _this = this;\n return funcs_html_1.makeStartTag(\"table\")
+ + funcs_html_1.makeStartTag(\"tbody\") + table2.rows.map(function(row) {\n
+ \ return _this._renderTableRow(row);\n }).join(\"\") + funcs_html_1.makeEndTag(\"tbody\")
+ + funcs_html_1.makeEndTag(\"table\");\n };\n QuillDeltaToHtmlConverter2.prototype._renderTableRow
+ = function(row) {\n var _this = this;\n return funcs_html_1.makeStartTag(\"tr\")
+ + row.cells.map(function(cell) {\n return _this._renderTableCell(cell);\n
+ \ }).join(\"\") + funcs_html_1.makeEndTag(\"tr\");\n };\n QuillDeltaToHtmlConverter2.prototype._renderTableCell
+ = function(cell) {\n var converter = new OpToHtmlConverter_1.OpToHtmlConverter(cell.item.op,
+ this.converterOptions);\n var parts = converter.getHtmlParts();\n var
+ cellElementsHtml = this._renderInlines(cell.item.ops, false);\n return
+ funcs_html_1.makeStartTag(\"td\", {\n key: \"data-row\",\n value:
+ cell.item.op.attributes.table\n }) + parts.openingTag + cellElementsHtml
+ + parts.closingTag + funcs_html_1.makeEndTag(\"td\");\n };\n QuillDeltaToHtmlConverter2.prototype._renderBlock
+ = function(bop, ops) {\n var _this = this;\n var converter = new
+ OpToHtmlConverter_1.OpToHtmlConverter(bop, this.converterOptions);\n var
+ htmlParts = converter.getHtmlParts();\n if (bop.isCodeBlock()) {\n return
+ htmlParts.openingTag + funcs_html_1.encodeHtml(ops.map(function(iop) {\n return
+ iop.isCustomEmbed() ? _this._renderCustom(iop, bop) : iop.insert.value;\n
+ \ }).join(\"\")) + htmlParts.closingTag;\n }\n var inlines
+ = ops.map(function(op) {\n return _this._renderInline(op, bop);\n }).join(\"\");\n
+ \ return htmlParts.openingTag + (inlines || BrTag) + htmlParts.closingTag;\n
+ \ };\n QuillDeltaToHtmlConverter2.prototype._renderInlines = function(ops,
+ isInlineGroup) {\n var _this = this;\n if (isInlineGroup === void
+ 0) {\n isInlineGroup = true;\n }\n var opsLen = ops.length
+ - 1;\n var html = ops.map(function(op, i3) {\n if (i3 > 0 && i3
+ === opsLen && op.isJustNewline()) {\n return \"\";\n }\n return
+ _this._renderInline(op, null);\n }).join(\"\");\n if (!isInlineGroup)
+ {\n return html;\n }\n var startParaTag = funcs_html_1.makeStartTag(this.options.paragraphTag);\n
+ \ var endParaTag = funcs_html_1.makeEndTag(this.options.paragraphTag);\n
+ \ if (html === BrTag || this.options.multiLineParagraph) {\n return
+ startParaTag + html + endParaTag;\n }\n return startParaTag + html.split(BrTag).map(function(v2)
+ {\n return v2 === \"\" ? BrTag : v2;\n }).join(endParaTag + startParaTag)
+ + endParaTag;\n };\n QuillDeltaToHtmlConverter2.prototype._renderInline
+ = function(op, contextOp) {\n if (op.isCustomEmbed()) {\n return
+ this._renderCustom(op, contextOp);\n }\n var converter = new OpToHtmlConverter_1.OpToHtmlConverter(op,
+ this.converterOptions);\n return converter.getHtml().replace(/\\n/g,
+ BrTag);\n };\n QuillDeltaToHtmlConverter2.prototype._renderCustom =
+ function(op, contextOp) {\n var renderCb = this.callbacks[\"renderCustomOp_cb\"];\n
+ \ if (typeof renderCb === \"function\") {\n return renderCb.apply(null,
+ [op, contextOp]);\n }\n return \"\";\n };\n QuillDeltaToHtmlConverter2.prototype.beforeRender
+ = function(cb) {\n if (typeof cb === \"function\") {\n this.callbacks[\"beforeRender_cb\"]
+ = cb;\n }\n };\n QuillDeltaToHtmlConverter2.prototype.afterRender
+ = function(cb) {\n if (typeof cb === \"function\") {\n this.callbacks[\"afterRender_cb\"]
+ = cb;\n }\n };\n QuillDeltaToHtmlConverter2.prototype.renderCustomWith
+ = function(cb) {\n this.callbacks[\"renderCustomOp_cb\"] = cb;\n };\n
+ \ return QuillDeltaToHtmlConverter2;\n }();\n QuillDeltaToHtmlConverter.QuillDeltaToHtmlConverter
+ = QuillDeltaToHtmlConverter$1;\n return QuillDeltaToHtmlConverter;\n}\nvar
+ hasRequiredMain;\nfunction requireMain() {\n if (hasRequiredMain) return
+ main;\n hasRequiredMain = 1;\n Object.defineProperty(main, \"__esModule\",
+ { value: true });\n var QuillDeltaToHtmlConverter_1 = requireQuillDeltaToHtmlConverter();\n
+ \ main.QuillDeltaToHtmlConverter = QuillDeltaToHtmlConverter_1.QuillDeltaToHtmlConverter;\n
+ \ var OpToHtmlConverter_1 = requireOpToHtmlConverter();\n main.OpToHtmlConverter
+ = OpToHtmlConverter_1.OpToHtmlConverter;\n var group_types_1 = requireGroupTypes();\n
+ \ main.InlineGroup = group_types_1.InlineGroup;\n main.VideoItem = group_types_1.VideoItem;\n
+ \ main.BlockGroup = group_types_1.BlockGroup;\n main.ListGroup = group_types_1.ListGroup;\n
+ \ main.ListItem = group_types_1.ListItem;\n main.BlotBlock = group_types_1.BlotBlock;\n
+ \ var DeltaInsertOp_1 = requireDeltaInsertOp();\n main.DeltaInsertOp = DeltaInsertOp_1.DeltaInsertOp;\n
+ \ var InsertData_1 = requireInsertData();\n main.InsertDataQuill = InsertData_1.InsertDataQuill;\n
+ \ main.InsertDataCustom = InsertData_1.InsertDataCustom;\n var value_types_1
+ = requireValueTypes();\n main.NewLine = value_types_1.NewLine;\n main.ListType
+ = value_types_1.ListType;\n main.ScriptType = value_types_1.ScriptType;\n
+ \ main.DirectionType = value_types_1.DirectionType;\n main.AlignType = value_types_1.AlignType;\n
+ \ main.DataType = value_types_1.DataType;\n main.GroupType = value_types_1.GroupType;\n
+ \ return main;\n}\nvar mainExports = requireMain();\nconst ValueRichtextMixin
+ = {\n name: \"valuerichtext-mixin\",\n getValue() {\n const ops = this.quill.getContents().ops;\n
+ \ const converter = new mainExports.QuillDeltaToHtmlConverter(ops, {\n multiLineParagraph:
+ false\n });\n return converter.convert();\n }\n};\nconst formTemplates
+ = {\n text: {\n template: (value, attributes) => x`\n \n `,\n dependencies:
+ [FormMixin, PatternMixin, FormLengthMixin]\n },\n textarea: {\n template:
+ (value, attributes) => x`\n \n `,\n
+ \ dependencies: [FormMixin, FormLengthMixin]\n },\n checkbox: {\n template:
+ (value, attributes) => x`\n \n
+ \ `,\n dependencies: [FormCheckboxMixin, FormMixin]\n },\n date: {\n
+ \ template: (_value, attributes) => x`\n \n `,\n dependencies: [FormMixin]\n },\n rangedate: {\n template:
+ (_value, attributes) => x`\n \n \n `,\n dependencies: [FilterRangeFormMixin, FormMixin]\n },\n
+ \ number: {\n template: (value, attributes) => x`\n \n `,\n dependencies: [FormNumberMixin, FormMinMaxMixin, FormMixin,
+ FormStepMixin]\n },\n rangenumber: {\n template: (_value, attributes)
+ => x`\n \n \n `,\n dependencies: [FilterRangeFormMixin, FormNumberMixin,
+ FormMixin]\n },\n hidden: {\n template: (value, attributes) => x`\n \n `,\n
+ \ dependencies: [FormMixin]\n },\n dropdown: {\n template: (value,
+ attributes) => x`\n \n `,\n dependencies: [FormDropdownMixin, FormMixin,
+ RangeMixin]\n },\n radio: {\n template: (value, attributes) => x`\n \n `,\n dependencies: [FormRadioMixin, FormMixin, RangeMixin]\n
+ \ },\n multicheckbox: {\n template: (_value, attributes) => x`\n \n `,\n dependencies: [FormCheckboxesMixin, FormMixin,
+ RangeMixin]\n },\n checkboxes: {\n template: (_value, attributes) =>
+ x`\n \n
+ \ `,\n dependencies: [MultipleselectFormMixin, FormMixin, RangeMixin]\n
+ \ },\n multiple: {\n template: (_value, attributes) => x`\n ${(attributes.children
+ || []).map(\n (child, index2) => x`\n \n ${child}\n \n
+ \
\n `\n )}\n \n `,\n dependencies:
+ [MultipleFormMixin, FormMixin]\n },\n multipleselect: {\n template: (_value,
+ attributes) => x`\n \n
+ \ `,\n dependencies: [MultipleselectFormMixin, FormMixin, RangeMixin]\n
+ \ },\n file: {\n template: (value, attributes) => x`\n \n `,\n dependencies: [FormFileMixin, FormMixin]\n },\n
+ \ image: {\n template: (value, attributes) => x`\n \n
\n
\n

\n
\n
${attributes.output}\n
\n
+ \ `,\n dependencies: [FormFileMixin, FormMixin]\n },\n richtext: {\n
+ \ template: (_value, attributes) => x`\n \n
+ \ `,\n dependencies: [ValueRichtextMixin, FormMixin]\n },\n editor:
+ {\n template: (_value, attributes) => x`\n \n `,\n dependencies: [ValueEditorMixin, FormMixin]\n
+ \ },\n color: {\n template: (_value, attributes) => x`\n \n `,\n dependencies: [FormMixin]\n },\n email: {\n template:
+ (value, attributes) => x`\n \n `,\n dependencies:
+ [FormMixin, FormLengthMixin]\n },\n password: {\n template: (value, attributes)
+ => x`\n \n `,\n dependencies: [FormMixin, PatternMixin, FormLengthMixin]\n
+ \ },\n time: {\n template: (value, attributes) => x`\n \n `,\n dependencies: [FormMixin, FormMinMaxMixin, FormStepMixin]\n
+ \ }\n};\nconst SetMixin = {\n name: \"set-mixin\",\n /**\n * For sets
+ and group widgets, remove auto rendering\n * function to allow only manual
+ renders\n */\n planRender() {\n }\n};\nconst groupTemplates = {\n default:
+ {\n template: (value) => x`${value}`,\n
+ \ dependencies: [SetMixin]\n }\n};\nconst setTemplates = {\n default:
+ {\n template: () => x``,\n dependencies: [SetMixin]\n },\n div: {\n
+ \ template: () => x``,\n dependencies: [SetMixin]\n
+ \ },\n ul: {\n template: () => x``,\n dependencies:
+ [SetMixin]\n }\n};\nconst index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__
+ */ Object.defineProperty({\n __proto__: null,\n defaultTemplates,\n displayTemplates,\n
+ \ formTemplates,\n groupTemplates,\n setTemplates\n}, Symbol.toStringTag,
+ { value: \"Module\" }));\nvar version = \"4.1.0\";\nfunction isUndefined(value)
+ {\n return value === void 0;\n}\nfunction isBoolean(value) {\n return typeof
+ value === \"boolean\";\n}\nfunction defaults(dest, src) {\n for (var prop
+ in src) {\n if (src.hasOwnProperty(prop) && isUndefined(dest[prop])) {\n
+ \ dest[prop] = src[prop];\n }\n }\n return dest;\n}\nfunction ellipsis(str,
+ truncateLen, ellipsisChars) {\n var ellipsisLength;\n if (str.length > truncateLen)
+ {\n if (ellipsisChars == null) {\n ellipsisChars = \"…\";\n
+ \ ellipsisLength = 3;\n } else {\n ellipsisLength = ellipsisChars.length;\n
+ \ }\n str = str.substring(0, truncateLen - ellipsisLength) + ellipsisChars;\n
+ \ }\n return str;\n}\nfunction remove(arr, item) {\n for (var i3 = arr.length
+ - 1; i3 >= 0; i3--) {\n if (arr[i3] === item) {\n arr.splice(i3, 1);\n
+ \ }\n }\n}\nfunction removeWithPredicate(arr, fn) {\n for (var i3 = arr.length
+ - 1; i3 >= 0; i3--) {\n if (fn(arr[i3]) === true) {\n arr.splice(i3,
+ 1);\n }\n }\n}\nfunction assertNever(theValue) {\n throw new Error(\"Unhandled
+ case for value: '\".concat(theValue, \"'\"));\n}\nvar letterRe = /[A-Za-z]/;\nvar
+ digitRe = /[\\d]/;\nvar whitespaceRe = /\\s/;\nvar quoteRe = /['\"]/;\nvar
+ controlCharsRe = /[\\x00-\\x1F\\x7F]/;\nvar alphaCharsStr = /A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source;\nvar
+ emojiStr = /\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source;\nvar
+ marksStr = /\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source;\nvar
+ alphaCharsAndMarksStr = alphaCharsStr + emojiStr + marksStr;\nvar decimalNumbersStr
+ = /0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source;\nvar
+ alphaNumericAndMarksCharsStr = alphaCharsAndMarksStr + decimalNumbersStr;\nvar
+ alphaNumericAndMarksRe = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr,
+ \"]\"));\nvar HtmlTag = (\n /** @class */\n function() {\n function HtmlTag2(cfg)
+ {\n if (cfg === void 0) {\n cfg = {};\n }\n this.tagName
+ = \"\";\n this.attrs = {};\n this.innerHTML = \"\";\n this.tagName
+ = cfg.tagName || \"\";\n this.attrs = cfg.attrs || {};\n this.innerHTML
+ = cfg.innerHtml || cfg.innerHTML || \"\";\n }\n HtmlTag2.prototype.setTagName
+ = function(tagName) {\n this.tagName = tagName;\n return this;\n
+ \ };\n HtmlTag2.prototype.getTagName = function() {\n return this.tagName
+ || \"\";\n };\n HtmlTag2.prototype.setAttr = function(attrName, attrValue)
+ {\n var tagAttrs = this.getAttrs();\n tagAttrs[attrName] = attrValue;\n
+ \ return this;\n };\n HtmlTag2.prototype.getAttr = function(attrName)
+ {\n return this.getAttrs()[attrName];\n };\n HtmlTag2.prototype.setAttrs
+ = function(attrs) {\n Object.assign(this.getAttrs(), attrs);\n return
+ this;\n };\n HtmlTag2.prototype.getAttrs = function() {\n return
+ this.attrs || (this.attrs = {});\n };\n HtmlTag2.prototype.setClass
+ = function(cssClass) {\n return this.setAttr(\"class\", cssClass);\n
+ \ };\n HtmlTag2.prototype.addClass = function(cssClass) {\n var
+ classAttr = this.getClass(), classes = !classAttr ? [] : classAttr.split(whitespaceRe),
+ newClasses = cssClass.split(whitespaceRe), newClass;\n while (newClass
+ = newClasses.shift()) {\n if (classes.indexOf(newClass) === -1) {\n
+ \ classes.push(newClass);\n }\n }\n this.getAttrs()[\"class\"]
+ = classes.join(\" \");\n return this;\n };\n HtmlTag2.prototype.removeClass
+ = function(cssClass) {\n var classAttr = this.getClass(), classes = !classAttr
+ ? [] : classAttr.split(whitespaceRe), removeClasses = cssClass.split(whitespaceRe),
+ removeClass;\n while (classes.length && (removeClass = removeClasses.shift()))
+ {\n var idx = classes.indexOf(removeClass);\n if (idx !== -1)
+ {\n classes.splice(idx, 1);\n }\n }\n this.getAttrs()[\"class\"]
+ = classes.join(\" \");\n return this;\n };\n HtmlTag2.prototype.getClass
+ = function() {\n return this.getAttrs()[\"class\"] || \"\";\n };\n
+ \ HtmlTag2.prototype.hasClass = function(cssClass) {\n return (\" \"
+ + this.getClass() + \" \").indexOf(\" \" + cssClass + \" \") !== -1;\n };\n
+ \ HtmlTag2.prototype.setInnerHTML = function(html) {\n this.innerHTML
+ = html;\n return this;\n };\n HtmlTag2.prototype.setInnerHtml =
+ function(html) {\n return this.setInnerHTML(html);\n };\n HtmlTag2.prototype.getInnerHTML
+ = function() {\n return this.innerHTML || \"\";\n };\n HtmlTag2.prototype.getInnerHtml
+ = function() {\n return this.getInnerHTML();\n };\n HtmlTag2.prototype.toAnchorString
+ = function() {\n var tagName = this.getTagName(), attrsStr = this.buildAttrsStr();\n
+ \ attrsStr = attrsStr ? \" \" + attrsStr : \"\";\n return [\"<\",
+ tagName, attrsStr, \">\", this.getInnerHtml(), \"\", tagName, \">\"].join(\"\");\n
+ \ };\n HtmlTag2.prototype.buildAttrsStr = function() {\n if (!this.attrs)\n
+ \ return \"\";\n var attrs = this.getAttrs(), attrsArr = [];\n
+ \ for (var prop in attrs) {\n if (attrs.hasOwnProperty(prop)) {\n
+ \ attrsArr.push(prop + '=\"' + attrs[prop] + '\"');\n }\n }\n
+ \ return attrsArr.join(\" \");\n };\n return HtmlTag2;\n }()\n);\nfunction
+ truncateSmart(url2, truncateLen, ellipsisChars) {\n var ellipsisLengthBeforeParsing;\n
+ \ var ellipsisLength;\n if (ellipsisChars == null) {\n ellipsisChars =
+ \"…\";\n ellipsisLength = 3;\n ellipsisLengthBeforeParsing =
+ 8;\n } else {\n ellipsisLength = ellipsisChars.length;\n ellipsisLengthBeforeParsing
+ = ellipsisChars.length;\n }\n var parse_url = function(url3) {\n var
+ urlObj2 = {};\n var urlSub = url3;\n var match3 = urlSub.match(/^([a-z]+):\\/\\//i);\n
+ \ if (match3) {\n urlObj2.scheme = match3[1];\n urlSub = urlSub.substr(match3[0].length);\n
+ \ }\n match3 = urlSub.match(/^(.*?)(?=(\\?|#|\\/|$))/i);\n if (match3)
+ {\n urlObj2.host = match3[1];\n urlSub = urlSub.substr(match3[0].length);\n
+ \ }\n match3 = urlSub.match(/^\\/(.*?)(?=(\\?|#|$))/i);\n if (match3)
+ {\n urlObj2.path = match3[1];\n urlSub = urlSub.substr(match3[0].length);\n
+ \ }\n match3 = urlSub.match(/^\\?(.*?)(?=(#|$))/i);\n if (match3)
+ {\n urlObj2.query = match3[1];\n urlSub = urlSub.substr(match3[0].length);\n
+ \ }\n match3 = urlSub.match(/^#(.*?)$/i);\n if (match3) {\n urlObj2.fragment
+ = match3[1];\n }\n return urlObj2;\n };\n var buildUrl = function(urlObj2)
+ {\n var url3 = \"\";\n if (urlObj2.scheme && urlObj2.host) {\n url3
+ += urlObj2.scheme + \"://\";\n }\n if (urlObj2.host) {\n url3 +=
+ urlObj2.host;\n }\n if (urlObj2.path) {\n url3 += \"/\" + urlObj2.path;\n
+ \ }\n if (urlObj2.query) {\n url3 += \"?\" + urlObj2.query;\n }\n
+ \ if (urlObj2.fragment) {\n url3 += \"#\" + urlObj2.fragment;\n }\n
+ \ return url3;\n };\n var buildSegment = function(segment, remainingAvailableLength3)
+ {\n var remainingAvailableLengthHalf = remainingAvailableLength3 / 2, startOffset
+ = Math.ceil(remainingAvailableLengthHalf), endOffset = -1 * Math.floor(remainingAvailableLengthHalf),
+ end2 = \"\";\n if (endOffset < 0) {\n end2 = segment.substr(endOffset);\n
+ \ }\n return segment.substr(0, startOffset) + ellipsisChars + end2;\n
+ \ };\n if (url2.length <= truncateLen) {\n return url2;\n }\n var availableLength
+ = truncateLen - ellipsisLength;\n var urlObj = parse_url(url2);\n if (urlObj.query)
+ {\n var matchQuery = urlObj.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);\n
+ \ if (matchQuery) {\n urlObj.query = urlObj.query.substr(0, matchQuery[1].length);\n
+ \ url2 = buildUrl(urlObj);\n }\n }\n if (url2.length <= truncateLen)
+ {\n return url2;\n }\n if (urlObj.host) {\n urlObj.host = urlObj.host.replace(/^www\\./,
+ \"\");\n url2 = buildUrl(urlObj);\n }\n if (url2.length <= truncateLen)
+ {\n return url2;\n }\n var str = \"\";\n if (urlObj.host) {\n str
+ += urlObj.host;\n }\n if (str.length >= availableLength) {\n if (urlObj.host.length
+ == truncateLen) {\n return (urlObj.host.substr(0, truncateLen - ellipsisLength)
+ + ellipsisChars).substr(0, availableLength + ellipsisLengthBeforeParsing);\n
+ \ }\n return buildSegment(str, availableLength).substr(0, availableLength
+ + ellipsisLengthBeforeParsing);\n }\n var pathAndQuery = \"\";\n if (urlObj.path)
+ {\n pathAndQuery += \"/\" + urlObj.path;\n }\n if (urlObj.query) {\n
+ \ pathAndQuery += \"?\" + urlObj.query;\n }\n if (pathAndQuery) {\n if
+ ((str + pathAndQuery).length >= availableLength) {\n if ((str + pathAndQuery).length
+ == truncateLen) {\n return (str + pathAndQuery).substr(0, truncateLen);\n
+ \ }\n var remainingAvailableLength = availableLength - str.length;\n
+ \ return (str + buildSegment(pathAndQuery, remainingAvailableLength)).substr(0,
+ availableLength + ellipsisLengthBeforeParsing);\n } else {\n str +=
+ pathAndQuery;\n }\n }\n if (urlObj.fragment) {\n var fragment = \"#\"
+ + urlObj.fragment;\n if ((str + fragment).length >= availableLength) {\n
+ \ if ((str + fragment).length == truncateLen) {\n return (str +
+ fragment).substr(0, truncateLen);\n }\n var remainingAvailableLength2
+ = availableLength - str.length;\n return (str + buildSegment(fragment,
+ remainingAvailableLength2)).substr(0, availableLength + ellipsisLengthBeforeParsing);\n
+ \ } else {\n str += fragment;\n }\n }\n if (urlObj.scheme && urlObj.host)
+ {\n var scheme = urlObj.scheme + \"://\";\n if ((str + scheme).length
+ < availableLength) {\n return (scheme + str).substr(0, truncateLen);\n
+ \ }\n }\n if (str.length <= truncateLen) {\n return str;\n }\n var
+ end = \"\";\n if (availableLength > 0) {\n end = str.substr(-1 * Math.floor(availableLength
+ / 2));\n }\n return (str.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars
+ + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\nfunction
+ truncateMiddle(url2, truncateLen, ellipsisChars) {\n if (url2.length <= truncateLen)
+ {\n return url2;\n }\n var ellipsisLengthBeforeParsing;\n var ellipsisLength;\n
+ \ if (ellipsisChars == null) {\n ellipsisChars = \"…\";\n ellipsisLengthBeforeParsing
+ = 8;\n ellipsisLength = 3;\n } else {\n ellipsisLengthBeforeParsing
+ = ellipsisChars.length;\n ellipsisLength = ellipsisChars.length;\n }\n
+ \ var availableLength = truncateLen - ellipsisLength;\n var end = \"\";\n
+ \ if (availableLength > 0) {\n end = url2.substr(-1 * Math.floor(availableLength
+ / 2));\n }\n return (url2.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars
+ + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\nfunction
+ truncateEnd(anchorText, truncateLen, ellipsisChars) {\n return ellipsis(anchorText,
+ truncateLen, ellipsisChars);\n}\nvar AnchorTagBuilder = (\n /** @class */\n
+ \ function() {\n function AnchorTagBuilder2(cfg) {\n if (cfg === void
+ 0) {\n cfg = {};\n }\n this.newWindow = false;\n this.truncate
+ = {};\n this.className = \"\";\n this.newWindow = cfg.newWindow
+ || false;\n this.truncate = cfg.truncate || {};\n this.className
+ = cfg.className || \"\";\n }\n AnchorTagBuilder2.prototype.build = function(match3)
+ {\n return new HtmlTag({\n tagName: \"a\",\n attrs: this.createAttrs(match3),\n
+ \ innerHtml: this.processAnchorText(match3.getAnchorText())\n });\n
+ \ };\n AnchorTagBuilder2.prototype.createAttrs = function(match3) {\n
+ \ var attrs = {\n href: match3.getAnchorHref()\n // we'll
+ always have the `href` attribute\n };\n var cssClass = this.createCssClass(match3);\n
+ \ if (cssClass) {\n attrs[\"class\"] = cssClass;\n }\n if
+ (this.newWindow) {\n attrs[\"target\"] = \"_blank\";\n attrs[\"rel\"]
+ = \"noopener noreferrer\";\n }\n if (this.truncate) {\n if
+ (this.truncate.length && this.truncate.length < match3.getAnchorText().length)
+ {\n attrs[\"title\"] = match3.getAnchorHref();\n }\n }\n
+ \ return attrs;\n };\n AnchorTagBuilder2.prototype.createCssClass
+ = function(match3) {\n var className = this.className;\n if (!className)
+ {\n return \"\";\n } else {\n var returnClasses = [className],
+ cssClassSuffixes = match3.getCssClassSuffixes();\n for (var i3 = 0,
+ len = cssClassSuffixes.length; i3 < len; i3++) {\n returnClasses.push(className
+ + \"-\" + cssClassSuffixes[i3]);\n }\n return returnClasses.join(\"
+ \");\n }\n };\n AnchorTagBuilder2.prototype.processAnchorText =
+ function(anchorText) {\n anchorText = this.doTruncate(anchorText);\n
+ \ return anchorText;\n };\n AnchorTagBuilder2.prototype.doTruncate
+ = function(anchorText) {\n var truncate = this.truncate;\n if (!truncate
+ || !truncate.length)\n return anchorText;\n var truncateLength
+ = truncate.length, truncateLocation = truncate.location;\n if (truncateLocation
+ === \"smart\") {\n return truncateSmart(anchorText, truncateLength);\n
+ \ } else if (truncateLocation === \"middle\") {\n return truncateMiddle(anchorText,
+ truncateLength);\n } else {\n return truncateEnd(anchorText, truncateLength);\n
+ \ }\n };\n return AnchorTagBuilder2;\n }()\n);\nvar extendStatics
+ = function(d2, b2) {\n extendStatics = Object.setPrototypeOf || { __proto__:
+ [] } instanceof Array && function(d3, b3) {\n d3.__proto__ = b3;\n } ||
+ function(d3, b3) {\n for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3,
+ p2)) d3[p2] = b3[p2];\n };\n return extendStatics(d2, b2);\n};\nfunction
+ __extends(d2, b2) {\n if (typeof b2 !== \"function\" && b2 !== null)\n throw
+ new TypeError(\"Class extends value \" + String(b2) + \" is not a constructor
+ or null\");\n extendStatics(d2, b2);\n function __() {\n this.constructor
+ = d2;\n }\n d2.prototype = b2 === null ? Object.create(b2) : (__.prototype
+ = b2.prototype, new __());\n}\nvar __assign = function() {\n __assign = Object.assign
+ || function __assign2(t2) {\n for (var s2, i3 = 1, n3 = arguments.length;
+ i3 < n3; i3++) {\n s2 = arguments[i3];\n for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2,
+ p2)) t2[p2] = s2[p2];\n }\n return t2;\n };\n return __assign.apply(this,
+ arguments);\n};\ntypeof SuppressedError === \"function\" ? SuppressedError
+ : function(error2, suppressed, message) {\n var e2 = new Error(message);\n
+ \ return e2.name = \"SuppressedError\", e2.error = error2, e2.suppressed =
+ suppressed, e2;\n};\nvar AbstractMatch = (\n /** @class */\n function()
+ {\n function AbstractMatch2(cfg) {\n this._ = null;\n this.matchedText
+ = \"\";\n this.offset = 0;\n this.tagBuilder = cfg.tagBuilder;\n
+ \ this.matchedText = cfg.matchedText;\n this.offset = cfg.offset;\n
+ \ }\n AbstractMatch2.prototype.getMatchedText = function() {\n return
+ this.matchedText;\n };\n AbstractMatch2.prototype.setOffset = function(offset)
+ {\n this.offset = offset;\n };\n AbstractMatch2.prototype.getOffset
+ = function() {\n return this.offset;\n };\n AbstractMatch2.prototype.getCssClassSuffixes
+ = function() {\n return [this.type];\n };\n AbstractMatch2.prototype.buildTag
+ = function() {\n return this.tagBuilder.build(this);\n };\n return
+ AbstractMatch2;\n }()\n);\nvar tldRegexStr = \"(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bentley|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|lipsy|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)\";\nvar
+ tldRegex = new RegExp(\"^\" + tldRegexStr + \"$\");\nvar urlSuffixStartCharsRe
+ = /[\\/?#]/;\nvar urlSuffixAllowedSpecialCharsRe = /[-+&@#/%=~_()|'$*\\[\\]{}\\u2713]/;\nvar
+ urlSuffixNotAllowedAsLastCharRe = /[?!:,.;^]/;\nvar httpSchemeRe = /https?:\\/\\//i;\nvar
+ httpSchemePrefixRe = new RegExp(\"^\" + httpSchemeRe.source, \"i\");\nvar
+ urlSuffixedCharsNotAllowedAtEndRe = new RegExp(urlSuffixNotAllowedAsLastCharRe.source
+ + \"$\");\nvar invalidSchemeRe = /^(javascript|vbscript):/i;\nvar schemeUrlRe
+ = /^[A-Za-z][-.+A-Za-z0-9]*:(\\/\\/)?([^:/]*)/;\nvar tldUrlHostRe = /^(?:\\/\\/)?([^/#?:]+)/;\nfunction
+ isSchemeStartChar(char) {\n return letterRe.test(char);\n}\nfunction isSchemeChar(char)
+ {\n return letterRe.test(char) || digitRe.test(char) || char === \"+\" ||
+ char === \"-\" || char === \".\";\n}\nfunction isDomainLabelStartChar(char)
+ {\n return alphaNumericAndMarksRe.test(char);\n}\nfunction isDomainLabelChar(char)
+ {\n return char === \"_\" || isDomainLabelStartChar(char);\n}\nfunction isPathChar(char)
+ {\n return alphaNumericAndMarksRe.test(char) || urlSuffixAllowedSpecialCharsRe.test(char)
+ || urlSuffixNotAllowedAsLastCharRe.test(char);\n}\nfunction isUrlSuffixStartChar(char)
+ {\n return urlSuffixStartCharsRe.test(char);\n}\nfunction isKnownTld(tld)
+ {\n return tldRegex.test(tld.toLowerCase());\n}\nfunction isValidSchemeUrl(url2)
+ {\n if (invalidSchemeRe.test(url2)) {\n return false;\n }\n var schemeMatch
+ = url2.match(schemeUrlRe);\n if (!schemeMatch) {\n return false;\n }\n
+ \ var isAuthorityMatch = !!schemeMatch[1];\n var host = schemeMatch[2];\n
+ \ if (isAuthorityMatch) {\n return true;\n }\n if (host.indexOf(\".\")
+ === -1 || !letterRe.test(host)) {\n return false;\n }\n return true;\n}\nfunction
+ isValidTldMatch(url2) {\n var tldUrlHostMatch = url2.match(tldUrlHostRe);\n
+ \ if (!tldUrlHostMatch) {\n return false;\n }\n var host = tldUrlHostMatch[0];\n
+ \ var hostLabels = host.split(\".\");\n if (hostLabels.length < 2) {\n return
+ false;\n }\n var tld = hostLabels[hostLabels.length - 1];\n if (!isKnownTld(tld))
+ {\n return false;\n }\n return true;\n}\nvar ipV4Re = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\nvar
+ ipV4PartRe = /[:/?#]/;\nfunction isValidIpV4Address(url2) {\n var ipV4Part
+ = url2.split(ipV4PartRe, 1)[0];\n return ipV4Re.test(ipV4Part);\n}\nvar wwwPrefixRegex
+ = /^(https?:\\/\\/)?(www\\.)?/i;\nvar protocolRelativeRegex = /^\\/\\//;\nvar
+ UrlMatch = (\n /** @class */\n function(_super) {\n __extends(UrlMatch2,
+ _super);\n function UrlMatch2(cfg) {\n var _this = _super.call(this,
+ cfg) || this;\n _this.type = \"url\";\n _this.url = \"\";\n _this.urlMatchType
+ = \"scheme\";\n _this.protocolRelativeMatch = false;\n _this.stripPrefix
+ = {\n scheme: true,\n www: true\n };\n _this.stripTrailingSlash
+ = true;\n _this.decodePercentEncoding = true;\n _this.protocolPrepended
+ = false;\n _this.urlMatchType = cfg.urlMatchType;\n _this.url =
+ cfg.url;\n _this.protocolRelativeMatch = cfg.protocolRelativeMatch;\n
+ \ _this.stripPrefix = cfg.stripPrefix;\n _this.stripTrailingSlash
+ = cfg.stripTrailingSlash;\n _this.decodePercentEncoding = cfg.decodePercentEncoding;\n
+ \ return _this;\n }\n UrlMatch2.prototype.getType = function() {\n
+ \ return \"url\";\n };\n UrlMatch2.prototype.getUrlMatchType = function()
+ {\n return this.urlMatchType;\n };\n UrlMatch2.prototype.getUrl
+ = function() {\n var url2 = this.url;\n if (!this.protocolRelativeMatch
+ && this.urlMatchType !== \"scheme\" && !this.protocolPrepended) {\n url2
+ = this.url = \"http://\" + url2;\n this.protocolPrepended = true;\n
+ \ }\n return url2;\n };\n UrlMatch2.prototype.getAnchorHref
+ = function() {\n var url2 = this.getUrl();\n return url2.replace(/&/g,
+ \"&\");\n };\n UrlMatch2.prototype.getAnchorText = function() {\n var
+ anchorText = this.getMatchedText();\n if (this.protocolRelativeMatch)
+ {\n anchorText = stripProtocolRelativePrefix(anchorText);\n }\n
+ \ if (this.stripPrefix.scheme) {\n anchorText = stripSchemePrefix(anchorText);\n
+ \ }\n if (this.stripPrefix.www) {\n anchorText = stripWwwPrefix(anchorText);\n
+ \ }\n if (this.stripTrailingSlash) {\n anchorText = removeTrailingSlash(anchorText);\n
+ \ }\n if (this.decodePercentEncoding) {\n anchorText = removePercentEncoding(anchorText);\n
+ \ }\n return anchorText;\n };\n return UrlMatch2;\n }(AbstractMatch)\n);\nfunction
+ stripSchemePrefix(url2) {\n return url2.replace(httpSchemePrefixRe, \"\");\n}\nfunction
+ stripWwwPrefix(url2) {\n return url2.replace(wwwPrefixRegex, \"$1\");\n}\nfunction
+ stripProtocolRelativePrefix(text2) {\n return text2.replace(protocolRelativeRegex,
+ \"\");\n}\nfunction removeTrailingSlash(anchorText) {\n if (anchorText.charAt(anchorText.length
+ - 1) === \"/\") {\n anchorText = anchorText.slice(0, -1);\n }\n return
+ anchorText;\n}\nfunction removePercentEncoding(anchorText) {\n var preProcessedEntityAnchorText
+ = anchorText.replace(/%22/gi, \""\").replace(/%26/gi, \"&\").replace(/%27/gi,
+ \"'\").replace(/%3C/gi, \"<\").replace(/%3E/gi, \">\");\n try {\n
+ \ return decodeURIComponent(preProcessedEntityAnchorText);\n } catch (e2)
+ {\n return preProcessedEntityAnchorText;\n }\n}\nvar mailtoSchemePrefixRe
+ = /^mailto:/i;\nvar emailLocalPartCharRegex = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr,
+ \"!#$%&'*+/=?^_`{|}~-]\"));\nfunction isEmailLocalPartStartChar(char) {\n
+ \ return alphaNumericAndMarksRe.test(char);\n}\nfunction isEmailLocalPartChar(char)
+ {\n return emailLocalPartCharRegex.test(char);\n}\nfunction isValidEmail(emailAddress)
+ {\n var emailAddressTld = emailAddress.split(\".\").pop() || \"\";\n return
+ isKnownTld(emailAddressTld);\n}\nvar EmailMatch = (\n /** @class */\n function(_super)
+ {\n __extends(EmailMatch2, _super);\n function EmailMatch2(cfg) {\n
+ \ var _this = _super.call(this, cfg) || this;\n _this.type = \"email\";\n
+ \ _this.email = \"\";\n _this.email = cfg.email;\n return _this;\n
+ \ }\n EmailMatch2.prototype.getType = function() {\n return \"email\";\n
+ \ };\n EmailMatch2.prototype.getEmail = function() {\n return this.email;\n
+ \ };\n EmailMatch2.prototype.getAnchorHref = function() {\n return
+ \"mailto:\" + this.email;\n };\n EmailMatch2.prototype.getAnchorText
+ = function() {\n return this.email;\n };\n return EmailMatch2;\n
+ \ }(AbstractMatch)\n);\nfunction isHashtagTextChar(char) {\n return char
+ === \"_\" || alphaNumericAndMarksRe.test(char);\n}\nfunction isValidHashtag(hashtag)
+ {\n return hashtag.length <= 140;\n}\nvar hashtagServices = [\n \"twitter\",\n
+ \ \"facebook\",\n \"instagram\",\n \"tiktok\",\n \"youtube\"\n];\nvar HashtagMatch
+ = (\n /** @class */\n function(_super) {\n __extends(HashtagMatch2, _super);\n
+ \ function HashtagMatch2(cfg) {\n var _this = _super.call(this, cfg)
+ || this;\n _this.type = \"hashtag\";\n _this.serviceName = \"twitter\";\n
+ \ _this.hashtag = \"\";\n _this.serviceName = cfg.serviceName;\n
+ \ _this.hashtag = cfg.hashtag;\n return _this;\n }\n HashtagMatch2.prototype.getType
+ = function() {\n return \"hashtag\";\n };\n HashtagMatch2.prototype.getServiceName
+ = function() {\n return this.serviceName;\n };\n HashtagMatch2.prototype.getHashtag
+ = function() {\n return this.hashtag;\n };\n HashtagMatch2.prototype.getAnchorHref
+ = function() {\n var serviceName = this.serviceName, hashtag = this.hashtag;\n
+ \ switch (serviceName) {\n case \"twitter\":\n return
+ \"https://twitter.com/hashtag/\" + hashtag;\n case \"facebook\":\n
+ \ return \"https://www.facebook.com/hashtag/\" + hashtag;\n case
+ \"instagram\":\n return \"https://instagram.com/explore/tags/\" +
+ hashtag;\n case \"tiktok\":\n return \"https://www.tiktok.com/tag/\"
+ + hashtag;\n case \"youtube\":\n return \"https://youtube.com/hashtag/\"
+ + hashtag;\n default:\n assertNever(serviceName);\n throw
+ new Error(\"Invalid hashtag service: \".concat(serviceName));\n }\n };\n
+ \ HashtagMatch2.prototype.getAnchorText = function() {\n return \"#\"
+ + this.hashtag;\n };\n HashtagMatch2.prototype.getCssClassSuffixes =
+ function() {\n var cssClassSuffixes = _super.prototype.getCssClassSuffixes.call(this),
+ serviceName = this.getServiceName();\n if (serviceName) {\n cssClassSuffixes.push(serviceName);\n
+ \ }\n return cssClassSuffixes;\n };\n return HashtagMatch2;\n
+ \ }(AbstractMatch)\n);\nvar mentionRegexes = {\n twitter: /^@\\w{1,15}$/,\n
+ \ instagram: /^@[_\\w]{1,30}$/,\n soundcloud: /^@[-a-z0-9_]{3,25}$/,\n //
+ TikTok usernames are 1-24 characters containing letters, numbers, underscores\n
+ \ // and periods, but cannot end in a period: https://support.tiktok.com/en/getting-started/setting-up-your-profile/changing-your-username\n
+ \ tiktok: /^@[.\\w]{1,23}[\\w]$/,\n // Youtube usernames are 3-30 characters
+ containing letters, numbers, underscores,\n // dashes, or latin middle dots
+ ('·').\n // https://support.google.com/youtube/answer/11585688?hl=en&co=GENIE.Platform%3DAndroid#tns\n
+ \ youtube: /^@[-.·\\w]{3,30}$/\n};\nvar mentionTextCharRe = /[-\\w.]/;\nfunction
+ isMentionTextChar(char) {\n return mentionTextCharRe.test(char);\n}\nfunction
+ isValidMention(mention, serviceName) {\n var re = mentionRegexes[serviceName];\n
+ \ return re.test(mention);\n}\nvar mentionServices = [\n \"twitter\",\n \"instagram\",\n
+ \ \"soundcloud\",\n \"tiktok\",\n \"youtube\"\n];\nvar MentionMatch = (\n
+ \ /** @class */\n function(_super) {\n __extends(MentionMatch2, _super);\n
+ \ function MentionMatch2(cfg) {\n var _this = _super.call(this, cfg)
+ || this;\n _this.type = \"mention\";\n _this.serviceName = \"twitter\";\n
+ \ _this.mention = \"\";\n _this.mention = cfg.mention;\n _this.serviceName
+ = cfg.serviceName;\n return _this;\n }\n MentionMatch2.prototype.getType
+ = function() {\n return \"mention\";\n };\n MentionMatch2.prototype.getMention
+ = function() {\n return this.mention;\n };\n MentionMatch2.prototype.getServiceName
+ = function() {\n return this.serviceName;\n };\n MentionMatch2.prototype.getAnchorHref
+ = function() {\n switch (this.serviceName) {\n case \"twitter\":\n
+ \ return \"https://twitter.com/\" + this.mention;\n case \"instagram\":\n
+ \ return \"https://instagram.com/\" + this.mention;\n case
+ \"soundcloud\":\n return \"https://soundcloud.com/\" + this.mention;\n
+ \ case \"tiktok\":\n return \"https://www.tiktok.com/@\" +
+ this.mention;\n case \"youtube\":\n return \"https://youtube.com/@\"
+ + this.mention;\n default:\n assertNever(this.serviceName);\n
+ \ throw new Error(\"Unknown service name to point mention to: \" +
+ this.serviceName);\n }\n };\n MentionMatch2.prototype.getAnchorText
+ = function() {\n return \"@\" + this.mention;\n };\n MentionMatch2.prototype.getCssClassSuffixes
+ = function() {\n var cssClassSuffixes = _super.prototype.getCssClassSuffixes.call(this),
+ serviceName = this.getServiceName();\n if (serviceName) {\n cssClassSuffixes.push(serviceName);\n
+ \ }\n return cssClassSuffixes;\n };\n return MentionMatch2;\n
+ \ }(AbstractMatch)\n);\nvar separatorCharRe = /[-. ]/;\nvar hasDelimCharsRe
+ = /[-. ()]/;\nvar controlCharRe = /[,;]/;\nvar mostPhoneNumbers = /(?:(?:(?:(\\+)?\\d{1,3}[-.
+ ]?)?\\(?\\d{3}\\)?[-. ]?\\d{3}[-. ]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-.
+ ]?(?:\\d[-. ]?){6,12}\\d+))([,;]+[0-9]+#?)*/;\nvar japanesePhoneRe = /(0([1-9]-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/;\nvar
+ validPhoneNumberRe = new RegExp(\"^\".concat(mostPhoneNumbers.source, \"|\").concat(japanesePhoneRe.source,
+ \"$\"));\nfunction isPhoneNumberSeparatorChar(char) {\n return separatorCharRe.test(char);\n}\nfunction
+ isPhoneNumberControlChar(char) {\n return controlCharRe.test(char);\n}\nfunction
+ isValidPhoneNumber(phoneNumberText) {\n var hasDelimiters = phoneNumberText.charAt(0)
+ === \"+\" || hasDelimCharsRe.test(phoneNumberText);\n return hasDelimiters
+ && validPhoneNumberRe.test(phoneNumberText);\n}\nvar PhoneMatch = (\n /**
+ @class */\n function(_super) {\n __extends(PhoneMatch2, _super);\n function
+ PhoneMatch2(cfg) {\n var _this = _super.call(this, cfg) || this;\n _this.type
+ = \"phone\";\n _this.number = \"\";\n _this.plusSign = false;\n
+ \ _this.number = cfg.number;\n _this.plusSign = cfg.plusSign;\n return
+ _this;\n }\n PhoneMatch2.prototype.getType = function() {\n return
+ \"phone\";\n };\n PhoneMatch2.prototype.getPhoneNumber = function()
+ {\n return this.number;\n };\n PhoneMatch2.prototype.getNumber
+ = function() {\n return this.getPhoneNumber();\n };\n PhoneMatch2.prototype.getAnchorHref
+ = function() {\n return \"tel:\" + (this.plusSign ? \"+\" : \"\") + this.number;\n
+ \ };\n PhoneMatch2.prototype.getAnchorText = function() {\n return
+ this.matchedText;\n };\n return PhoneMatch2;\n }(AbstractMatch)\n);\nfunction
+ parseMatches(text2, args) {\n var tagBuilder = args.tagBuilder;\n var stripPrefix
+ = args.stripPrefix;\n var stripTrailingSlash = args.stripTrailingSlash;\n
+ \ var decodePercentEncoding = args.decodePercentEncoding;\n var hashtagServiceName
+ = args.hashtagServiceName;\n var mentionServiceName = args.mentionServiceName;\n
+ \ var matches = [];\n var textLen = text2.length;\n var stateMachines =
+ [];\n var charIdx = 0;\n for (; charIdx < textLen; charIdx++) {\n var
+ char = text2.charAt(charIdx);\n if (stateMachines.length === 0) {\n stateNoMatch(char);\n
+ \ } else {\n for (var stateIdx = stateMachines.length - 1; stateIdx
+ >= 0; stateIdx--) {\n var stateMachine = stateMachines[stateIdx];\n
+ \ switch (stateMachine.state) {\n // Protocol-relative URL
+ states\n case 11:\n stateProtocolRelativeSlash1(stateMachine,
+ char);\n break;\n case 12:\n stateProtocolRelativeSlash2(stateMachine,
+ char);\n break;\n case 0:\n stateSchemeChar(stateMachine,
+ char);\n break;\n case 1:\n stateSchemeHyphen(stateMachine,
+ char);\n break;\n case 2:\n stateSchemeColon(stateMachine,
+ char);\n break;\n case 3:\n stateSchemeSlash1(stateMachine,
+ char);\n break;\n case 4:\n stateSchemeSlash2(stateMachine,
+ char);\n break;\n case 5:\n stateDomainLabelChar(stateMachine,
+ char);\n break;\n case 6:\n stateDomainHyphen(stateMachine,
+ char);\n break;\n case 7:\n stateDomainDot(stateMachine,
+ char);\n break;\n case 13:\n stateIpV4Digit(stateMachine,
+ char);\n break;\n case 14:\n stateIPv4Dot(stateMachine,
+ char);\n break;\n case 8:\n statePortColon(stateMachine,
+ char);\n break;\n case 9:\n statePortNumber(stateMachine,
+ char);\n break;\n case 10:\n statePath(stateMachine,
+ char);\n break;\n // Email States\n case 15:\n
+ \ stateEmailMailto_M(stateMachine, char);\n break;\n
+ \ case 16:\n stateEmailMailto_A(stateMachine, char);\n
+ \ break;\n case 17:\n stateEmailMailto_I(stateMachine,
+ char);\n break;\n case 18:\n stateEmailMailto_L(stateMachine,
+ char);\n break;\n case 19:\n stateEmailMailto_T(stateMachine,
+ char);\n break;\n case 20:\n stateEmailMailto_O(stateMachine,
+ char);\n break;\n case 21:\n stateEmailMailtoColon(stateMachine,
+ char);\n break;\n case 22:\n stateEmailLocalPart(stateMachine,
+ char);\n break;\n case 23:\n stateEmailLocalPartDot(stateMachine,
+ char);\n break;\n case 24:\n stateEmailAtSign(stateMachine,
+ char);\n break;\n case 25:\n stateEmailDomainChar(stateMachine,
+ char);\n break;\n case 26:\n stateEmailDomainHyphen(stateMachine,
+ char);\n break;\n case 27:\n stateEmailDomainDot(stateMachine,
+ char);\n break;\n // Hashtag states\n case 28:\n
+ \ stateHashtagHashChar(stateMachine, char);\n break;\n
+ \ case 29:\n stateHashtagTextChar(stateMachine, char);\n
+ \ break;\n // Mention states\n case 30:\n stateMentionAtChar(stateMachine,
+ char);\n break;\n case 31:\n stateMentionTextChar(stateMachine,
+ char);\n break;\n // Phone number states\n case
+ 32:\n statePhoneNumberOpenParen(stateMachine, char);\n break;\n
+ \ case 33:\n statePhoneNumberAreaCodeDigit1(stateMachine,
+ char);\n break;\n case 34:\n statePhoneNumberAreaCodeDigit2(stateMachine,
+ char);\n break;\n case 35:\n statePhoneNumberAreaCodeDigit3(stateMachine,
+ char);\n break;\n case 36:\n statePhoneNumberCloseParen(stateMachine,
+ char);\n break;\n case 37:\n statePhoneNumberPlus(stateMachine,
+ char);\n break;\n case 38:\n statePhoneNumberDigit(stateMachine,
+ char);\n break;\n case 39:\n statePhoneNumberSeparator(stateMachine,
+ char);\n break;\n case 40:\n statePhoneNumberControlChar(stateMachine,
+ char);\n break;\n case 41:\n statePhoneNumberPoundChar(stateMachine,
+ char);\n break;\n default:\n assertNever(stateMachine.state);\n
+ \ }\n }\n if (charIdx > 0 && isSchemeStartChar(char)) {\n
+ \ var prevChar = text2.charAt(charIdx - 1);\n if (!isSchemeStartChar(prevChar)
+ && !stateMachines.some(isSchemeUrlStateMachine)) {\n stateMachines.push(createSchemeUrlStateMachine(\n
+ \ charIdx,\n 0\n /* State.SchemeChar */\n
+ \ ));\n }\n }\n }\n }\n for (var i3 = stateMachines.length
+ - 1; i3 >= 0; i3--) {\n stateMachines.forEach(function(stateMachine2) {\n
+ \ return captureMatchIfValidAndRemove(stateMachine2);\n });\n }\n
+ \ return matches;\n function stateNoMatch(char2) {\n if (char2 === \"#\")
+ {\n stateMachines.push(createHashtagStateMachine(\n charIdx,\n
+ \ 28\n /* State.HashtagHashChar */\n ));\n } else if
+ (char2 === \"@\") {\n stateMachines.push(createMentionStateMachine(\n
+ \ charIdx,\n 30\n /* State.MentionAtChar */\n ));\n
+ \ } else if (char2 === \"/\") {\n stateMachines.push(createTldUrlStateMachine(\n
+ \ charIdx,\n 11\n /* State.ProtocolRelativeSlash1 */\n
+ \ ));\n } else if (char2 === \"+\") {\n stateMachines.push(createPhoneNumberStateMachine(\n
+ \ charIdx,\n 37\n /* State.PhoneNumberPlus */\n ));\n
+ \ } else if (char2 === \"(\") {\n stateMachines.push(createPhoneNumberStateMachine(\n
+ \ charIdx,\n 32\n /* State.PhoneNumberOpenParen */\n ));\n
+ \ } else {\n if (digitRe.test(char2)) {\n stateMachines.push(createPhoneNumberStateMachine(\n
+ \ charIdx,\n 38\n /* State.PhoneNumberDigit */\n
+ \ ));\n stateMachines.push(createIpV4UrlStateMachine(\n charIdx,\n
+ \ 13\n /* State.IpV4Digit */\n ));\n }\n if
+ (isEmailLocalPartStartChar(char2)) {\n var startState = char2.toLowerCase()
+ === \"m\" ? 15 : 22;\n stateMachines.push(createEmailStateMachine(charIdx,
+ startState));\n }\n if (isSchemeStartChar(char2)) {\n stateMachines.push(createSchemeUrlStateMachine(\n
+ \ charIdx,\n 0\n /* State.SchemeChar */\n ));\n
+ \ }\n if (alphaNumericAndMarksRe.test(char2)) {\n stateMachines.push(createTldUrlStateMachine(\n
+ \ charIdx,\n 5\n /* State.DomainLabelChar */\n ));\n
+ \ }\n }\n }\n function stateSchemeChar(stateMachine2, char2) {\n
+ \ if (char2 === \":\") {\n stateMachine2.state = 2;\n } else if
+ (char2 === \"-\") {\n stateMachine2.state = 1;\n } else if (isSchemeChar(char2))
+ ;\n else {\n remove(stateMachines, stateMachine2);\n }\n }\n function
+ stateSchemeHyphen(stateMachine2, char2) {\n if (char2 === \"-\") ;\n else
+ if (char2 === \"/\") {\n remove(stateMachines, stateMachine2);\n stateMachines.push(createTldUrlStateMachine(\n
+ \ charIdx,\n 11\n /* State.ProtocolRelativeSlash1 */\n
+ \ ));\n } else if (isSchemeChar(char2)) {\n stateMachine2.state
+ = 0;\n } else {\n remove(stateMachines, stateMachine2);\n }\n }\n
+ \ function stateSchemeColon(stateMachine2, char2) {\n if (char2 === \"/\")
+ {\n stateMachine2.state = 3;\n } else if (char2 === \".\") {\n remove(stateMachines,
+ stateMachine2);\n } else if (isDomainLabelStartChar(char2)) {\n stateMachine2.state
+ = 5;\n if (isSchemeStartChar(char2)) {\n stateMachines.push(createSchemeUrlStateMachine(\n
+ \ charIdx,\n 0\n /* State.SchemeChar */\n ));\n
+ \ }\n } else {\n remove(stateMachines, stateMachine2);\n }\n
+ \ }\n function stateSchemeSlash1(stateMachine2, char2) {\n if (char2 ===
+ \"/\") {\n stateMachine2.state = 4;\n } else if (isPathChar(char2))
+ {\n stateMachine2.state = 10;\n stateMachine2.acceptStateReached
+ = true;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateSchemeSlash2(stateMachine2, char2) {\n if (char2
+ === \"/\") {\n stateMachine2.state = 10;\n } else if (isDomainLabelStartChar(char2))
+ {\n stateMachine2.state = 5;\n stateMachine2.acceptStateReached
+ = true;\n } else {\n remove(stateMachines, stateMachine2);\n }\n
+ \ }\n function stateProtocolRelativeSlash1(stateMachine2, char2) {\n if
+ (char2 === \"/\") {\n stateMachine2.state = 12;\n } else {\n remove(stateMachines,
+ stateMachine2);\n }\n }\n function stateProtocolRelativeSlash2(stateMachine2,
+ char2) {\n if (isDomainLabelStartChar(char2)) {\n stateMachine2.state
+ = 5;\n } else {\n remove(stateMachines, stateMachine2);\n }\n }\n
+ \ function stateDomainLabelChar(stateMachine2, char2) {\n if (char2 ===
+ \".\") {\n stateMachine2.state = 7;\n } else if (char2 === \"-\")
+ {\n stateMachine2.state = 6;\n } else if (char2 === \":\") {\n stateMachine2.state
+ = 8;\n } else if (isUrlSuffixStartChar(char2)) {\n stateMachine2.state
+ = 10;\n } else if (isDomainLabelChar(char2)) ;\n else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateDomainHyphen(stateMachine2, char2) {\n if (char2
+ === \"-\") ;\n else if (char2 === \".\") {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ } else if (isDomainLabelStartChar(char2)) {\n stateMachine2.state
+ = 5;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n }\n
+ \ }\n function stateDomainDot(stateMachine2, char2) {\n if (char2 ===
+ \".\") {\n captureMatchIfValidAndRemove(stateMachine2);\n } else if
+ (isDomainLabelStartChar(char2)) {\n stateMachine2.state = 5;\n stateMachine2.acceptStateReached
+ = true;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateIpV4Digit(stateMachine2, char2) {\n if (char2
+ === \".\") {\n stateMachine2.state = 14;\n } else if (char2 === \":\")
+ {\n stateMachine2.state = 8;\n } else if (digitRe.test(char2)) ;\n
+ \ else if (isUrlSuffixStartChar(char2)) {\n stateMachine2.state = 10;\n
+ \ } else if (alphaNumericAndMarksRe.test(char2)) {\n remove(stateMachines,
+ stateMachine2);\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateIPv4Dot(stateMachine2, char2) {\n if (digitRe.test(char2))
+ {\n stateMachine2.octetsEncountered++;\n if (stateMachine2.octetsEncountered
+ === 4) {\n stateMachine2.acceptStateReached = true;\n }\n stateMachine2.state
+ = 13;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function statePortColon(stateMachine2, char2) {\n if (digitRe.test(char2))
+ {\n stateMachine2.state = 9;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function statePortNumber(stateMachine2, char2) {\n if (digitRe.test(char2))
+ ;\n else if (isUrlSuffixStartChar(char2)) {\n stateMachine2.state
+ = 10;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function statePath(stateMachine2, char2) {\n if (isPathChar(char2))
+ ;\n else {\n captureMatchIfValidAndRemove(stateMachine2);\n }\n
+ \ }\n function stateEmailMailto_M(stateMachine2, char2) {\n if (char2.toLowerCase()
+ === \"a\") {\n stateMachine2.state = 16;\n } else {\n stateEmailLocalPart(stateMachine2,
+ char2);\n }\n }\n function stateEmailMailto_A(stateMachine2, char2) {\n
+ \ if (char2.toLowerCase() === \"i\") {\n stateMachine2.state = 17;\n
+ \ } else {\n stateEmailLocalPart(stateMachine2, char2);\n }\n }\n
+ \ function stateEmailMailto_I(stateMachine2, char2) {\n if (char2.toLowerCase()
+ === \"l\") {\n stateMachine2.state = 18;\n } else {\n stateEmailLocalPart(stateMachine2,
+ char2);\n }\n }\n function stateEmailMailto_L(stateMachine2, char2) {\n
+ \ if (char2.toLowerCase() === \"t\") {\n stateMachine2.state = 19;\n
+ \ } else {\n stateEmailLocalPart(stateMachine2, char2);\n }\n }\n
+ \ function stateEmailMailto_T(stateMachine2, char2) {\n if (char2.toLowerCase()
+ === \"o\") {\n stateMachine2.state = 20;\n } else {\n stateEmailLocalPart(stateMachine2,
+ char2);\n }\n }\n function stateEmailMailto_O(stateMachine2, char2) {\n
+ \ if (char2.toLowerCase() === \":\") {\n stateMachine2.state = 21;\n
+ \ } else {\n stateEmailLocalPart(stateMachine2, char2);\n }\n }\n
+ \ function stateEmailMailtoColon(stateMachine2, char2) {\n if (isEmailLocalPartChar(char2))
+ {\n stateMachine2.state = 22;\n } else {\n remove(stateMachines,
+ stateMachine2);\n }\n }\n function stateEmailLocalPart(stateMachine2,
+ char2) {\n if (char2 === \".\") {\n stateMachine2.state = 23;\n }
+ else if (char2 === \"@\") {\n stateMachine2.state = 24;\n } else if
+ (isEmailLocalPartChar(char2)) {\n stateMachine2.state = 22;\n } else
+ {\n remove(stateMachines, stateMachine2);\n }\n }\n function stateEmailLocalPartDot(stateMachine2,
+ char2) {\n if (char2 === \".\") {\n remove(stateMachines, stateMachine2);\n
+ \ } else if (char2 === \"@\") {\n remove(stateMachines, stateMachine2);\n
+ \ } else if (isEmailLocalPartChar(char2)) {\n stateMachine2.state =
+ 22;\n } else {\n remove(stateMachines, stateMachine2);\n }\n }\n
+ \ function stateEmailAtSign(stateMachine2, char2) {\n if (isDomainLabelStartChar(char2))
+ {\n stateMachine2.state = 25;\n } else {\n remove(stateMachines,
+ stateMachine2);\n }\n }\n function stateEmailDomainChar(stateMachine2,
+ char2) {\n if (char2 === \".\") {\n stateMachine2.state = 27;\n }
+ else if (char2 === \"-\") {\n stateMachine2.state = 26;\n } else if
+ (isDomainLabelChar(char2)) ;\n else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateEmailDomainHyphen(stateMachine2, char2) {\n if
+ (char2 === \"-\" || char2 === \".\") {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ } else if (isDomainLabelChar(char2)) {\n stateMachine2.state = 25;\n
+ \ } else {\n captureMatchIfValidAndRemove(stateMachine2);\n }\n
+ \ }\n function stateEmailDomainDot(stateMachine2, char2) {\n if (char2
+ === \".\" || char2 === \"-\") {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ } else if (isDomainLabelStartChar(char2)) {\n stateMachine2.state
+ = 25;\n stateMachine2.acceptStateReached = true;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function stateHashtagHashChar(stateMachine2, char2) {\n if
+ (isHashtagTextChar(char2)) {\n stateMachine2.state = 29;\n stateMachine2.acceptStateReached
+ = true;\n } else {\n remove(stateMachines, stateMachine2);\n }\n
+ \ }\n function stateHashtagTextChar(stateMachine2, char2) {\n if (isHashtagTextChar(char2))
+ ;\n else {\n captureMatchIfValidAndRemove(stateMachine2);\n }\n
+ \ }\n function stateMentionAtChar(stateMachine2, char2) {\n if (isMentionTextChar(char2))
+ {\n stateMachine2.state = 31;\n stateMachine2.acceptStateReached
+ = true;\n } else {\n remove(stateMachines, stateMachine2);\n }\n
+ \ }\n function stateMentionTextChar(stateMachine2, char2) {\n if (isMentionTextChar(char2))
+ ;\n else if (alphaNumericAndMarksRe.test(char2)) {\n remove(stateMachines,
+ stateMachine2);\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function statePhoneNumberPlus(stateMachine2, char2) {\n if
+ (digitRe.test(char2)) {\n stateMachine2.state = 38;\n } else {\n remove(stateMachines,
+ stateMachine2);\n stateNoMatch(char2);\n }\n }\n function statePhoneNumberOpenParen(stateMachine2,
+ char2) {\n if (digitRe.test(char2)) {\n stateMachine2.state = 33;\n
+ \ } else {\n remove(stateMachines, stateMachine2);\n }\n stateNoMatch(char2);\n
+ \ }\n function statePhoneNumberAreaCodeDigit1(stateMachine2, char2) {\n if
+ (digitRe.test(char2)) {\n stateMachine2.state = 34;\n } else {\n remove(stateMachines,
+ stateMachine2);\n }\n }\n function statePhoneNumberAreaCodeDigit2(stateMachine2,
+ char2) {\n if (digitRe.test(char2)) {\n stateMachine2.state = 35;\n
+ \ } else {\n remove(stateMachines, stateMachine2);\n }\n }\n function
+ statePhoneNumberAreaCodeDigit3(stateMachine2, char2) {\n if (char2 ===
+ \")\") {\n stateMachine2.state = 36;\n } else {\n remove(stateMachines,
+ stateMachine2);\n }\n }\n function statePhoneNumberCloseParen(stateMachine2,
+ char2) {\n if (digitRe.test(char2)) {\n stateMachine2.state = 38;\n
+ \ } else if (isPhoneNumberSeparatorChar(char2)) {\n stateMachine2.state
+ = 39;\n } else {\n remove(stateMachines, stateMachine2);\n }\n
+ \ }\n function statePhoneNumberDigit(stateMachine2, char2) {\n stateMachine2.acceptStateReached
+ = true;\n if (isPhoneNumberControlChar(char2)) {\n stateMachine2.state
+ = 40;\n } else if (char2 === \"#\") {\n stateMachine2.state = 41;\n
+ \ } else if (digitRe.test(char2)) ;\n else if (char2 === \"(\") {\n stateMachine2.state
+ = 32;\n } else if (isPhoneNumberSeparatorChar(char2)) {\n stateMachine2.state
+ = 39;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ if (isSchemeStartChar(char2)) {\n stateMachines.push(createSchemeUrlStateMachine(\n
+ \ charIdx,\n 0\n /* State.SchemeChar */\n ));\n
+ \ }\n }\n }\n function statePhoneNumberSeparator(stateMachine2, char2)
+ {\n if (digitRe.test(char2)) {\n stateMachine2.state = 38;\n }
+ else if (char2 === \"(\") {\n stateMachine2.state = 32;\n } else {\n
+ \ captureMatchIfValidAndRemove(stateMachine2);\n stateNoMatch(char2);\n
+ \ }\n }\n function statePhoneNumberControlChar(stateMachine2, char2) {\n
+ \ if (isPhoneNumberControlChar(char2)) ;\n else if (char2 === \"#\")
+ {\n stateMachine2.state = 41;\n } else if (digitRe.test(char2)) {\n
+ \ stateMachine2.state = 38;\n } else {\n captureMatchIfValidAndRemove(stateMachine2);\n
+ \ }\n }\n function statePhoneNumberPoundChar(stateMachine2, char2) {\n
+ \ if (isPhoneNumberControlChar(char2)) {\n stateMachine2.state = 40;\n
+ \ } else if (digitRe.test(char2)) {\n remove(stateMachines, stateMachine2);\n
+ \ } else {\n captureMatchIfValidAndRemove(stateMachine2);\n }\n
+ \ }\n function captureMatchIfValidAndRemove(stateMachine2) {\n remove(stateMachines,
+ stateMachine2);\n if (!stateMachine2.acceptStateReached) {\n return;\n
+ \ }\n var startIdx = stateMachine2.startIdx;\n var matchedText = text2.slice(stateMachine2.startIdx,
+ charIdx);\n matchedText = excludeUnbalancedTrailingBracesAndPunctuation(matchedText);\n
+ \ if (stateMachine2.type === \"url\") {\n var charBeforeUrlMatch =
+ text2.charAt(stateMachine2.startIdx - 1);\n if (charBeforeUrlMatch ===
+ \"@\") {\n return;\n }\n var urlMatchType = stateMachine2.matchType;\n
+ \ if (urlMatchType === \"scheme\") {\n var httpSchemeMatch = httpSchemeRe.exec(matchedText);\n
+ \ if (httpSchemeMatch) {\n startIdx = startIdx + httpSchemeMatch.index;\n
+ \ matchedText = matchedText.slice(httpSchemeMatch.index);\n }\n
+ \ if (!isValidSchemeUrl(matchedText)) {\n return;\n }\n
+ \ } else if (urlMatchType === \"tld\") {\n if (!isValidTldMatch(matchedText))
+ {\n return;\n }\n } else if (urlMatchType === \"ipV4\")
+ {\n if (!isValidIpV4Address(matchedText)) {\n return;\n }\n
+ \ } else {\n assertNever(urlMatchType);\n }\n matches.push(new
+ UrlMatch({\n tagBuilder,\n matchedText,\n offset: startIdx,\n
+ \ urlMatchType,\n url: matchedText,\n protocolRelativeMatch:
+ matchedText.slice(0, 2) === \"//\",\n // TODO: Do these settings need
+ to be passed to the match,\n // or should we handle them here in UrlMatcher?\n
+ \ stripPrefix,\n stripTrailingSlash,\n decodePercentEncoding\n
+ \ }));\n } else if (stateMachine2.type === \"email\") {\n if (isValidEmail(matchedText))
+ {\n matches.push(new EmailMatch({\n tagBuilder,\n matchedText,\n
+ \ offset: startIdx,\n email: matchedText.replace(mailtoSchemePrefixRe,
+ \"\")\n }));\n }\n } else if (stateMachine2.type === \"hashtag\")
+ {\n if (isValidHashtag(matchedText)) {\n matches.push(new HashtagMatch({\n
+ \ tagBuilder,\n matchedText,\n offset: startIdx,\n
+ \ serviceName: hashtagServiceName,\n hashtag: matchedText.slice(1)\n
+ \ }));\n }\n } else if (stateMachine2.type === \"mention\")
+ {\n if (isValidMention(matchedText, mentionServiceName)) {\n matches.push(new
+ MentionMatch({\n tagBuilder,\n matchedText,\n offset:
+ startIdx,\n serviceName: mentionServiceName,\n mention:
+ matchedText.slice(1)\n // strip off the '@' character at the beginning\n
+ \ }));\n }\n } else if (stateMachine2.type === \"phone\") {\n
+ \ matchedText = matchedText.replace(/ +$/g, \"\");\n if (isValidPhoneNumber(matchedText))
+ {\n var cleanNumber = matchedText.replace(/[^0-9,;#]/g, \"\");\n matches.push(new
+ PhoneMatch({\n tagBuilder,\n matchedText,\n offset:
+ startIdx,\n number: cleanNumber,\n plusSign: matchedText.charAt(0)
+ === \"+\"\n }));\n }\n } else {\n assertNever(stateMachine2);\n
+ \ }\n }\n}\nvar openBraceRe = /[\\(\\{\\[]/;\nvar closeBraceRe = /[\\)\\}\\]]/;\nvar
+ oppositeBrace = {\n \")\": \"(\",\n \"}\": \"{\",\n \"]\": \"[\"\n};\nfunction
+ excludeUnbalancedTrailingBracesAndPunctuation(matchedText) {\n var braceCounts
+ = {\n \"(\": 0,\n \"{\": 0,\n \"[\": 0\n };\n for (var i3 = 0;
+ i3 < matchedText.length; i3++) {\n var char_1 = matchedText.charAt(i3);\n
+ \ if (openBraceRe.test(char_1)) {\n braceCounts[char_1]++;\n } else
+ if (closeBraceRe.test(char_1)) {\n braceCounts[oppositeBrace[char_1]]--;\n
+ \ }\n }\n var endIdx = matchedText.length - 1;\n var char;\n while (endIdx
+ >= 0) {\n char = matchedText.charAt(endIdx);\n if (closeBraceRe.test(char))
+ {\n var oppositeBraceChar = oppositeBrace[char];\n if (braceCounts[oppositeBraceChar]
+ < 0) {\n braceCounts[oppositeBraceChar]++;\n endIdx--;\n }
+ else {\n break;\n }\n } else if (urlSuffixedCharsNotAllowedAtEndRe.test(char))
+ {\n endIdx--;\n } else {\n break;\n }\n }\n return matchedText.slice(0,
+ endIdx + 1);\n}\nfunction createSchemeUrlStateMachine(startIdx, state) {\n
+ \ return {\n type: \"url\",\n startIdx,\n state,\n acceptStateReached:
+ false,\n matchType: \"scheme\"\n };\n}\nfunction createTldUrlStateMachine(startIdx,
+ state) {\n return {\n type: \"url\",\n startIdx,\n state,\n acceptStateReached:
+ false,\n matchType: \"tld\"\n };\n}\nfunction createIpV4UrlStateMachine(startIdx,
+ state) {\n return {\n type: \"url\",\n startIdx,\n state,\n acceptStateReached:
+ false,\n matchType: \"ipV4\",\n octetsEncountered: 1\n // starts
+ at 1 because we create this machine when encountering the first octet\n };\n}\nfunction
+ createEmailStateMachine(startIdx, state) {\n return {\n type: \"email\",\n
+ \ startIdx,\n state,\n acceptStateReached: false\n };\n}\nfunction
+ createHashtagStateMachine(startIdx, state) {\n return {\n type: \"hashtag\",\n
+ \ startIdx,\n state,\n acceptStateReached: false\n };\n}\nfunction
+ createMentionStateMachine(startIdx, state) {\n return {\n type: \"mention\",\n
+ \ startIdx,\n state,\n acceptStateReached: false\n };\n}\nfunction
+ createPhoneNumberStateMachine(startIdx, state) {\n return {\n type: \"phone\",\n
+ \ startIdx,\n state,\n acceptStateReached: false\n };\n}\nfunction
+ isSchemeUrlStateMachine(machine) {\n return machine.type === \"url\" && machine.matchType
+ === \"scheme\";\n}\nfunction parseHtml(html, _a3) {\n var onOpenTag = _a3.onOpenTag,
+ onCloseTag = _a3.onCloseTag, onText = _a3.onText, onComment = _a3.onComment,
+ onDoctype = _a3.onDoctype;\n var noCurrentTag = new CurrentTag();\n var
+ charIdx = 0, len = html.length, state = 0, currentDataIdx = 0, currentTag
+ = noCurrentTag;\n while (charIdx < len) {\n var char = html.charAt(charIdx);\n
+ \ switch (state) {\n case 0:\n stateData(char);\n break;\n
+ \ case 1:\n stateTagOpen(char);\n break;\n case 2:\n
+ \ stateEndTagOpen(char);\n break;\n case 3:\n stateTagName(char);\n
+ \ break;\n case 4:\n stateBeforeAttributeName(char);\n break;\n
+ \ case 5:\n stateAttributeName(char);\n break;\n case
+ 6:\n stateAfterAttributeName(char);\n break;\n case 7:\n
+ \ stateBeforeAttributeValue(char);\n break;\n case 8:\n
+ \ stateAttributeValueDoubleQuoted(char);\n break;\n case
+ 9:\n stateAttributeValueSingleQuoted(char);\n break;\n case
+ 10:\n stateAttributeValueUnquoted(char);\n break;\n case
+ 11:\n stateAfterAttributeValueQuoted(char);\n break;\n case
+ 12:\n stateSelfClosingStartTag(char);\n break;\n case 13:\n
+ \ stateMarkupDeclarationOpen();\n break;\n case 14:\n stateCommentStart(char);\n
+ \ break;\n case 15:\n stateCommentStartDash(char);\n break;\n
+ \ case 16:\n stateComment(char);\n break;\n case 17:\n
+ \ stateCommentEndDash(char);\n break;\n case 18:\n stateCommentEnd(char);\n
+ \ break;\n case 19:\n stateCommentEndBang(char);\n break;\n
+ \ case 20:\n stateDoctype(char);\n break;\n default:\n
+ \ assertNever(state);\n }\n charIdx++;\n }\n if (currentDataIdx
+ < charIdx) {\n emitText();\n }\n function stateData(char2) {\n if
+ (char2 === \"<\") {\n startNewTag();\n }\n }\n function stateTagOpen(char2)
+ {\n if (char2 === \"!\") {\n state = 13;\n } else if (char2 ===
+ \"/\") {\n state = 2;\n currentTag = new CurrentTag(__assign(__assign({},
+ currentTag), { isClosing: true }));\n } else if (char2 === \"<\") {\n startNewTag();\n
+ \ } else if (letterRe.test(char2)) {\n state = 3;\n currentTag
+ = new CurrentTag(__assign(__assign({}, currentTag), { isOpening: true }));\n
+ \ } else {\n state = 0;\n currentTag = noCurrentTag;\n }\n
+ \ }\n function stateTagName(char2) {\n if (whitespaceRe.test(char2)) {\n
+ \ currentTag = new CurrentTag(__assign(__assign({}, currentTag), { name:
+ captureTagName() }));\n state = 4;\n } else if (char2 === \"<\") {\n
+ \ startNewTag();\n } else if (char2 === \"/\") {\n currentTag
+ = new CurrentTag(__assign(__assign({}, currentTag), { name: captureTagName()
+ }));\n state = 12;\n } else if (char2 === \">\") {\n currentTag
+ = new CurrentTag(__assign(__assign({}, currentTag), { name: captureTagName()
+ }));\n emitTagAndPreviousTextNode();\n } else if (!letterRe.test(char2)
+ && !digitRe.test(char2) && char2 !== \":\") {\n resetToDataState();\n
+ \ } else ;\n }\n function stateEndTagOpen(char2) {\n if (char2 ===
+ \">\") {\n resetToDataState();\n } else if (letterRe.test(char2))
+ {\n state = 3;\n } else {\n resetToDataState();\n }\n }\n
+ \ function stateBeforeAttributeName(char2) {\n if (whitespaceRe.test(char2))
+ ;\n else if (char2 === \"/\") {\n state = 12;\n } else if (char2
+ === \">\") {\n emitTagAndPreviousTextNode();\n } else if (char2 ===
+ \"<\") {\n startNewTag();\n } else if (char2 === \"=\" || quoteRe.test(char2)
+ || controlCharsRe.test(char2)) {\n resetToDataState();\n } else {\n
+ \ state = 5;\n }\n }\n function stateAttributeName(char2) {\n if
+ (whitespaceRe.test(char2)) {\n state = 6;\n } else if (char2 === \"/\")
+ {\n state = 12;\n } else if (char2 === \"=\") {\n state = 7;\n
+ \ } else if (char2 === \">\") {\n emitTagAndPreviousTextNode();\n }
+ else if (char2 === \"<\") {\n startNewTag();\n } else if (quoteRe.test(char2))
+ {\n resetToDataState();\n } else ;\n }\n function stateAfterAttributeName(char2)
+ {\n if (whitespaceRe.test(char2)) ;\n else if (char2 === \"/\") {\n
+ \ state = 12;\n } else if (char2 === \"=\") {\n state = 7;\n }
+ else if (char2 === \">\") {\n emitTagAndPreviousTextNode();\n } else
+ if (char2 === \"<\") {\n startNewTag();\n } else if (quoteRe.test(char2))
+ {\n resetToDataState();\n } else {\n state = 5;\n }\n }\n
+ \ function stateBeforeAttributeValue(char2) {\n if (whitespaceRe.test(char2))
+ ;\n else if (char2 === '\"') {\n state = 8;\n } else if (char2
+ === \"'\") {\n state = 9;\n } else if (/[>=`]/.test(char2)) {\n resetToDataState();\n
+ \ } else if (char2 === \"<\") {\n startNewTag();\n } else {\n state
+ = 10;\n }\n }\n function stateAttributeValueDoubleQuoted(char2) {\n if
+ (char2 === '\"') {\n state = 11;\n }\n }\n function stateAttributeValueSingleQuoted(char2)
+ {\n if (char2 === \"'\") {\n state = 11;\n }\n }\n function stateAttributeValueUnquoted(char2)
+ {\n if (whitespaceRe.test(char2)) {\n state = 4;\n } else if (char2
+ === \">\") {\n emitTagAndPreviousTextNode();\n } else if (char2 ===
+ \"<\") {\n startNewTag();\n } else ;\n }\n function stateAfterAttributeValueQuoted(char2)
+ {\n if (whitespaceRe.test(char2)) {\n state = 4;\n } else if (char2
+ === \"/\") {\n state = 12;\n } else if (char2 === \">\") {\n emitTagAndPreviousTextNode();\n
+ \ } else if (char2 === \"<\") {\n startNewTag();\n } else {\n state
+ = 4;\n reconsumeCurrentCharacter();\n }\n }\n function stateSelfClosingStartTag(char2)
+ {\n if (char2 === \">\") {\n currentTag = new CurrentTag(__assign(__assign({},
+ currentTag), { isClosing: true }));\n emitTagAndPreviousTextNode();\n
+ \ } else {\n state = 4;\n }\n }\n function stateMarkupDeclarationOpen(char2)
+ {\n if (html.substr(charIdx, 2) === \"--\") {\n charIdx += 2;\n currentTag
+ = new CurrentTag(__assign(__assign({}, currentTag), { type: \"comment\" }));\n
+ \ state = 14;\n } else if (html.substr(charIdx, 7).toUpperCase() ===
+ \"DOCTYPE\") {\n charIdx += 7;\n currentTag = new CurrentTag(__assign(__assign({},
+ currentTag), { type: \"doctype\" }));\n state = 20;\n } else {\n resetToDataState();\n
+ \ }\n }\n function stateCommentStart(char2) {\n if (char2 === \"-\")
+ {\n state = 15;\n } else if (char2 === \">\") {\n resetToDataState();\n
+ \ } else {\n state = 16;\n }\n }\n function stateCommentStartDash(char2)
+ {\n if (char2 === \"-\") {\n state = 18;\n } else if (char2 ===
+ \">\") {\n resetToDataState();\n } else {\n state = 16;\n }\n
+ \ }\n function stateComment(char2) {\n if (char2 === \"-\") {\n state
+ = 17;\n }\n }\n function stateCommentEndDash(char2) {\n if (char2
+ === \"-\") {\n state = 18;\n } else {\n state = 16;\n }\n
+ \ }\n function stateCommentEnd(char2) {\n if (char2 === \">\") {\n emitTagAndPreviousTextNode();\n
+ \ } else if (char2 === \"!\") {\n state = 19;\n } else if (char2
+ === \"-\") ;\n else {\n state = 16;\n }\n }\n function stateCommentEndBang(char2)
+ {\n if (char2 === \"-\") {\n state = 17;\n } else if (char2 ===
+ \">\") {\n emitTagAndPreviousTextNode();\n } else {\n state =
+ 16;\n }\n }\n function stateDoctype(char2) {\n if (char2 === \">\")
+ {\n emitTagAndPreviousTextNode();\n } else if (char2 === \"<\") {\n
+ \ startNewTag();\n } else ;\n }\n function resetToDataState() {\n
+ \ state = 0;\n currentTag = noCurrentTag;\n }\n function startNewTag()
+ {\n state = 1;\n currentTag = new CurrentTag({ idx: charIdx });\n }\n
+ \ function emitTagAndPreviousTextNode() {\n var textBeforeTag = html.slice(currentDataIdx,
+ currentTag.idx);\n if (textBeforeTag) {\n onText(textBeforeTag, currentDataIdx);\n
+ \ }\n if (currentTag.type === \"comment\") {\n onComment(currentTag.idx);\n
+ \ } else if (currentTag.type === \"doctype\") {\n onDoctype(currentTag.idx);\n
+ \ } else {\n if (currentTag.isOpening) {\n onOpenTag(currentTag.name,
+ currentTag.idx);\n }\n if (currentTag.isClosing) {\n onCloseTag(currentTag.name,
+ currentTag.idx);\n }\n }\n resetToDataState();\n currentDataIdx
+ = charIdx + 1;\n }\n function emitText() {\n var text2 = html.slice(currentDataIdx,
+ charIdx);\n onText(text2, currentDataIdx);\n currentDataIdx = charIdx
+ + 1;\n }\n function captureTagName() {\n var startIdx = currentTag.idx
+ + (currentTag.isClosing ? 2 : 1);\n return html.slice(startIdx, charIdx).toLowerCase();\n
+ \ }\n function reconsumeCurrentCharacter() {\n charIdx--;\n }\n}\nvar
+ CurrentTag = (\n /** @class */\n /* @__PURE__ */ function() {\n function
+ CurrentTag2(cfg) {\n if (cfg === void 0) {\n cfg = {};\n }\n
+ \ this.idx = cfg.idx !== void 0 ? cfg.idx : -1;\n this.type = cfg.type
+ || \"tag\";\n this.name = cfg.name || \"\";\n this.isOpening = !!cfg.isOpening;\n
+ \ this.isClosing = !!cfg.isClosing;\n }\n return CurrentTag2;\n
+ \ }()\n);\nvar Autolinker = (\n /** @class */\n function() {\n function
+ Autolinker2(cfg) {\n if (cfg === void 0) {\n cfg = {};\n }\n
+ \ this.version = Autolinker2.version;\n this.urls = {};\n this.email
+ = true;\n this.phone = true;\n this.hashtag = false;\n this.mention
+ = false;\n this.newWindow = true;\n this.stripPrefix = {\n scheme:
+ true,\n www: true\n };\n this.stripTrailingSlash = true;\n
+ \ this.decodePercentEncoding = true;\n this.truncate = {\n length:
+ 0,\n location: \"end\"\n };\n this.className = \"\";\n this.replaceFn
+ = null;\n this.context = void 0;\n this.sanitizeHtml = false;\n
+ \ this.tagBuilder = null;\n this.urls = normalizeUrlsCfg(cfg.urls);\n
+ \ this.email = isBoolean(cfg.email) ? cfg.email : this.email;\n this.phone
+ = isBoolean(cfg.phone) ? cfg.phone : this.phone;\n this.hashtag = cfg.hashtag
+ || this.hashtag;\n this.mention = cfg.mention || this.mention;\n this.newWindow
+ = isBoolean(cfg.newWindow) ? cfg.newWindow : this.newWindow;\n this.stripPrefix
+ = normalizeStripPrefixCfg(cfg.stripPrefix);\n this.stripTrailingSlash
+ = isBoolean(cfg.stripTrailingSlash) ? cfg.stripTrailingSlash : this.stripTrailingSlash;\n
+ \ this.decodePercentEncoding = isBoolean(cfg.decodePercentEncoding) ?
+ cfg.decodePercentEncoding : this.decodePercentEncoding;\n this.sanitizeHtml
+ = cfg.sanitizeHtml || false;\n var mention = this.mention;\n if
+ (mention !== false && mentionServices.indexOf(mention) === -1) {\n throw
+ new Error(\"invalid `mention` cfg '\".concat(mention, \"' - see docs\"));\n
+ \ }\n var hashtag = this.hashtag;\n if (hashtag !== false &&
+ hashtagServices.indexOf(hashtag) === -1) {\n throw new Error(\"invalid
+ `hashtag` cfg '\".concat(hashtag, \"' - see docs\"));\n }\n this.truncate
+ = normalizeTruncateCfg(cfg.truncate);\n this.className = cfg.className
+ || this.className;\n this.replaceFn = cfg.replaceFn || this.replaceFn;\n
+ \ this.context = cfg.context || this;\n }\n Autolinker2.link = function(textOrHtml,
+ options) {\n var autolinker = new Autolinker2(options);\n return
+ autolinker.link(textOrHtml);\n };\n Autolinker2.parse = function(textOrHtml,
+ options) {\n var autolinker = new Autolinker2(options);\n return
+ autolinker.parse(textOrHtml);\n };\n Autolinker2.prototype.parse = function(textOrHtml)
+ {\n var _this = this;\n var skipTagNames = [\"a\", \"style\", \"script\"],
+ skipTagsStackCount = 0, matches = [];\n parseHtml(textOrHtml, {\n onOpenTag:
+ function(tagName) {\n if (skipTagNames.indexOf(tagName) >= 0) {\n
+ \ skipTagsStackCount++;\n }\n },\n onText:
+ function(text2, offset) {\n if (skipTagsStackCount === 0) {\n var
+ htmlCharacterEntitiesRegex = /( | |<|<|>|>|"|"|')/gi;\n
+ \ var textSplit = text2.split(htmlCharacterEntitiesRegex);\n var
+ currentOffset_1 = offset;\n textSplit.forEach(function(splitText,
+ i3) {\n if (i3 % 2 === 0) {\n var textNodeMatches
+ = _this.parseText(splitText, currentOffset_1);\n matches.push.apply(matches,
+ textNodeMatches);\n }\n currentOffset_1 += splitText.length;\n
+ \ });\n }\n },\n onCloseTag: function(tagName)
+ {\n if (skipTagNames.indexOf(tagName) >= 0) {\n skipTagsStackCount
+ = Math.max(skipTagsStackCount - 1, 0);\n }\n },\n onComment:
+ function(_offset) {\n },\n // no need to process comment nodes\n
+ \ onDoctype: function(_offset) {\n }\n // no need to process
+ doctype nodes\n });\n matches = this.compactMatches(matches);\n
+ \ matches = this.removeUnwantedMatches(matches);\n return matches;\n
+ \ };\n Autolinker2.prototype.compactMatches = function(matches) {\n matches.sort(function(a2,
+ b2) {\n return a2.getOffset() - b2.getOffset();\n });\n var
+ i3 = 0;\n while (i3 < matches.length - 1) {\n var match3 = matches[i3],
+ offset = match3.getOffset(), matchedTextLength = match3.getMatchedText().length,
+ endIdx = offset + matchedTextLength;\n if (i3 + 1 < matches.length)
+ {\n if (matches[i3 + 1].getOffset() === offset) {\n var
+ removeIdx = matches[i3 + 1].getMatchedText().length > matchedTextLength ?
+ i3 : i3 + 1;\n matches.splice(removeIdx, 1);\n continue;\n
+ \ }\n if (matches[i3 + 1].getOffset() < endIdx) {\n matches.splice(i3
+ + 1, 1);\n continue;\n }\n }\n i3++;\n }\n
+ \ return matches;\n };\n Autolinker2.prototype.removeUnwantedMatches
+ = function(matches) {\n if (!this.hashtag)\n removeWithPredicate(matches,
+ function(match3) {\n return match3.getType() === \"hashtag\";\n });\n
+ \ if (!this.email)\n removeWithPredicate(matches, function(match3)
+ {\n return match3.getType() === \"email\";\n });\n if
+ (!this.phone)\n removeWithPredicate(matches, function(match3) {\n return
+ match3.getType() === \"phone\";\n });\n if (!this.mention)\n removeWithPredicate(matches,
+ function(match3) {\n return match3.getType() === \"mention\";\n });\n
+ \ if (!this.urls.schemeMatches) {\n removeWithPredicate(matches,
+ function(m2) {\n return m2.getType() === \"url\" && m2.getUrlMatchType()
+ === \"scheme\";\n });\n }\n if (!this.urls.tldMatches) {\n
+ \ removeWithPredicate(matches, function(m2) {\n return m2.getType()
+ === \"url\" && m2.getUrlMatchType() === \"tld\";\n });\n }\n if
+ (!this.urls.ipV4Matches) {\n removeWithPredicate(matches, function(m2)
+ {\n return m2.getType() === \"url\" && m2.getUrlMatchType() === \"ipV4\";\n
+ \ });\n }\n return matches;\n };\n Autolinker2.prototype.parseText
+ = function(text2, offset) {\n if (offset === void 0) {\n offset
+ = 0;\n }\n offset = offset || 0;\n var matches = parseMatches(text2,
+ {\n tagBuilder: this.getTagBuilder(),\n stripPrefix: this.stripPrefix,\n
+ \ stripTrailingSlash: this.stripTrailingSlash,\n decodePercentEncoding:
+ this.decodePercentEncoding,\n hashtagServiceName: this.hashtag,\n mentionServiceName:
+ this.mention || \"twitter\"\n });\n for (var i3 = 0, numTextMatches
+ = matches.length; i3 < numTextMatches; i3++) {\n matches[i3].setOffset(offset
+ + matches[i3].getOffset());\n }\n return matches;\n };\n Autolinker2.prototype.link
+ = function(textOrHtml) {\n if (!textOrHtml) {\n return \"\";\n
+ \ }\n if (this.sanitizeHtml) {\n textOrHtml = textOrHtml.replace(//g, \">\");\n }\n var matches = this.parse(textOrHtml),
+ newHtml = [], lastIndex = 0;\n for (var i3 = 0, len = matches.length;
+ i3 < len; i3++) {\n var match3 = matches[i3];\n newHtml.push(textOrHtml.substring(lastIndex,
+ match3.getOffset()));\n newHtml.push(this.createMatchReturnVal(match3));\n
+ \ lastIndex = match3.getOffset() + match3.getMatchedText().length;\n
+ \ }\n newHtml.push(textOrHtml.substring(lastIndex));\n return
+ newHtml.join(\"\");\n };\n Autolinker2.prototype.createMatchReturnVal
+ = function(match3) {\n var replaceFnResult;\n if (this.replaceFn)
+ {\n replaceFnResult = this.replaceFn.call(this.context, match3);\n
+ \ }\n if (typeof replaceFnResult === \"string\") {\n return
+ replaceFnResult;\n } else if (replaceFnResult === false) {\n return
+ match3.getMatchedText();\n } else if (replaceFnResult instanceof HtmlTag)
+ {\n return replaceFnResult.toAnchorString();\n } else {\n var
+ anchorTag = match3.buildTag();\n return anchorTag.toAnchorString();\n
+ \ }\n };\n Autolinker2.prototype.getTagBuilder = function() {\n
+ \ var tagBuilder = this.tagBuilder;\n if (!tagBuilder) {\n tagBuilder
+ = this.tagBuilder = new AnchorTagBuilder({\n newWindow: this.newWindow,\n
+ \ truncate: this.truncate,\n className: this.className\n
+ \ });\n }\n return tagBuilder;\n };\n Autolinker2.version
+ = version;\n return Autolinker2;\n }()\n);\nfunction normalizeUrlsCfg(urls)
+ {\n if (urls == null)\n urls = true;\n if (isBoolean(urls)) {\n return
+ { schemeMatches: urls, tldMatches: urls, ipV4Matches: urls };\n } else {\n
+ \ return {\n schemeMatches: isBoolean(urls.schemeMatches) ? urls.schemeMatches
+ : true,\n tldMatches: isBoolean(urls.tldMatches) ? urls.tldMatches :
+ true,\n ipV4Matches: isBoolean(urls.ipV4Matches) ? urls.ipV4Matches :
+ true\n };\n }\n}\nfunction normalizeStripPrefixCfg(stripPrefix) {\n if
+ (stripPrefix == null)\n stripPrefix = true;\n if (isBoolean(stripPrefix))
+ {\n return { scheme: stripPrefix, www: stripPrefix };\n } else {\n return
+ {\n scheme: isBoolean(stripPrefix.scheme) ? stripPrefix.scheme : true,\n
+ \ www: isBoolean(stripPrefix.www) ? stripPrefix.www : true\n };\n }\n}\nfunction
+ normalizeTruncateCfg(truncate) {\n if (typeof truncate === \"number\") {\n
+ \ return { length: truncate, location: \"end\" };\n } else {\n return
+ defaults(truncate || {}, {\n length: Number.POSITIVE_INFINITY,\n location:
+ \"end\"\n });\n }\n}\nconst AutolinkMixin = {\n name: \"autolink-mixin\",\n
+ \ created() {\n this.listValueTransformations.attach(\n this.transformValue.bind(this),\n
+ \ \"AutolinkMixin:transformValue\"\n );\n },\n transformValue(value,
+ listValueTransformations) {\n const template = document.createElement(\"template\");\n
+ \ template.innerHTML = Autolinker.link(value);\n const nextProcessor
+ = listValueTransformations.shift();\n if (nextProcessor)\n nextProcessor(template.content,
+ listValueTransformations);\n }\n};\nconst DateMixin = {\n name: \"date-mixin\",\n
+ \ created() {\n this.listValueTransformations.attach(\n this.transformValue.bind(this),\n
+ \ \"DateMixin:transformValue\"\n );\n },\n transformValue(value,
+ listValueTransformations) {\n try {\n this.listAttributes.originalValue
+ = this.formatDateForInput(value);\n } catch {\n console.warn(\"Invalid
+ date format for widget\", this.name);\n this.listAttributes.originalValue
+ = \"\";\n }\n const newValue = value ? new Date(value).toLocaleDateString()
+ : value;\n const nextProcessor = listValueTransformations.shift();\n if
+ (nextProcessor) nextProcessor(newValue, listValueTransformations);\n },\n
+ \ formatDateForInput(date) {\n const d2 = new Date(date);\n if (Number.isNaN(d2.getTime()))
+ throw new Error(\"Invalid date\");\n let month = `${d2.getMonth() + 1}`;\n
+ \ let day = `${d2.getDate()}`;\n const year = d2.getFullYear();\n if
+ (month.length < 2) month = `0${month}`;\n if (day.length < 2) day = `0${day}`;\n
+ \ return [year, month, day].join(\"-\");\n }\n};\nconst DateTimeMixin =
+ {\n name: \"date-time-mixin\",\n created() {\n this.listValueTransformations.attach(\n
+ \ this.transformValue.bind(this),\n \"DateTimeMixin:transformValue\"\n
+ \ );\n },\n transformValue(value, listValueTransformations) {\n const
+ newValue = value ? new Date(value).toLocaleString() : value;\n const nextProcessor
+ = listValueTransformations.shift();\n if (nextProcessor) nextProcessor(newValue,
+ listValueTransformations);\n }\n};\nvar markdownItLinkAttributes;\nvar hasRequiredMarkdownItLinkAttributes;\nfunction
+ requireMarkdownItLinkAttributes() {\n if (hasRequiredMarkdownItLinkAttributes)
+ return markdownItLinkAttributes;\n hasRequiredMarkdownItLinkAttributes =
+ 1;\n function findFirstMatchingConfig(link2, configs) {\n var i3, config2;\n
+ \ var href = link2.attrs[link2.attrIndex(\"href\")][1];\n for (i3 = 0;
+ i3 < configs.length; ++i3) {\n config2 = configs[i3];\n if (typeof
+ config2.matcher === \"function\") {\n if (config2.matcher(href, config2))
+ {\n return config2;\n } else {\n continue;\n }\n
+ \ }\n return config2;\n }\n }\n function applyAttributes(idx,
+ tokens, attributes) {\n Object.keys(attributes).forEach(function(attr)
+ {\n var attrIndex2;\n var value = attributes[attr];\n if (attr
+ === \"className\") {\n attr = \"class\";\n }\n attrIndex2
+ = tokens[idx].attrIndex(attr);\n if (attrIndex2 < 0) {\n tokens[idx].attrPush([attr,
+ value]);\n } else {\n tokens[idx].attrs[attrIndex2][1] = value;\n
+ \ }\n });\n }\n function markdownitLinkAttributes(md, configs) {\n
+ \ if (!configs) {\n configs = [];\n } else {\n configs = Array.isArray(configs)
+ ? configs : [configs];\n }\n Object.freeze(configs);\n var defaultRender
+ = md.renderer.rules.link_open || this.defaultRender;\n md.renderer.rules.link_open
+ = function(tokens, idx, options, env, self2) {\n var config2 = findFirstMatchingConfig(tokens[idx],
+ configs);\n var attributes = config2 && config2.attrs;\n if (attributes)
+ {\n applyAttributes(idx, tokens, attributes);\n }\n return
+ defaultRender(tokens, idx, options, env, self2);\n };\n }\n markdownitLinkAttributes.defaultRender
+ = function(tokens, idx, options, env, self2) {\n return self2.renderToken(tokens,
+ idx, options);\n };\n markdownItLinkAttributes = markdownitLinkAttributes;\n
+ \ return markdownItLinkAttributes;\n}\nvar markdownItLinkAttributesExports
+ = requireMarkdownItLinkAttributes();\nconst mila = /* @__PURE__ */ getDefaultExportFromCjs(markdownItLinkAttributesExports);\nconst
+ MarkdownMixin = {\n name: \"markdown-mixin\",\n created() {\n this.listValueTransformations.attach(\n
+ \ this.transformValue.bind(this),\n \"MarkdownMixin:transformValue\"\n
+ \ );\n },\n transformValue(value, listValueTransformations) {\n let
+ newValue = \"\";\n if (value) {\n const md = MarkdownIt({\n breaks:
+ true,\n html: true,\n linkify: true\n });\n md.use(mila,
+ {\n attrs: {\n target: \"_blank\",\n rel: \"noopener\"\n
+ \ }\n });\n const html = md.render(value);\n newValue
+ = o$1(html);\n }\n const nextProcessor = listValueTransformations.shift();\n
+ \ if (nextProcessor) nextProcessor(newValue, listValueTransformations);\n
+ \ }\n};\nconst MultilineMixin = {\n name: \"multiline-mixin\",\n created()
+ {\n this.listValueTransformations.attach(\n this.transformValue.bind(this),\n
+ \ \"MultilineMixin:transformValue\"\n );\n },\n transformValue(value,
+ listValueTransformations) {\n const newValue = value ? o$1(value.replace(/\\n/g,
+ \"
\")) : value;\n const nextProcessor = listValueTransformations.shift();\n
+ \ if (nextProcessor) nextProcessor(newValue, listValueTransformations);\n
+ \ }\n};\nconst OembedMixin = {\n name: \"oembed-mixin\",\n initialState:
+ {\n existingOembed: null\n },\n created() {\n this.listValueTransformations.attach(\n
+ \ this.transformValue.bind(this),\n \"OembedMixin:transformValue\"\n
+ \ );\n },\n async transformValue(value, listValueTransformations) {\n
+ \ if (!value) return;\n if (this.existingOembed == null) {\n const
+ response = await fetch(this.value);\n this.existingOembed = await response.json();\n
+ \ }\n const newValue = o$1(this.existingOembed.html);\n const nextProcessor
+ = listValueTransformations.shift();\n if (nextProcessor) nextProcessor(newValue,
+ listValueTransformations);\n }\n};\nconst valueTransformationDirectory =
+ {\n date: DateMixin,\n datetime: DateTimeMixin,\n multiline: MultilineMixin,\n
+ \ markdown: MarkdownMixin,\n oembed: OembedMixin,\n autolink: AutolinkMixin\n};\nconst
+ valueTransformationKeys = Object.keys(valueTransformationDirectory);\nconst
+ attributeKeys = Object.keys(attributeDirectory);\nconst templateAdditionKeys
+ = Object.keys(templateAdditionDirectory);\nconst callbackKeys = Object.keys(callbackDirectory);\nconst
+ newWidgetFactory = (tagName) => {\n let widgetMixins;\n try {\n widgetMixins
+ = getWidgetMixins(tagName);\n } catch (e2) {\n console.error(e2);\n return;\n
+ \ }\n const newWidget = {\n // compose widget\n name: tagName,\n use:
+ [\n ...widgetMixins.mixins,\n BaseWidgetMixin\n // at the end
+ so created() is called first\n ],\n get template() {\n return widgetMixins.templateMixin.template;\n
+ \ }\n };\n Sib.register(newWidget);\n};\nfunction getWidgetMixins(tagName)
+ {\n const valueTransformations = [];\n const attributes = [];\n const templateAdditions
+ = [];\n const callbacks = [];\n let template = null;\n const mixinNames
+ = tagName.split(\"-\").filter((t2) => t2 !== \"solid\");\n let widgetType
+ = defaultTemplates;\n if (mixinNames.includes(\"display\")) widgetType =
+ displayTemplates;\n else if (mixinNames.includes(\"form\")) widgetType =
+ formTemplates;\n else if (mixinNames.includes(\"set\")) widgetType = setTemplates;\n
+ \ else if (mixinNames.includes(\"group\")) widgetType = groupTemplates;\n
+ \ const templateKeys = Object.keys(widgetType);\n for (const mixin of mixinNames)
+ {\n if (valueTransformationKeys.includes(mixin)) {\n valueTransformations.push(valueTransformationDirectory[mixin]);\n
+ \ }\n if (attributeKeys.includes(mixin)) {\n attributes.push(attributeDirectory[mixin]);\n
+ \ }\n if (templateAdditionKeys.includes(mixin)) {\n templateAdditions.push(templateAdditionDirectory[mixin]);\n
+ \ }\n if (callbackKeys.includes(mixin)) {\n callbacks.push(callbackDirectory[mixin]);\n
+ \ }\n if (templateKeys.includes(mixin)) {\n template = widgetType[mixin];\n
+ \ }\n }\n if (!template) throw `No template found for widget \"${tagName}\"`;\n
+ \ return {\n templateMixin: template,\n mixins: [\n ...valueTransformations,\n
+ \ ...attributes,\n ...templateAdditions,\n ...template.dependencies
+ || [],\n ...callbacks\n ]\n };\n}\nnewWidgetFactory(\"solid-form-dropdown\");\nnewWidgetFactory(\"solid-form-multicheckbox\");\nnewWidgetFactory(\"solid-form-file-label\");\nnewWidgetFactory(\"solid-action\");\nnewWidgetFactory(\"solid-group-default\");\nvar
+ WidgetType = /* @__PURE__ */ ((WidgetType2) => {\n WidgetType2[\"CUSTOM\"]
+ = \"custom\";\n WidgetType2[\"USER\"] = \"user\";\n WidgetType2[\"NATIVE\"]
+ = \"native\";\n return WidgetType2;\n})(WidgetType || {});\nconst WidgetMixin
+ = {\n name: \"widget-mixin\",\n use: [],\n attributes: {\n fields: {\n
+ \ type: String,\n default: void 0\n }\n },\n initialState: {\n
+ \ nameWidgets: null,\n _div: null\n },\n created() {\n this.nameWidgets
+ = [];\n },\n attached() {\n if (!this.dataSrc && !this.resource && this.noRender
+ === null)\n this.populate();\n },\n get parentElement() {\n return
+ \"div\";\n },\n get div() {\n if (this._div) return this._div;\n this._div
+ = document.createElement(this.parentElement);\n this.element.appendChild(this._div);\n
+ \ return this._div;\n },\n set div(value) {\n this._div = value;\n
+ \ },\n get widgets() {\n return this.nameWidgets.map(\n (name) =>
+ this.element.querySelector(`[name=\"${name}\"]`)\n );\n },\n /**\n *
+ Return field list of the component\n */\n async getFields() {\n var
+ _a3;\n const attr = this.fields;\n if (attr === \"\") return [];\n if
+ (attr) return parseFieldsString(attr);\n let resource = this.resource;\n
+ \ if ((_a3 = resource == null ? void 0 : resource.isContainer) == null ?
+ void 0 : _a3.call(resource)) {\n const resources = resource[\"listPredicate\"];\n
+ \ for (const res of resources) {\n resource = res;\n break;\n
+ \ }\n } else if (resource && this.arrayField && this.predicateName)
+ {\n for (const res of resource[this.predicateName]) {\n resource
+ = res;\n break;\n }\n }\n if (!this.dataSrc)\n console.error(new
+ Error('You must provide a \"fields\" attribute'));\n if (!resource) return
+ [];\n const fields = [];\n for (const prop of resource.properties) {\n
+ \ if (!prop.startsWith(\"@\") && !(prop === \"permissions\")) {\n if
+ (!this.isAlias(prop) && await resource[prop]) fields.push(prop);\n else
+ if (this.isAlias(prop)) fields.push(prop);\n }\n }\n return fields;\n
+ \ },\n /**\n * return attribute if \"field\" is an action\n * @param
+ field - string\n */\n getAction(field) {\n const action = this.element.getAttribute(`action-${field}`);\n
+ \ return action;\n },\n /**\n * return true if \"field\" is editable\n
+ \ * @param field - string\n */\n editable(field) {\n return this.element.hasAttribute(`editable-${field}`);\n
+ \ },\n /**\n * Return regexp to check if \"field\" is a set\n * @param
+ field - string\n */\n getSetRegexp(field) {\n return new RegExp(`(^|\\\\,|\\\\(|\\\\s)\\\\s*${field}\\\\s*\\\\(`,
+ \"g\");\n },\n /**\n * Return fields contained in set \"field\"\n *
+ @param field - string\n */\n getSet(field) {\n const setString = this.fields.match(this.getSetRegexp(field));\n
+ \ if (!setString) return [];\n const firstSetBracket = this.fields.indexOf(setString[0])
+ + setString[0].length - 1;\n const lastSetBracket = findClosingBracketMatchIndex(\n
+ \ this.fields,\n firstSetBracket\n );\n const set2 = this.fields.substring(firstSetBracket
+ + 1, lastSetBracket);\n return parseFieldsString(set2);\n },\n /**\n
+ \ * Return true if \"field\" is a set\n * @param field - string\n */\n
+ \ isSet(field) {\n if (!this.fields) return false;\n const foundSets
+ = this.fields.match(this.getSetRegexp(field));\n return foundSets ? foundSets.length
+ > 0 : false;\n },\n /**\n * Return true if \"field\" is a string\n *
+ @param field - string\n */\n isString(field) {\n return field.startsWith(\"'\")
+ || field.startsWith('\"');\n },\n /**\n * Return true if \"field\" is
+ an alias (contains \" as \")\n * @param field - string\n */\n isAlias(field)
+ {\n const aliasRegex = /^[\\w@.]+\\s+as\\s+[\\w@.]+$/;\n return aliasRegex.test(field);\n
+ \ },\n /**\n * Return the value of \"resource\" for predicate \"field\"\n
+ \ * @param field - string\n * @param resource - Resource\n */\n async
+ fetchValue(field, resource) {\n var _a3, _b;\n if (resource && !((_a3
+ = resource.isContainer) == null ? void 0 : _a3.call(resource))) {\n let
+ fieldValue = await resource[field];\n if (fieldValue === null || fieldValue
+ === void 0 || fieldValue === \"\") {\n const expandedPredicate = sibStore.getExpandedPredicate(\n
+ \ field,\n this.context\n );\n if (!expandedPredicate)
+ return void 0;\n fieldValue = await resource[expandedPredicate];\n
+ \ }\n if (fieldValue === null || fieldValue === void 0 || fieldValue
+ === \"\")\n return void 0;\n if (Array.isArray(fieldValue) &&
+ !doesResourceContainList(fieldValue)) {\n return JSON.stringify(fieldValue);\n
+ \ }\n if (typeof fieldValue === \"object\" && fieldValue[\"@id\"]
+ && Object.keys(fieldValue).length === 1) {\n return JSON.stringify([fieldValue]);\n
+ \ }\n }\n return resource && !((_b = resource.isContainer) == null
+ ? void 0 : _b.call(resource)) ? await resource[field] : void 0;\n },\n /**\n
+ \ * Return the value of the field\n * @param field - field\n */\n async
+ getValue(field, resource) {\n const escapedField = this.getEscapedField(field);\n
+ \ if (this.getAction(escapedField)) {\n return this.getAction(escapedField);\n
+ \ }\n if (this.element.hasAttribute(`value-${field}`)) {\n return
+ this.element.getAttribute(`value-${field}`);\n }\n if (this.isAlias(field))
+ {\n const alias = field.split(\" as \");\n return await this.fetchValue(alias[0],
+ resource);\n }\n const resourceValue = await this.fetchValue(field,
+ resource);\n if (resourceValue === void 0 || resourceValue === \"\" ||
+ resourceValue === null)\n return this.element.hasAttribute(`default-${field}`)
+ ? this.element.getAttribute(`default-${field}`) : \"\";\n return resourceValue;\n
+ \ },\n empty() {\n },\n /**\n * Return a widget from a tagName, and create
+ it if necessary\n * @param tagName - string\n */\n widgetFromTagName(tagName)
+ {\n let type = tagName.startsWith(\"solid\") ? WidgetType.CUSTOM : WidgetType.USER;\n
+ \ if (!customElements.get(tagName)) {\n if (tagName.startsWith(\"solid\"))\n
+ \ newWidgetFactory(tagName);\n else type = WidgetType.NATIVE;\n
+ \ }\n return { tagName, type };\n },\n /**\n * Return widget for
+ field \"field\"\n * @param field - string\n * @param isSet - boolean\n
+ \ */\n getWidget(field, isSet2 = false) {\n if (this.isAlias(field))
+ field = field.split(\" as \")[1];\n const widget = this.element.getAttribute(`widget-${field}`);\n
+ \ if (widget) return this.widgetFromTagName(widget);\n if (this.getAction(field))
+ return this.widgetFromTagName(\"solid-action\");\n return !isSet2 ? this.widgetFromTagName(this.defaultWidget)
+ : this.widgetFromTagName(this.defaultSetWidget);\n },\n /**\n * Return
+ multiple widget if \"field\" is a multiple, false if it's not\n * @param
+ field - string\n */\n multiple(field) {\n const attribute2 = `multiple-${field}`;\n
+ \ if (!this.element.hasAttribute(attribute2)) return null;\n const widget
+ = this.element.getAttribute(attribute2) || this.defaultMultipleWidget;\n return
+ this.widgetFromTagName(widget);\n },\n /**\n * If attribute \"lookForAttr\"
+ is set on element, add \"attrKey\" to the \"attributes\" list\n * @param
+ lookForAttr - string\n * @param setAttrKey - string\n * @param attributes
+ - object\n */\n addToAttributes(lookForAttr, setAttrKey, attributes) {\n
+ \ const attribute2 = this.element.getAttribute(lookForAttr);\n if (attribute2
+ == null) return;\n attributes[setAttrKey] = attribute2;\n },\n /**\n
+ \ * Return all the attributes of widget \"field\"\n * @param field - string\n
+ \ * @param resource - Resource\n */\n widgetAttributes(field, resource)
+ {\n const attrs = { name: field };\n if (this.isAlias(field)) field
+ = field.split(\" as \")[1];\n const escapedField = this.getEscapedField(field);\n
+ \ const multipleAttributes = [\n \"fields\",\n \"label\",\n \"widget\",\n
+ \ \"add-label\",\n \"remove-label\",\n \"next\",\n \"empty-widget\",\n
+ \ \"add-class\",\n \"remove-class\"\n ];\n for (const attr
+ of multipleAttributes)\n this.addToAttributes(`multiple-${escapedField}-${attr}`,
+ attr, attrs);\n const defaultAttributes = [\n \"range\",\n \"enum\",\n
+ \ \"label\",\n \"placeholder\",\n \"class\",\n /* 'widget',
+ */\n \"required\",\n \"editable\",\n \"autocomplete\",\n \"upload-url\",\n
+ \ \"option-label\",\n \"option-value\",\n \"order-by\",\n //
+ deprecated. Remove in 0.15\n \"each-label\",\n \"order-asc\",\n
+ \ \"order-desc\",\n \"min\",\n \"max\",\n \"pattern\",\n
+ \ \"title\",\n \"start-value\",\n \"end-value\",\n \"alt\",\n
+ \ \"step\",\n \"maxlength\",\n \"minlength\",\n \"search-text\",\n
+ \ \"search-placeholder\",\n \"link-text\",\n \"target-src\",\n
+ \ \"data-label\"\n ];\n for (const attr of defaultAttributes)\n
+ \ this.addToAttributes(`${attr}-${escapedField}`, attr, attrs);\n const
+ addableAttributes = Array.from(this.element.attributes).filter((a2) => a2.name.startsWith(`addable-${escapedField}`));\n
+ \ for (const attr of addableAttributes)\n this.addToAttributes(\n attr.name,\n
+ \ attr.name.replace(`addable-${escapedField}`, \"addable\"),\n attrs\n
+ \ );\n const resourceId = (resource == null ? void 0 : resource[\"@id\"])
+ ?? null;\n if (this.multiple(escapedField))\n attrs.widget = this.getWidget(escapedField).tagName;\n
+ \ if (this.getAction(escapedField) && resourceId)\n attrs.src = this.element.getAttribute(`src-${escapedField}`)
+ || resourceId;\n if (this.editable(escapedField) && resourceId)\n attrs[\"value-id\"]
+ = resourceId;\n return attrs;\n },\n /**\n * Creates and return a widget
+ for field + add it to the widget list\n * @param field - string\n */\n
+ \ async createWidgetTemplate(field, resource = null, transformAttributes =
+ false) {\n if (this.isString(field)) return this.createString(field);\n
+ \ if (this.isSet(field)) return await this.createSet(field);\n const
+ currentResource = resource || this.resource;\n let attributes = this.widgetAttributes(field,
+ currentResource);\n const escapedField = this.getEscapedField(field);\n
+ \ const widgetMeta = this.multiple(escapedField) || this.getWidget(escapedField);\n
+ \ let tagName = widgetMeta.tagName;\n let widgetTemplate = x``;\n const
+ classAttr = attributes.class;\n const value = await this.getValue(field,
+ currentResource);\n if (widgetMeta.type === WidgetType.NATIVE) {\n widgetTemplate
+ = preHTML`<${tagName} name=\"${o$2(attributes.name)}\" class=\"${o$2(attributes.class)}\">${value}${tagName}>`;\n
+ \ } else {\n if ((value === null || value === \"\") && this.element.hasAttribute(`default-widget-${field}`))
+ {\n tagName = this.element.getAttribute(`default-widget-${field}`);\n
+ \ }\n if (value === null || value === void 0) attributes.value =
+ \"\";\n if (widgetMeta.type === WidgetType.USER) {\n if (value[\"@id\"])
+ {\n attributes[\"data-src\"] = value[\"@id\"];\n } else {\n
+ \ try {\n const isUrl = new URL(value);\n if
+ (isUrl) attributes[\"data-src\"] = value;\n } catch {\n }\n
+ \ attributes.value = value;\n }\n } else {\n attributes.value
+ = value;\n }\n if (value == null ? void 0 : value[\"@id\"]) attributes[\"auto-subscribe\"]
+ = value[\"@id\"];\n if (transformAttributes)\n attributes = await
+ this.transformAttributes(\n attributes,\n currentResource\n
+ \ );\n if (value == null ? void 0 : value[\"@id\"]) attributes[\"auto-subscribe\"]
+ = value[\"@id\"];\n widgetTemplate = preHTML`\n <${tagName}\n
+ \ ...=${spread(attributes)}\n class=\"${classAttr !== void
+ 0 ? tagName.concat(\" \", classAttr) : tagName}\"\n >${tagName}>`;\n
+ \ }\n this.nameWidgets.push(field);\n return widgetTemplate;\n },\n
+ \ defineAttribute(widget, attribute2, value) {\n if (widget.getAttribute(attribute2)
+ !== value) {\n widget.setAttribute(attribute2, value);\n }\n },\n
+ \ /**\n * Create a set and add fields to it\n * @param field - string\n
+ \ */\n async createSet(field) {\n const setWidget = this.getWidget(field,
+ true);\n const attrs = { name: field, class: setWidget.tagName };\n const
+ setAttributes = [\"class\", \"label\"];\n for (const attr of setAttributes)\n
+ \ this.addToAttributes(`${attr}-${field}`, attr, attrs);\n if (attrs.class
+ !== void 0) {\n attrs.class = setWidget.tagName.concat(\" \", attrs.class);\n
+ \ } else attrs.class = setWidget.tagName;\n let widget = this.element.querySelector(\n
+ \ `${setWidget.tagName}[name=\"${field}\"]`\n );\n let initializing
+ = false;\n if (!widget) {\n widget = document.createElement(setWidget.tagName);\n
+ \ initializing = true;\n }\n for (const name of Object.keys(attrs))
+ {\n this.defineAttribute(widget, name, attrs[name], setWidget.type);\n
+ \ }\n if (widget.component && initializing) widget.component.render();\n
+ \ const setFields = this.getSet(field);\n if (this.element.hasAttribute(`empty-${field}`))
+ {\n let hasOnlyEmpty = true;\n for (const field2 of setFields) {\n
+ \ const value = await this.getValue(field2, this.resource);\n if
+ (value !== \"\") {\n hasOnlyEmpty = false;\n break;\n }\n
+ \ }\n if (hasOnlyEmpty) {\n const attributes = this.widgetAttributes(field,
+ this.resource);\n const tagName = this.element.getAttribute(`empty-${field}`);\n
+ \ const valueSet = this.element.getAttribute(`empty-${field}-value`);\n
+ \ if (valueSet) attributes.value = valueSet;\n return preHTML`\n
+ \ <${tagName}\n ...=${spread(attributes)}\n class=\"${tagName}\"\n
+ \ >${tagName}>`;\n }\n }\n const widgetsTemplate = await
+ Promise.all(\n setFields.map((field2) => this.createWidgetTemplate(field2))\n
+ \ );\n const template = x`${widgetsTemplate}`;\n B(template, widget.querySelector(\"[data-content]\")
+ || widget);\n return widget;\n },\n createString(value) {\n return
+ x`${value.slice(1, -1).replace(/\\\\(['\"])/g, \"$1\")}`;\n },\n
+ \ /**\n * Returns field name without starting \"@\"\n * @param field\n
+ \ */\n getEscapedField(field) {\n return field.startsWith(\"@\") ? field.slice(1,
+ field.length) : field;\n }\n};\nconst SolidDisplay = {\n name: \"solid-display\",\n
+ \ use: [\n WidgetMixin,\n ListMixin,\n StoreMixin,\n PaginateMixin,\n
+ \ GrouperMixin,\n CounterMixin,\n HighlighterMixin,\n FilterMixin,\n
+ \ SorterMixin,\n RequiredMixin,\n FederationMixin,\n NextMixin\n
+ \ ],\n attributes: {\n defaultWidget: {\n type: String,\n default:
+ \"solid-display-value\"\n }\n },\n initialState: {\n activeSubscription:
+ null,\n removeActiveSubscription: null,\n resources: []\n },\n created()
+ {\n const route = document.querySelector(\"solid-route[active]\");\n if
+ (!route) return;\n setTimeout(() => {\n if (route.resourceId === this.resourceId)
+ this.addActiveCallback();\n });\n },\n detached() {\n if (this.activeSubscription)
+ PubSub.unsubscribe(this.activeSubscription);\n if (this.removeActiveSubscription)\n
+ \ PubSub.unsubscribe(this.removeActiveSubscription);\n },\n // Update
+ subscription when id changes\n updateNavigateSubscription() {\n if (this.activeSubscription)
+ PubSub.unsubscribe(this.activeSubscription);\n if (this.resourceId) {\n
+ \ this.activeSubscription = PubSub.subscribe(\n `enterRoute.${this.resourceId}`,\n
+ \ this.addActiveCallback.bind(this)\n );\n }\n },\n addActiveCallback()
+ {\n this.element.setAttribute(\"active\", \"\");\n this.removeActiveSubscription
+ = PubSub.subscribe(\n \"leaveRoute\",\n this.removeActiveCallback.bind(this)\n
+ \ );\n },\n removeActiveCallback() {\n this.element.removeAttribute(\"active\");\n
+ \ PubSub.unsubscribe(this.removeActiveSubscription);\n },\n get childTag()
+ {\n return this.element.dataset.child || this.element.tagName;\n },\n
+ \ get defaultMultipleWidget() {\n return \"solid-multiple\";\n },\n get
+ defaultSetWidget() {\n return \"solid-set-default\";\n },\n // Here \"even.target\"
+ points to the content of the widgets of the children of solid-display\n dispatchSelect(event,
+ resourceId) {\n const linkTarget = (event == null ? void 0 : event.target).closest(\"a\");\n
+ \ if (linkTarget == null ? void 0 : linkTarget.hasAttribute(\"href\")) return;\n
+ \ const resource = { \"@id\": resourceId };\n this.element.dispatchEvent(\n
+ \ new CustomEvent(\"resourceSelect\", { detail: { resource } })\n );\n
+ \ this.goToNext(resource);\n },\n enterKeydownAction(event, resourceId)
+ {\n if (event.keyCode === 13) {\n const resource = { \"@id\": resourceId
+ };\n this.goToNext(resource);\n }\n },\n /**\n * Returns template
+ of a child element (resource)\n * @param resourceId\n * @param attributes\n
+ \ */\n getChildTemplate(resourceId, attributes) {\n const template =
+ x`\n this.dispatchSelect(event, resourceId)}\n @keydown=${(event) =>
+ this.enterKeydownAction(event, resourceId)}\n fields=${o$2(this.fields)}\n
+ \ ...=${spread(attributes)}\n >\n `;\n return
+ template;\n },\n /**\n * Creates and render the content of a single element
+ (resource)\n * @param parent\n */\n async appendSingleElt(parent) {\n
+ \ const fields = await this.getFields();\n const widgetTemplates = await
+ Promise.all(\n // generate all widget templates\n fields.map((field)
+ => this.createWidgetTemplate(field))\n );\n B(x`${widgetTemplates}`,
+ parent);\n },\n /**\n * @override listMixin method to use litHtml\n *\n
+ \ * Render resources from a container\n * @param resources\n * @param
+ listPostProcessors\n * @param div\n * @param context\n */\n renderDOM:
+ trackRenderAsync(async function(resources, listPostProcessors, div, context)
+ {\n const attributes = this.getChildAttributes();\n const template =
+ x`${resources.map((r3) => r3 ? this.getChildTemplate(r3[\"@id\"], attributes)
+ : null)}`;\n B(template, div);\n const nextProcessor = listPostProcessors.shift();\n
+ \ if (nextProcessor)\n await nextProcessor(resources, listPostProcessors,
+ div, context);\n }, \"SolidDisplay:renderDom\"),\n /**\n * Get attributes
+ to dispatch to children from current element\n */\n getChildAttributes()
+ {\n const attributes = {};\n for (const attr of this.element.attributes)
+ {\n if (attr.name.startsWith(\"value-\") || attr.name.startsWith(\"label-\")
+ || attr.name.startsWith(\"placeholder-\") || attr.name.startsWith(\"widget-\")
+ || attr.name.startsWith(\"class-\") || attr.name.startsWith(\"multiple-\")
+ || attr.name.startsWith(\"editable-\") || attr.name.startsWith(\"action-\")
+ || attr.name.startsWith(\"default-\") || attr.name.startsWith(\"link-text-\")
+ || attr.name.startsWith(\"target-src-\") || attr.name.startsWith(\"data-label-\")
+ || attr.name === \"extra-context\")\n attributes[attr.name] = attr.value;\n
+ \ if (attr.name.startsWith(\"child-\"))\n attributes[attr.name.replace(/^child-/,
+ \"\")] = attr.value;\n if (attr.name === \"next\") {\n attributes.role
+ = \"button\";\n attributes.tabindex = \"0\";\n }\n }\n return
+ attributes;\n }\n};\nSib.register(SolidDisplay);\nconst SolidFormSearch =
+ {\n name: \"solid-form-search\",\n use: [WidgetMixin, AttributeBinderMixin,
+ ContextMixin],\n debounceTimeout: void 0,\n attributes: {\n defaultWidget:
+ {\n type: String,\n default: \"solid-form-label-text\"\n },\n
+ \ submitButton: {\n type: String,\n default: null,\n callback:
+ function(newValue, oldValue) {\n if (this.noRender == null && newValue
+ !== oldValue) this.populate();\n }\n },\n submitWidget: {\n type:
+ String,\n default: void 0\n },\n classSubmitButton: {\n type:
+ String,\n default: void 0\n },\n noRender: {\n type: String,\n
+ \ default: null,\n callback: function(value) {\n if (value
+ === null) this.populate();\n }\n },\n debounce: {\n type:
+ Number,\n default: 0\n // Avoiding blink effect with static values\n
+ \ }\n },\n initialState: {\n error: \"\"\n },\n created() {\n if
+ (this.element.closest(\"[no-render]\")) this.noRender = \"\";\n this.autoRangeValues
+ = {};\n this.rangeId = uniqID();\n this.attachedElements = /* @__PURE__
+ */ new Set();\n },\n get defaultMultipleWidget() {\n return \"solid-multiple-form\";\n
+ \ },\n get defaultSetWidget() {\n return \"solid-set-default\";\n },\n
+ \ get value() {\n const values = {};\n for (const widget of this.widgets)
+ {\n if (widget == null) continue;\n const name = (widget.component
+ || widget).name;\n if (name == null) continue;\n let value = widget.component
+ ? widget.component.getValue() : widget.value;\n try {\n value
+ = JSON.parse(value);\n } catch {\n }\n value = {\n type:
+ widget.component.type,\n list: !!widget.component.multiple,\n value\n
+ \ };\n values[name] = value;\n }\n return values;\n },\n getWidget(field,
+ isSet2 = false) {\n let tagName = \"\";\n if (this.element.hasAttribute(`auto-range-${field}`)
+ && !this.element.hasAttribute(`range-${field}`)) {\n const idField =
+ `${this.rangeId}_${field}`;\n this.element.setAttribute(`range-${field}`,
+ `store://local.${idField}`);\n this.populate();\n }\n const widgetAttribute
+ = this.element.getAttribute(`widget-${field}`);\n if (!widgetAttribute
+ && (this.element.hasAttribute(`range-${field}`) || this.element.hasAttribute(`enum-${field}`)))
+ {\n tagName = \"solid-form-dropdown\";\n } else {\n tagName =
+ widgetAttribute || (!isSet2 ? this.defaultWidget : this.defaultSetWidget);\n
+ \ }\n if (!customElements.get(tagName)) {\n if (tagName.startsWith(\"solid\"))
+ newWidgetFactory(tagName);\n }\n return this.widgetFromTagName(tagName);\n
+ \ },\n async attach(elm) {\n if (this.attachedElements.has(elm)) return;\n
+ \ this.attachedElements.add(elm);\n await this.updateAutoRanges();\n
+ \ },\n async detach(elm) {\n if (!this.attachedElements.has(elm)) return;\n
+ \ this.attachedElements.delete(elm);\n await this.updateAutoRanges();\n
+ \ },\n async updateAutoRanges() {\n for (const attr of this.element.attributes)
+ {\n if (!attr.name.startsWith(\"auto-range-\")) continue;\n const
+ fieldName = attr.value !== \"\" ? attr.value : attr.name.replace(\"auto-range-\",
+ \"\");\n const autoRangeValues = /* @__PURE__ */ new Set();\n for
+ (const elm of this.attachedElements) {\n for (const value of await
+ elm.getValuesOfField(fieldName)) {\n autoRangeValues.add(value);\n
+ \ }\n }\n const idField = `${this.rangeId}_${fieldName}`;\n
+ \ const id = `store://local.${idField}`;\n const ldpContains = Array.from(autoRangeValues).map((id2)
+ => ({\n \"@id\": id2\n }));\n const data = {\n \"@type\":
+ \"ldp:Container\",\n \"@context\": this.context,\n \"ldp:contains\":
+ ldpContains\n };\n sibStore.setLocalData(data, id);\n }\n },\n
+ \ change(resource, eventOptions) {\n if (!resource) return;\n this.element.dispatchEvent(\n
+ \ new CustomEvent(\"formChange\", {\n bubbles: true,\n detail:
+ { resource }\n })\n );\n if (!eventOptions.value) return;\n this.element.dispatchEvent(\n
+ \ new CustomEvent(\"filterChange\", {\n bubbles: true,\n detail:
+ {\n value: eventOptions.value,\n inputLabel: eventOptions.inputLabel,\n
+ \ type: eventOptions.type\n }\n })\n );\n },\n inputChange(input)
+ {\n var _a3, _b;\n const parentElementLabel = (_a3 = input == null ?
+ void 0 : input.parentElement) == null ? void 0 : _a3.getAttribute(\"label\");\n
+ \ try {\n const selectedLabel = (_b = input.selectedOptions[0].textContent)
+ == null ? void 0 : _b.trim();\n this.change(this.value, {\n value:
+ selectedLabel,\n inputLabel: parentElementLabel,\n type: \"select\"\n
+ \ });\n } catch {\n this.change(this.value, {\n value:
+ input.value,\n inputLabel: parentElementLabel,\n type: \"input\"\n
+ \ });\n }\n },\n getSubmitTemplate() {\n return x`\n \n ${this.submitWidget === \"button\"
+ ? x`` : x``}\n
\n
+ \ `;\n },\n empty() {\n },\n debounceInput(input) {\n clearTimeout(this.debounceTimeout);\n
+ \ this.debounceTimeout = setTimeout(() => {\n this.debounceTimeout
+ = void 0;\n this.inputChange(input);\n }, this.debounce);\n },\n
+ \ populate: trackRenderAsync(async function() {\n await this.replaceAttributesData();\n
+ \ if (this.submitButton == null) {\n this.element.addEventListener(\"input\",
+ (e2) => {\n this.debounceInput(e2.target);\n });\n }\n this.element.addEventListener(\"submit\",
+ (e2) => {\n e2.preventDefault();\n this.inputChange(e2.target);\n
+ \ });\n const fields = await this.getFields();\n const widgetTemplates
+ = await Promise.all(\n fields.map((field) => this.createWidgetTemplate(field))\n
+ \ );\n const template = x`\n \n `;\n B(template, this.element);\n }, \"SolidFormSearch:populate\")\n};\nSib.register(SolidFormSearch);\nconst
+ SolidForm = {\n name: \"solid-form\",\n use: [WidgetMixin, StoreMixin, NextMixin,
+ ValidationMixin],\n attributes: {\n autosave: {\n type: Boolean,\n
+ \ default: null\n },\n classSubmitButton: {\n type: String,\n
+ \ default: void 0\n },\n defaultWidget: {\n type: String,\n
+ \ default: \"solid-form-label-text\"\n },\n naked: {\n type:
+ Boolean,\n default: null\n },\n partial: {\n type: Boolean,\n
+ \ default: null\n },\n submitButton: {\n type: String,\n default:
+ void 0,\n callback: function(newValue, oldValue) {\n if (this.noRender
+ == null && newValue !== oldValue) this.populate();\n }\n },\n submitWidget:
+ {\n type: String,\n default: null\n }\n },\n initialState:
+ {\n error: \"\"\n },\n get defaultMultipleWidget() {\n return \"solid-multiple-form\";\n
+ \ },\n get defaultSetWidget() {\n return \"solid-set-default\";\n },\n
+ \ get value() {\n var _a3, _b;\n const values = {};\n for (const
+ widget of this.widgets) {\n const name = (widget.component || widget).name;\n
+ \ if (name == null) continue;\n let value = widget.component ? widget.component.getValue()
+ : widget.value;\n try {\n value = JSON.parse(value);\n }
+ catch {\n }\n setDeepProperty(values, name.split(\".\"), value);\n
+ \ }\n if (this.resource && !((_b = (_a3 = this.resource).isContainer)
+ == null ? void 0 : _b.call(_a3)))\n values[\"@id\"] = this.resourceId;\n
+ \ return values;\n },\n get isNaked() {\n return this.element.hasAttribute(\"naked\");\n
+ \ },\n get isSavingAutomatically() {\n return this.autosave !== null;\n
+ \ },\n isCreationForm(formValue) {\n return !(\"@id\" in formValue);\n
+ \ },\n async getFormValue() {\n var _a3, _b;\n const value = this.value;\n
+ \ if (this.resource && !((_b = (_a3 = this.resource).isContainer) == null
+ ? void 0 : _b.call(_a3))) {\n for (const predicate of Object.keys(this.value))
+ {\n const object2 = await this.resource.getList(predicate);\n if
+ ((object2 == null ? void 0 : object2[\"@id\"]) && !value[predicate][\"@id\"])\n
+ \ value[predicate][\"@id\"] = object2[\"@id\"];\n if (object2
+ && !object2[\"@id\"] && Array.isArray(object2) && value[predicate].length
+ === 0 && object2.length > 0) {\n value[predicate] = object2;\n }\n
+ \ }\n }\n return transformArrayToContainer(value);\n },\n getWidget(field,
+ isSet2 = false) {\n let tagName = \"\";\n const widgetAttribute = this.element.getAttribute(`widget-${field}`);\n
+ \ if (!widgetAttribute && this.element.hasAttribute(`upload-url-${field}`))
+ {\n tagName = \"solid-form-file\";\n } else if (!widgetAttribute &&
+ (this.element.hasAttribute(`range-${field}`) || this.element.hasAttribute(`enum-${field}`)))
+ {\n tagName = \"solid-form-dropdown\";\n } else {\n tagName =
+ widgetAttribute || (!isSet2 ? this.defaultWidget : this.defaultSetWidget);\n
+ \ }\n return this.widgetFromTagName(tagName);\n },\n change(resource)
+ {\n this.element.dispatchEvent(\n new CustomEvent(\"formChange\",
+ {\n bubbles: true,\n detail: { resource }\n })\n );\n
+ \ },\n async save() {\n this.toggleLoaderHidden(false);\n this.hideError();\n
+ \ const resource = await this.getFormValue();\n resource[\"@context\"]
+ = this.context;\n let saved;\n try {\n if (this.partial == null)
+ {\n saved = resource[\"@id\"] ? await store.put(resource, this.resourceId)
+ : await store.post(resource, this.resourceId);\n } else {\n saved
+ = await store.patch(resource, this.resourceId);\n }\n } catch (e2)
+ {\n this.toggleLoaderHidden(true);\n if (e2 == null ? void 0 : e2.json)
+ {\n e2.json().then((error2) => this.showError(error2));\n throw
+ e2;\n }\n }\n this.element.dispatchEvent(\n new CustomEvent(\"save\",
+ {\n bubbles: true,\n detail: {\n resource,\n id:
+ saved || null\n }\n })\n );\n this.toggleLoaderHidden(true);\n
+ \ return saved;\n },\n async submitForm() {\n let id;\n try {\n
+ \ id = await this.save() || this.getFormValue()[\"@id\"];\n } catch
+ (_e) {\n return;\n }\n this.reset();\n this.goToNext({ \"@id\":
+ id });\n },\n async onInput() {\n const formValue = await this.getFormValue();\n
+ \ this.change(formValue);\n },\n async onChange() {\n const formValue
+ = await this.getFormValue();\n if (!this.isCreationForm(formValue) && this.isSavingAutomatically)\n
+ \ this.submitForm();\n },\n displayErrorMessage(errors2, errorFullName
+ = \"\") {\n for (const member of errors2) {\n const errorNextName
+ = Object.values(member)[0];\n const subErrorName = errorFullName ===
+ \"\" ? errorNextName : `${errorFullName}.${errorNextName}`;\n let errorFieldName
+ = \"\";\n if (errorFullName) errorFieldName = `${errorFullName}.${errorNextName}`;\n
+ \ else errorFieldName = errorNextName;\n if (errorFieldName) {\n
+ \ const formField = this.element.querySelector(\n `[name=\"${errorFieldName}\"]`\n
+ \ );\n if (formField) {\n formField.classList.add(\"error\");\n
+ \ const errorParagraph = document.createElement(\"p\");\n if
+ (Array.isArray(Object.values(member)[1]) === true) {\n for (const
+ error2 of Object.values(member)[1]) {\n const errorText = document.createElement(\"p\");\n
+ \ errorText.textContent = error2;\n errorParagraph.appendChild(errorText);\n
+ \ }\n } else if (typeof Object.values(member)[1] === \"object\")
+ {\n for (const value of Object.values(Object.values(member)[1]))
+ {\n if (Array.isArray(value)) {\n for (const error2
+ of value) {\n const errorText = document.createElement(\"p\");\n
+ \ errorText.textContent = error2;\n errorParagraph.appendChild(errorText);\n
+ \ }\n } else if (typeof value === \"string\") {\n
+ \ const errorText = document.createElement(\"p\");\n errorText.textContent
+ = value;\n errorParagraph.appendChild(errorText);\n }\n
+ \ }\n } else {\n errorParagraph.textContent
+ = Object.values(member)[1];\n }\n errorParagraph.classList.add(\"error-message\");\n
+ \ formField.appendChild(errorParagraph);\n }\n }\n if
+ (!Array.isArray(Object.values(member)[1]) === true) {\n const objectErrors
+ = Object.values(member)[1];\n const subErrors = Object.entries(objectErrors);\n
+ \ this.displayErrorMessage(subErrors, subErrorName);\n }\n }\n
+ \ },\n empty() {\n },\n showError(e2) {\n const errors2 = Object.entries(e2).filter(\n
+ \ (field) => !field[0].startsWith(\"@context\")\n );\n this.displayErrorMessage(errors2);\n
+ \ const errorTemplate = x`${this.t(\"solid-form.validation-error\")}
`;\n
+ \ const parentElement = this.element.querySelector(\"[data-id=error]\");\n
+ \ if (parentElement) B(errorTemplate, parentElement);\n },\n hideError()
+ {\n const formErrors = this.element.querySelectorAll(\".error-message\");\n
+ \ if (formErrors) for (const error2 of formErrors) error2.remove();\n const
+ errorFields = this.element.querySelectorAll(\".error\");\n if (errorFields)\n
+ \ for (const errorField of errorFields)\n errorField.classList.remove(\"error\");\n
+ \ const parentElement = this.element.querySelector(\"[data-id=error]\");\n
+ \ if (parentElement) B(\"\", parentElement);\n },\n reset() {\n if
+ (!this.isNaked) this.element.querySelector(\"form\").reset();\n },\n onSubmit(event)
+ {\n if (!this.isNaked) {\n event.preventDefault();\n this.performAction();\n
+ \ }\n },\n validateModal() {\n return this.submitForm();\n },\n onReset()
+ {\n if (!this.isNaked) setTimeout(() => this.onInput());\n },\n getSubmitTemplate()
+ {\n return x`\n \n ${this.submitWidget
+ === \"button\" ? x``
+ : x``}\n
+ \
\n `;\n },\n populate: trackRenderAsync(async function()
+ {\n this.element.oninput = () => this.onInput();\n this.element.onchange
+ = () => this.onChange();\n const fields = await this.getFields();\n const
+ widgetTemplates = await Promise.all(\n fields.map((field) => this.createWidgetTemplate(field))\n
+ \ );\n const template = x`\n \n ${!this.isNaked
+ ? x`\n \n ` : x`${widgetTemplates}`}\n
+ \ ${this.getModalDialog()}\n `;\n B(template, this.element);\n
+ \ }, \"SolidForm:populate\")\n};\nSib.register(SolidForm);\nconst SolidLang
+ = {\n name: \"solid-lang\",\n use: [],\n attributes: {\n lang: {\n type:
+ String,\n default: null\n },\n dataLabel: {\n type: String,\n
+ \ default: null\n }\n },\n created() {\n this.render();\n },\n
+ \ languageLoader() {\n store.selectLanguage(this.lang);\n location.reload();\n
+ \ },\n render() {\n const template = x``;\n
+ \ B(template, this.element);\n }\n};\nSib.register(SolidLang);\nconst SolidMemberAdd
+ = {\n name: \"solid-member-add\",\n use: [NextMixin, ValidationMixin, ContextMixin,
+ StoreMixin],\n attributes: {\n // The list of users to load\n rangeUsers:
+ {\n type: String,\n default: null,\n callback: function(newValue,
+ oldValue) {\n if (newValue !== oldValue) this.planRender();\n }\n
+ \ },\n addMemberLabel: {\n type: String,\n default: \"Add a
+ member\",\n callback: function(newValue, oldValue) {\n if (newValue
+ !== oldValue) this.planRender();\n }\n },\n classSubmitButton:
+ {\n type: String,\n default: void 0\n },\n orderAsc: {\n type:
+ String,\n default: void 0\n }\n },\n initialState: {\n renderPlanned:
+ false\n },\n created() {\n newWidgetFactory(\"solid-form-dropdown-autocompletion\");\n
+ \ this.planRender();\n },\n planRender() {\n if (!this.renderPlanned)
+ {\n this.renderPlanned = true;\n setTimeout(() => {\n this.updateDOM();\n
+ \ this.renderPlanned = false;\n });\n }\n },\n addMember(e2)
+ {\n if (!this.dataSrc || !this.resourceId) return;\n e2.preventDefault();\n
+ \ this.performAction();\n },\n async addMembership() {\n this.currentMembers.push(JSON.parse(this.dataTargetSrc));\n
+ \ const currentRes = {\n \"@context\": this.context,\n user_set:
+ this.currentMembers\n };\n return store.patch(currentRes, this.resourceId).then((response)
+ => {\n if (!response) {\n console.warn(\n `Error while
+ adding user ${this.dataTargetSrc} to group ${this.resourceId}`\n );\n
+ \ return;\n }\n this.goToNext(null);\n const eventData
+ = {\n detail: { resource: { \"@id\": this.dataSrc } },\n bubbles:
+ true\n };\n this.element.dispatchEvent(new CustomEvent(\"save\",
+ eventData));\n this.element.dispatchEvent(new CustomEvent(\"memberAdded\",
+ eventData));\n this.planRender();\n });\n },\n validateModal() {\n
+ \ return this.addMembership();\n },\n changeSelectedUser(e2) {\n var
+ _a3;\n if (!e2.target || !e2.target.firstElementChild) return;\n this.dataTargetSrc
+ = (_a3 = e2.target.firstElementChild) == null ? void 0 : _a3.value;\n },\n
+ \ async populate() {\n if (!this.resource) return;\n const memberPredicate
+ = store.getExpandedPredicate(\n \"user_set\",\n normalizeContext(base_context)\n
+ \ );\n if (!memberPredicate) return;\n this.currentMembers = await
+ this.resource[memberPredicate];\n if (!Array.isArray(this.currentMembers))
+ {\n this.currentMembers = [this.currentMembers];\n }\n this.currentMembers
+ = this.currentMembers.map((member) => {\n return { \"@id\": member[\"@id\"]
+ };\n });\n const button = x`\n \n \n\n ${this.getModalDialog()}\n \n
+ \ `;\n B(button, this.element);\n }\n};\nSib.register(SolidMemberAdd);\nconst
+ SolidMemberDelete = {\n name: \"solid-member-delete\",\n use: [NextMixin,
+ ValidationMixin, ContextMixin],\n attributes: {\n // Data Source being
+ a group URI in that case\n dataSrc: {\n type: String,\n default:
+ null,\n callback: function() {\n this.resourceId = this.dataSrc;\n
+ \ }\n },\n dataLabel: {\n type: String,\n default: null,\n
+ \ callback: function(newValue, oldValue) {\n if (newValue !== oldValue)
+ this.planRender();\n }\n },\n // The user id to remove from the
+ group\n dataTargetSrc: {\n type: String,\n default: null,\n callback:
+ function(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.planRender();\n
+ \ }\n }\n },\n dataUnknownMember: {\n type: String,\n
+ \ default: \"Given user is not a member of this group\",\n callback:
+ function(newValue, oldValue) {\n if (newValue !== oldValue) this.planRender();\n
+ \ }\n },\n classSubmitButton: {\n type: String,\n default:
+ void 0\n }\n },\n initialState: {\n renderPlanned: false\n },\n created()
+ {\n this.planRender();\n },\n async populate() {\n if (!this.resourceId)
+ return;\n this.resource = await store.getData(this.resourceId);\n if
+ (!this.resource) return;\n const memberPredicate = store.getExpandedPredicate(\n
+ \ \"user_set\",\n normalizeContext(base_context)\n );\n if
+ (!memberPredicate) return;\n this.currentMembers = await this.resource[memberPredicate];\n
+ \ if (!Array.isArray(this.currentMembers)) {\n this.currentMembers
+ = [this.currentMembers];\n }\n this.currentMembers = this.currentMembers.map((member)
+ => {\n return { \"@id\": member[\"@id\"] };\n });\n this.isMember
+ = this.currentMembers ? this.currentMembers.some((member) => member[\"@id\"]
+ === this.dataTargetSrc) : false;\n },\n planRender() {\n if (!this.renderPlanned)
+ {\n this.renderPlanned = true;\n setTimeout(() => {\n this.render();\n
+ \ this.renderPlanned = false;\n });\n }\n },\n removeMember(e2)
+ {\n e2.stopPropagation();\n if (!this.dataSrc) return;\n this.performAction();\n
+ \ },\n async deleteMembership() {\n const userSet = this.currentMembers.filter((value)
+ => {\n const userId = value[\"@id\"];\n if (userId === this.dataTargetSrc)
+ return false;\n return true;\n });\n const currentRes = {\n \"@context\":
+ this.context,\n user_set: userSet\n };\n return store.patch(currentRes,
+ this.dataSrc).then((response) => {\n if (!response) {\n console.warn(\n
+ \ `Error while removing user ${this.dataTargetSrc} from group ${this.dataSrc}`\n
+ \ );\n return;\n }\n this.goToNext(null);\n const
+ eventData = {\n detail: { resource: { \"@id\": this.dataSrc } },\n
+ \ bubbles: true\n };\n this.element.dispatchEvent(new CustomEvent(\"save\",
+ eventData));\n this.element.dispatchEvent(new CustomEvent(\"memberRemoved\",
+ eventData));\n this.planRender();\n });\n },\n validateModal() {\n
+ \ return this.deleteMembership();\n },\n update() {\n this.render();\n
+ \ },\n render: trackRenderAsync(async function() {\n await this.populate();\n
+ \ let button = x``;\n if (this.isMember) {\n button = x`\n \n \n ${this.getModalDialog()}\n \n
+ \ `;\n } else {\n button = x`${this.dataUnknownMember
+ || this.t(\"solid-member-unknown.span\")}`;\n }\n B(button, this.element);\n
+ \ }, \"SolidMemberDelete:render\")\n};\nSib.register(SolidMemberDelete);\nconst
+ SolidMembership = {\n name: \"solid-membership\",\n use: [NextMixin, ValidationMixin,
+ ContextMixin],\n attributes: {\n dataSrc: {\n type: String,\n default:
+ null,\n callback: function() {\n this.resourceId = this.dataSrc;\n
+ \ }\n },\n dataTargetSrc: {\n type: String,\n default:
+ null\n },\n dataLeaveLabel: {\n type: String,\n default: null,\n
+ \ callback: function(newValue, oldValue) {\n if (newValue !== oldValue)
+ this.planRender();\n }\n },\n dataJoinLabel: {\n type: String,\n
+ \ default: null,\n callback: function(newValue, oldValue) {\n if
+ (newValue !== oldValue) this.planRender();\n }\n },\n classSubmitButton:
+ {\n type: String,\n default: void 0\n }\n },\n initialState:
+ {\n renderPlanned: false\n },\n created() {\n this.planRender();\n
+ \ },\n async populate() {\n if (!store.session) return;\n const currentUserSession
+ = await store.session;\n if (!currentUserSession) return;\n if (!this.dataTargetSrc)
+ this.userId = await currentUserSession.webId;\n else this.userId = this.dataTargetSrc;\n
+ \ if (!this.userId) return;\n this.resource = await store.getData(this.resourceId);\n
+ \ if (!this.resource) return;\n const memberPredicate = store.getExpandedPredicate(\n
+ \ \"user_set\",\n normalizeContext(base_context)\n );\n if
+ (!memberPredicate) return;\n this.currentMembers = await this.resource[memberPredicate];\n
+ \ if (!Array.isArray(this.currentMembers)) {\n this.currentMembers
+ = [this.currentMembers];\n }\n this.currentMembers = this.currentMembers.map((member)
+ => {\n return { \"@id\": member[\"@id\"] };\n });\n this.isMember
+ = this.currentMembers ? this.currentMembers.some((member) => member[\"@id\"]
+ === this.userId) : false;\n },\n planRender() {\n if (!this.renderPlanned)
+ {\n this.renderPlanned = true;\n setTimeout(() => {\n this.render();\n
+ \ this.renderPlanned = false;\n });\n }\n },\n changeMembership(e2)
+ {\n e2.stopPropagation();\n if (!this.dataSrc) return;\n this.performAction();\n
+ \ },\n async joinGroup() {\n this.currentMembers.push({ \"@id\": this.userId
+ });\n const currentRes = {\n \"@context\": this.context,\n user_set:
+ this.currentMembers\n };\n return store.patch(currentRes, this.dataSrc).then((response)
+ => {\n if (!response) {\n console.warn(\n `Error while
+ joining group ${this.dataSrc} for user ${this.userId}`\n );\n return;\n
+ \ }\n this.goToNext(null);\n const eventData = {\n detail:
+ { resource: { \"@id\": this.dataSrc } },\n bubbles: true\n };\n
+ \ this.element.dispatchEvent(new CustomEvent(\"save\", eventData));\n
+ \ this.element.dispatchEvent(new CustomEvent(\"memberAdded\", eventData));\n
+ \ this.planRender();\n });\n },\n async leaveGroup() {\n const
+ userSet = this.currentMembers.filter((value) => {\n const userId = value[\"@id\"];\n
+ \ if (userId === this.userId) return false;\n return true;\n });\n
+ \ const currentRes = {\n \"@context\": this.context,\n user_set:
+ userSet\n };\n return store.patch(currentRes, this.dataSrc).then((response)
+ => {\n if (!response) {\n console.warn(\n `Error while
+ leaving group ${this.dataSrc} for user ${this.userId}`\n );\n return;\n
+ \ }\n this.goToNext(null);\n const eventData = {\n detail:
+ { resource: { \"@id\": this.dataSrc } },\n bubbles: true\n };\n
+ \ this.element.dispatchEvent(new CustomEvent(\"save\", eventData));\n
+ \ this.element.dispatchEvent(new CustomEvent(\"memberRemoved\", eventData));\n
+ \ this.planRender();\n });\n },\n switchMembership() {\n if (this.isMember)
+ {\n return this.leaveGroup();\n }\n return this.joinGroup();\n
+ \ },\n validateModal() {\n return this.switchMembership();\n },\n update()
+ {\n this.render();\n },\n render: trackRenderAsync(async function() {\n
+ \ await this.populate();\n let button = x``;\n if (this.isMember)
+ {\n button = x`\n \n \n
+ \ ${this.getModalDialog()}\n \n `;\n
+ \ } else {\n button = x`\n \n \n
+ \ ${this.getModalDialog()}\n \n `;\n
+ \ }\n B(button, this.element);\n }, \"SolidMembership:render\")\n};\nSib.register(SolidMembership);\n/**\n
+ * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n
+ */\nconst i$1 = (o2) => null === o2 || \"object\" != typeof o2 && \"function\"
+ != typeof o2, f$1 = (o2) => void 0 === o2.strings;\n/**\n * @license\n * Copyright
+ 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst s$1
+ = (i3, t2) => {\n var _a3;\n const e2 = i3._$AN;\n if (void 0 === e2) return
+ false;\n for (const i4 of e2) (_a3 = i4._$AO) == null ? void 0 : _a3.call(i4,
+ t2, false), s$1(i4, t2);\n return true;\n}, o = (i3) => {\n let t2, e2;\n
+ \ do {\n if (void 0 === (t2 = i3._$AM)) break;\n e2 = t2._$AN, e2.delete(i3),
+ i3 = t2;\n } while (0 === (e2 == null ? void 0 : e2.size));\n}, r2 = (i3)
+ => {\n for (let t2; t2 = i3._$AM; i3 = t2) {\n let e2 = t2._$AN;\n if
+ (void 0 === e2) t2._$AN = e2 = /* @__PURE__ */ new Set();\n else if (e2.has(i3))
+ break;\n e2.add(i3), c$1(t2);\n }\n};\nfunction h$1(i3) {\n void 0 !==
+ this._$AN ? (o(this), this._$AM = i3, r2(this)) : this._$AM = i3;\n}\nfunction
+ n$1(i3, t2 = false, e2 = 0) {\n const r3 = this._$AH, h2 = this._$AN;\n if
+ (void 0 !== h2 && 0 !== h2.size) if (t2) if (Array.isArray(r3)) for (let i4
+ = e2; i4 < r3.length; i4++) s$1(r3[i4], false), o(r3[i4]);\n else null !=
+ r3 && (s$1(r3, false), o(r3));\n else s$1(this, i3);\n}\nconst c$1 = (i3)
+ => {\n i3.type == t.CHILD && (i3._$AP ?? (i3._$AP = n$1), i3._$AQ ?? (i3._$AQ
+ = h$1));\n};\nclass f extends i$2 {\n constructor() {\n super(...arguments),
+ this._$AN = void 0;\n }\n _$AT(i3, t2, e2) {\n super._$AT(i3, t2, e2),
+ r2(this), this.isConnected = i3._$AU;\n }\n _$AO(i3, t2 = true) {\n var
+ _a3, _b;\n i3 !== this.isConnected && (this.isConnected = i3, i3 ? (_a3
+ = this.reconnected) == null ? void 0 : _a3.call(this) : (_b = this.disconnected)
+ == null ? void 0 : _b.call(this)), t2 && (s$1(this, i3), o(this));\n }\n
+ \ setValue(t2) {\n if (f$1(this._$Ct)) this._$Ct._$AI(t2, this);\n else
+ {\n const i3 = [...this._$Ct._$AH];\n i3[this._$Ci] = t2, this._$Ct._$AI(i3,
+ this, 0);\n }\n }\n disconnected() {\n }\n reconnected() {\n }\n}\n/**\n
+ * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n
+ */\nclass s {\n constructor(t2) {\n this.Y = t2;\n }\n disconnect()
+ {\n this.Y = void 0;\n }\n reconnect(t2) {\n this.Y = t2;\n }\n deref()
+ {\n return this.Y;\n }\n}\nclass i2 {\n constructor() {\n this.Z =
+ void 0, this.q = void 0;\n }\n get() {\n return this.Z;\n }\n pause()
+ {\n this.Z ?? (this.Z = new Promise((t2) => this.q = t2));\n }\n resume()
+ {\n var _a3;\n (_a3 = this.q) == null ? void 0 : _a3.call(this), this.Z
+ = this.q = void 0;\n }\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n
+ * SPDX-License-Identifier: BSD-3-Clause\n */\nconst n2 = (t2) => !i$1(t2)
+ && \"function\" == typeof t2.then, h = 1073741823;\nclass c extends f {\n
+ \ constructor() {\n super(...arguments), this._$Cwt = h, this._$Cbt = [],
+ this._$CK = new s(this), this._$CX = new i2();\n }\n render(...s2) {\n return
+ s2.find((t2) => !n2(t2)) ?? T;\n }\n update(s2, i3) {\n const e2 = this._$Cbt;\n
+ \ let r3 = e2.length;\n this._$Cbt = i3;\n const o2 = this._$CK, c2
+ = this._$CX;\n this.isConnected || this.disconnected();\n for (let t2
+ = 0; t2 < i3.length && !(t2 > this._$Cwt); t2++) {\n const s3 = i3[t2];\n
+ \ if (!n2(s3)) return this._$Cwt = t2, s3;\n t2 < r3 && s3 === e2[t2]
+ || (this._$Cwt = h, r3 = 0, Promise.resolve(s3).then(async (t3) => {\n for
+ (; c2.get(); ) await c2.get();\n const i4 = o2.deref();\n if
+ (void 0 !== i4) {\n const e3 = i4._$Cbt.indexOf(s3);\n e3
+ > -1 && e3 < i4._$Cwt && (i4._$Cwt = e3, i4.setValue(t3));\n }\n }));\n
+ \ }\n return T;\n }\n disconnected() {\n this._$CK.disconnect(),
+ this._$CX.pause();\n }\n reconnected() {\n this._$CK.reconnect(this),
+ this._$CX.resume();\n }\n}\nconst m = e$1(c);\nconst SolidTable = {\n name:
+ \"solid-table\",\n use: [\n WidgetMixin,\n ListMixin,\n StoreMixin,\n
+ \ PaginateMixin,\n GrouperMixin,\n CounterMixin,\n HighlighterMixin,\n
+ \ FilterMixin,\n SorterMixin,\n RequiredMixin,\n FederationMixin\n
+ \ ],\n attributes: {\n defaultWidget: {\n type: String,\n default:
+ \"solid-display-value\"\n },\n selectable: {\n type: String,\n
+ \ default: null\n },\n header: {\n type: String,\n default:
+ null\n }\n },\n initialState: {\n resources: []\n },\n get parentElement()
+ {\n return \"table\";\n },\n get defaultMultipleWidget() {\n return
+ \"solid-multiple\";\n },\n get defaultSetWidget() {\n return \"solid-set-default\";\n
+ \ },\n get selectedLines() {\n if (this.selectable === null) return [];\n
+ \ return Array.from(\n this.element.querySelectorAll(\"input[data-selection]:checked\")\n
+ \ ).map((e2) => {\n var _a3;\n return (_a3 = e2 == null ? void
+ 0 : e2.closest(\"[data-resource]\")) == null ? void 0 : _a3.getAttribute(\"data-resource\");\n
+ \ });\n },\n /**\n * Select all lines\n * @param e - event\n */\n
+ \ selectAll(e2) {\n if (this.selectable === null) return;\n for (const
+ checkbox of Array.from(\n this.element.querySelectorAll(\n \"input[data-selection]\"\n
+ \ )\n )) {\n checkbox.checked = e2.target.checked;\n }\n },\n
+ \ /**\n * Unselect all lines\n */\n unselectAll() {\n if (this.selectable
+ === null) return;\n for (const checkbox of Array.from(\n this.element.querySelectorAll(\n
+ \ \"input[data-selection]\"\n )\n )) {\n checkbox.checked
+ = false;\n }\n },\n /**\n * Select specific lines\n * @param lines
+ - array of selected lines\n */\n selectLines(lines) {\n if (this.selectable
+ === null || lines.length === 0) return;\n for (const line of lines) {\n
+ \ const checkbox = this.element.querySelector(\n `[data-resource=\"${line}\"]
+ input[data-selection]`\n );\n if (checkbox) checkbox.checked = true;\n
+ \ }\n },\n /**\n * Create a widget for the field or a form if it's editable\n
+ \ * @param field\n * @param resource\n */\n createCellWidget(field,
+ resource) {\n if (!this.element.hasAttribute(`editable-${field}`))\n return
+ this.createWidgetTemplate(field, resource, true);\n const attributes =
+ {};\n const formWidgetAttributes = [\n // attributes to give to the
+ form widget\n \"range\",\n \"enum\",\n \"placeholder\",\n \"required\",\n
+ \ \"autocomplete\",\n \"option-label\",\n \"option-value\",\n
+ \ \"min\",\n \"max\",\n \"pattern\",\n \"title\",\n \"widget\"\n
+ \ ];\n for (const attr of formWidgetAttributes)\n this.addToAttributes(`${attr}-${field}`,
+ `${attr}-${field}`, attributes);\n const formAttributes = [\n // attributes
+ to give to the form\n \"class\",\n \"submit-button\",\n \"next\"\n
+ \ ];\n for (const attr of formAttributes)\n this.addToAttributes(`${attr}-${field}`,
+ attr, attributes);\n return x`\n \n `;\n },\n /**\n * Creates a header line for
+ the table\n * @param fields\n */\n getHeader(fields) {\n const template
+ = x`\n \n ${this.selectable !== null ? x` | ` : \"\"}\n ${fields.map((field)
+ => x`${this.element.hasAttribute(`label-${field}`) ? this.element.getAttribute(`label-${field}`)
+ : field} | `)}\n
\n `;\n return template;\n },\n /**\n
+ \ * Returns template of a child element (resource)\n * @param resourceId\n
+ \ * @param attributes\n */\n async getChildTemplate(resourceId, fields)
+ {\n const resource = await store.getData(resourceId, this.context);\n const
+ template = x`\n \n ${this.selectable
+ !== null ? x` | ` : \"\"}\n
+ \ ${fields.map((field) => x`${m(this.createCellWidget(field, resource))} | `)}\n
+ \
\n `;\n return template;\n },\n /**\n * Creates and render
+ the content of a single element (resource)\n * @param parent\n */\n async
+ appendSingleElt(parent) {\n const fields = await this.getFields();\n const
+ template = x`${this.header !== null ? this.getHeader(fields) : \"\"}${m(this.getChildTemplate(this.resource[\"@id\"],
+ fields))}`;\n B(template, parent);\n },\n /**\n * @override listMixin
+ method to use litHtml\n *\n * Render resources from a container\n *
+ @param resources\n * @param listPostProcessors\n * @param div\n * @param
+ context\n */\n renderDOM: trackRenderAsync(async function(resources, listPostProcessors,
+ div, context) {\n const selectedLines = [...this.selectedLines];\n const
+ fields = await this.getFields();\n const childTemplates = await Promise.all(\n
+ \ resources.map((r3) => r3 ? this.getChildTemplate(r3[\"@id\"], fields)
+ : null)\n );\n const template = x`${this.header !== null ? this.getHeader(fields)
+ : \"\"}${childTemplates}`;\n B(template, div);\n this.unselectAll();\n
+ \ this.selectLines(selectedLines);\n const nextProcessor = listPostProcessors.shift();\n
+ \ if (nextProcessor)\n await nextProcessor(resources, listPostProcessors,
+ div, context);\n }, \"SolidTable:renderDom\")\n};\nSib.register(SolidTable);\nconst
+ SolidWidget = {\n name: \"solid-widget\",\n use: [],\n attributes: {\n
+ \ name: {\n type: String,\n default: \"\",\n required: true\n
+ \ }\n },\n attached() {\n if (!this.name) return;\n const template
+ = this.template;\n const newWidget = {\n name: this.name,\n class:
+ this.template,\n use: [BaseWidgetMixin, StoreMixin, FormMixin, ActionMixin],\n
+ \ attributes: {\n label: {\n type: String,\n default:
+ \"\",\n callback: function(newValue) {\n this.addToAttributes(newValue,
+ \"label\");\n }\n }\n },\n get template() {\n return
+ () => this.evalTemplate(template).then(\n (tpl) => x`${o$1(tpl)}`\n
+ \ );\n },\n evalTemplate(template2) {\n const tpl =
+ evalTemplateString(template2, {\n name: this.name,\n value:
+ this.value || this.resource || \"\",\n src: this.src,\n label:
+ this.label,\n targetSrc: this.targetSrc || \"\"\n });\n return
+ tpl;\n },\n async templateToDOM(template2) {\n B(await template2,
+ this.element);\n },\n // For form widgets, handle nested solid-form\n
+ \ // TODO: type custom elements\n getValueFromElement(element) {\n
+ \ if (element.tagName === \"SOLID-FORM\") return element.component.value;\n
+ \ if (element.component) return element.component.getValue();\n return
+ element.value;\n },\n updateDOM() {\n this.planRender();\n
+ \ }\n };\n Sib.register(newWidget);\n },\n get template() {\n
+ \ return this.element.querySelector(\"template:not([data-range])\").innerHTML;\n
+ \ },\n get childTemplate() {\n const child = this.element.querySelector(\"template[data-range]\");\n
+ \ return child ? child.innerHTML : null;\n }\n};\nSib.register(SolidWidget);\nconst
+ index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n
+ \ __proto__: null,\n AltMixin,\n EditableMixin,\n FilterRangeFormMixin,\n
+ \ FormCheckboxMixin,\n FormCheckboxesMixin,\n FormDropdownMixin,\n FormFileMixin,\n
+ \ FormLengthMixin,\n FormMinMaxMixin,\n FormMixin,\n FormNumberMixin,\n
+ \ FormRadioMixin,\n FormStepMixin,\n LinkTextMixin,\n MultipleFormMixin,\n
+ \ MultipleselectFormMixin,\n PatternMixin,\n RangeMixin,\n SetMixin,\n
+ \ ValueRichtextMixin\n}, Symbol.toStringTag, { value: \"Module\" }));\nclass
+ SolidTemplateElement extends HTMLElement {\n constructor() {\n super();\n
+ \ __publicField(this, \"renderPlanned\", false);\n __publicField(this,
+ \"strings\", {});\n __publicField(this, \"translationsPath\", null);\n
+ \ __publicField(this, \"translationsFetched\", false);\n __publicField(this,
+ \"props\", {});\n this.initProps();\n }\n static get observedAttributes()
+ {\n return Object.values(SolidTemplateElement.propsDefinition);\n }\n
+ \ static get propsDefinition() {\n return {};\n }\n initProps() {\n this.props
+ = {};\n for (const key in this.constructor.propsDefinition) {\n this.props[key]
+ = void 0;\n }\n }\n updateProps() {\n const declaredAttributes = [];\n
+ \ for (const key in this.constructor.propsDefinition) {\n const def
+ = this.constructor.propsDefinition[key];\n if (typeof def === \"string\")
+ {\n this.props[key] = this.hasAttribute(def) ? this.getAttribute(def)
+ : void 0;\n declaredAttributes.push(def);\n } else if (typeof
+ def === \"object\" && def.attribute && typeof def.attribute === \"string\")
+ {\n this.props[key] = this.hasAttribute(def.attribute) ? this.getAttribute(def.attribute)
+ : def.default || void 0;\n declaredAttributes.push(def.attribute);\n
+ \ }\n }\n for (const attr of this.attributes) {\n if (!declaredAttributes.includes(attr.name))
+ {\n this.props[this._camelize(attr.name)] = attr.value || void 0;\n
+ \ }\n }\n }\n /**\n * Define the path folder of translations files\n
+ \ * @param path\n */\n setTranslationsPath(path) {\n this.translationsPath
+ = path;\n }\n /**\n * Fetch all localized strings\n */\n async fetchLocaleStrings()
+ {\n if (this.translationsFetched) return;\n const filesToFetch = [];\n
+ \ if (this.translationsPath)\n filesToFetch.push(this.fetchTranslationFile(this.translationsPath));\n
+ \ const extraTranslationsPath = this.getAttribute(\"extra-translations-path\");\n
+ \ if (extraTranslationsPath)\n filesToFetch.push(this.fetchTranslationFile(extraTranslationsPath));\n
+ \ return Promise.all(filesToFetch).then((res) => {\n this.translationsFetched
+ = true;\n this.strings = Object.assign({}, ...res);\n });\n }\n /**\n
+ \ * Fetch the translation file from [path]\n */\n async fetchTranslationFile(path)
+ {\n const ln = this.getLocale();\n const fullPath = `${path}/${ln}.json`;\n
+ \ return fetch(fullPath).then((result) => {\n if (result.ok) {\n return
+ result.json().catch(\n () => console.error(\n `Error while
+ parsing the translation file: ${fullPath}`\n )\n );\n }\n
+ \ }).catch(\n () => console.error(\n `Error while retrieving
+ the translation file: ${fullPath}`\n )\n );\n }\n /**\n * Returns
+ current locale of app\n */\n getLocale() {\n return localStorage.getItem(\"language\")
+ || window.navigator.language.slice(0, 2);\n }\n /**\n * Return localized
+ string for [key]\n * @param key\n */\n localize(key) {\n return this.strings[key]
+ || key;\n }\n attributeChangedCallback() {\n this.updateProps();\n this.planRender();\n
+ \ }\n connectedCallback() {\n this.updateProps();\n this.planRender();\n
+ \ }\n /**\n * Plan a render if none is already waiting to prevent multi
+ re-renders\n */\n planRender() {\n if (!this.renderPlanned) {\n this.renderPlanned
+ = true;\n setTimeout(() => {\n this.render();\n this.renderPlanned
+ = false;\n });\n }\n }\n renderCallback() {\n }\n render() {\n
+ \ this.fetchLocaleStrings().finally(() => {\n this.innerHTML = this.template(this.props);\n
+ \ this.renderCallback();\n });\n }\n template() {\n return \"\";\n
+ \ }\n _camelize(str) {\n return str.replace(/\\W+(.)/g, (_match, chr)
+ => chr.toUpperCase());\n }\n}\nclass BaseWidget extends HTMLElement {\n constructor()
+ {\n super(...arguments);\n __publicField(this, \"src\");\n __publicField(this,
+ \"multiple\");\n __publicField(this, \"editable\");\n __publicField(this,
+ \"required\");\n __publicField(this, \"resourceId\");\n __publicField(this,
+ \"_value\");\n __publicField(this, \"_range\");\n __publicField(this,
+ \"_context\");\n __publicField(this, \"_subscriptions\", /* @__PURE__ */
+ new Map());\n }\n connectedCallback() {\n this.render();\n }\n disconnectedCallback()
+ {\n for (const subscription of this._subscriptions.values()) {\n PubSub.unsubscribe(subscription);\n
+ \ }\n }\n async render() {\n var _a3;\n this.innerHTML = await evalTemplateString(this.template,
+ {\n src: this.src,\n name: this.name,\n label: this.label,\n
+ \ placeholder: this.placeholder,\n value: this.value,\n id:
+ ((_a3 = this._value) == null ? void 0 : _a3[\"@id\"]) || \"\",\n escapedValue:
+ this.escapedValue,\n range: await this.htmlRange,\n multiple: this.multiple,\n
+ \ editable: this.editable === \"\",\n required: this.required ===
+ \"\"\n });\n this.addEditButtons();\n this.initChangeEvents();\n
+ \ }\n get label() {\n return this.hasAttribute(\"label\") ? this.getAttribute(\"label\")
+ : this.name;\n }\n set label(label) {\n if (label != null) this.setAttribute(\"label\",
+ label);\n this.render();\n }\n get placeholder() {\n return this.hasAttribute(\"placeholder\")
+ ? this.getAttribute(\"placeholder\") : this.label;\n }\n set placeholder(placeholder)
+ {\n if (placeholder != null) this.setAttribute(\"placeholder\", placeholder);\n
+ \ this.render();\n }\n get name() {\n return this.getAttribute(\"name\");\n
+ \ }\n set name(name) {\n if (name) this.setAttribute(\"name\", name);\n
+ \ this.render();\n }\n get value() {\n if (this.dataHolder) {\n const
+ values = this.dataHolder.map((element) => {\n if (element instanceof
+ HTMLInputElement && element.type === \"checkbox\")\n return element.checked;\n
+ \ return this.getValueHolder(element).value;\n });\n return
+ values.length === 1 ? values[0] : values;\n }\n return this._value ||
+ \"\";\n }\n set value(value) {\n this._value = value;\n if (this._value
+ == null) return;\n if (this.dataHolder && this.dataHolder.length === 1)
+ {\n const element = this.getValueHolder(this.dataHolder[0]);\n if
+ (element.type === \"checkbox\") {\n element.checked = value;\n }
+ else {\n element.value = value;\n }\n if (element.dispatchEvent)
+ element.dispatchEvent(new Event(\"change\"));\n } else if (this.dataHolder
+ && this.dataHolder.length > 1) {\n this.dataHolder.forEach((el, index2)
+ => {\n const element = this.getValueHolder(el);\n if (element.type
+ === \"checkbox\") {\n element.checked = value ? value[index2] : \"\";\n
+ \ } else {\n element.value = value ? value[index2] : \"\";\n
+ \ }\n element.dispatchEvent(new Event(\"change\"));\n });\n
+ \ }\n this.render();\n }\n get \"each-label\"() {\n return this.getAttribute(\"each-label\")
+ || \"\";\n }\n set \"each-label\"(label) {\n this.setAttribute(\"each-label\",
+ label);\n }\n set \"add-label\"(label) {\n this.setAttribute(\"add-label\",
+ label);\n }\n set \"remove-label\"(label) {\n this.setAttribute(\"remove-label\",
+ label);\n }\n get dataHolder() {\n const widgetDataHolders = Array.from(\n
+ \ this.querySelectorAll(\"[data-holder]\")\n ).filter((element) =>
+ {\n const dataHolderAncestor = element.parentElement ? element.parentElement.closest(\"[data-holder]\")
+ : null;\n return dataHolderAncestor === this || !dataHolderAncestor ||
+ !this.contains(dataHolderAncestor);\n });\n return widgetDataHolders.length
+ > 0 ? widgetDataHolders : null;\n }\n get template() {\n return \"\";\n
+ \ }\n get childTemplate() {\n return \"\";\n }\n get escapedValue()
+ {\n return `${this.value}`.replace(/&/g, \"&\").replace(/'/g, \"'\").replace(/\"/g,
+ \""\");\n }\n set context(value) {\n this._context = value;\n }\n
+ \ get context() {\n return this._context || {};\n }\n get range() {\n
+ \ return this.fetchSources(this._range);\n }\n set range(range) {\n (async
+ () => {\n this._listen(range, async () => {\n this._range = await
+ store.getData(range, this.context);\n });\n this._range = await
+ store.getData(range, this.context);\n this.render();\n })();\n }\n
+ \ async fetchSources(resource) {\n var _a3;\n const data = resource[\"listPredicate\"];\n
+ \ if (!data) return null;\n const resources = [];\n let index2 = 0;\n
+ \ for (let res of data) {\n if (!res) {\n try {\n const
+ resourceId = data[index2][\"@id\"];\n res = await store.getData(resourceId,
+ this.context);\n } catch {\n continue;\n }\n }\n
+ \ if ((_a3 = res.isContainer) == null ? void 0 : _a3.call(res)) {\n const
+ resourcesFromContainer = await store.getData(\n res[\"@id\"],\n this.context\n
+ \ );\n this._listen(res[\"@id\"]);\n if (resourcesFromContainer)
+ {\n resources.push(...resourcesFromContainer[\"listPredicate\"]);\n
+ \ }\n } else {\n resources.push(res);\n }\n index2++;\n
+ \ }\n return resources;\n }\n async htmlRange() {\n var _a3, _b;\n
+ \ let htmlRange = \"\";\n const rangeResources = await this.range;\n
+ \ if (!rangeResources) return;\n for await (let element of rangeResources)
+ {\n element = await store.getData(element[\"@id\"], this.context);\n
+ \ this._listen(element[\"@id\"]);\n let selected;\n if ((_b
+ = (_a3 = this._value) == null ? void 0 : _a3.isContainer) == null ? void 0
+ : _b.call(_a3)) {\n selected = false;\n for await (const value
+ of this._value[\"listPredicate\"]) {\n if (value[\"@id\"] === element[\"@id\"])
+ {\n selected = true;\n break;\n }\n }\n
+ \ } else {\n selected = this._value ? this._value[\"@id\"] ===
+ element[\"@id\"] : false;\n }\n htmlRange += await evalTemplateString(this.childTemplate,
+ {\n name: await element.name,\n id: element[\"@id\"],\n selected\n
+ \ });\n }\n return htmlRange || \"\";\n }\n getValueHolder(element)
+ {\n return element.component ? element.component : element;\n }\n subscribe(event)
+ {\n this._listen(event);\n }\n _listen(id, callback = () => {\n }) {\n
+ \ if (!this._subscriptions.get(id)) {\n this._subscriptions.set(\n
+ \ id,\n PubSub.subscribe(id, async () => {\n await callback();\n
+ \ this.render();\n })\n );\n }\n }\n // Editable
+ widgets\n addEditButtons() {\n const editableField = this.querySelector(\"[data-editable]\");\n
+ \ if (editableField) {\n const editButton = document.createElement(\"button\");\n
+ \ editButton.innerText = \"Modifier\";\n editButton.onclick = ()
+ => this.activateEditableField(editableField, editButton);\n editableField.insertAdjacentElement(\"afterend\",
+ editButton);\n editableField.addEventListener(\n \"focusout\",\n
+ \ () => this.save(editableField, editButton)\n );\n }\n }\n
+ \ activateEditableField(editableField, editButton) {\n editableField.setAttribute(\"contenteditable\",
+ \"true\");\n editableField.focus();\n editButton.setAttribute(\"disabled\",
+ \"disabled\");\n }\n /**\n * Dispatch change events of data holders from
+ the current widget\n */\n initChangeEvents() {\n if (this.dataHolder)
+ {\n const event = new Event(\"change\", { bubbles: true });\n for
+ (const element of this.dataHolder) {\n element.addEventListener(\"change\",
+ (e2) => {\n e2.preventDefault();\n e2.stopPropagation();\n
+ \ this.dispatchEvent(event);\n });\n }\n }\n }\n save(editableField,
+ editButton) {\n editableField.setAttribute(\"contenteditable\", \"false\");\n
+ \ editButton.removeAttribute(\"disabled\");\n if (!this.name) return;\n
+ \ const resource = {};\n resource[this.name] = editableField.innerText;\n
+ \ resource[\"@context\"] = this.context;\n if (this.resourceId && resource)
+ store.patch(resource, this.resourceId);\n }\n}\nconst widgetFactory = (tagName,
+ customTemplate, childTemplate = \"\", callback) => {\n const registered =
+ customElements.get(tagName);\n if (registered) return registered;\n const
+ cls = class extends BaseWidget {\n async render() {\n await super.render();\n
+ \ if (callback) callback(this);\n }\n get template() {\n return
+ customTemplate;\n }\n get childTemplate() {\n return childTemplate;\n
+ \ }\n };\n defineComponent(tagName, cls);\n return cls;\n};\nexport {\n
+ \ index$4 as AttributeMixins,\n BaseWidgetMixin,\n index$3 as CallbackMixins,\n
+ \ CounterMixin,\n FederationMixin,\n FilterMixin,\n GrouperMixin,\n k
+ as Helpers,\n HighlighterMixin,\n ListMixin,\n NextMixin,\n PaginateMixin,\n
+ \ RequiredMixin,\n Sib,\n SolidAcChecker,\n SolidDelete,\n SolidDisplay,\n
+ \ SolidForm,\n SolidFormSearch,\n SolidLang,\n SolidMemberAdd,\n SolidMemberDelete,\n
+ \ SolidMembership,\n SolidTable,\n SolidTemplateElement,\n SolidWidget,\n
+ \ SorterMixin,\n StoreMixin,\n index$2 as TemplateAdditionMixins,\n index$1
+ as Templates,\n index as TemplatesDependenciesMixins,\n TranslationMixin,\n
+ \ ValidationMixin,\n WidgetMixin,\n base_context as baseContext,\n x as
+ html,\n o$2 as ifDefined,\n newWidgetFactory,\n B as render,\n store,\n
+ \ o$1 as unsafeHTML,\n m as until,\n widgetFactory\n};\n"
+ recorded_at: Tue, 29 Jul 2025 06:27:13 GMT
+- request:
+ method: get
+ uri: https://cdn.jsdelivr.net/npm/@startinblox/core@latest/dist/helpers-4GFJ8HI8.js
+ body:
+ encoding: UTF-8
+ string: ''
+ headers:
+ Connection:
+ - close
+ Origin:
+ - http://127.0.0.1:34777
+ Sec-Ch-Ua-Platform:
+ - '"Linux"'
+ User-Agent:
+ - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0
+ Safari/537.36
+ Sec-Ch-Ua:
+ - '"Not)A;Brand";v="8", "Chromium";v="138"'
+ Sec-Ch-Ua-Mobile:
+ - "?0"
+ Accept:
+ - "*/*"
+ Sec-Fetch-Site:
+ - cross-site
+ Sec-Fetch-Mode:
+ - cors
+ Sec-Fetch-Dest:
+ - script
+ Referer:
+ - https://cdn.jsdelivr.net/npm/@startinblox/core@latest/dist/index.js
+ Accept-Encoding:
+ - ''
+ Accept-Language:
+ - en-US,en;q=0.9
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Connection:
+ - close
+ Content-Length:
+ - '89667'
+ Access-Control-Allow-Origin:
+ - "*"
+ Access-Control-Expose-Headers:
+ - "*"
+ Timing-Allow-Origin:
+ - "*"
+ Cache-Control:
+ - public, max-age=604800, s-maxage=43200
+ Cross-Origin-Resource-Policy:
+ - cross-origin
+ X-Content-Type-Options:
+ - nosniff
+ Strict-Transport-Security:
+ - max-age=31536000; includeSubDomains; preload
+ Content-Type:
+ - application/javascript; charset=utf-8
+ X-Jsd-Version:
+ - 2.0.0
+ X-Jsd-Version-Type:
+ - version
+ Etag:
+ - W/"15e43-WgeU3/rOTachL5EAwu/6EzDk130"
+ Accept-Ranges:
+ - bytes
+ Date:
+ - Tue, 29 Jul 2025 06:27:14 GMT
+ Age:
+ - '9554'
+ X-Served-By:
+ - cache-fra-etou8220177-FRA, cache-mel11274-MEL
+ X-Cache:
+ - HIT, HIT
+ Vary:
+ - Accept-Encoding
+ Alt-Svc:
+ - h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
+ body:
+ encoding: UTF-8
+ string: |
+ var __defProp = Object.defineProperty;
+ var __typeError = (msg) => {
+ throw TypeError(msg);
+ };
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
+ var _values, _resolve, _AsyncIterableBuilder_instances, createIterable_fn, next_fn, nextPromise_fn;
+ var jsonldContextParser = {};
+ var ContextParser = {};
+ var relativeToAbsoluteIri = {};
+ var Resolve = {};
+ var hasRequiredResolve;
+ function requireResolve() {
+ if (hasRequiredResolve) return Resolve;
+ hasRequiredResolve = 1;
+ Object.defineProperty(Resolve, "__esModule", { value: true });
+ Resolve.removeDotSegmentsOfPath = Resolve.removeDotSegments = Resolve.resolve = void 0;
+ function resolve(relativeIRI, baseIRI) {
+ baseIRI = baseIRI || "";
+ const baseFragmentPos = baseIRI.indexOf("#");
+ if (baseFragmentPos > 0) {
+ baseIRI = baseIRI.substr(0, baseFragmentPos);
+ }
+ if (!relativeIRI.length) {
+ if (baseIRI.indexOf(":") < 0) {
+ throw new Error(`Found invalid baseIRI '${baseIRI}' for value '${relativeIRI}'`);
+ }
+ return baseIRI;
+ }
+ if (relativeIRI.startsWith("?")) {
+ const baseQueryPos = baseIRI.indexOf("?");
+ if (baseQueryPos > 0) {
+ baseIRI = baseIRI.substr(0, baseQueryPos);
+ }
+ return baseIRI + relativeIRI;
+ }
+ if (relativeIRI.startsWith("#")) {
+ return baseIRI + relativeIRI;
+ }
+ if (!baseIRI.length) {
+ const relativeColonPos = relativeIRI.indexOf(":");
+ if (relativeColonPos < 0) {
+ throw new Error(`Found invalid relative IRI '${relativeIRI}' for a missing baseIRI`);
+ }
+ return removeDotSegmentsOfPath(relativeIRI, relativeColonPos);
+ }
+ const valueColonPos = relativeIRI.indexOf(":");
+ if (valueColonPos >= 0) {
+ return removeDotSegmentsOfPath(relativeIRI, valueColonPos);
+ }
+ const baseColonPos = baseIRI.indexOf(":");
+ if (baseColonPos < 0) {
+ throw new Error(`Found invalid baseIRI '${baseIRI}' for value '${relativeIRI}'`);
+ }
+ const baseIRIScheme = baseIRI.substr(0, baseColonPos + 1);
+ if (relativeIRI.indexOf("//") === 0) {
+ return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);
+ }
+ let baseSlashAfterColonPos;
+ if (baseIRI.indexOf("//", baseColonPos) === baseColonPos + 1) {
+ baseSlashAfterColonPos = baseIRI.indexOf("/", baseColonPos + 3);
+ if (baseSlashAfterColonPos < 0) {
+ if (baseIRI.length > baseColonPos + 3) {
+ return baseIRI + "/" + removeDotSegmentsOfPath(relativeIRI, valueColonPos);
+ } else {
+ return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);
+ }
+ }
+ } else {
+ baseSlashAfterColonPos = baseIRI.indexOf("/", baseColonPos + 1);
+ if (baseSlashAfterColonPos < 0) {
+ return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);
+ }
+ }
+ if (relativeIRI.indexOf("/") === 0) {
+ return baseIRI.substr(0, baseSlashAfterColonPos) + removeDotSegments(relativeIRI);
+ }
+ let baseIRIPath = baseIRI.substr(baseSlashAfterColonPos);
+ const baseIRILastSlashPos = baseIRIPath.lastIndexOf("/");
+ if (baseIRILastSlashPos >= 0 && baseIRILastSlashPos < baseIRIPath.length - 1) {
+ baseIRIPath = baseIRIPath.substr(0, baseIRILastSlashPos + 1);
+ if (relativeIRI[0] === "." && relativeIRI[1] !== "." && relativeIRI[1] !== "/" && relativeIRI[2]) {
+ relativeIRI = relativeIRI.substr(1);
+ }
+ }
+ relativeIRI = baseIRIPath + relativeIRI;
+ relativeIRI = removeDotSegments(relativeIRI);
+ return baseIRI.substr(0, baseSlashAfterColonPos) + relativeIRI;
+ }
+ Resolve.resolve = resolve;
+ function removeDotSegments(path) {
+ const segmentBuffers = [];
+ let i = 0;
+ while (i < path.length) {
+ switch (path[i]) {
+ case "/":
+ if (path[i + 1] === ".") {
+ if (path[i + 2] === ".") {
+ if (!isCharacterAllowedAfterRelativePathSegment(path[i + 3])) {
+ segmentBuffers.push([]);
+ i++;
+ break;
+ }
+ segmentBuffers.pop();
+ if (!path[i + 3]) {
+ segmentBuffers.push([]);
+ }
+ i += 3;
+ } else {
+ if (!isCharacterAllowedAfterRelativePathSegment(path[i + 2])) {
+ segmentBuffers.push([]);
+ i++;
+ break;
+ }
+ if (!path[i + 2]) {
+ segmentBuffers.push([]);
+ }
+ i += 2;
+ }
+ } else {
+ segmentBuffers.push([]);
+ i++;
+ }
+ break;
+ case "#":
+ case "?":
+ if (!segmentBuffers.length) {
+ segmentBuffers.push([]);
+ }
+ segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
+ i = path.length;
+ break;
+ default:
+ if (!segmentBuffers.length) {
+ segmentBuffers.push([]);
+ }
+ segmentBuffers[segmentBuffers.length - 1].push(path[i]);
+ i++;
+ break;
+ }
+ }
+ return "/" + segmentBuffers.map((buffer) => buffer.join("")).join("/");
+ }
+ Resolve.removeDotSegments = removeDotSegments;
+ function removeDotSegmentsOfPath(iri, colonPosition) {
+ let searchOffset = colonPosition + 1;
+ if (colonPosition >= 0) {
+ if (iri[colonPosition + 1] === "/" && iri[colonPosition + 2] === "/") {
+ searchOffset = colonPosition + 3;
+ }
+ } else {
+ if (iri[0] === "/" && iri[1] === "/") {
+ searchOffset = 2;
+ }
+ }
+ const pathSeparator = iri.indexOf("/", searchOffset);
+ if (pathSeparator < 0) {
+ return iri;
+ }
+ const base = iri.substr(0, pathSeparator);
+ const path = iri.substr(pathSeparator);
+ return base + removeDotSegments(path);
+ }
+ Resolve.removeDotSegmentsOfPath = removeDotSegmentsOfPath;
+ function isCharacterAllowedAfterRelativePathSegment(character) {
+ return !character || character === "#" || character === "?" || character === "/";
+ }
+ return Resolve;
+ }
+ var hasRequiredRelativeToAbsoluteIri;
+ function requireRelativeToAbsoluteIri() {
+ if (hasRequiredRelativeToAbsoluteIri) return relativeToAbsoluteIri;
+ hasRequiredRelativeToAbsoluteIri = 1;
+ (function(exports) {
+ var __createBinding = relativeToAbsoluteIri && relativeToAbsoluteIri.__createBinding || (Object.create ? function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m[k];
+ } });
+ } : function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ o[k2] = m[k];
+ });
+ var __exportStar = relativeToAbsoluteIri && relativeToAbsoluteIri.__exportStar || function(m, exports2) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ __exportStar(requireResolve(), exports);
+ })(relativeToAbsoluteIri);
+ return relativeToAbsoluteIri;
+ }
+ var ErrorCoded = {};
+ var hasRequiredErrorCoded;
+ function requireErrorCoded() {
+ if (hasRequiredErrorCoded) return ErrorCoded;
+ hasRequiredErrorCoded = 1;
+ (function(exports) {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ERROR_CODES = exports.ErrorCoded = void 0;
+ class ErrorCoded2 extends Error {
+ /* istanbul ignore next */
+ constructor(message, code) {
+ super(message);
+ this.code = code;
+ }
+ }
+ exports.ErrorCoded = ErrorCoded2;
+ (function(ERROR_CODES) {
+ ERROR_CODES["COLLIDING_KEYWORDS"] = "colliding keywords";
+ ERROR_CODES["CONFLICTING_INDEXES"] = "conflicting indexes";
+ ERROR_CODES["CYCLIC_IRI_MAPPING"] = "cyclic IRI mapping";
+ ERROR_CODES["INVALID_ID_VALUE"] = "invalid @id value";
+ ERROR_CODES["INVALID_INDEX_VALUE"] = "invalid @index value";
+ ERROR_CODES["INVALID_NEST_VALUE"] = "invalid @nest value";
+ ERROR_CODES["INVALID_PREFIX_VALUE"] = "invalid @prefix value";
+ ERROR_CODES["INVALID_PROPAGATE_VALUE"] = "invalid @propagate value";
+ ERROR_CODES["INVALID_REVERSE_VALUE"] = "invalid @reverse value";
+ ERROR_CODES["INVALID_IMPORT_VALUE"] = "invalid @import value";
+ ERROR_CODES["INVALID_VERSION_VALUE"] = "invalid @version value";
+ ERROR_CODES["INVALID_BASE_IRI"] = "invalid base IRI";
+ ERROR_CODES["INVALID_CONTAINER_MAPPING"] = "invalid container mapping";
+ ERROR_CODES["INVALID_CONTEXT_ENTRY"] = "invalid context entry";
+ ERROR_CODES["INVALID_CONTEXT_NULLIFICATION"] = "invalid context nullification";
+ ERROR_CODES["INVALID_DEFAULT_LANGUAGE"] = "invalid default language";
+ ERROR_CODES["INVALID_INCLUDED_VALUE"] = "invalid @included value";
+ ERROR_CODES["INVALID_IRI_MAPPING"] = "invalid IRI mapping";
+ ERROR_CODES["INVALID_JSON_LITERAL"] = "invalid JSON literal";
+ ERROR_CODES["INVALID_KEYWORD_ALIAS"] = "invalid keyword alias";
+ ERROR_CODES["INVALID_LANGUAGE_MAP_VALUE"] = "invalid language map value";
+ ERROR_CODES["INVALID_LANGUAGE_MAPPING"] = "invalid language mapping";
+ ERROR_CODES["INVALID_LANGUAGE_TAGGED_STRING"] = "invalid language-tagged string";
+ ERROR_CODES["INVALID_LANGUAGE_TAGGED_VALUE"] = "invalid language-tagged value";
+ ERROR_CODES["INVALID_LOCAL_CONTEXT"] = "invalid local context";
+ ERROR_CODES["INVALID_REMOTE_CONTEXT"] = "invalid remote context";
+ ERROR_CODES["INVALID_REVERSE_PROPERTY"] = "invalid reverse property";
+ ERROR_CODES["INVALID_REVERSE_PROPERTY_MAP"] = "invalid reverse property map";
+ ERROR_CODES["INVALID_REVERSE_PROPERTY_VALUE"] = "invalid reverse property value";
+ ERROR_CODES["INVALID_SCOPED_CONTEXT"] = "invalid scoped context";
+ ERROR_CODES["INVALID_SCRIPT_ELEMENT"] = "invalid script element";
+ ERROR_CODES["INVALID_SET_OR_LIST_OBJECT"] = "invalid set or list object";
+ ERROR_CODES["INVALID_TERM_DEFINITION"] = "invalid term definition";
+ ERROR_CODES["INVALID_TYPE_MAPPING"] = "invalid type mapping";
+ ERROR_CODES["INVALID_TYPE_VALUE"] = "invalid type value";
+ ERROR_CODES["INVALID_TYPED_VALUE"] = "invalid typed value";
+ ERROR_CODES["INVALID_VALUE_OBJECT"] = "invalid value object";
+ ERROR_CODES["INVALID_VALUE_OBJECT_VALUE"] = "invalid value object value";
+ ERROR_CODES["INVALID_VOCAB_MAPPING"] = "invalid vocab mapping";
+ ERROR_CODES["IRI_CONFUSED_WITH_PREFIX"] = "IRI confused with prefix";
+ ERROR_CODES["KEYWORD_REDEFINITION"] = "keyword redefinition";
+ ERROR_CODES["LOADING_DOCUMENT_FAILED"] = "loading document failed";
+ ERROR_CODES["LOADING_REMOTE_CONTEXT_FAILED"] = "loading remote context failed";
+ ERROR_CODES["MULTIPLE_CONTEXT_LINK_HEADERS"] = "multiple context link headers";
+ ERROR_CODES["PROCESSING_MODE_CONFLICT"] = "processing mode conflict";
+ ERROR_CODES["PROTECTED_TERM_REDEFINITION"] = "protected term redefinition";
+ ERROR_CODES["CONTEXT_OVERFLOW"] = "context overflow";
+ ERROR_CODES["INVALID_BASE_DIRECTION"] = "invalid base direction";
+ ERROR_CODES["RECURSIVE_CONTEXT_INCLUSION"] = "recursive context inclusion";
+ ERROR_CODES["INVALID_STREAMING_KEY_ORDER"] = "invalid streaming key order";
+ ERROR_CODES["INVALID_EMBEDDED_NODE"] = "invalid embedded node";
+ ERROR_CODES["INVALID_ANNOTATION"] = "invalid annotation";
+ })(exports.ERROR_CODES || (exports.ERROR_CODES = {}));
+ })(ErrorCoded);
+ return ErrorCoded;
+ }
+ var FetchDocumentLoader = {};
+ var link;
+ var hasRequiredLink;
+ function requireLink() {
+ if (hasRequiredLink) return link;
+ hasRequiredLink = 1;
+ var COMPATIBLE_ENCODING_PATTERN = /^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i;
+ var WS_TRIM_PATTERN = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
+ var WS_CHAR_PATTERN = /\s|\uFEFF|\xA0/;
+ var WS_FOLD_PATTERN = /\r?\n[\x20\x09]+/g;
+ var DELIMITER_PATTERN = /[;,"]/;
+ var WS_DELIMITER_PATTERN = /[;,"]|\s/;
+ var TOKEN_PATTERN = /^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;
+ var STATE = {
+ IDLE: 1 << 0,
+ URI: 1 << 1,
+ ATTR: 1 << 2
+ };
+ function trim(value) {
+ return value.replace(WS_TRIM_PATTERN, "");
+ }
+ function hasWhitespace(value) {
+ return WS_CHAR_PATTERN.test(value);
+ }
+ function skipWhitespace(value, offset) {
+ while (hasWhitespace(value[offset])) {
+ offset++;
+ }
+ return offset;
+ }
+ function needsQuotes(value) {
+ return WS_DELIMITER_PATTERN.test(value) || !TOKEN_PATTERN.test(value);
+ }
+ function shallowCompareObjects(object1, object2) {
+ return Object.keys(object1).length === Object.keys(object2).length && Object.keys(object1).every(
+ (key) => key in object2 && object1[key] === object2[key]
+ );
+ }
+ class Link {
+ /**
+ * Link
+ * @constructor
+ * @param {String} [value]
+ * @returns {Link}
+ */
+ constructor(value) {
+ this.refs = [];
+ if (value) {
+ this.parse(value);
+ }
+ }
+ /**
+ * Get refs with given relation type
+ * @param {String} value
+ * @returns {Array