diff options
Diffstat (limited to 'school/node_modules/string-strip-html')
23 files changed, 8133 insertions, 0 deletions
diff --git a/school/node_modules/string-strip-html/CHANGELOG.md b/school/node_modules/string-strip-html/CHANGELOG.md new file mode 100644 index 0000000..97efa36 --- /dev/null +++ b/school/node_modules/string-strip-html/CHANGELOG.md @@ -0,0 +1,274 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## 8.3.0 (2021-05-24) + +### Bug Fixes + +- skip jinja-nunjucks tags to run faster ([307a578](https://github.com/codsen/codsen/commit/307a5784278b94f4287cf8306f7c19f40e68ca43)) + +### Features + +- config file based major bump blacklisting ([e15f9bb](https://github.com/codsen/codsen/commit/e15f9bba1c4fd5f847ac28b3f38fa6ee633f5dca)) + +## 8.2.12 (2021-04-11) + +### Reverts + +- Revert "chore: setup refresh" ([23cf206](https://github.com/codsen/codsen/commit/23cf206970a087ff0fa04e61f94d919f59ab3881)) + +## 8.2.0 (2021-02-07) + +### Features + +- better recognition for Rails or Phoenix templating tags ([9aeddc3](https://github.com/codsen/codsen/commit/9aeddc3e47d7e488b6c63f205df3f7a05c78c017)), closes [#2](https://github.com/codsen/codsen/issues/2) + +## 8.1.0 (2021-01-28) + +### Features + +- extend ESP tag recognition to all <%... tags ([d552f86](https://github.com/codsen/codsen/commit/d552f86f98d7e2d9743e709dd088ea2ba8d011dc)) + +## 8.0.1 (2021-01-28) + +### Bug Fixes + +- add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29)) + +## 8.0.0 (2021-01-23) + +### Features + +- rewrite in TS, start using named exports ([e6fe544](https://github.com/codsen/codsen/commit/e6fe544cb94727b18793d0e13303ee3b407cde1b)) + +### BREAKING CHANGES + +- previously you'd consume like: `import stripHtml from ...` - now: `import { stripHtml } from ...` + +## 7.0.0 (2020-11-28) + +Accidental version bump during migration to sourcehut. Sorry about that. + +## 6.3.0 (2020-11-10) + +### Features + +- algorithm improvements ([5c2a45f](https://gitlab.com/codsen/codsen/commit/5c2a45f176cbb3ff200668ab2357571ccec4ba09)) + +## 6.2.0 (2020-10-26) + +### Features + +- better recognise some JSON patterns ([450d30a](https://gitlab.com/codsen/codsen/commit/450d30a9a662ab9097da9661c515979ae35651a7)) + +## 6.1.0 (2020-10-13) + +### Bug Fixes + +- fix filteredTagLocations closing location on paired tags ([43ce393](https://gitlab.com/codsen/codsen/commit/43ce393391f81dcc8de4e3de70e463356f4d0af5)) + +### Features + +- wildcard ALL option for `opts.stripTogetherWithTheirContents` ([d2031ab](https://gitlab.com/codsen/codsen/commit/d2031ab11260a24f436cef64ca5d8d43b9ae10e1)) + +## 6.0.0 (2020-09-15) + +### Bug Fixes + +- correct `filteredTagLocations` for pair tags which are stripped with content ([6bd6f4c](https://gitlab.com/codsen/codsen/commit/6bd6f4c8639571089bb3baa3b8146045ca891375)) + +### BREAKING CHANGES + +- now filteredTagLocations shows only one range for pair tags which are to be + stripped with their contents + +## 5.0.0 (2020-08-16) + +Why change what's returned, upon user's request, when we can return everything and let the user pick? + +### BREAKING CHANGES + +That's why we removed `opts.returnRangesOnly`. + +Function's output is a plain object now, containing: + +1. cleaned string (considering `opts.ignoreTags` and `opts.onlyStripTags`) +2. gathered _ranges_, used to produce cleaned string (considering `opts.ignoreTags` and `opts.onlyStripTags`) +3. tag locations of all spotted HTML tags IGNORING the whitelist/blacklist `opts.ignoreTags` and `opts.onlyStripTags` +4. locations of filtered HTML tags (considering `opts.ignoreTags` and `opts.onlyStripTags`) +5. plus, some statistics goodies + +```js +stripHtml("abc<a>click me</a>def"); +// => { +// log: { +// timeTakenInMilliseconds: 6 +// }, +// result: "abc click me def", +// ranges: [ +// [3, 6, " "], +// [14, 18, " "], +// ], +// allTagLocations: [ +// [3, 6], +// [14, 18], +// ], +// filteredTagLocations: [ +// [3, 6], +// [14, 18], +// ], +// } +``` + +`allTagLocations` can be used for syntax highlighting, for example. + +**Migration instructions:** + +Previously, function on defaults returned result string. Now it's under `result` key, in output plain object. +Previously, you could request _ranges_ output via `opts.returnRangesOnly`. Now _ranges_ are always present under key `ranges`. + +Some people mistakenly took _ranges_ output for exact tag locations. Now exact tag locations are under `allTagLocations` key. + +That's different from _ranges_ output, because _ranges_ are instructions: what to add, what to replace and can be merged and their character indexes covered will include whitespace management. + +`allTagLocations`, on other hand, are exact tag locations. If you slice them using `String.slice()` you'll get string from bracket-to-bracket like `<a>`. + +## 4.4.0 (2020-04-26) + +### Features + +- harden the linting rules and make them all pass ([812d17e](https://gitlab.com/codsen/codsen/commit/812d17e02f2d2e1d45e05e94c64ef28a4b3eb017)) + +## 4.3.0 (2019-09-23) + +### Features + +- respect double line breaks ([2c09d59](https://gitlab.com/codsen/codsen/commit/2c09d59)), closes [#15](https://gitlab.com/codsen/codsen/issues/15) + +## 4.2.0 (2019-09-04) + +### Features + +- add previously missing tag.lastClosingBracketAt on ignored tags ([f35e595](https://gitlab.com/codsen/codsen/commit/f35e595)) +- make the callback (opts.cb) ping the ignored tags too ([d9302e7](https://gitlab.com/codsen/codsen/commit/d9302e7)) +- report tag.slashPresent as index of the slash, not as a boolean ([96ce6c8](https://gitlab.com/codsen/codsen/commit/96ce6c8)) + +## 4.1.0 (2019-08-24) + +### Features + +- implement callback interface, opts.cb() ([79bc8dc](https://gitlab.com/codsen/codsen/commit/79bc8dc)) + +## 3.5.0 (2019-01-20) + +- ✨ Various documentation and setup tweaks after we migrated to monorepo +- ✨ Setup refresh: updated dependencies and all config files using automated tools + +## 3.3.0 (2018-12-26) + +### Bug Fixes + +- 🐛 Throwing case when tag is the last in string and has closing bracket missing ([ef44f63](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/ef44f63)) + +### Features + +- ✨ Algorithm improvements ([8a82b8e](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/8a82b8e)) +- ✨ Delete trailing whitespace after dirty code chunk: tag + missing opening bracket tag ([71f720c](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/71f720c)) +- ✨ Improvements to exclamation mark punctuation ([e31fd3b](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/e31fd3b)) +- ✨ `opts.dumpLinkHrefsNearby` and algorithm improvements ([777407e](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/777407e)) +- ✨ Add `opts.onlyStripTags` ([7bb49c8](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/7bb49c8)) +- ✨ Add `opts.trimOnlySpaces` ([b8c6f29](https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html/commits/b8c6f29)) + +## 3.2.0 (2018-07-22) + +- ✨ Fixed `opts.returnRangesOnly` - when there are no HTML tags in the input and the option is on, an empty array is returned (as opposed to the input string, incorrectly returned previously). Sorry about that. + +## 3.1.0 (2018-07-17) + +- ✨ Added `opts.onlyStripTags` + +## 3.0.0 (2018-07-03) + +Breaking changes: `opts.dumpLinkHrefsNearby` was previously Boolean. Now it's a plain object and its key `enabled` (`opts.dumpLinkHrefsNearby.enabled`) does the same thing that `opts.dumpLinkHrefsNearby` did before `v3`. + +This makes it easier for us to contain all new `opts.dumpLinkHrefsNearby` settings in one place: + +```js +{ + ignoreTags: [], + stripTogetherWithTheirContents: stripTogetherWithTheirContentsDefaults, + skipHtmlDecoding: false, + returnRangesOnly: false, + trimOnlySpaces: false, + dumpLinkHrefsNearby: { // <------ CHANGED! + enabled: false, // <-------- 💥 NEW! + putOnNewLine: false, // <--- 💥 NEW! + wrapHeads: "", // <--------- 💥 NEW! + wrapTails: "" // <---------- 💥 NEW! + } +} +``` + +- ✨ Now, input string is returned trimmed of whitespace in the beginning and in the end. + +## 2.4.0 (2018-06-20) + +- ✨ Two `range-` dependencies have been renamed, namely [ranges-push](https://www.npmjs.com/package/ranges-push) and [ranges-apply](https://www.npmjs.com/package/ranges-apply). We tapped them. + +## 2.3.0 (2018-06-08) + +- ✨ Improvements to dirty code recognition algorithm + +## 2.2.0 (2018-06-02) + +- ✨ `opts.dumpLinkHrefsNearby` - handy when producing Email Text versions +- ✨ Improved algorithm to understand HTML code that has been abruptly chopped off. If you select bunch of HTML where beginning is valid, but ending is somewhere in the middle of the tags, styles or whatnot, now that tag will be removed. +- ✨ Improved algorithm to detect and clean tags without closing bracket, if a new tag follows, with or without whitespace in between. + +64 unit tests, 451 assertions, 2226 lines of unit tests at 90% line coverage. + +## 2.1.0 (2018-05-31) + +- ✨ `opts.trimOnlySpaces` - up until now, by default, the outsides of the string was trimmed using `String.trim()` which erased: + + - non-breaking spaces (in combination with recursive entity decoding this means ` ` will also be erased) + - tabs + - line breaks (`\n`), carriage returns (`\r`) and combination thereof (`\r\n`) + - some other less common but space-like characters. + + This becomes a challenge in automated environments where data is considered to be clean and multiple datum can be parts of another. For example, we might be cleaning JSON fields where value is "sandwitched" out of three fields: "Hi ", "%%-firstname-%%", ", welcome to special club!". To improve formatting, some outer spaces like after "Hi" can be replaced with a non-breaking space. This way, words would never wrap there. However, if all fields were cleaned by a tool which used this HTML stripping function, outer non-breaking spaces would get deleted and result would end up: "HiJohn, welcome to special club!". This option makes trimming more strict - only spaces deleted during string trimming. + +## 2.0.0 (2018-05-30) + +One day I noticed that my [Nunjucks](https://mozilla.github.io/nunjucks/) code (just a greater-than comparison against a number) gets falsely interpreted as HTML by this library and went on to rewrite the whole thing from scratch. Now it's leaner, cleaner and with the same and double extra more unit tests. + +### Added + +- ✨ An even smarter algorithm, now being able to detect missing opening bracket on a tag, for example. Even latest Chrome `v.66` can't do that. +- ✨ Increased unit test assertion count from 148 to 370. Covering even more legit and stinky code cases. +- ✨ `opts.returnRangesOnly` + +## 1.4.0 (2018-05-11) + +- ✨ Set up [Prettier](https://prettier.io) +- ✨ Removed `package.lock` and `.editorconfig` +- ✨ Wired Rollup to remove comments from non-dev builds. It means, we can now leave the `console.log`s in the source code — Rollup will remove from production code. +- ✨ Unit tests are pointing at ES modules build, which means that code coverage is correct now, without Babel functions being missed + +## 1.3.0 (2018-02-19) + +- ✨ Now strips HTML comments too. + +## 1.2.0 (2017-12-31) + +- ✨ Improvements to `opts.stripTogetherWithTheirContents` and done a lot of rebasing. + +## 1.1.0 (2017-12-07) + +- ✨ Add `opts.stripTogetherWithTheirContents` + +## 1.0.0 (2017-11-27) + +- ✨ First public release diff --git a/school/node_modules/string-strip-html/LICENSE b/school/node_modules/string-strip-html/LICENSE new file mode 100644 index 0000000..9ea205b --- /dev/null +++ b/school/node_modules/string-strip-html/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2010-%YEAR% Roy Revelt and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file diff --git a/school/node_modules/string-strip-html/README.md b/school/node_modules/string-strip-html/README.md new file mode 100644 index 0000000..7721e66 --- /dev/null +++ b/school/node_modules/string-strip-html/README.md @@ -0,0 +1,78 @@ +# string-strip-html + +> Strips HTML tags from strings. No parser, accepts mixed sources. + +<div class="package-badges"> + <a href="https://www.npmjs.com/package/string-strip-html" rel="nofollow noreferrer noopener"> + <img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm"> + </a> + <a href="https://codsen.com/os/string-strip-html" rel="nofollow noreferrer noopener"> + <img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com"> + </a> + <a href="https://github.com/codsen/codsen/tree/main/packages/string-strip-html" rel="nofollow noreferrer noopener"> + <img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github"> + </a> + <a href="https://npmcharts.com/compare/string-strip-html?interval=30" rel="nofollow noreferrer noopener" target="_blank"> + <img src="https://img.shields.io/npm/dm/string-strip-html.svg?style=flat-square" alt="Downloads per month"> + </a> + <a href="https://prettier.io" rel="nofollow noreferrer noopener" target="_blank"> + <img src="https://img.shields.io/badge/code_style-prettier-brightgreen.svg?style=flat-square" alt="Code style: prettier"> + </a> + <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License"> + <a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank"> + <img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto"> + </a> +</div> + +## Install + +```bash +npm i string-strip-html +``` + +## Quick Take + +```js +import { strict as assert } from "assert"; +import { stripHtml } from "string-strip-html"; + +assert.equal( + stripHtml(`Some text <b>and</b> text.`).result, + `Some text and text.` +); + +// prevents accidental string concatenation +assert.equal(stripHtml(`aaa<div>bbb</div>ccc`).result, `aaa bbb ccc`); + +// tag pairs with content, upon request +assert.equal( + stripHtml(`a <pre><code>void a;</code></pre> b`, { + stripTogetherWithTheirContents: [ + "script", // default + "style", // default + "xml", // default + "pre", // <-- custom-added + ], + }).result, + `a b` +); + +// detects raw, legit brackets: +assert.equal(stripHtml(`a < b and c > d`).result, `a < b and c > d`); +``` + +## Documentation + +Please [visit codsen.com](https://codsen.com/os/string-strip-html/) for a full description of the API and examples. + +## Contributing + +To report bugs or request features or assistance, [raise an issue](https://github.com/codsen/codsen/issues/new/choose) on GitHub. + +## Licence + +MIT License + +Copyright (c) 2010-2021 Roy Revelt and other contributors + +<img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"> diff --git a/school/node_modules/string-strip-html/dist/string-strip-html.cjs.js b/school/node_modules/string-strip-html/dist/string-strip-html.cjs.js new file mode 100644 index 0000000..0045f15 --- /dev/null +++ b/school/node_modules/string-strip-html/dist/string-strip-html.cjs.js @@ -0,0 +1,812 @@ +/** + * @name string-strip-html + * @fileoverview Strips HTML tags from strings. No parser, accepts mixed sources. + * @version 8.3.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-strip-html/} + */ + +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray'); +var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); +var _typeof = require('@babel/runtime/helpers/typeof'); +var _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); +var isObj = require('lodash.isplainobject'); +var trim = require('lodash.trim'); +var without = require('lodash.without'); +var htmlEntities = require('html-entities'); +var rangesApply = require('ranges-apply'); +var rangesPush = require('ranges-push'); +var stringLeftRight = require('string-left-right'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray); +var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread); +var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof); +var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray); +var isObj__default = /*#__PURE__*/_interopDefaultLegacy(isObj); +var trim__default = /*#__PURE__*/_interopDefaultLegacy(trim); +var without__default = /*#__PURE__*/_interopDefaultLegacy(without); + +/* istanbul ignore next */ +function characterSuitableForNames(_char) { + return /[-_A-Za-z0-9]/.test(_char); +} +/* istanbul ignore next */ +function prepHopefullyAnArray(something, name) { + if (!something) { + return []; + } + if (Array.isArray(something)) { + return something.filter(function (val) { + return typeof val === "string" && val.trim(); + }); + } + if (typeof something === "string") { + return something.trim() ? [something] : []; + } + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_03] ".concat(name, " must be array containing zero or more strings or something falsey. Currently it's equal to: ").concat(something, ", that a type of ").concat(_typeof__default['default'](something), ".")); +} +/* istanbul ignore next */ +function xBeforeYOnTheRight(str, startingIdx, x, y) { + for (var i = startingIdx, len = str.length; i < len; i++) { + if (str.startsWith(x, i)) { + return true; + } + if (str.startsWith(y, i)) { + return false; + } + } + return false; +} +/* istanbul ignore next */ +function notWithinAttrQuotes(tag, str, i) { + return !tag || !tag.quotes || !xBeforeYOnTheRight(str, i + 1, tag.quotes.value, ">"); +} + +var version$1 = "8.3.0"; + +var version = version$1; +var defaults = { + ignoreTags: [], + onlyStripTags: [], + stripTogetherWithTheirContents: ["script", "style", "xml"], + skipHtmlDecoding: false, + trimOnlySpaces: false, + dumpLinkHrefsNearby: { + enabled: false, + putOnNewLine: false, + wrapHeads: "", + wrapTails: "" + }, + cb: null +}; +function stripHtml(str, originalOpts) { + var start = Date.now(); + var definitelyTagNames = new Set(["!doctype", "abbr", "address", "area", "article", "aside", "audio", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "doctype", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "param", "picture", "pre", "progress", "rb", "rp", "rt", "rtc", "ruby", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "ul", "var", "video", "wbr", "xml"]); + var singleLetterTags = new Set(["a", "b", "i", "p", "q", "s", "u"]); + var punctuation = new Set([".", ",", "?", ";", ")", "\u2026", '"', "\xBB"]); + var rangedOpeningTags = []; + var allTagLocations = []; + var filteredTagLocations = []; + var tag = {}; + function resetTag() { + tag = { + attributes: [] + }; + } + resetTag(); + var chunkOfWhitespaceStartsAt = null; + var chunkOfSpacesStartsAt = null; + var attrObj = {}; + var hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined + }; + var stringToInsertAfter = ""; + var hrefInsertionActive = false; + var spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + function existy(x) { + return x != null; + } + function isStr(something) { + return typeof something === "string"; + } + function treatRangedTags(i, opts, rangesToDelete) { + if (Array.isArray(opts.stripTogetherWithTheirContents) && (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*"))) { + if (Array.isArray(rangedOpeningTags) && rangedOpeningTags.some(function (obj) { + return obj.name === tag.name && obj.lastClosingBracketAt < i; + })) { + var _loop = function _loop(y) { + if (rangedOpeningTags[y].name === tag.name) { + /* istanbul ignore else */ + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + filteredTagLocations = filteredTagLocations.filter(function (_ref) { + var _ref2 = _slicedToArray__default['default'](_ref, 2), + from = _ref2[0], + upto = _ref2[1]; + return (from < rangedOpeningTags[y].lastOpeningBracketAt || from >= i + 1) && (upto <= rangedOpeningTags[y].lastOpeningBracketAt || upto > i + 1); + }); + } + var endingIdx = i + 1; + if (tag.lastClosingBracketAt) { + endingIdx = tag.lastClosingBracketAt + 1; + } + filteredTagLocations.push([rangedOpeningTags[y].lastOpeningBracketAt, endingIdx]); + /* istanbul ignore else */ + if (punctuation.has(str[i]) && opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i + 1, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: [rangedOpeningTags[y].lastOpeningBracketAt, i, null] + }); + } else if (opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i, + insert: "", + rangesArr: rangesToDelete, + proposedReturn: [rangedOpeningTags[y].lastOpeningBracketAt, i, ""] + }); + } + rangedOpeningTags.splice(y, 1); + return "break"; + } + }; + for (var y = rangedOpeningTags.length; y--;) { + var _ret = _loop(y); + if (_ret === "break") break; + } + } else { + rangedOpeningTags.push(tag); + } + } + } + function calculateWhitespaceToInsert(str2, + currCharIdx, + fromIdx, + toIdx, + lastOpeningBracketAt, + lastClosingBracketAt + ) { + var strToEvaluateForLineBreaks = ""; + if (Number.isInteger(fromIdx) && fromIdx < lastOpeningBracketAt) { + strToEvaluateForLineBreaks += str2.slice(fromIdx, lastOpeningBracketAt); + } + if (Number.isInteger(toIdx) && toIdx > lastClosingBracketAt + 1) { + var temp = str2.slice(lastClosingBracketAt + 1, toIdx); + if (temp.includes("\n") && isOpeningAt(toIdx, str2)) { + strToEvaluateForLineBreaks += " "; + } else { + strToEvaluateForLineBreaks += temp; + } + } + if (!punctuation.has(str2[currCharIdx]) && str2[currCharIdx] !== "!") { + var foundLineBreaks = strToEvaluateForLineBreaks.match(/\n/g); + if (Array.isArray(foundLineBreaks) && foundLineBreaks.length) { + if (foundLineBreaks.length === 1) { + return "\n"; + } + if (foundLineBreaks.length === 2) { + return "\n\n"; + } + return "\n\n\n"; + } + return " "; + } + return ""; + } + function calculateHrefToBeInserted(opts) { + if (opts.dumpLinkHrefsNearby.enabled && hrefDump.tagName && hrefDump.tagName === tag.name && tag.lastOpeningBracketAt && (hrefDump.openingTagEnds && tag.lastOpeningBracketAt > hrefDump.openingTagEnds || !hrefDump.openingTagEnds)) { + hrefInsertionActive = true; + } + if (hrefInsertionActive) { + var lineBreaks = opts.dumpLinkHrefsNearby.putOnNewLine ? "\n\n" : ""; + stringToInsertAfter = "".concat(lineBreaks).concat(hrefDump.hrefValue).concat(lineBreaks); + } + } + function isOpeningAt(i, customStr) { + if (customStr) { + return customStr[i] === "<" && customStr[i + 1] !== "%"; + } + return str[i] === "<" && str[i + 1] !== "%"; + } + function isClosingAt(i) { + return str[i] === ">" && str[i - 1] !== "%"; + } + if (typeof str !== "string") { + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ".concat(_typeof__default['default'](str).toLowerCase(), ", equal to:\n").concat(JSON.stringify(str, null, 4))); + } + if (originalOpts && !isObj__default['default'](originalOpts)) { + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ".concat(_typeof__default['default'](originalOpts).toLowerCase(), ", equal to:\n").concat(JSON.stringify(originalOpts, null, 4))); + } + function resetHrefMarkers() { + if (hrefInsertionActive) { + hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined + }; + hrefInsertionActive = false; + } + } + var opts = _objectSpread__default['default'](_objectSpread__default['default']({}, defaults), originalOpts); + if (Object.prototype.hasOwnProperty.call(opts, "returnRangesOnly")) { + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_03] opts.returnRangesOnly has been removed from the API since v.5 release."); + } + opts.ignoreTags = prepHopefullyAnArray(opts.ignoreTags, "opts.ignoreTags"); + opts.onlyStripTags = prepHopefullyAnArray(opts.onlyStripTags, "opts.onlyStripTags"); + var onlyStripTagsMode = !!opts.onlyStripTags.length; + if (opts.onlyStripTags.length && opts.ignoreTags.length) { + opts.onlyStripTags = without__default['default'].apply(void 0, [opts.onlyStripTags].concat(_toConsumableArray__default['default'](opts.ignoreTags))); + } + if (!isObj__default['default'](opts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = _objectSpread__default['default']({}, defaults.dumpLinkHrefsNearby); + } + opts.dumpLinkHrefsNearby = defaults.dumpLinkHrefsNearby; + if (originalOpts && Object.prototype.hasOwnProperty.call(originalOpts, "dumpLinkHrefsNearby") && existy(originalOpts.dumpLinkHrefsNearby)) { + /* istanbul ignore else */ + if (isObj__default['default'](originalOpts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = _objectSpread__default['default'](_objectSpread__default['default']({}, defaults.dumpLinkHrefsNearby), originalOpts.dumpLinkHrefsNearby); + } else if (originalOpts.dumpLinkHrefsNearby) { + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_04] Optional Options Object's key dumpLinkHrefsNearby was set to ".concat(_typeof__default['default'](originalOpts.dumpLinkHrefsNearby), ", equal to ").concat(JSON.stringify(originalOpts.dumpLinkHrefsNearby, null, 4), ". The only allowed value is a plain object. See the API reference.")); + } + } + if (!opts.stripTogetherWithTheirContents) { + opts.stripTogetherWithTheirContents = []; + } else if (typeof opts.stripTogetherWithTheirContents === "string" && opts.stripTogetherWithTheirContents.length) { + opts.stripTogetherWithTheirContents = [opts.stripTogetherWithTheirContents]; + } + var somethingCaught = {}; + if (opts.stripTogetherWithTheirContents && Array.isArray(opts.stripTogetherWithTheirContents) && opts.stripTogetherWithTheirContents.length && !opts.stripTogetherWithTheirContents.every(function (el, i) { + if (!(typeof el === "string")) { + somethingCaught.el = el; + somethingCaught.i = i; + return false; + } + return true; + })) { + throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ".concat(somethingCaught.i, " has a value ").concat(somethingCaught.el, " which is not string but ").concat(_typeof__default['default'](somethingCaught.el).toLowerCase(), ".")); + } + if (!opts.cb) { + opts.cb = function (_ref3) { + var rangesArr = _ref3.rangesArr, + proposedReturn = _ref3.proposedReturn; + if (proposedReturn) { + rangesArr.push.apply(rangesArr, _toConsumableArray__default['default'](proposedReturn)); + } + }; + } + var rangesToDelete = new rangesPush.Ranges({ + limitToBeAddedWhitespace: true, + limitLinebreaksCount: 2 + }); + if (!opts.skipHtmlDecoding) { + while (str !== htmlEntities.decode(str, { + scope: "strict" + })) { + str = htmlEntities.decode(str, { + scope: "strict" + }); + } + } + var _loop2 = function _loop2(_i, len) { + if (Object.keys(tag).length > 1 && tag.lastClosingBracketAt && tag.lastClosingBracketAt < _i && str[_i] !== " " && spacesChunkWhichFollowsTheClosingBracketEndsAt === null) { + spacesChunkWhichFollowsTheClosingBracketEndsAt = _i; + } + if (str[_i] === "%" && str[_i - 1] === "{" && str.includes("%}", _i + 1)) { + _i = str.indexOf("%}", _i) - 1; + i = _i; + return "continue"; + } + if (isClosingAt(_i)) { + if ((!tag || Object.keys(tag).length < 2) && _i > 1) { + for (var y = _i; y--;) { + if (str[y - 1] === undefined || isClosingAt(y)) { + var _ret3 = function () { + var startingPoint = str[y - 1] === undefined ? y : y + 1; + var culprit = str.slice(startingPoint, _i + 1); + if (str !== "<".concat(trim__default['default'](culprit.trim(), "/>"), ">") && + _toConsumableArray__default['default'](definitelyTagNames).some(function (val) { + return trim__default['default'](culprit.trim().split(/\s+/).filter(function (val2) { + return val2.trim(); + }).filter(function (_val3, i3) { + return i3 === 0; + }), "/>").toLowerCase() === val; + }) && stripHtml("<".concat(culprit.trim(), ">"), opts).result === "") { + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([startingPoint, _i + 1]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([startingPoint, _i + 1]); + } + var whiteSpaceCompensation = calculateWhitespaceToInsert(str, _i, startingPoint, _i + 1, startingPoint, _i + 1); + var deleteUpTo = _i + 1; + if (str[deleteUpTo] && !str[deleteUpTo].trim()) { + for (var z = deleteUpTo; z < len; z++) { + if (str[z].trim()) { + deleteUpTo = z; + break; + } + } + } + opts.cb({ + tag: tag, + deleteFrom: startingPoint, + deleteTo: deleteUpTo, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [startingPoint, deleteUpTo, whiteSpaceCompensation] + }); + } + return "break"; + }(); + if (_ret3 === "break") break; + } + } + } + } + if (str[_i] === "/" && !(tag.quotes && tag.quotes.value) && Number.isInteger(tag.lastOpeningBracketAt) && !Number.isInteger(tag.lastClosingBracketAt)) { + tag.slashPresent = _i; + } + if (str[_i] === '"' || str[_i] === "'") { + if (tag.nameStarts && tag.quotes && tag.quotes.value && tag.quotes.value === str[_i]) { + attrObj.valueEnds = _i; + attrObj.value = str.slice(attrObj.valueStarts, _i); + tag.attributes.push(attrObj); + attrObj = {}; + tag.quotes = undefined; + var hrefVal; + if (opts.dumpLinkHrefsNearby.enabled && + tag.attributes.some(function (obj) { + if (obj.name && obj.name.toLowerCase() === "href") { + hrefVal = "".concat(opts.dumpLinkHrefsNearby.wrapHeads || "").concat(obj.value).concat(opts.dumpLinkHrefsNearby.wrapTails || ""); + i = _i; + return true; + } + })) { + hrefDump = { + tagName: tag.name, + hrefValue: hrefVal, + openingTagEnds: undefined + }; + } + } else if (!tag.quotes && tag.nameStarts) { + tag.quotes = {}; + tag.quotes.value = str[_i]; + tag.quotes.start = _i; + if (attrObj.nameStarts && attrObj.nameEnds && attrObj.nameEnds < _i && attrObj.nameStarts < _i && !attrObj.valueStarts) { + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } + } + if (tag.nameStarts !== undefined && tag.nameEnds === undefined && (!str[_i].trim() || !characterSuitableForNames(str[_i]))) { + tag.nameEnds = _i; + tag.name = str.slice(tag.nameStarts, tag.nameEnds + ( + /* istanbul ignore next */ + !isClosingAt(_i) && str[_i] !== "/" && str[_i + 1] === undefined ? 1 : 0)); + if ( + str[tag.nameStarts - 1] !== "!" && + !tag.name.replace(/-/g, "").length || + /^\d+$/.test(tag.name[0])) { + tag = {}; + i = _i; + return "continue"; + } + if (isOpeningAt(_i)) { + calculateHrefToBeInserted(opts); + var whiteSpaceCompensation = calculateWhitespaceToInsert(str, _i, tag.leftOuterWhitespace, _i, tag.lastOpeningBracketAt, _i); + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + /* istanbul ignore next */ + filteredTagLocations = filteredTagLocations.filter(function (_ref4) { + var _ref5 = _slicedToArray__default['default'](_ref4, 2), + from = _ref5[0], + upto = _ref5[1]; + return !(from === tag.leftOuterWhitespace && upto === _i); + }); + } + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: _i, + insert: "".concat(whiteSpaceCompensation).concat(stringToInsertAfter).concat(whiteSpaceCompensation), + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, _i, "".concat(whiteSpaceCompensation).concat(stringToInsertAfter).concat(whiteSpaceCompensation)] + }); + resetHrefMarkers(); + treatRangedTags(_i, opts, rangesToDelete); + } + } + if (tag.quotes && tag.quotes.start && tag.quotes.start < _i && !tag.quotes.end && attrObj.nameEnds && attrObj.equalsAt && !attrObj.valueStarts) { + attrObj.valueStarts = _i; + } + if (!tag.quotes && attrObj.nameEnds && str[_i] === "=" && !attrObj.valueStarts && !attrObj.equalsAt) { + attrObj.equalsAt = _i; + } + if (!tag.quotes && attrObj.nameStarts && attrObj.nameEnds && !attrObj.valueStarts && str[_i].trim() && str[_i] !== "=") { + tag.attributes.push(attrObj); + attrObj = {}; + } + if (!tag.quotes && attrObj.nameStarts && !attrObj.nameEnds) { + if (!str[_i].trim()) { + attrObj.nameEnds = _i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } else if (str[_i] === "=") { + /* istanbul ignore else */ + if (!attrObj.equalsAt) { + attrObj.nameEnds = _i; + attrObj.equalsAt = _i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } else if (str[_i] === "/" || isClosingAt(_i)) { + attrObj.nameEnds = _i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + tag.attributes.push(attrObj); + attrObj = {}; + } else if (isOpeningAt(_i)) { + attrObj.nameEnds = _i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + tag.attributes.push(attrObj); + attrObj = {}; + } + } + if (!tag.quotes && tag.nameEnds < _i && !str[_i - 1].trim() && str[_i].trim() && !"<>/!".includes(str[_i]) && !attrObj.nameStarts && !tag.lastClosingBracketAt) { + attrObj.nameStarts = _i; + } + if (tag.lastOpeningBracketAt !== null && tag.lastOpeningBracketAt < _i && str[_i] === "/" && tag.onlyPlausible) { + tag.onlyPlausible = false; + } + if (tag.lastOpeningBracketAt !== null && tag.lastOpeningBracketAt < _i && str[_i] !== "/" + ) { + if (tag.onlyPlausible === undefined) { + if ((!str[_i].trim() || isOpeningAt(_i)) && !tag.slashPresent) { + tag.onlyPlausible = true; + } else { + tag.onlyPlausible = false; + } + } + if (str[_i].trim() && tag.nameStarts === undefined && !isOpeningAt(_i) && str[_i] !== "/" && !isClosingAt(_i) && str[_i] !== "!") { + tag.nameStarts = _i; + tag.nameContainsLetters = false; + } + } + if (tag.nameStarts && !tag.quotes && str[_i].toLowerCase() !== str[_i].toUpperCase()) { + tag.nameContainsLetters = true; + } + if ( + isClosingAt(_i) && + notWithinAttrQuotes(tag, str, _i)) { + var itIsClosing = true; + if (itIsClosing && tag.lastOpeningBracketAt !== undefined) { + tag.lastClosingBracketAt = _i; + spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + if (Object.keys(attrObj).length) { + tag.attributes.push(attrObj); + attrObj = {}; + } + if (opts.dumpLinkHrefsNearby.enabled && hrefDump.tagName && !hrefDump.openingTagEnds) { + hrefDump.openingTagEnds = _i; + } + } + } + if (tag.lastOpeningBracketAt !== undefined) { + if (tag.lastClosingBracketAt === undefined) { + if (tag.lastOpeningBracketAt < _i && !isOpeningAt(_i) && ( + str[_i + 1] === undefined || isOpeningAt(_i + 1)) && tag.nameContainsLetters) { + tag.name = str.slice(tag.nameStarts, tag.nameEnds ? tag.nameEnds : _i + 1).toLowerCase(); + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, _i + 1]); + } + if ( + opts.ignoreTags.includes(tag.name) || + tag.onlyPlausible && !definitelyTagNames.has(tag.name)) { + tag = {}; + attrObj = {}; + i = _i; + return "continue"; + } + if ((definitelyTagNames.has(tag.name) || singleLetterTags.has(tag.name)) && (tag.onlyPlausible === false || tag.onlyPlausible === true && tag.attributes.length) || str[_i + 1] === undefined) { + calculateHrefToBeInserted(opts); + var _whiteSpaceCompensation = calculateWhitespaceToInsert(str, _i, tag.leftOuterWhitespace, _i + 1, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: _i + 1, + insert: "".concat(_whiteSpaceCompensation).concat(stringToInsertAfter).concat(_whiteSpaceCompensation), + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, _i + 1, "".concat(_whiteSpaceCompensation).concat(stringToInsertAfter).concat(_whiteSpaceCompensation)] + }); + resetHrefMarkers(); + treatRangedTags(_i, opts, rangesToDelete); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt && filteredTagLocations[filteredTagLocations.length - 1][1] !== _i + 1) { + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + var lastRangedOpeningTag; + for (var z = rangedOpeningTags.length; z--;) { + /* istanbul ignore else */ + if (rangedOpeningTags[z].name === tag.name) { + lastRangedOpeningTag = rangedOpeningTags[z]; + } + } + /* istanbul ignore else */ + if (lastRangedOpeningTag) { + filteredTagLocations = filteredTagLocations.filter(function (_ref6) { + var _ref7 = _slicedToArray__default['default'](_ref6, 1), + from = _ref7[0]; + return from !== lastRangedOpeningTag.lastOpeningBracketAt; + }); + filteredTagLocations.push([lastRangedOpeningTag.lastOpeningBracketAt, _i + 1]); + } else { + /* istanbul ignore next */ + filteredTagLocations.push([tag.lastOpeningBracketAt, _i + 1]); + } + } else { + filteredTagLocations.push([tag.lastOpeningBracketAt, _i + 1]); + } + } + } + } else if (_i > tag.lastClosingBracketAt && str[_i].trim() || str[_i + 1] === undefined) { + var endingRangeIndex = tag.lastClosingBracketAt === _i ? _i + 1 : _i; + if (opts.trimOnlySpaces && endingRangeIndex === len - 1 && spacesChunkWhichFollowsTheClosingBracketEndsAt !== null && spacesChunkWhichFollowsTheClosingBracketEndsAt < _i) { + endingRangeIndex = spacesChunkWhichFollowsTheClosingBracketEndsAt; + } + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1]); + } + if (!onlyStripTagsMode && opts.ignoreTags.includes(tag.name) || onlyStripTagsMode && !opts.onlyStripTags.includes(tag.name)) { + opts.cb({ + tag: tag, + deleteFrom: null, + deleteTo: null, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: null + }); + tag = {}; + attrObj = {}; + } else if (!tag.onlyPlausible || + tag.attributes.length === 0 && tag.name && (definitelyTagNames.has(tag.name.toLowerCase()) || singleLetterTags.has(tag.name.toLowerCase())) || + tag.attributes && tag.attributes.some(function (attrObj2) { + return attrObj2.equalsAt; + })) { + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1]); + } + var _whiteSpaceCompensation2 = calculateWhitespaceToInsert(str, _i, tag.leftOuterWhitespace, endingRangeIndex, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + stringToInsertAfter = ""; + hrefInsertionActive = false; + calculateHrefToBeInserted(opts); + var insert; + if (isStr(stringToInsertAfter) && stringToInsertAfter.length) { + insert = "".concat(_whiteSpaceCompensation2).concat(stringToInsertAfter).concat( + /* istanbul ignore next */ + _whiteSpaceCompensation2 === "\n\n" ? "\n" : _whiteSpaceCompensation2); + } else { + insert = _whiteSpaceCompensation2; + } + if (tag.leftOuterWhitespace === 0 || !stringLeftRight.right(str, endingRangeIndex - 1)) { + insert = ""; + } + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: endingRangeIndex, + insert: insert, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, endingRangeIndex, insert] + }); + resetHrefMarkers(); + treatRangedTags(_i, opts, rangesToDelete); + } else { + tag = {}; + } + if (!isClosingAt(_i)) { + tag = {}; + } + } + } + if (isOpeningAt(_i) && !isOpeningAt(_i - 1) && !"'\"".includes(str[_i + 1]) && (!"'\"".includes(str[_i + 2]) || /\w/.test(str[_i + 1])) && + !(str[_i + 1] === "c" && str[_i + 2] === ":") && + !(str[_i + 1] === "f" && str[_i + 2] === "m" && str[_i + 3] === "t" && str[_i + 4] === ":") && + !(str[_i + 1] === "s" && str[_i + 2] === "q" && str[_i + 3] === "l" && str[_i + 4] === ":") && + !(str[_i + 1] === "x" && str[_i + 2] === ":") && + !(str[_i + 1] === "f" && str[_i + 2] === "n" && str[_i + 3] === ":") && + notWithinAttrQuotes(tag, str, _i)) { + if (isClosingAt(stringLeftRight.right(str, _i))) { + i = _i; + return "continue"; + } else { + if (tag.nameEnds && tag.nameEnds < _i && !tag.lastClosingBracketAt) { + if (tag.onlyPlausible === true && tag.attributes && tag.attributes.length || tag.onlyPlausible === false) { + var _whiteSpaceCompensation3 = calculateWhitespaceToInsert(str, _i, tag.leftOuterWhitespace, _i, tag.lastOpeningBracketAt, _i); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: _i, + insert: _whiteSpaceCompensation3, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, _i, _whiteSpaceCompensation3] + }); + treatRangedTags(_i, opts, rangesToDelete); + tag = {}; + attrObj = {}; + } + } + if (tag.lastOpeningBracketAt !== undefined && tag.onlyPlausible && tag.name && !tag.quotes) { + tag.lastOpeningBracketAt = undefined; + tag.name = undefined; + tag.onlyPlausible = false; + } + if ((tag.lastOpeningBracketAt === undefined || !tag.onlyPlausible) && !tag.quotes) { + tag.lastOpeningBracketAt = _i; + tag.slashPresent = false; + tag.attributes = []; + if (chunkOfWhitespaceStartsAt === null) { + tag.leftOuterWhitespace = _i; + } else if (opts.trimOnlySpaces && chunkOfWhitespaceStartsAt === 0) { + /* istanbul ignore next */ + tag.leftOuterWhitespace = chunkOfSpacesStartsAt || _i; + } else { + tag.leftOuterWhitespace = chunkOfWhitespaceStartsAt; + } + if ("".concat(str[_i + 1]).concat(str[_i + 2]).concat(str[_i + 3]) === "!--" || "".concat(str[_i + 1]).concat(str[_i + 2]).concat(str[_i + 3]).concat(str[_i + 4]).concat(str[_i + 5]).concat(str[_i + 6]).concat(str[_i + 7]).concat(str[_i + 8]) === "![CDATA[") { + var cdata = true; + if (str[_i + 2] === "-") { + cdata = false; + } + var closingFoundAt; + for (var _y = _i; _y < len; _y++) { + if (!closingFoundAt && cdata && "".concat(str[_y - 2]).concat(str[_y - 1]).concat(str[_y]) === "]]>" || !cdata && "".concat(str[_y - 2]).concat(str[_y - 1]).concat(str[_y]) === "-->") { + closingFoundAt = _y; + } + if (closingFoundAt && (closingFoundAt < _y && str[_y].trim() || str[_y + 1] === undefined)) { + var rangeEnd = _y; + if (str[_y + 1] === undefined && !str[_y].trim() || str[_y] === ">") { + rangeEnd += 1; + } + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, closingFoundAt + 1]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([tag.lastOpeningBracketAt, closingFoundAt + 1]); + } + var _whiteSpaceCompensation4 = calculateWhitespaceToInsert(str, _y, tag.leftOuterWhitespace, rangeEnd, tag.lastOpeningBracketAt, closingFoundAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: rangeEnd, + insert: _whiteSpaceCompensation4, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, rangeEnd, _whiteSpaceCompensation4] + }); + _i = _y - 1; + if (str[_y] === ">") { + _i = _y; + } + tag = {}; + attrObj = {}; + break; + } + } + } + } + } + } + if (!str[_i].trim()) { + if (chunkOfWhitespaceStartsAt === null) { + chunkOfWhitespaceStartsAt = _i; + if (tag.lastOpeningBracketAt !== undefined && tag.lastOpeningBracketAt < _i && tag.nameStarts && tag.nameStarts < tag.lastOpeningBracketAt && _i === tag.lastOpeningBracketAt + 1 && + !rangedOpeningTags.some( + function (rangedTagObj) { + return rangedTagObj.name === tag.name; + })) { + tag.onlyPlausible = true; + tag.name = undefined; + tag.nameStarts = undefined; + } + } + } else if (chunkOfWhitespaceStartsAt !== null) { + if (!tag.quotes && attrObj.equalsAt > chunkOfWhitespaceStartsAt - 1 && attrObj.nameEnds && attrObj.equalsAt > attrObj.nameEnds && str[_i] !== '"' && str[_i] !== "'") { + /* istanbul ignore else */ + if (isObj__default['default'](attrObj)) { + tag.attributes.push(attrObj); + } + attrObj = {}; + tag.equalsSpottedAt = undefined; + } + chunkOfWhitespaceStartsAt = null; + } + if (str[_i] === " ") { + if (chunkOfSpacesStartsAt === null) { + chunkOfSpacesStartsAt = _i; + } + } else if (chunkOfSpacesStartsAt !== null) { + chunkOfSpacesStartsAt = null; + } + i = _i; + }; + for (var i = 0, len = str.length; i < len; i++) { + var _ret2 = _loop2(i, len); + if (_ret2 === "continue") continue; + } + if (str && ( + opts.trimOnlySpaces && + str[0] === " " || + !opts.trimOnlySpaces && + !str[0].trim())) { + for (var _i2 = 0, _len = str.length; _i2 < _len; _i2++) { + if (opts.trimOnlySpaces && str[_i2] !== " " || !opts.trimOnlySpaces && str[_i2].trim()) { + rangesToDelete.push([0, _i2]); + break; + } else if (!str[_i2 + 1]) { + rangesToDelete.push([0, _i2 + 1]); + } + } + } + if (str && ( + opts.trimOnlySpaces && + str[str.length - 1] === " " || + !opts.trimOnlySpaces && + !str[str.length - 1].trim())) { + for (var _i3 = str.length; _i3--;) { + if (opts.trimOnlySpaces && str[_i3] !== " " || !opts.trimOnlySpaces && str[_i3].trim()) { + rangesToDelete.push([_i3 + 1, str.length]); + break; + } + } + } + var curr = rangesToDelete.current(); + if ((!originalOpts || !originalOpts.cb) && curr) { + if (curr[0] && !curr[0][0]) { + curr[0][1]; + rangesToDelete.ranges[0] = [rangesToDelete.ranges[0][0], rangesToDelete.ranges[0][1]]; + } + if (curr[curr.length - 1] && curr[curr.length - 1][1] === str.length) { + curr[curr.length - 1][0]; + /* istanbul ignore else */ + if (rangesToDelete.ranges) { + var startingIdx2 = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][0]; + if (str[startingIdx2 - 1] && (opts.trimOnlySpaces && str[startingIdx2 - 1] === " " || !opts.trimOnlySpaces && !str[startingIdx2 - 1].trim())) { + startingIdx2 -= 1; + } + var backupWhatToAdd = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][2]; + rangesToDelete.ranges[rangesToDelete.ranges.length - 1] = [startingIdx2, rangesToDelete.ranges[rangesToDelete.ranges.length - 1][1]]; + if (backupWhatToAdd && backupWhatToAdd.trim()) { + rangesToDelete.ranges[rangesToDelete.ranges.length - 1].push(backupWhatToAdd.trimEnd()); + } + } + } + } + var res = { + log: { + timeTakenInMilliseconds: Date.now() - start + }, + result: rangesApply.rApply(str, rangesToDelete.current()), + ranges: rangesToDelete.current(), + allTagLocations: allTagLocations, + filteredTagLocations: filteredTagLocations + }; + return res; +} + +exports.defaults = defaults; +exports.stripHtml = stripHtml; +exports.version = version; diff --git a/school/node_modules/string-strip-html/dist/string-strip-html.dev.umd.js b/school/node_modules/string-strip-html/dist/string-strip-html.dev.umd.js new file mode 100644 index 0000000..dfe6e9d --- /dev/null +++ b/school/node_modules/string-strip-html/dist/string-strip-html.dev.umd.js @@ -0,0 +1,5508 @@ +/** + * @name string-strip-html + * @fileoverview Strips HTML tags from strings. No parser, accepts mixed sources. + * @version 8.3.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-strip-html/} + */ + +(function (global, factory) { +typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : +typeof define === 'function' && define.amd ? define(['exports'], factory) : +(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.stringStripHtml = {})); +}(this, (function (exports) { 'use strict'; + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject$1(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var funcProto$1 = Function.prototype, + objectProto$2 = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString$1 = funcProto$1.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty$1 = objectProto$2.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString$1.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString$2 = objectProto$2.toString; + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike$2(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike$2(value) || + objectToString$2.call(value) != objectTag || isHostObject$1(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString$1.call(Ctor) == objectCtorString); +} + +var lodash_isplainobject = isPlainObject; + +/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); + +/** Detect free variable `global` from Node.js. */ +var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')(); + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex$1(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf$1(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex$1(array, baseIsNaN$1, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN$1(value) { + return value !== value; +} + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf$1(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf$1(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +/** Used for built-in method references. */ +var objectProto$1 = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString$1 = objectProto$1.toString; + +/** Built-in value references. */ +var Symbol = root$1.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike$1(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike$1(value) && objectToString$1.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ +function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); +} + +var lodash_trim = trim; + +/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array ? array.length : 0, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ +var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; +}); + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +var lodash_without = without; + +var lib = {}; + +var namedReferences = {}; + +Object.defineProperty(namedReferences,"__esModule",{value:true});namedReferences.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};namedReferences.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"","­":"","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"","‍":"","‎":"","‏":"","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","":"‌","":"‍","":"‎","":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"","⁢":"","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"","​":"","​":"","​":"","≫":"≫","≪":"≪","
":"\n","𝔑":"𝔑","⁠":""," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","	":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":" "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"","­":"","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"","‌":""},characters:{"Æ":"Æ","&":"&","Á":"Á","Ă":"Ă","Â":"Â","А":"А","𝔄":"𝔄","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","":"⁡","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎","Ч":"Ч","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","É":"É","Ě":"Ě","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","Ѓ":"Ѓ",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","Ħ":"Ħ","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ī":"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","":"⁣","":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","":"​","\n":"
","𝔑":"𝔑","":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Õ":"Õ","⨷":"⨷","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",'"':""","𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","\t":"	","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ"," ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ū":"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","а":"а","æ":"æ","𝔞":"𝔞","à":"à","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼","ą":"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","å":"å","𝒶":"𝒶","*":"*","ã":"ã","ä":"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶","б":"б","„":"„","⦰":"⦰","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍","č":"č","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠","ч":"ч","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†","ℸ":"ℸ","‐":"‐","⤏":"⤏","ď":"ď","д":"д","⇊":"⇊","⩷":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦","ϝ":"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","⦦":"⦦","џ":"џ","⟿":"⟿","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","≕":"≕","э":"э","ė":"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","η":"η","ð":"ð","ë":"ë","€":"€","!":"!","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi",fj:"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌","ǵ":"ǵ","γ":"γ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","ℷ":"ℷ","ѓ":"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘","ℊ":"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀","ъ":"ъ","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ħ":"ħ","⁃":"⁃","í":"í","î":"î","и":"и","е":"е","¡":"¡","𝔦":"𝔦","ì":"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","ĩ":"ĩ","і":"і","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄","љ":"љ","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚","ł":"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩","м":"м","—":"—","𝔪":"𝔪","℧":"℧","µ":"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂","μ":"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮","ń":"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","♮":"♮","⩃":"⩃","ň":"ň","ņ":"ņ","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺","њ":"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","ő":"ő","⨸":"⨸","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝","ℴ":"ℴ","ª":"ª","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ø":"ø","⊘":"⊘","õ":"õ","⨶":"⨶","ö":"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","☎":"☎","π":"π","ϖ":"ϖ","ℎ":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","р":"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","⪴":"⪴","⪸":"⪸","š":"š","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","с":"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯","щ":"щ","ш":"ш","":"­","σ":"σ","ς":"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪","ß":"ß","⌖":"⌖","τ":"τ","ť":"ť","ţ":"ţ","т":"т","⌕":"⌕","𝔱":"𝔱","θ":"θ","ϑ":"ϑ","þ":"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","ў":"ў","ŭ":"ŭ","û":"û","у":"у","ű":"ű","⥾":"⥾","𝔲":"𝔲","ù":"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","ų":"ų","𝕦":"𝕦","υ":"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","в":"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵","ξ":"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","":"‍","":"‌"}}}; + +var numericUnicodeMap = {}; + +Object.defineProperty(numericUnicodeMap,"__esModule",{value:true});numericUnicodeMap.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}; + +var surrogatePairs = {}; + +Object.defineProperty(surrogatePairs,"__esModule",{value:true});surrogatePairs.fromCodePoint=String.fromCodePoint||function(astralCodePoint){return String.fromCharCode(Math.floor((astralCodePoint-65536)/1024)+55296,(astralCodePoint-65536)%1024+56320)};surrogatePairs.getCodePoint=String.prototype.codePointAt?function(input,position){return input.codePointAt(position)}:function(input,position){return (input.charCodeAt(position)-55296)*1024+input.charCodeAt(position+1)-56320+65536};surrogatePairs.highSurrogateFrom=55296;surrogatePairs.highSurrogateTo=56319; + +var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(lib, "__esModule", { value: true }); +var named_references_1 = namedReferences; +var numeric_unicode_map_1 = numericUnicodeMap; +var surrogate_pairs_1 = surrogatePairs; +var allNamedReferences = __assign(__assign({}, named_references_1.namedReferences), { all: named_references_1.namedReferences.html5 }); +var encodeRegExps = { + specialChars: /[<>'"&]/g, + nonAscii: /(?:[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, + nonAsciiPrintable: /(?:[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, + extensive: /(?:[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g +}; +var defaultEncodeOptions = { + mode: 'specialChars', + level: 'all', + numeric: 'decimal' +}; +/** Encodes all the necessary (specified by `level`) characters in the text */ +function encode(text, _a) { + var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e; + if (!text) { + return ''; + } + var encodeRegExp = encodeRegExps[mode]; + var references = allNamedReferences[level].characters; + var isHex = numeric === 'hexadecimal'; + encodeRegExp.lastIndex = 0; + var _b = encodeRegExp.exec(text); + var _c; + if (_b) { + _c = ''; + var _d = 0; + do { + if (_d !== _b.index) { + _c += text.substring(_d, _b.index); + } + var _e = _b[0]; + var result_1 = references[_e]; + if (!result_1) { + var code_1 = _e.length > 1 ? surrogate_pairs_1.getCodePoint(_e, 0) : _e.charCodeAt(0); + result_1 = (isHex ? '&#x' + code_1.toString(16) : '&#' + code_1) + ';'; + } + _c += result_1; + _d = _b.index + _e.length; + } while ((_b = encodeRegExp.exec(text))); + if (_d !== text.length) { + _c += text.substring(_d); + } + } + else { + _c = + text; + } + return _c; +} +lib.encode = encode; +var defaultDecodeOptions = { + scope: 'body', + level: 'all' +}; +var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g; +var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g; +var baseDecodeRegExps = { + xml: { + strict: strict, + attribute: attribute, + body: named_references_1.bodyRegExps.xml + }, + html4: { + strict: strict, + attribute: attribute, + body: named_references_1.bodyRegExps.html4 + }, + html5: { + strict: strict, + attribute: attribute, + body: named_references_1.bodyRegExps.html5 + } +}; +var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 }); +var fromCharCode = String.fromCharCode; +var outOfBoundsChar = fromCharCode(65533); +var defaultDecodeEntityOptions = { + level: 'all' +}; +/** Decodes a single entity */ +function decodeEntity(entity, _a) { + var _b = (_a === void 0 ? defaultDecodeEntityOptions : _a).level, level = _b === void 0 ? 'all' : _b; + if (!entity) { + return ''; + } + var _b = entity; + entity[entity.length - 1]; + { + var decodeResultByReference_1 = allNamedReferences[level].entities[entity]; + if (decodeResultByReference_1) { + _b = decodeResultByReference_1; + } + else if (entity[0] === '&' && entity[1] === '#') { + var decodeSecondChar_1 = entity[2]; + var decodeCode_1 = decodeSecondChar_1 == 'x' || decodeSecondChar_1 == 'X' + ? parseInt(entity.substr(3), 16) + : parseInt(entity.substr(2)); + _b = + decodeCode_1 >= 0x10ffff + ? outOfBoundsChar + : decodeCode_1 > 65535 + ? surrogate_pairs_1.fromCodePoint(decodeCode_1) + : fromCharCode(numeric_unicode_map_1.numericUnicodeMap[decodeCode_1] || decodeCode_1); + } + } + return _b; +} +lib.decodeEntity = decodeEntity; +/** Decodes all entities in the text */ +function decode(text, _a) { + var decodeSecondChar_1 = _a === void 0 ? defaultDecodeOptions : _a, decodeCode_1 = decodeSecondChar_1.level, level = decodeCode_1 === void 0 ? 'all' : decodeCode_1, _b = decodeSecondChar_1.scope, scope = _b === void 0 ? level === 'xml' ? 'strict' : 'body' : _b; + if (!text) { + return ''; + } + var decodeRegExp = decodeRegExps[level][scope]; + var references = allNamedReferences[level].entities; + var isAttribute = scope === 'attribute'; + var isStrict = scope === 'strict'; + decodeRegExp.lastIndex = 0; + var replaceMatch_1 = decodeRegExp.exec(text); + var replaceResult_1; + if (replaceMatch_1) { + replaceResult_1 = ''; + var replaceLastIndex_1 = 0; + do { + if (replaceLastIndex_1 !== replaceMatch_1.index) { + replaceResult_1 += text.substring(replaceLastIndex_1, replaceMatch_1.index); + } + var replaceInput_1 = replaceMatch_1[0]; + var decodeResult_1 = replaceInput_1; + var decodeEntityLastChar_2 = replaceInput_1[replaceInput_1.length - 1]; + if (isAttribute + && decodeEntityLastChar_2 === '=') { + decodeResult_1 = replaceInput_1; + } + else if (isStrict + && decodeEntityLastChar_2 !== ';') { + decodeResult_1 = replaceInput_1; + } + else { + var decodeResultByReference_2 = references[replaceInput_1]; + if (decodeResultByReference_2) { + decodeResult_1 = decodeResultByReference_2; + } + else if (replaceInput_1[0] === '&' && replaceInput_1[1] === '#') { + var decodeSecondChar_2 = replaceInput_1[2]; + var decodeCode_2 = decodeSecondChar_2 == 'x' || decodeSecondChar_2 == 'X' + ? parseInt(replaceInput_1.substr(3), 16) + : parseInt(replaceInput_1.substr(2)); + decodeResult_1 = + decodeCode_2 >= 0x10ffff + ? outOfBoundsChar + : decodeCode_2 > 65535 + ? surrogate_pairs_1.fromCodePoint(decodeCode_2) + : fromCharCode(numeric_unicode_map_1.numericUnicodeMap[decodeCode_2] || decodeCode_2); + } + } + replaceResult_1 += decodeResult_1; + replaceLastIndex_1 = replaceMatch_1.index + replaceInput_1.length; + } while ((replaceMatch_1 = decodeRegExp.exec(text))); + if (replaceLastIndex_1 !== text.length) { + replaceResult_1 += text.substring(replaceLastIndex_1); + } + } + else { + replaceResult_1 = + text; + } + return replaceResult_1; +} +var decode_1 = lib.decode = decode; + +/** + * @name ranges-sort + * @fileoverview Sort string index ranges + * @version 4.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-sort/} + */ +const defaults$3 = { + strictlyTwoElementsInRangeArrays: false, + progressFn: null +}; +function rSort(arrOfRanges, originalOptions) { + if (!Array.isArray(arrOfRanges) || !arrOfRanges.length) { + return arrOfRanges; + } + const opts = { ...defaults$3, + ...originalOptions + }; + let culpritsIndex; + let culpritsLen; + if (opts.strictlyTwoElementsInRangeArrays && !arrOfRanges.filter(range => range).every((rangeArr, indx) => { + if (rangeArr.length !== 2) { + culpritsIndex = indx; + culpritsLen = rangeArr.length; + return false; + } + return true; + })) { + throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) has not two but ${culpritsLen} elements!`); + } + if (!arrOfRanges.filter(range => range).every((rangeArr, indx) => { + if (!Number.isInteger(rangeArr[0]) || rangeArr[0] < 0 || !Number.isInteger(rangeArr[1]) || rangeArr[1] < 0) { + culpritsIndex = indx; + return false; + } + return true; + })) { + throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${culpritsIndex}th range (${JSON.stringify(arrOfRanges[culpritsIndex], null, 4)}) does not consist of only natural numbers!`); + } + const maxPossibleIterations = arrOfRanges.filter(range => range).length ** 2; + let counter = 0; + return Array.from(arrOfRanges).filter(range => range).sort((range1, range2) => { + if (opts.progressFn) { + counter += 1; + opts.progressFn(Math.floor(counter * 100 / maxPossibleIterations)); + } + if (range1[0] === range2[0]) { + if (range1[1] < range2[1]) { + return -1; + } + if (range1[1] > range2[1]) { + return 1; + } + return 0; + } + if (range1[0] < range2[0]) { + return -1; + } + return 1; + }); +} + +/** + * @name ranges-merge + * @fileoverview Merge and sort string index ranges + * @version 7.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-merge/} + */ +const defaults$2 = { + mergeType: 1, + progressFn: null, + joinRangesThatTouchEdges: true +}; +function rMerge(arrOfRanges, originalOpts) { + function isObj(something) { + return something && typeof something === "object" && !Array.isArray(something); + } + if (!Array.isArray(arrOfRanges) || !arrOfRanges.length) { + return null; + } + let opts; + if (originalOpts) { + if (isObj(originalOpts)) { + opts = { ...defaults$2, + ...originalOpts + }; + if (opts.progressFn && isObj(opts.progressFn) && !Object.keys(opts.progressFn).length) { + opts.progressFn = null; + } else if (opts.progressFn && typeof opts.progressFn !== "function") { + throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof opts.progressFn}", equal to ${JSON.stringify(opts.progressFn, null, 4)}`); + } + if (opts.mergeType && +opts.mergeType !== 1 && +opts.mergeType !== 2) { + throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof opts.mergeType}", equal to ${JSON.stringify(opts.mergeType, null, 4)}`); + } + if (typeof opts.joinRangesThatTouchEdges !== "boolean") { + throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof opts.joinRangesThatTouchEdges}", equal to ${JSON.stringify(opts.joinRangesThatTouchEdges, null, 4)}`); + } + } else { + throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:\n${JSON.stringify(originalOpts, null, 4)} (type ${typeof originalOpts})`); + } + } else { + opts = { ...defaults$2 + }; + } + const filtered = arrOfRanges + .filter(range => range).map(subarr => [...subarr]).filter( + rangeArr => rangeArr[2] !== undefined || rangeArr[0] !== rangeArr[1]); + let sortedRanges; + let lastPercentageDone; + let percentageDone; + if (opts.progressFn) { + sortedRanges = rSort(filtered, { + progressFn: percentage => { + percentageDone = Math.floor(percentage / 5); + if (percentageDone !== lastPercentageDone) { + lastPercentageDone = percentageDone; + opts.progressFn(percentageDone); + } + } + }); + } else { + sortedRanges = rSort(filtered); + } + if (!sortedRanges) { + return null; + } + const len = sortedRanges.length - 1; + for (let i = len; i > 0; i--) { + if (opts.progressFn) { + percentageDone = Math.floor((1 - i / len) * 78) + 21; + if (percentageDone !== lastPercentageDone && percentageDone > lastPercentageDone) { + lastPercentageDone = percentageDone; + opts.progressFn(percentageDone); + } + } + if (sortedRanges[i][0] <= sortedRanges[i - 1][0] || !opts.joinRangesThatTouchEdges && sortedRanges[i][0] < sortedRanges[i - 1][1] || opts.joinRangesThatTouchEdges && sortedRanges[i][0] <= sortedRanges[i - 1][1]) { + sortedRanges[i - 1][0] = Math.min(sortedRanges[i][0], sortedRanges[i - 1][0]); + sortedRanges[i - 1][1] = Math.max(sortedRanges[i][1], sortedRanges[i - 1][1]); + if (sortedRanges[i][2] !== undefined && (sortedRanges[i - 1][0] >= sortedRanges[i][0] || sortedRanges[i - 1][1] <= sortedRanges[i][1])) { + if (sortedRanges[i - 1][2] !== null) { + if (sortedRanges[i][2] === null && sortedRanges[i - 1][2] !== null) { + sortedRanges[i - 1][2] = null; + } else if (sortedRanges[i - 1][2] != null) { + if (+opts.mergeType === 2 && sortedRanges[i - 1][0] === sortedRanges[i][0]) { + sortedRanges[i - 1][2] = sortedRanges[i][2]; + } else { + sortedRanges[i - 1][2] += sortedRanges[i][2]; + } + } else { + sortedRanges[i - 1][2] = sortedRanges[i][2]; + } + } + } + sortedRanges.splice(i, 1); + i = sortedRanges.length; + } + } + return sortedRanges.length ? sortedRanges : null; +} + +/** + * @name ranges-apply + * @fileoverview Take an array of string index ranges, delete/replace the string according to them + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-apply/} + */ +function rApply(str, originalRangesArr, progressFn) { + let percentageDone = 0; + let lastPercentageDone = 0; + if (arguments.length === 0) { + throw new Error("ranges-apply: [THROW_ID_01] inputs missing!"); + } + if (typeof str !== "string") { + throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof str}, equal to: ${JSON.stringify(str, null, 4)}`); + } + if (originalRangesArr && !Array.isArray(originalRangesArr)) { + throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof originalRangesArr}, equal to: ${JSON.stringify(originalRangesArr, null, 4)}`); + } + if (progressFn && typeof progressFn !== "function") { + throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof progressFn}, equal to: ${JSON.stringify(progressFn, null, 4)}`); + } + if (!originalRangesArr || !originalRangesArr.filter(range => range).length) { + return str; + } + let rangesArr; + if (Array.isArray(originalRangesArr) && Number.isInteger(originalRangesArr[0]) && Number.isInteger(originalRangesArr[1])) { + rangesArr = [Array.from(originalRangesArr)]; + } else { + rangesArr = Array.from(originalRangesArr); + } + const len = rangesArr.length; + let counter = 0; + rangesArr.filter(range => range).forEach((el, i) => { + if (progressFn) { + percentageDone = Math.floor(counter / len * 10); + /* istanbul ignore else */ + if (percentageDone !== lastPercentageDone) { + lastPercentageDone = percentageDone; + progressFn(percentageDone); + } + } + if (!Array.isArray(el)) { + throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${i}th element not an array: ${JSON.stringify(el, null, 4)}, which is ${typeof el}`); + } + if (!Number.isInteger(el[0])) { + if (!Number.isInteger(+el[0]) || +el[0] < 0) { + throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${i}th element, array ${JSON.stringify(el, null, 0)}. Its first element is not an integer, string index, but ${typeof el[0]}, equal to: ${JSON.stringify(el[0], null, 4)}.`); + } else { + rangesArr[i][0] = +rangesArr[i][0]; + } + } + if (!Number.isInteger(el[1])) { + if (!Number.isInteger(+el[1]) || +el[1] < 0) { + throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${i}th element, array ${JSON.stringify(el, null, 0)}. Its second element is not an integer, string index, but ${typeof el[1]}, equal to: ${JSON.stringify(el[1], null, 4)}.`); + } else { + rangesArr[i][1] = +rangesArr[i][1]; + } + } + counter += 1; + }); + const workingRanges = rMerge(rangesArr, { + progressFn: perc => { + if (progressFn) { + percentageDone = 10 + Math.floor(perc / 10); + /* istanbul ignore else */ + if (percentageDone !== lastPercentageDone) { + lastPercentageDone = percentageDone; + progressFn(percentageDone); + } + } + } + }); + const len2 = Array.isArray(workingRanges) ? workingRanges.length : 0; + /* istanbul ignore else */ + if (len2 > 0) { + const tails = str.slice(workingRanges[len2 - 1][1]); + str = workingRanges.reduce((acc, _val, i, arr) => { + if (progressFn) { + percentageDone = 20 + Math.floor(i / len2 * 80); + /* istanbul ignore else */ + if (percentageDone !== lastPercentageDone) { + lastPercentageDone = percentageDone; + progressFn(percentageDone); + } + } + const beginning = i === 0 ? 0 : arr[i - 1][1]; + const ending = arr[i][0]; + return acc + str.slice(beginning, ending) + (arr[i][2] || ""); + }, ""); + str += tails; + } + return str; +} + +/** + * @name string-collapse-leading-whitespace + * @fileoverview Collapse the leading and trailing whitespace of a string + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-collapse-leading-whitespace/} + */ +function collWhitespace(str, originallineBreakLimit = 1) { + const rawNbsp = "\u00A0"; + function reverse(s) { + return Array.from(s).reverse().join(""); + } + function prep(whitespaceChunk, limit, trailing) { + const firstBreakChar = trailing ? "\n" : "\r"; + const secondBreakChar = trailing ? "\r" : "\n"; + if (!whitespaceChunk) { + return whitespaceChunk; + } + let crlfCount = 0; + let res = ""; + for (let i = 0, len = whitespaceChunk.length; i < len; i++) { + if (whitespaceChunk[i] === firstBreakChar || whitespaceChunk[i] === secondBreakChar && whitespaceChunk[i - 1] !== firstBreakChar) { + crlfCount++; + } + if (`\r\n`.includes(whitespaceChunk[i]) || whitespaceChunk[i] === rawNbsp) { + if (whitespaceChunk[i] === rawNbsp) { + res += whitespaceChunk[i]; + } else if (whitespaceChunk[i] === firstBreakChar) { + if (crlfCount <= limit) { + res += whitespaceChunk[i]; + if (whitespaceChunk[i + 1] === secondBreakChar) { + res += whitespaceChunk[i + 1]; + i++; + } + } + } else if (whitespaceChunk[i] === secondBreakChar && (!whitespaceChunk[i - 1] || whitespaceChunk[i - 1] !== firstBreakChar) && crlfCount <= limit) { + res += whitespaceChunk[i]; + } + } else { + if (!whitespaceChunk[i + 1] && !crlfCount) { + res += " "; + } + } + } + return res; + } + if (typeof str === "string" && str.length) { + let lineBreakLimit = 1; + if (typeof +originallineBreakLimit === "number" && Number.isInteger(+originallineBreakLimit) && +originallineBreakLimit >= 0) { + lineBreakLimit = +originallineBreakLimit; + } + let frontPart = ""; + let endPart = ""; + if (!str.trim()) { + frontPart = str; + } else if (!str[0].trim()) { + for (let i = 0, len = str.length; i < len; i++) { + if (str[i].trim()) { + frontPart = str.slice(0, i); + break; + } + } + } + if (str.trim() && (str.slice(-1).trim() === "" || str.slice(-1) === rawNbsp)) { + for (let i = str.length; i--;) { + if (str[i].trim()) { + endPart = str.slice(i + 1); + break; + } + } + } + return `${prep(frontPart, lineBreakLimit, false)}${str.trim()}${reverse(prep(reverse(endPart), lineBreakLimit, true))}`; + } + return str; +} + +/** + * @name ranges-push + * @fileoverview Gather string index ranges + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-push/} + */ +function existy(x) { + return x != null; +} +function isNum(something) { + return Number.isInteger(something) && something >= 0; +} +function isStr(something) { + return typeof something === "string"; +} +const defaults$1 = { + limitToBeAddedWhitespace: false, + limitLinebreaksCount: 1, + mergeType: 1 +}; +class Ranges { + constructor(originalOpts) { + const opts = { ...defaults$1, + ...originalOpts + }; + if (opts.mergeType && opts.mergeType !== 1 && opts.mergeType !== 2) { + if (isStr(opts.mergeType) && opts.mergeType.trim() === "1") { + opts.mergeType = 1; + } else if (isStr(opts.mergeType) && opts.mergeType.trim() === "2") { + opts.mergeType = 2; + } else { + throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof opts.mergeType}", equal to ${JSON.stringify(opts.mergeType, null, 4)}`); + } + } + this.opts = opts; + this.ranges = []; + } + add(originalFrom, originalTo, addVal) { + if (originalFrom == null && originalTo == null) { + return; + } + if (existy(originalFrom) && !existy(originalTo)) { + if (Array.isArray(originalFrom)) { + if (originalFrom.length) { + if (originalFrom.some(el => Array.isArray(el))) { + originalFrom.forEach(thing => { + if (Array.isArray(thing)) { + this.add(...thing); + } + }); + return; + } + if (originalFrom.length && isNum(+originalFrom[0]) && isNum(+originalFrom[1])) { + this.add(...originalFrom); + } + } + return; + } + throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(originalFrom, null, 0)}) but second-one, "to" is not (${JSON.stringify(originalTo, null, 0)})`); + } else if (!existy(originalFrom) && existy(originalTo)) { + throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(originalTo, null, 0)}) but first-one, "from" is not (${JSON.stringify(originalFrom, null, 0)})`); + } + const from = +originalFrom; + const to = +originalTo; + if (isNum(addVal)) { + addVal = String(addVal); + } + if (isNum(from) && isNum(to)) { + if (existy(addVal) && !isStr(addVal) && !isNum(addVal)) { + throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof addVal}, equal to:\n${JSON.stringify(addVal, null, 4)}`); + } + if (existy(this.ranges) && Array.isArray(this.last()) && from === this.last()[1]) { + this.last()[1] = to; + if (this.last()[2] === null || addVal === null) ; + if (this.last()[2] !== null && existy(addVal)) { + let calculatedVal = this.last()[2] && this.last()[2].length > 0 && (!this.opts || !this.opts.mergeType || this.opts.mergeType === 1) ? this.last()[2] + addVal : addVal; + if (this.opts.limitToBeAddedWhitespace) { + calculatedVal = collWhitespace(calculatedVal, this.opts.limitLinebreaksCount); + } + if (!(isStr(calculatedVal) && !calculatedVal.length)) { + this.last()[2] = calculatedVal; + } + } + } else { + if (!this.ranges) { + this.ranges = []; + } + const whatToPush = addVal !== undefined && !(isStr(addVal) && !addVal.length) ? [from, to, addVal && this.opts.limitToBeAddedWhitespace ? collWhitespace(addVal, this.opts.limitLinebreaksCount) : addVal] : [from, to]; + this.ranges.push(whatToPush); + } + } else { + if (!(isNum(from) && from >= 0)) { + throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof from}" equal to: ${JSON.stringify(from, null, 4)}`); + } else { + throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof to}" equal to: ${JSON.stringify(to, null, 4)}`); + } + } + } + push(originalFrom, originalTo, addVal) { + this.add(originalFrom, originalTo, addVal); + } + current() { + if (Array.isArray(this.ranges) && this.ranges.length) { + this.ranges = rMerge(this.ranges, { + mergeType: this.opts.mergeType + }); + if (this.ranges && this.opts.limitToBeAddedWhitespace) { + return this.ranges.map(val => { + if (existy(val[2])) { + return [val[0], val[1], collWhitespace(val[2], this.opts.limitLinebreaksCount)]; + } + return val; + }); + } + return this.ranges; + } + return null; + } + wipe() { + this.ranges = []; + } + replace(givenRanges) { + if (Array.isArray(givenRanges) && givenRanges.length) { + if (!(Array.isArray(givenRanges[0]) && isNum(givenRanges[0][0]))) { + throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(givenRanges[0], null, 4)} should be an array and its first element should be an integer, a string index.`); + } else { + this.ranges = Array.from(givenRanges); + } + } else { + this.ranges = []; + } + } + last() { + if (Array.isArray(this.ranges) && this.ranges.length) { + return this.ranges[this.ranges.length - 1]; + } + return null; + } +} + +var lodash_clonedeep = {exports: {}}; + +/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[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]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, true, true); +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = cloneDeep; +}(lodash_clonedeep, lodash_clonedeep.exports)); + +/** + * @name string-left-right + * @fileoverview Looks up the first non-whitespace character to the left/right of a given index + * @version 4.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-left-right/} + */ +const RAWNBSP = "\u00A0"; +function rightMain({ + str, + idx = 0, + stopAtNewlines = false, + stopAtRawNbsp = false +}) { + if (typeof str !== "string" || !str.length) { + return null; + } + if (!idx || typeof idx !== "number") { + idx = 0; + } + if (!str[idx + 1]) { + return null; + } + if ( + str[idx + 1] && ( + str[idx + 1].trim() || + stopAtNewlines && + "\n\r".includes(str[idx + 1]) || + stopAtRawNbsp && + str[idx + 1] === RAWNBSP)) { + return idx + 1; + } + if ( + str[idx + 2] && ( + str[idx + 2].trim() || + stopAtNewlines && + "\n\r".includes(str[idx + 2]) || + stopAtRawNbsp && + str[idx + 2] === RAWNBSP)) { + return idx + 2; + } + for (let i = idx + 1, len = str.length; i < len; i++) { + if ( + str[i].trim() || + stopAtNewlines && + "\n\r".includes(str[i]) || + stopAtRawNbsp && + str[i] === RAWNBSP) { + return i; + } + } + return null; +} +function right(str, idx = 0) { + return rightMain({ + str, + idx, + stopAtNewlines: false, + stopAtRawNbsp: false + }); +} + +/* eslint @typescript-eslint/explicit-module-boundary-types:0 */ +/* istanbul ignore next */ +function characterSuitableForNames(char) { + return /[-_A-Za-z0-9]/.test(char); +} +/* istanbul ignore next */ +function prepHopefullyAnArray(something, name) { + if (!something) { + return []; + } + if (Array.isArray(something)) { + return something.filter((val) => typeof val === "string" && val.trim()); + } + if (typeof something === "string") { + return something.trim() ? [something] : []; + } + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] ${name} must be array containing zero or more strings or something falsey. Currently it's equal to: ${something}, that a type of ${typeof something}.`); +} +/* istanbul ignore next */ +function xBeforeYOnTheRight(str, startingIdx, x, y) { + for (let i = startingIdx, len = str.length; i < len; i++) { + if (str.startsWith(x, i)) { + return true; + } + if (str.startsWith(y, i)) { + return false; + } + } + return false; +} +// +// precaution against JSP comparison +// kl <c:when test="${!empty ab.cd && ab.cd > 0.00}"> mn +// ^ +// we're here, it's false ending +// +/* istanbul ignore next */ +function notWithinAttrQuotes(tag, str, i) { + return (!tag || + !tag.quotes || + !xBeforeYOnTheRight(str, i + 1, tag.quotes.value, ">")); +} + +var version$1 = "8.3.0"; + +const version = version$1; +const defaults = { + ignoreTags: [], + onlyStripTags: [], + stripTogetherWithTheirContents: ["script", "style", "xml"], + skipHtmlDecoding: false, + trimOnlySpaces: false, + dumpLinkHrefsNearby: { + enabled: false, + putOnNewLine: false, + wrapHeads: "", + wrapTails: "", + }, + cb: null, +}; +/** + * Strips HTML tags from strings. No parser, accepts mixed sources. + */ +function stripHtml(str, originalOpts) { + // const + // =========================================================================== + const start = Date.now(); + const definitelyTagNames = new Set([ + "!doctype", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "base", + "bdi", + "bdo", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "doctype", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "math", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "param", + "picture", + "pre", + "progress", + "rb", + "rp", + "rt", + "rtc", + "ruby", + "samp", + "script", + "section", + "select", + "slot", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "svg", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "ul", + "var", + "video", + "wbr", + "xml", + ]); + const singleLetterTags = new Set(["a", "b", "i", "p", "q", "s", "u"]); + const punctuation = new Set([ + ".", + ",", + "?", + ";", + ")", + "\u2026", + '"', + "\u00BB", + ]); + // \u00BB is » - guillemet - right angled quote + // \u2026 is … - ellipsis + // we'll gather opening tags from ranged-pairs here: + const rangedOpeningTags = []; + // we'll put tag locations here + const allTagLocations = []; + let filteredTagLocations = []; + // variables + // =========================================================================== + // records the info about the suspected tag: + let tag = {}; + function resetTag() { + tag = { attributes: [] }; + } + resetTag(); + // records the beginning of the current whitespace chunk: + let chunkOfWhitespaceStartsAt = null; + // records the beginning of the current chunk of spaces (strictly spaces-only): + let chunkOfSpacesStartsAt = null; + // temporary variable to assemble the attribute pieces: + let attrObj = {}; + // marker to store captured href, used in opts.dumpLinkHrefsNearby.enabled + let hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined, + }; + // used to insert extra things when pushing into ranges array + let stringToInsertAfter = ""; + // state flag + let hrefInsertionActive = false; + // marker to keep a note where does the whitespace chunk that follows closing bracket end. + // It's necessary for opts.trimOnlySpaces when there's closing bracket, whitespace, non-space + // whitespace character ("\n", "\t" etc), whitspace, end-of-file. Trim will kick in and will + // try to trim up until the EOF, be we'll have to pull the end of trim back, back to the first + // character of aforementioned non-space whitespace character sequence. + // This variable will tell exactly where it is located. + let spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + // functions + // =========================================================================== + function existy(x) { + return x != null; + } + function isStr(something) { + return typeof something === "string"; + } + function treatRangedTags(i, opts, rangesToDelete) { + if (Array.isArray(opts.stripTogetherWithTheirContents) && + (opts.stripTogetherWithTheirContents.includes(tag.name) || + opts.stripTogetherWithTheirContents.includes("*"))) { + // it depends, is it opening or closing range tag: + // We could try to distinguish opening from closing tags by presence of + // slash, but that would be a liability for dirty code cases where clash + // is missing. Better, instead, just see if an entry for that tag name + // already exists in the rangesToDelete[]. + if (Array.isArray(rangedOpeningTags) && + rangedOpeningTags.some((obj) => obj.name === tag.name && obj.lastClosingBracketAt < i)) { + // if (tag.slashPresent) { + // closing tag. + // filter and remove the found tag + for (let y = rangedOpeningTags.length; y--;) { + if (rangedOpeningTags[y].name === tag.name) { + // we'll remove from opening tag's opening bracket to closing tag's + // closing bracket because whitespace will be taken care of separately, + // when tags themselves will be removed. + // Basically, for each range tag there will be 3 removals: + // opening tag, closing tag and all from opening to closing tag. + // We keep removing opening and closing tags along whole range + // because of few reasons: 1. cases of broken/dirty code, 2. keeping + // the algorithm simpler, 3. opts that control whitespace removal + // around tags. + // 1. add range without caring about surrounding whitespace around + // the range + // also, tend filteredTagLocations in the output - tags which are to be + // deleted with contents should be reported as one large range in + // filteredTagLocations - from opening to closing - not two ranges + /* istanbul ignore else */ + if (opts.stripTogetherWithTheirContents.includes(tag.name) || + opts.stripTogetherWithTheirContents.includes("*")) { + filteredTagLocations = filteredTagLocations.filter(([from, upto]) => (from < rangedOpeningTags[y].lastOpeningBracketAt || + from >= i + 1) && + (upto <= rangedOpeningTags[y].lastOpeningBracketAt || + upto > i + 1)); + } + let endingIdx = i + 1; + if (tag.lastClosingBracketAt) { + endingIdx = tag.lastClosingBracketAt + 1; + } + filteredTagLocations.push([ + rangedOpeningTags[y].lastOpeningBracketAt, + endingIdx, + ]); + /* istanbul ignore else */ + if (punctuation.has(str[i]) && opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i + 1, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: [ + rangedOpeningTags[y].lastOpeningBracketAt, + i, + null, + ], + }); + // null will remove any spaces added so far. Opening and closing range tags might + // have received spaces as separate entities, but those might not be necessary for range: + // "text <script>deleteme</script>." + } + else if (opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i, + insert: "", + rangesArr: rangesToDelete, + proposedReturn: [ + rangedOpeningTags[y].lastOpeningBracketAt, + i, + "", + ], + }); + } + // 2. delete the reference to this range from rangedOpeningTags[] + // because there might be more ranged tags of the same name or + // different, overlapping or encompassing ranged tags with same + // or different name. + rangedOpeningTags.splice(y, 1); + // 3. stop the loop + break; + } + } + } + else { + // opening tag. + rangedOpeningTags.push(tag); + } + } + } + function calculateWhitespaceToInsert(str2, // whole string + currCharIdx, // current index + fromIdx, // leftmost whitespace edge around tag + toIdx, // rightmost whitespace edge around tag + lastOpeningBracketAt, // tag actually starts here (<) + lastClosingBracketAt // tag actually ends here (>) + ) { + let strToEvaluateForLineBreaks = ""; + if (Number.isInteger(fromIdx) && + fromIdx < lastOpeningBracketAt) { + strToEvaluateForLineBreaks += str2.slice(fromIdx, lastOpeningBracketAt); + } + if (Number.isInteger(toIdx) && + toIdx > lastClosingBracketAt + 1) { + // limit whitespace that follows the tag, stop at linebreak. That's to make + // the algorithm composable - we include linebreaks in front but not after. + const temp = str2.slice(lastClosingBracketAt + 1, toIdx); + if (temp.includes("\n") && isOpeningAt(toIdx, str2)) { + strToEvaluateForLineBreaks += " "; + } + else { + strToEvaluateForLineBreaks += temp; + } + } + if (!punctuation.has(str2[currCharIdx]) && str2[currCharIdx] !== "!") { + const foundLineBreaks = strToEvaluateForLineBreaks.match(/\n/g); + if (Array.isArray(foundLineBreaks) && foundLineBreaks.length) { + if (foundLineBreaks.length === 1) { + return "\n"; + } + if (foundLineBreaks.length === 2) { + return "\n\n"; + } + // return three line breaks maximum + return "\n\n\n"; + } + // default spacer - a single space + return " "; + } + // default case: space + return ""; + } + function calculateHrefToBeInserted(opts) { + if (opts.dumpLinkHrefsNearby.enabled && + hrefDump.tagName && + hrefDump.tagName === tag.name && + tag.lastOpeningBracketAt && + ((hrefDump.openingTagEnds && + tag.lastOpeningBracketAt > hrefDump.openingTagEnds) || + !hrefDump.openingTagEnds)) { + hrefInsertionActive = true; + } + if (hrefInsertionActive) { + const lineBreaks = opts.dumpLinkHrefsNearby.putOnNewLine ? "\n\n" : ""; + stringToInsertAfter = `${lineBreaks}${hrefDump.hrefValue}${lineBreaks}`; + } + } + function isOpeningAt(i, customStr) { + if (customStr) { + return customStr[i] === "<" && customStr[i + 1] !== "%"; + } + return str[i] === "<" && str[i + 1] !== "%"; + } + function isClosingAt(i) { + return str[i] === ">" && str[i - 1] !== "%"; + } + // validation + // =========================================================================== + if (typeof str !== "string") { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof str).toLowerCase()}, equal to:\n${JSON.stringify(str, null, 4)}`); + } + if (originalOpts && !lodash_isplainobject(originalOpts)) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof originalOpts).toLowerCase()}, equal to:\n${JSON.stringify(originalOpts, null, 4)}`); + } + // eslint-disable-next-line consistent-return + function resetHrefMarkers() { + // reset the hrefDump + if (hrefInsertionActive) { + hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined, + }; + hrefInsertionActive = false; + } + } + // prep opts + // =========================================================================== + const opts = { ...defaults, ...originalOpts }; + if (Object.prototype.hasOwnProperty.call(opts, "returnRangesOnly")) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] opts.returnRangesOnly has been removed from the API since v.5 release.`); + } + // filter non-string or whitespace entries from the following arrays or turn + // them into arrays: + opts.ignoreTags = prepHopefullyAnArray(opts.ignoreTags, "opts.ignoreTags"); + opts.onlyStripTags = prepHopefullyAnArray(opts.onlyStripTags, "opts.onlyStripTags"); + // let's define the onlyStripTagsMode. Since opts.onlyStripTags can cancel + // out the entries in opts.onlyStripTags, it can be empty but this mode has + // to be switched on: + const onlyStripTagsMode = !!opts.onlyStripTags.length; + // if both opts.onlyStripTags and opts.ignoreTags are set, latter is respected, + // we simply exclude ignored tags from the opts.onlyStripTags. + if (opts.onlyStripTags.length && opts.ignoreTags.length) { + opts.onlyStripTags = lodash_without(opts.onlyStripTags, ...opts.ignoreTags); + } + if (!lodash_isplainobject(opts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = { ...defaults.dumpLinkHrefsNearby }; + } + // Object.assign doesn't deep merge, so we take care of opts.dumpLinkHrefsNearby: + opts.dumpLinkHrefsNearby = defaults.dumpLinkHrefsNearby; + if (originalOpts && + Object.prototype.hasOwnProperty.call(originalOpts, "dumpLinkHrefsNearby") && + existy(originalOpts.dumpLinkHrefsNearby)) { + /* istanbul ignore else */ + if (lodash_isplainobject(originalOpts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = { + ...defaults.dumpLinkHrefsNearby, + ...originalOpts.dumpLinkHrefsNearby, + }; + } + else if (originalOpts.dumpLinkHrefsNearby) { + // checking to omit value as number zero + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_04] Optional Options Object's key dumpLinkHrefsNearby was set to ${typeof originalOpts.dumpLinkHrefsNearby}, equal to ${JSON.stringify(originalOpts.dumpLinkHrefsNearby, null, 4)}. The only allowed value is a plain object. See the API reference.`); + } + } + if (!opts.stripTogetherWithTheirContents) { + opts.stripTogetherWithTheirContents = []; + } + else if (typeof opts.stripTogetherWithTheirContents === "string" && + opts.stripTogetherWithTheirContents.length) { + opts.stripTogetherWithTheirContents = [opts.stripTogetherWithTheirContents]; + } + const somethingCaught = {}; + if (opts.stripTogetherWithTheirContents && + Array.isArray(opts.stripTogetherWithTheirContents) && + opts.stripTogetherWithTheirContents.length && + !opts.stripTogetherWithTheirContents.every((el, i) => { + if (!(typeof el === "string")) { + somethingCaught.el = el; + somethingCaught.i = i; + return false; + } + return true; + })) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${somethingCaught.i} has a value ${somethingCaught.el} which is not string but ${(typeof somethingCaught.el).toLowerCase()}.`); + } + // prep the opts.cb + if (!opts.cb) { + opts.cb = ({ rangesArr, proposedReturn }) => { + if (proposedReturn) { + rangesArr.push(...proposedReturn); + } + }; + } + // if the links have to be on a new line, we need to increase the allowance for line breaks + // in Ranges class, it's the ranges-push API setting opts.limitLinebreaksCount + // see https://www.npmjs.com/package/ranges-push#optional-options-object + const rangesToDelete = new Ranges({ + limitToBeAddedWhitespace: true, + limitLinebreaksCount: 2, + }); + // TODO: it's chummy - ranges will be unreliable if initial str has changed + // use ranges-ent-decode + if (!opts.skipHtmlDecoding) { + while (str !== decode_1(str, { scope: "strict" })) { + // eslint-disable-next-line no-param-reassign + str = decode_1(str, { scope: "strict" }); + } + } + // step 1. + // =========================================================================== + for (let i = 0, len = str.length; i < len; i++) { + // catch the first ending of the spaces chunk that follows the closing bracket. + // ------------------------------------------------------------------------- + // There can be no space after bracket, in that case, the result will be that character that + // follows the closing bracket. + // There can be bunch of spaces that end with EOF. In that case it's fine, this variable will + // be null. + if (Object.keys(tag).length > 1 && + tag.lastClosingBracketAt && + tag.lastClosingBracketAt < i && + str[i] !== " " && + spacesChunkWhichFollowsTheClosingBracketEndsAt === null) { + spacesChunkWhichFollowsTheClosingBracketEndsAt = i; + } + // skip known ESP token pairs + // ------------------------------------------------------------------------- + if (str[i] === "%" && str[i - 1] === "{" && str.includes("%}", i + 1)) { + i = str.indexOf("%}", i) - 1; + continue; + } + // catch the closing bracket of dirty tags with missing opening brackets + // ------------------------------------------------------------------------- + if (isClosingAt(i)) { + // tend cases where opening bracket of a tag is missing: + if ((!tag || Object.keys(tag).length < 2) && i > 1) { + // traverse backwards either until start of string or ">" is found + for (let y = i; y--;) { + if (str[y - 1] === undefined || isClosingAt(y)) { + const startingPoint = str[y - 1] === undefined ? y : y + 1; + const culprit = str.slice(startingPoint, i + 1); + // Check if the culprit starts with a tag that's more likely a tag + // name (like "body" or "article"). Single-letter tag names are excluded + // because they can be plausible, ie. in math texts and so on. + // Nobody uses puts comparison signs between words like: "article > ", + // but single letter names can be plausible: "a > b" in math. + if (str !== `<${lodash_trim(culprit.trim(), "/>")}>` && // recursion prevention + [...definitelyTagNames].some((val) => lodash_trim(culprit + .trim() + .split(/\s+/) + .filter((val2) => val2.trim()) + .filter((_val3, i3) => i3 === 0), "/>").toLowerCase() === val) && + stripHtml(`<${culprit.trim()}>`, opts).result === "") { + /* istanbul ignore else */ + if (!allTagLocations.length || + allTagLocations[allTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + allTagLocations.push([startingPoint, i + 1]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || + filteredTagLocations[filteredTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + filteredTagLocations.push([startingPoint, i + 1]); + } + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, startingPoint, i + 1, startingPoint, i + 1); + let deleteUpTo = i + 1; + if (str[deleteUpTo] && !str[deleteUpTo].trim()) { + for (let z = deleteUpTo; z < len; z++) { + if (str[z].trim()) { + deleteUpTo = z; + break; + } + } + } + opts.cb({ + tag: tag, + deleteFrom: startingPoint, + deleteTo: deleteUpTo, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [ + startingPoint, + deleteUpTo, + whiteSpaceCompensation, + ], + }); + } + break; + } + } + } + } + // catch slash + // ------------------------------------------------------------------------- + if (str[i] === "/" && + !(tag.quotes && tag.quotes.value) && + Number.isInteger(tag.lastOpeningBracketAt) && + !Number.isInteger(tag.lastClosingBracketAt)) { + tag.slashPresent = i; + } + // catch double or single quotes + // ------------------------------------------------------------------------- + if (str[i] === '"' || str[i] === "'") { + if (tag.nameStarts && + tag.quotes && + tag.quotes.value && + tag.quotes.value === str[i]) { + // 1. finish assembling the "attrObj{}" + attrObj.valueEnds = i; + attrObj.value = str.slice(attrObj.valueStarts, i); + tag.attributes.push(attrObj); + // reset: + attrObj = {}; + // 2. finally, delete the quotes marker, we don't need it any more + tag.quotes = undefined; + // 3. if opts.dumpLinkHrefsNearby.enabled is on, catch href + let hrefVal; + if (opts.dumpLinkHrefsNearby.enabled && + // eslint-disable-next-line + tag.attributes.some((obj) => { + if (obj.name && obj.name.toLowerCase() === "href") { + hrefVal = `${opts.dumpLinkHrefsNearby.wrapHeads || ""}${obj.value}${opts.dumpLinkHrefsNearby.wrapTails || ""}`; + return true; + } + })) { + hrefDump = { + tagName: tag.name, + hrefValue: hrefVal, + openingTagEnds: undefined, + }; + } + } + else if (!tag.quotes && tag.nameStarts) { + // 1. if it's opening marker, record the type and location of quotes + tag.quotes = {}; + tag.quotes.value = str[i]; + tag.quotes.start = i; + // 2. start assembling the attribute object which we'll dump into tag.attributes[] array: + if (attrObj.nameStarts && + attrObj.nameEnds && + attrObj.nameEnds < i && + attrObj.nameStarts < i && + !attrObj.valueStarts) { + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } + } + // catch the ending of the tag name: + // ------------------------------------------------------------------------- + if (tag.nameStarts !== undefined && + tag.nameEnds === undefined && + (!str[i].trim() || !characterSuitableForNames(str[i]))) { + // 1. mark the name ending + tag.nameEnds = i; + // 2. extract the full name string + tag.name = str.slice(tag.nameStarts, tag.nameEnds + + /* istanbul ignore next */ + (!isClosingAt(i) && str[i] !== "/" && str[i + 1] === undefined + ? 1 + : 0)); + if ( + // if we caught "----" from "<----" or "---->", bail: + (str[tag.nameStarts - 1] !== "!" && // protection against <!-- + !tag.name.replace(/-/g, "").length) || + // if tag name starts with a number character + /^\d+$/.test(tag.name[0])) { + tag = {}; + continue; + } + if (isOpeningAt(i)) { + // process it because we need to tackle this new tag + calculateHrefToBeInserted(opts); + // calculateWhitespaceToInsert() API: + // str, // whole string + // currCharIdx, // current index + // fromIdx, // leftmost whitespace edge around tag + // toIdx, // rightmost whitespace edge around tag + // lastOpeningBracketAt, // tag actually starts here (<) + // lastClosingBracketAt // tag actually ends here (>) + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i, tag.lastOpeningBracketAt, i); + // only on pair tags, exclude the opening counterpart and closing + // counterpart if whole pair is to be deleted + if (opts.stripTogetherWithTheirContents.includes(tag.name) || + opts.stripTogetherWithTheirContents.includes("*")) { + /* istanbul ignore next */ + filteredTagLocations = filteredTagLocations.filter(([from, upto]) => !(from === tag.leftOuterWhitespace && upto === i)); + } + // console.log( + // `1011 ${`\u001b[${32}m${`PUSH`}\u001b[${39}m`} [${ + // tag.leftOuterWhitespace + // }, ${i}] to filteredTagLocations` + // ); + // filteredTagLocations.push([tag.leftOuterWhitespace, i]); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i, + insert: `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + rangesArr: rangesToDelete, + proposedReturn: [ + tag.leftOuterWhitespace, + i, + `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + ], + }); + resetHrefMarkers(); + // also, + treatRangedTags(i, opts, rangesToDelete); + } + } + // catch beginning of an attribute value + // ------------------------------------------------------------------------- + if (tag.quotes && + tag.quotes.start && + tag.quotes.start < i && + !tag.quotes.end && + attrObj.nameEnds && + attrObj.equalsAt && + !attrObj.valueStarts) { + attrObj.valueStarts = i; + } + // catch rare cases when attributes name has some space after it, before equals + // ------------------------------------------------------------------------- + if (!tag.quotes && + attrObj.nameEnds && + str[i] === "=" && + !attrObj.valueStarts && + !attrObj.equalsAt) { + attrObj.equalsAt = i; + } + // catch the ending of the whole attribute + // ------------------------------------------------------------------------- + // for example, <a b c> this "c" ends "b" because it's not "equals" sign. + // We even anticipate for cases where whitespace anywhere between attribute parts: + // < article class = " something " / > + if (!tag.quotes && + attrObj.nameStarts && + attrObj.nameEnds && + !attrObj.valueStarts && + str[i].trim() && + str[i] !== "=") { + // if (!tag.attributes) { + // tag.attributes = []; + // } + tag.attributes.push(attrObj); + attrObj = {}; + } + // catch the ending of an attribute's name + // ------------------------------------------------------------------------- + if (!tag.quotes && attrObj.nameStarts && !attrObj.nameEnds) { + if (!str[i].trim()) { + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + else if (str[i] === "=") { + /* istanbul ignore else */ + if (!attrObj.equalsAt) { + attrObj.nameEnds = i; + attrObj.equalsAt = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } + else if (str[i] === "/" || isClosingAt(i)) { + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + // if (!tag.attributes) { + // tag.attributes = []; + // } + tag.attributes.push(attrObj); + attrObj = {}; + } + else if (isOpeningAt(i)) { + // TODO - address both cases of onlyPlausible + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + // if (!tag.attributes) { + // tag.attributes = []; + // } + tag.attributes.push(attrObj); + attrObj = {}; + } + } + // catch the beginning of an attribute's name + // ------------------------------------------------------------------------- + if (!tag.quotes && + tag.nameEnds < i && + !str[i - 1].trim() && + str[i].trim() && + !`<>/!`.includes(str[i]) && + !attrObj.nameStarts && + !tag.lastClosingBracketAt) { + attrObj.nameStarts = i; + } + // catch "< /" - turn off "onlyPlausible" + // ------------------------------------------------------------------------- + if (tag.lastOpeningBracketAt !== null && + tag.lastOpeningBracketAt < i && + str[i] === "/" && + tag.onlyPlausible) { + tag.onlyPlausible = false; + } + // catch character that follows an opening bracket: + // ------------------------------------------------------------------------- + if (tag.lastOpeningBracketAt !== null && + tag.lastOpeningBracketAt < i && + str[i] !== "/" // there can be closing slashes in various places, legit and not + ) { + // 1. identify, is it definite or just plausible tag + if (tag.onlyPlausible === undefined) { + if ((!str[i].trim() || isOpeningAt(i)) && !tag.slashPresent) { + tag.onlyPlausible = true; + } + else { + tag.onlyPlausible = false; + } + } + // 2. catch the beginning of the tag name. Consider custom HTML tag names + // and also known (X)HTML tags: + if (str[i].trim() && + tag.nameStarts === undefined && + !isOpeningAt(i) && + str[i] !== "/" && + !isClosingAt(i) && + str[i] !== "!") { + tag.nameStarts = i; + tag.nameContainsLetters = false; + } + } + // Catch letters in the tag name. Necessary to filter out false positives like "<------" + if (tag.nameStarts && + !tag.quotes && + str[i].toLowerCase() !== str[i].toUpperCase()) { + tag.nameContainsLetters = true; + } + // catch closing bracket + // ------------------------------------------------------------------------- + if ( + // it's closing bracket + isClosingAt(i) && + // + // precaution against JSP comparison + // kl <c:when test="${!empty ab.cd && ab.cd > 0.00}"> mn + // ^ + // we're here, it's false ending + // + notWithinAttrQuotes(tag, str, i)) { + if (tag.lastOpeningBracketAt !== undefined) { + // 1. mark the index + tag.lastClosingBracketAt = i; + // 2. reset the spacesChunkWhichFollowsTheClosingBracketEndsAt + spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + // 3. push attrObj into tag.attributes[] + if (Object.keys(attrObj).length) { + // if (!tag.attributes) { + // tag.attributes = []; + // } + tag.attributes.push(attrObj); + attrObj = {}; + } + // 4. if opts.dumpLinkHrefsNearby.enabled is on and we just recorded an href, + if (opts.dumpLinkHrefsNearby.enabled && + hrefDump.tagName && + !hrefDump.openingTagEnds) { + // finish assembling the hrefDump{} + hrefDump.openingTagEnds = i; // or tag.lastClosingBracketAt, same + } + } + } + // catch the ending of the tag + // ------------------------------------------------------------------------- + // the tag is "released" into "rApply": + if (tag.lastOpeningBracketAt !== undefined) { + if (tag.lastClosingBracketAt === undefined) { + if (tag.lastOpeningBracketAt < i && + !isOpeningAt(i) && // to prevent cases like "text <<<<<< text" + (str[i + 1] === undefined || isOpeningAt(i + 1)) && + tag.nameContainsLetters) { + // find out the tag name earlier than dedicated tag name ending catching section: + // if (str[i + 1] === undefined) { + tag.name = str + .slice(tag.nameStarts, tag.nameEnds ? tag.nameEnds : i + 1) + .toLowerCase(); + // submit tag to allTagLocations + /* istanbul ignore else */ + if (!allTagLocations.length || + allTagLocations[allTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + if ( + // if it's an ignored tag + opts.ignoreTags.includes(tag.name) || + // or just plausible and unrecognised + (tag.onlyPlausible && !definitelyTagNames.has(tag.name))) { + tag = {}; + attrObj = {}; + continue; + } + // if the tag is only plausible (there's space after opening bracket) and it's not among + // recognised tags, leave it as it is: + if (((definitelyTagNames.has(tag.name) || + singleLetterTags.has(tag.name)) && + (tag.onlyPlausible === false || + (tag.onlyPlausible === true && tag.attributes.length))) || + str[i + 1] === undefined) { + calculateHrefToBeInserted(opts); + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i + 1, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i + 1, + insert: `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + rangesArr: rangesToDelete, + proposedReturn: [ + tag.leftOuterWhitespace, + i + 1, + `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + ], + }); + resetHrefMarkers(); + // also, + treatRangedTags(i, opts, rangesToDelete); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || + (filteredTagLocations[filteredTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt && + filteredTagLocations[filteredTagLocations.length - 1][1] !== + i + 1)) { + // filter out opening/closing tag pair because whole chunk + // from opening's opening to closing's closing will be pushed + if (opts.stripTogetherWithTheirContents.includes(tag.name) || + opts.stripTogetherWithTheirContents.includes("*")) { + // get the last opening counterpart of the pair + // iterate rangedOpeningTags from the, pick the first + // ranged opening tag whose name is same like current, closing's + let lastRangedOpeningTag; + for (let z = rangedOpeningTags.length; z--;) { + /* istanbul ignore else */ + if (rangedOpeningTags[z].name === tag.name) { + lastRangedOpeningTag = rangedOpeningTags[z]; + } + } + /* istanbul ignore else */ + if (lastRangedOpeningTag) { + filteredTagLocations = filteredTagLocations.filter(([from]) => from !== lastRangedOpeningTag.lastOpeningBracketAt); + filteredTagLocations.push([ + lastRangedOpeningTag.lastOpeningBracketAt, + i + 1, + ]); + } + else { + /* istanbul ignore next */ + filteredTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + } + else { + // if it's not ranged tag, just push it as it is to filteredTagLocations + filteredTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + } + } + } + else if ((i > tag.lastClosingBracketAt && str[i].trim()) || + str[i + 1] === undefined) { + // case 2. closing bracket HAS BEEN met + // we'll look for a non-whitespace character and delete up to it + // BUT, we'll wipe the tag object only if that non-whitespace character + // is not a ">". This way we'll catch and delete sequences of closing brackets. + // part 1. + let endingRangeIndex = tag.lastClosingBracketAt === i ? i + 1 : i; + if (opts.trimOnlySpaces && + endingRangeIndex === len - 1 && + spacesChunkWhichFollowsTheClosingBracketEndsAt !== null && + spacesChunkWhichFollowsTheClosingBracketEndsAt < i) { + endingRangeIndex = spacesChunkWhichFollowsTheClosingBracketEndsAt; + } + // if it's a dodgy suspicious tag where space follows opening bracket, there's an extra requirement + // for this tag to be considered a tag - there has to be at least one attribute with equals if + // the tag name is not recognised. + // submit tag to allTagLocations + /* istanbul ignore else */ + if (!allTagLocations.length || + allTagLocations[allTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + allTagLocations.push([ + tag.lastOpeningBracketAt, + tag.lastClosingBracketAt + 1, + ]); + } + if ((!onlyStripTagsMode && opts.ignoreTags.includes(tag.name)) || + (onlyStripTagsMode && !opts.onlyStripTags.includes(tag.name))) { + // ping the callback with nulls: + opts.cb({ + tag: tag, + deleteFrom: null, + deleteTo: null, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: null, + }); + // don't submit the tag onto "filteredTagLocations" + // then reset: + tag = {}; + attrObj = {}; + // continue; + } + else if (!tag.onlyPlausible || + // tag name is recognised and there are no attributes: + (tag.attributes.length === 0 && + tag.name && + (definitelyTagNames.has(tag.name.toLowerCase()) || + singleLetterTags.has(tag.name.toLowerCase()))) || + // OR there is at least one equals that follow the attribute's name: + (tag.attributes && + tag.attributes.some((attrObj2) => attrObj2.equalsAt))) { + // submit tag to filteredTagLocations + /* istanbul ignore else */ + if (!filteredTagLocations.length || + filteredTagLocations[filteredTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + filteredTagLocations.push([ + tag.lastOpeningBracketAt, + tag.lastClosingBracketAt + 1, + ]); + } + // if this was an ignored tag name, algorithm would have bailed earlier, + // in stage "catch the ending of the tag name". + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, endingRangeIndex, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + // calculate optional opts.dumpLinkHrefsNearby.enabled HREF to insert + stringToInsertAfter = ""; + hrefInsertionActive = false; + calculateHrefToBeInserted(opts); + let insert; + if (isStr(stringToInsertAfter) && stringToInsertAfter.length) { + insert = `${whiteSpaceCompensation}${stringToInsertAfter}${ + /* istanbul ignore next */ + whiteSpaceCompensation === "\n\n" ? "\n" : whiteSpaceCompensation}`; + } + else { + insert = whiteSpaceCompensation; + } + if (tag.leftOuterWhitespace === 0 || + !right(str, endingRangeIndex - 1)) { + insert = ""; + } + // pass the range onto the callback function, be it default or user's + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: endingRangeIndex, + insert, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, endingRangeIndex, insert], + }); + resetHrefMarkers(); + // also, + treatRangedTags(i, opts, rangesToDelete); + } + else { + tag = {}; + } + // part 2. + if (!isClosingAt(i)) { + tag = {}; + } + } + } + // catch an opening bracket + // ------------------------------------------------------------------------- + if (isOpeningAt(i) && + !isOpeningAt(i - 1) && + !`'"`.includes(str[i + 1]) && + (!`'"`.includes(str[i + 2]) || /\w/.test(str[i + 1])) && + // + // precaution JSP, + // against <c: + !(str[i + 1] === "c" && str[i + 2] === ":") && + // against <fmt: + !(str[i + 1] === "f" && + str[i + 2] === "m" && + str[i + 3] === "t" && + str[i + 4] === ":") && + // against <sql: + !(str[i + 1] === "s" && + str[i + 2] === "q" && + str[i + 3] === "l" && + str[i + 4] === ":") && + // against <x: + !(str[i + 1] === "x" && str[i + 2] === ":") && + // against <fn: + !(str[i + 1] === "f" && str[i + 2] === "n" && str[i + 3] === ":") && + // + // kl <c:when test="${!empty ab.cd && ab.cd < 0.00}"> mn + // ^ + // we're here, it's false alarm + notWithinAttrQuotes(tag, str, i)) { + // cater sequences of opening brackets "<<<<div>>>" + if (isClosingAt(right(str, i))) { + // cater cases like: "<><><>" + continue; + } + else { + // 1. Before (re)setting flags, check, do we have a case of a tag with a + // missing closing bracket, and this is a new tag following it. + if (tag.nameEnds && tag.nameEnds < i && !tag.lastClosingBracketAt) { + if ((tag.onlyPlausible === true && + tag.attributes && + tag.attributes.length) || + tag.onlyPlausible === false) { + // tag.onlyPlausible can be undefined too + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i, tag.lastOpeningBracketAt, i); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [ + tag.leftOuterWhitespace, + i, + whiteSpaceCompensation, + ], + }); + // also, + treatRangedTags(i, opts, rangesToDelete); + // then, for continuity, mark everything up accordingly if it's a new bracket: + tag = {}; + attrObj = {}; + } + } + // 2. if new tag starts, reset: + if (tag.lastOpeningBracketAt !== undefined && + tag.onlyPlausible && + tag.name && + !tag.quotes) { + // reset: + tag.lastOpeningBracketAt = undefined; + tag.name = undefined; + tag.onlyPlausible = false; + } + if ((tag.lastOpeningBracketAt === undefined || !tag.onlyPlausible) && + !tag.quotes) { + tag.lastOpeningBracketAt = i; + tag.slashPresent = false; + tag.attributes = []; + // since 2.1.0 we started to care about not trimming outer whitespace which is not spaces. + // For example, " \t <a> \n ". Tag's whitespace boundaries should not extend to string + // edges but until "\t" on the left and "\n" on the right IF opts.trimOnlySpaces is on. + if (chunkOfWhitespaceStartsAt === null) { + tag.leftOuterWhitespace = i; + } + else if (opts.trimOnlySpaces && chunkOfWhitespaceStartsAt === 0) { + // if whitespace extends to the beginning of a string, there's a risk it might include + // not only spaces. To fix that, switch to space-only range marker: + /* istanbul ignore next */ + tag.leftOuterWhitespace = chunkOfSpacesStartsAt || i; + } + else { + tag.leftOuterWhitespace = chunkOfWhitespaceStartsAt; + } + // tag.leftOuterWhitespace = + // chunkOfWhitespaceStartsAt === null ? i : chunkOfWhitespaceStartsAt; + // tend the HTML comments: <!-- --> or CDATA: <![CDATA[ ... ]]> + // if opening comment tag is detected, traverse forward aggressively + // until EOL or "-->" is reached and offset outer index "i". + if (`${str[i + 1]}${str[i + 2]}${str[i + 3]}` === "!--" || + `${str[i + 1]}${str[i + 2]}${str[i + 3]}${str[i + 4]}${str[i + 5]}${str[i + 6]}${str[i + 7]}${str[i + 8]}` === "![CDATA[") { + // make a note which one it is: + let cdata = true; + if (str[i + 2] === "-") { + cdata = false; + } + let closingFoundAt; + for (let y = i; y < len; y++) { + if ((!closingFoundAt && + cdata && + `${str[y - 2]}${str[y - 1]}${str[y]}` === "]]>") || + (!cdata && `${str[y - 2]}${str[y - 1]}${str[y]}` === "-->")) { + closingFoundAt = y; + } + if (closingFoundAt && + ((closingFoundAt < y && str[y].trim()) || + str[y + 1] === undefined)) { + let rangeEnd = y; + if ((str[y + 1] === undefined && !str[y].trim()) || + str[y] === ">") { + rangeEnd += 1; + } + // submit the tag + /* istanbul ignore else */ + if (!allTagLocations.length || + allTagLocations[allTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + allTagLocations.push([ + tag.lastOpeningBracketAt, + closingFoundAt + 1, + ]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || + filteredTagLocations[filteredTagLocations.length - 1][0] !== + tag.lastOpeningBracketAt) { + filteredTagLocations.push([ + tag.lastOpeningBracketAt, + closingFoundAt + 1, + ]); + } + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, y, tag.leftOuterWhitespace, rangeEnd, tag.lastOpeningBracketAt, closingFoundAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: rangeEnd, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [ + tag.leftOuterWhitespace, + rangeEnd, + whiteSpaceCompensation, + ], + }); + // offset: + i = y - 1; + if (str[y] === ">") { + i = y; + } + // resets: + tag = {}; + attrObj = {}; + // finally, + break; + } + } + } + } + } + } + // catch whitespace + // ------------------------------------------------------------------------- + if (!str[i].trim()) { + // 1. catch chunk boundaries: + if (chunkOfWhitespaceStartsAt === null) { + chunkOfWhitespaceStartsAt = i; + if (tag.lastOpeningBracketAt !== undefined && + tag.lastOpeningBracketAt < i && + tag.nameStarts && + tag.nameStarts < tag.lastOpeningBracketAt && + i === tag.lastOpeningBracketAt + 1 && + // insurance against tail part of ranged tag being deleted: + !rangedOpeningTags.some( + // eslint-disable-next-line no-loop-func + (rangedTagObj) => rangedTagObj.name === tag.name)) { + tag.onlyPlausible = true; + tag.name = undefined; + tag.nameStarts = undefined; + } + } + } + else if (chunkOfWhitespaceStartsAt !== null) { + // 1. piggyback the catching of the attributes with equal and no value + if (!tag.quotes && + attrObj.equalsAt > chunkOfWhitespaceStartsAt - 1 && + attrObj.nameEnds && + attrObj.equalsAt > attrObj.nameEnds && + str[i] !== '"' && + str[i] !== "'") { + /* istanbul ignore else */ + if (lodash_isplainobject(attrObj)) { + tag.attributes.push(attrObj); + } + // reset: + attrObj = {}; + tag.equalsSpottedAt = undefined; + } + // 2. reset whitespace marker + chunkOfWhitespaceStartsAt = null; + } + // catch spaces-only chunks (needed for outer trim option opts.trimOnlySpaces) + // ------------------------------------------------------------------------- + if (str[i] === " ") { + // 1. catch spaces boundaries: + if (chunkOfSpacesStartsAt === null) { + chunkOfSpacesStartsAt = i; + } + } + else if (chunkOfSpacesStartsAt !== null) { + // 2. reset the marker + chunkOfSpacesStartsAt = null; + } + // log all + // ------------------------------------------------------------------------- + // console.log( + // `${`\u001b[${33}m${`chunkOfSpacesStartsAt`}\u001b[${39}m`} = ${JSON.stringify( + // chunkOfSpacesStartsAt, + // null, + // 4 + // )}` + // ); + // console.log( + // `${`\u001b[${33}m${`chunkOfWhitespaceStartsAt`}\u001b[${39}m`} = ${JSON.stringify( + // chunkOfWhitespaceStartsAt, + // null, + // 4 + // )}` + // ); + } + // trim but in ranges + // first tackle the beginning on the string + if (str && + // if only spaces were meant to be trimmed, + ((opts.trimOnlySpaces && + // and first character is a space + str[0] === " ") || + // if normal trim is requested + (!opts.trimOnlySpaces && + // and the first character is whitespace character + !str[0].trim()))) { + for (let i = 0, len = str.length; i < len; i++) { + if ((opts.trimOnlySpaces && str[i] !== " ") || + (!opts.trimOnlySpaces && str[i].trim())) { + rangesToDelete.push([0, i]); + break; + } + else if (!str[i + 1]) { + // if end has been reached and whole string has been trimmable + rangesToDelete.push([0, i + 1]); + } + } + } + if (str && + // if only spaces were meant to be trimmed, + ((opts.trimOnlySpaces && + // and last character is a space + str[str.length - 1] === " ") || + // if normal trim is requested + (!opts.trimOnlySpaces && + // and the last character is whitespace character + !str[str.length - 1].trim()))) { + for (let i = str.length; i--;) { + if ((opts.trimOnlySpaces && str[i] !== " ") || + (!opts.trimOnlySpaces && str[i].trim())) { + rangesToDelete.push([i + 1, str.length]); + break; + } + // don't tackle end-to-end because it would have been already caught on the + // start-to-end direction loop above. + } + } + // last correction, imagine we've got text-whitespace-tag. + // That last part "tag" was removed but "whitespace" in between is on the left. + // We need to trim() that too if applicable. + // By now we'll be able to tell, is starting/ending range array touching + // the start (index 0) or end (str.length - 1) character indexes, and if so, + // their inner sides will need to be trimmed accordingly, considering the + // "opts.trimOnlySpaces" of course. + const curr = rangesToDelete.current(); + if ((!originalOpts || !originalOpts.cb) && curr) { + // check front - the first range of gathered ranges, does it touch start (0) + if (curr[0] && !curr[0][0]) { + curr[0][1]; + // check the character at str[startingIdx] + // manually edit Ranges class: + rangesToDelete.ranges[0] = [ + rangesToDelete.ranges[0][0], + rangesToDelete.ranges[0][1], + ]; + } + // check end - the last range of gathered ranges, does it touch the end (str.length) + // PS. remember ending is not inclusive, so ranges covering the whole ending + // would go up to str.length, not up to str.length - 1! + if (curr[curr.length - 1] && curr[curr.length - 1][1] === str.length) { + curr[curr.length - 1][0]; + // check character at str[startingIdx - 1] + // remove third element from the last range "what to add" - because + // ranges will crop aggressively, covering all whitespace, but they + // then restore missing spaces (in which case it's not missing). + // We already have tight crop, we just need to remove that "what to add" + // third element. + // hard edit: + /* istanbul ignore else */ + if (rangesToDelete.ranges) { + let startingIdx2 = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][0]; + if (str[startingIdx2 - 1] && + ((opts.trimOnlySpaces && str[startingIdx2 - 1] === " ") || + (!opts.trimOnlySpaces && !str[startingIdx2 - 1].trim()))) { + startingIdx2 -= 1; + } + const backupWhatToAdd = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][2]; + rangesToDelete.ranges[rangesToDelete.ranges.length - 1] = [ + startingIdx2, + rangesToDelete.ranges[rangesToDelete.ranges.length - 1][1], + ]; + // for cases of opts.dumpLinkHrefsNearby + if (backupWhatToAdd && backupWhatToAdd.trim()) { + rangesToDelete.ranges[rangesToDelete.ranges.length - 1].push(backupWhatToAdd.trimEnd()); + } + } + } + } + const res = { + log: { + timeTakenInMilliseconds: Date.now() - start, + }, + result: rApply(str, rangesToDelete.current()), + ranges: rangesToDelete.current(), + allTagLocations, + filteredTagLocations, + }; + return res; +} + +exports.defaults = defaults; +exports.stripHtml = stripHtml; +exports.version = version; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/school/node_modules/string-strip-html/dist/string-strip-html.esm.js b/school/node_modules/string-strip-html/dist/string-strip-html.esm.js new file mode 100644 index 0000000..1cd9efd --- /dev/null +++ b/school/node_modules/string-strip-html/dist/string-strip-html.esm.js @@ -0,0 +1,752 @@ +/** + * @name string-strip-html + * @fileoverview Strips HTML tags from strings. No parser, accepts mixed sources. + * @version 8.3.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-strip-html/} + */ + +import isObj from 'lodash.isplainobject'; +import trim from 'lodash.trim'; +import without from 'lodash.without'; +import { decode } from 'html-entities'; +import { rApply } from 'ranges-apply'; +import { Ranges } from 'ranges-push'; +import { right } from 'string-left-right'; + +/* istanbul ignore next */ +function characterSuitableForNames(char) { + return /[-_A-Za-z0-9]/.test(char); +} +/* istanbul ignore next */ +function prepHopefullyAnArray(something, name) { + if (!something) { + return []; + } + if (Array.isArray(something)) { + return something.filter(val => typeof val === "string" && val.trim()); + } + if (typeof something === "string") { + return something.trim() ? [something] : []; + } + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] ${name} must be array containing zero or more strings or something falsey. Currently it's equal to: ${something}, that a type of ${typeof something}.`); +} +/* istanbul ignore next */ +function xBeforeYOnTheRight(str, startingIdx, x, y) { + for (let i = startingIdx, len = str.length; i < len; i++) { + if (str.startsWith(x, i)) { + return true; + } + if (str.startsWith(y, i)) { + return false; + } + } + return false; +} +/* istanbul ignore next */ +function notWithinAttrQuotes(tag, str, i) { + return !tag || !tag.quotes || !xBeforeYOnTheRight(str, i + 1, tag.quotes.value, ">"); +} + +var version$1 = "8.3.0"; + +const version = version$1; +const defaults = { + ignoreTags: [], + onlyStripTags: [], + stripTogetherWithTheirContents: ["script", "style", "xml"], + skipHtmlDecoding: false, + trimOnlySpaces: false, + dumpLinkHrefsNearby: { + enabled: false, + putOnNewLine: false, + wrapHeads: "", + wrapTails: "" + }, + cb: null +}; +function stripHtml(str, originalOpts) { + const start = Date.now(); + const definitelyTagNames = new Set(["!doctype", "abbr", "address", "area", "article", "aside", "audio", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "doctype", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "param", "picture", "pre", "progress", "rb", "rp", "rt", "rtc", "ruby", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "ul", "var", "video", "wbr", "xml"]); + const singleLetterTags = new Set(["a", "b", "i", "p", "q", "s", "u"]); + const punctuation = new Set([".", ",", "?", ";", ")", "\u2026", '"', "\u00BB"]); + const rangedOpeningTags = []; + const allTagLocations = []; + let filteredTagLocations = []; + let tag = {}; + function resetTag() { + tag = { + attributes: [] + }; + } + resetTag(); + let chunkOfWhitespaceStartsAt = null; + let chunkOfSpacesStartsAt = null; + let attrObj = {}; + let hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined + }; + let stringToInsertAfter = ""; + let hrefInsertionActive = false; + let spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + function existy(x) { + return x != null; + } + function isStr(something) { + return typeof something === "string"; + } + function treatRangedTags(i, opts, rangesToDelete) { + if (Array.isArray(opts.stripTogetherWithTheirContents) && (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*"))) { + if (Array.isArray(rangedOpeningTags) && rangedOpeningTags.some(obj => obj.name === tag.name && obj.lastClosingBracketAt < i)) { + for (let y = rangedOpeningTags.length; y--;) { + if (rangedOpeningTags[y].name === tag.name) { + /* istanbul ignore else */ + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + filteredTagLocations = filteredTagLocations.filter(([from, upto]) => (from < rangedOpeningTags[y].lastOpeningBracketAt || from >= i + 1) && (upto <= rangedOpeningTags[y].lastOpeningBracketAt || upto > i + 1)); + } + let endingIdx = i + 1; + if (tag.lastClosingBracketAt) { + endingIdx = tag.lastClosingBracketAt + 1; + } + filteredTagLocations.push([rangedOpeningTags[y].lastOpeningBracketAt, endingIdx]); + /* istanbul ignore else */ + if (punctuation.has(str[i]) && opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i + 1, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: [rangedOpeningTags[y].lastOpeningBracketAt, i, null] + }); + } else if (opts.cb) { + opts.cb({ + tag: tag, + deleteFrom: rangedOpeningTags[y].lastOpeningBracketAt, + deleteTo: i, + insert: "", + rangesArr: rangesToDelete, + proposedReturn: [rangedOpeningTags[y].lastOpeningBracketAt, i, ""] + }); + } + rangedOpeningTags.splice(y, 1); + break; + } + } + } else { + rangedOpeningTags.push(tag); + } + } + } + function calculateWhitespaceToInsert(str2, + currCharIdx, + fromIdx, + toIdx, + lastOpeningBracketAt, + lastClosingBracketAt + ) { + let strToEvaluateForLineBreaks = ""; + if (Number.isInteger(fromIdx) && fromIdx < lastOpeningBracketAt) { + strToEvaluateForLineBreaks += str2.slice(fromIdx, lastOpeningBracketAt); + } + if (Number.isInteger(toIdx) && toIdx > lastClosingBracketAt + 1) { + const temp = str2.slice(lastClosingBracketAt + 1, toIdx); + if (temp.includes("\n") && isOpeningAt(toIdx, str2)) { + strToEvaluateForLineBreaks += " "; + } else { + strToEvaluateForLineBreaks += temp; + } + } + if (!punctuation.has(str2[currCharIdx]) && str2[currCharIdx] !== "!") { + const foundLineBreaks = strToEvaluateForLineBreaks.match(/\n/g); + if (Array.isArray(foundLineBreaks) && foundLineBreaks.length) { + if (foundLineBreaks.length === 1) { + return "\n"; + } + if (foundLineBreaks.length === 2) { + return "\n\n"; + } + return "\n\n\n"; + } + return " "; + } + return ""; + } + function calculateHrefToBeInserted(opts) { + if (opts.dumpLinkHrefsNearby.enabled && hrefDump.tagName && hrefDump.tagName === tag.name && tag.lastOpeningBracketAt && (hrefDump.openingTagEnds && tag.lastOpeningBracketAt > hrefDump.openingTagEnds || !hrefDump.openingTagEnds)) { + hrefInsertionActive = true; + } + if (hrefInsertionActive) { + const lineBreaks = opts.dumpLinkHrefsNearby.putOnNewLine ? "\n\n" : ""; + stringToInsertAfter = `${lineBreaks}${hrefDump.hrefValue}${lineBreaks}`; + } + } + function isOpeningAt(i, customStr) { + if (customStr) { + return customStr[i] === "<" && customStr[i + 1] !== "%"; + } + return str[i] === "<" && str[i + 1] !== "%"; + } + function isClosingAt(i) { + return str[i] === ">" && str[i - 1] !== "%"; + } + if (typeof str !== "string") { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof str).toLowerCase()}, equal to:\n${JSON.stringify(str, null, 4)}`); + } + if (originalOpts && !isObj(originalOpts)) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof originalOpts).toLowerCase()}, equal to:\n${JSON.stringify(originalOpts, null, 4)}`); + } + function resetHrefMarkers() { + if (hrefInsertionActive) { + hrefDump = { + tagName: "", + hrefValue: "", + openingTagEnds: undefined + }; + hrefInsertionActive = false; + } + } + const opts = { ...defaults, + ...originalOpts + }; + if (Object.prototype.hasOwnProperty.call(opts, "returnRangesOnly")) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] opts.returnRangesOnly has been removed from the API since v.5 release.`); + } + opts.ignoreTags = prepHopefullyAnArray(opts.ignoreTags, "opts.ignoreTags"); + opts.onlyStripTags = prepHopefullyAnArray(opts.onlyStripTags, "opts.onlyStripTags"); + const onlyStripTagsMode = !!opts.onlyStripTags.length; + if (opts.onlyStripTags.length && opts.ignoreTags.length) { + opts.onlyStripTags = without(opts.onlyStripTags, ...opts.ignoreTags); + } + if (!isObj(opts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = { ...defaults.dumpLinkHrefsNearby + }; + } + opts.dumpLinkHrefsNearby = defaults.dumpLinkHrefsNearby; + if (originalOpts && Object.prototype.hasOwnProperty.call(originalOpts, "dumpLinkHrefsNearby") && existy(originalOpts.dumpLinkHrefsNearby)) { + /* istanbul ignore else */ + if (isObj(originalOpts.dumpLinkHrefsNearby)) { + opts.dumpLinkHrefsNearby = { ...defaults.dumpLinkHrefsNearby, + ...originalOpts.dumpLinkHrefsNearby + }; + } else if (originalOpts.dumpLinkHrefsNearby) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_04] Optional Options Object's key dumpLinkHrefsNearby was set to ${typeof originalOpts.dumpLinkHrefsNearby}, equal to ${JSON.stringify(originalOpts.dumpLinkHrefsNearby, null, 4)}. The only allowed value is a plain object. See the API reference.`); + } + } + if (!opts.stripTogetherWithTheirContents) { + opts.stripTogetherWithTheirContents = []; + } else if (typeof opts.stripTogetherWithTheirContents === "string" && opts.stripTogetherWithTheirContents.length) { + opts.stripTogetherWithTheirContents = [opts.stripTogetherWithTheirContents]; + } + const somethingCaught = {}; + if (opts.stripTogetherWithTheirContents && Array.isArray(opts.stripTogetherWithTheirContents) && opts.stripTogetherWithTheirContents.length && !opts.stripTogetherWithTheirContents.every((el, i) => { + if (!(typeof el === "string")) { + somethingCaught.el = el; + somethingCaught.i = i; + return false; + } + return true; + })) { + throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${somethingCaught.i} has a value ${somethingCaught.el} which is not string but ${(typeof somethingCaught.el).toLowerCase()}.`); + } + if (!opts.cb) { + opts.cb = ({ + rangesArr, + proposedReturn + }) => { + if (proposedReturn) { + rangesArr.push(...proposedReturn); + } + }; + } + const rangesToDelete = new Ranges({ + limitToBeAddedWhitespace: true, + limitLinebreaksCount: 2 + }); + if (!opts.skipHtmlDecoding) { + while (str !== decode(str, { + scope: "strict" + })) { + str = decode(str, { + scope: "strict" + }); + } + } + for (let i = 0, len = str.length; i < len; i++) { + if (Object.keys(tag).length > 1 && tag.lastClosingBracketAt && tag.lastClosingBracketAt < i && str[i] !== " " && spacesChunkWhichFollowsTheClosingBracketEndsAt === null) { + spacesChunkWhichFollowsTheClosingBracketEndsAt = i; + } + if (str[i] === "%" && str[i - 1] === "{" && str.includes("%}", i + 1)) { + i = str.indexOf("%}", i) - 1; + continue; + } + if (isClosingAt(i)) { + if ((!tag || Object.keys(tag).length < 2) && i > 1) { + for (let y = i; y--;) { + if (str[y - 1] === undefined || isClosingAt(y)) { + const startingPoint = str[y - 1] === undefined ? y : y + 1; + const culprit = str.slice(startingPoint, i + 1); + if (str !== `<${trim(culprit.trim(), "/>")}>` && + [...definitelyTagNames].some(val => trim(culprit.trim().split(/\s+/).filter(val2 => val2.trim()).filter((_val3, i3) => i3 === 0), "/>").toLowerCase() === val) && stripHtml(`<${culprit.trim()}>`, opts).result === "") { + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([startingPoint, i + 1]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([startingPoint, i + 1]); + } + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, startingPoint, i + 1, startingPoint, i + 1); + let deleteUpTo = i + 1; + if (str[deleteUpTo] && !str[deleteUpTo].trim()) { + for (let z = deleteUpTo; z < len; z++) { + if (str[z].trim()) { + deleteUpTo = z; + break; + } + } + } + opts.cb({ + tag: tag, + deleteFrom: startingPoint, + deleteTo: deleteUpTo, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [startingPoint, deleteUpTo, whiteSpaceCompensation] + }); + } + break; + } + } + } + } + if (str[i] === "/" && !(tag.quotes && tag.quotes.value) && Number.isInteger(tag.lastOpeningBracketAt) && !Number.isInteger(tag.lastClosingBracketAt)) { + tag.slashPresent = i; + } + if (str[i] === '"' || str[i] === "'") { + if (tag.nameStarts && tag.quotes && tag.quotes.value && tag.quotes.value === str[i]) { + attrObj.valueEnds = i; + attrObj.value = str.slice(attrObj.valueStarts, i); + tag.attributes.push(attrObj); + attrObj = {}; + tag.quotes = undefined; + let hrefVal; + if (opts.dumpLinkHrefsNearby.enabled && + tag.attributes.some(obj => { + if (obj.name && obj.name.toLowerCase() === "href") { + hrefVal = `${opts.dumpLinkHrefsNearby.wrapHeads || ""}${obj.value}${opts.dumpLinkHrefsNearby.wrapTails || ""}`; + return true; + } + })) { + hrefDump = { + tagName: tag.name, + hrefValue: hrefVal, + openingTagEnds: undefined + }; + } + } else if (!tag.quotes && tag.nameStarts) { + tag.quotes = {}; + tag.quotes.value = str[i]; + tag.quotes.start = i; + if (attrObj.nameStarts && attrObj.nameEnds && attrObj.nameEnds < i && attrObj.nameStarts < i && !attrObj.valueStarts) { + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } + } + if (tag.nameStarts !== undefined && tag.nameEnds === undefined && (!str[i].trim() || !characterSuitableForNames(str[i]))) { + tag.nameEnds = i; + tag.name = str.slice(tag.nameStarts, tag.nameEnds + ( + /* istanbul ignore next */ + !isClosingAt(i) && str[i] !== "/" && str[i + 1] === undefined ? 1 : 0)); + if ( + str[tag.nameStarts - 1] !== "!" && + !tag.name.replace(/-/g, "").length || + /^\d+$/.test(tag.name[0])) { + tag = {}; + continue; + } + if (isOpeningAt(i)) { + calculateHrefToBeInserted(opts); + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i, tag.lastOpeningBracketAt, i); + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + /* istanbul ignore next */ + filteredTagLocations = filteredTagLocations.filter(([from, upto]) => !(from === tag.leftOuterWhitespace && upto === i)); + } + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i, + insert: `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, i, `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`] + }); + resetHrefMarkers(); + treatRangedTags(i, opts, rangesToDelete); + } + } + if (tag.quotes && tag.quotes.start && tag.quotes.start < i && !tag.quotes.end && attrObj.nameEnds && attrObj.equalsAt && !attrObj.valueStarts) { + attrObj.valueStarts = i; + } + if (!tag.quotes && attrObj.nameEnds && str[i] === "=" && !attrObj.valueStarts && !attrObj.equalsAt) { + attrObj.equalsAt = i; + } + if (!tag.quotes && attrObj.nameStarts && attrObj.nameEnds && !attrObj.valueStarts && str[i].trim() && str[i] !== "=") { + tag.attributes.push(attrObj); + attrObj = {}; + } + if (!tag.quotes && attrObj.nameStarts && !attrObj.nameEnds) { + if (!str[i].trim()) { + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } else if (str[i] === "=") { + /* istanbul ignore else */ + if (!attrObj.equalsAt) { + attrObj.nameEnds = i; + attrObj.equalsAt = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + } + } else if (str[i] === "/" || isClosingAt(i)) { + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + tag.attributes.push(attrObj); + attrObj = {}; + } else if (isOpeningAt(i)) { + attrObj.nameEnds = i; + attrObj.name = str.slice(attrObj.nameStarts, attrObj.nameEnds); + tag.attributes.push(attrObj); + attrObj = {}; + } + } + if (!tag.quotes && tag.nameEnds < i && !str[i - 1].trim() && str[i].trim() && !`<>/!`.includes(str[i]) && !attrObj.nameStarts && !tag.lastClosingBracketAt) { + attrObj.nameStarts = i; + } + if (tag.lastOpeningBracketAt !== null && tag.lastOpeningBracketAt < i && str[i] === "/" && tag.onlyPlausible) { + tag.onlyPlausible = false; + } + if (tag.lastOpeningBracketAt !== null && tag.lastOpeningBracketAt < i && str[i] !== "/" + ) { + if (tag.onlyPlausible === undefined) { + if ((!str[i].trim() || isOpeningAt(i)) && !tag.slashPresent) { + tag.onlyPlausible = true; + } else { + tag.onlyPlausible = false; + } + } + if (str[i].trim() && tag.nameStarts === undefined && !isOpeningAt(i) && str[i] !== "/" && !isClosingAt(i) && str[i] !== "!") { + tag.nameStarts = i; + tag.nameContainsLetters = false; + } + } + if (tag.nameStarts && !tag.quotes && str[i].toLowerCase() !== str[i].toUpperCase()) { + tag.nameContainsLetters = true; + } + if ( + isClosingAt(i) && + notWithinAttrQuotes(tag, str, i)) { + if (tag.lastOpeningBracketAt !== undefined) { + tag.lastClosingBracketAt = i; + spacesChunkWhichFollowsTheClosingBracketEndsAt = null; + if (Object.keys(attrObj).length) { + tag.attributes.push(attrObj); + attrObj = {}; + } + if (opts.dumpLinkHrefsNearby.enabled && hrefDump.tagName && !hrefDump.openingTagEnds) { + hrefDump.openingTagEnds = i; + } + } + } + if (tag.lastOpeningBracketAt !== undefined) { + if (tag.lastClosingBracketAt === undefined) { + if (tag.lastOpeningBracketAt < i && !isOpeningAt(i) && ( + str[i + 1] === undefined || isOpeningAt(i + 1)) && tag.nameContainsLetters) { + tag.name = str.slice(tag.nameStarts, tag.nameEnds ? tag.nameEnds : i + 1).toLowerCase(); + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + if ( + opts.ignoreTags.includes(tag.name) || + tag.onlyPlausible && !definitelyTagNames.has(tag.name)) { + tag = {}; + attrObj = {}; + continue; + } + if ((definitelyTagNames.has(tag.name) || singleLetterTags.has(tag.name)) && (tag.onlyPlausible === false || tag.onlyPlausible === true && tag.attributes.length) || str[i + 1] === undefined) { + calculateHrefToBeInserted(opts); + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i + 1, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i + 1, + insert: `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, i + 1, `${whiteSpaceCompensation}${stringToInsertAfter}${whiteSpaceCompensation}`] + }); + resetHrefMarkers(); + treatRangedTags(i, opts, rangesToDelete); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt && filteredTagLocations[filteredTagLocations.length - 1][1] !== i + 1) { + if (opts.stripTogetherWithTheirContents.includes(tag.name) || opts.stripTogetherWithTheirContents.includes("*")) { + let lastRangedOpeningTag; + for (let z = rangedOpeningTags.length; z--;) { + /* istanbul ignore else */ + if (rangedOpeningTags[z].name === tag.name) { + lastRangedOpeningTag = rangedOpeningTags[z]; + } + } + /* istanbul ignore else */ + if (lastRangedOpeningTag) { + filteredTagLocations = filteredTagLocations.filter(([from]) => from !== lastRangedOpeningTag.lastOpeningBracketAt); + filteredTagLocations.push([lastRangedOpeningTag.lastOpeningBracketAt, i + 1]); + } else { + /* istanbul ignore next */ + filteredTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + } else { + filteredTagLocations.push([tag.lastOpeningBracketAt, i + 1]); + } + } + } + } else if (i > tag.lastClosingBracketAt && str[i].trim() || str[i + 1] === undefined) { + let endingRangeIndex = tag.lastClosingBracketAt === i ? i + 1 : i; + if (opts.trimOnlySpaces && endingRangeIndex === len - 1 && spacesChunkWhichFollowsTheClosingBracketEndsAt !== null && spacesChunkWhichFollowsTheClosingBracketEndsAt < i) { + endingRangeIndex = spacesChunkWhichFollowsTheClosingBracketEndsAt; + } + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1]); + } + if (!onlyStripTagsMode && opts.ignoreTags.includes(tag.name) || onlyStripTagsMode && !opts.onlyStripTags.includes(tag.name)) { + opts.cb({ + tag: tag, + deleteFrom: null, + deleteTo: null, + insert: null, + rangesArr: rangesToDelete, + proposedReturn: null + }); + tag = {}; + attrObj = {}; + } else if (!tag.onlyPlausible || + tag.attributes.length === 0 && tag.name && (definitelyTagNames.has(tag.name.toLowerCase()) || singleLetterTags.has(tag.name.toLowerCase())) || + tag.attributes && tag.attributes.some(attrObj2 => attrObj2.equalsAt)) { + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1]); + } + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, endingRangeIndex, tag.lastOpeningBracketAt, tag.lastClosingBracketAt); + stringToInsertAfter = ""; + hrefInsertionActive = false; + calculateHrefToBeInserted(opts); + let insert; + if (isStr(stringToInsertAfter) && stringToInsertAfter.length) { + insert = `${whiteSpaceCompensation}${stringToInsertAfter}${ + /* istanbul ignore next */ + whiteSpaceCompensation === "\n\n" ? "\n" : whiteSpaceCompensation}`; + } else { + insert = whiteSpaceCompensation; + } + if (tag.leftOuterWhitespace === 0 || !right(str, endingRangeIndex - 1)) { + insert = ""; + } + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: endingRangeIndex, + insert, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, endingRangeIndex, insert] + }); + resetHrefMarkers(); + treatRangedTags(i, opts, rangesToDelete); + } else { + tag = {}; + } + if (!isClosingAt(i)) { + tag = {}; + } + } + } + if (isOpeningAt(i) && !isOpeningAt(i - 1) && !`'"`.includes(str[i + 1]) && (!`'"`.includes(str[i + 2]) || /\w/.test(str[i + 1])) && + !(str[i + 1] === "c" && str[i + 2] === ":") && + !(str[i + 1] === "f" && str[i + 2] === "m" && str[i + 3] === "t" && str[i + 4] === ":") && + !(str[i + 1] === "s" && str[i + 2] === "q" && str[i + 3] === "l" && str[i + 4] === ":") && + !(str[i + 1] === "x" && str[i + 2] === ":") && + !(str[i + 1] === "f" && str[i + 2] === "n" && str[i + 3] === ":") && + notWithinAttrQuotes(tag, str, i)) { + if (isClosingAt(right(str, i))) { + continue; + } else { + if (tag.nameEnds && tag.nameEnds < i && !tag.lastClosingBracketAt) { + if (tag.onlyPlausible === true && tag.attributes && tag.attributes.length || tag.onlyPlausible === false) { + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, i, tag.leftOuterWhitespace, i, tag.lastOpeningBracketAt, i); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: i, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, i, whiteSpaceCompensation] + }); + treatRangedTags(i, opts, rangesToDelete); + tag = {}; + attrObj = {}; + } + } + if (tag.lastOpeningBracketAt !== undefined && tag.onlyPlausible && tag.name && !tag.quotes) { + tag.lastOpeningBracketAt = undefined; + tag.name = undefined; + tag.onlyPlausible = false; + } + if ((tag.lastOpeningBracketAt === undefined || !tag.onlyPlausible) && !tag.quotes) { + tag.lastOpeningBracketAt = i; + tag.slashPresent = false; + tag.attributes = []; + if (chunkOfWhitespaceStartsAt === null) { + tag.leftOuterWhitespace = i; + } else if (opts.trimOnlySpaces && chunkOfWhitespaceStartsAt === 0) { + /* istanbul ignore next */ + tag.leftOuterWhitespace = chunkOfSpacesStartsAt || i; + } else { + tag.leftOuterWhitespace = chunkOfWhitespaceStartsAt; + } + if (`${str[i + 1]}${str[i + 2]}${str[i + 3]}` === "!--" || `${str[i + 1]}${str[i + 2]}${str[i + 3]}${str[i + 4]}${str[i + 5]}${str[i + 6]}${str[i + 7]}${str[i + 8]}` === "![CDATA[") { + let cdata = true; + if (str[i + 2] === "-") { + cdata = false; + } + let closingFoundAt; + for (let y = i; y < len; y++) { + if (!closingFoundAt && cdata && `${str[y - 2]}${str[y - 1]}${str[y]}` === "]]>" || !cdata && `${str[y - 2]}${str[y - 1]}${str[y]}` === "-->") { + closingFoundAt = y; + } + if (closingFoundAt && (closingFoundAt < y && str[y].trim() || str[y + 1] === undefined)) { + let rangeEnd = y; + if (str[y + 1] === undefined && !str[y].trim() || str[y] === ">") { + rangeEnd += 1; + } + /* istanbul ignore else */ + if (!allTagLocations.length || allTagLocations[allTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + allTagLocations.push([tag.lastOpeningBracketAt, closingFoundAt + 1]); + } + /* istanbul ignore else */ + if (!filteredTagLocations.length || filteredTagLocations[filteredTagLocations.length - 1][0] !== tag.lastOpeningBracketAt) { + filteredTagLocations.push([tag.lastOpeningBracketAt, closingFoundAt + 1]); + } + const whiteSpaceCompensation = calculateWhitespaceToInsert(str, y, tag.leftOuterWhitespace, rangeEnd, tag.lastOpeningBracketAt, closingFoundAt); + opts.cb({ + tag: tag, + deleteFrom: tag.leftOuterWhitespace, + deleteTo: rangeEnd, + insert: whiteSpaceCompensation, + rangesArr: rangesToDelete, + proposedReturn: [tag.leftOuterWhitespace, rangeEnd, whiteSpaceCompensation] + }); + i = y - 1; + if (str[y] === ">") { + i = y; + } + tag = {}; + attrObj = {}; + break; + } + } + } + } + } + } + if (!str[i].trim()) { + if (chunkOfWhitespaceStartsAt === null) { + chunkOfWhitespaceStartsAt = i; + if (tag.lastOpeningBracketAt !== undefined && tag.lastOpeningBracketAt < i && tag.nameStarts && tag.nameStarts < tag.lastOpeningBracketAt && i === tag.lastOpeningBracketAt + 1 && + !rangedOpeningTags.some( + rangedTagObj => rangedTagObj.name === tag.name)) { + tag.onlyPlausible = true; + tag.name = undefined; + tag.nameStarts = undefined; + } + } + } else if (chunkOfWhitespaceStartsAt !== null) { + if (!tag.quotes && attrObj.equalsAt > chunkOfWhitespaceStartsAt - 1 && attrObj.nameEnds && attrObj.equalsAt > attrObj.nameEnds && str[i] !== '"' && str[i] !== "'") { + /* istanbul ignore else */ + if (isObj(attrObj)) { + tag.attributes.push(attrObj); + } + attrObj = {}; + tag.equalsSpottedAt = undefined; + } + chunkOfWhitespaceStartsAt = null; + } + if (str[i] === " ") { + if (chunkOfSpacesStartsAt === null) { + chunkOfSpacesStartsAt = i; + } + } else if (chunkOfSpacesStartsAt !== null) { + chunkOfSpacesStartsAt = null; + } + } + if (str && ( + opts.trimOnlySpaces && + str[0] === " " || + !opts.trimOnlySpaces && + !str[0].trim())) { + for (let i = 0, len = str.length; i < len; i++) { + if (opts.trimOnlySpaces && str[i] !== " " || !opts.trimOnlySpaces && str[i].trim()) { + rangesToDelete.push([0, i]); + break; + } else if (!str[i + 1]) { + rangesToDelete.push([0, i + 1]); + } + } + } + if (str && ( + opts.trimOnlySpaces && + str[str.length - 1] === " " || + !opts.trimOnlySpaces && + !str[str.length - 1].trim())) { + for (let i = str.length; i--;) { + if (opts.trimOnlySpaces && str[i] !== " " || !opts.trimOnlySpaces && str[i].trim()) { + rangesToDelete.push([i + 1, str.length]); + break; + } + } + } + const curr = rangesToDelete.current(); + if ((!originalOpts || !originalOpts.cb) && curr) { + if (curr[0] && !curr[0][0]) { + curr[0][1]; + rangesToDelete.ranges[0] = [rangesToDelete.ranges[0][0], rangesToDelete.ranges[0][1]]; + } + if (curr[curr.length - 1] && curr[curr.length - 1][1] === str.length) { + curr[curr.length - 1][0]; + /* istanbul ignore else */ + if (rangesToDelete.ranges) { + let startingIdx2 = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][0]; + if (str[startingIdx2 - 1] && (opts.trimOnlySpaces && str[startingIdx2 - 1] === " " || !opts.trimOnlySpaces && !str[startingIdx2 - 1].trim())) { + startingIdx2 -= 1; + } + const backupWhatToAdd = rangesToDelete.ranges[rangesToDelete.ranges.length - 1][2]; + rangesToDelete.ranges[rangesToDelete.ranges.length - 1] = [startingIdx2, rangesToDelete.ranges[rangesToDelete.ranges.length - 1][1]]; + if (backupWhatToAdd && backupWhatToAdd.trim()) { + rangesToDelete.ranges[rangesToDelete.ranges.length - 1].push(backupWhatToAdd.trimEnd()); + } + } + } + } + const res = { + log: { + timeTakenInMilliseconds: Date.now() - start + }, + result: rApply(str, rangesToDelete.current()), + ranges: rangesToDelete.current(), + allTagLocations, + filteredTagLocations + }; + return res; +} + +export { defaults, stripHtml, version }; diff --git a/school/node_modules/string-strip-html/dist/string-strip-html.umd.js b/school/node_modules/string-strip-html/dist/string-strip-html.umd.js new file mode 100644 index 0000000..0f05230 --- /dev/null +++ b/school/node_modules/string-strip-html/dist/string-strip-html.umd.js @@ -0,0 +1,50 @@ +/** + * @name string-strip-html + * @fileoverview Strips HTML tags from strings. No parser, accepts mixed sources. + * @version 8.3.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-strip-html/} + */ + +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).stringStripHtml={})}(this,(function(r){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t,a,n=Object.prototype,o=Function.prototype.toString,s=n.hasOwnProperty,i=o.call(Object),l=n.toString,c=(t=Object.getPrototypeOf,a=Object,function(r){return t(a(r))});var u=function(r){if(!function(r){return!!r&&"object"==typeof r}(r)||"[object Object]"!=l.call(r)||function(r){var e=!1;if(null!=r&&"function"!=typeof r.toString)try{e=!!(r+"")}catch(r){}return e}(r))return!1;var e=c(r);if(null===e)return!0;var t=s.call(e,"constructor")&&e.constructor;return"function"==typeof t&&t instanceof t&&o.call(t)==i},p="[object Symbol]",g=/^\s+|\s+$/g,f="\\u0300-\\u036f\\ufe20-\\ufe23",d="[\\ud800-\\udfff]",h="["+f+"\\u20d0-\\u20f0]",m="\\ud83c[\\udffb-\\udfff]",b="[^\\ud800-\\udfff]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",w="(?:"+h+"|"+m+")"+"?",q="[\\ufe0e\\ufe0f]?",A=q+w+("(?:\\u200d(?:"+[b,y,v].join("|")+")"+q+w+")*"),T="(?:"+[b+h+"?",h,y,v,d].join("|")+")",O=RegExp(m+"(?="+m+")|"+T+A,"g"),k=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),x="object"==typeof self&&self&&self.Object===Object&&self,E="object"==typeof e&&e&&e.Object===Object&&e||x||Function("return this")();function S(r,e,t){if(e!=e)return function(r,e,t,a){for(var n=r.length,o=t+(a?1:-1);a?o--:++o<n;)if(e(r[o],o,r))return o;return-1}(r,_,t);for(var a=t-1,n=r.length;++a<n;)if(r[a]===e)return a;return-1}function _(r){return r!=r}function D(r){return function(r){return k.test(r)}(r)?function(r){return r.match(O)||[]}(r):function(r){return r.split("")}(r)}var L=Object.prototype.toString,N=E.Symbol,R=N?N.prototype:void 0,C=R?R.toString:void 0;function B(r){if("string"==typeof r)return r;if(function(r){return"symbol"==typeof r||function(r){return!!r&&"object"==typeof r}(r)&&L.call(r)==p}(r))return C?C.call(r):"";var e=r+"";return"0"==e&&1/r==-Infinity?"-0":e}function j(r,e,t){var a=r.length;return t=void 0===t?a:t,!e&&t>=a?r:function(r,e,t){var a=-1,n=r.length;e<0&&(e=-e>n?0:n+e),(t=t>n?n:t)<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(n);++a<n;)o[a]=r[a+e];return o}(r,e,t)}var I=function(r,e,t){var a;if((r=null==(a=r)?"":B(a))&&(t||void 0===e))return r.replace(g,"");if(!r||!(e=B(e)))return r;var n=D(r),o=D(e);return j(n,function(r,e){for(var t=-1,a=r.length;++t<a&&S(e,r[t],0)>-1;);return t}(n,o),function(r,e){for(var t=r.length;t--&&S(e,r[t],0)>-1;);return t}(n,o)+1).join("")},H="__lodash_hash_undefined__",F=9007199254740991,U=/^\[object .+?Constructor\]$/,$="object"==typeof self&&self&&self.Object===Object&&self,V="object"==typeof e&&e&&e.Object===Object&&e||$||Function("return this")();function P(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function W(r,e){return!!(r?r.length:0)&&function(r,e,t){if(e!=e)return function(r,e,t,a){var n=r.length,o=t+(a?1:-1);for(;a?o--:++o<n;)if(e(r[o],o,r))return o;return-1}(r,G,t);var a=t-1,n=r.length;for(;++a<n;)if(r[a]===e)return a;return-1}(r,e,0)>-1}function z(r,e,t){for(var a=-1,n=r?r.length:0;++a<n;)if(t(e,r[a]))return!0;return!1}function G(r){return r!=r}function J(r,e){return r.has(e)}var M,Y=Array.prototype,Z=Function.prototype,K=Object.prototype,X=V["__core-js_shared__"],Q=(M=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",rr=Z.toString,er=K.hasOwnProperty,tr=K.toString,ar=RegExp("^"+rr.call(er).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=Y.splice,or=Math.max,sr=mr(V,"Map"),ir=mr(Object,"create");function lr(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function cr(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function ur(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function pr(r){var e=-1,t=r?r.length:0;for(this.__data__=new ur;++e<t;)this.add(r[e])}function gr(r,e){for(var t,a,n=r.length;n--;)if((t=r[n][0])===(a=e)||t!=t&&a!=a)return n;return-1}function fr(r,e,t,a){var n=-1,o=W,s=!0,i=r.length,l=[],c=e.length;if(!i)return l;t&&(e=function(r,e){for(var t=-1,a=r?r.length:0,n=Array(a);++t<a;)n[t]=e(r[t],t,r);return n}(e,function(r){return function(e){return r(e)}}(t))),a?(o=z,s=!1):e.length>=200&&(o=J,s=!1,e=new pr(e));r:for(;++n<i;){var u=r[n],p=t?t(u):u;if(u=a||0!==u?u:0,s&&p==p){for(var g=c;g--;)if(e[g]===p)continue r;l.push(u)}else o(e,p,a)||l.push(u)}return l}function dr(r){return!(!yr(r)||function(r){return!!Q&&Q in r}(r))&&(br(r)||function(r){var e=!1;if(null!=r&&"function"!=typeof r.toString)try{e=!!(r+"")}catch(r){}return e}(r)?ar:U).test(function(r){if(null!=r){try{return rr.call(r)}catch(r){}try{return r+""}catch(r){}}return""}(r))}function hr(r,e){var t,a,n=r.__data__;return("string"==(a=typeof(t=e))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==t:null===t)?n["string"==typeof e?"string":"hash"]:n.map}function mr(r,e){var t=function(r,e){return null==r?void 0:r[e]}(r,e);return dr(t)?t:void 0}function br(r){var e=yr(r)?tr.call(r):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function yr(r){var e=typeof r;return!!r&&("object"==e||"function"==e)}lr.prototype.clear=function(){this.__data__=ir?ir(null):{}},lr.prototype.delete=function(r){return this.has(r)&&delete this.__data__[r]},lr.prototype.get=function(r){var e=this.__data__;if(ir){var t=e[r];return t===H?void 0:t}return er.call(e,r)?e[r]:void 0},lr.prototype.has=function(r){var e=this.__data__;return ir?void 0!==e[r]:er.call(e,r)},lr.prototype.set=function(r,e){return this.__data__[r]=ir&&void 0===e?H:e,this},cr.prototype.clear=function(){this.__data__=[]},cr.prototype.delete=function(r){var e=this.__data__,t=gr(e,r);return!(t<0)&&(t==e.length-1?e.pop():nr.call(e,t,1),!0)},cr.prototype.get=function(r){var e=this.__data__,t=gr(e,r);return t<0?void 0:e[t][1]},cr.prototype.has=function(r){return gr(this.__data__,r)>-1},cr.prototype.set=function(r,e){var t=this.__data__,a=gr(t,r);return a<0?t.push([r,e]):t[a][1]=e,this},ur.prototype.clear=function(){this.__data__={hash:new lr,map:new(sr||cr),string:new lr}},ur.prototype.delete=function(r){return hr(this,r).delete(r)},ur.prototype.get=function(r){return hr(this,r).get(r)},ur.prototype.has=function(r){return hr(this,r).has(r)},ur.prototype.set=function(r,e){return hr(this,r).set(r,e),this},pr.prototype.add=pr.prototype.push=function(r){return this.__data__.set(r,H),this},pr.prototype.has=function(r){return this.__data__.has(r)};var vr=function(r,e){return e=or(void 0===e?r.length-1:e,0),function(){for(var t=arguments,a=-1,n=or(t.length-e,0),o=Array(n);++a<n;)o[a]=t[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=t[a];return s[e]=o,P(r,this,s)}}((function(r,e){return function(r){return!!r&&"object"==typeof r}(t=r)&&function(r){return null!=r&&function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=F}(r.length)&&!br(r)}(t)?fr(r,e):[];var t})),wr={},qr={};Object.defineProperty(qr,"__esModule",{value:!0}),qr.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},qr.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"","­":"","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"","‍":"","‎":"","‏":"","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","":"‌","":"‍","":"‎","":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"","⁢":"","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"","​":"","​":"","​":"","≫":"≫","≪":"≪","
":"\n","𝔑":"𝔑","⁠":""," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","	":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":" "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"","­":"","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"","‌":""},characters:{"Æ":"Æ","&":"&","Á":"Á","Ă":"Ă","Â":"Â","А":"А","𝔄":"𝔄","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","":"⁡","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎","Ч":"Ч","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","É":"É","Ě":"Ě","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","Ѓ":"Ѓ",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","Ħ":"Ħ","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ī":"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","":"⁣","":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","":"​","\n":"
","𝔑":"𝔑","":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Õ":"Õ","⨷":"⨷","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",'"':""","𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","\t":"	","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ"," ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ū":"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","а":"а","æ":"æ","𝔞":"𝔞","à":"à","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼","ą":"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","å":"å","𝒶":"𝒶","*":"*","ã":"ã","ä":"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶","б":"б","„":"„","⦰":"⦰","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍","č":"č","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠","ч":"ч","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†","ℸ":"ℸ","‐":"‐","⤏":"⤏","ď":"ď","д":"д","⇊":"⇊","⩷":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦","ϝ":"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","⦦":"⦦","џ":"џ","⟿":"⟿","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","≕":"≕","э":"э","ė":"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","η":"η","ð":"ð","ë":"ë","€":"€","!":"!","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi",fj:"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌","ǵ":"ǵ","γ":"γ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","ℷ":"ℷ","ѓ":"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘","ℊ":"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀","ъ":"ъ","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ħ":"ħ","⁃":"⁃","í":"í","î":"î","и":"и","е":"е","¡":"¡","𝔦":"𝔦","ì":"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","ĩ":"ĩ","і":"і","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄","љ":"љ","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚","ł":"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩","м":"м","—":"—","𝔪":"𝔪","℧":"℧","µ":"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂","μ":"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮","ń":"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","♮":"♮","⩃":"⩃","ň":"ň","ņ":"ņ","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺","њ":"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","ő":"ő","⨸":"⨸","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝","ℴ":"ℴ","ª":"ª","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ø":"ø","⊘":"⊘","õ":"õ","⨶":"⨶","ö":"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","☎":"☎","π":"π","ϖ":"ϖ","ℎ":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","р":"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","⪴":"⪴","⪸":"⪸","š":"š","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","с":"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯","щ":"щ","ш":"ш","":"­","σ":"σ","ς":"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪","ß":"ß","⌖":"⌖","τ":"τ","ť":"ť","ţ":"ţ","т":"т","⌕":"⌕","𝔱":"𝔱","θ":"θ","ϑ":"ϑ","þ":"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","ў":"ў","ŭ":"ŭ","û":"û","у":"у","ű":"ű","⥾":"⥾","𝔲":"𝔲","ù":"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","ų":"ų","𝕦":"𝕦","υ":"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","в":"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵","ξ":"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","":"‍","":"‌"}}};var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.fromCodePoint=String.fromCodePoint||function(r){return String.fromCharCode(Math.floor((r-65536)/1024)+55296,(r-65536)%1024+56320)},Tr.getCodePoint=String.prototype.codePointAt?function(r,e){return r.codePointAt(e)}:function(r,e){return 1024*(r.charCodeAt(e)-55296)+r.charCodeAt(e+1)-56320+65536},Tr.highSurrogateFrom=55296,Tr.highSurrogateTo=56319;var Or=e&&e.__assign||function(){return(Or=Object.assign||function(r){for(var e,t=1,a=arguments.length;t<a;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}).apply(this,arguments)};Object.defineProperty(wr,"__esModule",{value:!0});var kr=qr,xr=Ar,Er=Tr,Sr=Or(Or({},kr.namedReferences),{all:kr.namedReferences.html5}),_r={specialChars:/[<>'"&]/g,nonAscii:/(?:[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,nonAsciiPrintable:/(?:[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,extensive:/(?:[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g},Dr={mode:"specialChars",level:"all",numeric:"decimal"};wr.encode=function(r,e){if(!r)return"";var t,a,n=_r[void 0===(a=(t=void 0===e?Dr:e).mode)?"specialChars":a],o=Sr[void 0===(l=t.level)?"all":l].characters,s="hexadecimal"===(void 0===(i=t.numeric)?"decimal":i);if(n.lastIndex=0,t=n.exec(r)){a="";var i=0;do{i!==t.index&&(a+=r.substring(i,t.index));var l,c=o[l=t[0]];if(!c){var u=l.length>1?Er.getCodePoint(l,0):l.charCodeAt(0);c=(s?"&#x"+u.toString(16):"&#"+u)+";"}a+=c,i=t.index+l.length}while(t=n.exec(r));i!==r.length&&(a+=r.substring(i))}else a=r;return a};var Lr={scope:"body",level:"all"},Nr=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,Rr=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,Cr={xml:{strict:Nr,attribute:Rr,body:kr.bodyRegExps.xml},html4:{strict:Nr,attribute:Rr,body:kr.bodyRegExps.html4},html5:{strict:Nr,attribute:Rr,body:kr.bodyRegExps.html5}},Br=Or(Or({},Cr),{all:Cr.html5}),jr=String.fromCharCode,Ir=jr(65533),Hr={level:"all"};wr.decodeEntity=function(r,e){var t=void 0===(a=(void 0===e?Hr:e).level)?"all":a;if(!r)return"";var a=r,n=Sr[t].entities[r];if(n)a=n;else if("&"===r[0]&&"#"===r[1]){var o=r[2],s="x"==o||"X"==o?parseInt(r.substr(3),16):parseInt(r.substr(2));a=s>=1114111?Ir:s>65535?Er.fromCodePoint(s):jr(xr.numericUnicodeMap[s]||s)}return a};var Fr=wr.decode=function(r,e){var t=void 0===e?Lr:e,a=t.level,n=void 0===a?"all":a,o=t.scope,s=void 0===o?"xml"===n?"strict":"body":o;if(!r)return"";var i=Br[n][s],l=Sr[n].entities,c="attribute"===s,u="strict"===s;i.lastIndex=0;var p,g=i.exec(r);if(g){p="";var f=0;do{f!==g.index&&(p+=r.substring(f,g.index));var d=g[0],h=d,m=d[d.length-1];if(c&&"="===m)h=d;else if(u&&";"!==m)h=d;else{var b=l[d];if(b)h=b;else if("&"===d[0]&&"#"===d[1]){var y=d[2],v="x"==y||"X"==y?parseInt(d.substr(3),16):parseInt(d.substr(2));h=v>=1114111?Ir:v>65535?Er.fromCodePoint(v):jr(xr.numericUnicodeMap[v]||v)}}p+=h,f=g.index+d.length}while(g=i.exec(r));f!==r.length&&(p+=r.substring(f))}else p=r;return p}; +/** + * @name ranges-sort + * @fileoverview Sort string index ranges + * @version 4.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-sort/} + */const Ur={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function $r(r,e){if(!Array.isArray(r)||!r.length)return r;const t={...Ur,...e};let a,n;if(t.strictlyTwoElementsInRangeArrays&&!r.filter((r=>r)).every(((r,e)=>2===r.length||(a=e,n=r.length,!1))))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${a}th range (${JSON.stringify(r[a],null,4)}) has not two but ${n} elements!`);if(!r.filter((r=>r)).every(((r,e)=>!(!Number.isInteger(r[0])||r[0]<0||!Number.isInteger(r[1])||r[1]<0)||(a=e,!1))))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${a}th range (${JSON.stringify(r[a],null,4)}) does not consist of only natural numbers!`);const o=r.filter((r=>r)).length**2;let s=0;return Array.from(r).filter((r=>r)).sort(((r,e)=>(t.progressFn&&(s+=1,t.progressFn(Math.floor(100*s/o))),r[0]===e[0]?r[1]<e[1]?-1:r[1]>e[1]?1:0:r[0]<e[0]?-1:1)))} +/** + * @name ranges-merge + * @fileoverview Merge and sort string index ranges + * @version 7.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-merge/} + */const Vr={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Pr(r,e){function t(r){return r&&"object"==typeof r&&!Array.isArray(r)}if(!Array.isArray(r)||!r.length)return null;let a;if(e){if(!t(e))throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:\n${JSON.stringify(e,null,4)} (type ${typeof e})`);if(a={...Vr,...e},a.progressFn&&t(a.progressFn)&&!Object.keys(a.progressFn).length)a.progressFn=null;else if(a.progressFn&&"function"!=typeof a.progressFn)throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof a.progressFn}", equal to ${JSON.stringify(a.progressFn,null,4)}`);if(a.mergeType&&1!=+a.mergeType&&2!=+a.mergeType)throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof a.mergeType}", equal to ${JSON.stringify(a.mergeType,null,4)}`);if("boolean"!=typeof a.joinRangesThatTouchEdges)throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof a.joinRangesThatTouchEdges}", equal to ${JSON.stringify(a.joinRangesThatTouchEdges,null,4)}`)}else a={...Vr};const n=r.filter((r=>r)).map((r=>[...r])).filter((r=>void 0!==r[2]||r[0]!==r[1]));let o,s,i;if(o=a.progressFn?$r(n,{progressFn:r=>{i=Math.floor(r/5),i!==s&&(s=i,a.progressFn(i))}}):$r(n),!o)return null;const l=o.length-1;for(let r=l;r>0;r--)a.progressFn&&(i=Math.floor(78*(1-r/l))+21,i!==s&&i>s&&(s=i,a.progressFn(i))),(o[r][0]<=o[r-1][0]||!a.joinRangesThatTouchEdges&&o[r][0]<o[r-1][1]||a.joinRangesThatTouchEdges&&o[r][0]<=o[r-1][1])&&(o[r-1][0]=Math.min(o[r][0],o[r-1][0]),o[r-1][1]=Math.max(o[r][1],o[r-1][1]),void 0!==o[r][2]&&(o[r-1][0]>=o[r][0]||o[r-1][1]<=o[r][1])&&null!==o[r-1][2]&&(null===o[r][2]&&null!==o[r-1][2]?o[r-1][2]=null:null!=o[r-1][2]?2==+a.mergeType&&o[r-1][0]===o[r][0]?o[r-1][2]=o[r][2]:o[r-1][2]+=o[r][2]:o[r-1][2]=o[r][2]),o.splice(r,1),r=o.length);return o.length?o:null} +/** + * @name ranges-apply + * @fileoverview Take an array of string index ranges, delete/replace the string according to them + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-apply/} + */function Wr(r,e,t){let a,n=0,o=0;if(0===arguments.length)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if("string"!=typeof r)throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(e&&!Array.isArray(e))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(t&&"function"!=typeof t)throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(!e||!e.filter((r=>r)).length)return r;a=Array.isArray(e)&&Number.isInteger(e[0])&&Number.isInteger(e[1])?[Array.from(e)]:Array.from(e);const s=a.length;let i=0;a.filter((r=>r)).forEach(((r,e)=>{if(t&&(n=Math.floor(i/s*10),n!==o&&(o=n,t(n))),!Array.isArray(r))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${e}th element not an array: ${JSON.stringify(r,null,4)}, which is ${typeof r}`);if(!Number.isInteger(r[0])){if(!Number.isInteger(+r[0])||+r[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${e}th element, array ${JSON.stringify(r,null,0)}. Its first element is not an integer, string index, but ${typeof r[0]}, equal to: ${JSON.stringify(r[0],null,4)}.`);a[e][0]=+a[e][0]}if(!Number.isInteger(r[1])){if(!Number.isInteger(+r[1])||+r[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${e}th element, array ${JSON.stringify(r,null,0)}. Its second element is not an integer, string index, but ${typeof r[1]}, equal to: ${JSON.stringify(r[1],null,4)}.`);a[e][1]=+a[e][1]}i+=1}));const l=Pr(a,{progressFn:r=>{t&&(n=10+Math.floor(r/10),n!==o&&(o=n,t(n)))}}),c=Array.isArray(l)?l.length:0;if(c>0){const e=r.slice(l[c-1][1]);r=l.reduce(((e,a,s,i)=>{t&&(n=20+Math.floor(s/c*80),n!==o&&(o=n,t(n)));return e+r.slice(0===s?0:i[s-1][1],i[s][0])+(i[s][2]||"")}),""),r+=e}return r} +/** + * @name string-collapse-leading-whitespace + * @fileoverview Collapse the leading and trailing whitespace of a string + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/string-collapse-leading-whitespace/} + */function zr(r,e=1){function t(r){return Array.from(r).reverse().join("")}function a(r,e,t){const a=t?"\n":"\r",n=t?"\r":"\n";if(!r)return r;let o=0,s="";for(let t=0,i=r.length;t<i;t++)(r[t]===a||r[t]===n&&r[t-1]!==a)&&o++,"\r\n".includes(r[t])||" "===r[t]?" "===r[t]?s+=r[t]:r[t]===a?o<=e&&(s+=r[t],r[t+1]===n&&(s+=r[t+1],t++)):r[t]===n&&(!r[t-1]||r[t-1]!==a)&&o<=e&&(s+=r[t]):r[t+1]||o||(s+=" ");return s}if("string"==typeof r&&r.length){let n=1;"number"==typeof+e&&Number.isInteger(+e)&&+e>=0&&(n=+e);let o="",s="";if(r.trim()){if(!r[0].trim())for(let e=0,t=r.length;e<t;e++)if(r[e].trim()){o=r.slice(0,e);break}}else o=r;if(r.trim()&&(""===r.slice(-1).trim()||" "===r.slice(-1)))for(let e=r.length;e--;)if(r[e].trim()){s=r.slice(e+1);break}return`${a(o,n,!1)}${r.trim()}${t(a(t(s),n,!0))}`}return r} +/** + * @name ranges-push + * @fileoverview Gather string index ranges + * @version 5.1.0 + * @author Roy Revelt, Codsen Ltd + * @license MIT + * {@link https://codsen.com/os/ranges-push/} + */function Gr(r){return null!=r}function Jr(r){return Number.isInteger(r)&&r>=0}function Mr(r){return"string"==typeof r}const Yr={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1};class Zr{constructor(r){const e={...Yr,...r};if(e.mergeType&&1!==e.mergeType&&2!==e.mergeType)if(Mr(e.mergeType)&&"1"===e.mergeType.trim())e.mergeType=1;else{if(!Mr(e.mergeType)||"2"!==e.mergeType.trim())throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof e.mergeType}", equal to ${JSON.stringify(e.mergeType,null,4)}`);e.mergeType=2}this.opts=e,this.ranges=[]}add(r,e,t){if(null==r&&null==e)return;if(Gr(r)&&!Gr(e)){if(Array.isArray(r)){if(r.length){if(r.some((r=>Array.isArray(r))))return void r.forEach((r=>{Array.isArray(r)&&this.add(...r)}));r.length&&Jr(+r[0])&&Jr(+r[1])&&this.add(...r)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(r,null,0)}) but second-one, "to" is not (${JSON.stringify(e,null,0)})`)}if(!Gr(r)&&Gr(e))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(e,null,0)}) but first-one, "from" is not (${JSON.stringify(r,null,0)})`);const a=+r,n=+e;if(Jr(t)&&(t=String(t)),!Jr(a)||!Jr(n))throw Jr(a)&&a>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof n}" equal to: ${JSON.stringify(n,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof a}" equal to: ${JSON.stringify(a,null,4)}`);if(Gr(t)&&!Mr(t)&&!Jr(t))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof t}, equal to:\n${JSON.stringify(t,null,4)}`);if(Gr(this.ranges)&&Array.isArray(this.last())&&a===this.last()[1]){if(this.last()[1]=n,this.last(),null!==this.last()[2]&&Gr(t)){let r=!(this.last()[2]&&this.last()[2].length>0)||this.opts&&this.opts.mergeType&&1!==this.opts.mergeType?t:this.last()[2]+t;this.opts.limitToBeAddedWhitespace&&(r=zr(r,this.opts.limitLinebreaksCount)),Mr(r)&&!r.length||(this.last()[2]=r)}}else{this.ranges||(this.ranges=[]);const r=void 0===t||Mr(t)&&!t.length?[a,n]:[a,n,t&&this.opts.limitToBeAddedWhitespace?zr(t,this.opts.limitLinebreaksCount):t];this.ranges.push(r)}}push(r,e,t){this.add(r,e,t)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=Pr(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map((r=>Gr(r[2])?[r[0],r[1],zr(r[2],this.opts.limitLinebreaksCount)]:r)):this.ranges):null}wipe(){this.ranges=[]}replace(r){if(Array.isArray(r)&&r.length){if(!Array.isArray(r[0])||!Jr(r[0][0]))throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(r[0],null,4)} should be an array and its first element should be an integer, a string index.`);this.ranges=Array.from(r)}else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}}var Kr={exports:{}};!function(r,t){var a="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",s="[object Boolean]",i="[object Date]",l="[object Function]",c="[object GeneratorFunction]",u="[object Map]",p="[object Number]",g="[object Object]",f="[object Promise]",d="[object RegExp]",h="[object Set]",m="[object String]",b="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",q="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",O="[object Int16Array]",k="[object Int32Array]",x="[object Uint8Array]",E="[object Uint8ClampedArray]",S="[object Uint16Array]",_="[object Uint32Array]",D=/\w*$/,L=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,R={};R[o]=R["[object Array]"]=R[v]=R[w]=R[s]=R[i]=R[q]=R[A]=R[T]=R[O]=R[k]=R[u]=R[p]=R[g]=R[d]=R[h]=R[m]=R[b]=R[x]=R[E]=R[S]=R[_]=!0,R["[object Error]"]=R[l]=R[y]=!1;var C="object"==typeof self&&self&&self.Object===Object&&self,B="object"==typeof e&&e&&e.Object===Object&&e||C||Function("return this")(),j=t&&!t.nodeType&&t,I=j&&r&&!r.nodeType&&r,H=I&&I.exports===j;function F(r,e){return r.set(e[0],e[1]),r}function U(r,e){return r.add(e),r}function $(r,e,t,a){var n=-1,o=r?r.length:0;for(a&&o&&(t=r[++n]);++n<o;)t=e(t,r[n],n,r);return t}function V(r){var e=!1;if(null!=r&&"function"!=typeof r.toString)try{e=!!(r+"")}catch(r){}return e}function P(r){var e=-1,t=Array(r.size);return r.forEach((function(r,a){t[++e]=[a,r]})),t}function W(r,e){return function(t){return r(e(t))}}function z(r){var e=-1,t=Array(r.size);return r.forEach((function(r){t[++e]=r})),t}var G=Array.prototype,J=Function.prototype,M=Object.prototype,Y=B["__core-js_shared__"],Z=function(){var r=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),K=J.toString,X=M.hasOwnProperty,Q=M.toString,rr=RegExp("^"+K.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),er=H?B.Buffer:void 0,tr=B.Symbol,ar=B.Uint8Array,nr=W(Object.getPrototypeOf,Object),or=Object.create,sr=M.propertyIsEnumerable,ir=G.splice,lr=Object.getOwnPropertySymbols,cr=er?er.isBuffer:void 0,ur=W(Object.keys,Object),pr=jr(B,"DataView"),gr=jr(B,"Map"),fr=jr(B,"Promise"),dr=jr(B,"Set"),hr=jr(B,"WeakMap"),mr=jr(Object,"create"),br=$r(pr),yr=$r(gr),vr=$r(fr),wr=$r(dr),qr=$r(hr),Ar=tr?tr.prototype:void 0,Tr=Ar?Ar.valueOf:void 0;function Or(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function kr(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function xr(r){var e=-1,t=r?r.length:0;for(this.clear();++e<t;){var a=r[e];this.set(a[0],a[1])}}function Er(r){this.__data__=new kr(r)}function Sr(r,e){var t=Pr(r)||function(r){return function(r){return function(r){return!!r&&"object"==typeof r}(r)&&Wr(r)}(r)&&X.call(r,"callee")&&(!sr.call(r,"callee")||Q.call(r)==o)}(r)?function(r,e){for(var t=-1,a=Array(r);++t<r;)a[t]=e(t);return a}(r.length,String):[],a=t.length,n=!!a;for(var s in r)!e&&!X.call(r,s)||n&&("length"==s||Fr(s,a))||t.push(s);return t}function _r(r,e,t){var a=r[e];X.call(r,e)&&Vr(a,t)&&(void 0!==t||e in r)||(r[e]=t)}function Dr(r,e){for(var t=r.length;t--;)if(Vr(r[t][0],e))return t;return-1}function Lr(r,e,t,a,n,f,y){var L;if(a&&(L=f?a(r,n,f,y):a(r)),void 0!==L)return L;if(!Jr(r))return r;var N=Pr(r);if(N){if(L=function(r){var e=r.length,t=r.constructor(e);e&&"string"==typeof r[0]&&X.call(r,"index")&&(t.index=r.index,t.input=r.input);return t}(r),!e)return function(r,e){var t=-1,a=r.length;e||(e=Array(a));for(;++t<a;)e[t]=r[t];return e}(r,L)}else{var C=Hr(r),B=C==l||C==c;if(zr(r))return function(r,e){if(e)return r.slice();var t=new r.constructor(r.length);return r.copy(t),t}(r,e);if(C==g||C==o||B&&!f){if(V(r))return f?r:{};if(L=function(r){return"function"!=typeof r.constructor||Ur(r)?{}:(e=nr(r),Jr(e)?or(e):{});var e}(B?{}:r),!e)return function(r,e){return Cr(r,Ir(r),e)}(r,function(r,e){return r&&Cr(e,Mr(e),r)}(L,r))}else{if(!R[C])return f?r:{};L=function(r,e,t,a){var n=r.constructor;switch(e){case v:return Rr(r);case s:case i:return new n(+r);case w:return function(r,e){var t=e?Rr(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}(r,a);case q:case A:case T:case O:case k:case x:case E:case S:case _:return function(r,e){var t=e?Rr(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}(r,a);case u:return function(r,e,t){return $(e?t(P(r),!0):P(r),F,new r.constructor)}(r,a,t);case p:case m:return new n(r);case d:return function(r){var e=new r.constructor(r.source,D.exec(r));return e.lastIndex=r.lastIndex,e}(r);case h:return function(r,e,t){return $(e?t(z(r),!0):z(r),U,new r.constructor)}(r,a,t);case b:return o=r,Tr?Object(Tr.call(o)):{}}var o}(r,C,Lr,e)}}y||(y=new Er);var j=y.get(r);if(j)return j;if(y.set(r,L),!N)var I=t?function(r){return function(r,e,t){var a=e(r);return Pr(r)?a:function(r,e){for(var t=-1,a=e.length,n=r.length;++t<a;)r[n+t]=e[t];return r}(a,t(r))}(r,Mr,Ir)}(r):Mr(r);return function(r,e){for(var t=-1,a=r?r.length:0;++t<a&&!1!==e(r[t],t,r););}(I||r,(function(n,o){I&&(n=r[o=n]),_r(L,o,Lr(n,e,t,a,o,r,y))})),L}function Nr(r){return!(!Jr(r)||function(r){return!!Z&&Z in r}(r))&&(Gr(r)||V(r)?rr:L).test($r(r))}function Rr(r){var e=new r.constructor(r.byteLength);return new ar(e).set(new ar(r)),e}function Cr(r,e,t,a){t||(t={});for(var n=-1,o=e.length;++n<o;){var s=e[n],i=a?a(t[s],r[s],s,t,r):void 0;_r(t,s,void 0===i?r[s]:i)}return t}function Br(r,e){var t,a,n=r.__data__;return("string"==(a=typeof(t=e))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==t:null===t)?n["string"==typeof e?"string":"hash"]:n.map}function jr(r,e){var t=function(r,e){return null==r?void 0:r[e]}(r,e);return Nr(t)?t:void 0}Or.prototype.clear=function(){this.__data__=mr?mr(null):{}},Or.prototype.delete=function(r){return this.has(r)&&delete this.__data__[r]},Or.prototype.get=function(r){var e=this.__data__;if(mr){var t=e[r];return t===a?void 0:t}return X.call(e,r)?e[r]:void 0},Or.prototype.has=function(r){var e=this.__data__;return mr?void 0!==e[r]:X.call(e,r)},Or.prototype.set=function(r,e){return this.__data__[r]=mr&&void 0===e?a:e,this},kr.prototype.clear=function(){this.__data__=[]},kr.prototype.delete=function(r){var e=this.__data__,t=Dr(e,r);return!(t<0)&&(t==e.length-1?e.pop():ir.call(e,t,1),!0)},kr.prototype.get=function(r){var e=this.__data__,t=Dr(e,r);return t<0?void 0:e[t][1]},kr.prototype.has=function(r){return Dr(this.__data__,r)>-1},kr.prototype.set=function(r,e){var t=this.__data__,a=Dr(t,r);return a<0?t.push([r,e]):t[a][1]=e,this},xr.prototype.clear=function(){this.__data__={hash:new Or,map:new(gr||kr),string:new Or}},xr.prototype.delete=function(r){return Br(this,r).delete(r)},xr.prototype.get=function(r){return Br(this,r).get(r)},xr.prototype.has=function(r){return Br(this,r).has(r)},xr.prototype.set=function(r,e){return Br(this,r).set(r,e),this},Er.prototype.clear=function(){this.__data__=new kr},Er.prototype.delete=function(r){return this.__data__.delete(r)},Er.prototype.get=function(r){return this.__data__.get(r)},Er.prototype.has=function(r){return this.__data__.has(r)},Er.prototype.set=function(r,e){var t=this.__data__;if(t instanceof kr){var a=t.__data__;if(!gr||a.length<199)return a.push([r,e]),this;t=this.__data__=new xr(a)}return t.set(r,e),this};var Ir=lr?W(lr,Object):function(){return[]},Hr=function(r){return Q.call(r)};function Fr(r,e){return!!(e=null==e?n:e)&&("number"==typeof r||N.test(r))&&r>-1&&r%1==0&&r<e}function Ur(r){var e=r&&r.constructor;return r===("function"==typeof e&&e.prototype||M)}function $r(r){if(null!=r){try{return K.call(r)}catch(r){}try{return r+""}catch(r){}}return""}function Vr(r,e){return r===e||r!=r&&e!=e}(pr&&Hr(new pr(new ArrayBuffer(1)))!=w||gr&&Hr(new gr)!=u||fr&&Hr(fr.resolve())!=f||dr&&Hr(new dr)!=h||hr&&Hr(new hr)!=y)&&(Hr=function(r){var e=Q.call(r),t=e==g?r.constructor:void 0,a=t?$r(t):void 0;if(a)switch(a){case br:return w;case yr:return u;case vr:return f;case wr:return h;case qr:return y}return e});var Pr=Array.isArray;function Wr(r){return null!=r&&function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=n}(r.length)&&!Gr(r)}var zr=cr||function(){return!1};function Gr(r){var e=Jr(r)?Q.call(r):"";return e==l||e==c}function Jr(r){var e=typeof r;return!!r&&("object"==e||"function"==e)}function Mr(r){return Wr(r)?Sr(r):function(r){if(!Ur(r))return ur(r);var e=[];for(var t in Object(r))X.call(r,t)&&"constructor"!=t&&e.push(t);return e}(r)}r.exports=function(r){return Lr(r,!0,!0)}}(Kr,Kr.exports);function Xr(r,e=0){return function({str:r,idx:e=0,stopAtNewlines:t=!1,stopAtRawNbsp:a=!1}){if("string"!=typeof r||!r.length)return null;if(e&&"number"==typeof e||(e=0),!r[e+1])return null;if(r[e+1]&&(r[e+1].trim()||t&&"\n\r".includes(r[e+1])||a&&" "===r[e+1]))return e+1;if(r[e+2]&&(r[e+2].trim()||t&&"\n\r".includes(r[e+2])||a&&" "===r[e+2]))return e+2;for(let n=e+1,o=r.length;n<o;n++)if(r[n].trim()||t&&"\n\r".includes(r[n])||a&&" "===r[n])return n;return null}({str:r,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Qr(r,e){if(!r)return[];if(Array.isArray(r))return r.filter((r=>"string"==typeof r&&r.trim()));if("string"==typeof r)return r.trim()?[r]:[];throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] ${e} must be array containing zero or more strings or something falsey. Currently it's equal to: ${r}, that a type of ${typeof r}.`)}function re(r,e,t){return!r||!r.quotes||!function(r,e,t,a){for(let n=e,o=r.length;n<o;n++){if(r.startsWith(t,n))return!0;if(r.startsWith(a,n))return!1}return!1}(e,t+1,r.quotes.value,">")}const ee={ignoreTags:[],onlyStripTags:[],stripTogetherWithTheirContents:["script","style","xml"],skipHtmlDecoding:!1,trimOnlySpaces:!1,dumpLinkHrefsNearby:{enabled:!1,putOnNewLine:!1,wrapHeads:"",wrapTails:""},cb:null};r.defaults=ee,r.stripHtml=function r(e,t){const a=Date.now(),n=new Set(["!doctype","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"]),o=new Set(["a","b","i","p","q","s","u"]),s=new Set([".",",","?",";",")","…",'"',"»"]),i=[],l=[];let c=[],p={};p={attributes:[]};let g=null,f=null,d={},h={tagName:"",hrefValue:"",openingTagEnds:void 0},m="",b=!1,y=null;function v(r,t,a){if(Array.isArray(t.stripTogetherWithTheirContents)&&(t.stripTogetherWithTheirContents.includes(p.name)||t.stripTogetherWithTheirContents.includes("*")))if(Array.isArray(i)&&i.some((e=>e.name===p.name&&e.lastClosingBracketAt<r))){for(let n=i.length;n--;)if(i[n].name===p.name){(t.stripTogetherWithTheirContents.includes(p.name)||t.stripTogetherWithTheirContents.includes("*"))&&(c=c.filter((([e,t])=>(e<i[n].lastOpeningBracketAt||e>=r+1)&&(t<=i[n].lastOpeningBracketAt||t>r+1))));let o=r+1;p.lastClosingBracketAt&&(o=p.lastClosingBracketAt+1),c.push([i[n].lastOpeningBracketAt,o]),s.has(e[r])&&t.cb?t.cb({tag:p,deleteFrom:i[n].lastOpeningBracketAt,deleteTo:r+1,insert:null,rangesArr:a,proposedReturn:[i[n].lastOpeningBracketAt,r,null]}):t.cb&&t.cb({tag:p,deleteFrom:i[n].lastOpeningBracketAt,deleteTo:r,insert:"",rangesArr:a,proposedReturn:[i[n].lastOpeningBracketAt,r,""]}),i.splice(n,1);break}}else i.push(p)}function w(r,e,t,a,n,o){let i="";if(Number.isInteger(t)&&t<n&&(i+=r.slice(t,n)),Number.isInteger(a)&&a>o+1){const e=r.slice(o+1,a);e.includes("\n")&&A(a,r)?i+=" ":i+=e}if(!s.has(r[e])&&"!"!==r[e]){const r=i.match(/\n/g);return Array.isArray(r)&&r.length?1===r.length?"\n":2===r.length?"\n\n":"\n\n\n":" "}return""}function q(r){if(r.dumpLinkHrefsNearby.enabled&&h.tagName&&h.tagName===p.name&&p.lastOpeningBracketAt&&(h.openingTagEnds&&p.lastOpeningBracketAt>h.openingTagEnds||!h.openingTagEnds)&&(b=!0),b){const e=r.dumpLinkHrefsNearby.putOnNewLine?"\n\n":"";m=`${e}${h.hrefValue}${e}`}}function A(r,t){return t?"<"===t[r]&&"%"!==t[r+1]:"<"===e[r]&&"%"!==e[r+1]}function T(r){return">"===e[r]&&"%"!==e[r-1]}if("string"!=typeof e)throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof e).toLowerCase()}, equal to:\n${JSON.stringify(e,null,4)}`);if(t&&!u(t))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof t).toLowerCase()}, equal to:\n${JSON.stringify(t,null,4)}`);function O(){b&&(h={tagName:"",hrefValue:"",openingTagEnds:void 0},b=!1)}const k={...ee,...t};if(Object.prototype.hasOwnProperty.call(k,"returnRangesOnly"))throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_03] opts.returnRangesOnly has been removed from the API since v.5 release.");k.ignoreTags=Qr(k.ignoreTags,"opts.ignoreTags"),k.onlyStripTags=Qr(k.onlyStripTags,"opts.onlyStripTags");const x=!!k.onlyStripTags.length;if(k.onlyStripTags.length&&k.ignoreTags.length&&(k.onlyStripTags=vr(k.onlyStripTags,...k.ignoreTags)),u(k.dumpLinkHrefsNearby)||(k.dumpLinkHrefsNearby={...ee.dumpLinkHrefsNearby}),k.dumpLinkHrefsNearby=ee.dumpLinkHrefsNearby,t&&Object.prototype.hasOwnProperty.call(t,"dumpLinkHrefsNearby")&&null!=t.dumpLinkHrefsNearby)if(u(t.dumpLinkHrefsNearby))k.dumpLinkHrefsNearby={...ee.dumpLinkHrefsNearby,...t.dumpLinkHrefsNearby};else if(t.dumpLinkHrefsNearby)throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_04] Optional Options Object's key dumpLinkHrefsNearby was set to ${typeof t.dumpLinkHrefsNearby}, equal to ${JSON.stringify(t.dumpLinkHrefsNearby,null,4)}. The only allowed value is a plain object. See the API reference.`);k.stripTogetherWithTheirContents?"string"==typeof k.stripTogetherWithTheirContents&&k.stripTogetherWithTheirContents.length&&(k.stripTogetherWithTheirContents=[k.stripTogetherWithTheirContents]):k.stripTogetherWithTheirContents=[];const E={};if(k.stripTogetherWithTheirContents&&Array.isArray(k.stripTogetherWithTheirContents)&&k.stripTogetherWithTheirContents.length&&!k.stripTogetherWithTheirContents.every(((r,e)=>"string"==typeof r||(E.el=r,E.i=e,!1))))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${E.i} has a value ${E.el} which is not string but ${(typeof E.el).toLowerCase()}.`);k.cb||(k.cb=({rangesArr:r,proposedReturn:e})=>{e&&r.push(...e)});const S=new Zr({limitToBeAddedWhitespace:!0,limitLinebreaksCount:2});if(!k.skipHtmlDecoding)for(;e!==Fr(e,{scope:"strict"});)e=Fr(e,{scope:"strict"});for(let t=0,a=e.length;t<a;t++)if(Object.keys(p).length>1&&p.lastClosingBracketAt&&p.lastClosingBracketAt<t&&" "!==e[t]&&null===y&&(y=t),"%"===e[t]&&"{"===e[t-1]&&e.includes("%}",t+1))t=e.indexOf("%}",t)-1;else{if(T(t)&&(!p||Object.keys(p).length<2)&&t>1)for(let o=t;o--;)if(void 0===e[o-1]||T(o)){const s=void 0===e[o-1]?o:o+1,i=e.slice(s,t+1);if(e!==`<${I(i.trim(),"/>")}>`&&[...n].some((r=>I(i.trim().split(/\s+/).filter((r=>r.trim())).filter(((r,e)=>0===e)),"/>").toLowerCase()===r))&&""===r(`<${i.trim()}>`,k).result){l.length&&l[l.length-1][0]===p.lastOpeningBracketAt||l.push([s,t+1]),c.length&&c[c.length-1][0]===p.lastOpeningBracketAt||c.push([s,t+1]);const r=w(e,t,s,t+1,s,t+1);let n=t+1;if(e[n]&&!e[n].trim())for(let r=n;r<a;r++)if(e[r].trim()){n=r;break}k.cb({tag:p,deleteFrom:s,deleteTo:n,insert:r,rangesArr:S,proposedReturn:[s,n,r]})}break}if("/"!==e[t]||p.quotes&&p.quotes.value||!Number.isInteger(p.lastOpeningBracketAt)||Number.isInteger(p.lastClosingBracketAt)||(p.slashPresent=t),'"'===e[t]||"'"===e[t])if(p.nameStarts&&p.quotes&&p.quotes.value&&p.quotes.value===e[t]){let r;d.valueEnds=t,d.value=e.slice(d.valueStarts,t),p.attributes.push(d),d={},p.quotes=void 0,k.dumpLinkHrefsNearby.enabled&&p.attributes.some((e=>{if(e.name&&"href"===e.name.toLowerCase())return r=`${k.dumpLinkHrefsNearby.wrapHeads||""}${e.value}${k.dumpLinkHrefsNearby.wrapTails||""}`,!0}))&&(h={tagName:p.name,hrefValue:r,openingTagEnds:void 0})}else!p.quotes&&p.nameStarts&&(p.quotes={},p.quotes.value=e[t],p.quotes.start=t,d.nameStarts&&d.nameEnds&&d.nameEnds<t&&d.nameStarts<t&&!d.valueStarts&&(d.name=e.slice(d.nameStarts,d.nameEnds)));if(!(void 0===p.nameStarts||void 0!==p.nameEnds||e[t].trim()&&(_=e[t],/[-_A-Za-z0-9]/.test(_)))){if(p.nameEnds=t,p.name=e.slice(p.nameStarts,p.nameEnds+(T(t)||"/"===e[t]||void 0!==e[t+1]?0:1)),"!"!==e[p.nameStarts-1]&&!p.name.replace(/-/g,"").length||/^\d+$/.test(p.name[0])){p={};continue}if(A(t)){q(k);const r=w(e,t,p.leftOuterWhitespace,t,p.lastOpeningBracketAt,t);(k.stripTogetherWithTheirContents.includes(p.name)||k.stripTogetherWithTheirContents.includes("*"))&&(c=c.filter((([r,e])=>!(r===p.leftOuterWhitespace&&e===t)))),k.cb({tag:p,deleteFrom:p.leftOuterWhitespace,deleteTo:t,insert:`${r}${m}${r}`,rangesArr:S,proposedReturn:[p.leftOuterWhitespace,t,`${r}${m}${r}`]}),O(),v(t,k,S)}}if(p.quotes&&p.quotes.start&&p.quotes.start<t&&!p.quotes.end&&d.nameEnds&&d.equalsAt&&!d.valueStarts&&(d.valueStarts=t),p.quotes||!d.nameEnds||"="!==e[t]||d.valueStarts||d.equalsAt||(d.equalsAt=t),!p.quotes&&d.nameStarts&&d.nameEnds&&!d.valueStarts&&e[t].trim()&&"="!==e[t]&&(p.attributes.push(d),d={}),p.quotes||!d.nameStarts||d.nameEnds||(e[t].trim()?"="===e[t]?d.equalsAt||(d.nameEnds=t,d.equalsAt=t,d.name=e.slice(d.nameStarts,d.nameEnds)):("/"===e[t]||T(t)||A(t))&&(d.nameEnds=t,d.name=e.slice(d.nameStarts,d.nameEnds),p.attributes.push(d),d={}):(d.nameEnds=t,d.name=e.slice(d.nameStarts,d.nameEnds))),p.quotes||!(p.nameEnds<t)||e[t-1].trim()||!e[t].trim()||"<>/!".includes(e[t])||d.nameStarts||p.lastClosingBracketAt||(d.nameStarts=t),null!==p.lastOpeningBracketAt&&p.lastOpeningBracketAt<t&&"/"===e[t]&&p.onlyPlausible&&(p.onlyPlausible=!1),null!==p.lastOpeningBracketAt&&p.lastOpeningBracketAt<t&&"/"!==e[t]&&(void 0===p.onlyPlausible&&(p.onlyPlausible=!(e[t].trim()&&!A(t)||p.slashPresent)),!e[t].trim()||void 0!==p.nameStarts||A(t)||"/"===e[t]||T(t)||"!"===e[t]||(p.nameStarts=t,p.nameContainsLetters=!1)),p.nameStarts&&!p.quotes&&e[t].toLowerCase()!==e[t].toUpperCase()&&(p.nameContainsLetters=!0),T(t)&&re(p,e,t)&&void 0!==p.lastOpeningBracketAt&&(p.lastClosingBracketAt=t,y=null,Object.keys(d).length&&(p.attributes.push(d),d={}),k.dumpLinkHrefsNearby.enabled&&h.tagName&&!h.openingTagEnds&&(h.openingTagEnds=t)),void 0!==p.lastOpeningBracketAt)if(void 0===p.lastClosingBracketAt){if(p.lastOpeningBracketAt<t&&!A(t)&&(void 0===e[t+1]||A(t+1))&&p.nameContainsLetters){if(p.name=e.slice(p.nameStarts,p.nameEnds?p.nameEnds:t+1).toLowerCase(),l.length&&l[l.length-1][0]===p.lastOpeningBracketAt||l.push([p.lastOpeningBracketAt,t+1]),k.ignoreTags.includes(p.name)||p.onlyPlausible&&!n.has(p.name)){p={},d={};continue}if((n.has(p.name)||o.has(p.name))&&(!1===p.onlyPlausible||!0===p.onlyPlausible&&p.attributes.length)||void 0===e[t+1]){q(k);const r=w(e,t,p.leftOuterWhitespace,t+1,p.lastOpeningBracketAt,p.lastClosingBracketAt);k.cb({tag:p,deleteFrom:p.leftOuterWhitespace,deleteTo:t+1,insert:`${r}${m}${r}`,rangesArr:S,proposedReturn:[p.leftOuterWhitespace,t+1,`${r}${m}${r}`]}),O(),v(t,k,S)}if(!c.length||c[c.length-1][0]!==p.lastOpeningBracketAt&&c[c.length-1][1]!==t+1)if(k.stripTogetherWithTheirContents.includes(p.name)||k.stripTogetherWithTheirContents.includes("*")){let r;for(let e=i.length;e--;)i[e].name===p.name&&(r=i[e]);r?(c=c.filter((([e])=>e!==r.lastOpeningBracketAt)),c.push([r.lastOpeningBracketAt,t+1])):c.push([p.lastOpeningBracketAt,t+1])}else c.push([p.lastOpeningBracketAt,t+1])}}else if(t>p.lastClosingBracketAt&&e[t].trim()||void 0===e[t+1]){let r=p.lastClosingBracketAt===t?t+1:t;if(k.trimOnlySpaces&&r===a-1&&null!==y&&y<t&&(r=y),l.length&&l[l.length-1][0]===p.lastOpeningBracketAt||l.push([p.lastOpeningBracketAt,p.lastClosingBracketAt+1]),!x&&k.ignoreTags.includes(p.name)||x&&!k.onlyStripTags.includes(p.name))k.cb({tag:p,deleteFrom:null,deleteTo:null,insert:null,rangesArr:S,proposedReturn:null}),p={},d={};else if(!p.onlyPlausible||0===p.attributes.length&&p.name&&(n.has(p.name.toLowerCase())||o.has(p.name.toLowerCase()))||p.attributes&&p.attributes.some((r=>r.equalsAt))){c.length&&c[c.length-1][0]===p.lastOpeningBracketAt||c.push([p.lastOpeningBracketAt,p.lastClosingBracketAt+1]);const a=w(e,t,p.leftOuterWhitespace,r,p.lastOpeningBracketAt,p.lastClosingBracketAt);let n;m="",b=!1,q(k),n="string"==typeof m&&m.length?`${a}${m}${"\n\n"===a?"\n":a}`:a,0!==p.leftOuterWhitespace&&Xr(e,r-1)||(n=""),k.cb({tag:p,deleteFrom:p.leftOuterWhitespace,deleteTo:r,insert:n,rangesArr:S,proposedReturn:[p.leftOuterWhitespace,r,n]}),O(),v(t,k,S)}else p={};T(t)||(p={})}if(A(t)&&!A(t-1)&&!"'\"".includes(e[t+1])&&(!"'\"".includes(e[t+2])||/\w/.test(e[t+1]))&&("c"!==e[t+1]||":"!==e[t+2])&&("f"!==e[t+1]||"m"!==e[t+2]||"t"!==e[t+3]||":"!==e[t+4])&&("s"!==e[t+1]||"q"!==e[t+2]||"l"!==e[t+3]||":"!==e[t+4])&&("x"!==e[t+1]||":"!==e[t+2])&&("f"!==e[t+1]||"n"!==e[t+2]||":"!==e[t+3])&&re(p,e,t)){if(T(Xr(e,t)))continue;if(p.nameEnds&&p.nameEnds<t&&!p.lastClosingBracketAt&&(!0===p.onlyPlausible&&p.attributes&&p.attributes.length||!1===p.onlyPlausible)){const r=w(e,t,p.leftOuterWhitespace,t,p.lastOpeningBracketAt,t);k.cb({tag:p,deleteFrom:p.leftOuterWhitespace,deleteTo:t,insert:r,rangesArr:S,proposedReturn:[p.leftOuterWhitespace,t,r]}),v(t,k,S),p={},d={}}if(void 0!==p.lastOpeningBracketAt&&p.onlyPlausible&&p.name&&!p.quotes&&(p.lastOpeningBracketAt=void 0,p.name=void 0,p.onlyPlausible=!1),!(void 0!==p.lastOpeningBracketAt&&p.onlyPlausible||p.quotes)&&(p.lastOpeningBracketAt=t,p.slashPresent=!1,p.attributes=[],p.leftOuterWhitespace=null===g?t:k.trimOnlySpaces&&0===g?f||t:g,"!--"==`${e[t+1]}${e[t+2]}${e[t+3]}`||"![CDATA["==`${e[t+1]}${e[t+2]}${e[t+3]}${e[t+4]}${e[t+5]}${e[t+6]}${e[t+7]}${e[t+8]}`)){let r,n=!0;"-"===e[t+2]&&(n=!1);for(let o=t;o<a;o++)if((!r&&n&&"]]>"==`${e[o-2]}${e[o-1]}${e[o]}`||!n&&"--\x3e"==`${e[o-2]}${e[o-1]}${e[o]}`)&&(r=o),r&&(r<o&&e[o].trim()||void 0===e[o+1])){let a=o;(void 0===e[o+1]&&!e[o].trim()||">"===e[o])&&(a+=1),l.length&&l[l.length-1][0]===p.lastOpeningBracketAt||l.push([p.lastOpeningBracketAt,r+1]),c.length&&c[c.length-1][0]===p.lastOpeningBracketAt||c.push([p.lastOpeningBracketAt,r+1]);const n=w(e,o,p.leftOuterWhitespace,a,p.lastOpeningBracketAt,r);k.cb({tag:p,deleteFrom:p.leftOuterWhitespace,deleteTo:a,insert:n,rangesArr:S,proposedReturn:[p.leftOuterWhitespace,a,n]}),t=o-1,">"===e[o]&&(t=o),p={},d={};break}}}e[t].trim()?null!==g&&(!p.quotes&&d.equalsAt>g-1&&d.nameEnds&&d.equalsAt>d.nameEnds&&'"'!==e[t]&&"'"!==e[t]&&(u(d)&&p.attributes.push(d),d={},p.equalsSpottedAt=void 0),g=null):null===g&&(g=t,void 0!==p.lastOpeningBracketAt&&p.lastOpeningBracketAt<t&&p.nameStarts&&p.nameStarts<p.lastOpeningBracketAt&&t===p.lastOpeningBracketAt+1&&!i.some((r=>r.name===p.name))&&(p.onlyPlausible=!0,p.name=void 0,p.nameStarts=void 0))," "===e[t]?null===f&&(f=t):null!==f&&(f=null)}var _;if(e&&(k.trimOnlySpaces&&" "===e[0]||!k.trimOnlySpaces&&!e[0].trim()))for(let r=0,t=e.length;r<t;r++){if(k.trimOnlySpaces&&" "!==e[r]||!k.trimOnlySpaces&&e[r].trim()){S.push([0,r]);break}e[r+1]||S.push([0,r+1])}if(e&&(k.trimOnlySpaces&&" "===e[e.length-1]||!k.trimOnlySpaces&&!e[e.length-1].trim()))for(let r=e.length;r--;)if(k.trimOnlySpaces&&" "!==e[r]||!k.trimOnlySpaces&&e[r].trim()){S.push([r+1,e.length]);break}const D=S.current();if((!t||!t.cb)&&D&&(D[0]&&!D[0][0]&&(S.ranges[0]=[S.ranges[0][0],S.ranges[0][1]]),D[D.length-1]&&D[D.length-1][1]===e.length&&S.ranges)){let r=S.ranges[S.ranges.length-1][0];e[r-1]&&(k.trimOnlySpaces&&" "===e[r-1]||!k.trimOnlySpaces&&!e[r-1].trim())&&(r-=1);const t=S.ranges[S.ranges.length-1][2];S.ranges[S.ranges.length-1]=[r,S.ranges[S.ranges.length-1][1]],t&&t.trim()&&S.ranges[S.ranges.length-1].push(t.trimEnd())}return{log:{timeTakenInMilliseconds:Date.now()-a},result:Wr(e,S.current()),ranges:S.current(),allTagLocations:l,filteredTagLocations:c}},r.version="8.3.0",Object.defineProperty(r,"__esModule",{value:!0})})); diff --git a/school/node_modules/string-strip-html/examples/_quickTake.js b/school/node_modules/string-strip-html/examples/_quickTake.js new file mode 100644 index 0000000..741f1ea --- /dev/null +++ b/school/node_modules/string-strip-html/examples/_quickTake.js @@ -0,0 +1,28 @@ +// Quick Take + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +assert.equal( + stripHtml(`Some text <b>and</b> text.`).result, + `Some text and text.` +); + +// prevents accidental string concatenation +assert.equal(stripHtml(`aaa<div>bbb</div>ccc`).result, `aaa bbb ccc`); + +// tag pairs with content, upon request +assert.equal( + stripHtml(`a <pre><code>void a;</code></pre> b`, { + stripTogetherWithTheirContents: [ + "script", // default + "style", // default + "xml", // default + "pre", // <-- custom-added + ], + }).result, + `a b` +); + +// detects raw, legit brackets: +assert.equal(stripHtml(`a < b and c > d`).result, `a < b and c > d`); diff --git a/school/node_modules/string-strip-html/examples/api.json b/school/node_modules/string-strip-html/examples/api.json new file mode 100644 index 0000000..28adb26 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/api.json @@ -0,0 +1 @@ +{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nassert.equal(\n stripHtml(`Some text <b>and</b> text.`).result,\n `Some text and text.`\n);\n\n// prevents accidental string concatenation\nassert.equal(stripHtml(`aaa<div>bbb</div>ccc`).result, `aaa bbb ccc`);\n\n// tag pairs with content, upon request\nassert.equal(\n stripHtml(`a <pre><code>void a;</code></pre> b`, {\n stripTogetherWithTheirContents: [\n \"script\", // default\n \"style\", // default\n \"xml\", // default\n \"pre\", // <-- custom-added\n ],\n }).result,\n `a b`\n);\n\n// detects raw, legit brackets:\nassert.equal(stripHtml(`a < b and c > d`).result, `a < b and c > d`);"},"cb-which-does-nothing.js":{"title":"A Bypass Callback and a Do-Nothing Callback","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\n// this callback just pushes proposed result to \"rangesArr\",\n// that's what gets used in the result calculation:\nconst cb1 = ({\n tag,\n deleteFrom,\n deleteTo,\n insert,\n rangesArr,\n proposedReturn,\n}) => {\n rangesArr.push(deleteFrom, deleteTo, insert);\n};\nconst result1 = stripHtml(\"abc<hr>def\", { cb: cb1 }).result;\nassert.equal(result1, `abc def`);\n\n// to prove it works, don't do anything:\nconst cb2 = ({\n tag,\n deleteFrom,\n deleteTo,\n insert,\n rangesArr,\n proposedReturn,\n}) => {\n // nothing here 🙈\n};\nconst result2 = stripHtml(\"abc<hr>def\", { cb: cb2 }).result;\nassert.equal(result2, \"abc<hr>def\");"},"extract-html-head-contents.js":{"title":"Extract HTML `<head>` contents","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\">\n <title>the title</title>\n </head>\n <body>\n the content\n </body>\n</html>`;\n\n// The task asks not to include <head...> and </head>.\n// First, extract head tag-to-head tag, including contents\nconst headWithHeadTags = stripHtml(someHtml, {\n onlyStripTags: [\"head\"],\n stripTogetherWithTheirContents: [\"head\"],\n})\n .filteredTagLocations.reduce(\n (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`,\n \"\"\n )\n .trim();\n\nassert.equal(\n headWithHeadTags,\n `<head>\n <meta charset=\"utf-8\">\n <title>the title</title>\n </head>`\n);\n\nconst headContents = headWithHeadTags.replace(/<\\/?head>/g, \"\").trim();\nassert.equal(\n headContents,\n `<meta charset=\"utf-8\">\n <title>the title</title>`\n);"},"inline-tags.js":{"title":"Just deletes inline tags","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `This has an <b>un</b>bold word.`;\n\n// default behaviour:\nassert.equal(stripHtml(someHtml).result, `This has an un bold word.`);\n\n// let's tackle inline tags:\nassert.equal(\n stripHtml(someHtml, {\n cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr }) => {\n if ([\"b\", \"strong\"].includes(tag.name)) {\n rangesArr.push(tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1);\n } else {\n rangesArr.push(deleteFrom, deleteTo, insert);\n }\n },\n }).result,\n `This has an unbold word.`\n);"},"leave-only-html.js":{"title":"Leave only HTML","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\">\n <title></title>\n </head>\n <body>\n <h1>Title</h1>\n Some text.\n </body>\n</html>`;\n\nassert.equal(\n stripHtml(someHtml).allTagLocations.reduce(\n (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`,\n \"\"\n ),\n `<!DOCTYPE html><html lang=\"en\" dir=\"ltr\"><head><meta charset=\"utf-8\"><title></title></head><body><h1></h1></body></html>`\n);"},"leave-only-opening-td.js":{"title":"Leave only opening `td` tags","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `<table width=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td class=\"col1\">\n cell1\n </td>\n <td class=\"col2\">\n cell2\n </td>\n </tr>\n <tr>\n <td class=\"col3\">\n cell3\n </td>\n <td class=\"col4\">\n cell4\n </td>\n </tr>\n</table>`;\n\n// the first way\n// -----------------------------------------------------------------------------\n\nassert.equal(\n stripHtml(someHtml, {\n // notice there's no: onlyStripTags: [\"td\"]\n // we operate purely via callback\n cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr, proposedReturn }) => {\n if (tag.name === \"td\" && !tag.slashPresent) {\n rangesArr.push(proposedReturn);\n }\n },\n }).ranges.reduce(\n (acc, [from, to]) => `${acc}${someHtml.slice(from, to).trim()}`,\n \"\"\n ),\n `<td class=\"col1\"><td class=\"col2\"><td class=\"col3\"><td class=\"col4\">`\n);\n\n// the second way:\n// -----------------------------------------------------------------------------\n\nlet resultStr = \"\";\n// notice we don't even assign stripHtml() output to anything - we rely only\n// on the callback, it mutates the \"resultStr\" in the upper scope\nstripHtml(someHtml, {\n // notice there's no: onlyStripTags: [\"td\"]\n // we operate purely via callback\n cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr, proposedReturn }) => {\n if (tag.name === \"td\" && !tag.slashPresent) {\n resultStr += someHtml.slice(deleteFrom, deleteTo).trim();\n }\n },\n});\nassert.equal(\n resultStr,\n `<td class=\"col1\"><td class=\"col2\"><td class=\"col3\"><td class=\"col4\">`\n);"},"leave-only-td.js":{"title":"Leave only `td` tags","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `<table width=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td class=\"col1\">\n cell1\n </td>\n <td class=\"col2\">\n cell2\n </td>\n </tr>\n <tr>\n <td class=\"col3\">\n cell3\n </td>\n <td class=\"col4\">\n cell4\n </td>\n </tr>\n</table>`;\n\nassert.equal(\n stripHtml(someHtml, {\n onlyStripTags: [\"td\"],\n }).filteredTagLocations.reduce(\n (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`,\n \"\"\n ),\n `<td class=\"col1\"></td><td class=\"col2\"></td><td class=\"col3\"></td><td class=\"col4\"></td>`\n);"},"minimal-ranges.js":{"title":"Minimal example using Ranges","content":"// We strip tags and fix apostrophes\n// that's part of what https://codsen.com/os/detergent/ does\n\nimport { strict as assert } from \"assert\";\nimport { rApply } from \"ranges-apply\";\nimport { stripHtml } from \"string-strip-html\";\nimport { convertAll } from \"string-apostrophes\";\n\nfunction stripAndFixApos(str) {\n if (!str || typeof str !== \"string\") {\n return \"\";\n }\n // Keep in mind, Ranges are array of 2-3 element arrays.\n // But absent Ranges are marked as null, not empty array.\n // It's so that we could test in \"if-else\" easily - null\n // is falsy but empty array is truthy.\n // That's why below we take precautions with \"|| []\".\n return rApply(\n str,\n (stripHtml(str).ranges || []).concat(convertAll(str).ranges || [])\n );\n}\n\n// strips tags and fixes apostrophes:\nassert.equal(\n stripAndFixApos(`Let's Go <strong>Larval</strong>`),\n `Let’s Go Larval`\n);\n\n// no tags, no apostrophes:\nassert.equal(stripAndFixApos(`zzz`), `zzz`);"},"remove-html.js":{"title":"Remove all HTML from a string","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\n\nconst someHtml = `<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\">\n <title></title>\n </head>\n <body>\n <h1>Title</h1>\n Some text.\n </body>\n</html>`;\n\nassert.equal(stripHtml(someHtml).result, `Title\\nSome text.`);"},"strip-from-json.js":{"title":"Strip HTML from a raw JSON string","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\nimport { traverse } from \"ast-monkey-traverse\";\n\nconst stripFromJsonStr = (str) => {\n return traverse(JSON.parse(str), (key, val) => {\n // if currently an object is traversed, you get both \"key\" and \"val\"\n // if it's array, only \"key\" is present, \"val\" is undefined\n const current = val !== undefined ? val : key;\n if (\n // ensure it's a plain object, not array (monkey will report only \"key\" in\n // arrays and \"val\" will be undefined)\n // also ensure object's value a string, not boolean or number, because we\n // don't strip HTML from booleans or numbers or anything else than strings\n typeof val === \"string\"\n ) {\n // monkey's callback is like Array.map - whatever you return gets written:\n return stripHtml(val).result;\n }\n // default return, do nothing:\n return current;\n });\n};\n\n// nothing to strip, \"<\" is false alarm:\nassert.equal(\n JSON.stringify(stripFromJsonStr(`{\"Operator\":\"<\",\"IsValid\":true}`), null, 0),\n `{\"Operator\":\"<\",\"IsValid\":true}`\n);\n\n// some HTML within one of key values, monkey will skip the boolean:\nassert.equal(\n JSON.stringify(\n stripFromJsonStr(`{\"Operator\":\"a <div>b</div> c\",\"IsValid\":true}`),\n null,\n 0\n ),\n `{\"Operator\":\"a b c\",\"IsValid\":true}`\n);"},"title-case-with-tag-skipping.js":{"title":"Set the title case using `title` package","content":"// This program will not touch any single tags (<br class=\"z\"/> for example)\n// or in case of paired tags, paired tags and content between\n\nimport { strict as assert } from \"assert\";\nimport title from \"title\";\nimport { rInvert } from \"ranges-invert\";\nimport { rApply } from \"ranges-apply\";\nimport { rRegex } from \"ranges-regex\";\nimport { stripHtml } from \"string-strip-html\";\n\nfunction tagAwareTitle(str) {\n const whitelist = [\"eslint\", \"readme\", \"npm\"];\n const { filteredTagLocations } = stripHtml(str, {\n stripTogetherWithTheirContents: [\"*\"],\n });\n const inverted = rInvert(\n filteredTagLocations.concat(\n whitelist.reduce((acc, curr) => {\n const rangesFindings = rRegex(new RegExp(curr, \"gi\"), str);\n if (rangesFindings) {\n return acc.concat(rangesFindings);\n }\n return acc;\n }, [])\n ),\n str.length\n );\n\n if (Array.isArray(inverted) && inverted.length) {\n // take inverted ranges, for example, [[3, 4], [10, 15]]\n // and add third element, replacement, which is same character\n // indexes only processed through \"title\":\n return rApply(\n str,\n inverted.map(([from, to]) => [from, to, title(str.slice(from, to))])\n );\n }\n // otherwise, just apply title() on the whole string:\n return title(str);\n}\n\n// middle:\nassert.equal(\n tagAwareTitle(`This is a title with some <code>code</code> in it`),\n `This Is a Title with Some <code>code</code> In It`\n);\n\n// leading:\nassert.equal(\n tagAwareTitle(`<span class=\"xyz\">abc<span> defgh ESLint`),\n `<span class=\"xyz\">abc<span> Defgh ESLint`\n);"},"widow-word-removal-from-html.js":{"title":"Widow word removal from text within HTML","content":"import { strict as assert } from \"assert\";\nimport { stripHtml } from \"string-strip-html\";\nimport { removeWidows } from \"string-remove-widows\";\n\nconst someHtml = `The quick brown fox jumps of the lazy dog.<div class=\"a\">`;\n\n// default widow word removal libs are not aware of HTML:\n// -----------------------------------------------------------------------------\n\nassert.equal(\n removeWidows(someHtml).res,\n `The quick brown fox jumps of the lazy dog.<div class=\"a\">` // 😱\n);\n\n// luckily, removeWidows() consumes optional HTML tag locations\nassert.equal(\n removeWidows(someHtml, {\n tagRanges: stripHtml(someHtml)\n // remove the third argument, what to insert (\" \" string in these cases)\n .ranges.map(([from, to]) => [from, to]),\n }).res,\n `The quick brown fox jumps of the lazy dog.<div class=\"a\">` // ✅\n);"}}
\ No newline at end of file diff --git a/school/node_modules/string-strip-html/examples/cb-which-does-nothing.js b/school/node_modules/string-strip-html/examples/cb-which-does-nothing.js new file mode 100644 index 0000000..2145c46 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/cb-which-does-nothing.js @@ -0,0 +1,33 @@ +// A Bypass Callback and a Do-Nothing Callback + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +// this callback just pushes proposed result to "rangesArr", +// that's what gets used in the result calculation: +const cb1 = ({ + tag, + deleteFrom, + deleteTo, + insert, + rangesArr, + proposedReturn, +}) => { + rangesArr.push(deleteFrom, deleteTo, insert); +}; +const result1 = stripHtml("abc<hr>def", { cb: cb1 }).result; +assert.equal(result1, `abc def`); + +// to prove it works, don't do anything: +const cb2 = ({ + tag, + deleteFrom, + deleteTo, + insert, + rangesArr, + proposedReturn, +}) => { + // nothing here 🙈 +}; +const result2 = stripHtml("abc<hr>def", { cb: cb2 }).result; +assert.equal(result2, "abc<hr>def"); diff --git a/school/node_modules/string-strip-html/examples/extract-html-head-contents.js b/school/node_modules/string-strip-html/examples/extract-html-head-contents.js new file mode 100644 index 0000000..5c09d52 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/extract-html-head-contents.js @@ -0,0 +1,42 @@ +// Extract HTML `<head>` contents + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `<!DOCTYPE html> +<html lang="en" dir="ltr"> + <head> + <meta charset="utf-8"> + <title>the title</title> + </head> + <body> + the content + </body> +</html>`; + +// The task asks not to include <head...> and </head>. +// First, extract head tag-to-head tag, including contents +const headWithHeadTags = stripHtml(someHtml, { + onlyStripTags: ["head"], + stripTogetherWithTheirContents: ["head"], +}) + .filteredTagLocations.reduce( + (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`, + "" + ) + .trim(); + +assert.equal( + headWithHeadTags, + `<head> + <meta charset="utf-8"> + <title>the title</title> + </head>` +); + +const headContents = headWithHeadTags.replace(/<\/?head>/g, "").trim(); +assert.equal( + headContents, + `<meta charset="utf-8"> + <title>the title</title>` +); diff --git a/school/node_modules/string-strip-html/examples/inline-tags.js b/school/node_modules/string-strip-html/examples/inline-tags.js new file mode 100644 index 0000000..622999a --- /dev/null +++ b/school/node_modules/string-strip-html/examples/inline-tags.js @@ -0,0 +1,23 @@ +// Just deletes inline tags + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `This has an <b>un</b>bold word.`; + +// default behaviour: +assert.equal(stripHtml(someHtml).result, `This has an un bold word.`); + +// let's tackle inline tags: +assert.equal( + stripHtml(someHtml, { + cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr }) => { + if (["b", "strong"].includes(tag.name)) { + rangesArr.push(tag.lastOpeningBracketAt, tag.lastClosingBracketAt + 1); + } else { + rangesArr.push(deleteFrom, deleteTo, insert); + } + }, + }).result, + `This has an unbold word.` +); diff --git a/school/node_modules/string-strip-html/examples/leave-only-html.js b/school/node_modules/string-strip-html/examples/leave-only-html.js new file mode 100644 index 0000000..93e21a8 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/leave-only-html.js @@ -0,0 +1,24 @@ +// Leave only HTML + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `<!DOCTYPE html> +<html lang="en" dir="ltr"> + <head> + <meta charset="utf-8"> + <title></title> + </head> + <body> + <h1>Title</h1> + Some text. + </body> +</html>`; + +assert.equal( + stripHtml(someHtml).allTagLocations.reduce( + (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`, + "" + ), + `<!DOCTYPE html><html lang="en" dir="ltr"><head><meta charset="utf-8"><title></title></head><body><h1></h1></body></html>` +); diff --git a/school/node_modules/string-strip-html/examples/leave-only-opening-td.js b/school/node_modules/string-strip-html/examples/leave-only-opening-td.js new file mode 100644 index 0000000..e8ba37f --- /dev/null +++ b/school/node_modules/string-strip-html/examples/leave-only-opening-td.js @@ -0,0 +1,62 @@ +// Leave only opening `td` tags + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `<table width="100" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="col1"> + cell1 + </td> + <td class="col2"> + cell2 + </td> + </tr> + <tr> + <td class="col3"> + cell3 + </td> + <td class="col4"> + cell4 + </td> + </tr> +</table>`; + +// the first way +// ----------------------------------------------------------------------------- + +assert.equal( + stripHtml(someHtml, { + // notice there's no: onlyStripTags: ["td"] + // we operate purely via callback + cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr, proposedReturn }) => { + if (tag.name === "td" && !tag.slashPresent) { + rangesArr.push(proposedReturn); + } + }, + }).ranges.reduce( + (acc, [from, to]) => `${acc}${someHtml.slice(from, to).trim()}`, + "" + ), + `<td class="col1"><td class="col2"><td class="col3"><td class="col4">` +); + +// the second way: +// ----------------------------------------------------------------------------- + +let resultStr = ""; +// notice we don't even assign stripHtml() output to anything - we rely only +// on the callback, it mutates the "resultStr" in the upper scope +stripHtml(someHtml, { + // notice there's no: onlyStripTags: ["td"] + // we operate purely via callback + cb: ({ tag, deleteFrom, deleteTo, insert, rangesArr, proposedReturn }) => { + if (tag.name === "td" && !tag.slashPresent) { + resultStr += someHtml.slice(deleteFrom, deleteTo).trim(); + } + }, +}); +assert.equal( + resultStr, + `<td class="col1"><td class="col2"><td class="col3"><td class="col4">` +); diff --git a/school/node_modules/string-strip-html/examples/leave-only-td.js b/school/node_modules/string-strip-html/examples/leave-only-td.js new file mode 100644 index 0000000..af0b2cd --- /dev/null +++ b/school/node_modules/string-strip-html/examples/leave-only-td.js @@ -0,0 +1,33 @@ +// Leave only `td` tags + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `<table width="100" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="col1"> + cell1 + </td> + <td class="col2"> + cell2 + </td> + </tr> + <tr> + <td class="col3"> + cell3 + </td> + <td class="col4"> + cell4 + </td> + </tr> +</table>`; + +assert.equal( + stripHtml(someHtml, { + onlyStripTags: ["td"], + }).filteredTagLocations.reduce( + (acc, [from, to]) => `${acc}${someHtml.slice(from, to)}`, + "" + ), + `<td class="col1"></td><td class="col2"></td><td class="col3"></td><td class="col4"></td>` +); diff --git a/school/node_modules/string-strip-html/examples/minimal-ranges.js b/school/node_modules/string-strip-html/examples/minimal-ranges.js new file mode 100644 index 0000000..91dcbf7 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/minimal-ranges.js @@ -0,0 +1,33 @@ +// Minimal example using Ranges + +// We strip tags and fix apostrophes +// that's part of what https://codsen.com/os/detergent/ does + +import { strict as assert } from "assert"; +import { rApply } from "../../ranges-apply"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; +import { convertAll } from "../../string-apostrophes"; + +function stripAndFixApos(str) { + if (!str || typeof str !== "string") { + return ""; + } + // Keep in mind, Ranges are array of 2-3 element arrays. + // But absent Ranges are marked as null, not empty array. + // It's so that we could test in "if-else" easily - null + // is falsy but empty array is truthy. + // That's why below we take precautions with "|| []". + return rApply( + str, + (stripHtml(str).ranges || []).concat(convertAll(str).ranges || []) + ); +} + +// strips tags and fixes apostrophes: +assert.equal( + stripAndFixApos(`Let's Go <strong>Larval</strong>`), + `Let’s Go Larval` +); + +// no tags, no apostrophes: +assert.equal(stripAndFixApos(`zzz`), `zzz`); diff --git a/school/node_modules/string-strip-html/examples/remove-html.js b/school/node_modules/string-strip-html/examples/remove-html.js new file mode 100644 index 0000000..b45894e --- /dev/null +++ b/school/node_modules/string-strip-html/examples/remove-html.js @@ -0,0 +1,18 @@ +// Remove all HTML from a string + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +const someHtml = `<!DOCTYPE html> +<html lang="en" dir="ltr"> + <head> + <meta charset="utf-8"> + <title></title> + </head> + <body> + <h1>Title</h1> + Some text. + </body> +</html>`; + +assert.equal(stripHtml(someHtml).result, `Title\nSome text.`); diff --git a/school/node_modules/string-strip-html/examples/strip-from-json.js b/school/node_modules/string-strip-html/examples/strip-from-json.js new file mode 100644 index 0000000..95d8bd0 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/strip-from-json.js @@ -0,0 +1,41 @@ +// Strip HTML from a raw JSON string + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; +import { traverse } from "../../ast-monkey-traverse"; + +const stripFromJsonStr = (str) => { + return traverse(JSON.parse(str), (key, val) => { + // if currently an object is traversed, you get both "key" and "val" + // if it's array, only "key" is present, "val" is undefined + const current = val !== undefined ? val : key; + if ( + // ensure it's a plain object, not array (monkey will report only "key" in + // arrays and "val" will be undefined) + // also ensure object's value a string, not boolean or number, because we + // don't strip HTML from booleans or numbers or anything else than strings + typeof val === "string" + ) { + // monkey's callback is like Array.map - whatever you return gets written: + return stripHtml(val).result; + } + // default return, do nothing: + return current; + }); +}; + +// nothing to strip, "<" is false alarm: +assert.equal( + JSON.stringify(stripFromJsonStr(`{"Operator":"<","IsValid":true}`), null, 0), + `{"Operator":"<","IsValid":true}` +); + +// some HTML within one of key values, monkey will skip the boolean: +assert.equal( + JSON.stringify( + stripFromJsonStr(`{"Operator":"a <div>b</div> c","IsValid":true}`), + null, + 0 + ), + `{"Operator":"a b c","IsValid":true}` +); diff --git a/school/node_modules/string-strip-html/examples/title-case-with-tag-skipping.js b/school/node_modules/string-strip-html/examples/title-case-with-tag-skipping.js new file mode 100644 index 0000000..c248346 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/title-case-with-tag-skipping.js @@ -0,0 +1,54 @@ +// Set the title case using `title` package + +// This program will not touch any single tags (<br class="z"/> for example) +// or in case of paired tags, paired tags and content between + +import { strict as assert } from "assert"; +import title from "title"; +import { rInvert } from "../../ranges-invert"; +import { rApply } from "../../ranges-apply"; +import { rRegex } from "../../ranges-regex"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; + +function tagAwareTitle(str) { + const whitelist = ["eslint", "readme", "npm"]; + const { filteredTagLocations } = stripHtml(str, { + stripTogetherWithTheirContents: ["*"], + }); + const inverted = rInvert( + filteredTagLocations.concat( + whitelist.reduce((acc, curr) => { + const rangesFindings = rRegex(new RegExp(curr, "gi"), str); + if (rangesFindings) { + return acc.concat(rangesFindings); + } + return acc; + }, []) + ), + str.length + ); + + if (Array.isArray(inverted) && inverted.length) { + // take inverted ranges, for example, [[3, 4], [10, 15]] + // and add third element, replacement, which is same character + // indexes only processed through "title": + return rApply( + str, + inverted.map(([from, to]) => [from, to, title(str.slice(from, to))]) + ); + } + // otherwise, just apply title() on the whole string: + return title(str); +} + +// middle: +assert.equal( + tagAwareTitle(`This is a title with some <code>code</code> in it`), + `This Is a Title with Some <code>code</code> In It` +); + +// leading: +assert.equal( + tagAwareTitle(`<span class="xyz">abc<span> defgh ESLint`), + `<span class="xyz">abc<span> Defgh ESLint` +); diff --git a/school/node_modules/string-strip-html/examples/widow-word-removal-from-html.js b/school/node_modules/string-strip-html/examples/widow-word-removal-from-html.js new file mode 100644 index 0000000..bcc07b1 --- /dev/null +++ b/school/node_modules/string-strip-html/examples/widow-word-removal-from-html.js @@ -0,0 +1,25 @@ +// Widow word removal from text within HTML + +import { strict as assert } from "assert"; +import { stripHtml } from "../dist/string-strip-html.esm.js"; +import { removeWidows } from "../../string-remove-widows"; + +const someHtml = `The quick brown fox jumps of the lazy dog.<div class="a">`; + +// default widow word removal libs are not aware of HTML: +// ----------------------------------------------------------------------------- + +assert.equal( + removeWidows(someHtml).res, + `The quick brown fox jumps of the lazy dog.<div class="a">` // 😱 +); + +// luckily, removeWidows() consumes optional HTML tag locations +assert.equal( + removeWidows(someHtml, { + tagRanges: stripHtml(someHtml) + // remove the third argument, what to insert (" " string in these cases) + .ranges.map(([from, to]) => [from, to]), + }).res, + `The quick brown fox jumps of the lazy dog.<div class="a">` // ✅ +); diff --git a/school/node_modules/string-strip-html/package.json b/school/node_modules/string-strip-html/package.json new file mode 100644 index 0000000..6a91c6b --- /dev/null +++ b/school/node_modules/string-strip-html/package.json @@ -0,0 +1,141 @@ +{ + "name": "string-strip-html", + "version": "8.3.0", + "description": "Strips HTML tags from strings. No parser, accepts mixed sources.", + "keywords": [ + "code", + "extract", + "from", + "html", + "jsp", + "mixed", + "remove", + "separate", + "stri", + "string", + "strip", + "tags", + "templating", + "text", + "xhtml" + ], + "homepage": "https://codsen.com/os/string-strip-html/", + "repository": { + "type": "git", + "url": "https://github.com/codsen/codsen.git", + "directory": "packages/string-strip-html" + }, + "license": "MIT", + "author": { + "name": "Roy Revelt", + "email": "roy@codsen.com", + "url": "https://codsen.com" + }, + "main": "dist/string-strip-html.cjs.js", + "module": "dist/string-strip-html.esm.js", + "browser": "dist/string-strip-html.umd.js", + "types": "types/index.d.ts", + "scripts": { + "build": "rollup -c", + "esbuild": "node '../../scripts/esbuild.js'", + "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'", + "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov", + "dev": "rollup -c --dev", + "devunittest": "npm run dev && tap --only -R 'base'", + "format": "npm run lect && npm run prettier && npm run lint", + "lect": "lect", + "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet", + "perf": "node perf/check", + "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent", + "republish": "npm publish || :", + "tap": "tap", + "tsc": "tsc", + "pretest": "npm run build", + "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format", + "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier", + "unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf", + "clean_cov": "../../scripts/leaveCoverageTotalOnly.js", + "clean_types": "../../scripts/cleanTypes.js" + }, + "tap": { + "coverage-report": [ + "json-summary", + "text" + ], + "nyc-arg": [ + "--exclude=**/*.cjs.js", + "--exclude=**/*.umd.js" + ], + "timeout": 0 + }, + "lect": { + "licence": { + "extras": [ + "" + ] + }, + "req": "{ stripHtml }", + "various": { + "devDependencies": [ + "@types/lodash.isplainobject", + "@types/lodash.trim", + "@types/lodash.without", + "ranges-invert", + "title" + ] + } + }, + "dependencies": { + "@babel/runtime": "^7.14.0", + "html-entities": "^2.3.2", + "lodash.isplainobject": "^4.0.6", + "lodash.trim": "^4.5.1", + "lodash.without": "^4.4.0", + "ranges-apply": "^5.1.0", + "ranges-push": "^5.1.0", + "string-left-right": "^4.1.0" + }, + "devDependencies": { + "@babel/cli": "^7.14.3", + "@babel/core": "^7.14.3", + "@babel/node": "^7.14.2", + "@babel/plugin-external-helpers": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2", + "@babel/plugin-proposal-object-rest-spread": "^7.14.2", + "@babel/plugin-proposal-optional-chaining": "^7.14.2", + "@babel/plugin-transform-runtime": "^7.14.3", + "@babel/preset-env": "^7.14.2", + "@babel/preset-typescript": "^7.13.0", + "@babel/register": "^7.13.16", + "@rollup/plugin-babel": "^5.3.0", + "@rollup/plugin-commonjs": "^19.0.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.0.0", + "@rollup/plugin-strip": "^2.0.1", + "@rollup/plugin-typescript": "^8.2.1", + "@types/lodash.isplainobject": "^4.0.6", + "@types/lodash.trim": "^4.5.6", + "@types/lodash.without": "^4.4.6", + "@types/node": "^15.6.0", + "@types/tap": "^15.0.1", + "@typescript-eslint/eslint-plugin": "^4.24.0", + "@typescript-eslint/parser": "^4.24.0", + "core-js": "^3.12.1", + "cross-env": "^7.0.3", + "eslint": "^7.27.0", + "lect": "^0.17.0", + "ranges-invert": "^4.1.0", + "rollup": "^2.49.0", + "rollup-plugin-ascii": "^0.0.3", + "rollup-plugin-banner": "^0.2.1", + "rollup-plugin-cleanup": "^3.2.1", + "rollup-plugin-dts": "^3.0.1", + "rollup-plugin-node-builtins": "^2.1.2", + "rollup-plugin-terser": "^7.0.2", + "tap": "^14.11.0", + "title": "^3.4.3", + "tslib": "^2.2.0", + "typescript": "^4.2.4" + } +} diff --git a/school/node_modules/string-strip-html/types/index.d.ts b/school/node_modules/string-strip-html/types/index.d.ts new file mode 100644 index 0000000..c34727b --- /dev/null +++ b/school/node_modules/string-strip-html/types/index.d.ts @@ -0,0 +1,70 @@ +import { Ranges as Ranges$1 } from 'ranges-push'; + +declare type Range = [from: number, to: number] | [from: number, to: number, whatToInsert: string | null | undefined]; +declare type Ranges = Range[] | null; + +declare const version: string; + +interface Tag { + attributes: string[]; + lastClosingBracketAt: number; + lastOpeningBracketAt: number; + slashPresent: number; + leftOuterWhitespace: number; + onlyPlausible: boolean; + nameStarts: number; + nameContainsLetters: boolean; + nameEnds: number; + name: string; +} +interface CbObj { + tag: Tag; + deleteFrom: null | number; + deleteTo: null | number; + insert: null | string; + rangesArr: Ranges$1; + proposedReturn: Range | null; +} +interface Opts { + ignoreTags: string[]; + onlyStripTags: string[]; + stripTogetherWithTheirContents: string[]; + skipHtmlDecoding: boolean; + trimOnlySpaces: boolean; + dumpLinkHrefsNearby: { + enabled: boolean; + putOnNewLine: boolean; + wrapHeads: string; + wrapTails: string; + }; + cb: null | ((cbObj: CbObj) => void); +} +declare const defaults: { + ignoreTags: never[]; + onlyStripTags: never[]; + stripTogetherWithTheirContents: string[]; + skipHtmlDecoding: boolean; + trimOnlySpaces: boolean; + dumpLinkHrefsNearby: { + enabled: boolean; + putOnNewLine: boolean; + wrapHeads: string; + wrapTails: string; + }; + cb: null; +}; +interface Res { + log: { + timeTakenInMilliseconds: number; + }; + result: string; + ranges: Ranges; + allTagLocations: [number, number][]; + filteredTagLocations: [number, number][]; +} +/** + * Strips HTML tags from strings. No parser, accepts mixed sources. + */ +declare function stripHtml(str: string, originalOpts?: Partial<Opts>): Res; + +export { CbObj, defaults, stripHtml, version }; diff --git a/school/node_modules/string-strip-html/types/util.d.ts b/school/node_modules/string-strip-html/types/util.d.ts new file mode 100644 index 0000000..21ed6de --- /dev/null +++ b/school/node_modules/string-strip-html/types/util.d.ts @@ -0,0 +1,9 @@ +interface Obj { + [key: string]: any; +} +declare function characterSuitableForNames(char: string): boolean; +declare function prepHopefullyAnArray(something: any, name: string): string[]; +declare function xBeforeYOnTheRight(str: string, startingIdx: number, x: string, y: string): boolean; +declare function notWithinAttrQuotes(tag: Obj, str: string, i: number): boolean; +declare function trimEnd(str: string): string; +export { characterSuitableForNames, prepHopefullyAnArray, xBeforeYOnTheRight, notWithinAttrQuotes, trimEnd, Obj, }; |