diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..563176a --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,41 @@ +name: Code checks +on: + - push +jobs: + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - run: npm ci + - run: npm run typecheck + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - run: npm ci + - run: npm run lint:check + - run: npm run format:check + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - run: npm ci + - run: npm run test + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - run: npm ci + - run: npm run build diff --git a/.gitignore b/.gitignore index 5d3fc8c..09464df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -node_modules - +.idea .vscode +node_modules npm-debug.log coverage -.nyc_output \ No newline at end of file +dist diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..8111b41 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v21.7 diff --git a/.prettierignore b/.prettierignore index aa65bb7..b9ecef0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,3 @@ -*.json *.html -*.js *.css -*.md \ No newline at end of file +*.md diff --git a/.prettierrc b/.prettierrc index 544138b..a20502b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,4 @@ { - "singleQuote": true + "singleQuote": true, + "trailingComma": "all" } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 045e47a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - '7' -before_install: - npm install -g typescript@2 - npm install -g ts-node@3.0 -script: - npm test -after_success: - npm run coverage \ No newline at end of file diff --git a/LICENSE b/LICENSE index 27c6cf5..b1e34bf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 nozer +Copyright (c) 2018 nozer, Dmitriy Cherchenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 364e3e1..1ab9f13 100644 --- a/README.md +++ b/README.md @@ -1,218 +1,125 @@ -[![Build Status](https://travis-ci.org/nozer/quill-delta-to-html.svg?branch=master)](https://travis-ci.org/nozer/quill-delta-to-html) -[![Coverage Status](https://coveralls.io/repos/github/nozer/quill-delta-to-html/badge.svg?branch=master)](https://coveralls.io/github/nozer/quill-delta-to-html?branch=master) +# Render Quill's Delta ops in React +See [Quill](https://quilljs.com), [Delta](https://quilljs.com/docs/delta/) -# Quill Delta to HTML Converter # -Converts [Quill's](https://quilljs.com) [Delta](https://quilljs.com/docs/delta/) format to HTML (insert ops only) with properly nested lists. - -You can try a live demo of the conversion by opening the `demo-browser.html` file after cloning the repo. - -## Breaking change: `import/require` has changed as of `v0.10.0`. See Usage below ## - - - -## Quickstart ## +## Quickstart Installation ``` -npm install quill-delta-to-html +npm install quill-delta-to-react ``` Usage ```javascript -var QuillDeltaToHtmlConverter = require('quill-delta-to-html').QuillDeltaToHtmlConverter; - -// TypeScript / ES6: -// import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html'; +import { RenderDelta } from 'quill-delta-to-react'; -var deltaOps = [ - {insert: "Hello\n"}, - {insert: "This is colorful", attributes: {color: '#f00'}} +const ops = [ + { "insert": "Hello\n" }, + { "insert": "This is colorful", "attributes": { "color": "#ff0000" } }, + { "insert": "\n" } ]; -var cfg = {}; - -var converter = new QuillDeltaToHtmlConverter(deltaOps, cfg); - -var html = converter.convert(); +const App = () => { + return ( + + ); +}; ``` -## Configuration ## +## Principles -`QuillDeltaToHtmlConverter` accepts a few configuration options as shown below: +This library is designed to provide a lot of _flexibility_ and _extensibility_. You can customize nearly anything about the rendering. -|Option | Type | Default | Description -|---|---|---|---| -|`paragraphTag`| string | 'p' | Custom tag to wrap inline html elements| -|`encodeHtml`| boolean | true | If true, `<, >, /, ', ", &` characters in content will be encoded.| -|`classPrefix`| string | 'ql' | A css class name to prefix class generating styles such as `size`, `font`, etc. | -|`inlineStyles`| boolean or object | false | If true or an object, use inline styles instead of classes. See Rendering Inline Styles section below for using an object | -|`multiLineBlockquote`| boolean | true | Instead of rendering multiple `blockquote` elements for quotes that are consecutive and have same styles(`align`, `indent`, and `direction`), it renders them into only one| -|`multiLineHeader`| boolean | true | Same deal as `multiLineBlockquote` for headers| -|`multiLineCodeblock`| boolean | true | Same deal as `multiLineBlockquote` for code-blocks| -|`multiLineParagraph`| boolean | true | Set to false to generate a new paragraph tag after each enter press (new line)| -|`linkRel`| string | none generated | Specifies a value to put on the `rel` attr on all links. This can be overridden by an individual link op by specifying the `rel` attribute in the respective op's attributes| -|`linkTarget`| string | '_blank' | Specifies target for all links; use `''` (empty string) to not generate `target` attribute. This can be overridden by an individual link op by specifiying the `target` with a value in the respective op's attributes.| -|`allowBackgroundClasses`| boolean | false | If true, css classes will be added for background attr| -|`urlSanitizer`| function `(url: string): string \| undefined` | undefined | A function that is called once per url in the ops (image, video, link) for you to do custom sanitization. If your function returns a string, it is assumed that you sanitized the url and no further sanitization will be done by the library; when anything other than a string is returned (e.g. `undefined`), it is assumed that no sanitization has been done and the library's own function will be used to clean up the url| -|`customTag`| function `(format: string, op: DeltaInsertOp): string \| undefined` | undefined | Callback allows to provide custom html tag for some format| -|`customTagAttributes`| function `(op: DeltaInsertOp): { [key: string]: string } \| undefined` | undefined | Allows to provide custom html tag attributes| -|`customCssClasses`| function `(op: DeltaInsertOp): string \| string[] \| undefined` | undefined | Allows to provide custom css classes| -|`customCssStyles`| function `(op: DeltaInsertOp): string \| string[] \| undefined` | undefined | Allows to provide custom css styles| +At the same time, we take _performance_ seriously. You can have many instances of a RenderDelta component on a page, and it will render +quickly and efficiently. +Finally, this library keeps dependencies to a minimum, and the dependencies that it has are kept up-to-date. -## Rendering Quill Formats ## +## Configuration -You can customize the rendering of Quill formats by registering to the render events before calling the `convert()` method. +The `RenderDelta` component accepts a few configuration options with the `options` prop as shown below: -There are `beforeRender` and `afterRender` events and they are called multiple times before and after rendering each group. A group is one of: +|Option|Type|Default| Description +|---|---|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`paragraphTag`|string|'p'| Custom tag to wrap elements | +|`classPrefix`|string |'ql'| A CSS class name to prefix classes for styles such as `size` and `font` | +|`inlineStyles`|boolean or object|false| If true or an object, use inline styles instead of classes. See Rendering Inline Styles section below for using an object | +|`multiLineBlockquote`| boolean | true | Instead of rendering multiple `blockquote` elements for quotes that are consecutive and have exactly the same attributes, render them into only one | +|`multiLineHeader`| boolean | true | Same deal as `multiLineBlockquote` for headers | +|`multiLineCodeBlock`| boolean | true | Same deal as `multiLineBlockquote` for code-blocks | +|`linkRel`| string | none | Specifies a value to put on the `rel` attr on all links. This can be overridden by an individual link op by specifying the `rel` attribute in the respective op's attributes | +|`linkTarget`| string | '_blank' | Specifies target for all links; use `''` (empty string) to not generate `target` attribute. This can be overridden by an individual link op by specifiying the `target` with a value in the respective op's attributes. | +|`allowBackgroundClasses`| boolean | false | If true, classes will be added for the background attribute | +|`urlSanitizer`| function `(url: string): string` | undefined | A function that is called once per url in the ops (image, video, link) for you to do custom sanitizatio | +|`customTag`| function `(format: string, op: DeltaInsertOp): string \| undefined` | undefined | Callback allows to provide custom tag for some format | +|`customAttributes`| function `(op: DeltaInsertOp): { [key: string]: string } \| undefined` | undefined | Allows to provide custom html tag attributes | +|`customClasses`| function `(op: DeltaInsertOp): string \| string[] \| undefined` | undefined | Allows to provide custom classes | +|`customCssStyles`| function `(op: DeltaInsertOp): string \| string[] \| undefined` | undefined | Allows to provide custom CSS styles | -- continuous sets of inline elements -- a video element -- list elements -- block elements (header, code-block, blockquote, align, indent, and direction) +## Rendering Inline Styles -`beforeRender` event is called with raw operation objects for you to generate and return your own html. If you return a `falsy` value, system will return its own generated html. +The easiest way to enable this is to pass the option `inlineStyles: true`. -`afterRender` event is called with generated html for you to inspect, maybe make some changes and return your modified or original html. +You can customize styles by passing an object for `inlineStyles` instead. Below is how the default inline styles are configured: ```javascript - -converter.beforeRender(function(groupType, data){ - // ... generate your own html - // return your html -}); -converter.afterRender(function(groupType, htmlString){ - // modify if you wish - // return the html -}); - -html = converter.convert(); - -``` - -Following shows the parameter formats for `beforeRender` event: - - - -|groupType|data| -|---|---| -|`video`|{op: `op object`}| -|`block`|{op: `op object`: ops: Array<`op object`>}| -|`list`| {items: Array<{item: `block`, innerList: `list` or `null` }> }| -|`inline-group`|{ops: Array<`op object`>}| - -`op object` will have the following format: - -```javascript -{ - insert: { - type: '' // one of 'text' | 'image' | 'video' | 'formula', - value: '' // some string value - }, - attributes: { - // ... quill delta attributes +const DEFAULT_INLINE_STYLES = { + direction: (value, op) => { + if (value === 'rtl') { + if (op.attributes['align']) { + return { + direction: 'rtl', + }; + } + return { + direction: 'rtl', + textAlign: 'inherit', + }; } -} -``` - -## Rendering Inline Styles ## - -If you are rendering to HTML that you intend to include in an email, using classes and a style sheet are not recommended, as [not all browsers support style sheets](https://www.campaignmonitor.com/css/style-element/style-in-head/). quill-delta-to-html supports rendering inline styles instead. The easiest way to enable this is to pass the option `inlineStyles: true`. - -You can customize styles by passing an object to `inlineStyles` instead: - -```javascript -inlineStyles: { - font: { - 'serif': 'font-family: Georgia, Times New Roman, serif', - 'monospace': 'font-family: Monaco, Courier New, monospace' - }, - size: { - 'small': 'font-size: 0.75em', - 'large': 'font-size: 1.5em', - 'huge': 'font-size: 2.5em' - }, - indent: (value, op) => { - var indentSize = parseInt(value, 10) * 3; - var side = op.attributes['direction'] === 'rtl' ? 'right' : 'left'; - return 'padding-' + side + ':' + indentSize + 'em'; - }, - direction: (value, op) => { - if (value === 'rtl') { - return 'direction:rtl' + ( op.attributes['align'] ? '' : '; text-align: inherit' ); - } else { - return ''; + return undefined; + }, + font: (value) => { + switch (value) { + case 'serif': + return { fontFamily: 'Georgia, Times New Roman, serif' }; + case 'monospace': + return { fontFamily: 'Monaco, Courier New, monospace' }; + default: + if (typeof value === 'string') { + return { fontFamily: value }; } - } -}; -``` - -Keys to this object are the names of attributes from Quill. The values are either a simple lookup table (like in the 'font' example above) used to map values to styles, or a `fn(value, op)` which returns a style string. - -## Rendering Custom Blot Formats ## - -You need to tell system how to render your custom blot by registering a renderer callback function to `renderCustomWith` method before calling the `convert()` method. - -If you would like your custom blot to be rendered as a block (not inside another block or grouped as part of inlines), then add `renderAsBlock: true` to its attributes. - -Example: -```javascript -let ops = [ - {insert: {'my-blot': {id: 2, text: 'xyz'}}, attributes: {renderAsBlock: true|false}} -]; - -let converter = new QuillDeltaToHtmlConverter(ops); - -// customOp is your custom blot op -// contextOp is the block op that wraps this op, if any. -// If, for example, your custom blot is located inside a list item, -// then contextOp would provide that op. -converter.renderCustomWith(function(customOp, contextOp){ - if (customOp.insert.type === 'my-blot') { - let val = customOp.insert.value; - return `${val.text}`; - } else { - return 'Unmanaged custom blot!'; } -}); - -html = converter.convert(); -``` -`customOp object` will have the following format: - -```javascript -{ - insert: { - type: string //whatever you specified as key for insert, in above example: 'my-blot' - value: any // value for the custom blot - }, - attributes: { - // ... any attributes custom blot may have + }, + size: (value) => { + switch (value) { + case 'small': + return { fontSize: '0.75em' }; + case 'large': + return { fontSize: '1.5em' }; + case 'huge': + return { fontSize: '2.5em' }; + default: + return undefined; } -} + }, + indent: (value, op) => { + const indentSize = Number(value) * 3; + return { + [op.attributes['direction'] === DirectionType.Rtl + ? 'paddingRight' + : 'paddingLeft']: `${indentSize}em`, + }; + }, +}; ``` -## Advanced Custom Rendering Using Grouped Ops ## - -If you want to do the full rendering yourself, you can do so -by getting the processed & grouped ops. - -```javascript -let groupedOps = converter.getGroupedOps(); -``` -Each element in groupedOps array will be an instance of the -following types: +Keys to this object are the names of attributes from Quill. The values are a function that takes the value of the attribute and the Op object +and returns an object of CSS properties (or undefined). -|type|properties| -|---|---| -|`InlineGroup`|ops: Array<`op object`>| -|`VideoItem`|op: `op object`| -|`BlockGroup`|op: `op object`, ops: Array<`op object`>| -|`ListGroup`|items: Array<`ListItem`>| -||ListItem: {item:`BlockGroup`, innerList:`ListGroup`}| -|`BlotBlock`|op: `op object`| +## Advanced Custom Rendering -`BlotBlock` represents custom blots with `renderAsBlock:true` property pair in its attributes +In addition to providing custom HTML element tags, classes, styles, and any other attribute, you can define custom Op types and provide a +rendering function for these types with a `customRenderer` prop. -See above for `op object` format. +By default your custom ops will be treated as inlines, but you can set the `renderAsBlock: true` property in an op's attributes to have it +rendered as a block. diff --git a/demo-browser.html b/demo-browser.html deleted file mode 100644 index 193daa0..0000000 --- a/demo-browser.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - Playground - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- Open developer console to see deltas and generated html. -
- You can pass config options for QuillDeltaToHtmlConverter - used here by setting window.opts_ = { /* config object */} to a - configuration object -
-
-
- - - - - - - \ No newline at end of file diff --git a/demo-node.js b/demo-node.js deleted file mode 100644 index b56844b..0000000 --- a/demo-node.js +++ /dev/null @@ -1,33 +0,0 @@ -var QuillDeltaToHtmlConverter = require("./dist/commonjs/main").QuillDeltaToHtmlConverter; - -var ops = [{ - insert: 'hello', - attributes: { - color: '#f00' - } - }, - { - "insert": { - "customImageBlot": { - "height": 150, - "width": 150, - "url": "https://d35bklnb0uzdnn.cloudfront.net/image/i@Hy81U57G7.png" - } - }, - attributes: { - renderAsBlock: true - } - }, - { - insert: 'how r u?' - } -]; - -var converter = new QuillDeltaToHtmlConverter(ops); - -converter.renderCustomWith((op, ctxop) => { - return 'aa'; -}) -var html = converter.convert(); - -console.log(html); \ No newline at end of file diff --git a/dist/browser/QuillDeltaToHtmlConverter.bundle.js b/dist/browser/QuillDeltaToHtmlConverter.bundle.js deleted file mode 100644 index 02b48d9..0000000 --- a/dist/browser/QuillDeltaToHtmlConverter.bundle.js +++ /dev/null @@ -1,3566 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.QuillDeltaToHtmlConverter = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i - (Number(op.attributes.indent) || 0)); - }; - DeltaInsertOp.prototype.isInline = function () { - return !(this.isContainerBlock() || - this.isVideo() || - this.isCustomEmbedBlock()); - }; - DeltaInsertOp.prototype.isCodeBlock = function () { - return !!this.attributes['code-block']; - }; - DeltaInsertOp.prototype.hasSameLangAs = function (op) { - return this.attributes['code-block'] === op.attributes['code-block']; - }; - DeltaInsertOp.prototype.isJustNewline = function () { - return this.insert.value === value_types_1.NewLine; - }; - DeltaInsertOp.prototype.isList = function () { - return (this.isOrderedList() || - this.isBulletList() || - this.isCheckedList() || - this.isUncheckedList()); - }; - DeltaInsertOp.prototype.isOrderedList = function () { - return this.attributes.list === value_types_1.ListType.Ordered; - }; - DeltaInsertOp.prototype.isBulletList = function () { - return this.attributes.list === value_types_1.ListType.Bullet; - }; - DeltaInsertOp.prototype.isCheckedList = function () { - return this.attributes.list === value_types_1.ListType.Checked; - }; - DeltaInsertOp.prototype.isUncheckedList = function () { - return this.attributes.list === value_types_1.ListType.Unchecked; - }; - DeltaInsertOp.prototype.isACheckList = function () { - return (this.attributes.list == value_types_1.ListType.Unchecked || - this.attributes.list === value_types_1.ListType.Checked); - }; - DeltaInsertOp.prototype.isSameListAs = function (op) { - return (!!op.attributes.list && - (this.attributes.list === op.attributes.list || - (op.isACheckList() && this.isACheckList()))); - }; - DeltaInsertOp.prototype.isSameTableRowAs = function (op) { - return (!!op.isTable() && - this.isTable() && - this.attributes.table === op.attributes.table); - }; - DeltaInsertOp.prototype.isText = function () { - return this.insert.type === value_types_1.DataType.Text; - }; - DeltaInsertOp.prototype.isImage = function () { - return this.insert.type === value_types_1.DataType.Image; - }; - DeltaInsertOp.prototype.isFormula = function () { - return this.insert.type === value_types_1.DataType.Formula; - }; - DeltaInsertOp.prototype.isVideo = function () { - return this.insert.type === value_types_1.DataType.Video; - }; - DeltaInsertOp.prototype.isLink = function () { - return this.isText() && !!this.attributes.link; - }; - DeltaInsertOp.prototype.isCustomEmbed = function () { - return this.insert instanceof InsertData_1.InsertDataCustom; - }; - DeltaInsertOp.prototype.isCustomEmbedBlock = function () { - return this.isCustomEmbed() && !!this.attributes.renderAsBlock; - }; - DeltaInsertOp.prototype.isCustomTextBlock = function () { - return this.isText() && !!this.attributes.renderAsBlock; - }; - DeltaInsertOp.prototype.isMentions = function () { - return this.isText() && !!this.attributes.mentions; - }; - return DeltaInsertOp; -}()); -exports.DeltaInsertOp = DeltaInsertOp; - -},{"./InsertData":2,"./value-types":19,"lodash.isequal":20}],2:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var InsertDataQuill = (function () { - function InsertDataQuill(type, value) { - this.type = type; - this.value = value; - } - return InsertDataQuill; -}()); -exports.InsertDataQuill = InsertDataQuill; -var InsertDataCustom = (function () { - function InsertDataCustom(type, value) { - this.type = type; - this.value = value; - } - return InsertDataCustom; -}()); -exports.InsertDataCustom = InsertDataCustom; - -},{}],3:[function(require,module,exports){ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var value_types_1 = require("./value-types"); -var str = __importStar(require("./helpers/string")); -var obj = __importStar(require("./helpers/object")); -var InsertOpDenormalizer = (function () { - function InsertOpDenormalizer() { - } - InsertOpDenormalizer.denormalize = function (op) { - if (!op || typeof op !== 'object') { - return []; - } - if (typeof op.insert === 'object' || op.insert === value_types_1.NewLine) { - return [op]; - } - var newlinedArray = str.tokenizeWithNewLines(op.insert + ''); - if (newlinedArray.length === 1) { - return [op]; - } - var nlObj = obj.assign({}, op, { insert: value_types_1.NewLine }); - return newlinedArray.map(function (line) { - if (line === value_types_1.NewLine) { - return nlObj; - } - return obj.assign({}, op, { - insert: line, - }); - }); - }; - return InsertOpDenormalizer; -}()); -exports.InsertOpDenormalizer = InsertOpDenormalizer; - -},{"./helpers/object":15,"./helpers/string":16,"./value-types":19}],4:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DeltaInsertOp_1 = require("./DeltaInsertOp"); -var value_types_1 = require("./value-types"); -var InsertData_1 = require("./InsertData"); -var OpAttributeSanitizer_1 = require("./OpAttributeSanitizer"); -var InsertOpDenormalizer_1 = require("./InsertOpDenormalizer"); -var OpLinkSanitizer_1 = require("./OpLinkSanitizer"); -var InsertOpsConverter = (function () { - function InsertOpsConverter() { - } - InsertOpsConverter.convert = function (deltaOps, options) { - if (!Array.isArray(deltaOps)) { - return []; - } - var denormalizedOps = [].concat.apply([], deltaOps.map(InsertOpDenormalizer_1.InsertOpDenormalizer.denormalize)); - var results = []; - var insertVal, attributes; - for (var _i = 0, denormalizedOps_1 = denormalizedOps; _i < denormalizedOps_1.length; _i++) { - var op = denormalizedOps_1[_i]; - if (!op.insert) { - continue; - } - insertVal = InsertOpsConverter.convertInsertVal(op.insert, options); - if (!insertVal) { - continue; - } - attributes = OpAttributeSanitizer_1.OpAttributeSanitizer.sanitize(op.attributes, options); - results.push(new DeltaInsertOp_1.DeltaInsertOp(insertVal, attributes)); - } - return results; - }; - InsertOpsConverter.convertInsertVal = function (insertPropVal, sanitizeOptions) { - if (typeof insertPropVal === 'string') { - return new InsertData_1.InsertDataQuill(value_types_1.DataType.Text, insertPropVal); - } - if (!insertPropVal || typeof insertPropVal !== 'object') { - return null; - } - var keys = Object.keys(insertPropVal); - if (!keys.length) { - return null; - } - return value_types_1.DataType.Image in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Image, OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Image] + '', sanitizeOptions)) - : value_types_1.DataType.Video in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Video, OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Video] + '', sanitizeOptions)) - : value_types_1.DataType.Formula in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Formula, insertPropVal[value_types_1.DataType.Formula]) - : - new InsertData_1.InsertDataCustom(keys[0], insertPropVal[keys[0]]); - }; - return InsertOpsConverter; -}()); -exports.InsertOpsConverter = InsertOpsConverter; - -},{"./DeltaInsertOp":1,"./InsertData":2,"./InsertOpDenormalizer":3,"./OpAttributeSanitizer":5,"./OpLinkSanitizer":6,"./value-types":19}],5:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var value_types_1 = require("./value-types"); -var MentionSanitizer_1 = require("./mentions/MentionSanitizer"); -var array_1 = require("./helpers/array"); -var OpLinkSanitizer_1 = require("./OpLinkSanitizer"); -var OpAttributeSanitizer = (function () { - function OpAttributeSanitizer() { - } - OpAttributeSanitizer.sanitize = function (dirtyAttrs, sanitizeOptions) { - var cleanAttrs = {}; - if (!dirtyAttrs || typeof dirtyAttrs !== 'object') { - return cleanAttrs; - } - var booleanAttrs = [ - 'bold', - 'italic', - 'underline', - 'strike', - 'code', - 'blockquote', - 'code-block', - 'renderAsBlock', - ]; - var colorAttrs = ['background', 'color']; - var font = dirtyAttrs.font, size = dirtyAttrs.size, link = dirtyAttrs.link, script = dirtyAttrs.script, list = dirtyAttrs.list, header = dirtyAttrs.header, align = dirtyAttrs.align, direction = dirtyAttrs.direction, indent = dirtyAttrs.indent, mentions = dirtyAttrs.mentions, mention = dirtyAttrs.mention, width = dirtyAttrs.width, target = dirtyAttrs.target, rel = dirtyAttrs.rel; - var codeBlock = dirtyAttrs['code-block']; - var sanitizedAttrs = booleanAttrs.concat(colorAttrs, [ - 'font', - 'size', - 'link', - 'script', - 'list', - 'header', - 'align', - 'direction', - 'indent', - 'mentions', - 'mention', - 'width', - 'target', - 'rel', - 'code-block', - ]); - booleanAttrs.forEach(function (prop) { - var v = dirtyAttrs[prop]; - if (v) { - cleanAttrs[prop] = !!v; - } - }); - colorAttrs.forEach(function (prop) { - var val = dirtyAttrs[prop]; - if (val && - (OpAttributeSanitizer.IsValidHexColor(val + '') || - OpAttributeSanitizer.IsValidColorLiteral(val + '') || - OpAttributeSanitizer.IsValidRGBColor(val + ''))) { - cleanAttrs[prop] = val; - } - }); - if (font && OpAttributeSanitizer.IsValidFontName(font + '')) { - cleanAttrs.font = font; - } - if (size && OpAttributeSanitizer.IsValidSize(size + '')) { - cleanAttrs.size = size; - } - if (width && OpAttributeSanitizer.IsValidWidth(width + '')) { - cleanAttrs.width = width; - } - if (link) { - cleanAttrs.link = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(link + '', sanitizeOptions); - } - if (target && OpAttributeSanitizer.isValidTarget(target)) { - cleanAttrs.target = target; - } - if (rel && OpAttributeSanitizer.IsValidRel(rel)) { - cleanAttrs.rel = rel; - } - if (codeBlock) { - if (OpAttributeSanitizer.IsValidLang(codeBlock)) { - cleanAttrs['code-block'] = codeBlock; - } - else { - cleanAttrs['code-block'] = !!codeBlock; - } - } - if (script === value_types_1.ScriptType.Sub || value_types_1.ScriptType.Super === script) { - cleanAttrs.script = script; - } - if (list === value_types_1.ListType.Bullet || - list === value_types_1.ListType.Ordered || - list === value_types_1.ListType.Checked || - list === value_types_1.ListType.Unchecked) { - cleanAttrs.list = list; - } - if (Number(header)) { - cleanAttrs.header = Math.min(Number(header), 6); - } - if (array_1.find([value_types_1.AlignType.Center, value_types_1.AlignType.Right, value_types_1.AlignType.Justify, value_types_1.AlignType.Left], function (a) { return a === align; })) { - cleanAttrs.align = align; - } - if (direction === value_types_1.DirectionType.Rtl) { - cleanAttrs.direction = direction; - } - if (indent && Number(indent)) { - cleanAttrs.indent = Math.min(Number(indent), 30); - } - if (mentions && mention) { - var sanitizedMention = MentionSanitizer_1.MentionSanitizer.sanitize(mention, sanitizeOptions); - if (Object.keys(sanitizedMention).length > 0) { - cleanAttrs.mentions = !!mentions; - cleanAttrs.mention = mention; - } - } - return Object.keys(dirtyAttrs).reduce(function (cleaned, k) { - if (sanitizedAttrs.indexOf(k) === -1) { - cleaned[k] = dirtyAttrs[k]; - } - return cleaned; - }, cleanAttrs); - }; - OpAttributeSanitizer.IsValidHexColor = function (colorStr) { - return !!colorStr.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i); - }; - OpAttributeSanitizer.IsValidColorLiteral = function (colorStr) { - return !!colorStr.match(/^[a-z]{1,50}$/i); - }; - OpAttributeSanitizer.IsValidRGBColor = function (colorStr) { - var re = /^rgb\(((0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d),\s*){2}(0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d)\)$/i; - return !!colorStr.match(re); - }; - OpAttributeSanitizer.IsValidFontName = function (fontName) { - return !!fontName.match(/^[a-z\s0-9\- ]{1,30}$/i); - }; - OpAttributeSanitizer.IsValidSize = function (size) { - return !!size.match(/^[a-z0-9\-]{1,20}$/i); - }; - OpAttributeSanitizer.IsValidWidth = function (width) { - return !!width.match(/^[0-9]*(px|em|%)?$/); - }; - OpAttributeSanitizer.isValidTarget = function (target) { - return !!target.match(/^[_a-zA-Z0-9\-]{1,50}$/); - }; - OpAttributeSanitizer.IsValidRel = function (relStr) { - return !!relStr.match(/^[a-zA-Z\s\-]{1,250}$/i); - }; - OpAttributeSanitizer.IsValidLang = function (lang) { - if (typeof lang === 'boolean') { - return true; - } - return !!lang.match(/^[a-zA-Z\s\-\\\/\+]{1,50}$/i); - }; - return OpAttributeSanitizer; -}()); -exports.OpAttributeSanitizer = OpAttributeSanitizer; - -},{"./OpLinkSanitizer":6,"./helpers/array":14,"./mentions/MentionSanitizer":18,"./value-types":19}],6:[function(require,module,exports){ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var url = __importStar(require("./helpers/url")); -var funcs_html_1 = require("./funcs-html"); -var OpLinkSanitizer = (function () { - function OpLinkSanitizer() { - } - OpLinkSanitizer.sanitize = function (link, options) { - var sanitizerFn = function () { - return undefined; - }; - if (options && typeof options.urlSanitizer === 'function') { - sanitizerFn = options.urlSanitizer; - } - var result = sanitizerFn(link); - return typeof result === 'string' ? result : funcs_html_1.encodeLink(url.sanitize(link)); - }; - return OpLinkSanitizer; -}()); -exports.OpLinkSanitizer = OpLinkSanitizer; - -},{"./funcs-html":9,"./helpers/url":17}],7:[function(require,module,exports){ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var funcs_html_1 = require("./funcs-html"); -var value_types_1 = require("./value-types"); -var obj = __importStar(require("./helpers/object")); -var arr = __importStar(require("./helpers/array")); -var OpAttributeSanitizer_1 = require("./OpAttributeSanitizer"); -var DEFAULT_INLINE_FONTS = { - serif: 'font-family: Georgia, Times New Roman, serif', - monospace: 'font-family: Monaco, Courier New, monospace', -}; -exports.DEFAULT_INLINE_STYLES = { - font: function (value) { return DEFAULT_INLINE_FONTS[value] || 'font-family:' + value; }, - size: { - small: 'font-size: 0.75em', - large: 'font-size: 1.5em', - huge: 'font-size: 2.5em', - }, - indent: function (value, op) { - var indentSize = parseInt(value, 10) * 3; - var side = op.attributes['direction'] === 'rtl' ? 'right' : 'left'; - return 'padding-' + side + ':' + indentSize + 'em'; - }, - direction: function (value, op) { - if (value === 'rtl') { - return ('direction:rtl' + (op.attributes['align'] ? '' : '; text-align:inherit')); - } - else { - return undefined; - } - }, -}; -var OpToHtmlConverter = (function () { - function OpToHtmlConverter(op, options) { - this.op = op; - this.options = obj.assign({}, { - classPrefix: 'ql', - inlineStyles: undefined, - encodeHtml: true, - listItemTag: 'li', - paragraphTag: 'p', - }, options); - } - OpToHtmlConverter.prototype.prefixClass = function (className) { - if (!this.options.classPrefix) { - return className + ''; - } - return this.options.classPrefix + '-' + className; - }; - OpToHtmlConverter.prototype.getHtml = function () { - var parts = this.getHtmlParts(); - return parts.openingTag + parts.content + parts.closingTag; - }; - OpToHtmlConverter.prototype.getHtmlParts = function () { - var _this = this; - if (this.op.isJustNewline() && !this.op.isContainerBlock()) { - return { openingTag: '', closingTag: '', content: value_types_1.NewLine }; - } - var tags = this.getTags(), attrs = this.getTagAttributes(); - if (!tags.length && attrs.length) { - tags.push('span'); - } - var beginTags = [], endTags = []; - var imgTag = 'img'; - var isImageLink = function (tag) { - return tag === imgTag && !!_this.op.attributes.link; - }; - for (var _i = 0, tags_1 = tags; _i < tags_1.length; _i++) { - var tag = tags_1[_i]; - if (isImageLink(tag)) { - beginTags.push(funcs_html_1.makeStartTag('a', this.getLinkAttrs())); - } - beginTags.push(funcs_html_1.makeStartTag(tag, attrs)); - endTags.push(tag === 'img' ? '' : funcs_html_1.makeEndTag(tag)); - if (isImageLink(tag)) { - endTags.push(funcs_html_1.makeEndTag('a')); - } - attrs = []; - } - endTags.reverse(); - return { - openingTag: beginTags.join(''), - content: this.getContent(), - closingTag: endTags.join(''), - }; - }; - OpToHtmlConverter.prototype.getContent = function () { - if (this.op.isContainerBlock()) { - return ''; - } - if (this.op.isMentions()) { - return this.op.insert.value; - } - var content = this.op.isFormula() || this.op.isText() ? this.op.insert.value : ''; - return (this.options.encodeHtml && funcs_html_1.encodeHtml(content)) || content; - }; - OpToHtmlConverter.prototype.getCssClasses = function () { - var attrs = this.op.attributes; - if (this.options.inlineStyles) { - return []; - } - var propsArr = ['indent', 'align', 'direction', 'font', 'size']; - if (this.options.allowBackgroundClasses) { - propsArr.push('background'); - } - return (this.getCustomCssClasses() || []).concat(propsArr - .filter(function (prop) { return !!attrs[prop]; }) - .filter(function (prop) { - return prop === 'background' - ? OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidColorLiteral(attrs[prop]) - : true; - }) - .map(function (prop) { return prop + '-' + attrs[prop]; }) - .concat(this.op.isFormula() ? 'formula' : []) - .concat(this.op.isVideo() ? 'video' : []) - .concat(this.op.isImage() ? 'image' : []) - .map(this.prefixClass.bind(this))); - }; - OpToHtmlConverter.prototype.getCssStyles = function () { - var _this = this; - var attrs = this.op.attributes; - var propsArr = [['color']]; - if (!!this.options.inlineStyles || !this.options.allowBackgroundClasses) { - propsArr.push(['background', 'background-color']); - } - if (this.options.inlineStyles) { - propsArr = propsArr.concat([ - ['indent'], - ['align', 'text-align'], - ['direction'], - ['font', 'font-family'], - ['size'], - ]); - } - return (this.getCustomCssStyles() || []) - .concat(propsArr - .filter(function (item) { return !!attrs[item[0]]; }) - .map(function (item) { - var attribute = item[0]; - var attrValue = attrs[attribute]; - var attributeConverter = (_this.options.inlineStyles && - _this.options.inlineStyles[attribute]) || - exports.DEFAULT_INLINE_STYLES[attribute]; - if (typeof attributeConverter === 'object') { - return attributeConverter[attrValue]; - } - else if (typeof attributeConverter === 'function') { - var converterFn = attributeConverter; - return converterFn(attrValue, _this.op); - } - else { - return arr.preferSecond(item) + ':' + attrValue; - } - })) - .filter(function (item) { return item !== undefined; }); - }; - OpToHtmlConverter.prototype.getTagAttributes = function () { - if (this.op.attributes.code && !this.op.isLink()) { - return []; - } - var makeAttr = this.makeAttr.bind(this); - var customTagAttributes = this.getCustomTagAttributes(); - var customAttr = customTagAttributes - ? Object.keys(this.getCustomTagAttributes()).map(function (k) { - return makeAttr(k, customTagAttributes[k]); - }) - : []; - var classes = this.getCssClasses(); - var tagAttrs = classes.length - ? customAttr.concat([makeAttr('class', classes.join(' '))]) - : customAttr; - if (this.op.isImage()) { - this.op.attributes.width && - (tagAttrs = tagAttrs.concat(makeAttr('width', this.op.attributes.width))); - return tagAttrs.concat(makeAttr('src', this.op.insert.value)); - } - if (this.op.isACheckList()) { - return tagAttrs.concat(makeAttr('data-checked', this.op.isCheckedList() ? 'true' : 'false')); - } - if (this.op.isFormula()) { - return tagAttrs; - } - if (this.op.isVideo()) { - return tagAttrs.concat(makeAttr('frameborder', '0'), makeAttr('allowfullscreen', 'true'), makeAttr('src', this.op.insert.value)); - } - if (this.op.isMentions()) { - var mention = this.op.attributes.mention; - if (mention.class) { - tagAttrs = tagAttrs.concat(makeAttr('class', mention.class)); - } - if (mention['end-point'] && mention.slug) { - tagAttrs = tagAttrs.concat(makeAttr('href', mention['end-point'] + '/' + mention.slug)); - } - else { - tagAttrs = tagAttrs.concat(makeAttr('href', 'about:blank')); - } - if (mention.target) { - tagAttrs = tagAttrs.concat(makeAttr('target', mention.target)); - } - return tagAttrs; - } - var styles = this.getCssStyles(); - if (styles.length) { - tagAttrs.push(makeAttr('style', styles.join(';'))); - } - if (this.op.isCodeBlock() && - typeof this.op.attributes['code-block'] === 'string') { - return tagAttrs.concat(makeAttr('data-language', this.op.attributes['code-block'])); - } - if (this.op.isContainerBlock()) { - return tagAttrs; - } - if (this.op.isLink()) { - tagAttrs = tagAttrs.concat(this.getLinkAttrs()); - } - return tagAttrs; - }; - OpToHtmlConverter.prototype.makeAttr = function (k, v) { - return { key: k, value: v }; - }; - OpToHtmlConverter.prototype.getLinkAttrs = function () { - var tagAttrs = []; - var targetForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.isValidTarget(this.options.linkTarget || '') - ? this.options.linkTarget - : undefined; - var relForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidRel(this.options.linkRel || '') - ? this.options.linkRel - : undefined; - var target = this.op.attributes.target || targetForAll; - var rel = this.op.attributes.rel || relForAll; - return tagAttrs - .concat(this.makeAttr('href', this.op.attributes.link)) - .concat(target ? this.makeAttr('target', target) : []) - .concat(rel ? this.makeAttr('rel', rel) : []); - }; - OpToHtmlConverter.prototype.getCustomTag = function (format) { - if (this.options.customTag && - typeof this.options.customTag === 'function') { - return this.options.customTag.apply(null, [format, this.op]); - } - }; - OpToHtmlConverter.prototype.getCustomTagAttributes = function () { - if (this.options.customTagAttributes && - typeof this.options.customTagAttributes === 'function') { - return this.options.customTagAttributes.apply(null, [this.op]); - } - }; - OpToHtmlConverter.prototype.getCustomCssClasses = function () { - if (this.options.customCssClasses && - typeof this.options.customCssClasses === 'function') { - var res = this.options.customCssClasses.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - }; - OpToHtmlConverter.prototype.getCustomCssStyles = function () { - if (this.options.customCssStyles && - typeof this.options.customCssStyles === 'function') { - var res = this.options.customCssStyles.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - }; - OpToHtmlConverter.prototype.getTags = function () { - var _this = this; - var attrs = this.op.attributes; - if (!this.op.isText()) { - return [ - this.op.isVideo() ? 'iframe' : this.op.isImage() ? 'img' : 'span', - ]; - } - var positionTag = this.options.paragraphTag || 'p'; - var blocks = [ - ['blockquote'], - ['code-block', 'pre'], - ['list', this.options.listItemTag], - ['header'], - ['align', positionTag], - ['direction', positionTag], - ['indent', positionTag], - ]; - for (var _i = 0, blocks_1 = blocks; _i < blocks_1.length; _i++) { - var item = blocks_1[_i]; - var firstItem = item[0]; - if (attrs[firstItem]) { - var customTag = this.getCustomTag(firstItem); - return customTag - ? [customTag] - : firstItem === 'header' - ? ['h' + attrs[firstItem]] - : [arr.preferSecond(item)]; - } - } - if (this.op.isCustomTextBlock()) { - var customTag = this.getCustomTag('renderAsBlock'); - return customTag ? [customTag] : [positionTag]; - } - var customTagsMap = Object.keys(attrs).reduce(function (res, it) { - var customTag = _this.getCustomTag(it); - if (customTag) { - res[it] = customTag; - } - return res; - }, {}); - var inlineTags = [ - ['link', 'a'], - ['mentions', 'a'], - ['script'], - ['bold', 'strong'], - ['italic', 'em'], - ['strike', 's'], - ['underline', 'u'], - ['code'], - ]; - return inlineTags.filter(function (item) { return !!attrs[item[0]]; }).concat(Object.keys(customTagsMap) - .filter(function (t) { return !inlineTags.some(function (it) { return it[0] == t; }); }) - .map(function (t) { return [t, customTagsMap[t]]; })).map(function (item) { - return customTagsMap[item[0]] - ? customTagsMap[item[0]] - : item[0] === 'script' - ? attrs[item[0]] === value_types_1.ScriptType.Sub - ? 'sub' - : 'sup' - : arr.preferSecond(item); - }); - }; - return OpToHtmlConverter; -}()); -exports.OpToHtmlConverter = OpToHtmlConverter; - -},{"./OpAttributeSanitizer":5,"./funcs-html":9,"./helpers/array":14,"./helpers/object":15,"./value-types":19}],8:[function(require,module,exports){ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var InsertOpsConverter_1 = require("./InsertOpsConverter"); -var OpToHtmlConverter_1 = require("./OpToHtmlConverter"); -var Grouper_1 = require("./grouper/Grouper"); -var group_types_1 = require("./grouper/group-types"); -var ListNester_1 = require("./grouper/ListNester"); -var funcs_html_1 = require("./funcs-html"); -var obj = __importStar(require("./helpers/object")); -var value_types_1 = require("./value-types"); -var TableGrouper_1 = require("./grouper/TableGrouper"); -var BrTag = '
'; -var QuillDeltaToHtmlConverter = (function () { - function QuillDeltaToHtmlConverter(deltaOps, options) { - this.rawDeltaOps = []; - this.callbacks = {}; - this.options = obj.assign({ - paragraphTag: 'p', - encodeHtml: true, - classPrefix: 'ql', - inlineStyles: false, - multiLineBlockquote: true, - multiLineHeader: true, - multiLineCodeblock: true, - multiLineParagraph: true, - multiLineCustomBlock: true, - allowBackgroundClasses: false, - linkTarget: '_blank', - }, options, { - orderedListTag: 'ol', - bulletListTag: 'ul', - listItemTag: 'li', - }); - var inlineStyles; - if (!this.options.inlineStyles) { - inlineStyles = undefined; - } - else if (typeof this.options.inlineStyles === 'object') { - inlineStyles = this.options.inlineStyles; - } - else { - inlineStyles = {}; - } - this.converterOptions = { - encodeHtml: this.options.encodeHtml, - classPrefix: this.options.classPrefix, - inlineStyles: inlineStyles, - listItemTag: this.options.listItemTag, - paragraphTag: this.options.paragraphTag, - linkRel: this.options.linkRel, - linkTarget: this.options.linkTarget, - allowBackgroundClasses: this.options.allowBackgroundClasses, - customTag: this.options.customTag, - customTagAttributes: this.options.customTagAttributes, - customCssClasses: this.options.customCssClasses, - customCssStyles: this.options.customCssStyles, - }; - this.rawDeltaOps = deltaOps; - } - QuillDeltaToHtmlConverter.prototype._getListTag = function (op) { - return op.isOrderedList() - ? this.options.orderedListTag + '' - : op.isBulletList() - ? this.options.bulletListTag + '' - : op.isCheckedList() - ? this.options.bulletListTag + '' - : op.isUncheckedList() - ? this.options.bulletListTag + '' - : ''; - }; - QuillDeltaToHtmlConverter.prototype.getGroupedOps = function () { - var deltaOps = InsertOpsConverter_1.InsertOpsConverter.convert(this.rawDeltaOps, this.options); - var pairedOps = Grouper_1.Grouper.pairOpsWithTheirBlock(deltaOps); - var groupedSameStyleBlocks = Grouper_1.Grouper.groupConsecutiveSameStyleBlocks(pairedOps, { - blockquotes: !!this.options.multiLineBlockquote, - header: !!this.options.multiLineHeader, - codeBlocks: !!this.options.multiLineCodeblock, - customBlocks: !!this.options.multiLineCustomBlock, - }); - var groupedOps = Grouper_1.Grouper.reduceConsecutiveSameStyleBlocksToOne(groupedSameStyleBlocks); - var tableGrouper = new TableGrouper_1.TableGrouper(); - groupedOps = tableGrouper.group(groupedOps); - var listNester = new ListNester_1.ListNester(); - return listNester.nest(groupedOps); - }; - QuillDeltaToHtmlConverter.prototype.convert = function () { - var _this = this; - var groups = this.getGroupedOps(); - return groups - .map(function (group) { - if (group instanceof group_types_1.ListGroup) { - return _this._renderWithCallbacks(value_types_1.GroupType.List, group, function () { - return _this._renderList(group); - }); - } - else if (group instanceof group_types_1.TableGroup) { - return _this._renderWithCallbacks(value_types_1.GroupType.Table, group, function () { - return _this._renderTable(group); - }); - } - else if (group instanceof group_types_1.BlockGroup) { - var g = group; - return _this._renderWithCallbacks(value_types_1.GroupType.Block, group, function () { - return _this._renderBlock(g.op, g.ops); - }); - } - else if (group instanceof group_types_1.BlotBlock) { - return _this._renderCustom(group.op, null); - } - else if (group instanceof group_types_1.VideoItem) { - return _this._renderWithCallbacks(value_types_1.GroupType.Video, group, function () { - var g = group; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(g.op, _this.converterOptions); - return converter.getHtml(); - }); - } - else { - return _this._renderWithCallbacks(value_types_1.GroupType.InlineGroup, group, function () { - return _this._renderInlines(group.ops, true); - }); - } - }) - .join(''); - }; - QuillDeltaToHtmlConverter.prototype._renderWithCallbacks = function (groupType, group, myRenderFn) { - var html = ''; - var beforeCb = this.callbacks['beforeRender_cb']; - html = - typeof beforeCb === 'function' - ? beforeCb.apply(null, [groupType, group]) - : ''; - if (!html) { - html = myRenderFn(); - } - var afterCb = this.callbacks['afterRender_cb']; - html = - typeof afterCb === 'function' - ? afterCb.apply(null, [groupType, html]) - : html; - return html; - }; - QuillDeltaToHtmlConverter.prototype._renderList = function (list) { - var _this = this; - var firstItem = list.items[0]; - return (funcs_html_1.makeStartTag(this._getListTag(firstItem.item.op)) + - list.items.map(function (li) { return _this._renderListItem(li); }).join('') + - funcs_html_1.makeEndTag(this._getListTag(firstItem.item.op))); - }; - QuillDeltaToHtmlConverter.prototype._renderListItem = function (li) { - li.item.op.attributes.indent = 0; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(li.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var liElementsHtml = this._renderInlines(li.item.ops, false); - return (parts.openingTag + - liElementsHtml + - (li.innerList ? this._renderList(li.innerList) : '') + - parts.closingTag); - }; - QuillDeltaToHtmlConverter.prototype._renderTable = function (table) { - var _this = this; - return (funcs_html_1.makeStartTag('table') + - funcs_html_1.makeStartTag('tbody') + - table.rows.map(function (row) { return _this._renderTableRow(row); }).join('') + - funcs_html_1.makeEndTag('tbody') + - funcs_html_1.makeEndTag('table')); - }; - QuillDeltaToHtmlConverter.prototype._renderTableRow = function (row) { - var _this = this; - return (funcs_html_1.makeStartTag('tr') + - row.cells.map(function (cell) { return _this._renderTableCell(cell); }).join('') + - funcs_html_1.makeEndTag('tr')); - }; - QuillDeltaToHtmlConverter.prototype._renderTableCell = function (cell) { - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(cell.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var cellElementsHtml = this._renderInlines(cell.item.ops, false); - return (funcs_html_1.makeStartTag('td', { - key: 'data-row', - value: cell.item.op.attributes.table, - }) + - parts.openingTag + - cellElementsHtml + - parts.closingTag + - funcs_html_1.makeEndTag('td')); - }; - QuillDeltaToHtmlConverter.prototype._renderBlock = function (bop, ops) { - var _this = this; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(bop, this.converterOptions); - var htmlParts = converter.getHtmlParts(); - if (bop.isCodeBlock()) { - return (htmlParts.openingTag + - funcs_html_1.encodeHtml(ops - .map(function (iop) { - return iop.isCustomEmbed() - ? _this._renderCustom(iop, bop) - : iop.insert.value; - }) - .join('')) + - htmlParts.closingTag); - } - var inlines = ops.map(function (op) { return _this._renderInline(op, bop); }).join(''); - return htmlParts.openingTag + (inlines || BrTag) + htmlParts.closingTag; - }; - QuillDeltaToHtmlConverter.prototype._renderInlines = function (ops, isInlineGroup) { - var _this = this; - if (isInlineGroup === void 0) { isInlineGroup = true; } - var opsLen = ops.length - 1; - var html = ops - .map(function (op, i) { - if (i > 0 && i === opsLen && op.isJustNewline()) { - return ''; - } - return _this._renderInline(op, null); - }) - .join(''); - if (!isInlineGroup) { - return html; - } - var startParaTag = funcs_html_1.makeStartTag(this.options.paragraphTag); - var endParaTag = funcs_html_1.makeEndTag(this.options.paragraphTag); - if (html === BrTag || this.options.multiLineParagraph) { - return startParaTag + html + endParaTag; - } - return (startParaTag + - html - .split(BrTag) - .map(function (v) { - return v === '' ? BrTag : v; - }) - .join(endParaTag + startParaTag) + - endParaTag); - }; - QuillDeltaToHtmlConverter.prototype._renderInline = function (op, contextOp) { - if (op.isCustomEmbed()) { - return this._renderCustom(op, contextOp); - } - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(op, this.converterOptions); - return converter.getHtml().replace(/\n/g, BrTag); - }; - QuillDeltaToHtmlConverter.prototype._renderCustom = function (op, contextOp) { - var renderCb = this.callbacks['renderCustomOp_cb']; - if (typeof renderCb === 'function') { - return renderCb.apply(null, [op, contextOp]); - } - return ''; - }; - QuillDeltaToHtmlConverter.prototype.beforeRender = function (cb) { - if (typeof cb === 'function') { - this.callbacks['beforeRender_cb'] = cb; - } - }; - QuillDeltaToHtmlConverter.prototype.afterRender = function (cb) { - if (typeof cb === 'function') { - this.callbacks['afterRender_cb'] = cb; - } - }; - QuillDeltaToHtmlConverter.prototype.renderCustomWith = function (cb) { - this.callbacks['renderCustomOp_cb'] = cb; - }; - return QuillDeltaToHtmlConverter; -}()); -exports.QuillDeltaToHtmlConverter = QuillDeltaToHtmlConverter; - -},{"./InsertOpsConverter":4,"./OpToHtmlConverter":7,"./funcs-html":9,"./grouper/Grouper":10,"./grouper/ListNester":11,"./grouper/TableGrouper":12,"./grouper/group-types":13,"./helpers/object":15,"./value-types":19}],9:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var EncodeTarget; -(function (EncodeTarget) { - EncodeTarget[EncodeTarget["Html"] = 0] = "Html"; - EncodeTarget[EncodeTarget["Url"] = 1] = "Url"; -})(EncodeTarget || (EncodeTarget = {})); -function makeStartTag(tag, attrs) { - if (attrs === void 0) { attrs = undefined; } - if (!tag) { - return ''; - } - var attrsStr = ''; - if (attrs) { - var arrAttrs = [].concat(attrs); - attrsStr = arrAttrs - .map(function (attr) { - return attr.key + (attr.value ? '="' + attr.value + '"' : ''); - }) - .join(' '); - } - var closing = '>'; - if (tag === 'img' || tag === 'br') { - closing = '/>'; - } - return attrsStr ? "<" + tag + " " + attrsStr + closing : "<" + tag + closing; -} -exports.makeStartTag = makeStartTag; -function makeEndTag(tag) { - if (tag === void 0) { tag = ''; } - return (tag && "") || ''; -} -exports.makeEndTag = makeEndTag; -function decodeHtml(str) { - return encodeMappings(EncodeTarget.Html).reduce(decodeMapping, str); -} -exports.decodeHtml = decodeHtml; -function encodeHtml(str, preventDoubleEncoding) { - if (preventDoubleEncoding === void 0) { preventDoubleEncoding = true; } - if (preventDoubleEncoding) { - str = decodeHtml(str); - } - return encodeMappings(EncodeTarget.Html).reduce(encodeMapping, str); -} -exports.encodeHtml = encodeHtml; -function encodeLink(str) { - var linkMaps = encodeMappings(EncodeTarget.Url); - var decoded = linkMaps.reduce(decodeMapping, str); - return linkMaps.reduce(encodeMapping, decoded); -} -exports.encodeLink = encodeLink; -function encodeMappings(mtype) { - var maps = [ - ['&', '&'], - ['<', '<'], - ['>', '>'], - ['"', '"'], - ["'", '''], - ['\\/', '/'], - ['\\(', '('], - ['\\)', ')'], - ]; - if (mtype === EncodeTarget.Html) { - return maps.filter(function (_a) { - var v = _a[0], _ = _a[1]; - return v.indexOf('(') === -1 && v.indexOf(')') === -1; - }); - } - else { - return maps.filter(function (_a) { - var v = _a[0], _ = _a[1]; - return v.indexOf('/') === -1; - }); - } -} -function encodeMapping(str, mapping) { - return str.replace(new RegExp(mapping[0], 'g'), mapping[1]); -} -function decodeMapping(str, mapping) { - return str.replace(new RegExp(mapping[1], 'g'), mapping[0].replace('\\', '')); -} - -},{}],10:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DeltaInsertOp_1 = require("./../DeltaInsertOp"); -var array_1 = require("./../helpers/array"); -var group_types_1 = require("./group-types"); -var Grouper = (function () { - function Grouper() { - } - Grouper.pairOpsWithTheirBlock = function (ops) { - var result = []; - var canBeInBlock = function (op) { - return !(op.isJustNewline() || - op.isCustomEmbedBlock() || - op.isVideo() || - op.isContainerBlock()); - }; - var isInlineData = function (op) { return op.isInline(); }; - var lastInd = ops.length - 1; - var opsSlice; - for (var i = lastInd; i >= 0; i--) { - var op = ops[i]; - if (op.isVideo()) { - result.push(new group_types_1.VideoItem(op)); - } - else if (op.isCustomEmbedBlock()) { - result.push(new group_types_1.BlotBlock(op)); - } - else if (op.isContainerBlock()) { - opsSlice = array_1.sliceFromReverseWhile(ops, i - 1, canBeInBlock); - result.push(new group_types_1.BlockGroup(op, opsSlice.elements)); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } - else { - opsSlice = array_1.sliceFromReverseWhile(ops, i - 1, isInlineData); - result.push(new group_types_1.InlineGroup(opsSlice.elements.concat(op))); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } - } - result.reverse(); - return result; - }; - Grouper.groupConsecutiveSameStyleBlocks = function (groups, blocksOf) { - if (blocksOf === void 0) { blocksOf = { - header: true, - codeBlocks: true, - blockquotes: true, - customBlocks: true, - }; } - return array_1.groupConsecutiveElementsWhile(groups, function (g, gPrev) { - if (!(g instanceof group_types_1.BlockGroup) || !(gPrev instanceof group_types_1.BlockGroup)) { - return false; - } - return ((blocksOf.codeBlocks && - Grouper.areBothCodeblocksWithSameLang(g, gPrev)) || - (blocksOf.blockquotes && - Grouper.areBothBlockquotesWithSameAdi(g, gPrev)) || - (blocksOf.header && - Grouper.areBothSameHeadersWithSameAdi(g, gPrev)) || - (blocksOf.customBlocks && - Grouper.areBothCustomBlockWithSameAttr(g, gPrev))); - }); - }; - Grouper.reduceConsecutiveSameStyleBlocksToOne = function (groups) { - var newLineOp = DeltaInsertOp_1.DeltaInsertOp.createNewLineOp(); - return groups.map(function (elm) { - if (!Array.isArray(elm)) { - if (elm instanceof group_types_1.BlockGroup && !elm.ops.length) { - elm.ops.push(newLineOp); - } - return elm; - } - var groupsLastInd = elm.length - 1; - elm[0].ops = array_1.flatten(elm.map(function (g, i) { - if (!g.ops.length) { - return [newLineOp]; - } - return g.ops.concat(i < groupsLastInd ? [newLineOp] : []); - })); - return elm[0]; - }); - }; - Grouper.areBothCodeblocksWithSameLang = function (g1, gOther) { - return (g1.op.isCodeBlock() && - gOther.op.isCodeBlock() && - g1.op.hasSameLangAs(gOther.op)); - }; - Grouper.areBothSameHeadersWithSameAdi = function (g1, gOther) { - return g1.op.isSameHeaderAs(gOther.op) && g1.op.hasSameAdiAs(gOther.op); - }; - Grouper.areBothBlockquotesWithSameAdi = function (g, gOther) { - return (g.op.isBlockquote() && - gOther.op.isBlockquote() && - g.op.hasSameAdiAs(gOther.op)); - }; - Grouper.areBothCustomBlockWithSameAttr = function (g, gOther) { - return (g.op.isCustomTextBlock() && - gOther.op.isCustomTextBlock() && - g.op.hasSameAttr(gOther.op)); - }; - return Grouper; -}()); -exports.Grouper = Grouper; - -},{"./../DeltaInsertOp":1,"./../helpers/array":14,"./group-types":13}],11:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var group_types_1 = require("./group-types"); -var array_1 = require("./../helpers/array"); -var ListNester = (function () { - function ListNester() { - } - ListNester.prototype.nest = function (groups) { - var _this = this; - var listBlocked = this.convertListBlocksToListGroups(groups); - var groupedByListGroups = this.groupConsecutiveListGroups(listBlocked); - var nested = array_1.flatten(groupedByListGroups.map(function (group) { - if (!Array.isArray(group)) { - return group; - } - return _this.nestListSection(group); - })); - var groupRootLists = array_1.groupConsecutiveElementsWhile(nested, function (curr, prev) { - if (!(curr instanceof group_types_1.ListGroup && prev instanceof group_types_1.ListGroup)) { - return false; - } - return curr.items[0].item.op.isSameListAs(prev.items[0].item.op); - }); - return groupRootLists.map(function (v) { - if (!Array.isArray(v)) { - return v; - } - var litems = v.map(function (g) { return g.items; }); - return new group_types_1.ListGroup(array_1.flatten(litems)); - }); - }; - ListNester.prototype.convertListBlocksToListGroups = function (items) { - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isList() && - gPrev.op.isList() && - g.op.isSameListAs(gPrev.op) && - g.op.hasSameIndentationAs(gPrev.op)); - }); - return grouped.map(function (item) { - if (!Array.isArray(item)) { - if (item instanceof group_types_1.BlockGroup && item.op.isList()) { - return new group_types_1.ListGroup([new group_types_1.ListItem(item)]); - } - return item; - } - return new group_types_1.ListGroup(item.map(function (g) { return new group_types_1.ListItem(g); })); - }); - }; - ListNester.prototype.groupConsecutiveListGroups = function (items) { - return array_1.groupConsecutiveElementsWhile(items, function (curr, prev) { - return curr instanceof group_types_1.ListGroup && prev instanceof group_types_1.ListGroup; - }); - }; - ListNester.prototype.nestListSection = function (sectionItems) { - var _this = this; - var indentGroups = this.groupByIndent(sectionItems); - Object.keys(indentGroups) - .map(Number) - .sort() - .reverse() - .forEach(function (indent) { - indentGroups[indent].forEach(function (lg) { - var idx = sectionItems.indexOf(lg); - if (_this.placeUnderParent(lg, sectionItems.slice(0, idx))) { - sectionItems.splice(idx, 1); - } - }); - }); - return sectionItems; - }; - ListNester.prototype.groupByIndent = function (items) { - return items.reduce(function (pv, cv) { - var indent = cv.items[0].item.op.attributes.indent; - if (indent) { - pv[indent] = pv[indent] || []; - pv[indent].push(cv); - } - return pv; - }, {}); - }; - ListNester.prototype.placeUnderParent = function (target, items) { - for (var i = items.length - 1; i >= 0; i--) { - var elm = items[i]; - if (target.items[0].item.op.hasHigherIndentThan(elm.items[0].item.op)) { - var parent = elm.items[elm.items.length - 1]; - if (parent.innerList) { - parent.innerList.items = parent.innerList.items.concat(target.items); - } - else { - parent.innerList = target; - } - return true; - } - } - return false; - }; - return ListNester; -}()); -exports.ListNester = ListNester; - -},{"./../helpers/array":14,"./group-types":13}],12:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var group_types_1 = require("./group-types"); -var array_1 = require("../helpers/array"); -var TableGrouper = (function () { - function TableGrouper() { - } - TableGrouper.prototype.group = function (groups) { - var tableBlocked = this.convertTableBlocksToTableGroups(groups); - return tableBlocked; - }; - TableGrouper.prototype.convertTableBlocksToTableGroups = function (items) { - var _this = this; - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isTable() && - gPrev.op.isTable()); - }); - return grouped.map(function (item) { - if (!Array.isArray(item)) { - if (item instanceof group_types_1.BlockGroup && item.op.isTable()) { - return new group_types_1.TableGroup([new group_types_1.TableRow([new group_types_1.TableCell(item)])]); - } - return item; - } - return new group_types_1.TableGroup(_this.convertTableBlocksToTableRows(item)); - }); - }; - TableGrouper.prototype.convertTableBlocksToTableRows = function (items) { - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isTable() && - gPrev.op.isTable() && - g.op.isSameTableRowAs(gPrev.op)); - }); - return grouped.map(function (item) { - return new group_types_1.TableRow(Array.isArray(item) - ? item.map(function (it) { return new group_types_1.TableCell(it); }) - : [new group_types_1.TableCell(item)]); - }); - }; - return TableGrouper; -}()); -exports.TableGrouper = TableGrouper; - -},{"../helpers/array":14,"./group-types":13}],13:[function(require,module,exports){ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var InlineGroup = (function () { - function InlineGroup(ops) { - this.ops = ops; - } - return InlineGroup; -}()); -exports.InlineGroup = InlineGroup; -var SingleItem = (function () { - function SingleItem(op) { - this.op = op; - } - return SingleItem; -}()); -var VideoItem = (function (_super) { - __extends(VideoItem, _super); - function VideoItem() { - return _super !== null && _super.apply(this, arguments) || this; - } - return VideoItem; -}(SingleItem)); -exports.VideoItem = VideoItem; -var BlotBlock = (function (_super) { - __extends(BlotBlock, _super); - function BlotBlock() { - return _super !== null && _super.apply(this, arguments) || this; - } - return BlotBlock; -}(SingleItem)); -exports.BlotBlock = BlotBlock; -var BlockGroup = (function () { - function BlockGroup(op, ops) { - this.op = op; - this.ops = ops; - } - return BlockGroup; -}()); -exports.BlockGroup = BlockGroup; -var ListGroup = (function () { - function ListGroup(items) { - this.items = items; - } - return ListGroup; -}()); -exports.ListGroup = ListGroup; -var ListItem = (function () { - function ListItem(item, innerList) { - if (innerList === void 0) { innerList = null; } - this.item = item; - this.innerList = innerList; - } - return ListItem; -}()); -exports.ListItem = ListItem; -var TableGroup = (function () { - function TableGroup(rows) { - this.rows = rows; - } - return TableGroup; -}()); -exports.TableGroup = TableGroup; -var TableRow = (function () { - function TableRow(cells) { - this.cells = cells; - } - return TableRow; -}()); -exports.TableRow = TableRow; -var TableCell = (function () { - function TableCell(item) { - this.item = item; - } - return TableCell; -}()); -exports.TableCell = TableCell; - -},{}],14:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function preferSecond(arr) { - if (arr.length === 0) { - return null; - } - return arr.length >= 2 ? arr[1] : arr[0]; -} -exports.preferSecond = preferSecond; -function flatten(arr) { - return arr.reduce(function (pv, v) { - return pv.concat(Array.isArray(v) ? flatten(v) : v); - }, []); -} -exports.flatten = flatten; -function find(arr, predicate) { - if (Array.prototype.find) { - return Array.prototype.find.call(arr, predicate); - } - for (var i = 0; i < arr.length; i++) { - if (predicate(arr[i])) - return arr[i]; - } - return undefined; -} -exports.find = find; -function groupConsecutiveElementsWhile(arr, predicate) { - var groups = []; - var currElm, currGroup; - for (var i = 0; i < arr.length; i++) { - currElm = arr[i]; - if (i > 0 && predicate(currElm, arr[i - 1])) { - currGroup = groups[groups.length - 1]; - currGroup.push(currElm); - } - else { - groups.push([currElm]); - } - } - return groups.map(function (g) { return (g.length === 1 ? g[0] : g); }); -} -exports.groupConsecutiveElementsWhile = groupConsecutiveElementsWhile; -function sliceFromReverseWhile(arr, startIndex, predicate) { - var result = { - elements: [], - sliceStartsAt: -1, - }; - for (var i = startIndex; i >= 0; i--) { - if (!predicate(arr[i])) { - break; - } - result.sliceStartsAt = i; - result.elements.unshift(arr[i]); - } - return result; -} -exports.sliceFromReverseWhile = sliceFromReverseWhile; -function intersperse(arr, item) { - return arr.reduce(function (pv, v, index) { - pv.push(v); - if (index < arr.length - 1) { - pv.push(item); - } - return pv; - }, []); -} -exports.intersperse = intersperse; - -},{}],15:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function assign(target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - var to = Object(target); - for (var index = 0; index < sources.length; index++) { - var nextSource = sources[index]; - if (nextSource != null) { - for (var nextKey in nextSource) { - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; -} -exports.assign = assign; - -},{}],16:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function tokenizeWithNewLines(str) { - var NewLine = '\n'; - if (str === NewLine) { - return [str]; - } - var lines = str.split(NewLine); - if (lines.length === 1) { - return lines; - } - var lastIndex = lines.length - 1; - return lines.reduce(function (pv, line, ind) { - if (ind !== lastIndex) { - if (line !== '') { - pv = pv.concat(line, NewLine); - } - else { - pv.push(NewLine); - } - } - else if (line !== '') { - pv.push(line); - } - return pv; - }, []); -} -exports.tokenizeWithNewLines = tokenizeWithNewLines; - -},{}],17:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function sanitize(str) { - var val = str; - val = val.replace(/^\s*/gm, ''); - var whiteList = /^((https?|s?ftp|file|blob|mailto|tel):|#|\/|data:image\/)/; - if (whiteList.test(val)) { - return val; - } - return 'unsafe:' + val; -} -exports.sanitize = sanitize; - -},{}],18:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var OpLinkSanitizer_1 = require("../OpLinkSanitizer"); -var MentionSanitizer = (function () { - function MentionSanitizer() { - } - MentionSanitizer.sanitize = function (dirtyObj, sanitizeOptions) { - var cleanObj = {}; - if (!dirtyObj || typeof dirtyObj !== 'object') { - return cleanObj; - } - if (dirtyObj.class && MentionSanitizer.IsValidClass(dirtyObj.class)) { - cleanObj.class = dirtyObj.class; - } - if (dirtyObj.id && MentionSanitizer.IsValidId(dirtyObj.id)) { - cleanObj.id = dirtyObj.id; - } - if (MentionSanitizer.IsValidTarget(dirtyObj.target + '')) { - cleanObj.target = dirtyObj.target; - } - if (dirtyObj.avatar) { - cleanObj.avatar = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj.avatar + '', sanitizeOptions); - } - if (dirtyObj['end-point']) { - cleanObj['end-point'] = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj['end-point'] + '', sanitizeOptions); - } - if (dirtyObj.slug) { - cleanObj.slug = dirtyObj.slug + ''; - } - return cleanObj; - }; - MentionSanitizer.IsValidClass = function (classAttr) { - return !!classAttr.match(/^[a-zA-Z0-9_\-]{1,500}$/i); - }; - MentionSanitizer.IsValidId = function (idAttr) { - return !!idAttr.match(/^[a-zA-Z0-9_\-\:\.]{1,500}$/i); - }; - MentionSanitizer.IsValidTarget = function (target) { - return ['_self', '_blank', '_parent', '_top'].indexOf(target) > -1; - }; - return MentionSanitizer; -}()); -exports.MentionSanitizer = MentionSanitizer; - -},{"../OpLinkSanitizer":6}],19:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var NewLine = '\n'; -exports.NewLine = NewLine; -var ListType; -(function (ListType) { - ListType["Ordered"] = "ordered"; - ListType["Bullet"] = "bullet"; - ListType["Checked"] = "checked"; - ListType["Unchecked"] = "unchecked"; -})(ListType || (ListType = {})); -exports.ListType = ListType; -var ScriptType; -(function (ScriptType) { - ScriptType["Sub"] = "sub"; - ScriptType["Super"] = "super"; -})(ScriptType || (ScriptType = {})); -exports.ScriptType = ScriptType; -var DirectionType; -(function (DirectionType) { - DirectionType["Rtl"] = "rtl"; -})(DirectionType || (DirectionType = {})); -exports.DirectionType = DirectionType; -var AlignType; -(function (AlignType) { - AlignType["Left"] = "left"; - AlignType["Center"] = "center"; - AlignType["Right"] = "right"; - AlignType["Justify"] = "justify"; -})(AlignType || (AlignType = {})); -exports.AlignType = AlignType; -var DataType; -(function (DataType) { - DataType["Image"] = "image"; - DataType["Video"] = "video"; - DataType["Formula"] = "formula"; - DataType["Text"] = "text"; -})(DataType || (DataType = {})); -exports.DataType = DataType; -var GroupType; -(function (GroupType) { - GroupType["Block"] = "block"; - GroupType["InlineGroup"] = "inline-group"; - GroupType["List"] = "list"; - GroupType["Video"] = "video"; - GroupType["Table"] = "table"; -})(GroupType || (GroupType = {})); -exports.GroupType = GroupType; - -},{}],20:[function(require,module,exports){ -(function (global){ -/** - * Lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * 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 to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - 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 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 of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** 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 = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -/** - * 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 `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/** - * 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; -} - -/** - * 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]; -} - -/** - * 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 resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** 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 - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = 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, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/* 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 == null ? 0 : entries.length; - - 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) : {}; - this.size = 0; -} - -/** - * 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) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -/** - * 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__; - this.size += this.has(key) ? 0 : 1; - 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 == null ? 0 : entries.length; - - 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__ = []; - this.size = 0; -} - -/** - * 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); - } - --this.size; - 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) { - ++this.size; - 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 == null ? 0 : entries.length; - - 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.size = 0; - 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) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -/** - * 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) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - 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 == null ? 0 : values.length; - - 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; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; -} - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} - -/** - * 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) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; -} - -/** - * 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 data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - 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) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -/** - * 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 `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` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -/** - * 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) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(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; -} - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/** - * 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; -} - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -/** - * 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 and promises in Node.js < 6. -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 = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - 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; - }; -} - -/** - * 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 `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @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 ''; -} - -/** - * 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 - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -/** - * 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); -} - -/** - * 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; - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.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 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ -function isEqual(value, other) { - return baseIsEqual(value, other); -} - -/** - * 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) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -/** - * 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 != null && (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 != null && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -/** - * 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 = isEqual; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}]},{},[8])(8) -}); -; window.QuillDeltaToHtmlConverter = window.QuillDeltaToHtmlConverter ? window.QuillDeltaToHtmlConverter.QuillDeltaToHtmlConverter : window.QuillDeltaToHtmlConverter; diff --git a/dist/commonjs/DeltaInsertOp.d.ts b/dist/commonjs/DeltaInsertOp.d.ts deleted file mode 100644 index 2a7d63b..0000000 --- a/dist/commonjs/DeltaInsertOp.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { IOpAttributes } from './OpAttributeSanitizer'; -import { InsertData } from './InsertData'; -declare class DeltaInsertOp { - readonly insert: InsertData; - readonly attributes: IOpAttributes; - constructor(insertVal: InsertData | string, attrs?: IOpAttributes); - static createNewLineOp(): DeltaInsertOp; - isContainerBlock(): boolean; - isBlockAttribute(): boolean; - isBlockquote(): boolean; - isHeader(): boolean; - isTable(): boolean; - isSameHeaderAs(op: DeltaInsertOp): boolean; - hasSameAdiAs(op: DeltaInsertOp): boolean; - hasSameIndentationAs(op: DeltaInsertOp): boolean; - hasSameAttr(op: DeltaInsertOp): boolean; - hasHigherIndentThan(op: DeltaInsertOp): boolean; - isInline(): boolean; - isCodeBlock(): boolean; - hasSameLangAs(op: DeltaInsertOp): boolean; - isJustNewline(): boolean; - isList(): boolean; - isOrderedList(): boolean; - isBulletList(): boolean; - isCheckedList(): boolean; - isUncheckedList(): boolean; - isACheckList(): boolean; - isSameListAs(op: DeltaInsertOp): boolean; - isSameTableRowAs(op: DeltaInsertOp): boolean; - isText(): boolean; - isImage(): boolean; - isFormula(): boolean; - isVideo(): boolean; - isLink(): boolean; - isCustomEmbed(): boolean; - isCustomEmbedBlock(): boolean; - isCustomTextBlock(): boolean; - isMentions(): boolean; -} -export { DeltaInsertOp }; diff --git a/dist/commonjs/DeltaInsertOp.js b/dist/commonjs/DeltaInsertOp.js deleted file mode 100644 index fca68ea..0000000 --- a/dist/commonjs/DeltaInsertOp.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var value_types_1 = require("./value-types"); -var InsertData_1 = require("./InsertData"); -var lodash_isequal_1 = __importDefault(require("lodash.isequal")); -var DeltaInsertOp = (function () { - function DeltaInsertOp(insertVal, attrs) { - if (typeof insertVal === 'string') { - insertVal = new InsertData_1.InsertDataQuill(value_types_1.DataType.Text, insertVal + ''); - } - this.insert = insertVal; - this.attributes = attrs || {}; - } - DeltaInsertOp.createNewLineOp = function () { - return new DeltaInsertOp(value_types_1.NewLine); - }; - DeltaInsertOp.prototype.isContainerBlock = function () { - return (this.isBlockquote() || - this.isList() || - this.isTable() || - this.isCodeBlock() || - this.isHeader() || - this.isBlockAttribute() || - this.isCustomTextBlock()); - }; - DeltaInsertOp.prototype.isBlockAttribute = function () { - var attrs = this.attributes; - return !!(attrs.align || attrs.direction || attrs.indent); - }; - DeltaInsertOp.prototype.isBlockquote = function () { - return !!this.attributes.blockquote; - }; - DeltaInsertOp.prototype.isHeader = function () { - return !!this.attributes.header; - }; - DeltaInsertOp.prototype.isTable = function () { - return !!this.attributes.table; - }; - DeltaInsertOp.prototype.isSameHeaderAs = function (op) { - return op.attributes.header === this.attributes.header && this.isHeader(); - }; - DeltaInsertOp.prototype.hasSameAdiAs = function (op) { - return (this.attributes.align === op.attributes.align && - this.attributes.direction === op.attributes.direction && - this.attributes.indent === op.attributes.indent); - }; - DeltaInsertOp.prototype.hasSameIndentationAs = function (op) { - return this.attributes.indent === op.attributes.indent; - }; - DeltaInsertOp.prototype.hasSameAttr = function (op) { - return lodash_isequal_1.default(this.attributes, op.attributes); - }; - DeltaInsertOp.prototype.hasHigherIndentThan = function (op) { - return ((Number(this.attributes.indent) || 0) > - (Number(op.attributes.indent) || 0)); - }; - DeltaInsertOp.prototype.isInline = function () { - return !(this.isContainerBlock() || - this.isVideo() || - this.isCustomEmbedBlock()); - }; - DeltaInsertOp.prototype.isCodeBlock = function () { - return !!this.attributes['code-block']; - }; - DeltaInsertOp.prototype.hasSameLangAs = function (op) { - return this.attributes['code-block'] === op.attributes['code-block']; - }; - DeltaInsertOp.prototype.isJustNewline = function () { - return this.insert.value === value_types_1.NewLine; - }; - DeltaInsertOp.prototype.isList = function () { - return (this.isOrderedList() || - this.isBulletList() || - this.isCheckedList() || - this.isUncheckedList()); - }; - DeltaInsertOp.prototype.isOrderedList = function () { - return this.attributes.list === value_types_1.ListType.Ordered; - }; - DeltaInsertOp.prototype.isBulletList = function () { - return this.attributes.list === value_types_1.ListType.Bullet; - }; - DeltaInsertOp.prototype.isCheckedList = function () { - return this.attributes.list === value_types_1.ListType.Checked; - }; - DeltaInsertOp.prototype.isUncheckedList = function () { - return this.attributes.list === value_types_1.ListType.Unchecked; - }; - DeltaInsertOp.prototype.isACheckList = function () { - return (this.attributes.list == value_types_1.ListType.Unchecked || - this.attributes.list === value_types_1.ListType.Checked); - }; - DeltaInsertOp.prototype.isSameListAs = function (op) { - return (!!op.attributes.list && - (this.attributes.list === op.attributes.list || - (op.isACheckList() && this.isACheckList()))); - }; - DeltaInsertOp.prototype.isSameTableRowAs = function (op) { - return (!!op.isTable() && - this.isTable() && - this.attributes.table === op.attributes.table); - }; - DeltaInsertOp.prototype.isText = function () { - return this.insert.type === value_types_1.DataType.Text; - }; - DeltaInsertOp.prototype.isImage = function () { - return this.insert.type === value_types_1.DataType.Image; - }; - DeltaInsertOp.prototype.isFormula = function () { - return this.insert.type === value_types_1.DataType.Formula; - }; - DeltaInsertOp.prototype.isVideo = function () { - return this.insert.type === value_types_1.DataType.Video; - }; - DeltaInsertOp.prototype.isLink = function () { - return this.isText() && !!this.attributes.link; - }; - DeltaInsertOp.prototype.isCustomEmbed = function () { - return this.insert instanceof InsertData_1.InsertDataCustom; - }; - DeltaInsertOp.prototype.isCustomEmbedBlock = function () { - return this.isCustomEmbed() && !!this.attributes.renderAsBlock; - }; - DeltaInsertOp.prototype.isCustomTextBlock = function () { - return this.isText() && !!this.attributes.renderAsBlock; - }; - DeltaInsertOp.prototype.isMentions = function () { - return this.isText() && !!this.attributes.mentions; - }; - return DeltaInsertOp; -}()); -exports.DeltaInsertOp = DeltaInsertOp; diff --git a/dist/commonjs/InsertData.d.ts b/dist/commonjs/InsertData.d.ts deleted file mode 100644 index 4875691..0000000 --- a/dist/commonjs/InsertData.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { DataType } from './value-types'; -declare class InsertDataQuill { - readonly type: DataType; - readonly value: string; - constructor(type: DataType, value: string); -} -declare class InsertDataCustom { - readonly type: string; - readonly value: any; - constructor(type: string, value: any); -} -declare type InsertData = InsertDataCustom | InsertDataQuill; -export { InsertData, InsertDataCustom, InsertDataQuill }; diff --git a/dist/commonjs/InsertData.js b/dist/commonjs/InsertData.js deleted file mode 100644 index ec116c6..0000000 --- a/dist/commonjs/InsertData.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var InsertDataQuill = (function () { - function InsertDataQuill(type, value) { - this.type = type; - this.value = value; - } - return InsertDataQuill; -}()); -exports.InsertDataQuill = InsertDataQuill; -var InsertDataCustom = (function () { - function InsertDataCustom(type, value) { - this.type = type; - this.value = value; - } - return InsertDataCustom; -}()); -exports.InsertDataCustom = InsertDataCustom; diff --git a/dist/commonjs/InsertOpDenormalizer.d.ts b/dist/commonjs/InsertOpDenormalizer.d.ts deleted file mode 100644 index fe8577d..0000000 --- a/dist/commonjs/InsertOpDenormalizer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class InsertOpDenormalizer { - static denormalize(op: any): any[]; -} -export { InsertOpDenormalizer }; diff --git a/dist/commonjs/InsertOpDenormalizer.js b/dist/commonjs/InsertOpDenormalizer.js deleted file mode 100644 index 353d68e..0000000 --- a/dist/commonjs/InsertOpDenormalizer.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var value_types_1 = require("./value-types"); -var str = __importStar(require("./helpers/string")); -var obj = __importStar(require("./helpers/object")); -var InsertOpDenormalizer = (function () { - function InsertOpDenormalizer() { - } - InsertOpDenormalizer.denormalize = function (op) { - if (!op || typeof op !== 'object') { - return []; - } - if (typeof op.insert === 'object' || op.insert === value_types_1.NewLine) { - return [op]; - } - var newlinedArray = str.tokenizeWithNewLines(op.insert + ''); - if (newlinedArray.length === 1) { - return [op]; - } - var nlObj = obj.assign({}, op, { insert: value_types_1.NewLine }); - return newlinedArray.map(function (line) { - if (line === value_types_1.NewLine) { - return nlObj; - } - return obj.assign({}, op, { - insert: line, - }); - }); - }; - return InsertOpDenormalizer; -}()); -exports.InsertOpDenormalizer = InsertOpDenormalizer; diff --git a/dist/commonjs/InsertOpsConverter.d.ts b/dist/commonjs/InsertOpsConverter.d.ts deleted file mode 100644 index 2ba7dcb..0000000 --- a/dist/commonjs/InsertOpsConverter.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { DeltaInsertOp } from './DeltaInsertOp'; -import { InsertData } from './InsertData'; -import { IOpAttributeSanitizerOptions } from './OpAttributeSanitizer'; -declare class InsertOpsConverter { - static convert(deltaOps: null | any[], options: IOpAttributeSanitizerOptions): DeltaInsertOp[]; - static convertInsertVal(insertPropVal: any, sanitizeOptions: IOpAttributeSanitizerOptions): InsertData | null; -} -export { InsertOpsConverter }; diff --git a/dist/commonjs/InsertOpsConverter.js b/dist/commonjs/InsertOpsConverter.js deleted file mode 100644 index 2487129..0000000 --- a/dist/commonjs/InsertOpsConverter.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DeltaInsertOp_1 = require("./DeltaInsertOp"); -var value_types_1 = require("./value-types"); -var InsertData_1 = require("./InsertData"); -var OpAttributeSanitizer_1 = require("./OpAttributeSanitizer"); -var InsertOpDenormalizer_1 = require("./InsertOpDenormalizer"); -var OpLinkSanitizer_1 = require("./OpLinkSanitizer"); -var InsertOpsConverter = (function () { - function InsertOpsConverter() { - } - InsertOpsConverter.convert = function (deltaOps, options) { - if (!Array.isArray(deltaOps)) { - return []; - } - var denormalizedOps = [].concat.apply([], deltaOps.map(InsertOpDenormalizer_1.InsertOpDenormalizer.denormalize)); - var results = []; - var insertVal, attributes; - for (var _i = 0, denormalizedOps_1 = denormalizedOps; _i < denormalizedOps_1.length; _i++) { - var op = denormalizedOps_1[_i]; - if (!op.insert) { - continue; - } - insertVal = InsertOpsConverter.convertInsertVal(op.insert, options); - if (!insertVal) { - continue; - } - attributes = OpAttributeSanitizer_1.OpAttributeSanitizer.sanitize(op.attributes, options); - results.push(new DeltaInsertOp_1.DeltaInsertOp(insertVal, attributes)); - } - return results; - }; - InsertOpsConverter.convertInsertVal = function (insertPropVal, sanitizeOptions) { - if (typeof insertPropVal === 'string') { - return new InsertData_1.InsertDataQuill(value_types_1.DataType.Text, insertPropVal); - } - if (!insertPropVal || typeof insertPropVal !== 'object') { - return null; - } - var keys = Object.keys(insertPropVal); - if (!keys.length) { - return null; - } - return value_types_1.DataType.Image in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Image, OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Image] + '', sanitizeOptions)) - : value_types_1.DataType.Video in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Video, OpLinkSanitizer_1.OpLinkSanitizer.sanitize(insertPropVal[value_types_1.DataType.Video] + '', sanitizeOptions)) - : value_types_1.DataType.Formula in insertPropVal - ? new InsertData_1.InsertDataQuill(value_types_1.DataType.Formula, insertPropVal[value_types_1.DataType.Formula]) - : - new InsertData_1.InsertDataCustom(keys[0], insertPropVal[keys[0]]); - }; - return InsertOpsConverter; -}()); -exports.InsertOpsConverter = InsertOpsConverter; diff --git a/dist/commonjs/OpAttributeSanitizer.d.ts b/dist/commonjs/OpAttributeSanitizer.d.ts deleted file mode 100644 index 747a297..0000000 --- a/dist/commonjs/OpAttributeSanitizer.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ListType, AlignType, DirectionType, ScriptType } from './value-types'; -import { IMention } from './mentions/MentionSanitizer'; -interface IOpAttributes { - background?: string | undefined; - color?: string | undefined; - font?: string | undefined; - size?: string | undefined; - width?: string | undefined; - link?: string | undefined; - bold?: boolean | undefined; - italic?: boolean | undefined; - underline?: boolean | undefined; - strike?: boolean | undefined; - script?: ScriptType; - code?: boolean | undefined; - list?: ListType; - blockquote?: boolean | undefined; - 'code-block'?: string | boolean | undefined; - header?: number | undefined; - align?: AlignType; - direction?: DirectionType; - indent?: number | undefined; - table?: string | undefined; - mentions?: boolean | undefined; - mention?: IMention | undefined; - target?: string | undefined; - rel?: string | undefined; - renderAsBlock?: boolean | undefined; - [key: string]: any; -} -interface IUrlSanitizerFn { - (url: string): string | undefined; -} -interface IOpAttributeSanitizerOptions { - urlSanitizer?: IUrlSanitizerFn; -} -declare class OpAttributeSanitizer { - static sanitize( - dirtyAttrs: IOpAttributes, - sanitizeOptions: IOpAttributeSanitizerOptions - ): IOpAttributes; - static IsValidHexColor(colorStr: string): boolean; - static IsValidColorLiteral(colorStr: string): boolean; - static IsValidRGBColor(colorStr: string): boolean; - static IsValidFontName(fontName: string): boolean; - static IsValidSize(size: string): boolean; - static IsValidWidth(width: string): boolean; - static isValidTarget(target: string): boolean; - static IsValidRel(relStr: string): boolean; - static IsValidLang(lang: string | boolean): boolean; -} -export { - OpAttributeSanitizer, - IOpAttributes, - IOpAttributeSanitizerOptions, - IUrlSanitizerFn, -}; diff --git a/dist/commonjs/OpAttributeSanitizer.js b/dist/commonjs/OpAttributeSanitizer.js deleted file mode 100644 index df5cf14..0000000 --- a/dist/commonjs/OpAttributeSanitizer.js +++ /dev/null @@ -1,154 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var value_types_1 = require("./value-types"); -var MentionSanitizer_1 = require("./mentions/MentionSanitizer"); -var array_1 = require("./helpers/array"); -var OpLinkSanitizer_1 = require("./OpLinkSanitizer"); -var OpAttributeSanitizer = (function () { - function OpAttributeSanitizer() { - } - OpAttributeSanitizer.sanitize = function (dirtyAttrs, sanitizeOptions) { - var cleanAttrs = {}; - if (!dirtyAttrs || typeof dirtyAttrs !== 'object') { - return cleanAttrs; - } - var booleanAttrs = [ - 'bold', - 'italic', - 'underline', - 'strike', - 'code', - 'blockquote', - 'code-block', - 'renderAsBlock', - ]; - var colorAttrs = ['background', 'color']; - var font = dirtyAttrs.font, size = dirtyAttrs.size, link = dirtyAttrs.link, script = dirtyAttrs.script, list = dirtyAttrs.list, header = dirtyAttrs.header, align = dirtyAttrs.align, direction = dirtyAttrs.direction, indent = dirtyAttrs.indent, mentions = dirtyAttrs.mentions, mention = dirtyAttrs.mention, width = dirtyAttrs.width, target = dirtyAttrs.target, rel = dirtyAttrs.rel; - var codeBlock = dirtyAttrs['code-block']; - var sanitizedAttrs = booleanAttrs.concat(colorAttrs, [ - 'font', - 'size', - 'link', - 'script', - 'list', - 'header', - 'align', - 'direction', - 'indent', - 'mentions', - 'mention', - 'width', - 'target', - 'rel', - 'code-block', - ]); - booleanAttrs.forEach(function (prop) { - var v = dirtyAttrs[prop]; - if (v) { - cleanAttrs[prop] = !!v; - } - }); - colorAttrs.forEach(function (prop) { - var val = dirtyAttrs[prop]; - if (val && - (OpAttributeSanitizer.IsValidHexColor(val + '') || - OpAttributeSanitizer.IsValidColorLiteral(val + '') || - OpAttributeSanitizer.IsValidRGBColor(val + ''))) { - cleanAttrs[prop] = val; - } - }); - if (font && OpAttributeSanitizer.IsValidFontName(font + '')) { - cleanAttrs.font = font; - } - if (size && OpAttributeSanitizer.IsValidSize(size + '')) { - cleanAttrs.size = size; - } - if (width && OpAttributeSanitizer.IsValidWidth(width + '')) { - cleanAttrs.width = width; - } - if (link) { - cleanAttrs.link = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(link + '', sanitizeOptions); - } - if (target && OpAttributeSanitizer.isValidTarget(target)) { - cleanAttrs.target = target; - } - if (rel && OpAttributeSanitizer.IsValidRel(rel)) { - cleanAttrs.rel = rel; - } - if (codeBlock) { - if (OpAttributeSanitizer.IsValidLang(codeBlock)) { - cleanAttrs['code-block'] = codeBlock; - } - else { - cleanAttrs['code-block'] = !!codeBlock; - } - } - if (script === value_types_1.ScriptType.Sub || value_types_1.ScriptType.Super === script) { - cleanAttrs.script = script; - } - if (list === value_types_1.ListType.Bullet || - list === value_types_1.ListType.Ordered || - list === value_types_1.ListType.Checked || - list === value_types_1.ListType.Unchecked) { - cleanAttrs.list = list; - } - if (Number(header)) { - cleanAttrs.header = Math.min(Number(header), 6); - } - if (array_1.find([value_types_1.AlignType.Center, value_types_1.AlignType.Right, value_types_1.AlignType.Justify, value_types_1.AlignType.Left], function (a) { return a === align; })) { - cleanAttrs.align = align; - } - if (direction === value_types_1.DirectionType.Rtl) { - cleanAttrs.direction = direction; - } - if (indent && Number(indent)) { - cleanAttrs.indent = Math.min(Number(indent), 30); - } - if (mentions && mention) { - var sanitizedMention = MentionSanitizer_1.MentionSanitizer.sanitize(mention, sanitizeOptions); - if (Object.keys(sanitizedMention).length > 0) { - cleanAttrs.mentions = !!mentions; - cleanAttrs.mention = mention; - } - } - return Object.keys(dirtyAttrs).reduce(function (cleaned, k) { - if (sanitizedAttrs.indexOf(k) === -1) { - cleaned[k] = dirtyAttrs[k]; - } - return cleaned; - }, cleanAttrs); - }; - OpAttributeSanitizer.IsValidHexColor = function (colorStr) { - return !!colorStr.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i); - }; - OpAttributeSanitizer.IsValidColorLiteral = function (colorStr) { - return !!colorStr.match(/^[a-z]{1,50}$/i); - }; - OpAttributeSanitizer.IsValidRGBColor = function (colorStr) { - var re = /^rgb\(((0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d),\s*){2}(0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d)\)$/i; - return !!colorStr.match(re); - }; - OpAttributeSanitizer.IsValidFontName = function (fontName) { - return !!fontName.match(/^[a-z\s0-9\- ]{1,30}$/i); - }; - OpAttributeSanitizer.IsValidSize = function (size) { - return !!size.match(/^[a-z0-9\-]{1,20}$/i); - }; - OpAttributeSanitizer.IsValidWidth = function (width) { - return !!width.match(/^[0-9]*(px|em|%)?$/); - }; - OpAttributeSanitizer.isValidTarget = function (target) { - return !!target.match(/^[_a-zA-Z0-9\-]{1,50}$/); - }; - OpAttributeSanitizer.IsValidRel = function (relStr) { - return !!relStr.match(/^[a-zA-Z\s\-]{1,250}$/i); - }; - OpAttributeSanitizer.IsValidLang = function (lang) { - if (typeof lang === 'boolean') { - return true; - } - return !!lang.match(/^[a-zA-Z\s\-\\\/\+]{1,50}$/i); - }; - return OpAttributeSanitizer; -}()); -exports.OpAttributeSanitizer = OpAttributeSanitizer; diff --git a/dist/commonjs/OpLinkSanitizer.d.ts b/dist/commonjs/OpLinkSanitizer.d.ts deleted file mode 100644 index 6d00384..0000000 --- a/dist/commonjs/OpLinkSanitizer.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IOpAttributeSanitizerOptions } from './OpAttributeSanitizer'; -declare class OpLinkSanitizer { - static sanitize(link: string, options: IOpAttributeSanitizerOptions): string; -} -export { OpLinkSanitizer }; diff --git a/dist/commonjs/OpLinkSanitizer.js b/dist/commonjs/OpLinkSanitizer.js deleted file mode 100644 index 29a9886..0000000 --- a/dist/commonjs/OpLinkSanitizer.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var url = __importStar(require("./helpers/url")); -var funcs_html_1 = require("./funcs-html"); -var OpLinkSanitizer = (function () { - function OpLinkSanitizer() { - } - OpLinkSanitizer.sanitize = function (link, options) { - var sanitizerFn = function () { - return undefined; - }; - if (options && typeof options.urlSanitizer === 'function') { - sanitizerFn = options.urlSanitizer; - } - var result = sanitizerFn(link); - return typeof result === 'string' ? result : funcs_html_1.encodeLink(url.sanitize(link)); - }; - return OpLinkSanitizer; -}()); -exports.OpLinkSanitizer = OpLinkSanitizer; diff --git a/dist/commonjs/OpToHtmlConverter.d.ts b/dist/commonjs/OpToHtmlConverter.d.ts deleted file mode 100644 index 28c7744..0000000 --- a/dist/commonjs/OpToHtmlConverter.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { ITagKeyValue } from './funcs-html'; -import { DeltaInsertOp } from './DeltaInsertOp'; -export declare type InlineStyleType = - | ((value: string, op: DeltaInsertOp) => string | undefined) - | { - [x: string]: string; - }; -export interface IInlineStyles { - indent?: InlineStyleType; - align?: InlineStyleType; - direction?: InlineStyleType; - font?: InlineStyleType; - size?: InlineStyleType; -} -export declare const DEFAULT_INLINE_STYLES: IInlineStyles; -interface IOpToHtmlConverterOptions { - classPrefix?: string; - inlineStyles?: boolean | IInlineStyles; - encodeHtml?: boolean; - listItemTag?: string; - paragraphTag?: string; - linkRel?: string; - linkTarget?: string; - allowBackgroundClasses?: boolean; - customTag?: (format: string, op: DeltaInsertOp) => string | void; - customTagAttributes?: ( - op: DeltaInsertOp - ) => { - [key: string]: string; - } | void; - customCssClasses?: (op: DeltaInsertOp) => string | string[] | void; - customCssStyles?: (op: DeltaInsertOp) => string | string[] | void; -} -interface IHtmlParts { - openingTag: string; - content: string; - closingTag: string; -} -declare class OpToHtmlConverter { - private options; - private op; - constructor(op: DeltaInsertOp, options?: IOpToHtmlConverterOptions); - prefixClass(className: string): string; - getHtml(): string; - getHtmlParts(): IHtmlParts; - getContent(): string; - getCssClasses(): string[]; - getCssStyles(): string[]; - getTagAttributes(): Array; - makeAttr(k: string, v: string): ITagKeyValue; - getLinkAttrs(): Array; - getCustomTag(format: string): any; - getCustomTagAttributes(): any; - getCustomCssClasses(): any[] | undefined; - getCustomCssStyles(): any[] | undefined; - getTags(): string[]; -} -export { OpToHtmlConverter, IOpToHtmlConverterOptions, IHtmlParts }; diff --git a/dist/commonjs/OpToHtmlConverter.js b/dist/commonjs/OpToHtmlConverter.js deleted file mode 100644 index c59c4d3..0000000 --- a/dist/commonjs/OpToHtmlConverter.js +++ /dev/null @@ -1,338 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var funcs_html_1 = require("./funcs-html"); -var value_types_1 = require("./value-types"); -var obj = __importStar(require("./helpers/object")); -var arr = __importStar(require("./helpers/array")); -var OpAttributeSanitizer_1 = require("./OpAttributeSanitizer"); -var DEFAULT_INLINE_FONTS = { - serif: 'font-family: Georgia, Times New Roman, serif', - monospace: 'font-family: Monaco, Courier New, monospace', -}; -exports.DEFAULT_INLINE_STYLES = { - font: function (value) { return DEFAULT_INLINE_FONTS[value] || 'font-family:' + value; }, - size: { - small: 'font-size: 0.75em', - large: 'font-size: 1.5em', - huge: 'font-size: 2.5em', - }, - indent: function (value, op) { - var indentSize = parseInt(value, 10) * 3; - var side = op.attributes['direction'] === 'rtl' ? 'right' : 'left'; - return 'padding-' + side + ':' + indentSize + 'em'; - }, - direction: function (value, op) { - if (value === 'rtl') { - return ('direction:rtl' + (op.attributes['align'] ? '' : '; text-align:inherit')); - } - else { - return undefined; - } - }, -}; -var OpToHtmlConverter = (function () { - function OpToHtmlConverter(op, options) { - this.op = op; - this.options = obj.assign({}, { - classPrefix: 'ql', - inlineStyles: undefined, - encodeHtml: true, - listItemTag: 'li', - paragraphTag: 'p', - }, options); - } - OpToHtmlConverter.prototype.prefixClass = function (className) { - if (!this.options.classPrefix) { - return className + ''; - } - return this.options.classPrefix + '-' + className; - }; - OpToHtmlConverter.prototype.getHtml = function () { - var parts = this.getHtmlParts(); - return parts.openingTag + parts.content + parts.closingTag; - }; - OpToHtmlConverter.prototype.getHtmlParts = function () { - var _this = this; - if (this.op.isJustNewline() && !this.op.isContainerBlock()) { - return { openingTag: '', closingTag: '', content: value_types_1.NewLine }; - } - var tags = this.getTags(), attrs = this.getTagAttributes(); - if (!tags.length && attrs.length) { - tags.push('span'); - } - var beginTags = [], endTags = []; - var imgTag = 'img'; - var isImageLink = function (tag) { - return tag === imgTag && !!_this.op.attributes.link; - }; - for (var _i = 0, tags_1 = tags; _i < tags_1.length; _i++) { - var tag = tags_1[_i]; - if (isImageLink(tag)) { - beginTags.push(funcs_html_1.makeStartTag('a', this.getLinkAttrs())); - } - beginTags.push(funcs_html_1.makeStartTag(tag, attrs)); - endTags.push(tag === 'img' ? '' : funcs_html_1.makeEndTag(tag)); - if (isImageLink(tag)) { - endTags.push(funcs_html_1.makeEndTag('a')); - } - attrs = []; - } - endTags.reverse(); - return { - openingTag: beginTags.join(''), - content: this.getContent(), - closingTag: endTags.join(''), - }; - }; - OpToHtmlConverter.prototype.getContent = function () { - if (this.op.isContainerBlock()) { - return ''; - } - if (this.op.isMentions()) { - return this.op.insert.value; - } - var content = this.op.isFormula() || this.op.isText() ? this.op.insert.value : ''; - return (this.options.encodeHtml && funcs_html_1.encodeHtml(content)) || content; - }; - OpToHtmlConverter.prototype.getCssClasses = function () { - var attrs = this.op.attributes; - if (this.options.inlineStyles) { - return []; - } - var propsArr = ['indent', 'align', 'direction', 'font', 'size']; - if (this.options.allowBackgroundClasses) { - propsArr.push('background'); - } - return (this.getCustomCssClasses() || []).concat(propsArr - .filter(function (prop) { return !!attrs[prop]; }) - .filter(function (prop) { - return prop === 'background' - ? OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidColorLiteral(attrs[prop]) - : true; - }) - .map(function (prop) { return prop + '-' + attrs[prop]; }) - .concat(this.op.isFormula() ? 'formula' : []) - .concat(this.op.isVideo() ? 'video' : []) - .concat(this.op.isImage() ? 'image' : []) - .map(this.prefixClass.bind(this))); - }; - OpToHtmlConverter.prototype.getCssStyles = function () { - var _this = this; - var attrs = this.op.attributes; - var propsArr = [['color']]; - if (!!this.options.inlineStyles || !this.options.allowBackgroundClasses) { - propsArr.push(['background', 'background-color']); - } - if (this.options.inlineStyles) { - propsArr = propsArr.concat([ - ['indent'], - ['align', 'text-align'], - ['direction'], - ['font', 'font-family'], - ['size'], - ]); - } - return (this.getCustomCssStyles() || []) - .concat(propsArr - .filter(function (item) { return !!attrs[item[0]]; }) - .map(function (item) { - var attribute = item[0]; - var attrValue = attrs[attribute]; - var attributeConverter = (_this.options.inlineStyles && - _this.options.inlineStyles[attribute]) || - exports.DEFAULT_INLINE_STYLES[attribute]; - if (typeof attributeConverter === 'object') { - return attributeConverter[attrValue]; - } - else if (typeof attributeConverter === 'function') { - var converterFn = attributeConverter; - return converterFn(attrValue, _this.op); - } - else { - return arr.preferSecond(item) + ':' + attrValue; - } - })) - .filter(function (item) { return item !== undefined; }); - }; - OpToHtmlConverter.prototype.getTagAttributes = function () { - if (this.op.attributes.code && !this.op.isLink()) { - return []; - } - var makeAttr = this.makeAttr.bind(this); - var customTagAttributes = this.getCustomTagAttributes(); - var customAttr = customTagAttributes - ? Object.keys(this.getCustomTagAttributes()).map(function (k) { - return makeAttr(k, customTagAttributes[k]); - }) - : []; - var classes = this.getCssClasses(); - var tagAttrs = classes.length - ? customAttr.concat([makeAttr('class', classes.join(' '))]) - : customAttr; - if (this.op.isImage()) { - this.op.attributes.width && - (tagAttrs = tagAttrs.concat(makeAttr('width', this.op.attributes.width))); - return tagAttrs.concat(makeAttr('src', this.op.insert.value)); - } - if (this.op.isACheckList()) { - return tagAttrs.concat(makeAttr('data-checked', this.op.isCheckedList() ? 'true' : 'false')); - } - if (this.op.isFormula()) { - return tagAttrs; - } - if (this.op.isVideo()) { - return tagAttrs.concat(makeAttr('frameborder', '0'), makeAttr('allowfullscreen', 'true'), makeAttr('src', this.op.insert.value)); - } - if (this.op.isMentions()) { - var mention = this.op.attributes.mention; - if (mention.class) { - tagAttrs = tagAttrs.concat(makeAttr('class', mention.class)); - } - if (mention['end-point'] && mention.slug) { - tagAttrs = tagAttrs.concat(makeAttr('href', mention['end-point'] + '/' + mention.slug)); - } - else { - tagAttrs = tagAttrs.concat(makeAttr('href', 'about:blank')); - } - if (mention.target) { - tagAttrs = tagAttrs.concat(makeAttr('target', mention.target)); - } - return tagAttrs; - } - var styles = this.getCssStyles(); - if (styles.length) { - tagAttrs.push(makeAttr('style', styles.join(';'))); - } - if (this.op.isCodeBlock() && - typeof this.op.attributes['code-block'] === 'string') { - return tagAttrs.concat(makeAttr('data-language', this.op.attributes['code-block'])); - } - if (this.op.isContainerBlock()) { - return tagAttrs; - } - if (this.op.isLink()) { - tagAttrs = tagAttrs.concat(this.getLinkAttrs()); - } - return tagAttrs; - }; - OpToHtmlConverter.prototype.makeAttr = function (k, v) { - return { key: k, value: v }; - }; - OpToHtmlConverter.prototype.getLinkAttrs = function () { - var tagAttrs = []; - var targetForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.isValidTarget(this.options.linkTarget || '') - ? this.options.linkTarget - : undefined; - var relForAll = OpAttributeSanitizer_1.OpAttributeSanitizer.IsValidRel(this.options.linkRel || '') - ? this.options.linkRel - : undefined; - var target = this.op.attributes.target || targetForAll; - var rel = this.op.attributes.rel || relForAll; - return tagAttrs - .concat(this.makeAttr('href', this.op.attributes.link)) - .concat(target ? this.makeAttr('target', target) : []) - .concat(rel ? this.makeAttr('rel', rel) : []); - }; - OpToHtmlConverter.prototype.getCustomTag = function (format) { - if (this.options.customTag && - typeof this.options.customTag === 'function') { - return this.options.customTag.apply(null, [format, this.op]); - } - }; - OpToHtmlConverter.prototype.getCustomTagAttributes = function () { - if (this.options.customTagAttributes && - typeof this.options.customTagAttributes === 'function') { - return this.options.customTagAttributes.apply(null, [this.op]); - } - }; - OpToHtmlConverter.prototype.getCustomCssClasses = function () { - if (this.options.customCssClasses && - typeof this.options.customCssClasses === 'function') { - var res = this.options.customCssClasses.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - }; - OpToHtmlConverter.prototype.getCustomCssStyles = function () { - if (this.options.customCssStyles && - typeof this.options.customCssStyles === 'function') { - var res = this.options.customCssStyles.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - }; - OpToHtmlConverter.prototype.getTags = function () { - var _this = this; - var attrs = this.op.attributes; - if (!this.op.isText()) { - return [ - this.op.isVideo() ? 'iframe' : this.op.isImage() ? 'img' : 'span', - ]; - } - var positionTag = this.options.paragraphTag || 'p'; - var blocks = [ - ['blockquote'], - ['code-block', 'pre'], - ['list', this.options.listItemTag], - ['header'], - ['align', positionTag], - ['direction', positionTag], - ['indent', positionTag], - ]; - for (var _i = 0, blocks_1 = blocks; _i < blocks_1.length; _i++) { - var item = blocks_1[_i]; - var firstItem = item[0]; - if (attrs[firstItem]) { - var customTag = this.getCustomTag(firstItem); - return customTag - ? [customTag] - : firstItem === 'header' - ? ['h' + attrs[firstItem]] - : [arr.preferSecond(item)]; - } - } - if (this.op.isCustomTextBlock()) { - var customTag = this.getCustomTag('renderAsBlock'); - return customTag ? [customTag] : [positionTag]; - } - var customTagsMap = Object.keys(attrs).reduce(function (res, it) { - var customTag = _this.getCustomTag(it); - if (customTag) { - res[it] = customTag; - } - return res; - }, {}); - var inlineTags = [ - ['link', 'a'], - ['mentions', 'a'], - ['script'], - ['bold', 'strong'], - ['italic', 'em'], - ['strike', 's'], - ['underline', 'u'], - ['code'], - ]; - return inlineTags.filter(function (item) { return !!attrs[item[0]]; }).concat(Object.keys(customTagsMap) - .filter(function (t) { return !inlineTags.some(function (it) { return it[0] == t; }); }) - .map(function (t) { return [t, customTagsMap[t]]; })).map(function (item) { - return customTagsMap[item[0]] - ? customTagsMap[item[0]] - : item[0] === 'script' - ? attrs[item[0]] === value_types_1.ScriptType.Sub - ? 'sub' - : 'sup' - : arr.preferSecond(item); - }); - }; - return OpToHtmlConverter; -}()); -exports.OpToHtmlConverter = OpToHtmlConverter; diff --git a/dist/commonjs/QuillDeltaToHtmlConverter.d.ts b/dist/commonjs/QuillDeltaToHtmlConverter.d.ts deleted file mode 100644 index dd7bfc8..0000000 --- a/dist/commonjs/QuillDeltaToHtmlConverter.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { IOpToHtmlConverterOptions } from './OpToHtmlConverter'; -import { DeltaInsertOp } from './DeltaInsertOp'; -import { - ListGroup, - ListItem, - TDataGroup, - TableGroup, - TableRow, - TableCell, -} from './grouper/group-types'; -import { GroupType } from './value-types'; -import { IOpAttributeSanitizerOptions } from './OpAttributeSanitizer'; -interface IQuillDeltaToHtmlConverterOptions - extends IOpAttributeSanitizerOptions, - IOpToHtmlConverterOptions { - orderedListTag?: string; - bulletListTag?: string; - multiLineBlockquote?: boolean; - multiLineHeader?: boolean; - multiLineCodeblock?: boolean; - multiLineParagraph?: boolean; - multiLineCustomBlock?: boolean; -} -declare class QuillDeltaToHtmlConverter { - private options; - private rawDeltaOps; - private converterOptions; - private callbacks; - constructor(deltaOps: any[], options?: IQuillDeltaToHtmlConverterOptions); - _getListTag(op: DeltaInsertOp): string; - getGroupedOps(): TDataGroup[]; - convert(): string; - _renderWithCallbacks( - groupType: GroupType, - group: TDataGroup, - myRenderFn: () => string - ): string; - _renderList(list: ListGroup): string; - _renderListItem(li: ListItem): string; - _renderTable(table: TableGroup): string; - _renderTableRow(row: TableRow): string; - _renderTableCell(cell: TableCell): string; - _renderBlock(bop: DeltaInsertOp, ops: DeltaInsertOp[]): string; - _renderInlines(ops: DeltaInsertOp[], isInlineGroup?: boolean): string; - _renderInline(op: DeltaInsertOp, contextOp: DeltaInsertOp | null): any; - _renderCustom(op: DeltaInsertOp, contextOp: DeltaInsertOp | null): any; - beforeRender(cb: (group: GroupType, data: TDataGroup) => string): void; - afterRender(cb: (group: GroupType, html: string) => string): void; - renderCustomWith( - cb: (op: DeltaInsertOp, contextOp: DeltaInsertOp) => string - ): void; -} -export { QuillDeltaToHtmlConverter }; diff --git a/dist/commonjs/QuillDeltaToHtmlConverter.js b/dist/commonjs/QuillDeltaToHtmlConverter.js deleted file mode 100644 index c96ff85..0000000 --- a/dist/commonjs/QuillDeltaToHtmlConverter.js +++ /dev/null @@ -1,269 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var InsertOpsConverter_1 = require("./InsertOpsConverter"); -var OpToHtmlConverter_1 = require("./OpToHtmlConverter"); -var Grouper_1 = require("./grouper/Grouper"); -var group_types_1 = require("./grouper/group-types"); -var ListNester_1 = require("./grouper/ListNester"); -var funcs_html_1 = require("./funcs-html"); -var obj = __importStar(require("./helpers/object")); -var value_types_1 = require("./value-types"); -var TableGrouper_1 = require("./grouper/TableGrouper"); -var BrTag = '
'; -var QuillDeltaToHtmlConverter = (function () { - function QuillDeltaToHtmlConverter(deltaOps, options) { - this.rawDeltaOps = []; - this.callbacks = {}; - this.options = obj.assign({ - paragraphTag: 'p', - encodeHtml: true, - classPrefix: 'ql', - inlineStyles: false, - multiLineBlockquote: true, - multiLineHeader: true, - multiLineCodeblock: true, - multiLineParagraph: true, - multiLineCustomBlock: true, - allowBackgroundClasses: false, - linkTarget: '_blank', - }, options, { - orderedListTag: 'ol', - bulletListTag: 'ul', - listItemTag: 'li', - }); - var inlineStyles; - if (!this.options.inlineStyles) { - inlineStyles = undefined; - } - else if (typeof this.options.inlineStyles === 'object') { - inlineStyles = this.options.inlineStyles; - } - else { - inlineStyles = {}; - } - this.converterOptions = { - encodeHtml: this.options.encodeHtml, - classPrefix: this.options.classPrefix, - inlineStyles: inlineStyles, - listItemTag: this.options.listItemTag, - paragraphTag: this.options.paragraphTag, - linkRel: this.options.linkRel, - linkTarget: this.options.linkTarget, - allowBackgroundClasses: this.options.allowBackgroundClasses, - customTag: this.options.customTag, - customTagAttributes: this.options.customTagAttributes, - customCssClasses: this.options.customCssClasses, - customCssStyles: this.options.customCssStyles, - }; - this.rawDeltaOps = deltaOps; - } - QuillDeltaToHtmlConverter.prototype._getListTag = function (op) { - return op.isOrderedList() - ? this.options.orderedListTag + '' - : op.isBulletList() - ? this.options.bulletListTag + '' - : op.isCheckedList() - ? this.options.bulletListTag + '' - : op.isUncheckedList() - ? this.options.bulletListTag + '' - : ''; - }; - QuillDeltaToHtmlConverter.prototype.getGroupedOps = function () { - var deltaOps = InsertOpsConverter_1.InsertOpsConverter.convert(this.rawDeltaOps, this.options); - var pairedOps = Grouper_1.Grouper.pairOpsWithTheirBlock(deltaOps); - var groupedSameStyleBlocks = Grouper_1.Grouper.groupConsecutiveSameStyleBlocks(pairedOps, { - blockquotes: !!this.options.multiLineBlockquote, - header: !!this.options.multiLineHeader, - codeBlocks: !!this.options.multiLineCodeblock, - customBlocks: !!this.options.multiLineCustomBlock, - }); - var groupedOps = Grouper_1.Grouper.reduceConsecutiveSameStyleBlocksToOne(groupedSameStyleBlocks); - var tableGrouper = new TableGrouper_1.TableGrouper(); - groupedOps = tableGrouper.group(groupedOps); - var listNester = new ListNester_1.ListNester(); - return listNester.nest(groupedOps); - }; - QuillDeltaToHtmlConverter.prototype.convert = function () { - var _this = this; - var groups = this.getGroupedOps(); - return groups - .map(function (group) { - if (group instanceof group_types_1.ListGroup) { - return _this._renderWithCallbacks(value_types_1.GroupType.List, group, function () { - return _this._renderList(group); - }); - } - else if (group instanceof group_types_1.TableGroup) { - return _this._renderWithCallbacks(value_types_1.GroupType.Table, group, function () { - return _this._renderTable(group); - }); - } - else if (group instanceof group_types_1.BlockGroup) { - var g = group; - return _this._renderWithCallbacks(value_types_1.GroupType.Block, group, function () { - return _this._renderBlock(g.op, g.ops); - }); - } - else if (group instanceof group_types_1.BlotBlock) { - return _this._renderCustom(group.op, null); - } - else if (group instanceof group_types_1.VideoItem) { - return _this._renderWithCallbacks(value_types_1.GroupType.Video, group, function () { - var g = group; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(g.op, _this.converterOptions); - return converter.getHtml(); - }); - } - else { - return _this._renderWithCallbacks(value_types_1.GroupType.InlineGroup, group, function () { - return _this._renderInlines(group.ops, true); - }); - } - }) - .join(''); - }; - QuillDeltaToHtmlConverter.prototype._renderWithCallbacks = function (groupType, group, myRenderFn) { - var html = ''; - var beforeCb = this.callbacks['beforeRender_cb']; - html = - typeof beforeCb === 'function' - ? beforeCb.apply(null, [groupType, group]) - : ''; - if (!html) { - html = myRenderFn(); - } - var afterCb = this.callbacks['afterRender_cb']; - html = - typeof afterCb === 'function' - ? afterCb.apply(null, [groupType, html]) - : html; - return html; - }; - QuillDeltaToHtmlConverter.prototype._renderList = function (list) { - var _this = this; - var firstItem = list.items[0]; - return (funcs_html_1.makeStartTag(this._getListTag(firstItem.item.op)) + - list.items.map(function (li) { return _this._renderListItem(li); }).join('') + - funcs_html_1.makeEndTag(this._getListTag(firstItem.item.op))); - }; - QuillDeltaToHtmlConverter.prototype._renderListItem = function (li) { - li.item.op.attributes.indent = 0; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(li.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var liElementsHtml = this._renderInlines(li.item.ops, false); - return (parts.openingTag + - liElementsHtml + - (li.innerList ? this._renderList(li.innerList) : '') + - parts.closingTag); - }; - QuillDeltaToHtmlConverter.prototype._renderTable = function (table) { - var _this = this; - return (funcs_html_1.makeStartTag('table') + - funcs_html_1.makeStartTag('tbody') + - table.rows.map(function (row) { return _this._renderTableRow(row); }).join('') + - funcs_html_1.makeEndTag('tbody') + - funcs_html_1.makeEndTag('table')); - }; - QuillDeltaToHtmlConverter.prototype._renderTableRow = function (row) { - var _this = this; - return (funcs_html_1.makeStartTag('tr') + - row.cells.map(function (cell) { return _this._renderTableCell(cell); }).join('') + - funcs_html_1.makeEndTag('tr')); - }; - QuillDeltaToHtmlConverter.prototype._renderTableCell = function (cell) { - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(cell.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var cellElementsHtml = this._renderInlines(cell.item.ops, false); - return (funcs_html_1.makeStartTag('td', { - key: 'data-row', - value: cell.item.op.attributes.table, - }) + - parts.openingTag + - cellElementsHtml + - parts.closingTag + - funcs_html_1.makeEndTag('td')); - }; - QuillDeltaToHtmlConverter.prototype._renderBlock = function (bop, ops) { - var _this = this; - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(bop, this.converterOptions); - var htmlParts = converter.getHtmlParts(); - if (bop.isCodeBlock()) { - return (htmlParts.openingTag + - funcs_html_1.encodeHtml(ops - .map(function (iop) { - return iop.isCustomEmbed() - ? _this._renderCustom(iop, bop) - : iop.insert.value; - }) - .join('')) + - htmlParts.closingTag); - } - var inlines = ops.map(function (op) { return _this._renderInline(op, bop); }).join(''); - return htmlParts.openingTag + (inlines || BrTag) + htmlParts.closingTag; - }; - QuillDeltaToHtmlConverter.prototype._renderInlines = function (ops, isInlineGroup) { - var _this = this; - if (isInlineGroup === void 0) { isInlineGroup = true; } - var opsLen = ops.length - 1; - var html = ops - .map(function (op, i) { - if (i > 0 && i === opsLen && op.isJustNewline()) { - return ''; - } - return _this._renderInline(op, null); - }) - .join(''); - if (!isInlineGroup) { - return html; - } - var startParaTag = funcs_html_1.makeStartTag(this.options.paragraphTag); - var endParaTag = funcs_html_1.makeEndTag(this.options.paragraphTag); - if (html === BrTag || this.options.multiLineParagraph) { - return startParaTag + html + endParaTag; - } - return (startParaTag + - html - .split(BrTag) - .map(function (v) { - return v === '' ? BrTag : v; - }) - .join(endParaTag + startParaTag) + - endParaTag); - }; - QuillDeltaToHtmlConverter.prototype._renderInline = function (op, contextOp) { - if (op.isCustomEmbed()) { - return this._renderCustom(op, contextOp); - } - var converter = new OpToHtmlConverter_1.OpToHtmlConverter(op, this.converterOptions); - return converter.getHtml().replace(/\n/g, BrTag); - }; - QuillDeltaToHtmlConverter.prototype._renderCustom = function (op, contextOp) { - var renderCb = this.callbacks['renderCustomOp_cb']; - if (typeof renderCb === 'function') { - return renderCb.apply(null, [op, contextOp]); - } - return ''; - }; - QuillDeltaToHtmlConverter.prototype.beforeRender = function (cb) { - if (typeof cb === 'function') { - this.callbacks['beforeRender_cb'] = cb; - } - }; - QuillDeltaToHtmlConverter.prototype.afterRender = function (cb) { - if (typeof cb === 'function') { - this.callbacks['afterRender_cb'] = cb; - } - }; - QuillDeltaToHtmlConverter.prototype.renderCustomWith = function (cb) { - this.callbacks['renderCustomOp_cb'] = cb; - }; - return QuillDeltaToHtmlConverter; -}()); -exports.QuillDeltaToHtmlConverter = QuillDeltaToHtmlConverter; diff --git a/dist/commonjs/funcs-html.d.ts b/dist/commonjs/funcs-html.d.ts deleted file mode 100644 index 4dd3ebd..0000000 --- a/dist/commonjs/funcs-html.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -interface ITagKeyValue { - key: string; - value?: string; -} -declare function makeStartTag( - tag: any, - attrs?: ITagKeyValue | ITagKeyValue[] | undefined -): string; -declare function makeEndTag(tag?: any): string; -declare function decodeHtml(str: string): string; -declare function encodeHtml( - str: string, - preventDoubleEncoding?: boolean -): string; -declare function encodeLink(str: string): string; -export { - makeStartTag, - makeEndTag, - encodeHtml, - decodeHtml, - encodeLink, - ITagKeyValue, -}; diff --git a/dist/commonjs/funcs-html.js b/dist/commonjs/funcs-html.js deleted file mode 100644 index 652723e..0000000 --- a/dist/commonjs/funcs-html.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var EncodeTarget; -(function (EncodeTarget) { - EncodeTarget[EncodeTarget["Html"] = 0] = "Html"; - EncodeTarget[EncodeTarget["Url"] = 1] = "Url"; -})(EncodeTarget || (EncodeTarget = {})); -function makeStartTag(tag, attrs) { - if (attrs === void 0) { attrs = undefined; } - if (!tag) { - return ''; - } - var attrsStr = ''; - if (attrs) { - var arrAttrs = [].concat(attrs); - attrsStr = arrAttrs - .map(function (attr) { - return attr.key + (attr.value ? '="' + attr.value + '"' : ''); - }) - .join(' '); - } - var closing = '>'; - if (tag === 'img' || tag === 'br') { - closing = '/>'; - } - return attrsStr ? "<" + tag + " " + attrsStr + closing : "<" + tag + closing; -} -exports.makeStartTag = makeStartTag; -function makeEndTag(tag) { - if (tag === void 0) { tag = ''; } - return (tag && "") || ''; -} -exports.makeEndTag = makeEndTag; -function decodeHtml(str) { - return encodeMappings(EncodeTarget.Html).reduce(decodeMapping, str); -} -exports.decodeHtml = decodeHtml; -function encodeHtml(str, preventDoubleEncoding) { - if (preventDoubleEncoding === void 0) { preventDoubleEncoding = true; } - if (preventDoubleEncoding) { - str = decodeHtml(str); - } - return encodeMappings(EncodeTarget.Html).reduce(encodeMapping, str); -} -exports.encodeHtml = encodeHtml; -function encodeLink(str) { - var linkMaps = encodeMappings(EncodeTarget.Url); - var decoded = linkMaps.reduce(decodeMapping, str); - return linkMaps.reduce(encodeMapping, decoded); -} -exports.encodeLink = encodeLink; -function encodeMappings(mtype) { - var maps = [ - ['&', '&'], - ['<', '<'], - ['>', '>'], - ['"', '"'], - ["'", '''], - ['\\/', '/'], - ['\\(', '('], - ['\\)', ')'], - ]; - if (mtype === EncodeTarget.Html) { - return maps.filter(function (_a) { - var v = _a[0], _ = _a[1]; - return v.indexOf('(') === -1 && v.indexOf(')') === -1; - }); - } - else { - return maps.filter(function (_a) { - var v = _a[0], _ = _a[1]; - return v.indexOf('/') === -1; - }); - } -} -function encodeMapping(str, mapping) { - return str.replace(new RegExp(mapping[0], 'g'), mapping[1]); -} -function decodeMapping(str, mapping) { - return str.replace(new RegExp(mapping[1], 'g'), mapping[0].replace('\\', '')); -} diff --git a/dist/commonjs/grouper/Grouper.d.ts b/dist/commonjs/grouper/Grouper.d.ts deleted file mode 100644 index e756848..0000000 --- a/dist/commonjs/grouper/Grouper.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { DeltaInsertOp } from './../DeltaInsertOp'; -import { BlockGroup, TDataGroup } from './group-types'; -declare class Grouper { - static pairOpsWithTheirBlock(ops: DeltaInsertOp[]): TDataGroup[]; - static groupConsecutiveSameStyleBlocks( - groups: TDataGroup[], - blocksOf?: { - header: boolean; - codeBlocks: boolean; - blockquotes: boolean; - customBlocks: boolean; - } - ): Array; - static reduceConsecutiveSameStyleBlocksToOne( - groups: Array - ): TDataGroup[]; - static areBothCodeblocksWithSameLang( - g1: BlockGroup, - gOther: BlockGroup - ): boolean; - static areBothSameHeadersWithSameAdi( - g1: BlockGroup, - gOther: BlockGroup - ): boolean; - static areBothBlockquotesWithSameAdi( - g: BlockGroup, - gOther: BlockGroup - ): boolean; - static areBothCustomBlockWithSameAttr( - g: BlockGroup, - gOther: BlockGroup - ): boolean; -} -export { Grouper }; diff --git a/dist/commonjs/grouper/Grouper.js b/dist/commonjs/grouper/Grouper.js deleted file mode 100644 index 9167b39..0000000 --- a/dist/commonjs/grouper/Grouper.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DeltaInsertOp_1 = require("./../DeltaInsertOp"); -var array_1 = require("./../helpers/array"); -var group_types_1 = require("./group-types"); -var Grouper = (function () { - function Grouper() { - } - Grouper.pairOpsWithTheirBlock = function (ops) { - var result = []; - var canBeInBlock = function (op) { - return !(op.isJustNewline() || - op.isCustomEmbedBlock() || - op.isVideo() || - op.isContainerBlock()); - }; - var isInlineData = function (op) { return op.isInline(); }; - var lastInd = ops.length - 1; - var opsSlice; - for (var i = lastInd; i >= 0; i--) { - var op = ops[i]; - if (op.isVideo()) { - result.push(new group_types_1.VideoItem(op)); - } - else if (op.isCustomEmbedBlock()) { - result.push(new group_types_1.BlotBlock(op)); - } - else if (op.isContainerBlock()) { - opsSlice = array_1.sliceFromReverseWhile(ops, i - 1, canBeInBlock); - result.push(new group_types_1.BlockGroup(op, opsSlice.elements)); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } - else { - opsSlice = array_1.sliceFromReverseWhile(ops, i - 1, isInlineData); - result.push(new group_types_1.InlineGroup(opsSlice.elements.concat(op))); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } - } - result.reverse(); - return result; - }; - Grouper.groupConsecutiveSameStyleBlocks = function (groups, blocksOf) { - if (blocksOf === void 0) { blocksOf = { - header: true, - codeBlocks: true, - blockquotes: true, - customBlocks: true, - }; } - return array_1.groupConsecutiveElementsWhile(groups, function (g, gPrev) { - if (!(g instanceof group_types_1.BlockGroup) || !(gPrev instanceof group_types_1.BlockGroup)) { - return false; - } - return ((blocksOf.codeBlocks && - Grouper.areBothCodeblocksWithSameLang(g, gPrev)) || - (blocksOf.blockquotes && - Grouper.areBothBlockquotesWithSameAdi(g, gPrev)) || - (blocksOf.header && - Grouper.areBothSameHeadersWithSameAdi(g, gPrev)) || - (blocksOf.customBlocks && - Grouper.areBothCustomBlockWithSameAttr(g, gPrev))); - }); - }; - Grouper.reduceConsecutiveSameStyleBlocksToOne = function (groups) { - var newLineOp = DeltaInsertOp_1.DeltaInsertOp.createNewLineOp(); - return groups.map(function (elm) { - if (!Array.isArray(elm)) { - if (elm instanceof group_types_1.BlockGroup && !elm.ops.length) { - elm.ops.push(newLineOp); - } - return elm; - } - var groupsLastInd = elm.length - 1; - elm[0].ops = array_1.flatten(elm.map(function (g, i) { - if (!g.ops.length) { - return [newLineOp]; - } - return g.ops.concat(i < groupsLastInd ? [newLineOp] : []); - })); - return elm[0]; - }); - }; - Grouper.areBothCodeblocksWithSameLang = function (g1, gOther) { - return (g1.op.isCodeBlock() && - gOther.op.isCodeBlock() && - g1.op.hasSameLangAs(gOther.op)); - }; - Grouper.areBothSameHeadersWithSameAdi = function (g1, gOther) { - return g1.op.isSameHeaderAs(gOther.op) && g1.op.hasSameAdiAs(gOther.op); - }; - Grouper.areBothBlockquotesWithSameAdi = function (g, gOther) { - return (g.op.isBlockquote() && - gOther.op.isBlockquote() && - g.op.hasSameAdiAs(gOther.op)); - }; - Grouper.areBothCustomBlockWithSameAttr = function (g, gOther) { - return (g.op.isCustomTextBlock() && - gOther.op.isCustomTextBlock() && - g.op.hasSameAttr(gOther.op)); - }; - return Grouper; -}()); -exports.Grouper = Grouper; diff --git a/dist/commonjs/grouper/ListNester.d.ts b/dist/commonjs/grouper/ListNester.d.ts deleted file mode 100644 index 13c2dcc..0000000 --- a/dist/commonjs/grouper/ListNester.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TDataGroup } from './group-types'; -declare class ListNester { - nest(groups: TDataGroup[]): TDataGroup[]; - private convertListBlocksToListGroups; - private groupConsecutiveListGroups; - private nestListSection; - private groupByIndent; - private placeUnderParent; -} -export { ListNester }; diff --git a/dist/commonjs/grouper/ListNester.js b/dist/commonjs/grouper/ListNester.js deleted file mode 100644 index 68dd56a..0000000 --- a/dist/commonjs/grouper/ListNester.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var group_types_1 = require("./group-types"); -var array_1 = require("./../helpers/array"); -var ListNester = (function () { - function ListNester() { - } - ListNester.prototype.nest = function (groups) { - var _this = this; - var listBlocked = this.convertListBlocksToListGroups(groups); - var groupedByListGroups = this.groupConsecutiveListGroups(listBlocked); - var nested = array_1.flatten(groupedByListGroups.map(function (group) { - if (!Array.isArray(group)) { - return group; - } - return _this.nestListSection(group); - })); - var groupRootLists = array_1.groupConsecutiveElementsWhile(nested, function (curr, prev) { - if (!(curr instanceof group_types_1.ListGroup && prev instanceof group_types_1.ListGroup)) { - return false; - } - return curr.items[0].item.op.isSameListAs(prev.items[0].item.op); - }); - return groupRootLists.map(function (v) { - if (!Array.isArray(v)) { - return v; - } - var litems = v.map(function (g) { return g.items; }); - return new group_types_1.ListGroup(array_1.flatten(litems)); - }); - }; - ListNester.prototype.convertListBlocksToListGroups = function (items) { - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isList() && - gPrev.op.isList() && - g.op.isSameListAs(gPrev.op) && - g.op.hasSameIndentationAs(gPrev.op)); - }); - return grouped.map(function (item) { - if (!Array.isArray(item)) { - if (item instanceof group_types_1.BlockGroup && item.op.isList()) { - return new group_types_1.ListGroup([new group_types_1.ListItem(item)]); - } - return item; - } - return new group_types_1.ListGroup(item.map(function (g) { return new group_types_1.ListItem(g); })); - }); - }; - ListNester.prototype.groupConsecutiveListGroups = function (items) { - return array_1.groupConsecutiveElementsWhile(items, function (curr, prev) { - return curr instanceof group_types_1.ListGroup && prev instanceof group_types_1.ListGroup; - }); - }; - ListNester.prototype.nestListSection = function (sectionItems) { - var _this = this; - var indentGroups = this.groupByIndent(sectionItems); - Object.keys(indentGroups) - .map(Number) - .sort() - .reverse() - .forEach(function (indent) { - indentGroups[indent].forEach(function (lg) { - var idx = sectionItems.indexOf(lg); - if (_this.placeUnderParent(lg, sectionItems.slice(0, idx))) { - sectionItems.splice(idx, 1); - } - }); - }); - return sectionItems; - }; - ListNester.prototype.groupByIndent = function (items) { - return items.reduce(function (pv, cv) { - var indent = cv.items[0].item.op.attributes.indent; - if (indent) { - pv[indent] = pv[indent] || []; - pv[indent].push(cv); - } - return pv; - }, {}); - }; - ListNester.prototype.placeUnderParent = function (target, items) { - for (var i = items.length - 1; i >= 0; i--) { - var elm = items[i]; - if (target.items[0].item.op.hasHigherIndentThan(elm.items[0].item.op)) { - var parent = elm.items[elm.items.length - 1]; - if (parent.innerList) { - parent.innerList.items = parent.innerList.items.concat(target.items); - } - else { - parent.innerList = target; - } - return true; - } - } - return false; - }; - return ListNester; -}()); -exports.ListNester = ListNester; diff --git a/dist/commonjs/grouper/TableGrouper.d.ts b/dist/commonjs/grouper/TableGrouper.d.ts deleted file mode 100644 index 835fd6d..0000000 --- a/dist/commonjs/grouper/TableGrouper.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { TDataGroup } from './group-types'; -export declare class TableGrouper { - group(groups: TDataGroup[]): TDataGroup[]; - private convertTableBlocksToTableGroups; - private convertTableBlocksToTableRows; -} diff --git a/dist/commonjs/grouper/TableGrouper.js b/dist/commonjs/grouper/TableGrouper.js deleted file mode 100644 index 2d179cb..0000000 --- a/dist/commonjs/grouper/TableGrouper.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var group_types_1 = require("./group-types"); -var array_1 = require("../helpers/array"); -var TableGrouper = (function () { - function TableGrouper() { - } - TableGrouper.prototype.group = function (groups) { - var tableBlocked = this.convertTableBlocksToTableGroups(groups); - return tableBlocked; - }; - TableGrouper.prototype.convertTableBlocksToTableGroups = function (items) { - var _this = this; - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isTable() && - gPrev.op.isTable()); - }); - return grouped.map(function (item) { - if (!Array.isArray(item)) { - if (item instanceof group_types_1.BlockGroup && item.op.isTable()) { - return new group_types_1.TableGroup([new group_types_1.TableRow([new group_types_1.TableCell(item)])]); - } - return item; - } - return new group_types_1.TableGroup(_this.convertTableBlocksToTableRows(item)); - }); - }; - TableGrouper.prototype.convertTableBlocksToTableRows = function (items) { - var grouped = array_1.groupConsecutiveElementsWhile(items, function (g, gPrev) { - return (g instanceof group_types_1.BlockGroup && - gPrev instanceof group_types_1.BlockGroup && - g.op.isTable() && - gPrev.op.isTable() && - g.op.isSameTableRowAs(gPrev.op)); - }); - return grouped.map(function (item) { - return new group_types_1.TableRow(Array.isArray(item) - ? item.map(function (it) { return new group_types_1.TableCell(it); }) - : [new group_types_1.TableCell(item)]); - }); - }; - return TableGrouper; -}()); -exports.TableGrouper = TableGrouper; diff --git a/dist/commonjs/grouper/group-types.d.ts b/dist/commonjs/grouper/group-types.d.ts deleted file mode 100644 index b08c294..0000000 --- a/dist/commonjs/grouper/group-types.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { DeltaInsertOp } from './../DeltaInsertOp'; -declare class InlineGroup { - readonly ops: DeltaInsertOp[]; - constructor(ops: DeltaInsertOp[]); -} -declare class SingleItem { - readonly op: DeltaInsertOp; - constructor(op: DeltaInsertOp); -} -declare class VideoItem extends SingleItem {} -declare class BlotBlock extends SingleItem {} -declare class BlockGroup { - readonly op: DeltaInsertOp; - ops: DeltaInsertOp[]; - constructor(op: DeltaInsertOp, ops: DeltaInsertOp[]); -} -declare class ListGroup { - items: ListItem[]; - constructor(items: ListItem[]); -} -declare class ListItem { - readonly item: BlockGroup; - innerList: ListGroup | null; - constructor(item: BlockGroup, innerList?: ListGroup | null); -} -declare class TableGroup { - rows: TableRow[]; - constructor(rows: TableRow[]); -} -declare class TableRow { - cells: TableCell[]; - constructor(cells: TableCell[]); -} -declare class TableCell { - readonly item: BlockGroup; - constructor(item: BlockGroup); -} -declare type TDataGroup = - | VideoItem - | InlineGroup - | BlockGroup - | ListItem - | ListGroup - | TableGroup - | TableRow - | TableCell; -export { - VideoItem, - BlotBlock, - InlineGroup, - BlockGroup, - ListGroup, - ListItem, - TableGroup, - TableRow, - TableCell, - TDataGroup, -}; diff --git a/dist/commonjs/grouper/group-types.js b/dist/commonjs/grouper/group-types.js deleted file mode 100644 index df7bcfb..0000000 --- a/dist/commonjs/grouper/group-types.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var InlineGroup = (function () { - function InlineGroup(ops) { - this.ops = ops; - } - return InlineGroup; -}()); -exports.InlineGroup = InlineGroup; -var SingleItem = (function () { - function SingleItem(op) { - this.op = op; - } - return SingleItem; -}()); -var VideoItem = (function (_super) { - __extends(VideoItem, _super); - function VideoItem() { - return _super !== null && _super.apply(this, arguments) || this; - } - return VideoItem; -}(SingleItem)); -exports.VideoItem = VideoItem; -var BlotBlock = (function (_super) { - __extends(BlotBlock, _super); - function BlotBlock() { - return _super !== null && _super.apply(this, arguments) || this; - } - return BlotBlock; -}(SingleItem)); -exports.BlotBlock = BlotBlock; -var BlockGroup = (function () { - function BlockGroup(op, ops) { - this.op = op; - this.ops = ops; - } - return BlockGroup; -}()); -exports.BlockGroup = BlockGroup; -var ListGroup = (function () { - function ListGroup(items) { - this.items = items; - } - return ListGroup; -}()); -exports.ListGroup = ListGroup; -var ListItem = (function () { - function ListItem(item, innerList) { - if (innerList === void 0) { innerList = null; } - this.item = item; - this.innerList = innerList; - } - return ListItem; -}()); -exports.ListItem = ListItem; -var TableGroup = (function () { - function TableGroup(rows) { - this.rows = rows; - } - return TableGroup; -}()); -exports.TableGroup = TableGroup; -var TableRow = (function () { - function TableRow(cells) { - this.cells = cells; - } - return TableRow; -}()); -exports.TableRow = TableRow; -var TableCell = (function () { - function TableCell(item) { - this.item = item; - } - return TableCell; -}()); -exports.TableCell = TableCell; diff --git a/dist/commonjs/helpers/array.d.ts b/dist/commonjs/helpers/array.d.ts deleted file mode 100644 index 219b02f..0000000 --- a/dist/commonjs/helpers/array.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -interface IArraySlice { - sliceStartsAt: number; - elements: any[]; -} -declare function preferSecond(arr: any[]): any; -declare function flatten(arr: any[]): any[]; -declare function find(arr: any[], predicate: (currElm: any) => boolean): any; -declare function groupConsecutiveElementsWhile( - arr: any[], - predicate: (currElm: any, prevElm: any) => boolean -): any[]; -declare function sliceFromReverseWhile( - arr: any[], - startIndex: number, - predicate: (currElm: any) => boolean -): IArraySlice; -declare function intersperse(arr: any[], item: any): any[]; -export { - IArraySlice, - preferSecond, - flatten, - groupConsecutiveElementsWhile, - sliceFromReverseWhile, - intersperse, - find, -}; diff --git a/dist/commonjs/helpers/array.js b/dist/commonjs/helpers/array.js deleted file mode 100644 index 847f01d..0000000 --- a/dist/commonjs/helpers/array.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function preferSecond(arr) { - if (arr.length === 0) { - return null; - } - return arr.length >= 2 ? arr[1] : arr[0]; -} -exports.preferSecond = preferSecond; -function flatten(arr) { - return arr.reduce(function (pv, v) { - return pv.concat(Array.isArray(v) ? flatten(v) : v); - }, []); -} -exports.flatten = flatten; -function find(arr, predicate) { - if (Array.prototype.find) { - return Array.prototype.find.call(arr, predicate); - } - for (var i = 0; i < arr.length; i++) { - if (predicate(arr[i])) - return arr[i]; - } - return undefined; -} -exports.find = find; -function groupConsecutiveElementsWhile(arr, predicate) { - var groups = []; - var currElm, currGroup; - for (var i = 0; i < arr.length; i++) { - currElm = arr[i]; - if (i > 0 && predicate(currElm, arr[i - 1])) { - currGroup = groups[groups.length - 1]; - currGroup.push(currElm); - } - else { - groups.push([currElm]); - } - } - return groups.map(function (g) { return (g.length === 1 ? g[0] : g); }); -} -exports.groupConsecutiveElementsWhile = groupConsecutiveElementsWhile; -function sliceFromReverseWhile(arr, startIndex, predicate) { - var result = { - elements: [], - sliceStartsAt: -1, - }; - for (var i = startIndex; i >= 0; i--) { - if (!predicate(arr[i])) { - break; - } - result.sliceStartsAt = i; - result.elements.unshift(arr[i]); - } - return result; -} -exports.sliceFromReverseWhile = sliceFromReverseWhile; -function intersperse(arr, item) { - return arr.reduce(function (pv, v, index) { - pv.push(v); - if (index < arr.length - 1) { - pv.push(item); - } - return pv; - }, []); -} -exports.intersperse = intersperse; diff --git a/dist/commonjs/helpers/object.d.ts b/dist/commonjs/helpers/object.d.ts deleted file mode 100644 index 5e78e62..0000000 --- a/dist/commonjs/helpers/object.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function assign(target: any, ...sources: any[]): any; -export { assign }; diff --git a/dist/commonjs/helpers/object.js b/dist/commonjs/helpers/object.js deleted file mode 100644 index 26d9282..0000000 --- a/dist/commonjs/helpers/object.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function assign(target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - var to = Object(target); - for (var index = 0; index < sources.length; index++) { - var nextSource = sources[index]; - if (nextSource != null) { - for (var nextKey in nextSource) { - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; -} -exports.assign = assign; diff --git a/dist/commonjs/helpers/string.d.ts b/dist/commonjs/helpers/string.d.ts deleted file mode 100644 index 1ddf515..0000000 --- a/dist/commonjs/helpers/string.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function tokenizeWithNewLines(str: string): string[]; -export { tokenizeWithNewLines }; diff --git a/dist/commonjs/helpers/string.js b/dist/commonjs/helpers/string.js deleted file mode 100644 index 4aa343f..0000000 --- a/dist/commonjs/helpers/string.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function tokenizeWithNewLines(str) { - var NewLine = '\n'; - if (str === NewLine) { - return [str]; - } - var lines = str.split(NewLine); - if (lines.length === 1) { - return lines; - } - var lastIndex = lines.length - 1; - return lines.reduce(function (pv, line, ind) { - if (ind !== lastIndex) { - if (line !== '') { - pv = pv.concat(line, NewLine); - } - else { - pv.push(NewLine); - } - } - else if (line !== '') { - pv.push(line); - } - return pv; - }, []); -} -exports.tokenizeWithNewLines = tokenizeWithNewLines; diff --git a/dist/commonjs/helpers/url.d.ts b/dist/commonjs/helpers/url.d.ts deleted file mode 100644 index fce7287..0000000 --- a/dist/commonjs/helpers/url.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function sanitize(str: string): string; -export { sanitize }; diff --git a/dist/commonjs/helpers/url.js b/dist/commonjs/helpers/url.js deleted file mode 100644 index 3f23756..0000000 --- a/dist/commonjs/helpers/url.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function sanitize(str) { - var val = str; - val = val.replace(/^\s*/gm, ''); - var whiteList = /^((https?|s?ftp|file|blob|mailto|tel):|#|\/|data:image\/)/; - if (whiteList.test(val)) { - return val; - } - return 'unsafe:' + val; -} -exports.sanitize = sanitize; diff --git a/dist/commonjs/main.d.ts b/dist/commonjs/main.d.ts deleted file mode 100644 index b2ddef3..0000000 --- a/dist/commonjs/main.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { QuillDeltaToHtmlConverter } from './QuillDeltaToHtmlConverter'; -export { OpToHtmlConverter } from './OpToHtmlConverter'; -export { - InlineGroup, - VideoItem, - BlockGroup, - ListGroup, - ListItem, - BlotBlock, -} from './grouper/group-types'; -export { DeltaInsertOp } from './DeltaInsertOp'; -export { InsertDataQuill, InsertDataCustom } from './InsertData'; -export { - NewLine, - ListType, - ScriptType, - DirectionType, - AlignType, - DataType, - GroupType, -} from './value-types'; diff --git a/dist/commonjs/main.js b/dist/commonjs/main.js deleted file mode 100644 index c7ac6cc..0000000 --- a/dist/commonjs/main.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var QuillDeltaToHtmlConverter_1 = require("./QuillDeltaToHtmlConverter"); -exports.QuillDeltaToHtmlConverter = QuillDeltaToHtmlConverter_1.QuillDeltaToHtmlConverter; -var OpToHtmlConverter_1 = require("./OpToHtmlConverter"); -exports.OpToHtmlConverter = OpToHtmlConverter_1.OpToHtmlConverter; -var group_types_1 = require("./grouper/group-types"); -exports.InlineGroup = group_types_1.InlineGroup; -exports.VideoItem = group_types_1.VideoItem; -exports.BlockGroup = group_types_1.BlockGroup; -exports.ListGroup = group_types_1.ListGroup; -exports.ListItem = group_types_1.ListItem; -exports.BlotBlock = group_types_1.BlotBlock; -var DeltaInsertOp_1 = require("./DeltaInsertOp"); -exports.DeltaInsertOp = DeltaInsertOp_1.DeltaInsertOp; -var InsertData_1 = require("./InsertData"); -exports.InsertDataQuill = InsertData_1.InsertDataQuill; -exports.InsertDataCustom = InsertData_1.InsertDataCustom; -var value_types_1 = require("./value-types"); -exports.NewLine = value_types_1.NewLine; -exports.ListType = value_types_1.ListType; -exports.ScriptType = value_types_1.ScriptType; -exports.DirectionType = value_types_1.DirectionType; -exports.AlignType = value_types_1.AlignType; -exports.DataType = value_types_1.DataType; -exports.GroupType = value_types_1.GroupType; diff --git a/dist/commonjs/mentions/MentionSanitizer.d.ts b/dist/commonjs/mentions/MentionSanitizer.d.ts deleted file mode 100644 index 62ac002..0000000 --- a/dist/commonjs/mentions/MentionSanitizer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IOpAttributeSanitizerOptions } from './../OpAttributeSanitizer'; -interface IMention { - [index: string]: string | undefined; - name?: string; - target?: string; - slug?: string; - class?: string; - avatar?: string; - id?: string; - 'end-point'?: string; -} -declare class MentionSanitizer { - static sanitize(dirtyObj: IMention, sanitizeOptions: IOpAttributeSanitizerOptions): IMention; - static IsValidClass(classAttr: string): boolean; - static IsValidId(idAttr: string): boolean; - static IsValidTarget(target: string): boolean; -} -export { MentionSanitizer, IMention }; diff --git a/dist/commonjs/mentions/MentionSanitizer.js b/dist/commonjs/mentions/MentionSanitizer.js deleted file mode 100644 index d373f0e..0000000 --- a/dist/commonjs/mentions/MentionSanitizer.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var OpLinkSanitizer_1 = require("../OpLinkSanitizer"); -var MentionSanitizer = (function () { - function MentionSanitizer() { - } - MentionSanitizer.sanitize = function (dirtyObj, sanitizeOptions) { - var cleanObj = {}; - if (!dirtyObj || typeof dirtyObj !== 'object') { - return cleanObj; - } - if (dirtyObj.class && MentionSanitizer.IsValidClass(dirtyObj.class)) { - cleanObj.class = dirtyObj.class; - } - if (dirtyObj.id && MentionSanitizer.IsValidId(dirtyObj.id)) { - cleanObj.id = dirtyObj.id; - } - if (MentionSanitizer.IsValidTarget(dirtyObj.target + '')) { - cleanObj.target = dirtyObj.target; - } - if (dirtyObj.avatar) { - cleanObj.avatar = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj.avatar + '', sanitizeOptions); - } - if (dirtyObj['end-point']) { - cleanObj['end-point'] = OpLinkSanitizer_1.OpLinkSanitizer.sanitize(dirtyObj['end-point'] + '', sanitizeOptions); - } - if (dirtyObj.slug) { - cleanObj.slug = dirtyObj.slug + ''; - } - return cleanObj; - }; - MentionSanitizer.IsValidClass = function (classAttr) { - return !!classAttr.match(/^[a-zA-Z0-9_\-]{1,500}$/i); - }; - MentionSanitizer.IsValidId = function (idAttr) { - return !!idAttr.match(/^[a-zA-Z0-9_\-\:\.]{1,500}$/i); - }; - MentionSanitizer.IsValidTarget = function (target) { - return ['_self', '_blank', '_parent', '_top'].indexOf(target) > -1; - }; - return MentionSanitizer; -}()); -exports.MentionSanitizer = MentionSanitizer; diff --git a/dist/commonjs/value-types.d.ts b/dist/commonjs/value-types.d.ts deleted file mode 100644 index 95515ff..0000000 --- a/dist/commonjs/value-types.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -declare type NewLine = '\n'; -declare const NewLine: '\n'; -declare enum ListType { - Ordered = 'ordered', - Bullet = 'bullet', - Checked = 'checked', - Unchecked = 'unchecked', -} -declare enum ScriptType { - Sub = 'sub', - Super = 'super', -} -declare enum DirectionType { - Rtl = 'rtl', -} -declare enum AlignType { - Left = 'left', - Center = 'center', - Right = 'right', - Justify = 'justify', -} -declare enum DataType { - Image = 'image', - Video = 'video', - Formula = 'formula', - Text = 'text', -} -declare enum GroupType { - Block = 'block', - InlineGroup = 'inline-group', - List = 'list', - Video = 'video', - Table = 'table', -} -export { - NewLine, - ListType, - ScriptType, - DirectionType, - AlignType, - DataType, - GroupType, -}; diff --git a/dist/commonjs/value-types.js b/dist/commonjs/value-types.js deleted file mode 100644 index 41de23d..0000000 --- a/dist/commonjs/value-types.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var NewLine = '\n'; -exports.NewLine = NewLine; -var ListType; -(function (ListType) { - ListType["Ordered"] = "ordered"; - ListType["Bullet"] = "bullet"; - ListType["Checked"] = "checked"; - ListType["Unchecked"] = "unchecked"; -})(ListType || (ListType = {})); -exports.ListType = ListType; -var ScriptType; -(function (ScriptType) { - ScriptType["Sub"] = "sub"; - ScriptType["Super"] = "super"; -})(ScriptType || (ScriptType = {})); -exports.ScriptType = ScriptType; -var DirectionType; -(function (DirectionType) { - DirectionType["Rtl"] = "rtl"; -})(DirectionType || (DirectionType = {})); -exports.DirectionType = DirectionType; -var AlignType; -(function (AlignType) { - AlignType["Left"] = "left"; - AlignType["Center"] = "center"; - AlignType["Right"] = "right"; - AlignType["Justify"] = "justify"; -})(AlignType || (AlignType = {})); -exports.AlignType = AlignType; -var DataType; -(function (DataType) { - DataType["Image"] = "image"; - DataType["Video"] = "video"; - DataType["Formula"] = "formula"; - DataType["Text"] = "text"; -})(DataType || (DataType = {})); -exports.DataType = DataType; -var GroupType; -(function (GroupType) { - GroupType["Block"] = "block"; - GroupType["InlineGroup"] = "inline-group"; - GroupType["List"] = "list"; - GroupType["Video"] = "video"; - GroupType["Table"] = "table"; -})(GroupType || (GroupType = {})); -exports.GroupType = GroupType; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..51a5278 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,20 @@ +// @ts-check +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + { + languageOptions: { + parserOptions: { + project: './tsconfig.test.json', + }, + }, + }, + { + files: ['*.js'], + ...tseslint.configs.disableTypeChecked, + }, +); diff --git a/package-lock.json b/package-lock.json index 160f789..e177df2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1880 +1,1951 @@ { - "name": "quill-delta-to-html", - "version": "0.12.1", - "lockfileVersion": 2, + "name": "quill-delta-to-react", + "version": "0.1.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { - "version": "0.12.1", + "name": "quill-delta-to-react", + "version": "0.1.0", "license": "ISC", "dependencies": { "lodash.isequal": "^4.5.0" }, "devDependencies": { - "@types/lodash.isequal": "^4.5.5", - "@types/mocha": "^2", - "@types/node": "^7.0", - "browserify": "^16.2", - "coveralls": "^3.0", - "husky": "^3.0.9", - "mocha": "^6", - "nyc": "^14.1", - "prettier": "^2.0.4", - "pretty-quick": "^2.0.1", - "ts-node": "^8", - "typescript": "^2" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.0.0" + "@eslint/js": "^9.0.0", + "@types/lodash.isequal": "^4.5.8", + "@types/node": "^20.12.7", + "@types/quill": "^2.0.14", + "@types/react": "^18.2.77", + "@types/react-dom": "^18.2.25", + "eslint": "^8.57.0", + "husky": "^9.0.11", + "prettier": "^3.2.5", + "pretty-quick": "^4.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.4.5", + "typescript-eslint": "^7.6.0", + "vitest": "^1.5.0" + }, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" } }, - "node_modules/@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, - "dependencies": { - "@babel/types": "^7.4.4", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "node_modules/@esbuild/android-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.4.4" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "node_modules/@esbuild/android-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==", + "node_modules/@esbuild/android-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "cpu": [ + "x64" + ], "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.0.0" + "node": ">=12" } }, - "node_modules/@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/traverse": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", - "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.4.5", - "@babel/types": "^7.4.4", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - } - }, - "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "ms": "^2.1.1" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@types/lodash": { - "version": "4.14.150", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz", - "integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==", - "dev": true - }, - "node_modules/@types/lodash.isequal": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/@types/lodash.isequal/-/lodash.isequal-4.5.5.tgz", - "integrity": "sha512-4IKbinG7MGP131wRfceK6W4E/Qt3qssEFLF30LnJbjYiSfHGGRU/Io8YxXrZX109ir+iDETC8hw8QsDijukUVg==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@types/lodash": "*" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.2.tgz", - "integrity": "sha512-RO4ig5taKmcrU4Rex8ojG1gpwFkjddzug9iPQSDvbewHN9vDpcFewevkaOK+KT+w1LeZnxbgOyfXwV4pxsQ4GQ==", - "dev": true - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "node_modules/acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "node_modules/@esbuild/linux-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "cpu": [ + "arm" + ], "dev": true, - "bin": { - "acorn": "bin/acorn" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.4.0" + "node": ">=12" } }, - "node_modules/acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "cpu": [ + "arm64" + ], "dev": true, - "peerDependencies": { - "acorn": "^6.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/acorn-node": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", - "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "acorn": "^6.0.2", - "acorn-dynamic-import": "^4.0.0", - "acorn-walk": "^6.1.0", - "xtend": "^4.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "cpu": [ + "loong64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.4.0" + "node": ">=12" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "cpu": [ + "mips64el" + ], "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "cpu": [ + "ppc64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "cpu": [ + "riscv64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "cpu": [ + "s390x" + ], "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "node_modules/@esbuild/linux-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "default-require-extensions": "^2.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "node_modules/arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", - "dev": true - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "node_modules/array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "node_modules/array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "node_modules/@esbuild/win32-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "node_modules/assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { - "util": "0.10.3" + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { - "node": ">=0.8" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { - "inherits": "2.0.1" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "node_modules/@eslint/js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.0.0.tgz", + "integrity": "sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==", "dev": true, "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "tweetnacl": "^0.14.3" + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" } }, - "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, - "node_modules/browser-pack": { - "version": "6.1.0", - "resolved": "http://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" + "@sinclair/typebox": "^0.27.8" }, - "bin": { - "browser-pack": "bin/cmd.js" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "dependencies": { - "resolve": "1.1.7" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/browser-resolve/node_modules/resolve": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } }, - "node_modules/browserify": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", - "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.2.0", - "buffer": "^5.0.2", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^2.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp": "^0.5.0", - "module-deps": "^6.0.0", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^2.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">= 0.8" + "node": ">= 8" } }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "engines": { + "node": ">= 8" } }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.1.tgz", + "integrity": "sha512-fH8/o8nSUek8ceQnT7K4EQbSiV7jgkHq81m9lWZFIXjJ7lJzpWXbQFpT/Zh6OZYnpFykvzC3fbEvEAFZu03dPA==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.1.tgz", + "integrity": "sha512-Y/9OHLjzkunF+KGEoJr3heiD5X9OLa8sbT1lm0NYeKyaM3oMhhQFvPB0bNZYJwlq93j8Z6wSxh9+cyKQaxS7PQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.1.tgz", + "integrity": "sha512-+kecg3FY84WadgcuSVm6llrABOdQAEbNdnpi5X3UwWiFVhZIZvKgGrF7kmLguvxHNQy+UuRV66cLVl3S+Rkt+Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.1.tgz", + "integrity": "sha512-2pYRzEjVqq2TB/UNv47BV/8vQiXkFGVmPFwJb+1E0IFFZbIX8/jo1olxqqMbo6xCXf8kabANhp5bzCij2tFLUA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "pako": "~1.0.5" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.1.tgz", + "integrity": "sha512-mS6wQ6Do6/wmrF9aTFVpIJ3/IDXhg1EZcQFYHZLHqw6AzMBjTHWnCG35HxSqUNphh0EHqSM6wRTT8HsL1C0x5g==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.1.tgz", + "integrity": "sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.1.tgz", + "integrity": "sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.1.tgz", + "integrity": "sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==", + "cpu": [ + "ppc64le" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.1.tgz", + "integrity": "sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.1.tgz", + "integrity": "sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==", + "cpu": [ + "s390x" + ], "dev": true, - "dependencies": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" - }, - "engines": { - "node": ">=6" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.1.tgz", + "integrity": "sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "callsites": "^2.0.0" - }, - "engines": { - "node": ">=4" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.1.tgz", + "integrity": "sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "caller-callsite": "^2.0.0" - }, - "engines": { - "node": ">=4" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.1.tgz", + "integrity": "sha512-ryS22I9y0mumlLNwDFYZRDFLwWh3aKaC72CWjFcFvxK0U6v/mOkM5Up1bTbCRAhv3kEIwW2ajROegCIQViUCeA==", + "cpu": [ + "arm64" + ], "dev": true, - "engines": { - "node": ">=4" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.1.tgz", + "integrity": "sha512-TdloItiGk+T0mTxKx7Hp279xy30LspMso+GzQvV2maYePMAWdmrzqSNZhUpPj3CGw12aGj57I026PgLCTu8CGg==", + "cpu": [ + "ia32" + ], "dev": true, - "engines": { - "node": ">=6" - } + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.1.tgz", + "integrity": "sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } + "node_modules/@tsconfig/node10": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.10.tgz", + "integrity": "sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw==", + "dev": true }, - "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, - "node_modules/cipher-base": { + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "node_modules/@types/lodash": { + "version": "4.14.150", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz", + "integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==", "dev": true }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "node_modules/@types/lodash.isequal": { + "version": "4.5.8", + "resolved": "https://registry.npmjs.org/@types/lodash.isequal/-/lodash.isequal-4.5.8.tgz", + "integrity": "sha512-uput6pg4E/tj2LGxCZo9+y27JNyB2OZuuI/T5F+ylVDYuqICLG2/ktjxx0v6GvVntAf8TvEzeQLcV0ffRirXuA==", "dev": true, "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" + "@types/lodash": "*" } }, - "node_modules/combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "node_modules/@types/node": { + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" + "undici-types": "~5.26.4" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "node_modules/@types/prop-types": { + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", "dev": true }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "node_modules/@types/quill": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@types/quill/-/quill-2.0.14.tgz", + "integrity": "sha512-zvoXCRnc2Dl8g+7/9VSAmRWPN6oH+MVhTPizmCR+GJCITplZ5VRVzMs4+a/nOE3yzNwEZqylJJrMB07bwbM1/g==", "dev": true, - "engines": [ - "node >= 0.8" - ], "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "parchment": "^1.1.2", + "quill-delta": "^5.1.0" } }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "node_modules/@types/react": { + "version": "18.2.77", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.77.tgz", + "integrity": "sha512-CUT9KUUF+HytDM7WiXKLF9qUSg4tGImwy4FXTlfEDPEkkNUzJ7rVFolYweJ9fS1ljoIaP7M7Rdjc5eUm/Yu5AA==", "dev": true, "dependencies": { - "date-now": "^0.1.4" + "@types/prop-types": "*", + "csstype": "^3.0.2" } }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true + "node_modules/@types/react-dom": { + "version": "18.2.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz", + "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==", + "dev": true, + "dependencies": { + "@types/react": "*" + } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", + "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", "dev": true, "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/visitor-keys": "7.6.0" }, "engines": { - "node": ">=4" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/coveralls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz", - "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==", + "node_modules/@typescript-eslint/types": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", + "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", "dev": true, - "dependencies": { - "growl": "~> 1.10.0", - "js-yaml": "^3.11.0", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.85.0" - }, - "bin": { - "coveralls": "bin/coveralls.js" - }, "engines": { - "node": ">=4.0.0" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", + "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" + "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/visitor-keys": "7.6.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "balanced-match": "^1.0.0" } }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", + "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0" + "@typescript-eslint/types": "7.6.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=0.10" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/@vitest/expect": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.0.tgz", + "integrity": "sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==", "dev": true, "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "node_modules/@vitest/runner": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.0.tgz", + "integrity": "sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==", "dev": true, "dependencies": { - "strip-bom": "^3.0.0" + "@vitest/utils": "1.5.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defined": { + "node_modules/@vitest/runner/node_modules/yocto-queue": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/deps-sort": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "node_modules/@vitest/snapshot": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.0.tgz", + "integrity": "sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==", "dev": true, "dependencies": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" }, - "bin": { - "deps-sort": "bin/cmd.js" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "node_modules/@vitest/spy": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.0.tgz", + "integrity": "sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/detective": { - "version": "5.1.0", - "resolved": "http://registry.npmjs.org/detective/-/detective-5.1.0.tgz", - "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==", + "node_modules/@vitest/utils": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.0.tgz", + "integrity": "sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==", "dev": true, "dependencies": { - "acorn-node": "^1.3.0", - "defined": "^1.0.0", - "minimist": "^1.1.1" - }, - "bin": { - "detective": "bin/detective.js" + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" }, - "engines": { - "node": ">=0.8.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=0.3.1" + "node": ">=0.4.0" } }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" + "node": ">=0.4.0" } }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/elliptic/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arg": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", + "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", "dev": true }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "dependencies": { - "once": "^1.4.0" + "engines": { + "node": ">=8" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" + "engines": { + "node": "*" } }, - "node_modules/es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "fill-range": "^7.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "node_modules/chai": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "engines": { - "node": ">=0.4.x" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "get-func-name": "^2.0.2" }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/execa/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "color-name": "~1.1.4" }, "engines": { - "node": ">=4.8" + "node": ">=7.0.0" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "node_modules/fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">= 8" } }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" + "ms": "2.1.2" }, "engines": { - "node": ">=6" - } - }, - "node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" + "node": ">=6.0" }, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat/node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" + "peerDependenciesMeta": { + "supports-color": { + "optional": true } - ], - "engines": { - "node": ">=4" - } - }, - "node_modules/foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "dev": true, - "dependencies": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "type-detect": "^4.0.0" }, "engines": { - "node": ">= 0.12" + "node": ">=6" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", "dev": true, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">=0.3.1" } }, - "node_modules/get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { - "pump": "^3.0.0" + "path-type": "^4.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" + "node": ">=8" } }, - "node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "esutils": "^2.0.2" }, "engines": { - "node": "*" + "node": ">=6.0.0" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "node_modules/esbuild": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, - "node_modules/graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=4.x" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=0.4.7" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "deprecated": "this library is no longer supported", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "estraverse": "^5.1.0" }, "engines": { - "node": ">= 0.4.0" + "node": ">=0.10" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=4" + "node": ">=4.0" } }, - "node_modules/has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=4.0" } }, - "node_modules/hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": ">=4" + "@types/estree": "^1.0.0" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "is-stream": "^1.0.1" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, - "bin": { - "he": "bin/he" + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, "engines": { - "node": ">=0.10" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/https-browserify": { + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/husky": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/husky/-/husky-3.0.9.tgz", - "integrity": "sha512-Yolhupm7le2/MqC1VYLk/cNmYxsSsqKkTyBhzQHhPK1jFnC89mmmNVuGtLNabjDI6Aj8UNIr0KpRNuBkiC4+sg==", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, - "dependencies": { - "chalk": "^2.4.2", - "ci-info": "^2.0.0", - "cosmiconfig": "^5.2.1", - "execa": "^1.0.0", - "get-stdin": "^7.0.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "read-pkg": "^5.2.0", - "run-node": "^1.0.0", - "slash": "^3.0.0" - }, - "bin": { - "husky-run": "run.js", - "husky-upgrade": "lib/upgrader/bin.js" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8.6.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/husky/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=8" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/husky/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=8" + "node": ">=10.13.0" } }, - "node_modules/husky/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/husky/node_modules/parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/husky/node_modules/path-exists": { + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/husky/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10.17.0" } }, - "node_modules/husky/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "bin": { + "husky": "bin.mjs" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" } }, - "node_modules/ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, "node_modules/ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "engines": { "node": ">=0.8.19" @@ -1883,7 +1954,7 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", @@ -1891,6147 +1962,1585 @@ } }, "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "dependencies": { - "source-map": "~0.5.3" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" + "is-extglob": "^2.1.1" }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.12.0" } }, - "node_modules/is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "dependencies": { - "has": "^1.0.1" - }, "engines": { - "node": ">= 0.4" + "node": ">=8" } }, "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "has-symbols": "^1.0.0" + "argparse": "^2.0.1" }, - "engines": { - "node": ">= 0.4" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, - "node_modules/istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "json-buffer": "3.0.1" } }, - "node_modules/istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "append-transform": "^1.0.0" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", "dev": true, "dependencies": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" }, "engines": { - "node": ">=6" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", - "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", - "dev": true, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, "dependencies": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" + "js-tokens": "^3.0.0 || ^4.0.0" }, - "engines": { - "node": ">=6" + "bin": { + "loose-envify": "cli.js" } }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" + "get-func-name": "^2.0.1" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" + "yallist": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/magic-string": { + "version": "0.30.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", + "integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" } }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "dev": true, - "dependencies": { - "handlebars": "^4.1.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "node_modules/make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, - "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "jsonify": "~0.0.0" + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" } }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { - "node": "*" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, "engines": { - "node": "*" + "node": ">=6" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=0.6.0" + "node": "*" } }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", - "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", + "node_modules/mlly": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", + "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "isarray": "^2.0.4", - "stream-splicer": "^2.0.0" + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "ufo": "^1.3.2" } }, - "node_modules/labeled-stream-splicer/node_modules/isarray": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", - "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", - "dev": true - }, - "node_modules/lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, - "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, "engines": { "node": ">=4" } }, - "node_modules/load-json-file/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">=6" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true, - "engines": { - "node": ">=0.8.6" - } - }, - "node_modules/log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "dependencies": { - "chalk": "^2.0.1" + "path-key": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "wrappy": "1" } }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "mimic-fn": "^2.1.0" }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "source-map": "^0.6.1" + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-source-map/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", "dev": true }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "callsites": "^3.0.0" }, - "bin": { - "miller-rabin": "bin/miller-rabin" + "engines": { + "node": ">=6" } }, - "node_modules/mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "dependencies": { - "mime-db": "~1.37.0" - }, "engines": { - "node": ">= 0.6" + "node": ">=0.10.0" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", "dev": true }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, - "node_modules/mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "node_modules/picomatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", + "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" + "engines": { + "node": ">=10" }, - "bin": { - "mkdirp": "bin/cmd.js" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", "dev": true, "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 6.0.0" + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" } }, - "node_modules/mocha/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, "engines": { - "node": ">=0.3.1" + "node": "^10 || ^12 || >=14" } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/module-deps": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz", - "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==", + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, - "dependencies": { - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.0.2", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, "bin": { - "module-deps": "bin/cmd.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">= 0.8.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/mri": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", - "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==", + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, "engines": { - "node": ">=4" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/multimatch": { + "node_modules/pretty-quick": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.0.0.tgz", + "integrity": "sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==", "dev": true, "dependencies": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" + "execa": "^5.1.1", + "find-up": "^5.0.0", + "ignore": "^5.3.0", + "mri": "^1.2.0", + "picocolors": "^1.0.0", + "picomatch": "^3.0.1", + "tslib": "^2.6.2" + }, + "bin": { + "pretty-quick": "lib/cli.mjs" }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "peerDependencies": { + "prettier": "^3.0.0" } }, - "node_modules/neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "node_modules/nested-error-stacks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", - "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", - "dev": true - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "engines": { + "node": ">=6" } }, - "node_modules/normalize-package-data/node_modules/resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "dependencies": { - "path-parse": "^1.0.6" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", "dev": true, "dependencies": { - "path-key": "^2.0.0" + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" }, "engines": { - "node": ">=4" + "node": ">= 12.0.0" } }, - "node_modules/nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", - "dev": true, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, "dependencies": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" - }, - "bin": { - "nyc": "bin/nyc.js" + "loose-envify": "^1.1.0" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/nyc/node_modules/convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, "dependencies": { - "safe-buffer": "~5.1.1" + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "engines": { - "node": "*" + "node": ">=4" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { - "node": ">= 0.4" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "glob": "^7.1.3" }, - "engines": { - "node": ">= 0.4" + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "node_modules/rollup": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz", + "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==", "dev": true, "dependencies": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" }, "engines": { - "node": ">= 0.8" + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.14.1", + "@rollup/rollup-android-arm64": "4.14.1", + "@rollup/rollup-darwin-arm64": "4.14.1", + "@rollup/rollup-darwin-x64": "4.14.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.1", + "@rollup/rollup-linux-arm64-gnu": "4.14.1", + "@rollup/rollup-linux-arm64-musl": "4.14.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1", + "@rollup/rollup-linux-riscv64-gnu": "4.14.1", + "@rollup/rollup-linux-s390x-gnu": "4.14.1", + "@rollup/rollup-linux-x64-gnu": "4.14.1", + "@rollup/rollup-linux-x64-musl": "4.14.1", + "@rollup/rollup-win32-arm64-msvc": "4.14.1", + "@rollup/rollup-win32-ia32-msvc": "4.14.1", + "@rollup/rollup-win32-x64-msvc": "4.14.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "wrappy": "1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/opencollective-postinstall": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", - "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "bin": { - "opencollective-postinstall": "index.js" + "engines": { + "node": ">=8" } }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, "engines": { "node": ">=6" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "node_modules/strip-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" + "js-tokens": "^9.0.0" }, - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/pako": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz", - "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==", + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", "dev": true }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/tinybench": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", + "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==", + "dev": true }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "node_modules/tinypool": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.3.tgz", + "integrity": "sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=14.0.0" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">=14.0.0" } }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=4" + "node": ">=8.0" } }, - "node_modules/path-type/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" } }, - "node_modules/pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" }, - "engines": { - "node": ">=0.12" + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "dependencies": { - "semver-compare": "^1.0.0" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prettier": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", - "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=10.13.0" + "node": ">=14.17" } }, - "node_modules/pretty-quick": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", - "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", + "node_modules/typescript-eslint": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.6.0.tgz", + "integrity": "sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==", "dev": true, "dependencies": { - "chalk": "^2.4.2", - "execa": "^2.1.0", - "find-up": "^4.1.0", - "ignore": "^5.1.4", - "mri": "^1.1.4", - "multimatch": "^4.0.0" - }, - "bin": { - "pretty-quick": "bin/pretty-quick.js" + "@typescript-eslint/eslint-plugin": "7.6.0", + "@typescript-eslint/parser": "7.6.0", + "@typescript-eslint/utils": "7.6.0" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "prettier": ">=1.8.0" + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/pretty-quick/node_modules/cross-spawn": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", - "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", + "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.6.0", + "@typescript-eslint/type-utils": "7.6.0", + "@typescript-eslint/utils": "7.6.0", + "@typescript-eslint/visitor-keys": "7.6.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">= 8" - } - }, - "node_modules/pretty-quick/node_modules/execa": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", - "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^3.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" + "node": "^18.18.0 || >=20.0.0" }, - "engines": { - "node": "^8.12.0 || >=9.7.0" - } - }, - "node_modules/pretty-quick/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "engines": { - "node": ">=8" + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/pretty-quick/node_modules/get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", + "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", "dev": true, "dependencies": { - "pump": "^3.0.0" + "@typescript-eslint/typescript-estree": "7.6.0", + "@typescript-eslint/utils": "7.6.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true, - "engines": { - "node": ">=8" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/pretty-quick/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "@typescript-eslint/scope-manager": "7.6.0", + "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/typescript-estree": "7.6.0", + "@typescript-eslint/visitor-keys": "7.6.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/pretty-quick/node_modules/npm-run-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", - "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", + "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.6.0", + "@typescript-eslint/types": "7.6.0", + "@typescript-eslint/typescript-estree": "7.6.0", + "semver": "^7.6.0" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" } }, - "node_modules/pretty-quick/node_modules/p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/ufo": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", + "dev": true }, - "node_modules/pretty-quick/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, - "node_modules/pretty-quick/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "punycode": "^2.1.0" } }, - "node_modules/pretty-quick/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, - "node_modules/pretty-quick/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/vite": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", + "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" }, "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } } }, - "node_modules/pretty-quick/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/vite-node": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.0.tgz", + "integrity": "sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" }, "bin": { - "node-which": "bin/node-which" + "vite-node": "vite-node.mjs" }, "engines": { - "node": ">= 8" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true, + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.0.tgz", + "integrity": "sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.5.0", + "@vitest/runner": "1.5.0", + "@vitest/snapshot": "1.5.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.5.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "node_modules/psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", - "dev": true - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.5.0", + "@vitest/ui": "1.5.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } } }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/vitest/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true, + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, "engines": { - "node": ">=0.6" + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "node_modules/vitest/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "engines": { - "node": ">=0.4.x" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "node_modules/vitest/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=0.4.x" + "node": ">=16.17.0" } }, - "node_modules/randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "node_modules/vitest/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "node_modules/vitest/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "node_modules/vitest/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { - "readable-stream": "^2.0.2" + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "node_modules/vitest/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up": { + "node_modules/vitest/node_modules/path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "node_modules/vitest/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/vitest/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "es6-error": "^4.0.1" + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" }, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", "dev": true, "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" }, "engines": { - "node": ">= 4" + "node": ">=8" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/resolve": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", - "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "dependencies": { - "path-parse": "^1.0.6" + "engines": { + "node": ">=6" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { - "node": ">=4" - } - }, - "node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true, - "bin": { - "run-node": "run-node" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shasum": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "dependencies": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "dependencies": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "node_modules/signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "node_modules/simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", - "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", - "dev": true, - "dependencies": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/sshpk": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", - "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stream-browserify": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/stream-splicer": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "dependencies": { - "minimist": "^1.1.0" - } - }, - "node_modules/supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "http://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "dependencies": { - "acorn-node": "^1.2.0" - } - }, - "node_modules/test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "dev": true, - "dependencies": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "http://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "dependencies": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ts-node": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", - "integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==", - "dev": true, - "dependencies": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - }, - "bin": { - "ts-node": "dist/bin.js" - }, - "engines": { - "node": ">=4.2.0" - }, - "peerDependencies": { - "typescript": ">=2.0" - } - }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "optional": true, - "dependencies": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-js/node_modules/commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true, - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/undeclared-identifiers": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", - "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", - "dev": true, - "dependencies": { - "acorn-node": "^1.3.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "bin": { - "undeclared-identifiers": "bin.js" - } - }, - "node_modules/uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", - "dev": true - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "node_modules/xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", - "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", - "dev": true, - "engines": { - "node": ">=6" - } - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.4", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", - "dev": true, - "requires": { - "@babel/types": "^7.4.4" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==", - "dev": true - }, - "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" - } - }, - "@babel/traverse": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", - "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.4.5", - "@babel/types": "^7.4.4", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "@types/lodash": { - "version": "4.14.150", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz", - "integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==", - "dev": true - }, - "@types/lodash.isequal": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/@types/lodash.isequal/-/lodash.isequal-4.5.5.tgz", - "integrity": "sha512-4IKbinG7MGP131wRfceK6W4E/Qt3qssEFLF30LnJbjYiSfHGGRU/Io8YxXrZX109ir+iDETC8hw8QsDijukUVg==", - "dev": true, - "requires": { - "@types/lodash": "*" - } - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", - "dev": true - }, - "@types/node": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.2.tgz", - "integrity": "sha512-RO4ig5taKmcrU4Rex8ojG1gpwFkjddzug9iPQSDvbewHN9vDpcFewevkaOK+KT+w1LeZnxbgOyfXwV4pxsQ4GQ==", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true, - "requires": {} - }, - "acorn-node": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", - "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", - "dev": true, - "requires": { - "acorn": "^6.0.2", - "acorn-dynamic-import": "^4.0.0", - "acorn-walk": "^6.1.0", - "xtend": "^4.0.1" - } - }, - "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "http://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - } - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", - "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", - "dev": true, - "requires": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.2.0", - "buffer": "^5.0.2", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^2.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp": "^0.5.0", - "module-deps": "^6.0.0", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^2.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true - }, - "caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", - "dev": true, - "requires": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "coveralls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz", - "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==", - "dev": true, - "requires": { - "growl": "~> 1.10.0", - "js-yaml": "^3.11.0", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.85.0" - } - }, - "cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "deps-sort": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "detective": { - "version": "5.1.0", - "resolved": "http://registry.npmjs.org/detective/-/detective-5.1.0.tgz", - "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "defined": "^1.0.0", - "minimist": "^1.1.1" - } - }, - "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - } - } - }, - "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", - "dev": true, - "requires": { - "is-stream": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "husky": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/husky/-/husky-3.0.9.tgz", - "integrity": "sha512-Yolhupm7le2/MqC1VYLk/cNmYxsSsqKkTyBhzQHhPK1jFnC89mmmNVuGtLNabjDI6Aj8UNIr0KpRNuBkiC4+sg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "ci-info": "^2.0.0", - "cosmiconfig": "^5.2.1", - "execa": "^1.0.0", - "get-stdin": "^7.0.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "read-pkg": "^5.2.0", - "run-node": "^1.0.0", - "slash": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - } - } - } - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "requires": { - "source-map": "~0.5.3" - } - }, - "insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "requires": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", - "dev": true, - "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", - "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==", - "dev": true - } - } - }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "dev": true, - "requires": { - "handlebars": "^4.1.2" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "labeled-stream-splicer": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", - "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "isarray": "^2.0.4", - "stream-splicer": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", - "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", - "dev": true - } - } - }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", - "dev": true - }, - "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", - "dev": true, - "requires": { - "mime-db": "~1.37.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "module-deps": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz", - "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==", - "dev": true, - "requires": { - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.0.2", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "mri": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", - "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "multimatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", - "dev": true, - "requires": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - } - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nested-error-stacks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", - "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" - }, - "dependencies": { - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "opencollective-postinstall": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", - "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", - "dev": true - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "pako": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.7.tgz", - "integrity": "sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "prettier": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", - "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", - "dev": true - }, - "pretty-quick": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", - "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "execa": "^2.1.0", - "find-up": "^4.1.0", - "ignore": "^5.1.4", - "mri": "^1.1.4", - "multimatch": "^4.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", - "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", - "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^3.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "npm-run-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", - "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", - "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shasum": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "spawn-wrap": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", - "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", - "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "syntax-error": { - "version": "1.4.0", - "resolved": "http://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "requires": { - "acorn-node": "^1.2.0" - } - }, - "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "dev": true, - "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "http://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "ts-node": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", - "integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - } - }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", - "dev": true - }, - "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true - }, - "undeclared-identifiers": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", - "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" + "node": ">=10" }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } - }, - "yn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", - "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", - "dev": true } } } diff --git a/package.json b/package.json index 6f2823a..1d7830f 100644 --- a/package.json +++ b/package.json @@ -1,70 +1,58 @@ { - "name": "quill-delta-to-html", - "version": "0.12.1", - "description": "Converts Quill's delta ops to HTML", - "main": "./dist/commonjs/main.js", - "types": "./dist/commonjs/main.d.ts", + "name": "quill-delta-to-react", + "version": "0.1.0", + "description": "Converts Quill's Delta ops to React", + "type": "module", + "main": "./dist/main.js", + "types": "./dist/main.d.ts", "dependencies": { "lodash.isequal": "^4.5.0" }, "devDependencies": { - "@types/lodash.isequal": "^4.5.5", - "@types/mocha": "^2", - "@types/node": "^7.0", - "browserify": "^16.2", - "coveralls": "^3.0", - "husky": "^3.0.9", - "mocha": "^6", - "nyc": "^14.1", - "prettier": "^2.0.4", - "pretty-quick": "^2.0.1", - "ts-node": "^8", - "typescript": "^2" + "@eslint/js": "^9.0.0", + "@types/lodash.isequal": "^4.5.8", + "@types/node": "^20.12.7", + "@types/quill": "^2.0.14", + "@types/react": "^18.2.77", + "@types/react-dom": "^18.2.25", + "eslint": "^8.57.0", + "husky": "^9.0.11", + "prettier": "^3.2.5", + "pretty-quick": "^4.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.4.5", + "typescript-eslint": "^7.6.0", + "vitest": "^1.5.0" + }, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "scripts": { - "browserbundle": "./node_modules/browserify/bin/cmd.js ./dist/commonjs/QuillDeltaToHtmlConverter.js -o ./dist/browser/QuillDeltaToHtmlConverter.bundle.js -s QuillDeltaToHtmlConverter ", - "browser": "npm run browserbundle && echo '; window.QuillDeltaToHtmlConverter = window.QuillDeltaToHtmlConverter ? window.QuillDeltaToHtmlConverter.QuillDeltaToHtmlConverter : window.QuillDeltaToHtmlConverter; ' >> ./dist/browser/QuillDeltaToHtmlConverter.bundle.js ", - "build": "./node_modules/typescript/bin/tsc && npm run browser ", - "test": "./node_modules/nyc/bin/nyc.js ./node_modules/mocha/bin/mocha --require ts-node/register -b \"./test/**/*.ts\" ", - "coverage": "./node_modules/nyc/bin/nyc.js report --reporter=text-lcov | coveralls ", - "coveragehtml": "./node_modules/nyc/bin/nyc.js report --reporter=html " + "build": "./node_modules/typescript/bin/tsc", + "format": "npx prettier --write .", + "format:check": "npx prettier --check .", + "lint": "npx eslint --fix .", + "lint:check": "npx eslint .", + "typecheck": "./node_modules/typescript/bin/tsc --project ./tsconfig.test.json --noEmit", + "test": "vitest run" }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/nozer/quill-delta-to-html.git" + "url": "git+ssh://git@github.com/wirechunk/quill-delta-to-react.git" }, "keywords": [ "quill", "delta", - "html" + "html", + "react" ], "author": "Nihat Özer ", "license": "ISC", "bugs": { - "url": "https://github.com/nozer/quill-delta-to-html/issues" - }, - "homepage": "https://github.com/nozer/quill-delta-to-html#readme", - "nyc": { - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "typings", - "src/main.ts", - "**/*.d.ts" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "json", - "html" - ], - "all": true + "url": "https://github.com/wirechunk/quill-delta-to-react/issues" }, + "homepage": "https://github.com/wirechunk/quill-delta-to-react#readme", "husky": { "hooks": { "pre-commit": "pretty-quick --staged" diff --git a/src/DeltaInsertOp.ts b/src/DeltaInsertOp.ts index 681193e..619fa43 100644 --- a/src/DeltaInsertOp.ts +++ b/src/DeltaInsertOp.ts @@ -1,22 +1,16 @@ -import { NewLine, ListType, DataType } from './value-types'; -import { IOpAttributes } from './OpAttributeSanitizer'; -import { InsertData, InsertDataCustom, InsertDataQuill } from './InsertData'; +import { DataType, ListType } from './value-types.js'; +import type { OpAttributes } from './OpAttributeSanitizer.js'; +import { InsertData, InsertDataCustom, InsertDataQuill } from './InsertData.js'; import isEqual from 'lodash.isequal'; -class DeltaInsertOp { - readonly insert: InsertData; - readonly attributes: IOpAttributes; - - constructor(insertVal: InsertData | string, attrs?: IOpAttributes) { - if (typeof insertVal === 'string') { - insertVal = new InsertDataQuill(DataType.Text, insertVal + ''); - } - this.insert = insertVal; - this.attributes = attrs || {}; - } +export class DeltaInsertOp { + constructor( + readonly insert: Insert, + readonly attributes: OpAttributes = {}, + ) {} static createNewLineOp() { - return new DeltaInsertOp(NewLine); + return new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')); } isContainerBlock() { @@ -26,14 +20,16 @@ class DeltaInsertOp { this.isTable() || this.isCodeBlock() || this.isHeader() || - this.isBlockAttribute() || - this.isCustomTextBlock() + this.hasBlockAttribute() ); } - isBlockAttribute() { - const attrs = this.attributes; - return !!(attrs.align || attrs.direction || attrs.indent); + hasBlockAttribute() { + return ( + !!this.attributes.align || + !!this.attributes.direction || + !!this.attributes.indent + ); } isBlockquote(): boolean { @@ -48,19 +44,6 @@ class DeltaInsertOp { return !!this.attributes.table; } - isSameHeaderAs(op: DeltaInsertOp): boolean { - return op.attributes.header === this.attributes.header && this.isHeader(); - } - - // adi: alignment direction indentation - hasSameAdiAs(op: DeltaInsertOp) { - return ( - this.attributes.align === op.attributes.align && - this.attributes.direction === op.attributes.direction && - this.attributes.indent === op.attributes.indent - ); - } - hasSameIndentationAs(op: DeltaInsertOp) { return this.attributes.indent === op.attributes.indent; } @@ -69,18 +52,12 @@ class DeltaInsertOp { return isEqual(this.attributes, op.attributes); } - hasHigherIndentThan(op: DeltaInsertOp) { - return ( - (Number(this.attributes.indent) || 0) > - (Number(op.attributes.indent) || 0) - ); - } - isInline() { - return !( - this.isContainerBlock() || - this.isVideo() || - this.isCustomEmbedBlock() + return ( + !this.isContainerBlock() && + (this.insert instanceof InsertDataQuill + ? this.insert.type !== DataType.Video + : !this.attributes.renderAsBlock) ); } @@ -93,7 +70,7 @@ class DeltaInsertOp { } isJustNewline() { - return this.insert.value === NewLine; + return this.insert.value === '\n'; } isList() { @@ -136,49 +113,48 @@ class DeltaInsertOp { ); } - isSameTableRowAs(op: DeltaInsertOp): boolean { + isImage(): this is DeltaInsertOp> { return ( - !!op.isTable() && - this.isTable() && - this.attributes.table === op.attributes.table + this.insert instanceof InsertDataQuill && + this.insert.type === DataType.Image ); } - isText() { - return this.insert.type === DataType.Text; - } - - isImage() { - return this.insert.type === DataType.Image; - } - - isFormula() { - return this.insert.type === DataType.Formula; + isFormula(): this is DeltaInsertOp> { + return ( + this.insert instanceof InsertDataQuill && + this.insert.type === DataType.Formula + ); } - isVideo() { - return this.insert.type === DataType.Video; + isVideo(): this is DeltaInsertOp> { + return ( + this.insert instanceof InsertDataQuill && + this.insert.type === DataType.Video + ); } isLink() { - return this.isText() && !!this.attributes.link; + return ( + this.insert instanceof InsertDataQuill && + this.insert.type === DataType.Text && + !!this.attributes.link + ); } - isCustomEmbed() { + isCustomEmbed(): this is DeltaInsertOp { return this.insert instanceof InsertDataCustom; } - isCustomEmbedBlock() { + isCustomEmbedBlock(): this is DeltaInsertOp { return this.isCustomEmbed() && !!this.attributes.renderAsBlock; } - isCustomTextBlock() { - return this.isText() && !!this.attributes.renderAsBlock; - } - - isMentions() { - return this.isText() && !!this.attributes.mentions; + isMentions(): this is DeltaInsertOp> { + return ( + this.insert instanceof InsertDataQuill && + this.insert.type === DataType.Text && + !!this.attributes.mentions + ); } } - -export { DeltaInsertOp }; diff --git a/src/InsertData.ts b/src/InsertData.ts index c1692a4..42dfc94 100644 --- a/src/InsertData.ts +++ b/src/InsertData.ts @@ -1,23 +1,14 @@ -import { DataType } from './value-types'; +import type { DataType } from './value-types.js'; -class InsertDataQuill { - readonly type: DataType; - readonly value: string; - constructor(type: DataType, value: string) { - this.type = type; - this.value = value; - } +export class InsertDataQuill
{ + constructor( + readonly type: DT, + readonly value: string, + ) {} } -class InsertDataCustom { - readonly type: string; - readonly value: any; - constructor(type: string, value: any) { - this.type = type; - this.value = value; - } +export class InsertDataCustom { + constructor(readonly value: Record) {} } -type InsertData = InsertDataCustom | InsertDataQuill; - -export { InsertData, InsertDataCustom, InsertDataQuill }; +export type InsertData = InsertDataCustom | InsertDataQuill; diff --git a/src/InsertOpDenormalizer.ts b/src/InsertOpDenormalizer.ts deleted file mode 100644 index 0f49185..0000000 --- a/src/InsertOpDenormalizer.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { NewLine } from './value-types'; -import * as str from './helpers/string'; -import * as obj from './helpers/object'; - -/** - * Denormalization is splitting a text insert operation that has new lines into multiple - * ops where each op is either a new line or a text containing no new lines. - * - * Why? It makes things easier when picking op that needs to be inside a block when - * rendering to html - * - * Example: - * {insert: 'hello\n\nhow are you?\n', attributes: {bold: true}} - * - * Denormalized: - * [ - * {insert: 'hello', attributes: {bold: true}}, - * {insert: '\n', attributes: {bold: true}}, - * {insert: '\n', attributes: {bold: true}}, - * {insert: 'how are you?', attributes: {bold: true}}, - * {insert: '\n', attributes: {bold: true}} - * ] - */ - -class InsertOpDenormalizer { - static denormalize(op: any): any[] { - if (!op || typeof op !== 'object') { - return []; - } - - if (typeof op.insert === 'object' || op.insert === NewLine) { - return [op]; - } - - let newlinedArray = str.tokenizeWithNewLines(op.insert + ''); - - if (newlinedArray.length === 1) { - return [op]; - } - - let nlObj = obj.assign({}, op, { insert: NewLine }); - - return newlinedArray.map((line: string) => { - if (line === NewLine) { - return nlObj; - } - return obj.assign({}, op, { - insert: line, - }); - }); - } -} - -export { InsertOpDenormalizer }; diff --git a/src/InsertOpsConverter.ts b/src/InsertOpsConverter.ts deleted file mode 100644 index 81dc849..0000000 --- a/src/InsertOpsConverter.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { DeltaInsertOp } from './DeltaInsertOp'; -import { DataType } from './value-types'; -import { InsertData, InsertDataCustom, InsertDataQuill } from './InsertData'; -import { - OpAttributeSanitizer, - IOpAttributeSanitizerOptions, -} from './OpAttributeSanitizer'; -import { InsertOpDenormalizer } from './InsertOpDenormalizer'; -import { OpLinkSanitizer } from './OpLinkSanitizer'; - -/** - * Converts raw delta insert ops to array of denormalized DeltaInsertOp objects - */ -class InsertOpsConverter { - static convert( - deltaOps: null | any[], - options: IOpAttributeSanitizerOptions - ): DeltaInsertOp[] { - if (!Array.isArray(deltaOps)) { - return []; - } - - var denormalizedOps = [].concat.apply( - [], - deltaOps.map(InsertOpDenormalizer.denormalize) - ); - var results: DeltaInsertOp[] = []; - - var insertVal, attributes; - - for (var op of denormalizedOps) { - if (!op.insert) { - continue; - } - - insertVal = InsertOpsConverter.convertInsertVal(op.insert, options); - if (!insertVal) { - continue; - } - - attributes = OpAttributeSanitizer.sanitize(op.attributes, options); - - results.push(new DeltaInsertOp(insertVal, attributes)); - } - return results; - } - - static convertInsertVal( - insertPropVal: any, - sanitizeOptions: IOpAttributeSanitizerOptions - ): InsertData | null { - if (typeof insertPropVal === 'string') { - return new InsertDataQuill(DataType.Text, insertPropVal); - } - - if (!insertPropVal || typeof insertPropVal !== 'object') { - return null; - } - - let keys = Object.keys(insertPropVal); - if (!keys.length) { - return null; - } - - return DataType.Image in insertPropVal - ? new InsertDataQuill( - DataType.Image, - OpLinkSanitizer.sanitize( - insertPropVal[DataType.Image] + '', - sanitizeOptions - ) - ) - : DataType.Video in insertPropVal - ? new InsertDataQuill( - DataType.Video, - OpLinkSanitizer.sanitize( - insertPropVal[DataType.Video] + '', - sanitizeOptions - ) - ) - : DataType.Formula in insertPropVal - ? new InsertDataQuill(DataType.Formula, insertPropVal[DataType.Formula]) - : // custom - new InsertDataCustom(keys[0], insertPropVal[keys[0]]); - } -} - -export { InsertOpsConverter }; diff --git a/src/OpAttributeSanitizer.ts b/src/OpAttributeSanitizer.ts index ba92231..c91f233 100644 --- a/src/OpAttributeSanitizer.ts +++ b/src/OpAttributeSanitizer.ts @@ -1,15 +1,18 @@ -import { ListType, AlignType, DirectionType, ScriptType } from './value-types'; -import { MentionSanitizer } from './mentions/MentionSanitizer'; -import { IMention } from './mentions/MentionSanitizer'; -import { find } from './helpers/array'; -import { OpLinkSanitizer } from './OpLinkSanitizer'; - -interface IOpAttributes { +import { + ListType, + AlignType, + DirectionType, + ScriptType, +} from './value-types.js'; +import { sanitizeMention } from './sanitize-mention.js'; +import type { Mention } from './sanitize-mention.js'; + +export type OpAttributes = { background?: string | undefined; color?: string | undefined; font?: string | undefined; size?: string | undefined; - width?: string | undefined; + width?: string | number | undefined; link?: string | undefined; bold?: boolean | undefined; @@ -23,40 +26,54 @@ interface IOpAttributes { list?: ListType; blockquote?: boolean | undefined; 'code-block'?: string | boolean | undefined; - header?: number | undefined; + header?: 1 | 2 | 3 | 4 | 5 | 6 | undefined; align?: AlignType; direction?: DirectionType; indent?: number | undefined; table?: string | undefined; mentions?: boolean | undefined; - mention?: IMention | undefined; + mention?: Mention | undefined; target?: string | undefined; rel?: string | undefined; - // should this custom blot be rendered as block? + // Set renderAsBlock to true on a custom blot to render it as block. renderAsBlock?: boolean | undefined; - [key: string]: any; -} + [key: string]: unknown; +}; -interface IUrlSanitizerFn { - (url: string): string | undefined; -} -interface IOpAttributeSanitizerOptions { - urlSanitizer?: IUrlSanitizerFn; -} +export type OpAttributeSanitizerOptions = { + urlSanitizer: (url: string) => string; +}; + +const validFontNameRegex = /^[a-z0-9 -]{1,50}$/i; + +const validRelRegex = /^[a-z\s-]{1,250}$/i; + +const validTargetRegex = /^[\w-]{1,50}$/i; -class OpAttributeSanitizer { +const alignTypes = Object.values(AlignType); + +const isAlignType = (align: unknown): align is AlignType => + alignTypes.includes(align as never); + +const listTypes = Object.values(ListType); + +const isListType = (list: unknown): list is ListType => + listTypes.includes(list as never); + +export class OpAttributeSanitizer { static sanitize( - dirtyAttrs: IOpAttributes, - sanitizeOptions: IOpAttributeSanitizerOptions - ): IOpAttributes { - var cleanAttrs: any = {}; + dirtyAttrs: Record, + sanitizeOptions: OpAttributeSanitizerOptions, + ): OpAttributes { + const cleanAttrs: OpAttributes = {}; if (!dirtyAttrs || typeof dirtyAttrs !== 'object') { return cleanAttrs; } - let booleanAttrs = [ + + const booleanAttrs = [ 'bold', 'italic', 'underline', @@ -65,11 +82,11 @@ class OpAttributeSanitizer { 'blockquote', 'code-block', 'renderAsBlock', - ]; + ] as const; - let colorAttrs = ['background', 'color']; + const colorAttrs = ['background', 'color'] as const; - let { + const { font, size, link, @@ -85,9 +102,10 @@ class OpAttributeSanitizer { target, rel, } = dirtyAttrs; - let codeBlock = dirtyAttrs['code-block']; - let sanitizedAttrs = [ + const codeBlock = dirtyAttrs['code-block']; + + const sanitizedAttrs = [ ...booleanAttrs, ...colorAttrs, 'font', @@ -106,79 +124,87 @@ class OpAttributeSanitizer { 'rel', 'code-block', ]; - booleanAttrs.forEach(function (prop: string) { - var v = (dirtyAttrs)[prop]; + + booleanAttrs.forEach((prop) => { + const v = dirtyAttrs[prop]; if (v) { cleanAttrs[prop] = !!v; } }); - colorAttrs.forEach(function (prop: string) { - var val = (dirtyAttrs)[prop]; + colorAttrs.forEach((prop) => { + const val = dirtyAttrs[prop]; if ( - val && - (OpAttributeSanitizer.IsValidHexColor(val + '') || - OpAttributeSanitizer.IsValidColorLiteral(val + '') || - OpAttributeSanitizer.IsValidRGBColor(val + '')) + typeof val === 'string' && + (OpAttributeSanitizer.isValidHexColor(val) || + OpAttributeSanitizer.IsValidColorLiteral(val) || + OpAttributeSanitizer.IsValidRGBColor(val)) ) { cleanAttrs[prop] = val; } }); - if (font && OpAttributeSanitizer.IsValidFontName(font + '')) { + if ( + typeof font === 'string' && + OpAttributeSanitizer.isValidFontName(font) + ) { cleanAttrs.font = font; } - if (size && OpAttributeSanitizer.IsValidSize(size + '')) { + if (typeof size === 'string' && OpAttributeSanitizer.isValidSize(size)) { cleanAttrs.size = size; } - if (width && OpAttributeSanitizer.IsValidWidth(width + '')) { + if ( + width && + (typeof width === 'number' || typeof width === 'string') && + OpAttributeSanitizer.IsValidWidth(width + '') + ) { cleanAttrs.width = width; } - if (link) { - cleanAttrs.link = OpLinkSanitizer.sanitize(link + '', sanitizeOptions); + if (link && typeof link === 'string') { + cleanAttrs.link = sanitizeOptions.urlSanitizer(link); } - if (target && OpAttributeSanitizer.isValidTarget(target)) { + + if ( + typeof target === 'string' && + OpAttributeSanitizer.isValidTarget(target) + ) { cleanAttrs.target = target; } - if (rel && OpAttributeSanitizer.IsValidRel(rel)) { + if (typeof rel === 'string' && OpAttributeSanitizer.IsValidRel(rel)) { cleanAttrs.rel = rel; } if (codeBlock) { - if (OpAttributeSanitizer.IsValidLang(codeBlock)) { + if ( + typeof codeBlock === 'string' && + OpAttributeSanitizer.IsValidLang(codeBlock) + ) { cleanAttrs['code-block'] = codeBlock; } else { cleanAttrs['code-block'] = !!codeBlock; } } - if (script === ScriptType.Sub || ScriptType.Super === script) { + if (script === ScriptType.Sub || script === ScriptType.Super) { cleanAttrs.script = script; } - if ( - list === ListType.Bullet || - list === ListType.Ordered || - list === ListType.Checked || - list === ListType.Unchecked - ) { + if (isListType(list)) { cleanAttrs.list = list; } - if (Number(header)) { - cleanAttrs.header = Math.min(Number(header), 6); + if (header && !isNaN(Number(header))) { + cleanAttrs.header = Math.max( + Math.min(Math.round(Number(header)), 6), + 1, + ) as 1 | 2 | 3 | 4 | 5 | 6; } - if ( - find( - [AlignType.Center, AlignType.Right, AlignType.Justify, AlignType.Left], - (a) => a === align - ) - ) { + if (isAlignType(align)) { cleanAttrs.align = align; } @@ -191,25 +217,20 @@ class OpAttributeSanitizer { } if (mentions && mention) { - let sanitizedMention = MentionSanitizer.sanitize( - mention, - sanitizeOptions - ); - if (Object.keys(sanitizedMention).length > 0) { - cleanAttrs.mentions = !!mentions; - cleanAttrs.mention = mention; - } + cleanAttrs.mentions = !!mentions; + cleanAttrs.mention = sanitizeMention(mention, sanitizeOptions); } + return Object.keys(dirtyAttrs).reduce((cleaned, k) => { - // this is a custom attr, put it back - if (sanitizedAttrs.indexOf(k) === -1) { - cleaned[k] = (dirtyAttrs)[k]; + // This is a custom attribute. Put it back. + if (!sanitizedAttrs.includes(k)) { + cleaned[k] = dirtyAttrs[k]; } return cleaned; }, cleanAttrs); } - static IsValidHexColor(colorStr: string) { + static isValidHexColor(colorStr: string) { return !!colorStr.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i); } @@ -218,16 +239,17 @@ class OpAttributeSanitizer { } static IsValidRGBColor(colorStr: string) { - const re = /^rgb\(((0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d),\s*){2}(0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d)\)$/i; + const re = + /^rgb\(((0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d),\s*){2}(0|25[0-5]|2[0-4]\d|1\d\d|0?\d?\d)\)$/i; return !!colorStr.match(re); } - static IsValidFontName(fontName: string) { - return !!fontName.match(/^[a-z\s0-9\- ]{1,30}$/i); + static isValidFontName(fontName: string) { + return validFontNameRegex.test(fontName); } - static IsValidSize(size: string) { - return !!size.match(/^[a-z0-9\-]{1,20}$/i); + static isValidSize(size: string) { + return !!size.match(/^[a-z0-9-]{1,20}$/i); } static IsValidWidth(width: string) { @@ -235,24 +257,17 @@ class OpAttributeSanitizer { } static isValidTarget(target: string) { - return !!target.match(/^[_a-zA-Z0-9\-]{1,50}$/); + return validTargetRegex.test(target); } static IsValidRel(relStr: string) { - return !!relStr.match(/^[a-zA-Z\s\-]{1,250}$/i); + return validRelRegex.test(relStr); } static IsValidLang(lang: string | boolean) { if (typeof lang === 'boolean') { return true; } - return !!lang.match(/^[a-zA-Z\s\-\\\/\+]{1,50}$/i); + return !!lang.match(/^[a-z\s\-\\/+]{1,50}$/i); } } - -export { - OpAttributeSanitizer, - IOpAttributes, - IOpAttributeSanitizerOptions, - IUrlSanitizerFn, -}; diff --git a/src/OpLinkSanitizer.ts b/src/OpLinkSanitizer.ts deleted file mode 100644 index b7b2b34..0000000 --- a/src/OpLinkSanitizer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - IOpAttributeSanitizerOptions, - IUrlSanitizerFn, -} from './OpAttributeSanitizer'; -import * as url from './helpers/url'; -import { encodeLink } from './funcs-html'; - -class OpLinkSanitizer { - static sanitize(link: string, options: IOpAttributeSanitizerOptions) { - let sanitizerFn: IUrlSanitizerFn = () => { - return undefined; - }; - if (options && typeof options.urlSanitizer === 'function') { - sanitizerFn = options.urlSanitizer; - } - let result = sanitizerFn(link); - return typeof result === 'string' ? result : encodeLink(url.sanitize(link)); - } -} - -export { OpLinkSanitizer }; diff --git a/src/OpToHtmlConverter.ts b/src/OpToHtmlConverter.ts deleted file mode 100644 index b993787..0000000 --- a/src/OpToHtmlConverter.ts +++ /dev/null @@ -1,463 +0,0 @@ -import { - makeStartTag, - makeEndTag, - encodeHtml, - ITagKeyValue, -} from './funcs-html'; -import { DeltaInsertOp } from './DeltaInsertOp'; -import { ScriptType, NewLine } from './value-types'; -import * as obj from './helpers/object'; -import { IMention } from './mentions/MentionSanitizer'; -import * as arr from './helpers/array'; -import { OpAttributeSanitizer } from './OpAttributeSanitizer'; - -export type InlineStyleType = - | ((value: string, op: DeltaInsertOp) => string | undefined) - | { [x: string]: string }; - -export interface IInlineStyles { - indent?: InlineStyleType; - align?: InlineStyleType; - direction?: InlineStyleType; - font?: InlineStyleType; - size?: InlineStyleType; -} - -const DEFAULT_INLINE_FONTS: { [key: string]: string } = { - serif: 'font-family: Georgia, Times New Roman, serif', - monospace: 'font-family: Monaco, Courier New, monospace', -}; - -export const DEFAULT_INLINE_STYLES: IInlineStyles = { - font: (value) => DEFAULT_INLINE_FONTS[value] || 'font-family:' + value, - size: { - small: 'font-size: 0.75em', - large: 'font-size: 1.5em', - huge: 'font-size: 2.5em', - }, - indent: (value, op) => { - var indentSize = parseInt(value, 10) * 3; - var side = op.attributes['direction'] === 'rtl' ? 'right' : 'left'; - return 'padding-' + side + ':' + indentSize + 'em'; - }, - direction: (value, op) => { - if (value === 'rtl') { - return ( - 'direction:rtl' + (op.attributes['align'] ? '' : '; text-align:inherit') - ); - } else { - return undefined; - } - }, -}; - -interface IOpToHtmlConverterOptions { - classPrefix?: string; - inlineStyles?: boolean | IInlineStyles; - encodeHtml?: boolean; - listItemTag?: string; - paragraphTag?: string; - linkRel?: string; - linkTarget?: string; - allowBackgroundClasses?: boolean; - customTag?: (format: string, op: DeltaInsertOp) => string | void; - customTagAttributes?: (op: DeltaInsertOp) => { [key: string]: string } | void; - customCssClasses?: (op: DeltaInsertOp) => string | string[] | void; - customCssStyles?: (op: DeltaInsertOp) => string | string[] | void; -} - -interface IHtmlParts { - openingTag: string; - content: string; - closingTag: string; -} - -class OpToHtmlConverter { - private options: IOpToHtmlConverterOptions; - private op: DeltaInsertOp; - - constructor(op: DeltaInsertOp, options?: IOpToHtmlConverterOptions) { - this.op = op; - this.options = obj.assign( - {}, - { - classPrefix: 'ql', - inlineStyles: undefined, - encodeHtml: true, - listItemTag: 'li', - paragraphTag: 'p', - }, - options - ); - } - - prefixClass(className: string): string { - if (!this.options.classPrefix) { - return className + ''; - } - return this.options.classPrefix + '-' + className; - } - - getHtml(): string { - var parts = this.getHtmlParts(); - return parts.openingTag + parts.content + parts.closingTag; - } - - getHtmlParts(): IHtmlParts { - if (this.op.isJustNewline() && !this.op.isContainerBlock()) { - return { openingTag: '', closingTag: '', content: NewLine }; - } - - let tags = this.getTags(), - attrs = this.getTagAttributes(); - - if (!tags.length && attrs.length) { - tags.push('span'); - } - - let beginTags = [], - endTags = []; - const imgTag = 'img'; - const isImageLink = (tag: any) => - tag === imgTag && !!this.op.attributes.link; - for (var tag of tags) { - if (isImageLink(tag)) { - beginTags.push(makeStartTag('a', this.getLinkAttrs())); - } - beginTags.push(makeStartTag(tag, attrs)); - endTags.push(tag === 'img' ? '' : makeEndTag(tag)); - if (isImageLink(tag)) { - endTags.push(makeEndTag('a')); - } - // consumed in first tag - attrs = []; - } - endTags.reverse(); - - return { - openingTag: beginTags.join(''), - content: this.getContent(), - closingTag: endTags.join(''), - }; - } - - getContent(): string { - if (this.op.isContainerBlock()) { - return ''; - } - - if (this.op.isMentions()) { - return this.op.insert.value; - } - - var content = - this.op.isFormula() || this.op.isText() ? this.op.insert.value : ''; - - return (this.options.encodeHtml && encodeHtml(content)) || content; - } - - getCssClasses(): string[] { - var attrs: any = this.op.attributes; - - type Str2StrType = { (x: string): string }; - - if (this.options.inlineStyles) { - return []; - } - - var propsArr = ['indent', 'align', 'direction', 'font', 'size']; - if (this.options.allowBackgroundClasses) { - propsArr.push('background'); - } - return (this.getCustomCssClasses() || []).concat( - propsArr - .filter((prop) => !!attrs[prop]) - .filter((prop) => - prop === 'background' - ? OpAttributeSanitizer.IsValidColorLiteral(attrs[prop]) - : true - ) - .map((prop) => prop + '-' + attrs[prop]) - .concat(this.op.isFormula() ? 'formula' : []) - .concat(this.op.isVideo() ? 'video' : []) - .concat(this.op.isImage() ? 'image' : []) - .map(this.prefixClass.bind(this)) - ); - } - - getCssStyles(): string[] { - var attrs: any = this.op.attributes; - - var propsArr = [['color']]; - if (!!this.options.inlineStyles || !this.options.allowBackgroundClasses) { - propsArr.push(['background', 'background-color']); - } - if (this.options.inlineStyles) { - propsArr = propsArr.concat([ - ['indent'], - ['align', 'text-align'], - ['direction'], - ['font', 'font-family'], - ['size'], - ]); - } - - return (this.getCustomCssStyles() || []) - .concat( - propsArr - .filter((item) => !!attrs[item[0]]) - .map((item: any[]) => { - let attribute = item[0]; - let attrValue = attrs[attribute]; - - let attributeConverter: InlineStyleType = - (this.options.inlineStyles && - (this.options.inlineStyles as any)[attribute]) || - (DEFAULT_INLINE_STYLES as any)[attribute]; - - if (typeof attributeConverter === 'object') { - return attributeConverter[attrValue]; - } else if (typeof attributeConverter === 'function') { - var converterFn = attributeConverter as ( - value: string, - op: DeltaInsertOp - ) => string; - return converterFn(attrValue, this.op); - } else { - return arr.preferSecond(item) + ':' + attrValue; - } - }) - ) - .filter((item: any) => item !== undefined); - } - - getTagAttributes(): Array { - if (this.op.attributes.code && !this.op.isLink()) { - return []; - } - - const makeAttr = this.makeAttr.bind(this); - const customTagAttributes = this.getCustomTagAttributes(); - const customAttr = customTagAttributes - ? Object.keys(this.getCustomTagAttributes()).map((k) => - makeAttr(k, customTagAttributes[k]) - ) - : []; - var classes = this.getCssClasses(); - var tagAttrs = classes.length - ? customAttr.concat([makeAttr('class', classes.join(' '))]) - : customAttr; - - if (this.op.isImage()) { - this.op.attributes.width && - (tagAttrs = tagAttrs.concat( - makeAttr('width', this.op.attributes.width) - )); - return tagAttrs.concat(makeAttr('src', this.op.insert.value)); - } - - if (this.op.isACheckList()) { - return tagAttrs.concat( - makeAttr('data-checked', this.op.isCheckedList() ? 'true' : 'false') - ); - } - - if (this.op.isFormula()) { - return tagAttrs; - } - - if (this.op.isVideo()) { - return tagAttrs.concat( - makeAttr('frameborder', '0'), - makeAttr('allowfullscreen', 'true'), - makeAttr('src', this.op.insert.value) - ); - } - - if (this.op.isMentions()) { - var mention: IMention = this.op.attributes.mention!; - if (mention.class) { - tagAttrs = tagAttrs.concat(makeAttr('class', mention.class)); - } - if (mention['end-point'] && mention.slug) { - tagAttrs = tagAttrs.concat( - makeAttr('href', mention['end-point'] + '/' + mention.slug) - ); - } else { - tagAttrs = tagAttrs.concat(makeAttr('href', 'about:blank')); - } - if (mention.target) { - tagAttrs = tagAttrs.concat(makeAttr('target', mention.target)); - } - return tagAttrs; - } - - var styles = this.getCssStyles(); - if (styles.length) { - tagAttrs.push(makeAttr('style', styles.join(';'))); - } - - if ( - this.op.isCodeBlock() && - typeof this.op.attributes['code-block'] === 'string' - ) { - return tagAttrs.concat( - makeAttr('data-language', this.op.attributes['code-block']) - ); - } - - if (this.op.isContainerBlock()) { - return tagAttrs; - } - - if (this.op.isLink()) { - tagAttrs = tagAttrs.concat(this.getLinkAttrs()); - } - - return tagAttrs; - } - - makeAttr(k: string, v: string): ITagKeyValue { - return { key: k, value: v }; - } - - getLinkAttrs(): Array { - let tagAttrs: ITagKeyValue[] = []; - - let targetForAll = OpAttributeSanitizer.isValidTarget( - this.options.linkTarget || '' - ) - ? this.options.linkTarget - : undefined; - let relForAll = OpAttributeSanitizer.IsValidRel(this.options.linkRel || '') - ? this.options.linkRel - : undefined; - - let target = this.op.attributes.target || targetForAll; - let rel = this.op.attributes.rel || relForAll; - - return tagAttrs - .concat(this.makeAttr('href', this.op.attributes.link!)) - .concat(target ? this.makeAttr('target', target) : []) - .concat(rel ? this.makeAttr('rel', rel) : []); - } - - getCustomTag(format: string) { - if ( - this.options.customTag && - typeof this.options.customTag === 'function' - ) { - return this.options.customTag.apply(null, [format, this.op]); - } - } - - getCustomTagAttributes() { - if ( - this.options.customTagAttributes && - typeof this.options.customTagAttributes === 'function' - ) { - return this.options.customTagAttributes.apply(null, [this.op]); - } - } - - getCustomCssClasses() { - if ( - this.options.customCssClasses && - typeof this.options.customCssClasses === 'function' - ) { - const res = this.options.customCssClasses.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - } - - getCustomCssStyles() { - if ( - this.options.customCssStyles && - typeof this.options.customCssStyles === 'function' - ) { - const res = this.options.customCssStyles.apply(null, [this.op]); - if (res) { - return Array.isArray(res) ? res : [res]; - } - } - } - - getTags(): string[] { - var attrs: any = this.op.attributes; - - // embeds - if (!this.op.isText()) { - return [ - this.op.isVideo() ? 'iframe' : this.op.isImage() ? 'img' : 'span', // formula - ]; - } - - // blocks - var positionTag = this.options.paragraphTag || 'p'; - - var blocks = [ - ['blockquote'], - ['code-block', 'pre'], - ['list', this.options.listItemTag], - ['header'], - ['align', positionTag], - ['direction', positionTag], - ['indent', positionTag], - ]; - for (var item of blocks) { - var firstItem = item[0]!; - if (attrs[firstItem]) { - const customTag = this.getCustomTag(firstItem); - return customTag - ? [customTag] - : firstItem === 'header' - ? ['h' + attrs[firstItem]] - : [arr.preferSecond(item)!]; - } - } - - if (this.op.isCustomTextBlock()) { - const customTag = this.getCustomTag('renderAsBlock'); - return customTag ? [customTag] : [positionTag]; - } - - // inlines - const customTagsMap = Object.keys(attrs).reduce((res, it) => { - const customTag = this.getCustomTag(it); - if (customTag) { - res[it] = customTag; - } - return res; - }, {} as any); - - const inlineTags = [ - ['link', 'a'], - ['mentions', 'a'], - ['script'], - ['bold', 'strong'], - ['italic', 'em'], - ['strike', 's'], - ['underline', 'u'], - ['code'], - ]; - - return [ - ...inlineTags.filter((item: string[]) => !!attrs[item[0]]), - ...Object.keys(customTagsMap) - .filter((t) => !inlineTags.some((it) => it[0] == t)) - .map((t) => [t, customTagsMap[t]]), - ].map((item) => { - return customTagsMap[item[0]] - ? customTagsMap[item[0]] - : item[0] === 'script' - ? attrs[item[0]] === ScriptType.Sub - ? 'sub' - : 'sup' - : arr.preferSecond(item)!; - }); - } -} - -export { OpToHtmlConverter, IOpToHtmlConverterOptions, IHtmlParts }; diff --git a/src/QuillDeltaToHtmlConverter.ts b/src/QuillDeltaToHtmlConverter.ts deleted file mode 100644 index f157d56..0000000 --- a/src/QuillDeltaToHtmlConverter.ts +++ /dev/null @@ -1,347 +0,0 @@ -import { InsertOpsConverter } from './InsertOpsConverter'; -import { - OpToHtmlConverter, - IOpToHtmlConverterOptions, - IInlineStyles, -} from './OpToHtmlConverter'; -import { DeltaInsertOp } from './DeltaInsertOp'; -import { Grouper } from './grouper/Grouper'; -import { - VideoItem, - InlineGroup, - BlockGroup, - ListGroup, - ListItem, - TDataGroup, - BlotBlock, - TableGroup, - TableRow, - TableCell, -} from './grouper/group-types'; -import { ListNester } from './grouper/ListNester'; -import { makeStartTag, makeEndTag, encodeHtml } from './funcs-html'; -import * as obj from './helpers/object'; -import { GroupType } from './value-types'; -import { IOpAttributeSanitizerOptions } from './OpAttributeSanitizer'; -import { TableGrouper } from './grouper/TableGrouper'; - -interface IQuillDeltaToHtmlConverterOptions - extends IOpAttributeSanitizerOptions, - IOpToHtmlConverterOptions { - orderedListTag?: string; - bulletListTag?: string; - - multiLineBlockquote?: boolean; - multiLineHeader?: boolean; - multiLineCodeblock?: boolean; - multiLineParagraph?: boolean; - multiLineCustomBlock?: boolean; -} - -const BrTag = '
'; - -class QuillDeltaToHtmlConverter { - private options: IQuillDeltaToHtmlConverterOptions; - private rawDeltaOps: any[] = []; - private converterOptions: IOpToHtmlConverterOptions; - - // render callbacks - private callbacks: any = {}; - - constructor(deltaOps: any[], options?: IQuillDeltaToHtmlConverterOptions) { - this.options = obj.assign( - { - paragraphTag: 'p', - encodeHtml: true, - classPrefix: 'ql', - inlineStyles: false, - multiLineBlockquote: true, - multiLineHeader: true, - multiLineCodeblock: true, - multiLineParagraph: true, - multiLineCustomBlock: true, - allowBackgroundClasses: false, - linkTarget: '_blank', - }, - options, - { - orderedListTag: 'ol', - bulletListTag: 'ul', - listItemTag: 'li', - } - ); - - var inlineStyles: IInlineStyles | undefined; - if (!this.options.inlineStyles) { - inlineStyles = undefined; - } else if (typeof this.options.inlineStyles === 'object') { - inlineStyles = this.options.inlineStyles; - } else { - inlineStyles = {}; - } - - this.converterOptions = { - encodeHtml: this.options.encodeHtml, - classPrefix: this.options.classPrefix, - inlineStyles: inlineStyles, - listItemTag: this.options.listItemTag, - paragraphTag: this.options.paragraphTag, - linkRel: this.options.linkRel, - linkTarget: this.options.linkTarget, - allowBackgroundClasses: this.options.allowBackgroundClasses, - customTag: this.options.customTag, - customTagAttributes: this.options.customTagAttributes, - customCssClasses: this.options.customCssClasses, - customCssStyles: this.options.customCssStyles, - }; - this.rawDeltaOps = deltaOps; - } - - _getListTag(op: DeltaInsertOp): string { - return op.isOrderedList() - ? this.options.orderedListTag + '' - : op.isBulletList() - ? this.options.bulletListTag + '' - : op.isCheckedList() - ? this.options.bulletListTag + '' - : op.isUncheckedList() - ? this.options.bulletListTag + '' - : ''; - } - - getGroupedOps(): TDataGroup[] { - var deltaOps = InsertOpsConverter.convert(this.rawDeltaOps, this.options); - - var pairedOps = Grouper.pairOpsWithTheirBlock(deltaOps); - - var groupedSameStyleBlocks = Grouper.groupConsecutiveSameStyleBlocks( - pairedOps, - { - blockquotes: !!this.options.multiLineBlockquote, - header: !!this.options.multiLineHeader, - codeBlocks: !!this.options.multiLineCodeblock, - customBlocks: !!this.options.multiLineCustomBlock, - } - ); - - var groupedOps = Grouper.reduceConsecutiveSameStyleBlocksToOne( - groupedSameStyleBlocks - ); - - var tableGrouper = new TableGrouper(); - groupedOps = tableGrouper.group(groupedOps); - - var listNester = new ListNester(); - return listNester.nest(groupedOps); - } - - convert() { - let groups = this.getGroupedOps(); - return groups - .map((group) => { - if (group instanceof ListGroup) { - return this._renderWithCallbacks(GroupType.List, group, () => - this._renderList(group) - ); - } else if (group instanceof TableGroup) { - return this._renderWithCallbacks(GroupType.Table, group, () => - this._renderTable(group) - ); - } else if (group instanceof BlockGroup) { - var g = group; - - return this._renderWithCallbacks(GroupType.Block, group, () => - this._renderBlock(g.op, g.ops) - ); - } else if (group instanceof BlotBlock) { - return this._renderCustom(group.op, null); - } else if (group instanceof VideoItem) { - return this._renderWithCallbacks(GroupType.Video, group, () => { - var g = group; - var converter = new OpToHtmlConverter(g.op, this.converterOptions); - return converter.getHtml(); - }); - } else { - // InlineGroup - return this._renderWithCallbacks(GroupType.InlineGroup, group, () => { - return this._renderInlines((group).ops, true); - }); - } - }) - .join(''); - } - - _renderWithCallbacks( - groupType: GroupType, - group: TDataGroup, - myRenderFn: () => string - ) { - var html = ''; - var beforeCb = this.callbacks['beforeRender_cb']; - html = - typeof beforeCb === 'function' - ? beforeCb.apply(null, [groupType, group]) - : ''; - - if (!html) { - html = myRenderFn(); - } - - var afterCb = this.callbacks['afterRender_cb']; - html = - typeof afterCb === 'function' - ? afterCb.apply(null, [groupType, html]) - : html; - - return html; - } - - _renderList(list: ListGroup): string { - var firstItem = list.items[0]; - return ( - makeStartTag(this._getListTag(firstItem.item.op)) + - list.items.map((li: ListItem) => this._renderListItem(li)).join('') + - makeEndTag(this._getListTag(firstItem.item.op)) - ); - } - - _renderListItem(li: ListItem): string { - //if (!isOuterMost) { - li.item.op.attributes.indent = 0; - //} - var converter = new OpToHtmlConverter(li.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var liElementsHtml = this._renderInlines(li.item.ops, false); - return ( - parts.openingTag + - liElementsHtml + - (li.innerList ? this._renderList(li.innerList) : '') + - parts.closingTag - ); - } - - _renderTable(table: TableGroup): string { - return ( - makeStartTag('table') + - makeStartTag('tbody') + - table.rows.map((row: TableRow) => this._renderTableRow(row)).join('') + - makeEndTag('tbody') + - makeEndTag('table') - ); - } - - _renderTableRow(row: TableRow): string { - return ( - makeStartTag('tr') + - row.cells.map((cell: TableCell) => this._renderTableCell(cell)).join('') + - makeEndTag('tr') - ); - } - - _renderTableCell(cell: TableCell): string { - var converter = new OpToHtmlConverter(cell.item.op, this.converterOptions); - var parts = converter.getHtmlParts(); - var cellElementsHtml = this._renderInlines(cell.item.ops, false); - return ( - makeStartTag('td', { - key: 'data-row', - value: cell.item.op.attributes.table, - }) + - parts.openingTag + - cellElementsHtml + - parts.closingTag + - makeEndTag('td') - ); - } - - _renderBlock(bop: DeltaInsertOp, ops: DeltaInsertOp[]) { - var converter = new OpToHtmlConverter(bop, this.converterOptions); - var htmlParts = converter.getHtmlParts(); - - if (bop.isCodeBlock()) { - return ( - htmlParts.openingTag + - encodeHtml( - ops - .map((iop) => - iop.isCustomEmbed() - ? this._renderCustom(iop, bop) - : iop.insert.value - ) - .join('') - ) + - htmlParts.closingTag - ); - } - - var inlines = ops.map((op) => this._renderInline(op, bop)).join(''); - return htmlParts.openingTag + (inlines || BrTag) + htmlParts.closingTag; - } - - _renderInlines(ops: DeltaInsertOp[], isInlineGroup = true) { - var opsLen = ops.length - 1; - var html = ops - .map((op: DeltaInsertOp, i: number) => { - if (i > 0 && i === opsLen && op.isJustNewline()) { - return ''; - } - return this._renderInline(op, null); - }) - .join(''); - if (!isInlineGroup) { - return html; - } - - let startParaTag = makeStartTag(this.options.paragraphTag); - let endParaTag = makeEndTag(this.options.paragraphTag); - if (html === BrTag || this.options.multiLineParagraph) { - return startParaTag + html + endParaTag; - } - return ( - startParaTag + - html - .split(BrTag) - .map((v) => { - return v === '' ? BrTag : v; - }) - .join(endParaTag + startParaTag) + - endParaTag - ); - } - - _renderInline(op: DeltaInsertOp, contextOp: DeltaInsertOp | null) { - if (op.isCustomEmbed()) { - return this._renderCustom(op, contextOp); - } - var converter = new OpToHtmlConverter(op, this.converterOptions); - return converter.getHtml().replace(/\n/g, BrTag); - } - - _renderCustom(op: DeltaInsertOp, contextOp: DeltaInsertOp | null) { - var renderCb = this.callbacks['renderCustomOp_cb']; - if (typeof renderCb === 'function') { - return renderCb.apply(null, [op, contextOp]); - } - return ''; - } - - beforeRender(cb: (group: GroupType, data: TDataGroup) => string) { - if (typeof cb === 'function') { - this.callbacks['beforeRender_cb'] = cb; - } - } - - afterRender(cb: (group: GroupType, html: string) => string) { - if (typeof cb === 'function') { - this.callbacks['afterRender_cb'] = cb; - } - } - - renderCustomWith( - cb: (op: DeltaInsertOp, contextOp: DeltaInsertOp) => string - ) { - this.callbacks['renderCustomOp_cb'] = cb; - } -} - -export { QuillDeltaToHtmlConverter }; diff --git a/src/convert-insert-value.ts b/src/convert-insert-value.ts new file mode 100644 index 0000000..c564153 --- /dev/null +++ b/src/convert-insert-value.ts @@ -0,0 +1,46 @@ +import type { OpAttributeSanitizerOptions } from './OpAttributeSanitizer.js'; +import { InsertData, InsertDataCustom, InsertDataQuill } from './InsertData.js'; +import { DataType } from './value-types.js'; + +const isNonNullObject = (obj: unknown): obj is Record => + !!obj && typeof obj === 'object'; + +export type DeltaInsertOpType = { + insert: string | Record; + attributes?: Record | null; +}; + +// A basic structural check. +export const isDeltaInsertOp = (op: unknown): op is DeltaInsertOpType => + !!op && + typeof op === 'object' && + (typeof (op as DeltaInsertOpType).insert === 'string' || + isNonNullObject((op as DeltaInsertOpType).insert)) && + (!(op as DeltaInsertOpType).attributes || + typeof (op as DeltaInsertOpType).attributes === 'object'); + +export const convertInsertValue = ( + insert: string | Record, + sanitizeOptions: OpAttributeSanitizerOptions, +): InsertData | null => { + if (typeof insert === 'string') { + return new InsertDataQuill(DataType.Text, insert); + } + + return DataType.Image in insert + ? new InsertDataQuill( + DataType.Image, + sanitizeOptions.urlSanitizer(insert[DataType.Image] as string), + ) + : DataType.Video in insert + ? new InsertDataQuill( + DataType.Video, + sanitizeOptions.urlSanitizer(insert[DataType.Video] as string), + ) + : DataType.Formula in insert + ? new InsertDataQuill( + DataType.Formula, + insert[DataType.Formula] as string, + ) + : new InsertDataCustom(insert); +}; diff --git a/src/denormalize.ts b/src/denormalize.ts new file mode 100644 index 0000000..432118b --- /dev/null +++ b/src/denormalize.ts @@ -0,0 +1,71 @@ +import type { DeltaInsertOpType } from './convert-insert-value.js'; + +/** + * Splits by new line character ("\n") by putting new line characters into the + * array as well. Ex: "hello\n\nworld\n " => ["hello", "\n", "\n", "world", "\n", " "] + */ +export function tokenizeWithNewLines(str: string): string[] { + if (str === '\n') { + return [str]; + } + + const lines = str.split('\n'); + + if (lines.length === 1) { + return lines; + } + + const lastIndex = lines.length - 1; + + return lines.reduce((pv, line, ind) => { + if (ind !== lastIndex) { + if (line !== '') { + pv = pv.concat(line, '\n'); + } else { + pv.push('\n'); + } + } else if (line !== '') { + pv.push(line); + } + return pv; + }, []); +} + +/** + * Split a text insert operation that has new lines into multiple ops where + * each op is either a new line or a text containing no new lines. + * + * Why? It makes things easier when picking op that needs to be inside a block when + * rendering to html + * + * Example: + * {insert: 'hello\n\nhow are you?\n', attributes: {bold: true}} + * + * Denormalized: + * [ + * {insert: 'hello', attributes: {bold: true}}, + * {insert: '\n', attributes: {bold: true}}, + * {insert: '\n', attributes: {bold: true}}, + * {insert: 'how are you?', attributes: {bold: true}}, + * {insert: '\n', attributes: {bold: true}} + * ] + */ +export const denormalizeInsertOp = ( + op: DeltaInsertOpType, +): DeltaInsertOpType[] => { + if (typeof op.insert === 'object' || op.insert === '\n') { + return [op]; + } + + const tokenized = tokenizeWithNewLines(op.insert); + + if (tokenized.length === 1) { + return [op]; + } + + const nlObj: DeltaInsertOpType = { ...op, insert: '\n' }; + + return tokenized.map((line) => + line === '\n' ? nlObj : { ...op, insert: line }, + ); +}; diff --git a/src/funcs-html.ts b/src/funcs-html.ts deleted file mode 100644 index 0967d7a..0000000 --- a/src/funcs-html.ts +++ /dev/null @@ -1,90 +0,0 @@ -interface ITagKeyValue { - key: string; - value?: string; -} - -enum EncodeTarget { - Html = 0, - Url = 1, -} - -function makeStartTag( - tag: any, - attrs: ITagKeyValue | ITagKeyValue[] | undefined = undefined -) { - if (!tag) { - return ''; - } - - var attrsStr = ''; - if (attrs) { - var arrAttrs = ([] as ITagKeyValue[]).concat(attrs); - attrsStr = arrAttrs - .map(function (attr: any) { - return attr.key + (attr.value ? '="' + attr.value + '"' : ''); - }) - .join(' '); - } - - var closing = '>'; - if (tag === 'img' || tag === 'br') { - closing = '/>'; - } - return attrsStr ? `<${tag} ${attrsStr}${closing}` : `<${tag}${closing}`; -} - -function makeEndTag(tag: any = '') { - return (tag && ``) || ''; -} - -function decodeHtml(str: string) { - return encodeMappings(EncodeTarget.Html).reduce(decodeMapping, str); -} - -function encodeHtml(str: string, preventDoubleEncoding = true) { - if (preventDoubleEncoding) { - str = decodeHtml(str); - } - return encodeMappings(EncodeTarget.Html).reduce(encodeMapping, str); -} - -function encodeLink(str: string) { - let linkMaps = encodeMappings(EncodeTarget.Url); - let decoded = linkMaps.reduce(decodeMapping, str); - return linkMaps.reduce(encodeMapping, decoded); -} - -function encodeMappings(mtype: EncodeTarget) { - let maps = [ - ['&', '&'], - ['<', '<'], - ['>', '>'], - ['"', '"'], - ["'", '''], - ['\\/', '/'], - ['\\(', '('], - ['\\)', ')'], - ]; - if (mtype === EncodeTarget.Html) { - return maps.filter( - ([v, _]) => v.indexOf('(') === -1 && v.indexOf(')') === -1 - ); - } else { - // for url - return maps.filter(([v, _]) => v.indexOf('/') === -1); - } -} -function encodeMapping(str: string, mapping: string[]) { - return str.replace(new RegExp(mapping[0], 'g'), mapping[1]); -} -function decodeMapping(str: string, mapping: string[]) { - return str.replace(new RegExp(mapping[1], 'g'), mapping[0].replace('\\', '')); -} -export { - makeStartTag, - makeEndTag, - encodeHtml, - decodeHtml, - encodeLink, - ITagKeyValue, -}; diff --git a/src/grouper/Grouper.ts b/src/grouper/Grouper.ts deleted file mode 100644 index 755ce85..0000000 --- a/src/grouper/Grouper.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { DeltaInsertOp } from './../DeltaInsertOp'; -import { - IArraySlice, - flatten, - groupConsecutiveElementsWhile, - sliceFromReverseWhile, -} from './../helpers/array'; -import { - VideoItem, - InlineGroup, - BlockGroup, - TDataGroup, - BlotBlock, -} from './group-types'; - -class Grouper { - static pairOpsWithTheirBlock(ops: DeltaInsertOp[]): TDataGroup[] { - let result: TDataGroup[] = []; - - const canBeInBlock = (op: DeltaInsertOp) => { - return !( - op.isJustNewline() || - op.isCustomEmbedBlock() || - op.isVideo() || - op.isContainerBlock() - ); - }; - const isInlineData = (op: DeltaInsertOp) => op.isInline(); - - let lastInd = ops.length - 1; - let opsSlice: IArraySlice; - - for (var i = lastInd; i >= 0; i--) { - let op = ops[i]; - - if (op.isVideo()) { - result.push(new VideoItem(op)); - } else if (op.isCustomEmbedBlock()) { - result.push(new BlotBlock(op)); - } else if (op.isContainerBlock()) { - opsSlice = sliceFromReverseWhile(ops, i - 1, canBeInBlock); - - result.push(new BlockGroup(op, opsSlice.elements)); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } else { - opsSlice = sliceFromReverseWhile(ops, i - 1, isInlineData); - result.push(new InlineGroup(opsSlice.elements.concat(op))); - i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; - } - } - result.reverse(); - return result; - } - - static groupConsecutiveSameStyleBlocks( - groups: TDataGroup[], - blocksOf = { - header: true, - codeBlocks: true, - blockquotes: true, - customBlocks: true, - } - ): Array { - return groupConsecutiveElementsWhile( - groups, - (g: TDataGroup, gPrev: TDataGroup) => { - if (!(g instanceof BlockGroup) || !(gPrev instanceof BlockGroup)) { - return false; - } - - return ( - (blocksOf.codeBlocks && - Grouper.areBothCodeblocksWithSameLang(g, gPrev)) || - (blocksOf.blockquotes && - Grouper.areBothBlockquotesWithSameAdi(g, gPrev)) || - (blocksOf.header && - Grouper.areBothSameHeadersWithSameAdi(g, gPrev)) || - (blocksOf.customBlocks && - Grouper.areBothCustomBlockWithSameAttr(g, gPrev)) - ); - } - ); - } - - // Moves all ops of same style consecutive blocks to the ops of first block - // and discards the rest. - static reduceConsecutiveSameStyleBlocksToOne( - groups: Array - ): TDataGroup[] { - var newLineOp = DeltaInsertOp.createNewLineOp(); - return groups.map(function (elm: TDataGroup | BlockGroup[]) { - if (!Array.isArray(elm)) { - if (elm instanceof BlockGroup && !elm.ops.length) { - elm.ops.push(newLineOp); - } - return elm; - } - var groupsLastInd = elm.length - 1; - elm[0].ops = flatten( - elm.map((g: BlockGroup, i: number) => { - if (!g.ops.length) { - return [newLineOp]; - } - return g.ops.concat(i < groupsLastInd ? [newLineOp] : []); - }) - ); - return elm[0]; - }); - } - - static areBothCodeblocksWithSameLang(g1: BlockGroup, gOther: BlockGroup) { - return ( - g1.op.isCodeBlock() && - gOther.op.isCodeBlock() && - g1.op.hasSameLangAs(gOther.op) - ); - } - - static areBothSameHeadersWithSameAdi(g1: BlockGroup, gOther: BlockGroup) { - return g1.op.isSameHeaderAs(gOther.op) && g1.op.hasSameAdiAs(gOther.op); - } - - static areBothBlockquotesWithSameAdi(g: BlockGroup, gOther: BlockGroup) { - return ( - g.op.isBlockquote() && - gOther.op.isBlockquote() && - g.op.hasSameAdiAs(gOther.op) - ); - } - - static areBothCustomBlockWithSameAttr(g: BlockGroup, gOther: BlockGroup) { - return ( - g.op.isCustomTextBlock() && - gOther.op.isCustomTextBlock() && - g.op.hasSameAttr(gOther.op) - ); - } -} - -export { Grouper }; diff --git a/src/grouper/ListNester.ts b/src/grouper/ListNester.ts deleted file mode 100644 index 26c2634..0000000 --- a/src/grouper/ListNester.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { ListGroup, ListItem, BlockGroup, TDataGroup } from './group-types'; -import { flatten, groupConsecutiveElementsWhile } from './../helpers/array'; - -class ListNester { - nest(groups: TDataGroup[]): TDataGroup[] { - var listBlocked = this.convertListBlocksToListGroups(groups); - var groupedByListGroups = this.groupConsecutiveListGroups(listBlocked); - - // convert grouped ones into listgroup - var nested = flatten( - groupedByListGroups.map((group: TDataGroup) => { - if (!Array.isArray(group)) { - return group; - } - return this.nestListSection(group); - }) - ); - - var groupRootLists = groupConsecutiveElementsWhile( - nested, - (curr: TDataGroup, prev: TDataGroup) => { - if (!(curr instanceof ListGroup && prev instanceof ListGroup)) { - return false; - } - - return curr.items[0].item.op.isSameListAs(prev.items[0].item.op); - } - ); - return groupRootLists.map((v: TDataGroup | ListGroup[]) => { - if (!Array.isArray(v)) { - return v; - } - var litems = v.map((g: ListGroup): ListItem[] => g.items); - return new ListGroup(flatten(litems)); - }); - } - - private convertListBlocksToListGroups( - items: TDataGroup[] - ): Array { - var grouped = groupConsecutiveElementsWhile( - items, - (g: TDataGroup, gPrev: TDataGroup) => { - return ( - g instanceof BlockGroup && - gPrev instanceof BlockGroup && - g.op.isList() && - gPrev.op.isList() && - g.op.isSameListAs(gPrev.op) && - g.op.hasSameIndentationAs(gPrev.op) - ); - } - ); - - return grouped.map((item: TDataGroup | BlockGroup[]) => { - if (!Array.isArray(item)) { - if (item instanceof BlockGroup && item.op.isList()) { - return new ListGroup([new ListItem(item)]); - } - return item; - } - return new ListGroup(item.map((g) => new ListItem(g))); - }); - } - - private groupConsecutiveListGroups( - items: TDataGroup[] - ): Array { - return groupConsecutiveElementsWhile( - items, - (curr: TDataGroup, prev: TDataGroup) => { - return curr instanceof ListGroup && prev instanceof ListGroup; - } - ); - } - - private nestListSection(sectionItems: ListGroup[]): ListGroup[] { - var indentGroups = this.groupByIndent(sectionItems); - - Object.keys(indentGroups) - .map(Number) - .sort() - .reverse() - .forEach((indent) => { - indentGroups[indent].forEach((lg: ListGroup) => { - var idx = sectionItems.indexOf(lg); - if (this.placeUnderParent(lg, sectionItems.slice(0, idx))) { - sectionItems.splice(idx, 1); - } - }); - }); - return sectionItems; - } - - private groupByIndent(items: ListGroup[]): { [index: number]: ListGroup[] } { - return items.reduce( - (pv: { [index: number]: ListGroup[] }, cv: ListGroup) => { - var indent = cv.items[0].item.op.attributes.indent; - if (indent) { - pv[indent] = pv[indent] || []; - pv[indent].push(cv); - } - return pv; - }, - {} - ); - } - - private placeUnderParent(target: ListGroup, items: ListGroup[]) { - for (var i = items.length - 1; i >= 0; i--) { - var elm = items[i]; - if (target.items[0].item.op.hasHigherIndentThan(elm.items[0].item.op)) { - var parent = elm.items[elm.items.length - 1]; - if (parent.innerList) { - parent.innerList.items = parent.innerList.items.concat(target.items); - } else { - parent.innerList = target; - } - return true; - } - } - return false; - } -} - -export { ListNester }; diff --git a/src/grouper/TableGrouper.ts b/src/grouper/TableGrouper.ts deleted file mode 100644 index 9eddc0f..0000000 --- a/src/grouper/TableGrouper.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - TDataGroup, - TableGroup, - BlockGroup, - TableRow, - TableCell, -} from './group-types'; -import { groupConsecutiveElementsWhile } from '../helpers/array'; - -export class TableGrouper { - group(groups: TDataGroup[]): TDataGroup[] { - var tableBlocked = this.convertTableBlocksToTableGroups(groups); - return tableBlocked; - } - - private convertTableBlocksToTableGroups( - items: TDataGroup[] - ): Array { - var grouped = groupConsecutiveElementsWhile( - items, - (g: TDataGroup, gPrev: TDataGroup) => { - return ( - g instanceof BlockGroup && - gPrev instanceof BlockGroup && - g.op.isTable() && - gPrev.op.isTable() - ); - } - ); - - return grouped.map((item: TDataGroup | BlockGroup[]) => { - if (!Array.isArray(item)) { - if (item instanceof BlockGroup && item.op.isTable()) { - return new TableGroup([new TableRow([new TableCell(item)])]); - } - return item; - } - return new TableGroup(this.convertTableBlocksToTableRows(item)); - }); - } - - private convertTableBlocksToTableRows(items: TDataGroup[]): TableRow[] { - var grouped = groupConsecutiveElementsWhile( - items, - (g: TDataGroup, gPrev: TDataGroup) => { - return ( - g instanceof BlockGroup && - gPrev instanceof BlockGroup && - g.op.isTable() && - gPrev.op.isTable() && - g.op.isSameTableRowAs(gPrev.op) - ); - } - ); - return grouped.map((item: BlockGroup | BlockGroup[]) => { - return new TableRow( - Array.isArray(item) - ? item.map((it) => new TableCell(it)) - : [new TableCell(item)] - ); - }); - } -} diff --git a/src/grouper/group-tables.ts b/src/grouper/group-tables.ts new file mode 100644 index 0000000..e1ec464 --- /dev/null +++ b/src/grouper/group-tables.ts @@ -0,0 +1,39 @@ +import { + BlockGroup, + TableCell, + TableGroup, + TableRow, + TDataGroup, +} from './group-types.js'; +import { + groupConsecutiveSatisfyingClassElementsWhile, + groupConsecutiveElementsWhile, +} from '../helpers/array.js'; + +const convertTableBlocksToTableRows = (items: BlockGroup[]): TableRow[] => + groupConsecutiveElementsWhile( + items, + (g, gPrev) => g.op.attributes.table === gPrev.op.attributes.table, + ).map( + (item) => + new TableRow( + Array.isArray(item) + ? item.map((it) => new TableCell(it)) + : [new TableCell(item)], + ), + ); + +export const groupTables = (groups: TDataGroup[]): TDataGroup[] => + groupConsecutiveSatisfyingClassElementsWhile( + groups, + BlockGroup, + (g, gPrev) => g.op.isTable() && gPrev.op.isTable(), + ).map((item) => { + if (Array.isArray(item)) { + return new TableGroup(convertTableBlocksToTableRows(item)); + } + if (item instanceof BlockGroup && item.op.isTable()) { + return new TableGroup([new TableRow([new TableCell(item)])]); + } + return item; + }); diff --git a/src/grouper/group-types.ts b/src/grouper/group-types.ts index 9dda402..3ae2d35 100644 --- a/src/grouper/group-types.ts +++ b/src/grouper/group-types.ts @@ -1,86 +1,55 @@ -import { DeltaInsertOp } from './../DeltaInsertOp'; +import { DeltaInsertOp } from './../DeltaInsertOp.js'; +import { InsertDataCustom, InsertDataQuill } from '../InsertData.js'; -class InlineGroup { - readonly ops: DeltaInsertOp[]; - constructor(ops: DeltaInsertOp[]) { - this.ops = ops; - } +export class InlineGroup { + constructor(readonly ops: DeltaInsertOp[]) {} } -class SingleItem { - readonly op: DeltaInsertOp; - constructor(op: DeltaInsertOp) { - this.op = op; - } +export class VideoItem { + constructor(readonly op: DeltaInsertOp) {} } -class VideoItem extends SingleItem {} -class BlotBlock extends SingleItem {} -class BlockGroup { - readonly op: DeltaInsertOp; - ops: DeltaInsertOp[]; - constructor(op: DeltaInsertOp, ops: DeltaInsertOp[]) { - this.op = op; - this.ops = ops; - } +export class BlotBlock { + constructor(readonly op: DeltaInsertOp) {} } -class ListGroup { - items: ListItem[]; - constructor(items: ListItem[]) { - this.items = items; - } +export class BlockGroup { + constructor( + readonly op: DeltaInsertOp, + readonly ops: DeltaInsertOp[], + ) {} } -class ListItem { - readonly item: BlockGroup; - innerList: ListGroup | null; - constructor(item: BlockGroup, innerList: ListGroup | null = null) { - this.item = item; - this.innerList = innerList; - } +export class ListGroup { + constructor(readonly items: ListItem[]) {} } -class TableGroup { - rows: TableRow[]; - constructor(rows: TableRow[]) { - this.rows = rows; - } +export class ListItem { + constructor( + readonly item: BlockGroup, + readonly innerList: ListGroup | null = null, + ) {} } -class TableRow { - cells: TableCell[]; - constructor(cells: TableCell[]) { - this.cells = cells; - } +export class TableGroup { + constructor(readonly rows: TableRow[]) {} } -class TableCell { - readonly item: BlockGroup; - constructor(item: BlockGroup) { - this.item = item; - } +export class TableRow { + constructor(readonly cells: TableCell[]) {} } -type TDataGroup = +export class TableCell { + constructor(readonly item: BlockGroup) {} +} + +export type TDataGroup = | VideoItem | InlineGroup | BlockGroup + | BlotBlock | ListItem | ListGroup | TableGroup | TableRow | TableCell; - -export { - VideoItem, - BlotBlock, - InlineGroup, - BlockGroup, - ListGroup, - ListItem, - TableGroup, - TableRow, - TableCell, - TDataGroup, -}; diff --git a/src/grouper/grouping.ts b/src/grouper/grouping.ts new file mode 100644 index 0000000..f8bed90 --- /dev/null +++ b/src/grouper/grouping.ts @@ -0,0 +1,87 @@ +import { DeltaInsertOp } from './../DeltaInsertOp.js'; +import { + ArraySlice, + groupConsecutiveSatisfyingClassElementsWhile, + sliceFromReverseWhile, +} from './../helpers/array.js'; +import { + BlockGroup, + BlotBlock, + InlineGroup, + TDataGroup, + VideoItem, +} from './group-types.js'; +import { InsertDataQuill } from '../InsertData.js'; +import { DataType } from '../value-types.js'; + +export const pairOpsWithTheirBlock = (ops: DeltaInsertOp[]): TDataGroup[] => { + const result: TDataGroup[] = []; + + const lastInd = ops.length - 1; + let opsSlice: ArraySlice; + + for (let i = lastInd; i >= 0; i--) { + const op = ops[i]; + + if (op.isVideo()) { + result.push(new VideoItem(op)); + } else if (op.isCustomEmbedBlock()) { + result.push(new BlotBlock(op)); + } else if (op.isContainerBlock()) { + opsSlice = sliceFromReverseWhile( + ops, + i - 1, + (op) => + !op.isJustNewline() && + !op.isCustomEmbedBlock() && + !op.isVideo() && + !op.isContainerBlock(), + ); + + result.push(new BlockGroup(op, opsSlice.elements)); + i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; + } else { + opsSlice = sliceFromReverseWhile( + ops, + i - 1, + (op) => + !op.isContainerBlock() && + !op.isJustNewline() && + (op.insert instanceof InsertDataQuill + ? op.insert.type !== DataType.Video + : !op.attributes.renderAsBlock), + ); + result.push(new InlineGroup(opsSlice.elements.concat(op))); + i = opsSlice.sliceStartsAt > -1 ? opsSlice.sliceStartsAt : i; + } + } + + return result.toReversed(); +}; + +export const groupConsecutiveSameStyleBlocks = ( + groups: TDataGroup[], + options: { + multiLineBlockquote: boolean; + multiLineCodeBlock: boolean; + multiLineHeader: boolean; + }, +): Array => + groupConsecutiveSatisfyingClassElementsWhile( + groups, + BlockGroup, + (g, gPrev) => + ((options.multiLineBlockquote && areBothBlockquotes(g, gPrev)) || + (options.multiLineCodeBlock && areBothCodeBlocks(g, gPrev)) || + (options.multiLineHeader && areBothHeaders(g, gPrev))) && + g.op.hasSameAttr(gPrev.op), + ); + +const areBothBlockquotes = (g: BlockGroup, gOther: BlockGroup) => + g.op.isBlockquote() && gOther.op.isBlockquote(); + +const areBothCodeBlocks = (g: BlockGroup, gOther: BlockGroup) => + g.op.isCodeBlock() && gOther.op.isCodeBlock(); + +const areBothHeaders = (g: BlockGroup, gOther: BlockGroup) => + g.op.isHeader() && gOther.op.isHeader(); diff --git a/src/grouper/nest-lists.ts b/src/grouper/nest-lists.ts new file mode 100644 index 0000000..d2356b1 --- /dev/null +++ b/src/grouper/nest-lists.ts @@ -0,0 +1,100 @@ +import { BlockGroup, ListGroup, ListItem, TDataGroup } from './group-types.js'; +import { groupConsecutiveSatisfyingClassElementsWhile } from './../helpers/array.js'; + +const convertListBlocksToListGroups = (items: TDataGroup[]): TDataGroup[] => + groupConsecutiveSatisfyingClassElementsWhile( + items, + BlockGroup, + (g, gPrev) => + g.op.isList() && + gPrev.op.isList() && + g.op.isSameListAs(gPrev.op) && + g.op.hasSameIndentationAs(gPrev.op), + ).map((item) => { + if (Array.isArray(item)) { + return new ListGroup(item.map((g) => new ListItem(g))); + } + if (item instanceof BlockGroup && item.op.isList()) { + return new ListGroup([new ListItem(item)]); + } + return item; + }); + +export const nestLists = (groups: TDataGroup[]): TDataGroup[] => { + const listBlocked = convertListBlocksToListGroups(groups); + + const nested = groupConsecutiveSatisfyingClassElementsWhile( + listBlocked, + ListGroup, + ).flatMap((group) => { + if (!Array.isArray(group)) { + return group; + } + + const indentGroups: Map = new Map(); + for (const cv of group) { + const indent = cv.items[0].item.op.attributes.indent; + if (indent) { + const currentArray = indentGroups.get(indent); + if (currentArray) { + currentArray.push(cv); + } else { + indentGroups.set(indent, [cv]); + } + } + } + + Array.from(indentGroups.entries()) + .sort(([a], [b]) => b - a) + .forEach(([indent, listGroups]) => { + listGroups.forEach((groupToMove) => { + const groupToMoveGroupIdx = group.indexOf(groupToMove); + for (let i = groupToMoveGroupIdx - 1; i >= 0; --i) { + const destinationGroup = group[i]; + const destinationGroupIndent = + destinationGroup.items[0].item.op.attributes.indent ?? 0; + if (indent > destinationGroupIndent) { + const parent = + destinationGroup.items[destinationGroup.items.length - 1]; + const newListItem = new ListItem( + parent.item, + parent.innerList + ? new ListGroup( + parent.innerList.items.concat(groupToMove.items), + ) + : groupToMove, + ); + group[i] = new ListGroup( + destinationGroup.items.with( + destinationGroup.items.length - 1, + newListItem, + ), + ); + const ig = indentGroups.get(destinationGroupIndent); + if (ig) { + const idx = ig.indexOf(destinationGroup); + if (idx > -1) { + ig[idx] = group[i]; + } + } + group.splice(groupToMoveGroupIdx, 1); + break; + } + } + }); + }); + + return group; + }); + + return groupConsecutiveSatisfyingClassElementsWhile( + nested, + ListGroup, + (curr, prev) => curr.items[0].item.op.isSameListAs(prev.items[0].item.op), + ).map((v) => { + if (Array.isArray(v)) { + return new ListGroup(v.flatMap((g) => g.items)); + } + return v; + }); +}; diff --git a/src/helpers/array.ts b/src/helpers/array.ts index 10b6b96..a0d98a9 100644 --- a/src/helpers/array.ts +++ b/src/helpers/array.ts @@ -1,73 +1,86 @@ -interface IArraySlice { +export type ArraySlice = { sliceStartsAt: number; - elements: any[]; -} - -function preferSecond(arr: any[]): any { - if (arr.length === 0) { - return null; - } - return arr.length >= 2 ? arr[1] : arr[0]; -} - -function flatten(arr: any[]): any[] { - return arr.reduce((pv: any[], v: any) => { - return pv.concat(Array.isArray(v) ? flatten(v) : v); - }, []); -} + elements: T[]; +}; -function find(arr: any[], predicate: (currElm: any) => boolean) { - if (Array.prototype.find) { - return Array.prototype.find.call(arr, predicate); - } +/** + * Returns a new array by putting consecutive elements that are instances of classType and satisfying + * predicate (if provided) into a new array and returning others as they are. + * Ex: [1, "ha", 3, "ha", "ha"] => [1, "ha", 3, ["ha", "ha"]] + * where predicate: (v, vprev) => typeof v === typeof vPrev + */ +export const groupConsecutiveSatisfyingClassElementsWhile = ( + arr: T[], + classType: new (...args: never[]) => GroupT, + predicate?: (currElm: GroupT, prevElm: GroupT) => boolean, +): Array => { + const groups: Array = []; - for (var i = 0; i < arr.length; i++) { - if (predicate(arr[i])) return arr[i]; + for (let i = 0; i < arr.length; i++) { + const currElm = arr[i]; + const prevElm: T | undefined = arr[i - 1]; + if ( + prevElm !== undefined && + currElm instanceof classType && + prevElm instanceof classType && + (!predicate || predicate(currElm, prevElm)) + ) { + const currGroup = groups[groups.length - 1]; + if (Array.isArray(currGroup)) { + currGroup.push(currElm); + } else { + groups[groups.length - 1] = [prevElm, currElm]; + } + } else { + groups.push(currElm); + } } - return undefined; -} + return groups; +}; /** - * Returns a new array by putting consecutive elements satisfying predicate into a new - * array and returning others as they are. - * Ex: [1, "ha", 3, "ha", "ha"] => [1, "ha", 3, ["ha", "ha"]] - * where predicate: (v, vprev) => typeof v === typeof vPrev + * Returns a new array by putting consecutive elements satisfying predicate into a new array and + * returning others as they are. */ -function groupConsecutiveElementsWhile( - arr: any[], - predicate: (currElm: any, prevElm: any) => boolean -): any[] { - var groups = []; +export const groupConsecutiveElementsWhile = ( + arr: T[], + predicate: (currElm: T, prevElm: T) => boolean, +): Array => { + const groups: Array = []; - var currElm, currGroup; - for (var i = 0; i < arr.length; i++) { - currElm = arr[i]; - - if (i > 0 && predicate(currElm, arr[i - 1])) { - currGroup = groups[groups.length - 1]; - currGroup.push(currElm); + for (let i = 0; i < arr.length; i++) { + const currElm = arr[i]; + const prevElm: T | undefined = arr[i - 1]; + if (prevElm !== undefined && predicate(currElm, prevElm)) { + const currGroup = groups[groups.length - 1]; + if (Array.isArray(currGroup)) { + currGroup.push(currElm); + } else { + groups[groups.length - 1] = [prevElm, currElm]; + } } else { - groups.push([currElm]); + groups.push(currElm); } } - return groups.map((g) => (g.length === 1 ? g[0] : g)); -} + + return groups; +}; /** * Returns consecutive list of elements satisfying the predicate starting from startIndex * and traversing the array in reverse order. */ -function sliceFromReverseWhile( - arr: any[], +export function sliceFromReverseWhile( + arr: T[], startIndex: number, - predicate: (currElm: any) => boolean -): IArraySlice { - var result = { - elements: [] as any[], + predicate: (currElm: T) => boolean, +): ArraySlice { + const result: ArraySlice = { + elements: [], sliceStartsAt: -1, }; - for (var i = startIndex; i >= 0; i--) { + for (let i = startIndex; i >= 0; i--) { if (!predicate(arr[i])) { break; } @@ -76,23 +89,3 @@ function sliceFromReverseWhile( } return result; } - -function intersperse(arr: any[], item: any): any[] { - return arr.reduce((pv: any[], v: any, index: number) => { - pv.push(v); - if (index < arr.length - 1) { - pv.push(item); - } - return pv; - }, []); -} - -export { - IArraySlice, - preferSecond, - flatten, - groupConsecutiveElementsWhile, - sliceFromReverseWhile, - intersperse, - find, -}; diff --git a/src/helpers/object.ts b/src/helpers/object.ts deleted file mode 100644 index f13cf9d..0000000 --- a/src/helpers/object.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copied from mdn's Object.assign -function assign( - target: any, - ...sources: any[] /*, one or more source objects */ -) { - // TypeError if undefined or null - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var to = Object(target); - - for (var index = 0; index < sources.length; index++) { - var nextSource = sources[index]; - - if (nextSource != null) { - // Skip over if undefined or null - for (var nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; -} - -export { assign }; diff --git a/src/helpers/string.ts b/src/helpers/string.ts deleted file mode 100644 index 69a4a30..0000000 --- a/src/helpers/string.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Splits by new line character ("\n") by putting new line characters into the - * array as well. Ex: "hello\n\nworld\n " => ["hello", "\n", "\n", "world", "\n", " "] - */ - -function tokenizeWithNewLines(str: string): string[] { - const NewLine = '\n'; - - if (str === NewLine) { - return [str]; - } - - var lines = str.split(NewLine); - - if (lines.length === 1) { - return lines; - } - - var lastIndex = lines.length - 1; - - return lines.reduce((pv: string[], line: string, ind: number) => { - if (ind !== lastIndex) { - if (line !== '') { - pv = pv.concat(line, NewLine); - } else { - pv.push(NewLine); - } - } else if (line !== '') { - pv.push(line); - } - return pv; - }, []); -} - -export { tokenizeWithNewLines }; diff --git a/src/helpers/url.ts b/src/helpers/url.ts deleted file mode 100644 index 5bd9e1e..0000000 --- a/src/helpers/url.ts +++ /dev/null @@ -1,11 +0,0 @@ -function sanitize(str: string): string { - let val = str; - val = val.replace(/^\s*/gm, ''); - let whiteList = /^((https?|s?ftp|file|blob|mailto|tel):|#|\/|data:image\/)/; - if (whiteList.test(val)) { - return val; - } - return 'unsafe:' + val; -} - -export { sanitize }; diff --git a/src/main.ts b/src/main.ts index 85a4352..03ee1f2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,22 +1,19 @@ -// main entry file for node -export { QuillDeltaToHtmlConverter } from './QuillDeltaToHtmlConverter'; -export { OpToHtmlConverter } from './OpToHtmlConverter'; +export { RenderDelta } from './render-delta.js'; export { - InlineGroup, - VideoItem, BlockGroup, + BlotBlock, + InlineGroup, ListGroup, ListItem, - BlotBlock, -} from './grouper/group-types'; -export { DeltaInsertOp } from './DeltaInsertOp'; -export { InsertDataQuill, InsertDataCustom } from './InsertData'; + VideoItem, +} from './grouper/group-types.js'; +export { DeltaInsertOp } from './DeltaInsertOp.js'; +export { InsertDataQuill, InsertDataCustom } from './InsertData.js'; export { - NewLine, ListType, ScriptType, DirectionType, AlignType, DataType, GroupType, -} from './value-types'; +} from './value-types.js'; diff --git a/src/mentions/MentionSanitizer.ts b/src/mentions/MentionSanitizer.ts deleted file mode 100644 index 96ed9ac..0000000 --- a/src/mentions/MentionSanitizer.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { OpLinkSanitizer } from '../OpLinkSanitizer'; -import { IOpAttributeSanitizerOptions } from './../OpAttributeSanitizer'; - -interface IMention { - [index: string]: string | undefined; - name?: string; - target?: string; - slug?: string; - class?: string; - avatar?: string; - id?: string; - 'end-point'?: string; -} - -class MentionSanitizer { - static sanitize( - dirtyObj: IMention, - sanitizeOptions: IOpAttributeSanitizerOptions - ): IMention { - var cleanObj: any = {}; - - if (!dirtyObj || typeof dirtyObj !== 'object') { - return cleanObj; - } - - if (dirtyObj.class && MentionSanitizer.IsValidClass(dirtyObj.class)) { - cleanObj.class = dirtyObj.class; - } - - if (dirtyObj.id && MentionSanitizer.IsValidId(dirtyObj.id)) { - cleanObj.id = dirtyObj.id; - } - - if (MentionSanitizer.IsValidTarget(dirtyObj.target + '')) { - cleanObj.target = dirtyObj.target; - } - - if (dirtyObj.avatar) { - cleanObj.avatar = OpLinkSanitizer.sanitize( - dirtyObj.avatar + '', - sanitizeOptions - ); - } - - if (dirtyObj['end-point']) { - cleanObj['end-point'] = OpLinkSanitizer.sanitize( - dirtyObj['end-point'] + '', - sanitizeOptions - ); - } - - if (dirtyObj.slug) { - cleanObj.slug = dirtyObj.slug + ''; - } - - return cleanObj; - } - - static IsValidClass(classAttr: string) { - return !!classAttr.match(/^[a-zA-Z0-9_\-]{1,500}$/i); - } - - static IsValidId(idAttr: string) { - return !!idAttr.match(/^[a-zA-Z0-9_\-\:\.]{1,500}$/i); - } - - static IsValidTarget(target: string) { - return ['_self', '_blank', '_parent', '_top'].indexOf(target) > -1; - } -} - -export { MentionSanitizer, IMention }; diff --git a/src/render-delta.tsx b/src/render-delta.tsx new file mode 100644 index 0000000..cf15ef3 --- /dev/null +++ b/src/render-delta.tsx @@ -0,0 +1,310 @@ +import { + InlineStyles, + OpToNodeConverterOptions, + RenderOp, +} from './render-op.js'; +import { DeltaInsertOp } from './DeltaInsertOp.js'; +import { + groupConsecutiveSameStyleBlocks, + pairOpsWithTheirBlock, +} from './grouper/grouping.js'; +import { + BlockGroup, + BlotBlock, + InlineGroup, + ListGroup, + ListItem, + TableCell, + TableGroup, + TDataGroup, + VideoItem, +} from './grouper/group-types.js'; +import { nestLists } from './grouper/nest-lists.js'; +import { + OpAttributeSanitizer, + OpAttributeSanitizerOptions, +} from './OpAttributeSanitizer.js'; +import { groupTables } from './grouper/group-tables.js'; +import { denormalizeInsertOp } from './denormalize.js'; +import { convertInsertValue, isDeltaInsertOp } from './convert-insert-value.js'; +import { Component, Fragment, JSX, ReactNode } from 'react'; +import { InsertDataCustom, InsertDataQuill } from './InsertData.js'; +import { DataType } from './value-types.js'; + +export type RenderDeltaOptions = OpAttributeSanitizerOptions & + OpToNodeConverterOptions & { + orderedListTag: keyof JSX.IntrinsicElements; + bulletListTag: keyof JSX.IntrinsicElements; + multiLineBlockquote: boolean; + multiLineHeader: boolean; + multiLineCodeBlock: boolean; + }; + +export type CustomRenderer = ( + op: DeltaInsertOp, + contextOp: DeltaInsertOp | null, +) => ReactNode; + +export type RenderDeltaProps = { + ops: unknown[]; + options?: Partial; + customRenderer?: CustomRenderer; +}; + +export type RenderDeltaState = { + options: RenderDeltaOptions; + converterOptions: OpToNodeConverterOptions; +}; + +export class RenderDelta extends Component { + constructor(props: RenderDeltaProps) { + super(props); + + const options: RenderDeltaOptions = { + orderedListTag: 'ol', + bulletListTag: 'ul', + multiLineBlockquote: true, + multiLineHeader: true, + multiLineCodeBlock: true, + classPrefix: 'ql', + inlineStyles: false, + listItemTag: 'li', + paragraphTag: 'p', + linkTarget: '_blank', + allowBackgroundClasses: false, + urlSanitizer: (url) => url, + ...props.options, + }; + + let inlineStyles: Partial | undefined; + if (options.inlineStyles) { + if (typeof options.inlineStyles === 'object') { + inlineStyles = options.inlineStyles; + } else { + inlineStyles = {}; + } + } + + const converterOptions: OpToNodeConverterOptions = { + classPrefix: options.classPrefix, + inlineStyles, + listItemTag: options.listItemTag, + mentionTag: options.mentionTag, + paragraphTag: options.paragraphTag, + linkRel: options.linkRel, + linkTarget: options.linkTarget, + allowBackgroundClasses: options.allowBackgroundClasses, + customTag: options.customTag, + customAttributes: options.customAttributes, + customClasses: options.customClasses, + customCssStyles: options.customCssStyles, + }; + + this.state = { + options, + converterOptions, + }; + } + + render(): ReactNode { + return this.getGroupedOps().map((group) => { + if (group instanceof ListGroup) { + return this.renderList(group); + } + if (group instanceof TableGroup) { + return this.renderTable(group); + } + if (group instanceof BlockGroup) { + return this.renderBlock(group.op, group.ops); + } + if (group instanceof BlotBlock) { + return this.renderCustom(group.op, null); + } + if (group instanceof VideoItem) { + return this.renderVideo(group.op); + } + const Tag = this.state.options.paragraphTag || 'p'; + const inlines = this.renderInlines((group as InlineGroup).ops); + return ( + + {inlines.map((node, i) => ( + {node} + ))} + + ); + }); + } + + getListTag(op: DeltaInsertOp): keyof JSX.IntrinsicElements { + return op.isOrderedList() + ? this.state.options.orderedListTag + : op.isBulletList() + ? this.state.options.bulletListTag + : op.isCheckedList() + ? this.state.options.bulletListTag + : this.state.options.bulletListTag; + } + + getGroupedOps(): TDataGroup[] { + const deltaOps: DeltaInsertOp[] = []; + for (const unknownOp of this.props.ops) { + if (isDeltaInsertOp(unknownOp)) { + const denormalizedOps = denormalizeInsertOp(unknownOp); + for (const { insert, attributes } of denormalizedOps) { + const insertVal = convertInsertValue(insert, this.state.options); + if (insertVal) { + deltaOps.push( + new DeltaInsertOp( + insertVal, + attributes + ? OpAttributeSanitizer.sanitize( + attributes, + this.state.options, + ) + : undefined, + ), + ); + } + } + } + } + + const groupedSameStyleBlocks = groupConsecutiveSameStyleBlocks( + pairOpsWithTheirBlock(deltaOps), + this.state.options, + ); + + // Move all ops of same style consecutive blocks to the ops of first block and discard the rest. + const groupedOps = groupedSameStyleBlocks.map((elm) => { + if (Array.isArray(elm)) { + const groupsLastInd = elm.length - 1; + return new BlockGroup( + elm[0].op, + elm.flatMap((g, i) => { + if (g.ops.length) { + if (i < groupsLastInd) { + return [...g.ops, DeltaInsertOp.createNewLineOp()]; + } + return g.ops; + } + // Discard any other attributes so that we do not render any markup. + const { insert } = g.op; + if (insert instanceof InsertDataCustom) { + return [DeltaInsertOp.createNewLineOp()]; + } + return [ + new DeltaInsertOp( + new InsertDataQuill(DataType.Text, insert.value), + ), + ]; + }), + ); + } + if (elm instanceof BlockGroup && !elm.ops.length) { + elm.ops.push(DeltaInsertOp.createNewLineOp()); + } + return elm; + }); + + return nestLists(groupTables(groupedOps)); + } + + private renderList(list: ListGroup): ReactNode { + const Tag = this.getListTag(list.items[0].item.op); + return {list.items.map((li) => this.renderListItem(li))}; + } + + renderListItem(li: ListItem): ReactNode { + li.item.op.attributes.indent = 0; + const converter = new RenderOp(li.item.op, this.state.converterOptions); + return converter.renderOp( + <> + {this.renderInlines(li.item.ops)} + {li.innerList && this.renderList(li.innerList)} + , + ); + } + + private renderTable(table: TableGroup): ReactNode { + return ( + + + {table.rows.map((row, i) => ( + + {row.cells.map((cell) => this.renderTableCell(cell))} + + ))} + +
+ ); + } + + private renderTableCell(cell: TableCell): ReactNode { + const converter = new RenderOp(cell.item.op, this.state.converterOptions); + const cellElements = this.renderInlines(cell.item.ops); + return ( + + {converter.renderOp(cellElements)} + + ); + } + + private renderBlock(blockOp: DeltaInsertOp, ops: DeltaInsertOp[]) { + const converter = new RenderOp(blockOp, this.state.converterOptions); + + if (blockOp.isCodeBlock()) { + return converter.renderOp( + ops.map((iop) => + iop.isCustomEmbed() + ? this.renderCustom(iop, blockOp) + : (iop.insert.value as string), + ), + ); + } + + const lastInd = ops.length - 1; + return converter.renderOp( + ops.map((op, i) => { + if (op.isJustNewline()) { + return i < lastInd ? '\n' : null; + } + return this.renderInline(op, blockOp); + }), + ); + } + + private renderInlines(ops: DeltaInsertOp[]): ReactNode[] { + const lastIndex = ops.length - 1; + return ops.map((op, i) => { + if (i > 0 && i === lastIndex && op.isJustNewline()) { + return null; + } + return this.renderInline(op, null); + }); + } + + private renderInline( + op: DeltaInsertOp, + contextOp: DeltaInsertOp | null, + ): ReactNode { + if (op.isCustomEmbed()) { + return this.renderCustom(op, contextOp); + } + const ro = new RenderOp(op, this.state.converterOptions); + return ro.renderOp( + op.insert.value === '\n' ? null : (op.insert as InsertDataQuill).value, + ); + } + + private renderVideo(op: DeltaInsertOp): ReactNode { + const ro = new RenderOp(op, this.state.converterOptions); + return ro.renderOp(null); + } + + private renderCustom( + op: DeltaInsertOp, + contextOp: DeltaInsertOp | null, + ): ReactNode { + return this.props.customRenderer?.(op, contextOp) ?? null; + } +} diff --git a/src/render-op.tsx b/src/render-op.tsx new file mode 100644 index 0000000..f3480e4 --- /dev/null +++ b/src/render-op.tsx @@ -0,0 +1,538 @@ +import { + AnchorHTMLAttributes, + CSSProperties, + HTMLAttributes as ReactHTMLAttributes, + IframeHTMLAttributes, + ImgHTMLAttributes, + JSX, + ReactNode, +} from 'react'; +import { DeltaInsertOp } from './DeltaInsertOp.js'; +import { DirectionType, ScriptType } from './value-types.js'; +import { OpAttributes, OpAttributeSanitizer } from './OpAttributeSanitizer.js'; +import { Property } from 'csstype'; +import { InsertData } from './InsertData.js'; + +export type InlineStyleFn = ( + value: string | number | boolean, + op: DeltaInsertOp, +) => CSSProperties | undefined; + +export type InlineStyles = { + indent: InlineStyleFn; + align: InlineStyleFn; + direction: InlineStyleFn; + font: InlineStyleFn; + size: InlineStyleFn; + video: InlineStyleFn; + [attribute: string]: InlineStyleFn | undefined; +}; + +const DEFAULT_INLINE_STYLES: Pick< + InlineStyles, + 'direction' | 'font' | 'indent' | 'size' +> = { + direction: (value, op): CSSProperties | undefined => { + if (value === 'rtl') { + if (op.attributes['align']) { + return { + direction: 'rtl', + }; + } + return { + direction: 'rtl', + textAlign: 'inherit', + }; + } + return undefined; + }, + font: (value) => { + switch (value) { + case 'serif': + return { fontFamily: 'Georgia, Times New Roman, serif' }; + case 'monospace': + return { fontFamily: 'Monaco, Courier New, monospace' }; + default: + if (typeof value === 'string') { + return { fontFamily: value }; + } + } + }, + size: (value) => { + switch (value) { + case 'small': + return { fontSize: '0.75em' }; + case 'large': + return { fontSize: '1.5em' }; + case 'huge': + return { fontSize: '2.5em' }; + default: + return undefined; + } + }, + indent: (value, op): CSSProperties => { + const indentSize = Number(value) * 3; + return { + [op.attributes['direction'] === DirectionType.Rtl + ? 'paddingRight' + : 'paddingLeft']: `${indentSize}em`, + }; + }, +}; + +const blockAttributes = [ + 'blockquote', + 'code-block', + 'list', + 'header', + 'align', + 'direction', + 'indent', +] as const; + +export type BlockAttribute = (typeof blockAttributes)[number]; + +const inlineAttributes = [ + 'link', + 'mentions', + 'script', + 'bold', + 'italic', + 'strike', + 'underline', + 'code', +] as const; + +export type InlineAttribute = (typeof inlineAttributes)[number]; + +export type DataAttributes = { + [key: `data-${string}`]: unknown; +}; + +export type HTMLAttributes = ReactHTMLAttributes & DataAttributes; + +export type OpToNodeConverterOptions = { + classPrefix?: string; + inlineStyles?: boolean | Partial; + listItemTag?: keyof JSX.IntrinsicElements; + mentionTag?: keyof JSX.IntrinsicElements; + paragraphTag?: keyof JSX.IntrinsicElements; + linkRel?: string; + linkTarget?: string; + allowBackgroundClasses?: boolean; + customTag?: ( + format: BlockAttribute | InlineAttribute, + op: DeltaInsertOp, + ) => keyof JSX.IntrinsicElements | undefined; + customAttributes?: (op: DeltaInsertOp) => HTMLAttributes | undefined; + customClasses?: (op: DeltaInsertOp) => string | string[] | undefined; + customCssStyles?: (op: DeltaInsertOp) => CSSProperties | undefined; +}; + +export class RenderOp { + private readonly options: OpToNodeConverterOptions; + private readonly op: DeltaInsertOp; + + constructor(op: DeltaInsertOp, options?: OpToNodeConverterOptions) { + this.op = op; + this.options = { + classPrefix: 'ql', + listItemTag: 'li', + mentionTag: 'a', + paragraphTag: 'p', + ...options, + }; + } + + renderOp(children?: ReactNode): ReactNode { + const tags = this.getTags(); + const attributes = this.getTagAttributes(); + + if (this.options.customAttributes) { + Object.assign(attributes, this.options.customAttributes(this.op)); + } + + if ( + Array.isArray(tags) && + tags.length === 0 && + Object.keys(attributes).length + ) { + tags.push('span'); + } + + const renderFns: Array<(children: ReactNode) => ReactNode> = []; + + for (const Tag of Array.isArray(tags) ? tags : [tags]) { + if (Tag === 'img') { + if (this.op.attributes.link) { + // Special support for a link containing an image. + renderFns.push(() => ( + + + + )); + } else { + renderFns.push(() => ); + } + // Nothing can be inside an img. + break; + } + if (Tag === 'iframe') { + // Nothing can be inside an iframe. + renderFns.push(() => ); + break; + } + if (renderFns.length) { + renderFns.push((children) => {children}); + } else { + renderFns.push((children) => {children}); + } + } + + return renderFns.reduceRight( + (acc, fn) => (children) => fn(acc(children)), + (children) => children, + )(children); + } + + getClasses(): string[] { + if (this.options.inlineStyles) { + return []; + } + + const classes = this.getCustomClasses(); + + const attrs = this.op.attributes; + + const prefix = this.options.classPrefix + ? `${this.options.classPrefix}-` + : ''; + + if (attrs.align) { + classes.push(`${prefix}align-${attrs.align}`); + } + if ( + attrs.background && + this.options.allowBackgroundClasses && + OpAttributeSanitizer.IsValidColorLiteral(attrs.background) + ) { + classes.push(`${prefix}background-${attrs.background}`); + } + if (attrs.direction) { + classes.push(`${prefix}direction-${attrs.direction}`); + } + if (attrs.font) { + classes.push(`${prefix}font-${attrs.font}`); + } + if (attrs.indent) { + classes.push(`${prefix}indent-${attrs.indent}`); + } + if (attrs.size) { + classes.push(`${prefix}size-${attrs.size}`); + } + if (this.op.isFormula()) { + classes.push(`${prefix}formula`); + } + if (this.op.isImage()) { + classes.push(`${prefix}image`); + } + if (this.op.isVideo()) { + classes.push(`${prefix}video`); + } + + return classes; + } + + getCssStyles(): CSSProperties { + const { inlineStyles } = this.options; + + const propsArr: Array = ['color']; + if (inlineStyles || !this.options.allowBackgroundClasses) { + propsArr.push('background'); + } + if (inlineStyles) { + propsArr.push('indent', 'align', 'direction', 'font', 'size'); + } + + const styles: CSSProperties = { + // Set border to none for video embeds but allow custom styles to override this. + ...(this.op.isVideo() ? { border: 'none' } : {}), + ...this.options.customCssStyles?.(this.op), + }; + + for (const attribute of propsArr) { + const value: unknown = this.op.attributes[attribute]; + if ( + typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean' + ) { + const attributeStyles = + inlineStyles && + typeof inlineStyles === 'object' && + inlineStyles[attribute]; + + if (attributeStyles) { + Object.assign(styles, attributeStyles(value, this.op)); + } else { + switch (attribute) { + case 'background': + if (typeof value === 'string') { + styles.backgroundColor = value; + } + break; + case 'color': + if (typeof value === 'string') { + styles.color = value; + } + break; + case 'indent': + Object.assign( + styles, + DEFAULT_INLINE_STYLES.indent(value, this.op), + ); + break; + case 'align': + if (typeof value === 'string') { + styles.textAlign = value as Property.TextAlign; + } + break; + case 'direction': + Object.assign( + styles, + DEFAULT_INLINE_STYLES.direction(value, this.op), + ); + break; + case 'font': + Object.assign(styles, DEFAULT_INLINE_STYLES.font(value, this.op)); + break; + case 'size': + Object.assign(styles, DEFAULT_INLINE_STYLES.size(value, this.op)); + break; + } + } + } + } + + return styles; + } + + getTagAttributes(): HTMLAttributes { + const tagAttrs: HTMLAttributes = {}; + + const style = this.getCssStyles(); + if (Object.keys(style).length) { + tagAttrs.style = style; + } + + const classes = this.getClasses(); + if (classes.length) { + tagAttrs.className = classes.join(' '); + } + + if (this.op.isImage()) { + const imgAttrs: ImgHTMLAttributes = {}; + if (this.op.attributes.width) { + imgAttrs.width = this.op.attributes.width; + } + const src = this.op.insert.value; + if (typeof src === 'string') { + imgAttrs.src = src; + } + Object.assign(tagAttrs, imgAttrs); + return tagAttrs; + } + + if (this.op.isACheckList()) { + tagAttrs['data-checked'] = this.op.isCheckedList(); + return tagAttrs; + } + + if (this.op.isFormula()) { + return tagAttrs; + } + + if (this.op.isVideo()) { + const src = this.op.insert.value; + const iframeAttrs: IframeHTMLAttributes = { + allowFullScreen: true, + src: typeof src === 'string' ? src : undefined, + }; + Object.assign(tagAttrs, iframeAttrs); + return tagAttrs; + } + + if (this.op.isMentions()) { + const mention = this.op.attributes.mention; + if (mention) { + if (mention.class) { + const { className } = tagAttrs; + tagAttrs.className = className + ? `${className} ${mention.class}` + : mention.class; + } + const linkAttrs: AnchorHTMLAttributes = {}; + if (mention.link) { + linkAttrs.href = mention.link; + } + if (mention.target) { + linkAttrs.target = mention.target; + } + Object.assign(tagAttrs, linkAttrs); + } + return tagAttrs; + } + + if ( + this.op.isCodeBlock() && + typeof this.op.attributes['code-block'] === 'string' + ) { + tagAttrs['data-language'] = this.op.attributes['code-block']; + return tagAttrs; + } + + if (!this.op.isContainerBlock() && this.op.isLink()) { + Object.assign(tagAttrs, this.getLinkAttrs()); + } + + return tagAttrs; + } + + getLinkAttrs(): AnchorHTMLAttributes { + const attrs: AnchorHTMLAttributes = { + href: this.op.attributes.link, + }; + + const target = + this.op.attributes.target || + (this.options.linkTarget && + OpAttributeSanitizer.isValidTarget(this.options.linkTarget) + ? this.options.linkTarget + : undefined); + + if (target) { + attrs.target = target; + } + + const rel = + this.op.attributes.rel || + (this.options.linkRel && + OpAttributeSanitizer.IsValidRel(this.options.linkRel) + ? this.options.linkRel + : undefined); + + if (rel) { + attrs.rel = rel; + } + + return attrs; + } + + getCustomClasses() { + if (this.options.customClasses) { + const res = this.options.customClasses.apply(null, [this.op]); + if (res) { + return Array.isArray(res) ? res : [res]; + } + } + return []; + } + + private getTags(): + | keyof JSX.IntrinsicElements + | Array { + // embeds + if (this.op.isVideo()) { + return 'iframe'; + } + if (this.op.isImage()) { + return 'img'; + } + if (this.op.isFormula()) { + return 'span'; + } + + const { attributes } = this.op; + + // blocks + for (const format of blockAttributes) { + const value = attributes[format]; + if (value) { + const customTag = this.options.customTag?.(format, this.op); + if (customTag) { + return customTag; + } + switch (format) { + case 'blockquote': + return 'blockquote'; + case 'code-block': + return 'pre'; + case 'list': + return this.options.listItemTag || 'li'; + case 'header': + switch (value) { + case 1: + return 'h1'; + case 2: + return 'h2'; + case 3: + return 'h3'; + case 4: + return 'h4'; + case 5: + return 'h5'; + case 6: + return 'h6'; + default: + return 'p'; + } + case 'align': + case 'direction': + case 'indent': + return this.options.paragraphTag || 'p'; + } + } + } + + // inlines + const tags: Array = []; + + for (const format of inlineAttributes) { + const value = attributes[format]; + if (value) { + const customTag = this.options.customTag?.(format, this.op); + if (customTag) { + tags.push(customTag); + } else { + switch (format) { + case 'link': + case 'mentions': + tags.push(this.options.mentionTag || 'a'); + break; + case 'script': + tags.push(value === ScriptType.Sub ? 'sub' : 'sup'); + break; + case 'bold': + tags.push('strong'); + break; + case 'italic': + tags.push('em'); + break; + case 'strike': + tags.push('s'); + break; + case 'underline': + tags.push('u'); + break; + case 'code': + tags.push('code'); + } + } + } + } + + // Note that this array may be empty, which is the case when there's no formatting or attributes needed for inline text. + // The caller of this function may still render a wrapper tag if there are attributes. + return tags; + } +} diff --git a/src/sanitize-mention.ts b/src/sanitize-mention.ts new file mode 100644 index 0000000..33114f7 --- /dev/null +++ b/src/sanitize-mention.ts @@ -0,0 +1,61 @@ +import { + OpAttributeSanitizer, + OpAttributeSanitizerOptions, +} from './OpAttributeSanitizer.js'; + +// See https://github.com/quill-mention/quill-mention +export type Mention = { + class?: string; + target?: string; + link?: string; + [index: string]: unknown; +}; + +type UnknownDirtyMention = { + [key in keyof Mention]?: unknown; +}; + +const isDirtyMention = (value: unknown): value is UnknownDirtyMention => + !!value && typeof value === 'object'; + +const validClassRegex = /^[\w -]{1,500}$/i; + +const isValidClass = (value: string) => validClassRegex.test(value); + +export const sanitizeMention = ( + dirtyObj: unknown, + sanitizeOptions: OpAttributeSanitizerOptions, +): Mention => { + const cleanObj: Mention = {}; + + if (!isDirtyMention(dirtyObj)) { + return cleanObj; + } + + for (const [key, value] of Object.entries(dirtyObj)) { + switch (key) { + case 'class': + if (typeof value === 'string' && isValidClass(value)) { + cleanObj.class = value; + } + break; + case 'target': + if ( + typeof value === 'string' && + OpAttributeSanitizer.isValidTarget(value) + ) { + cleanObj.target = value; + } + break; + case 'link': + if (typeof value === 'string') { + cleanObj.link = sanitizeOptions.urlSanitizer(value); + } + break; + default: + cleanObj[key] = value; + } + } + + return cleanObj; +}; diff --git a/src/value-types.ts b/src/value-types.ts index 3ad8f01..c2dbfaf 100644 --- a/src/value-types.ts +++ b/src/value-types.ts @@ -1,50 +1,37 @@ -type NewLine = '\n'; -const NewLine = '\n' as NewLine; - -enum ListType { +export enum ListType { Ordered = 'ordered', Bullet = 'bullet', Checked = 'checked', Unchecked = 'unchecked', } -enum ScriptType { +export enum ScriptType { Sub = 'sub', Super = 'super', } -enum DirectionType { +export enum DirectionType { Rtl = 'rtl', } -enum AlignType { +export enum AlignType { Left = 'left', Center = 'center', Right = 'right', Justify = 'justify', } -enum DataType { +export enum DataType { Image = 'image', Video = 'video', Formula = 'formula', Text = 'text', } -enum GroupType { +export enum GroupType { Block = 'block', InlineGroup = 'inline-group', List = 'list', Video = 'video', Table = 'table', } - -export { - NewLine, - ListType, - ScriptType, - DirectionType, - AlignType, - DataType, - GroupType, -}; diff --git a/test/DeltaInsertOp.test.ts b/test/DeltaInsertOp.test.ts index 628aaa2..63132c2 100644 --- a/test/DeltaInsertOp.test.ts +++ b/test/DeltaInsertOp.test.ts @@ -1,179 +1,174 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { InsertDataQuill } from './../src/InsertData'; -import { DeltaInsertOp } from './../src/DeltaInsertOp'; -import { DataType, AlignType, ListType } from './../src/value-types'; - -describe('DeltaInsertOp', function () { - describe('constructor()', function () { +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { InsertDataQuill } from '../src/InsertData.js'; +import { DeltaInsertOp } from '../src/DeltaInsertOp.js'; +import { DataType, ListType } from '../src/value-types.js'; + +describe('DeltaInsertOp', () => { + describe('constructor', function () { it('should instantiate', function () { - var embed = new InsertDataQuill(DataType.Image, 'https://'); - var t = new DeltaInsertOp(embed); + const embed = new InsertDataQuill(DataType.Image, 'https://'); + const t = new DeltaInsertOp(embed); assert.equal(t instanceof DeltaInsertOp, true); assert.equal(t.insert instanceof InsertDataQuill, true); assert.equal(t.attributes instanceof Object, true); - t = new DeltaInsertOp('test'); - assert.deepEqual(t.insert.value, 'test'); - - t = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, 'x=data')); - assert.equal(t.insert.value, 'x=data'); - }); - }); - - describe('isContainerBlock()', function () { - it('should successfully check if the op is a block container', function () { - var op = new DeltaInsertOp('test'); - assert.equal(op.isContainerBlock(), false); - - op = new DeltaInsertOp('test', { blockquote: true }); - assert.equal(op.isContainerBlock(), true); - }); - }); - - describe('hasSameAdiAs()', function () { - it('should successfully if two ops have same align indent and direction', function () { - var op1 = new DeltaInsertOp('\n', { align: AlignType.Right, indent: 2 }); - var op2 = new DeltaInsertOp('\n', { align: AlignType.Right, indent: 2 }); + const t2 = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'test')); + assert.deepEqual(t2.insert.value, 'test'); - assert.ok(op1.hasSameAdiAs(op2)); - - var op2 = new DeltaInsertOp('\n', { align: AlignType.Right, indent: 3 }); - assert.ok(!op1.hasSameAdiAs(op2)); + const t3 = new DeltaInsertOp( + new InsertDataQuill(DataType.Formula, 'x=data'), + ); + assert.equal(t3.insert.value, 'x=data'); }); }); - describe('hasHigherIndentThan()', function () { - it('should successfully if two ops have same align indent and direction', function () { - var op1 = new DeltaInsertOp('\n', { indent: undefined }); - var op2 = new DeltaInsertOp('\n', { indent: undefined }); - - assert.ok(!op1.hasHigherIndentThan(op2)); + describe('isContainerBlock', function () { + it('should check if the op is a block container', function () { + const inlineOp = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'test'), + ); + assert.equal(inlineOp.isContainerBlock(), false); + + const blockOp = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'test'), + { + blockquote: true, + }, + ); + assert.equal(blockOp.isContainerBlock(), true); }); }); - describe('isInline()', function () { + describe('isInline', function () { it('should return true if op is an inline', function () { - var op = new DeltaInsertOp('\n', {}); + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, '\n'), + {}, + ); assert.equal(op.isInline(), true); }); }); describe('isJustNewline()', function () { it('should return true if op is a list', function () { - var op = new DeltaInsertOp('\n', {}); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), {}); assert.equal(op.isJustNewline(), true); - op = new DeltaInsertOp('\n\n ', { list: ListType.Ordered }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n\n '), { + list: ListType.Ordered, + }); assert.equal(op.isJustNewline(), false); }); }); describe('isList()', function () { it('should return true if op is a list', function () { - var op = new DeltaInsertOp('\n', {}); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), {}); assert.equal(op.isList(), false); - op = new DeltaInsertOp('fds ', { list: ListType.Ordered }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Ordered, + }); assert.equal(op.isList(), true); - op = new DeltaInsertOp('fds ', { list: ListType.Unchecked }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Unchecked, + }); assert.equal(op.isList(), true); }); }); describe('isBulletList()', function () { it('should return true if op is a bullet list', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }); assert.equal(op.isBulletList(), true); - op = new DeltaInsertOp('fds ', { list: ListType.Ordered }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Ordered, + }); assert.equal(op.isBulletList(), false); }); }); describe('isOrderedList()', function () { it('should return true if op is an ordered list', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }); assert.equal(op.isOrderedList(), false); - op = new DeltaInsertOp('fds ', { list: ListType.Ordered }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Ordered, + }); assert.equal(op.isOrderedList(), true); }); }); - describe('isCheckedList()', function () { + describe('isCheckedList', function () { it('should return true if op is an checked list', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Unchecked }); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Unchecked, + }); assert.equal(op.isCheckedList(), false); - op = new DeltaInsertOp('fds ', { list: ListType.Checked }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Checked, + }); assert.equal(op.isCheckedList(), true); }); }); - describe('isUncheckedList()', function () { + describe('isUncheckedList', function () { it('should return true if op is an unchecked list', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); + let op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }); assert.equal(op.isUncheckedList(), false); - op = new DeltaInsertOp('fds ', { list: ListType.Unchecked }); + op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'fds '), { + list: ListType.Unchecked, + }); assert.equal(op.isUncheckedList(), true); }); }); - describe('isSameListAs()', function () { + describe('isSameListAs', function () { it('should return true if op list type same as the comparison', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); - var op2 = new DeltaInsertOp('ds', { list: ListType.Bullet }); + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }); + const op2 = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'ds'), { + list: ListType.Bullet, + }); assert.equal(op.isSameListAs(op2), true); - var op3 = new DeltaInsertOp('fds ', { list: ListType.Ordered }); + const op3 = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'fds '), + { + list: ListType.Ordered, + }, + ); assert.equal(op.isSameListAs(op3), false); }); }); - describe('isText()', function () { - it('should correctly identify insert type', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); - assert.equal(op.isVideo(), false); - assert.equal(op.isText(), true); - - op = new DeltaInsertOp(new InsertDataQuill(DataType.Image, 'd'), { - list: ListType.Ordered, - }); - assert.equal(op.isImage(), true); - assert.equal(op.isText(), false); - }); - }); - - describe('isVideo()/isImage()/isFormula()', function () { - it('should correctly identify embed type', function () { - var op = new DeltaInsertOp(new InsertDataQuill(DataType.Video, '')); - assert.equal(op.isVideo(), true); - assert.equal(op.isFormula(), false); - assert.equal(op.isImage(), false); - - op = new DeltaInsertOp(new InsertDataQuill(DataType.Image, 'd')); - assert.equal(op.isImage(), true); - assert.equal(op.isFormula(), false); - - op = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, 'd')); - assert.equal(op.isVideo(), false); - assert.equal(op.isFormula(), true); - }); - }); - - describe('isLink()', function () { + describe('isLink', () => { it('should correctly identify if op is a link', function () { - var op = new DeltaInsertOp(new InsertDataQuill(DataType.Video, ''), { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Video, ''), { link: 'http://', }); assert.equal(op.isLink(), false); - op = new DeltaInsertOp('http', { link: 'http://' }); - assert.equal(op.isLink(), true); + const op2 = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'http'), + { + link: 'http://', + }, + ); + assert.equal(op2.isLink(), true); }); }); }); diff --git a/test/InsertData.test.ts b/test/InsertData.test.ts index f73ab78..2e33df1 100644 --- a/test/InsertData.test.ts +++ b/test/InsertData.test.ts @@ -1,31 +1,27 @@ -import 'mocha'; -import * as assert from 'assert'; +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { InsertDataQuill, InsertDataCustom } from './../src/InsertData.js'; +import { DataType } from './../src/value-types.js'; -import { InsertDataQuill, InsertDataCustom } from './../src/InsertData'; -import { DataType } from './../src/value-types'; +describe('InsertDataQuill', () => { + describe('constructor', () => { + it('should instantiate', () => { + const t1 = new InsertDataQuill(DataType.Video, 'https://'); + assert.equal(t1.type === DataType.Video, true); + assert.equal(t1.value === 'https://', true); -describe('InsertData', function () { - describe('InsertDataQuill', function () { - describe('constructor()', function () { - it('should instantiate', function () { - var t = new InsertDataQuill(DataType.Video, 'https://'); - assert.equal(t.type === 'video', true); - assert.equal(t.value === 'https://', true); - - t = new InsertDataQuill(DataType.Text, 'hello'); - assert.equal(t.type === 'text', true); - assert.equal(t.value === 'hello', true); - }); + const t2 = new InsertDataQuill(DataType.Text, 'hello'); + assert.equal(t2.type === DataType.Text, true); + assert.equal(t2.value === 'hello', true); }); }); +}); - describe('InsertDataCustom', function () { - describe('constructor()', function () { - it('should instantiate', function () { - var t = new InsertDataCustom('biu', {}); - assert.equal(t.type === 'biu', true); - assert.deepEqual(t.value, {}); - }); +describe('InsertDataCustom', () => { + describe('constructor', () => { + it('should instantiate', () => { + const instance = new InsertDataCustom({ yoyoyo: 1 }); + assert.deepEqual(instance.value, { yoyoyo: 1 }); }); }); }); diff --git a/test/InsertOpDenormalizer.test.ts b/test/InsertOpDenormalizer.test.ts deleted file mode 100644 index 9e6df44..0000000 --- a/test/InsertOpDenormalizer.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { InsertOpDenormalizer } from './../src/InsertOpDenormalizer'; - -describe('InsertOpDenormalizer', function () { - describe('#denormalize()', function () { - it('should return denormalized op as array of ops', function () { - var op = { insert: '\n' }; - var act = InsertOpDenormalizer.denormalize({ insert: '\n' }); - assert.deepEqual(act, [op]); - - op = { insert: 'abc' }; - act = InsertOpDenormalizer.denormalize(op); - assert.deepEqual(act, [op]); - - var op2 = { insert: 'abc\n', attributes: { link: 'cold' } }; - act = InsertOpDenormalizer.denormalize(op2); - assert.equal(act.length, 2); - assert.equal(act[0].insert, 'abc'); - assert.equal(act[0].attributes.link, 'cold'); - - var op3 = { insert: '\n\n', attributes: { bold: true } }; - act = InsertOpDenormalizer.denormalize(op3); - assert.equal(act.length, 2); - assert.equal(act[1].insert, '\n'); - - act = InsertOpDenormalizer.denormalize(null); - assert.deepEqual(act, []); - act = InsertOpDenormalizer.denormalize('..'); - assert.deepEqual(act, []); - }); - }); -}); diff --git a/test/InsertOpsConverter.test.ts b/test/InsertOpsConverter.test.ts deleted file mode 100644 index 190caf1..0000000 --- a/test/InsertOpsConverter.test.ts +++ /dev/null @@ -1,92 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { DeltaInsertOp } from './../src/DeltaInsertOp'; -import { InsertDataQuill } from './../src/InsertData'; -import { InsertOpsConverter } from './../src/InsertOpsConverter'; - -var data = [ - { - ops: [ - { insert: 'This ' }, - { attributes: { font: 'monospace' }, insert: 'is' }, - { insert: ' a ' }, - { attributes: { size: 'large' }, insert: 'test' }, - { insert: ' ' }, - { attributes: { italic: true, bold: true }, insert: 'data' }, - { insert: ' ' }, - { attributes: { underline: true, strike: true }, insert: 'that' }, - { insert: ' is ' }, - { attributes: { color: '#e60000' }, insert: 'will' }, - { insert: ' ' }, - { attributes: { background: '#ffebcc' }, insert: 'test' }, - { insert: ' ' }, - { attributes: { script: 'sub' }, insert: 'the' }, - { insert: ' ' }, - { attributes: { script: 'super' }, insert: 'rendering' }, - { insert: ' of ' }, - { attributes: { link: 'yahoo' }, insert: 'inline' }, - { insert: ' ' }, - { insert: { formula: 'x=data' } }, - { insert: ' formats.\n' }, - ], - html: [ - '

', - 'This ', - 'is', - ' a ', - 'test', - ' ', - 'data', - ' ', - 'that', - ' is ', - 'will', - ' ', - 'test', - ' ', - 'the', - ' ', - 'rendering', - ' of ', - 'inline', - ' ', - 'x=data', - ' formats.
', - ].join(''), - }, -]; - -describe('InsertOpsConverter', function () { - describe('#convert()', function () { - it('should transform raw delta ops to DeltaInsertOp[]', function () { - var objs = InsertOpsConverter.convert(data[0].ops, {}); - - assert.equal(objs[0] instanceof DeltaInsertOp, true); - assert.equal(objs[objs.length - 1] instanceof DeltaInsertOp, true); - assert.deepEqual(InsertOpsConverter.convert(null, {}), []); - assert.deepEqual(InsertOpsConverter.convert([{ insert: '' }], {}), []); - assert.deepEqual( - InsertOpsConverter.convert([{ insert: { cake: '' } }], {}), - [{ insert: { type: 'cake', value: '' }, attributes: {} }] - ); - assert.deepEqual(InsertOpsConverter.convert([{ insert: 2 }], {}), []); - //console.log(objs); - }); - }); - - describe('#convertInsertVal()', function () { - it('should convert raw .insert value to valid TInsert or null', function () { - [null, undefined, 3, {}].forEach((v) => { - var act = InsertOpsConverter.convertInsertVal(v, {}); - assert.equal(act, null); - }); - - ['fdsf', { image: 'ff' }, { video: '' }, { formula: '' }].forEach((v) => { - var act = InsertOpsConverter.convertInsertVal(v, {}); - assert.notEqual(act, null); - assert.ok(act instanceof InsertDataQuill); - }); - }); - }); -}); diff --git a/test/OpAttributeSanitizer.test.ts b/test/OpAttributeSanitizer.test.ts index 690ce65..1734f7a 100644 --- a/test/OpAttributeSanitizer.test.ts +++ b/test/OpAttributeSanitizer.test.ts @@ -1,33 +1,63 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { OpAttributeSanitizer } from './../src/OpAttributeSanitizer'; -import { ListType, AlignType, DirectionType } from './../src/value-types'; +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { + OpAttributeSanitizer, + OpAttributeSanitizerOptions, +} from './../src/OpAttributeSanitizer.js'; +import { ListType, AlignType, DirectionType } from './../src/value-types.js'; describe('OpAttributeSanitizer', function () { - describe('#IsValidHexColor()', function () { - it('should return true if hex color is valid', function () { - assert.ok(OpAttributeSanitizer.IsValidHexColor('#234')); - assert.ok(OpAttributeSanitizer.IsValidHexColor('#f23')); - assert.ok(OpAttributeSanitizer.IsValidHexColor('#fFe234')); - assert.equal(OpAttributeSanitizer.IsValidHexColor('#g34'), false); + describe('isValidHexColor', function () { + it('should return true for valid HEX colors', () => { + assert.ok(OpAttributeSanitizer.isValidHexColor('#234')); + assert.ok(OpAttributeSanitizer.isValidHexColor('#f23')); + assert.ok(OpAttributeSanitizer.isValidHexColor('#fFe234')); + assert.equal(OpAttributeSanitizer.isValidHexColor('#g34'), false); + }); + + it('should return false for invalid strings', () => { + assert.equal(OpAttributeSanitizer.isValidHexColor('e34'), false); + assert.equal(OpAttributeSanitizer.isValidHexColor('123434'), false); + }); + }); + + describe('isValidFontName', () => { + it('should return true for valid font names', () => { + assert.equal( + OpAttributeSanitizer.isValidFontName('gooD-ol times 2'), + true, + ); + }); - assert.equal(OpAttributeSanitizer.IsValidHexColor('e34'), false); - assert.equal(OpAttributeSanitizer.IsValidHexColor('123434'), false); + it('should return false for invalid strings', () => { + assert.equal(OpAttributeSanitizer.isValidFontName(''), false); + assert.equal(OpAttributeSanitizer.isValidHexColor('bad"str?'), false); }); }); - describe('#IsValidFontName()', function () { - it('should return true if font name is valid', function () { - assert.ok(OpAttributeSanitizer.IsValidFontName('gooD-ol times 2')); - assert.equal(OpAttributeSanitizer.IsValidHexColor('bad"times?'), false); + describe('isValidSize', () => { + it('should return true for valid sizes', function () { + assert.ok(OpAttributeSanitizer.isValidSize('bigfaT-size')); + }); + + it('should return false for invalid strings', () => { + assert.equal(OpAttributeSanitizer.isValidSize(''), false); + assert.equal(OpAttributeSanitizer.isValidSize('big-fat-size!'), false); + assert.equal(OpAttributeSanitizer.isValidSize('small.size?'), false); }); }); - describe('#IsValidSize()', function () { - it('should return true if size is valid', function () { - assert.ok(OpAttributeSanitizer.IsValidSize('bigfaT-size')); - assert.equal(OpAttributeSanitizer.IsValidSize('small.sizetimes?'), false); + describe('isValidTarget', () => { + it('should return true for valid targets', () => { + ['_self', '_blank', '_parent', '_top'].forEach((target) => { + assert.ok(OpAttributeSanitizer.isValidTarget(target)); + }); + }); + + it('should return false for invalid strings', () => { + assert.equal(OpAttributeSanitizer.isValidTarget('<'), false); + assert.equal(OpAttributeSanitizer.isValidTarget('~'), false); + assert.equal(OpAttributeSanitizer.isValidTarget('_blank+'), false); }); }); @@ -53,7 +83,7 @@ describe('OpAttributeSanitizer', function () { assert.equal(OpAttributeSanitizer.IsValidColorLiteral('red1'), false); assert.equal( OpAttributeSanitizer.IsValidColorLiteral('red-green'), - false + false, ); assert.equal(OpAttributeSanitizer.IsValidColorLiteral(''), false); }); @@ -70,11 +100,11 @@ describe('OpAttributeSanitizer', function () { assert.equal(OpAttributeSanitizer.IsValidRGBColor('rgb(260,0,0)'), false); assert.equal( OpAttributeSanitizer.IsValidRGBColor('rgb(2000,0,0)'), - false + false, ); }); }); - describe('#IsValidRel()', function () { + describe('IsValidRel', function () { it('should return true if rel is valid', function () { assert.ok(OpAttributeSanitizer.IsValidRel('nofollow')); assert.ok(OpAttributeSanitizer.IsValidRel('tag')); @@ -84,7 +114,7 @@ describe('OpAttributeSanitizer', function () { assert.equal(OpAttributeSanitizer.IsValidRel(''), false); }); }); - describe('#IsValidLang()', function () { + describe('IsValidLang', function () { it('should return true if lang is valid', function () { assert.ok(OpAttributeSanitizer.IsValidLang('javascript')); assert.ok(OpAttributeSanitizer.IsValidLang(true)); @@ -95,49 +125,25 @@ describe('OpAttributeSanitizer', function () { }); }); - describe('#sanitize()', function () { - it('should return empty object', function () { - [null, 3, undefined, 'fd'].forEach((v) => { - assert.deepEqual(OpAttributeSanitizer.sanitize(v, {}), {}); - }); - }); - - var attrs = { - bold: 'nonboolval', - color: '#12345H', - background: '#333', - font: 'times new roman', - size: 'x.large', - link: 'http://<', - script: 'supper', - list: ListType.Ordered, - header: '3', - indent: 40, - direction: DirectionType.Rtl, - align: AlignType.Center, - width: '3', - customAttr1: 'shouldnt be touched', - mentions: true, - mention: { - class: 'A-cls-9', - id: 'An-id_9:.', - target: '_blank', - avatar: 'http://www.yahoo.com', - 'end-point': 'http://abc.com', - slug: 'my-name', - }, + describe('sanitize', () => { + const noopSanitizeOptions: OpAttributeSanitizerOptions = { + urlSanitizer: (url) => url, }; - it('should return sanitized attributes', function () { - assert.deepEqual(OpAttributeSanitizer.sanitize(attrs, {}), { - bold: true, + + it('should return sanitized attributes', () => { + const attrs = { + bold: 'nonboolval', + color: '#12345H', background: '#333', font: 'times new roman', - link: 'http://<', - list: 'ordered', - header: 3, - indent: 30, - direction: 'rtl', - align: 'center', + size: 'x.large', + link: 'http://<', + script: 'supper', + list: ListType.Ordered, + header: '3', + indent: 40, + direction: DirectionType.Rtl, + align: AlignType.Center, width: '3', customAttr1: 'shouldnt be touched', mentions: true, @@ -146,43 +152,106 @@ describe('OpAttributeSanitizer', function () { id: 'An-id_9:.', target: '_blank', avatar: 'http://www.yahoo.com', - 'end-point': 'http://abc.com', slug: 'my-name', }, - }); + }; + assert.deepEqual( + OpAttributeSanitizer.sanitize(attrs, noopSanitizeOptions), + { + bold: true, + background: '#333', + font: 'times new roman', + link: 'http://<', + list: 'ordered', + header: 3, + indent: 30, + direction: 'rtl', + align: 'center', + width: '3', + customAttr1: 'shouldnt be touched', + mentions: true, + mention: { + class: 'A-cls-9', + id: 'An-id_9:.', + target: '_blank', + avatar: 'http://www.yahoo.com', + slug: 'my-name', + }, + }, + ); + }); + it('should sanitize mentions', () => { assert.deepEqual( OpAttributeSanitizer.sanitize( - { + { mentions: true, mention: 1, }, - {} + noopSanitizeOptions, ), - {} + { + mentions: true, + mention: {}, + }, ); + }); - assert.deepEqual(OpAttributeSanitizer.sanitize({ header: 1 }, {}), { - header: 1, - }); + it('should keep a valid header value of 1', () => { assert.deepEqual( - OpAttributeSanitizer.sanitize({ header: undefined }, {}), - {} + OpAttributeSanitizer.sanitize({ header: 1 }, noopSanitizeOptions), + { + header: 1, + }, ); - assert.deepEqual(OpAttributeSanitizer.sanitize({ header: 100 }, {}), { - header: 6, - }); + }); + + it('should exclude an undefined header value', () => { assert.deepEqual( - OpAttributeSanitizer.sanitize({ align: AlignType.Center }, {}), - { align: 'center' } + OpAttributeSanitizer.sanitize( + { header: undefined }, + noopSanitizeOptions, + ), + {}, ); + }); + + it('should clamp a header value to 6', () => { assert.deepEqual( - OpAttributeSanitizer.sanitize({ direction: DirectionType.Rtl }, {}), - { direction: 'rtl' } + OpAttributeSanitizer.sanitize({ header: 100 }, noopSanitizeOptions), + { + header: 6, + }, + ); + }); + + it('should keep a valid align value', () => { + assert.deepEqual( + OpAttributeSanitizer.sanitize( + { align: AlignType.Center }, + noopSanitizeOptions, + ), + { align: 'center' }, + ); + }); + + it('should keep a valid direction value', () => { + assert.deepEqual( + OpAttributeSanitizer.sanitize( + { direction: DirectionType.Rtl }, + noopSanitizeOptions, + ), + { direction: 'rtl' }, + ); + }); + + it('should keep a valid indent value', () => { + assert.deepEqual( + OpAttributeSanitizer.sanitize({ indent: 2 }, noopSanitizeOptions), + { + indent: 2, + }, ); - assert.deepEqual(OpAttributeSanitizer.sanitize({ indent: 2 }, {}), { - indent: 2, - }); }); }); }); diff --git a/test/OpToHtmlConverter.test.ts b/test/OpToHtmlConverter.test.ts deleted file mode 100644 index a0aec11..0000000 --- a/test/OpToHtmlConverter.test.ts +++ /dev/null @@ -1,536 +0,0 @@ -import { - OpToHtmlConverter, - IOpToHtmlConverterOptions, -} from './../src/OpToHtmlConverter'; -import { DeltaInsertOp } from './../src/DeltaInsertOp'; -import { InsertDataQuill } from './../src/InsertData'; -import { - ScriptType, - DirectionType, - AlignType, - DataType, -} from './../src/value-types'; - -let assert = require('assert'); - -describe('OpToHtmlConverter', function () { - describe('constructor()', function () { - var op = new DeltaInsertOp('hello'); - it('should instantiate just fine :)', function () { - var conv = new OpToHtmlConverter(op); - assert.equal(conv instanceof OpToHtmlConverter, true); - }); - }); - - describe('prefixClass()', function () { - it('should prefix class if an empty string prefix is not given', () => { - var op = new DeltaInsertOp('aa'); - var c = new OpToHtmlConverter(op, { classPrefix: '' }); - var act = c.prefixClass('my-class'); - assert.equal(act, 'my-class'); - - c = new OpToHtmlConverter(op, { classPrefix: 'xx' }); - act = c.prefixClass('my-class'); - assert.equal(act, 'xx-my-class'); - - c = new OpToHtmlConverter(op); - act = c.prefixClass('my-class'); - assert.equal(act, 'ql-my-class'); - }); - }); - - describe('getCssStyles()', function () { - var op = new DeltaInsertOp('hello'); - it('should return styles', () => { - var c = new OpToHtmlConverter(op); - assert.deepEqual(c.getCssStyles(), []); - - var o = new DeltaInsertOp('f', { background: 'red', attr1: 'red' }); - c = new OpToHtmlConverter(o, { - customCssStyles: (op) => { - if (op.attributes['attr1']) { - return `color:${op.attributes['attr1']}`; - } - }, - }); - assert.deepEqual(c.getCssStyles(), ['color:red', 'background-color:red']); - - new DeltaInsertOp('f', { background: 'red', attr1: 'red' }); - c = new OpToHtmlConverter(o, { - customCssStyles: (op) => { - if (op.attributes['attr1']) { - return [`color:${op.attributes['attr1']}`]; - } - }, - }); - assert.deepEqual(c.getCssStyles(), ['color:red', 'background-color:red']); - - o = new DeltaInsertOp('f', { background: 'red', color: 'blue' }); - c = new OpToHtmlConverter(o); - assert.deepEqual(c.getCssStyles(), [ - 'color:blue', - 'background-color:red', - ]); - - c = new OpToHtmlConverter(o, { allowBackgroundClasses: true }); - assert.deepEqual(c.getCssStyles(), ['color:blue']); - }); - - it('should return inline styles', function () { - var op = new DeltaInsertOp('hello'); - var c = new OpToHtmlConverter(op, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), []); - - var attrs = { - indent: 1, - align: AlignType.Center, - direction: DirectionType.Rtl, - font: 'roman', - size: 'small', - background: 'red', - }; - var o = new DeltaInsertOp('f', attrs); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - var styles = [ - 'background-color:red', - 'padding-right:3em', - 'text-align:center', - 'direction:rtl', - 'font-family:roman', - 'font-size: 0.75em', - ]; - assert.deepEqual(c.getCssStyles(), styles); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), attrs); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), styles); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Video, ''), attrs); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), styles); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, ''), attrs); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), styles); - - o = new DeltaInsertOp('f', attrs); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), styles); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), { - direction: DirectionType.Rtl, - }); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), ['direction:rtl; text-align:inherit']); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), { - indent: 2, - }); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), ['padding-left:6em']); - - // Ignore invalid direction - o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), { - direction: 'ltr', - } as any); - c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), []); - }); - - it('should allow setting inline styles', function () { - var op = new DeltaInsertOp('f', { size: 'huge' }); - var c = new OpToHtmlConverter(op, { - inlineStyles: { - size: { - huge: 'font-size: 6em', - }, - }, - }); - assert.deepEqual(c.getCssStyles(), ['font-size: 6em']); - }); - - it('should fall back to defaults for inline styles that are not specified', function () { - // Here there's no inlineStyle specified for "size", but we still render it - // because we fall back to the default. - var op = new DeltaInsertOp('f', { size: 'huge' }); - var c = new OpToHtmlConverter(op, { - inlineStyles: { - font: { - serif: 'font-family: serif', - }, - }, - }); - assert.deepEqual(c.getCssStyles(), ['font-size: 2.5em']); - }); - - it('should render default font inline styles correctly', function () { - var op = new DeltaInsertOp('f', { font: 'monospace' }); - var c = new OpToHtmlConverter(op, { inlineStyles: {} }); - assert.deepEqual(c.getCssStyles(), [ - 'font-family: Monaco, Courier New, monospace', - ]); - }); - - it('should return nothing for an inline style with no mapped entry', function () { - var op = new DeltaInsertOp('f', { size: 'biggest' }); - var c = new OpToHtmlConverter(op, { - inlineStyles: { - size: { - small: 'font-size: 0.75em', - }, - }, - }); - assert.deepEqual(c.getCssStyles(), []); - }); - - it('should return nothing for an inline style where the converter returns undefined', function () { - var op = new DeltaInsertOp('f', { size: 'biggest' }); - var c = new OpToHtmlConverter(op, { - inlineStyles: { - size: () => undefined, - }, - }); - assert.deepEqual(c.getCssStyles(), []); - }); - }); - - describe('getCssClasses()', function () { - it('should return prefixed classes', () => { - var op = new DeltaInsertOp('hello'); - const options: IOpToHtmlConverterOptions = { - customCssClasses: (op) => { - if (op.attributes.size === 'small') { - return ['small-size']; - } - }, - }; - var c = new OpToHtmlConverter(op, options); - assert.deepEqual(c.getCssClasses(), []); - - var attrs = { - indent: 1, - align: AlignType.Center, - direction: DirectionType.Rtl, - font: 'roman', - size: 'small', - background: 'red', - }; - var o = new DeltaInsertOp('f', attrs); - c = new OpToHtmlConverter(o, options); - var classes = [ - 'small-size', - 'ql-indent-1', - 'ql-align-center', - 'ql-direction-rtl', - 'ql-font-roman', - 'ql-size-small', - ]; - assert.deepEqual(c.getCssClasses(), classes); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), attrs); - c = new OpToHtmlConverter(o, options); - assert.deepEqual(c.getCssClasses(), classes.concat('ql-image')); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Video, ''), attrs); - c = new OpToHtmlConverter(o, options); - assert.deepEqual(c.getCssClasses(), classes.concat('ql-video')); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, ''), attrs); - c = new OpToHtmlConverter(o, options); - assert.deepEqual(c.getCssClasses(), classes.concat('ql-formula')); - - o = new DeltaInsertOp('f', attrs); - c = new OpToHtmlConverter(o, { - ...options, - allowBackgroundClasses: true, - }); - assert.deepEqual(c.getCssClasses(), classes.concat('ql-background-red')); - }); - - it('should return no classes if `inlineStyles` is specified', function () { - var attrs = { - indent: 1, - align: AlignType.Center, - direction: DirectionType.Rtl, - font: 'roman', - size: 'small', - background: 'red', - }; - var o = new DeltaInsertOp('f', attrs); - var c = new OpToHtmlConverter(o, { inlineStyles: {} }); - assert.deepEqual(c.getCssClasses(), []); - }); - }); - - describe('getTags()', function () { - it('should return tags to render this op', () => { - var op = new DeltaInsertOp('hello'); - var c = new OpToHtmlConverter(op); - assert.deepEqual(c.getTags(), []); - - var o = new DeltaInsertOp('', { code: true }); - c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTags(), ['code']); - - [ - ['image', 'img'], - ['video', 'iframe'], - ['formula', 'span'], - ].forEach((item: DataType[]) => { - o = new DeltaInsertOp(new InsertDataQuill(item[0], '')); - c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTags(), [item[1]]); - }); - - [ - ['blockquote', 'blockquote'], - ['code-block', 'pre'], - ['list', 'li'], - ['header', 'h2'], - ].forEach((item) => { - o = new DeltaInsertOp('', { [item[0]]: true, header: 2 }); - c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTags(), [item[1]]); - }); - - [ - ['blockquote', 'blockquote'], - ['code-block', 'div'], - ['bold', 'h2'], - ['list', 'li'], - ['header', 'h2'], - ].forEach((item) => { - o = new DeltaInsertOp('', { [item[0]]: true, header: 2 }); - c = new OpToHtmlConverter(o, { - customTag: (format) => { - if (format === 'code-block') { - return 'div'; - } - if (format === 'bold') { - return 'b'; - } - }, - }); - assert.deepEqual(c.getTags(), [item[1]]); - }); - - [ - ['blockquote', 'blockquote'], - ['code-block', 'pre'], - ['list', 'li'], - ['attr1', 'attr1'], - ].forEach((item) => { - o = new DeltaInsertOp('', { [item[0]]: true, renderAsBlock: true }); - c = new OpToHtmlConverter(o, { - customTag: (format, op) => { - if (format === 'renderAsBlock' && op.attributes['attr1']) { - return 'attr1'; - } - }, - }); - assert.deepEqual(c.getTags(), [item[1]]); - }); - - var attrs = { - link: 'http', - script: ScriptType.Sub, - bold: true, - italic: true, - strike: true, - underline: true, - attr1: true, - }; - o = new DeltaInsertOp('', attrs); - c = new OpToHtmlConverter(o, { - customTag: (format) => { - if (format === 'bold') { - return 'b'; - } - if (format === 'attr1') { - return 'attr2'; - } - }, - }); - assert.deepEqual(c.getTags(), ['a', 'sub', 'b', 'em', 's', 'u', 'attr2']); - }); - }); - - describe('getTagAttributes()', function () { - it('should return tag attributes', () => { - var op = new DeltaInsertOp('hello'); - var c = new OpToHtmlConverter(op); - assert.deepEqual(c.getTagAttributes(), []); - - var o = new DeltaInsertOp('', { code: true, color: 'red' }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), []); - - var o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, 'http:'), { - color: 'red', - }); - var c = new OpToHtmlConverter(o, { - customTagAttributes: (op) => { - if (op.attributes.color) { - return { - 'data-color': op.attributes.color, - }; - } - }, - }); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'data-color', value: 'red' }, - { key: 'class', value: 'ql-image' }, - { key: 'src', value: 'http:' }, - ]); - - var o = new DeltaInsertOp(new InsertDataQuill(DataType.Image, 'http:'), { - width: '200', - }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'class', value: 'ql-image' }, - { key: 'width', value: '200' }, - { key: 'src', value: 'http:' }, - ]); - - var o = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, '-'), { - color: 'red', - }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'class', value: 'ql-formula' }, - ]); - - var o = new DeltaInsertOp(new InsertDataQuill(DataType.Video, 'http:'), { - color: 'red', - }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'class', value: 'ql-video' }, - { key: 'frameborder', value: '0' }, - { key: 'allowfullscreen', value: 'true' }, - { key: 'src', value: 'http:' }, - ]); - - var o = new DeltaInsertOp('link', { color: 'red', link: 'l' }); - - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'style', value: 'color:red' }, - { key: 'href', value: 'l' }, - ]); - - var c = new OpToHtmlConverter(o, { linkRel: 'nofollow' }); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'style', value: 'color:red' }, - { key: 'href', value: 'l' }, - { key: 'rel', value: 'nofollow' }, - ]); - - var o = new DeltaInsertOp('', { 'code-block': 'javascript' }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), [ - { key: 'data-language', value: 'javascript' }, - ]); - - var o = new DeltaInsertOp('', { 'code-block': true }); - var c = new OpToHtmlConverter(o); - assert.deepEqual(c.getTagAttributes(), []); - }); - }); - - describe('getContent()', function () { - it('should return proper content depending on type', () => { - var o = new DeltaInsertOp('aa', { indent: 1 }); - var c = new OpToHtmlConverter(o); - assert.equal(c.getContent(), ''); - - o = new DeltaInsertOp('sss<&>,', { bold: true }); - c = new OpToHtmlConverter(o); - assert.equal(c.getContent(), 'sss<&>,'); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, 'ff'), { - bold: true, - }); - c = new OpToHtmlConverter(o); - assert.equal(c.getContent(), 'ff'); - - o = new DeltaInsertOp(new InsertDataQuill(DataType.Video, 'ff'), { - bold: true, - }); - c = new OpToHtmlConverter(o); - assert.equal(c.getContent(), ''); - }); - }); - - describe('html retrieval', function () { - var attributes = { - link: 'http://', - bold: true, - italic: true, - underline: true, - strike: true, - script: ScriptType.Super, - font: 'verdana', - size: 'small', - color: 'red', - background: '#fff', - }; - var op1 = new DeltaInsertOp('aaa', attributes); - var c1 = new OpToHtmlConverter(op1); - var result = [ - '', - '', - 'aaa', - '', - '', - ].join(''); - - describe('getHtmlParts()', function () { - it('should return inline html', () => { - var op = new DeltaInsertOp(''); - var c1 = new OpToHtmlConverter(op); - var act = c1.getHtmlParts(); - assert.equal(act.closingTag + act.content + act.openingTag, ''); - - c1 = new OpToHtmlConverter(op1); - act = c1.getHtmlParts(); - assert.equal(act.openingTag + act.content + act.closingTag, result); - }); - }); - - describe('getHtml()', function () { - it('should return inline html', () => { - c1 = new OpToHtmlConverter(op1); - var act = c1.getHtml(); - assert.equal(act, result); - - var op = new DeltaInsertOp('\n', { bold: true }); - c1 = new OpToHtmlConverter(op, { encodeHtml: false }); - assert.equal(c1.getHtml(), '\n'); - - var op = new DeltaInsertOp('\n', { color: '#fff' }); - c1 = new OpToHtmlConverter(op); - assert.equal(c1.getHtml(), '\n'); - - var op = new DeltaInsertOp('\n', { 'code-block': 'javascript' }); - c1 = new OpToHtmlConverter(op); - assert.equal(c1.getHtml(), '

');
-
-        var op = new DeltaInsertOp(
-          new InsertDataQuill(DataType.Image, 'http://')
-        );
-        c1 = new OpToHtmlConverter(op, {
-          customCssClasses: (_) => {
-            return 'ql-custom';
-          },
-        });
-        assert.equal(
-          c1.getHtml(),
-          ''
-        );
-      });
-    });
-  });
-});
diff --git a/test/QuillDeltaToHtmlConverter.test.ts b/test/QuillDeltaToHtmlConverter.test.ts
deleted file mode 100644
index 5a04560..0000000
--- a/test/QuillDeltaToHtmlConverter.test.ts
+++ /dev/null
@@ -1,1033 +0,0 @@
-import 'mocha';
-import * as assert from 'assert';
-
-import { DeltaInsertOp } from './../src/DeltaInsertOp';
-import { QuillDeltaToHtmlConverter } from './../src/QuillDeltaToHtmlConverter';
-import { callWhenXEqualY } from './_helper';
-
-import { delta1 } from './data/delta1';
-import { GroupType, ListType } from './../src/value-types';
-import { encodeHtml } from './../src/funcs-html';
-
-describe('QuillDeltaToHtmlConverter', function () {
-  describe('constructor()', function () {
-    var hugeOps = [
-      { insert: 'huge', attributes: { size: 'huge', attr1: 'red' } },
-      { insert: '\n' },
-    ];
-
-    it('should instantiate return proper html', function () {
-      var qdc = new QuillDeltaToHtmlConverter(delta1.ops, {
-        classPrefix: 'noz',
-      });
-      var html = qdc.convert();
-      assert.equal(html, delta1.html);
-    });
-
-    it('should set default inline styles for `inlineStyles: true`', function () {
-      var qdc = new QuillDeltaToHtmlConverter(hugeOps, {
-        inlineStyles: true,
-        customCssStyles: (op) => {
-          if (op.attributes['attr1'] === 'red') {
-            return ['color:red'];
-          }
-        },
-      });
-      var html = qdc.convert();
-      assert.equal(
-        html.includes('huge'),
-        true,
-        html
-      );
-    });
-
-    it('should set default inline styles when `inlineStyles` is a truthy non-object', function () {
-      var qdc = new QuillDeltaToHtmlConverter(hugeOps, {
-        inlineStyles: 1,
-      } as any);
-      var html = qdc.convert();
-      assert.equal(
-        html.includes('huge'),
-        true,
-        html
-      );
-    });
-
-    it('should allow setting inline styles', function () {
-      var qdc = new QuillDeltaToHtmlConverter(hugeOps, {
-        inlineStyles: {
-          size: {
-            huge: 'font-size: 6em',
-          },
-        },
-      });
-      var html = qdc.convert();
-      assert.equal(
-        html.includes('huge'),
-        true,
-        html
-      );
-    });
-  });
-
-  describe('convert()', function () {
-    var ops2 = [
-      { insert: 'this is text' },
-      { insert: '\n' },
-      { insert: 'this is code' },
-      { insert: '\n', attributes: { 'code-block': true } },
-      { insert: 'this is code TOO!' },
-      { insert: '\n', attributes: { 'code-block': true } },
-    ];
-
-    it('should render html', function () {
-      var qdc = new QuillDeltaToHtmlConverter(ops2);
-
-      var html = qdc.convert();
-      assert.equal(html.indexOf('
this is code') > -1, true, html);
-    });
-
-    it('should render mention', function () {
-      let ops = [
-        {
-          insert: 'mention',
-          attributes: {
-            mentions: true,
-            mention: {
-              'end-point': 'http://abc.com',
-              slug: 'a',
-              class: 'abc',
-              target: '_blank',
-            },
-          },
-        },
-      ];
-      var qdc = new QuillDeltaToHtmlConverter(ops);
-      var html = qdc.convert();
-      assert.equal(
-        html,
-        [
-          '

mention

', - ].join('') - ); - - var qdc = new QuillDeltaToHtmlConverter([ - { - insert: 'mention', - attributes: { - mentions: true, - mention: { slug: 'aa' }, - }, - }, - ]); - var html = qdc.convert(); - assert.equal( - html, - ['

mention

'].join('') - ); - }); - it('should render links with rels', function () { - var ops = [ - { - attributes: { - link: '#', - rel: 'nofollow noopener', - }, - insert: 'external link', - }, - { - attributes: { - link: '#', - }, - insert: 'internal link', - }, - ]; - var qdc = new QuillDeltaToHtmlConverter(ops, { - linkRel: 'license', - }); - var html = qdc.convert(); - assert.equal( - html, - '

external linkinternal link

' - ); - - qdc = new QuillDeltaToHtmlConverter(ops); - html = qdc.convert(); - assert.equal( - html, - '

external linkinternal link

' - ); - }); - it('should render image and image links', function () { - let ops = [ - { insert: { image: 'http://yahoo.com/abc.jpg' } }, - { - insert: { image: 'http://yahoo.com/def.jpg' }, - attributes: { link: 'http://aha' }, - }, - ]; - let qdc = new QuillDeltaToHtmlConverter(ops); - let html = qdc.convert(); - assert.equal( - html, - [ - '

', - '', - '', - '', - '', - '

', - ].join('') - ); - }); - - it('should open and close list tags', function () { - var ops4 = [ - { insert: 'mr\n' }, - { insert: 'hello' }, - { insert: '\n', attributes: { list: 'ordered' } }, - { insert: 'there' }, - { insert: '\n', attributes: { list: 'bullet' } }, - { insert: '\n', attributes: { list: 'ordered' } }, - ]; - var qdc = new QuillDeltaToHtmlConverter(ops4); - var html = qdc.convert(); - - assert.equal(html.indexOf('

mr') > -1, true); - assert.equal(html.indexOf('

  • there') > -1, true); - }); - - it('should render as separate paragraphs', function () { - var ops4 = [{ insert: 'hello\nhow areyou?\n\nbye' }]; - var qdc = new QuillDeltaToHtmlConverter(ops4, { - multiLineParagraph: false, - }); - var html = qdc.convert(); - - assert.equal( - html, - '

    hello

    how areyou?


    bye

    ' - ); - }); - - it('should create checked/unchecked lists', function () { - var ops4 = [ - { insert: 'hello' }, - { insert: '\n', attributes: { list: 'checked' } }, - { insert: 'there' }, - { insert: '\n', attributes: { list: 'unchecked' } }, - { insert: 'man' }, - { insert: '\n', attributes: { list: 'checked' } }, - { insert: 'not done' }, - { insert: '\n', attributes: { indent: 1, list: 'unchecked' } }, - ]; - var qdc = new QuillDeltaToHtmlConverter(ops4); - var html = qdc.convert(); - assert.equal( - html, - [ - '
      ', - '
    • hello
    • ', - '
    • there
    • ', - '
    • man', - '
      • not done
      ', - '
    • ', - '
    ', - ].join('') - ); - }); - - it('should wrap positional styles in right tag', function () { - var ops4 = [ - { insert: 'mr' }, - { insert: '\n', attributes: { align: 'center' } }, - { insert: '\n', attributes: { direction: 'rtl' } }, - { insert: '\n', attributes: { indent: 2 } }, - ]; - var qdc = new QuillDeltaToHtmlConverter(ops4, { paragraphTag: 'div' }); - var html = qdc.convert(); - assert.equal(html.indexOf('
    -1, true); - assert.equal(html.indexOf('
    -1, true); - assert.equal(html.indexOf('

    -1, true); - }); - it('should render target attr correctly', () => { - let ops = [ - { attributes: { target: '_self', link: 'http://#' }, insert: 'A' }, - { attributes: { target: '_blank', link: 'http://#' }, insert: 'B' }, - { attributes: { link: 'http://#' }, insert: 'C' }, - { insert: '\n' }, - ]; - let qdc = new QuillDeltaToHtmlConverter(ops, { linkTarget: '' }); - let html = qdc.convert(); - assert.equal( - html, - [ - `

    A`, - `B`, - `C

    `, - ].join('') - ); - - qdc = new QuillDeltaToHtmlConverter(ops); - html = qdc.convert(); - assert.equal( - html, - [ - `

    A`, - `B`, - `C

    `, - ].join('') - ); - - qdc = new QuillDeltaToHtmlConverter(ops, { linkTarget: '_top' }); - html = qdc.convert(); - assert.equal( - html, - [ - `

    A`, - `B`, - `C

    `, - ].join('') - ); - }); - - it('should convert using custom url sanitizer', () => { - let ops = [ - { attributes: { link: 'http://yahoo<%=abc%>/ed' }, insert: 'test' }, - { attributes: { link: 'http://abc<' }, insert: 'hi' }, - ]; - - let qdc = new QuillDeltaToHtmlConverter(ops, { - urlSanitizer: (link: string) => { - if (link.indexOf('<%') > -1) { - return link; - } - return undefined; - }, - }); - assert.equal( - qdc.convert(), - [ - `

    test`, - `hi

    `, - ].join('') - ); - }); - - it('should render empty table', () => { - let ops = [ - { - insert: '\n\n\n', - attributes: { - table: 'row-1', - }, - }, - { - attributes: { - table: 'row-2', - }, - insert: '\n\n\n', - }, - { - attributes: { - table: 'row-3', - }, - insert: '\n\n\n', - }, - { - insert: '\n', - }, - ]; - - let qdc = new QuillDeltaToHtmlConverter(ops); - assert.equal( - qdc.convert(), - [ - ``, - ``, - ``, - ``, - `









    `, - `


    `, - ].join('') - ); - }); - - it('should render singe cell table', () => { - let ops = [ - { - insert: 'cell', - }, - { - insert: '\n', - attributes: { - table: 'row-1', - }, - }, - ]; - - let qdc = new QuillDeltaToHtmlConverter(ops); - assert.equal( - qdc.convert(), - [ - ``, - ``, - `
    cell
    `, - ].join('') - ); - }); - - it('should render filled table', () => { - let ops = [ - { - insert: '11', - }, - { - attributes: { - table: 'row-1', - }, - insert: '\n', - }, - { - insert: '12', - }, - { - attributes: { - table: 'row-1', - }, - insert: '\n', - }, - { - insert: '13', - }, - { - attributes: { - table: 'row-1', - }, - insert: '\n', - }, - { - insert: '21', - }, - { - attributes: { - table: 'row-2', - }, - insert: '\n', - }, - { - insert: '22', - }, - { - attributes: { - table: 'row-2', - }, - insert: '\n', - }, - { - insert: '23', - }, - { - attributes: { - table: 'row-2', - }, - insert: '\n', - }, - { - insert: '31', - }, - { - attributes: { - table: 'row-3', - }, - insert: '\n', - }, - { - insert: '32', - }, - { - attributes: { - table: 'row-3', - }, - insert: '\n', - }, - { - insert: '33', - }, - { - attributes: { - table: 'row-3', - }, - insert: '\n', - }, - { - insert: '\n', - }, - ]; - - let qdc = new QuillDeltaToHtmlConverter(ops); - assert.equal( - qdc.convert(), - [ - ``, - ``, - ``, - ``, - `
    111213
    212223
    313233
    `, - `


    `, - ].join('') - ); - }); - }); - - describe('custom types', () => { - it(`should return empty string if renderer not defined for - custom blot`, () => { - let ops = [{ insert: { customstuff: 'my val' } }]; - let qdc = new QuillDeltaToHtmlConverter(ops); - assert.equal(qdc.convert(), '

    '); - }); - it('should render custom insert types with given renderer', () => { - let ops = [ - { insert: { bolditalic: 'my text' } }, - { insert: { blah: 1 } }, - ]; - let qdc = new QuillDeltaToHtmlConverter(ops); - qdc.renderCustomWith((op) => { - if (op.insert.type === 'bolditalic') { - return '' + op.insert.value + ''; - } - return 'unknown'; - }); - let html = qdc.convert(); - assert.equal(html, '

    my textunknown

    '); - }); - - it('should render custom insert types as blocks if renderAsBlock is specified', () => { - let ops = [ - { insert: 'hello ' }, - { insert: { myblot: 'my friend' } }, - { insert: '!' }, - { insert: { myblot: 'how r u?' }, attributes: { renderAsBlock: true } }, - ]; - let qdc = new QuillDeltaToHtmlConverter(ops); - qdc.renderCustomWith((op) => { - if (op.insert.type === 'myblot') { - return op.attributes.renderAsBlock - ? '
    ' + op.insert.value + '
    ' - : op.insert.value; - } - return 'unknown'; - }); - let html = qdc.convert(); - assert.equal(html, '

    hello my friend!

    how r u?
    '); - }); - - it('should render custom insert types in code blocks with given renderer', () => { - let ops = [ - { insert: { colonizer: ':' } }, - { insert: '\n', attributes: { 'code-block': true } }, - { insert: 'code1' }, - { insert: '\n', attributes: { 'code-block': true } }, - { insert: { colonizer: ':' } }, - { insert: '\n', attributes: { 'code-block': true } }, - ]; - let renderer = (op: DeltaInsertOp) => { - if (op.insert.type === 'colonizer') { - return op.insert.value; - } - return ''; - }; - let qdc = new QuillDeltaToHtmlConverter(ops.slice(0, 2)); - qdc.renderCustomWith(renderer); - assert.equal(qdc.convert(), '
    :
    '); - - qdc = new QuillDeltaToHtmlConverter(ops); - qdc.renderCustomWith(renderer); - assert.equal(qdc.convert(), '
    :\ncode1\n:
    '); - - qdc = new QuillDeltaToHtmlConverter(ops, { - customTag: (format) => { - if (format === 'code-block') { - return 'code'; - } - }, - }); - qdc.renderCustomWith(renderer); - assert.equal(qdc.convert(), ':\ncode1\n:'); - }); - - it('should render custom insert types in headers with given renderer', () => { - let ops = [ - { insert: { colonizer: ':' } }, - { insert: '\n', attributes: { header: 1 } }, - { insert: 'hello' }, - { insert: '\n', attributes: { header: 1 } }, - { insert: { colonizer: ':' } }, - { insert: '\n', attributes: { header: 1 } }, - ]; - let renderer = (op: DeltaInsertOp) => { - if (op.insert.type === 'colonizer') { - return op.insert.value; - } - return ''; - }; - let qdc = new QuillDeltaToHtmlConverter(ops.slice(0, 2)); - qdc.renderCustomWith(renderer); - assert.equal(qdc.convert(), '

    :

    '); - - qdc = new QuillDeltaToHtmlConverter(ops); - qdc.renderCustomWith(renderer); - assert.equal(qdc.convert(), '

    :
    hello
    :

    '); - }); - }); - - describe('_getListTag()', function () { - it('should return proper list tag', function () { - var op = new DeltaInsertOp('\n', { list: ListType.Ordered }); - var qdc = new QuillDeltaToHtmlConverter(delta1.ops); - assert.equal(qdc._getListTag(op), 'ol'); - - var op = new DeltaInsertOp('\n', { list: ListType.Bullet }); - assert.equal(qdc._getListTag(op), 'ul'); - - var op = new DeltaInsertOp('\n', { list: ListType.Checked }); - assert.equal(qdc._getListTag(op), 'ul'); - - var op = new DeltaInsertOp('\n', { list: ListType.Unchecked }); - assert.equal(qdc._getListTag(op), 'ul'); - - var op = new DeltaInsertOp('d'); - assert.equal(qdc._getListTag(op), ''); - }); - }); - - describe(' prepare data before inline and block renders', function () { - var ops: any; - beforeEach(function () { - ops = [ - { insert: 'Hello' }, - { insert: ' my ', attributes: { italic: true } }, - { insert: '\n', attributes: { italic: true } }, - { insert: ' name is joey' }, - ].map((v: any) => new DeltaInsertOp(v.insert, v.attributes)); - }); - - describe('renderInlines()', function () { - it('should render inlines', function () { - var qdc = new QuillDeltaToHtmlConverter([]); - var inlines = qdc._renderInlines(ops); - assert.equal( - inlines, - ['

    Hello', ' my
    name is joey

    '].join('') - ); - - qdc = new QuillDeltaToHtmlConverter([], { paragraphTag: 'div' }); - var inlines = qdc._renderInlines(ops); - assert.equal( - inlines, - '
    Hello my
    name is joey
    ' - ); - - qdc = new QuillDeltaToHtmlConverter([], { paragraphTag: '' }); - var inlines = qdc._renderInlines(ops); - assert.equal(inlines, 'Hello my
    name is joey'); - }); - - it('should render inlines custom tag', function () { - var qdc = new QuillDeltaToHtmlConverter([], { - customTag: (format) => { - if (format === 'italic') { - return 'i'; - } - }, - }); - var inlines = qdc._renderInlines(ops); - assert.equal( - inlines, - ['

    Hello', ' my
    name is joey

    '].join('') - ); - - qdc = new QuillDeltaToHtmlConverter([], { paragraphTag: 'div' }); - var inlines = qdc._renderInlines(ops); - assert.equal( - inlines, - '
    Hello my
    name is joey
    ' - ); - - qdc = new QuillDeltaToHtmlConverter([], { paragraphTag: '' }); - var inlines = qdc._renderInlines(ops); - assert.equal(inlines, 'Hello my
    name is joey'); - }); - - it('should render plain new line string', function () { - var ops = [new DeltaInsertOp('\n')]; - var qdc = new QuillDeltaToHtmlConverter([]); - assert.equal(qdc._renderInlines(ops), '


    '); - }); - - it('should render styled new line string', function () { - var ops = [new DeltaInsertOp('\n', { font: 'arial' })]; - var qdc = new QuillDeltaToHtmlConverter([]); - assert.equal(qdc._renderInlines(ops), '


    '); - - var qdc = new QuillDeltaToHtmlConverter([], { paragraphTag: '' }); - assert.equal(qdc._renderInlines(ops), '
    '); - }); - - it('should render when first line is new line', function () { - var ops = [new DeltaInsertOp('\n'), new DeltaInsertOp('aa')]; - var qdc = new QuillDeltaToHtmlConverter([]); - assert.equal(qdc._renderInlines(ops), '


    aa

    '); - }); - - it('should render when last line is new line', function () { - var ops = [new DeltaInsertOp('aa'), new DeltaInsertOp('\n')]; - var qdc = new QuillDeltaToHtmlConverter([]); - assert.equal(qdc._renderInlines(ops), '

    aa

    '); - }); - - it('should render mixed lines', function () { - var ops = [new DeltaInsertOp('aa'), new DeltaInsertOp('bb')]; - var nlop = new DeltaInsertOp('\n'); - var stylednlop = new DeltaInsertOp('\n', { - color: '#333', - italic: true, - }); - var qdc = new QuillDeltaToHtmlConverter([]); - assert.equal(qdc._renderInlines(ops), '

    aabb

    '); - - var ops0 = [nlop, ops[0], nlop, ops[1]]; - assert.equal(qdc._renderInlines(ops0), '


    aa
    bb

    '); - - var ops4 = [ops[0], stylednlop, stylednlop, stylednlop, ops[1]]; - assert.equal( - qdc._renderInlines(ops4), - ['

    aa


    bb

    '].join('') - ); - }); - }); - - describe('renderBlock()', function () { - var op = new DeltaInsertOp('\n', { header: 3, indent: 2 }); - var inlineop = new DeltaInsertOp('hi there'); - it('should render container block', function () { - var qdc = new QuillDeltaToHtmlConverter([]); - var blockhtml = qdc._renderBlock(op, [inlineop]); - assert.equal( - blockhtml, - ['

    ', 'hi there

    '].join('') - ); - - var qdc = new QuillDeltaToHtmlConverter([]); - var blockhtml = qdc._renderBlock(op, []); - assert.equal( - blockhtml, - ['

    ', '

    '].join('') - ); - }); - - it('should correctly render code block', function () { - let ops = [ - { - insert: 'line 1', - }, - { - attributes: { - 'code-block': true, - }, - insert: '\n', - }, - { - insert: 'line 2', - }, - { - attributes: { - 'code-block': true, - }, - insert: '\n', - }, - { - insert: 'line 3', - }, - { - attributes: { - 'code-block': 'javascript', - }, - insert: '\n', - }, - { - insert: '

    line 4

    ', - }, - { - attributes: { - 'code-block': true, - }, - insert: '\n', - }, - { - insert: 'line 5', - }, - { - attributes: { - 'code-block': 'ja"va', - }, - insert: '\n', - }, - ]; - //console.log(encodeHtml("

    line 4

    ")); - var qdc = new QuillDeltaToHtmlConverter(ops); - let html = qdc.convert(); - assert.equal( - html, - [ - '
    line 1\nline 2
    ', - '
    line 3
    ', - '
    ',
    -            encodeHtml('

    line 4

    '), - '\nline 5' + '
    ', - ].join('') - ); - - qdc = new QuillDeltaToHtmlConverter(ops, { - multiLineCodeblock: false, - }); - html = qdc.convert(); - assert.equal( - '
    line 1
    line 2
    ' + - '
    line 3
    ' + - '
    ' +
    -            encodeHtml('

    line 4

    ') + - '
    ' + - '
    line 5
    ', - html - ); - qdc = new QuillDeltaToHtmlConverter([ops[0], ops[1]]); - html = qdc.convert(); - assert.equal(html, '
    line 1
    '); - }); - }); - - it('should correctly render custom text block', function () { - let ops = [ - { - insert: 'line 1', - }, - { - attributes: { - renderAsBlock: true, - attr1: true, - }, - insert: '\n', - }, - { - insert: 'line 2', - }, - { - attributes: { - renderAsBlock: true, - attr1: true, - }, - insert: '\n', - }, - { - insert: 'line 3', - }, - { - attributes: { - renderAsBlock: true, - attr2: true, - }, - insert: '\n', - }, - { - insert: '

    line 4

    ', - }, - { - attributes: { - renderAsBlock: true, - attr1: true, - }, - insert: '\n', - }, - { - insert: 'line 5', - }, - { - attributes: { - renderAsBlock: true, - attr1: 'test', - }, - insert: '\n', - }, - ]; - //console.log(encodeHtml("

    line 4

    ")); - var qdc = new QuillDeltaToHtmlConverter(ops, { - customTag: (format, op) => { - if (format === 'renderAsBlock' && op.attributes['attr1'] === 'test') { - return 'test'; - } - }, - customTagAttributes: (op) => { - if (op.attributes['attr1'] === 'test') { - return { - attr1: op.attributes['attr1'], - }; - } - }, - customCssClasses: (op) => { - if (op.attributes['attr1'] === 'test') { - return ['ql-test']; - } - }, - customCssStyles: (op) => { - if (op.attributes['attr1'] === 'test') { - return ['color:red']; - } - }, - }); - let html = qdc.convert(); - assert.equal( - html, - [ - '

    line 1
    line 2

    ', - '

    line 3

    ', - '

    ', - encodeHtml('

    line 4

    '), - '

    ', - 'line 5', - ].join('') - ); - - qdc = new QuillDeltaToHtmlConverter(ops, { - multiLineCustomBlock: false, - }); - html = qdc.convert(); - assert.equal( - '

    line 1

    line 2

    ' + - '

    line 3

    ' + - '

    ' + - encodeHtml('

    line 4

    ') + - '

    ' + - '

    line 5

    ', - html - ); - qdc = new QuillDeltaToHtmlConverter([ops[0], ops[1]]); - html = qdc.convert(); - assert.equal(html, '

    line 1

    '); - }); - - describe('before n after renders()', function () { - var ops = [ - { insert: 'hello', attributes: { bold: true } }, - { insert: '\n', attributes: { bold: true } }, - { insert: 'how r u?' }, - { insert: 'r u fine' }, - { insert: '\n', attributes: { blockquote: true } }, - { insert: { video: 'http://' } }, - { insert: 'list item 1' }, - { insert: '\n', attributes: { list: 'bullet' } }, - { insert: 'list item 1 indented' }, - { insert: '\n', attributes: { list: 'bullet', indent: 1 } }, - ]; - var qdc = new QuillDeltaToHtmlConverter(ops); - - it('should call before/after render callbacks ', function (done) { - let status = { x: 0, y: 8 }; - qdc.beforeRender((groupType, data) => { - if (groupType === GroupType.InlineGroup) { - var op = (data).ops[0]; - assert.ok(op.attributes.bold); - } else if (groupType === GroupType.Video) { - var op = (data).op; - assert.ok(op.insert.type === 'video'); - } else if (groupType === GroupType.Block) { - var d = data; - assert.ok(d.op.attributes.blockquote && d.ops.length === 2); - } else { - var d = data; - assert.ok(d.items.length === 1); - } - status.x++; - return ''; - }); - qdc.afterRender((groupType, html) => { - if (groupType === GroupType.InlineGroup) { - assert.ok(html.indexOf('hello') > -1); - } else if (groupType === GroupType.Video) { - assert.ok(html.indexOf(' -1); - } else if (groupType === GroupType.Block) { - assert.ok(html.indexOf(' -1); - } else { - assert.ok(html.indexOf('list item 1
      -1); - } - status.x++; - return html; - }); - qdc.convert(); - callWhenXEqualY(status, done); - }); - - it(`should call before render with block grouptype for align - indent and direction`, (done) => { - let ops = [ - { insert: 'align' }, - { insert: '\n', attributes: { align: 'right' } }, - { insert: 'rtl' }, - { insert: '\n', attributes: { direction: 'rtl' } }, - { insert: 'indent 1' }, - { insert: '\n', attributes: { indent: 1 } }, - ]; - let status = { x: 0, y: 3 }; - let qdc = new QuillDeltaToHtmlConverter(ops); - qdc.beforeRender((gtype: any) => { - gtype === 'block' && status.x++; - return ''; - }); - qdc.convert(); - callWhenXEqualY(status, done); - }); - - it('should use my custom html if I return from before call back', function () { - var c = new QuillDeltaToHtmlConverter([ - { insert: { video: 'http' } }, - { insert: 'aa' }, - ]); - c.beforeRender(() => { - return ''; - }); - var v = c.convert(); - assert.ok(v.indexOf(' -1); - }); - - it('should register and use callbacks if they are functions', function () { - var c = new QuillDeltaToHtmlConverter([ - { insert: { video: 'http' } }, - { insert: 'aa' }, - ]); - var dummy = (): any => ''; - - c.beforeRender(dummy()); - c.afterRender(dummy()); - v = c.convert(); - assert.ok(v.indexOf('iframe') > -1); - - c.beforeRender(dummy); - var v = c.convert(); - assert.ok(v.indexOf(' -1 && v.indexOf('aa') > -1); - - c.afterRender(dummy); - v = c.convert(); - assert.ok(v === ''); - }); - }); - }); -}); diff --git a/test/_helper.ts b/test/_helper.ts deleted file mode 100644 index f628605..0000000 --- a/test/_helper.ts +++ /dev/null @@ -1,24 +0,0 @@ -function callWhenAlltrue(statuses: boolean[], cb: any) { - var interval: NodeJS.Timer; - interval = setInterval(function () { - var isdone = statuses.reduce((pv: any, v: any) => pv && v, true); - - if (isdone) { - clearInterval(interval); - cb(); - } - }, 10); -} - -function callWhenXEqualY({ x, y }: { x: any; y: any }, cb: any) { - var interval: NodeJS.Timer; - interval = setInterval(function () { - var isdone = x === y; - if (isdone) { - clearInterval(interval); - cb(); - } - }, 10); -} - -export { callWhenAlltrue, callWhenXEqualY }; diff --git a/test/convert-insert-value.test.ts b/test/convert-insert-value.test.ts new file mode 100644 index 0000000..d7829e9 --- /dev/null +++ b/test/convert-insert-value.test.ts @@ -0,0 +1,73 @@ +import { strict as assert } from 'node:assert'; +import { describe, it } from 'vitest'; +import { InsertDataQuill } from './../src/InsertData.js'; +import { convertInsertValue } from '../src/convert-insert-value.js'; +import { DataType } from '../src/value-types.js'; + +describe('convertInsertValue', function () { + const noopSanitize = (v: string) => v; + const append1Sanitize = (v: string) => `${v}1`; + + it('should convert text', () => { + const got = convertInsertValue('hello', { urlSanitizer: noopSanitize }); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Text); + assert.equal(got.value, 'hello'); + }); + + it('should convert image', () => { + const got = convertInsertValue( + { image: 'http://example.com' }, + { urlSanitizer: noopSanitize }, + ); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Image); + assert.equal(got.value, 'http://example.com'); + }); + + it('should convert video', () => { + const got = convertInsertValue( + { video: 'http://example.com' }, + { urlSanitizer: noopSanitize }, + ); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Video); + assert.equal(got.value, 'http://example.com'); + }); + + it('should convert formula', () => { + const got = convertInsertValue( + { formula: 'x^2' }, + { urlSanitizer: noopSanitize }, + ); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Formula); + assert.equal(got.value, 'x^2'); + }); + + it('should sanitize an image URL', () => { + const got = convertInsertValue( + { image: 'http://example.com' }, + { urlSanitizer: append1Sanitize }, + ); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Image); + assert.equal(got.value, 'http://example.com1'); + }); + + it('should sanitize a video URL', () => { + const got = convertInsertValue( + { video: 'http://example.com' }, + { urlSanitizer: append1Sanitize }, + ); + assert.ok(got instanceof InsertDataQuill); + assert.ok(got.type === DataType.Video); + assert.equal(got.value, 'http://example.com1'); + }); + + it('should ignore the sanitize options for text', () => { + const got = convertInsertValue('hello', { urlSanitizer: append1Sanitize }); + assert.ok(got instanceof InsertDataQuill); + assert.equal(got.value, 'hello'); + }); +}); diff --git a/test/data/delta1.ts b/test/data/delta1.ts deleted file mode 100644 index 5c377f4..0000000 --- a/test/data/delta1.ts +++ /dev/null @@ -1,64 +0,0 @@ -var delta1 = { - ops: [ - { insert: 'link', attributes: { link: 'http://a.com/?x=a&b=()' } }, - { insert: 'This ' }, - { attributes: { font: 'monospace' }, insert: 'is' }, - { insert: ' a ' }, - { attributes: { size: 'large' }, insert: 'test' }, - { insert: ' ' }, - { attributes: { italic: true, bold: true }, insert: 'data' }, - { insert: ' ' }, - { attributes: { underline: true, strike: true }, insert: 'that' }, - { insert: ' is ' }, - { attributes: { color: '#e60000' }, insert: 'will' }, - { insert: ' ' }, - { attributes: { background: '#ffebcc' }, insert: 'test' }, - { insert: ' ' }, - { attributes: { script: 'sub' }, insert: 'the' }, - { insert: ' ' }, - { attributes: { script: 'super' }, insert: 'rendering' }, - { insert: ' of ' }, - { attributes: { link: 'http://yahoo' }, insert: 'inline' }, - { insert: ' ' }, - { insert: { formula: 'x=data' } }, - { insert: ' formats.\n' }, - { insert: 'list' }, - { insert: '\n', attributes: { list: 'bullet' } }, - { insert: 'list' }, - { insert: '\n', attributes: { list: 'checked' } }, - { insert: 'some code', attributes: { code: true, bold: true } }, - { attributes: { italic: true, link: '#top', code: true }, insert: 'Top' }, - { insert: '\n' }, - ], - html: [ - '

      ', - 'link', - 'This ', - 'is', - ' a ', - 'test', - ' ', - 'data', - ' ', - 'that', - ' is ', - 'will', - ' ', - 'test', - ' ', - 'the', - ' ', - 'rendering', - ' of ', - 'inline', - ' ', - 'x=data', - ' formats.

      ', - '
      • list
      ', - '
      • list
      ', - '

      some code', - 'Top

      ', - ].join(''), -}; - -export { delta1 }; diff --git a/test/data/nonStringSamples.ts b/test/data/nonStringSamples.ts deleted file mode 100644 index 1380244..0000000 --- a/test/data/nonStringSamples.ts +++ /dev/null @@ -1,11 +0,0 @@ -const nonStringSamples: any[] = [ - null, - undefined, - false, - 3, - [], - { x: 2 }, - new Date(), -]; - -export { nonStringSamples }; diff --git a/test/denormalize.test.ts b/test/denormalize.test.ts new file mode 100644 index 0000000..2c02e69 --- /dev/null +++ b/test/denormalize.test.ts @@ -0,0 +1,71 @@ +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { + denormalizeInsertOp, + tokenizeWithNewLines, +} from '../src/denormalize.js'; + +describe('denormalizeInsertOp', () => { + it('should return a denormalized op as an array of ops', function () { + const op1 = { insert: '\n' }; + const got1 = denormalizeInsertOp({ insert: '\n' }); + assert.deepEqual(got1, [op1]); + + const op2 = { insert: 'abcd' }; + const got2 = denormalizeInsertOp(op2); + assert.deepEqual(got2, [op2]); + + const op3 = { + insert: 'abc\n', + attributes: { link: 'cold' }, + }; + const got3 = denormalizeInsertOp(op3); + assert.equal(got3.length, 2); + assert.equal(got3[0].insert, 'abc'); + assert.equal(got3[0].attributes?.link, 'cold'); + + const op4 = { + insert: '\n\n', + attributes: { bold: true }, + }; + const got4 = denormalizeInsertOp(op4); + assert.equal(got4.length, 2); + assert.equal(got4[1].insert, '\n'); + }); +}); + +describe('tokenizeWithNewLines', function () { + it('should split and return an array of strings ', () => { + let act = ''; + assert.deepEqual(tokenizeWithNewLines(act), ['']); + + act = '\n'; + assert.deepEqual(tokenizeWithNewLines(act), ['\n']); + + act = 'abc'; + assert.deepEqual(tokenizeWithNewLines(act), ['abc']); + + act = 'abc\nd'; + assert.deepEqual(tokenizeWithNewLines(act), ['abc', '\n', 'd']); + + act = '\n\n'; + assert.deepEqual(tokenizeWithNewLines(act), ['\n', '\n']); + + act = '\n \n'; + assert.deepEqual(tokenizeWithNewLines(act), ['\n', ' ', '\n']); + + act = ' \nabc\n'; + assert.deepEqual(tokenizeWithNewLines(act), [' ', '\n', 'abc', '\n']); + + act = '\n\nabc\n\n6\n'; + assert.deepEqual(tokenizeWithNewLines(act), [ + '\n', + '\n', + 'abc', + '\n', + '\n', + '6', + '\n', + ]); + }); +}); diff --git a/test/funcs-html.test.ts b/test/funcs-html.test.ts deleted file mode 100644 index a4d9f45..0000000 --- a/test/funcs-html.test.ts +++ /dev/null @@ -1,82 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { - makeEndTag, - makeStartTag, - encodeHtml, - decodeHtml, - encodeLink, -} from './../src/funcs-html'; - -describe('html module', function () { - describe('makeStartTag()', function () { - it('should make proper html start tags', function () { - var act = makeStartTag('a'); - assert.equal(act, ''); - - act = makeStartTag(''); - assert.equal(act, ''); - - act = makeStartTag('br'); - assert.equal(act, '
      '); - - act = makeStartTag('img', [{ key: 'src', value: 'http://' }]); - assert.equal(act, ''); - - var attrs = [ - { key: 'class', value: ' cl1 cl2' }, - { key: 'style', value: 'color:#333' }, - ]; - act = makeStartTag('p', attrs); - assert.equal(act, '

      '); - - assert.equal(makeStartTag('p', [{ key: 'checked' }]), '

      '); - }); - }); - - describe('makeEndTag()', function () { - it('should make proper html end tags', function () { - var act = makeEndTag('a'); - assert.equal(act, ''); - - act = makeEndTag(); - assert.equal(act, ''); - }); - }); - - describe('encodeHtml()', function () { - it('should encode < > & " \' / characters', function () { - var act = encodeHtml('hello"my&friend&here()', false); - assert.equal( - act, - 'hello"my<lovely'/>&amp;friend&here()' - ); - - var act = encodeHtml('hello"my&friend&here()'); - assert.equal( - act, - 'hello"my<lovely'/>&friend&here()' - ); - }); - }); - - describe('decodeHtml()', function () { - it('should decode html', function () { - var act = decodeHtml( - 'hello"my<lovely'/>&friend&here' - ); - assert.equal(act, 'hello"my&friend&here'); - }); - }); - - describe('encodeLink()', function () { - it('should encode link', function () { - var act = encodeLink('http://www.yahoo.com/?a=b&c=<>()"\''); - assert.equal( - act, - 'http://www.yahoo.com/?a=b&c=<>()"'' - ); - }); - }); -}); diff --git a/test/grouper/Grouper.test.ts b/test/grouper/Grouper.test.ts deleted file mode 100644 index fe84a19..0000000 --- a/test/grouper/Grouper.test.ts +++ /dev/null @@ -1,96 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { Grouper } from './../../src/grouper/Grouper'; -import { DeltaInsertOp } from './../../src/DeltaInsertOp'; -import { InsertDataQuill } from './../../src/InsertData'; -import { - VideoItem, - InlineGroup, - BlockGroup, -} from './../../src/grouper/group-types'; -import { DataType } from './../../src/value-types'; -describe('Grouper', function () { - describe('#pairOpsWithTheirBlock()', function () { - var ops = [ - new DeltaInsertOp(new InsertDataQuill(DataType.Video, 'http://')), - new DeltaInsertOp('hello'), - new DeltaInsertOp('\n'), - new DeltaInsertOp('how are you?'), - new DeltaInsertOp('\n'), - new DeltaInsertOp('Time is money'), - new DeltaInsertOp('\n', { blockquote: true }), - ]; - it('should return ops grouped by group type', function () { - var act = Grouper.pairOpsWithTheirBlock(ops); - var exp = [ - new VideoItem(ops[0]), - new InlineGroup([ops[1], ops[2], ops[3], ops[4]]), - new BlockGroup(ops[6], [ops[5]]), - ]; - assert.deepEqual(act, exp); - }); - }); - - describe('#groupConsecutiveSameStyleBlocks()', function () { - it('should compine blocks with same type and style into an []', function () { - var ops = [ - new DeltaInsertOp('this is code'), - new DeltaInsertOp('\n', { 'code-block': true }), - new DeltaInsertOp('this is code TOO!'), - new DeltaInsertOp('\n', { 'code-block': true }), - new DeltaInsertOp('\n', { blockquote: true }), - new DeltaInsertOp('\n', { blockquote: true }), - new DeltaInsertOp('\n'), - new DeltaInsertOp('\n', { header: 1 }), - new DeltaInsertOp('\n', { header: 1 }), - new DeltaInsertOp('\n', { attr1: true, renderAsBlock: true }), - new DeltaInsertOp('\n', { attr1: true, renderAsBlock: true }), - new DeltaInsertOp('\n', { attr1: 'test', renderAsBlock: true }), - new DeltaInsertOp('\n', { attr2: 'test', renderAsBlock: true }), - ]; - var pairs = Grouper.pairOpsWithTheirBlock(ops); - var groups = Grouper.groupConsecutiveSameStyleBlocks(pairs, { - header: true, - codeBlocks: true, - blockquotes: true, - customBlocks: true, - }); - assert.deepEqual(groups, [ - [new BlockGroup(ops[1], [ops[0]]), new BlockGroup(ops[1], [ops[2]])], - [new BlockGroup(ops[4], []), new BlockGroup(ops[4], [])], - new InlineGroup([ops[6]]), - [new BlockGroup(ops[7], []), new BlockGroup(ops[8], [])], - [new BlockGroup(ops[9], []), new BlockGroup(ops[10], [])], - new BlockGroup(ops[11], []), - new BlockGroup(ops[12], []), - ]); - }); - }); - describe('#reduceConsecutiveSameStyleBlocksToOne()', function () { - it('should return ops of combined groups moved to 1st group', function () { - var ops = [ - new DeltaInsertOp('this is code'), - new DeltaInsertOp('\n', { 'code-block': true }), - new DeltaInsertOp('this is code TOO!'), - new DeltaInsertOp('\n', { 'code-block': true }), - new DeltaInsertOp('\n', { blockquote: true }), - new DeltaInsertOp('\n', { blockquote: true }), - new DeltaInsertOp('\n'), - new DeltaInsertOp('\n', { header: 1 }), - ]; - var pairs = Grouper.pairOpsWithTheirBlock(ops); - var groups = Grouper.groupConsecutiveSameStyleBlocks(pairs); - //console.log(groups); - var act = Grouper.reduceConsecutiveSameStyleBlocksToOne(groups); - //console.log(act); - //console.log(JSON.stringify(act)); - assert.deepEqual(act, [ - new BlockGroup(ops[1], [ops[0], ops[6], ops[2]]), - new BlockGroup(ops[4], [ops[6], ops[6]]), - new InlineGroup([ops[6]]), - new BlockGroup(ops[7], [ops[6]]), - ]); - }); - }); -}); diff --git a/test/grouper/ListNester.test.ts b/test/grouper/ListNester.test.ts deleted file mode 100644 index 896ef8f..0000000 --- a/test/grouper/ListNester.test.ts +++ /dev/null @@ -1,91 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { Grouper } from './../../src/grouper/Grouper'; -import { ListNester } from './../../src/grouper/ListNester'; -import { DeltaInsertOp } from './../../src/DeltaInsertOp'; -import { - ListGroup, - ListItem, - InlineGroup, - BlockGroup, -} from './../../src/grouper/group-types'; -import { ListType } from './../../src/value-types'; - -describe('ListNester', function () { - describe('nest()', function () { - it('should not nest different types of lists', function () { - var ops = [ - new DeltaInsertOp('ordered list 1 item 1'), - new DeltaInsertOp('\n', { list: ListType.Ordered }), - new DeltaInsertOp('bullet list 1 item 1'), - new DeltaInsertOp('\n', { list: ListType.Bullet }), - new DeltaInsertOp('bullet list 1 item 2'), - new DeltaInsertOp('\n', { list: ListType.Bullet }), - new DeltaInsertOp('haha'), - new DeltaInsertOp('\n'), - new DeltaInsertOp('\n', { list: ListType.Bullet }), - new DeltaInsertOp('\n', { list: ListType.Checked }), - new DeltaInsertOp('\n', { list: ListType.Unchecked }), - ]; - - var groups = Grouper.pairOpsWithTheirBlock(ops); - var nester = new ListNester(); - var act = nester.nest(groups); - //console.log(JSON.stringify(act, null, 3)); - assert.deepEqual(act, [ - new ListGroup([new ListItem(groups[0])]), - new ListGroup([ - new ListItem(groups[1]), - new ListItem(groups[2]), - ]), - new InlineGroup([ops[6], ops[7]]), - new ListGroup([new ListItem(new BlockGroup(ops[8], []))]), - new ListGroup([ - new ListItem(new BlockGroup(ops[9], [])), - new ListItem(new BlockGroup(ops[10], [])), - ]), - ]); - }); - - it('should nest if lists are same and later ones have higher indent', function () { - var ops = [ - new DeltaInsertOp('item 1'), - new DeltaInsertOp('\n', { list: ListType.Ordered }), - new DeltaInsertOp('item 1a'), - new DeltaInsertOp('\n', { list: ListType.Ordered, indent: 1 }), - new DeltaInsertOp('item 1a-i'), - new DeltaInsertOp('\n', { list: ListType.Ordered, indent: 3 }), - new DeltaInsertOp('item 1b'), - new DeltaInsertOp('\n', { list: ListType.Ordered, indent: 1 }), - new DeltaInsertOp('item 2'), - new DeltaInsertOp('\n', { list: ListType.Ordered }), - new DeltaInsertOp('haha'), - new DeltaInsertOp('\n'), - new DeltaInsertOp('\n', { list: ListType.Ordered, indent: 5 }), - new DeltaInsertOp('\n', { list: ListType.Bullet, indent: 4 }), - ]; - var pairs = Grouper.pairOpsWithTheirBlock(ops); - - var nester = new ListNester(); - var act = nester.nest(pairs); - //console.log(JSON.stringify( act, null, 4)); - - var l1b = new ListItem(pairs[3]); - var lai = new ListGroup([new ListItem(pairs[2])]); - var l1a = new ListGroup([new ListItem(pairs[1], lai)]); - - var li1 = new ListGroup([new ListItem(pairs[0])]); - li1.items[0].innerList = new ListGroup(l1a.items.concat(l1b)); - var li2 = new ListGroup([new ListItem(pairs[4])]); - //console.log(JSON.stringify(act, null, 3)); - assert.deepEqual(act, [ - new ListGroup(li1.items.concat(li2.items)), - - new InlineGroup([ops[10], ops[11]]), - new ListGroup([new ListItem(new BlockGroup(ops[12], []))]), - new ListGroup([new ListItem(new BlockGroup(ops[13], []))]), - ]); - }); - }); -}); diff --git a/test/grouper/TableGrouper.test.ts b/test/grouper/TableGrouper.test.ts deleted file mode 100644 index 87e194f..0000000 --- a/test/grouper/TableGrouper.test.ts +++ /dev/null @@ -1,103 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { DeltaInsertOp } from '../../src/DeltaInsertOp'; -import { Grouper } from '../../src/grouper/Grouper'; -import { TableGrouper } from '../../src/grouper/TableGrouper'; -import { - TableGroup, - TableRow, - TableCell, - BlockGroup, -} from '../../src/grouper/group-types'; - -describe('TableGrouper', function () { - describe('empty table', function () { - var ops = [ - new DeltaInsertOp('\n', { table: 'row-1' }), - new DeltaInsertOp('\n', { table: 'row-1' }), - new DeltaInsertOp('\n', { table: 'row-1' }), - new DeltaInsertOp('\n', { table: 'row-2' }), - new DeltaInsertOp('\n', { table: 'row-2' }), - new DeltaInsertOp('\n', { table: 'row-2' }), - new DeltaInsertOp('\n', { table: 'row-3' }), - new DeltaInsertOp('\n', { table: 'row-3' }), - new DeltaInsertOp('\n', { table: 'row-3' }), - ]; - - it('should return table with 3 rows and 3 cells', function () { - var groups = Grouper.pairOpsWithTheirBlock(ops); - var tableGrouper = new TableGrouper(); - var act = tableGrouper.group(groups); - var exp = [ - new TableGroup([ - new TableRow([ - new TableCell(groups[0]), - new TableCell(groups[1]), - new TableCell(groups[2]), - ]), - new TableRow([ - new TableCell(groups[3]), - new TableCell(groups[4]), - new TableCell(groups[5]), - ]), - new TableRow([ - new TableCell(groups[6]), - new TableCell(groups[7]), - new TableCell(groups[8]), - ]), - ]), - ]; - - assert.deepEqual(act, exp); - }); - }); - - describe('single 1 row table', function () { - var ops = [ - new DeltaInsertOp('cell1'), - new DeltaInsertOp('\n', { table: 'row-1' }), - new DeltaInsertOp('cell2'), - new DeltaInsertOp('\n', { table: 'row-1' }), - ]; - - it('should return table with 1 row', function () { - var groups = Grouper.pairOpsWithTheirBlock(ops); - var tableGrouper = new TableGrouper(); - var act = tableGrouper.group(groups); - var exp = [ - new TableGroup([ - new TableRow([ - new TableCell(groups[0]), - new TableCell(groups[1]), - ]), - ]), - ]; - - assert.deepEqual(act, exp); - }); - }); - - describe('single 1 col table', function () { - var ops = [ - new DeltaInsertOp('cell1'), - new DeltaInsertOp('\n', { table: 'row-1' }), - new DeltaInsertOp('cell2'), - new DeltaInsertOp('\n', { table: 'row-2' }), - ]; - - it('should return table with 1 col', function () { - var groups = Grouper.pairOpsWithTheirBlock(ops); - var tableGrouper = new TableGrouper(); - var act = tableGrouper.group(groups); - var exp = [ - new TableGroup([ - new TableRow([new TableCell(groups[0])]), - new TableRow([new TableCell(groups[1])]), - ]), - ]; - - assert.deepEqual(act, exp); - }); - }); -}); diff --git a/test/grouper/group-tables.test.ts b/test/grouper/group-tables.test.ts new file mode 100644 index 0000000..1094547 --- /dev/null +++ b/test/grouper/group-tables.test.ts @@ -0,0 +1,127 @@ +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { DeltaInsertOp } from '../../src/DeltaInsertOp.js'; +import { groupTables } from '../../src/grouper/group-tables.js'; +import { + TableGroup, + TableRow, + TableCell, + BlockGroup, +} from '../../src/grouper/group-types.js'; +import { pairOpsWithTheirBlock } from '../../src/grouper/grouping.js'; +import { InsertDataQuill } from '../../src/InsertData.js'; +import { DataType } from '../../src/value-types.js'; + +describe('TableGrouper', function () { + describe('empty table', function () { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-2', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-2', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-2', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-3', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-3', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-3', + }), + ]; + + it('should return table with 3 rows and 3 cells', function () { + const groups = pairOpsWithTheirBlock(ops); + const act = groupTables(groups); + const exp = [ + new TableGroup([ + new TableRow([ + new TableCell(groups[0]), + new TableCell(groups[1]), + new TableCell(groups[2]), + ]), + new TableRow([ + new TableCell(groups[3]), + new TableCell(groups[4]), + new TableCell(groups[5]), + ]), + new TableRow([ + new TableCell(groups[6]), + new TableCell(groups[7]), + new TableCell(groups[8]), + ]), + ]), + ]; + + assert.deepEqual(act, exp); + }); + }); + + describe('single 1 row table', function () { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'cell1')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'cell2')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + ]; + + it('should return table with 1 row', function () { + const groups = pairOpsWithTheirBlock(ops); + const act = groupTables(groups); + const exp = [ + new TableGroup([ + new TableRow([ + new TableCell(groups[0]), + new TableCell(groups[1]), + ]), + ]), + ]; + + assert.deepEqual(act, exp); + }); + }); + + describe('single 1 col table', function () { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'cell1')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-1', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'cell2')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + table: 'row-2', + }), + ]; + + it('should return table with 1 col', function () { + const groups = pairOpsWithTheirBlock(ops); + const act = groupTables(groups); + const exp = [ + new TableGroup([ + new TableRow([new TableCell(groups[0])]), + new TableRow([new TableCell(groups[1])]), + ]), + ]; + + assert.deepEqual(act, exp); + }); + }); +}); diff --git a/test/grouper/grouping.test.ts b/test/grouper/grouping.test.ts new file mode 100644 index 0000000..6408bba --- /dev/null +++ b/test/grouper/grouping.test.ts @@ -0,0 +1,236 @@ +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { DeltaInsertOp } from './../../src/DeltaInsertOp.js'; +import { InsertDataCustom, InsertDataQuill } from './../../src/InsertData.js'; +import { + BlockGroup, + BlotBlock, + InlineGroup, + VideoItem, +} from './../../src/grouper/group-types.js'; +import { DataType } from './../../src/value-types.js'; +import { + groupConsecutiveSameStyleBlocks, + pairOpsWithTheirBlock, +} from '../../src/grouper/grouping.js'; + +describe('pairOpsWithTheirBlock', () => { + it('should return ops grouped by group type', function () { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Video, 'http://')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hey')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'how are you?')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'Time is money')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + blockquote: true, + }), + ]; + + assert.deepEqual(pairOpsWithTheirBlock(ops), [ + new VideoItem(ops[0]), + new InlineGroup([ops[1], ops[2], ops[3]]), + new InlineGroup([ops[4], ops[5]]), + new BlockGroup(ops[7], [ops[6]]), + ]); + }); +}); + +describe('groupConsecutiveSameStyleBlocks', () => { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'this is code')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + 'code-block': true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'this is code TOO!')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + 'code-block': true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + blockquote: true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + blockquote: true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + color: 'red', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + color: 'red', + }), + new DeltaInsertOp(new InsertDataCustom({ custom: 1 }), { + renderAsBlock: true, + }), + new DeltaInsertOp(new InsertDataCustom({ custom: 2 }), { + renderAsBlock: true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + attr1: 'test', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + attr1: 'test', + }), + new DeltaInsertOp(new InsertDataCustom({ custom: 1 })), + new DeltaInsertOp(new InsertDataCustom({ custom: 2 })), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + ]; + + const pairs = pairOpsWithTheirBlock(ops); + + it('should combine blocks with same type and style into an array when all grouping options are enabled', () => { + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: true, + multiLineCodeBlock: true, + multiLineHeader: true, + }); + + assert.deepEqual(groups, [ + [new BlockGroup(ops[1], [ops[0]]), new BlockGroup(ops[1], [ops[2]])], + [new BlockGroup(ops[4], []), new BlockGroup(ops[4], [])], + new InlineGroup([ops[6]]), + [new BlockGroup(ops[7], []), new BlockGroup(ops[8], [])], + new BlotBlock(ops[9] as DeltaInsertOp), + new BlotBlock(ops[10] as DeltaInsertOp), + new InlineGroup([ops[11]]), + new InlineGroup([ops[12]]), + new InlineGroup([ops[13], ops[14], ops[15]]), + new InlineGroup([ops[16]]), + ]); + }); + + it('should combine only code blocks with same style into an array when only the multiLineCodeBlock option is enabled', () => { + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: false, + multiLineCodeBlock: true, + multiLineHeader: false, + }); + + assert.deepEqual(groups, [ + [new BlockGroup(ops[1], [ops[0]]), new BlockGroup(ops[1], [ops[2]])], + new BlockGroup(ops[4], []), + new BlockGroup(ops[5], []), + new InlineGroup([ops[6]]), + new BlockGroup(ops[7], []), + new BlockGroup(ops[8], []), + new BlotBlock(ops[9] as DeltaInsertOp), + new BlotBlock(ops[10] as DeltaInsertOp), + new InlineGroup([ops[11]]), + new InlineGroup([ops[12]]), + new InlineGroup([ops[13], ops[14], ops[15]]), + new InlineGroup([ops[16]]), + ]); + }); + + it('should combine only header blocks with same style into an array when only the multiLineHeader option is enabled', () => { + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: false, + multiLineCodeBlock: false, + multiLineHeader: true, + }); + + assert.deepEqual(groups, [ + new BlockGroup(ops[1], [ops[0]]), + new BlockGroup(ops[3], [ops[2]]), + new BlockGroup(ops[4], []), + new BlockGroup(ops[5], []), + new InlineGroup([ops[6]]), + [new BlockGroup(ops[7], []), new BlockGroup(ops[8], [])], + new BlotBlock(ops[9] as DeltaInsertOp), + new BlotBlock(ops[10] as DeltaInsertOp), + new InlineGroup([ops[11]]), + new InlineGroup([ops[12]]), + new InlineGroup([ops[13], ops[14], ops[15]]), + new InlineGroup([ops[16]]), + ]); + }); + + it('should combine header blocks with the same style when they have text', () => { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), { + header: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'bye'), { + header: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + }), + ]; + + const pairs = pairOpsWithTheirBlock(ops); + + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: false, + multiLineCodeBlock: false, + multiLineHeader: true, + }); + + assert.deepEqual(groups, [ + [ + new BlockGroup(ops[0], []), + new BlockGroup(ops[1], []), + new BlockGroup(ops[2], []), + new BlockGroup(ops[3], []), + ], + ]); + }); + + it('should not combine code blocks with different attributes', () => { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + 'code-block': true, + color: 'red', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + 'code-block': true, + }), + ]; + + const pairs = pairOpsWithTheirBlock(ops); + + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: true, + multiLineCodeBlock: true, + multiLineHeader: true, + }); + + assert.deepEqual(groups, [ + new BlockGroup(ops[0], []), + new BlockGroup(ops[1], []), + ]); + }); + + it('should not combine headers with different attributes', () => { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + color: 'red', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + header: 1, + }), + ]; + + const pairs = pairOpsWithTheirBlock(ops); + + const groups = groupConsecutiveSameStyleBlocks(pairs, { + multiLineBlockquote: true, + multiLineCodeBlock: true, + multiLineHeader: true, + }); + + assert.deepEqual(groups, [ + new BlockGroup(ops[0], []), + new BlockGroup(ops[1], []), + ]); + }); +}); diff --git a/test/grouper/nest-lists.test.ts b/test/grouper/nest-lists.test.ts new file mode 100644 index 0000000..09a0da5 --- /dev/null +++ b/test/grouper/nest-lists.test.ts @@ -0,0 +1,182 @@ +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { nestLists } from '../../src/grouper/nest-lists.js'; +import { DeltaInsertOp } from './../../src/DeltaInsertOp.js'; +import { + ListGroup, + ListItem, + InlineGroup, + BlockGroup, +} from './../../src/grouper/group-types.js'; +import { DataType, ListType } from './../../src/value-types.js'; +import { pairOpsWithTheirBlock } from '../../src/grouper/grouping.js'; +import { InsertDataQuill } from '../../src/InsertData.js'; + +describe('nestLists', function () { + it('should not nest different types of lists', function () { + const ops = [ + new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'ordered list 1 item 1'), + ), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + }), + new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'bullet list 1 item 1'), + ), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'bullet list 1 item 2'), + ), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'haha')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Checked, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Unchecked, + }), + ]; + + const groups = pairOpsWithTheirBlock(ops); + const act = nestLists(groups); + + assert.deepEqual(act, [ + new ListGroup([new ListItem(groups[0])]), + new ListGroup([ + new ListItem(groups[1]), + new ListItem(groups[2]), + ]), + new InlineGroup([ops[6], ops[7]]), + new ListGroup([new ListItem(new BlockGroup(ops[8], []))]), + new ListGroup([ + new ListItem(new BlockGroup(ops[9], [])), + new ListItem(new BlockGroup(ops[10], [])), + ]), + ]); + }); + + it('should nest a simple list', () => { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'a')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'b')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'c')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + indent: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'd')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + indent: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'e')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + indent: 1, + }), + ]; + + const groups = pairOpsWithTheirBlock(ops); + + const got = nestLists(groups); + const expected = [ + new ListGroup([ + new ListItem(groups[0] as BlockGroup), + new ListItem( + groups[1] as BlockGroup, + new ListGroup([ + new ListItem(groups[2] as BlockGroup), + new ListItem(groups[3] as BlockGroup), + ]), + ), + new ListItem( + groups[4] as BlockGroup, + new ListGroup([new ListItem(groups[5] as BlockGroup)]), + ), + ]), + ]; + + assert.deepEqual(got, expected); + }); + + it('should nest if lists are same and later ones have higher indent', function () { + const ops = [ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'item 1')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'item 1a')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + indent: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'item 1a-i')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + indent: 3, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'item 1b')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + indent: 1, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'item 2')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'haha')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + indent: 5, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + indent: 4, + }), + ]; + const pairs = pairOpsWithTheirBlock(ops); + + const act = nestLists(pairs); + + const lai = new ListGroup([new ListItem(pairs[2])]); + const l1a = new ListGroup([new ListItem(pairs[1], lai)]); + const l1b = new ListItem(pairs[3]); + + const li1 = new ListGroup([ + new ListItem( + pairs[0] as BlockGroup, + new ListGroup(l1a.items.concat(l1b)), + ), + ]); + const li2 = new ListGroup([new ListItem(pairs[4])]); + + const expected = [ + new ListGroup(li1.items.concat(li2.items)), + new InlineGroup([ops[10], ops[11]]), + new ListGroup([new ListItem(new BlockGroup(ops[12], []))]), + new ListGroup([new ListItem(new BlockGroup(ops[13], []))]), + ]; + + assert.deepEqual(act, expected); + }); +}); diff --git a/test/helpers/array.test.ts b/test/helpers/array.test.ts index 742114d..9933e0f 100644 --- a/test/helpers/array.test.ts +++ b/test/helpers/array.test.ts @@ -1,78 +1,26 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { - preferSecond, - flatten, - groupConsecutiveElementsWhile, - intersperse, - find, -} from './../../src/helpers/array'; - -describe('Array Helpers Module', function () { - describe('preferSecond()', function () { - it('should return second element in an array, otherwise first or null', function () { - assert.equal(preferSecond([1, 3]), 3); - assert.equal(preferSecond([5]), 5); - assert.equal(preferSecond([]), null); - }); - }); - - describe('flatten()', function () { - it('should return deeply flattened array', function () { - assert.deepEqual(flatten([1, 3, [4, [5, [6, 7]]]]), [1, 3, 4, 5, 6, 7]); - assert.deepEqual(flatten([]), []); - }); +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { groupConsecutiveElementsWhile } from '../../src/helpers/array.js'; + +describe('groupConsecutiveElementsWhile', () => { + it('should move consecutive elements matching predicate into an array (1)', () => { + const arr = [1, 'ha', 3, 'ha', 'ha']; + const grp = groupConsecutiveElementsWhile( + arr, + (v, prev) => typeof v === typeof prev, + ); + assert.deepEqual(grp, [1, 'ha', 3, ['ha', 'ha']]); }); - describe('groupConsecutiveElementsWhile()', function () { - it('should move consecutive elements matching predicate into an arr', function () { - var arr = [1, 'ha', 3, 'ha', 'ha']; - var grp = groupConsecutiveElementsWhile( - arr, - (v, v2) => typeof v === typeof v2 - ); - assert.deepEqual(grp, [1, 'ha', 3, ['ha', 'ha']]); - - arr = [1, 2, 3, 10, 11, 12]; - var grp = groupConsecutiveElementsWhile(arr, (v, v2) => v - 1 === v2); - assert.deepEqual(grp, [ - [1, 2, 3], - [10, 11, 12], - ]); - }); - }); - - describe('intersperse()', function () { - it('should put specified element between arr elements', function () { - assert.deepEqual(intersperse([1, 3, 4], 0), [1, 0, 3, 0, 4]); - assert.deepEqual(intersperse([1], 2), [1]); - }); - }); - - describe('find()', function () { - it('should native find sepecific element', function () { - assert.equal( - find([1, 3], (elem) => elem === 3), - 3 - ); - assert.equal( - find([], (elem) => elem === 3), - null - ); - }); - - it('should polyfill find sepecific element', function () { - Object.assign(Array.prototype, { find: undefined }); - - assert.equal( - find([1, 3], (elem) => elem === 3), - 3 - ); - assert.equal( - find([], (elem) => elem === 3), - null - ); - }); + it('should move consecutive elements matching predicate into an array (2)', () => { + const arr2 = [1, 2, 3, 10, 11, 12]; + const grp2 = groupConsecutiveElementsWhile( + arr2, + (v, prev) => v - 1 === prev, + ); + assert.deepEqual(grp2, [ + [1, 2, 3], + [10, 11, 12], + ]); }); }); diff --git a/test/helpers/object.test.ts b/test/helpers/object.test.ts deleted file mode 100644 index 0eedf29..0000000 --- a/test/helpers/object.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import * as obj from './../../src/helpers/object'; - -describe('Object Helpers Module', function () { - describe('assign()', function () { - it('should copy properties from sources to target, later overriding earlier', function () { - var s1 = { level: 1, name: 'Joe' }; - var s2 = { level: 2 }; - var o = obj.assign({}, s1, s2); - assert.equal(o.level, 2); - assert.equal(o.name, 'Joe'); - assert.ok(obj.assign(s1, null).level === 1); - assert.throws(() => obj.assign(null, 2)); - (Object.prototype).a = ''; - assert.ok(obj.assign({ x: 1 }, { x: 2 }).x === 2); - }); - }); -}); diff --git a/test/helpers/string.test.ts b/test/helpers/string.test.ts deleted file mode 100644 index 5c198a8..0000000 --- a/test/helpers/string.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { tokenizeWithNewLines } from './../../src/helpers/string'; - -describe('String Extensions Module', function () { - describe('String#_tokenizeWithNewLines()', function () { - it('should split and return an array of strings ', () => { - var act = ''; - assert.deepEqual(tokenizeWithNewLines(act), ['']); - - act = '\n'; - assert.deepEqual(tokenizeWithNewLines(act), ['\n']); - - act = 'abc'; - assert.deepEqual(tokenizeWithNewLines(act), ['abc']); - - act = 'abc\nd'; - assert.deepEqual(tokenizeWithNewLines(act), ['abc', '\n', 'd']); - - act = '\n\n'; - assert.deepEqual(tokenizeWithNewLines(act), ['\n', '\n']); - - act = '\n \n'; - assert.deepEqual(tokenizeWithNewLines(act), ['\n', ' ', '\n']); - - act = ' \nabc\n'; - assert.deepEqual(tokenizeWithNewLines(act), [' ', '\n', 'abc', '\n']); - - act = '\n\nabc\n\n6\n'; - assert.deepEqual(tokenizeWithNewLines(act), [ - '\n', - '\n', - 'abc', - '\n', - '\n', - '6', - '\n', - ]); - }); - }); -}); diff --git a/test/helpers/url.test.ts b/test/helpers/url.test.ts deleted file mode 100644 index 38d21e1..0000000 --- a/test/helpers/url.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { sanitize } from './../../src/helpers/url'; - -describe('Url Helpers Module', function () { - describe('String#_sanitizeUrl() ', function () { - it('should add unsafe: for invalid protocols', function () { - var act = "http://www><.yahoo'.com"; - assert.equal(sanitize(act), "http://www><.yahoo'.com"); - - act = 'https://abc'; - assert.equal(sanitize(act), 'https://abc'); - - act = 'sftp://abc'; - assert.equal(sanitize(act), 'sftp://abc'); - - act = ' ftp://abc'; - assert.equal(sanitize(act), 'ftp://abc'); - - act = ' file://abc'; - assert.equal(sanitize(act), 'file://abc'); - - act = ' blob://abc'; - assert.equal(sanitize(act), 'blob://abc'); - - act = 'mailto://abc'; - assert.equal(sanitize(act), 'mailto://abc'); - - act = 'tel://abc'; - assert.equal(sanitize(act), 'tel://abc'); - - act = '#abc'; - assert.equal(sanitize(act), '#abc'); - - act = '/abc'; - assert.equal(sanitize(act), '/abc'); - - act = ' data:image//abc'; - assert.equal(sanitize(act), 'data:image//abc'); - - act = "javascript:alert('hi')"; - assert.equal(sanitize(act), "unsafe:javascript:alert('hi')"); - }); - }); -}); diff --git a/test/mentions/MentionSanitizer.test.ts b/test/mentions/MentionSanitizer.test.ts deleted file mode 100644 index 9764cee..0000000 --- a/test/mentions/MentionSanitizer.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import 'mocha'; -import * as assert from 'assert'; - -import { MentionSanitizer } from './../../src/mentions/MentionSanitizer'; - -describe('MentionSanitizer', function () { - describe('#sanitize()', function () { - it('should return sanitized data', function () { - let sanitized = MentionSanitizer.sanitize( - { - class: 'A-cls-9', - id: 'An-id_9:.', - target: '_blank', - avatar: 'http://www.yahoo.com', - 'end-point': 'http://abc.com', - slug: 'my-name', - }, - {} - ); - //console.log(sanitized); - assert.deepEqual(sanitized, { - class: 'A-cls-9', - id: 'An-id_9:.', - target: '_blank', - avatar: 'http://www.yahoo.com', - 'end-point': 'http://abc.com', - slug: 'my-name', - }); - }); - - assert.deepEqual(MentionSanitizer.sanitize('a', {}), {}); - - assert.deepEqual(MentionSanitizer.sanitize({ id: 'sb' }, {}), { id: 'sb' }); - }); -}); diff --git a/test/render-delta.test.tsx b/test/render-delta.test.tsx new file mode 100644 index 0000000..4e1229d --- /dev/null +++ b/test/render-delta.test.tsx @@ -0,0 +1,1248 @@ +import { strict as assert } from 'node:assert'; +import { describe, it } from 'vitest'; +import { DeltaInsertOp } from './../src/DeltaInsertOp.js'; +import { CustomRenderer, RenderDelta } from './../src/render-delta.js'; +import { DataType, ListType, ScriptType } from './../src/value-types.js'; +import { InsertDataCustom, InsertDataQuill } from '../src/InsertData.js'; +import { InlineGroup } from '../src/grouper/group-types.js'; +import { renderToStaticMarkup } from 'react-dom/server'; + +const htmlEncodingMap = [ + ['&', '&'], + ['<', '<'], + ['>', '>'], + ['"', '"'], + ["'", '''], + ['\\/', '/'], +] as const; + +const encodeHtml = (str: string) => + htmlEncodingMap.reduce( + (str, [search, replace]) => str.replaceAll(search, replace), + str, + ); + +describe('RenderDelta', () => { + describe('constructor', () => { + it('should set default options', () => { + const rd = new RenderDelta({ ops: [] }); + + assert.equal(rd.state.options.orderedListTag, 'ol'); + assert.equal(rd.state.options.bulletListTag, 'ul'); + assert.equal(rd.state.options.allowBackgroundClasses, false); + // The URL sanitizer should be the identity function by default. + assert.equal( + rd.state.options.urlSanitizer('http://example.com?q1=x'), + 'http://example.com?q1=x', + ); + }); + }); + + describe('render', () => { + it('should render a plain new line string as an empty paragraph', () => { + const rd = new RenderDelta({ + ops: [{ insert: '\n' }], + }); + assert.equal(renderToStaticMarkup(rd.render()), '

      '); + }); + + it('should render when the first op is just a new line', () => { + const rd = new RenderDelta({ + ops: [{ insert: '\n' }, { insert: 'aa\n' }], + }); + assert.equal(renderToStaticMarkup(rd.render()), '

      aa

      '); + }); + + it('should render when last line is new line', () => { + const rd = new RenderDelta({ + ops: [{ insert: 'aa' }, { insert: '\n' }], + }); + assert.equal(renderToStaticMarkup(rd.render()), '

      aa

      '); + }); + + it('should render HTML', () => { + const ops = [ + { insert: 'this is text\nthis is code' }, + { + attributes: { 'code-block': 'plain' }, + insert: '\n', + }, + { insert: 'this is code too!' }, + { + attributes: { 'code-block': 'plain' }, + insert: '\n', + }, + ]; + const rd = new RenderDelta({ ops }); + + assert.equal( + renderToStaticMarkup(rd.render()), + '

      this is text

      this is code\nthis is code too!
      ', + ); + }); + + it('should render a paragraph for each new line', () => { + const rd = new RenderDelta({ + ops: [{ insert: '\na\nb\n' }], + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      a

      b

      ', + ); + }); + + it('should render lines with mixed styles', () => { + const ops = [ + { insert: 'a', attributes: { color: 'red', italic: true } }, + { insert: '\n\nb\n' }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      a

      b

      ', + ); + }); + + it('should render an inline with a custom tag', () => { + const rd = new RenderDelta({ + ops: [ + { insert: 'Hello' }, + { insert: ' my ', attributes: { italic: true } }, + { insert: '\n' }, + { insert: ' name is joey' }, + ], + options: { + customTag: (format) => { + if (format === 'italic') { + return 'i'; + } + }, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      Hello my

      name is joey

      ', + ); + }); + + it('should render a mention with a custom tag', () => { + const ops = [ + { + insert: 'Mention1', + attributes: { + mentions: true, + mention: { + class: 'abc', + // slug isn't rendered by this library + slug: 'a', + }, + }, + }, + ]; + const rd = new RenderDelta({ + ops, + options: { + mentionTag: 'span', + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      Mention1

      ', + ); + }); + + it('should render a mention with a link', () => { + const rd = new RenderDelta({ + ops: [ + { + insert: 'Mention2', + attributes: { + mentions: true, + mention: { link: 'https://example.com/abc' }, + }, + }, + ], + }); + const html = renderToStaticMarkup(rd.render()); + assert.equal( + html, + '

      Mention2

      ', + ); + }); + + it('should return proper HTML for complex ops', function () { + const ops = [ + { insert: 'link', attributes: { link: 'http://a.com/?x=a&b=()' } }, + { insert: 'This ' }, + { attributes: { font: 'monospace' }, insert: 'is' }, + { insert: ' a ' }, + { attributes: { size: 'large' }, insert: 'test' }, + { insert: ' ' }, + { attributes: { italic: true, bold: true }, insert: 'data' }, + { insert: ' ' }, + { attributes: { underline: true, strike: true }, insert: 'that' }, + { insert: ' is ' }, + { attributes: { color: '#e60000' }, insert: 'will' }, + { insert: ' ' }, + { attributes: { background: '#ffebcc' }, insert: 'test' }, + { insert: ' ' }, + { attributes: { script: 'sub' }, insert: 'the' }, + { insert: ' ' }, + { attributes: { script: 'super' }, insert: 'rendering' }, + { insert: ' of ' }, + { attributes: { link: 'http://yahoo' }, insert: 'inline' }, + { insert: ' ' }, + { insert: { formula: 'x=data' } }, + { insert: ' formats.\n' }, + { insert: 'list' }, + { insert: '\n', attributes: { list: 'bullet' } }, + { insert: 'list' }, + { insert: '\n', attributes: { list: 'checked' } }, + { insert: 'some code', attributes: { code: true, bold: true } }, + { + attributes: { italic: true, link: '#top', code: true }, + insert: 'Top', + }, + { insert: '\n' }, + ]; + const rd = new RenderDelta({ + ops, + options: { + classPrefix: 'noz', + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      linkThis is a test data that is will test the rendering of inline x=data formats.

      • list
      • list

      some codeTop

      ', + ); + }); + + it('should render styling (italic element) at the beginning of a header', () => { + const rd = new RenderDelta({ + ops: [ + { insert: 'hey', attributes: { italic: true } }, + { insert: ' yo' }, + { insert: '\n', attributes: { header: 1 } }, + ], + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hey yo

      ', + ); + }); + + it('should render styling (span with a color style) at the beginning of a header', () => { + const rd = new RenderDelta({ + ops: [ + { attributes: { color: '#e60000' }, insert: 'hey' }, + { insert: ' yo' }, + { insert: '\n', attributes: { header: 1 } }, + ], + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hey yo

      ', + ); + }); + + it('should set default inline styles when inlineStyles is true', function () { + const hugeOps = [ + { insert: 'huge', attributes: { size: 'huge', attr1: 'red' } }, + { insert: '\n' }, + ]; + const rd = new RenderDelta({ + ops: hugeOps, + options: { + inlineStyles: true, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      huge

      ', + ); + }); + + it('should set default inline styles when inlineStyles is true and custom CSS styles are applied', () => { + const hugeOps = [ + { insert: 'huge', attributes: { size: 'huge', attr1: 'red' } }, + { insert: '\n' }, + ]; + const rd = new RenderDelta({ + ops: hugeOps, + options: { + inlineStyles: true, + customCssStyles: (op) => { + if (op.attributes['attr1'] === 'red') { + return { + color: 'red', + }; + } + }, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      huge

      ', + ); + }); + + it('should allow setting inline styles', function () { + const hugeOps = [ + { insert: 'huge', attributes: { size: 'huge', attr1: 'red' } }, + { insert: '\n' }, + ]; + const rd = new RenderDelta({ + ops: hugeOps, + options: { + inlineStyles: { + size: () => ({ fontSize: '6em' }), + }, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      huge

      ', + ); + }); + + it('should render links with a rel', function () { + const ops = [ + { + attributes: { + link: '#', + }, + insert: 'hello', + }, + ]; + const rd = new RenderDelta({ + ops, + options: { + linkRel: 'license', + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hello

      ', + ); + }); + + it('should render links with a target', function () { + const ops = [ + { + attributes: { + link: '#', + rel: 'nofollow noopener', + }, + insert: 'hello', + }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hello

      ', + ); + }); + + it('should render images and image links', function () { + const ops = [ + { insert: { image: 'http://yahoo.com/abc.jpg' } }, + { + insert: { image: 'http://yahoo.com/def.jpg' }, + attributes: { link: 'http://aha' }, + }, + { insert: '\n' }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      ', + ); + }); + + it('should open and close list tags', function () { + const ops = [ + { insert: 'mr\n' }, + { insert: 'hello' }, + { insert: '\n', attributes: { list: 'ordered' } }, + { insert: 'there' }, + { insert: '\n', attributes: { list: 'bullet' } }, + { insert: '\n', attributes: { list: 'ordered' } }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      mr

      1. hello
      • there
      ', + ); + }); + + it('should render separate paragraphs', () => { + const rd = new RenderDelta({ + ops: [{ insert: 'hello\nhow are you?\n\nbye\n' }], + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hello

      how are you?

      bye

      ', + ); + }); + + it('should create checked/unchecked lists', function () { + const ops4 = [ + { insert: 'hello' }, + { insert: '\n', attributes: { list: 'checked' } }, + { insert: 'there' }, + { insert: '\n', attributes: { list: 'unchecked' } }, + { insert: 'man' }, + { insert: '\n', attributes: { list: 'checked' } }, + { insert: 'not done' }, + { insert: '\n', attributes: { indent: 1, list: 'unchecked' } }, + ]; + const rd = new RenderDelta({ ops: ops4 }); + const html = renderToStaticMarkup(rd.render()); + assert.equal( + html, + [ + '
        ', + '
      • hello
      • ', + '
      • there
      • ', + '
      • man', + '
        • not done
        ', + '
      • ', + '
      ', + ].join(''), + ); + }); + + it('should render text while escaping HTML', () => { + const ops = [ + { insert: 'line 1\n', attributes: { code: true } }, + { insert: 'line 2' }, + { insert: 'yo\n', attributes: { attr1: true } }, + { insert: 'line 3\n' }, + { insert: '

      line 4

      ' }, + { insert: '\n', attributes: { attr1: true } }, + { insert: 'line 5' }, + { insert: '\n', attributes: { attr1: 'test' } }, + ]; + + const rd = new RenderDelta({ + ops, + options: { + customTag: (format) => { + return format === 'code' ? 'small' : undefined; + }, + customAttributes: (op) => { + if (op.attributes['attr1']) { + return { + 'data-attr1': op.attributes['attr1'], + }; + } + return undefined; + }, + customClasses: (op) => { + if (op.attributes['attr1'] === 'test') { + return ['ql-test']; + } + return undefined; + }, + customCssStyles: (op) => { + if (op.attributes['attr1'] === 'test') { + return { color: 'red' }; + } + return undefined; + }, + }, + }); + + assert.equal( + renderToStaticMarkup(rd.render()), + `

      line 1

      line 2yo

      line 3

      ${encodeHtml( + '

      line 4

      ', + )}

      line 5

      `, + ); + }); + + it('should render styling within a single-line header', () => { + const ops = [ + { insert: 'Hello ' }, + { insert: 'there', attributes: { italic: true } }, + { insert: ' yo' }, + { insert: '\n', attributes: { header: 1 } }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      Hello there yo

      ', + ); + }); + + it('should convert using custom URL sanitizer', () => { + const ops = [ + { attributes: { link: 'http://yahoo<%=abc%>/ed' }, insert: 'test' }, + { attributes: { link: 'http://abc<' }, insert: 'hi' }, + ]; + + const rd = new RenderDelta({ + ops, + options: { + urlSanitizer: (url) => { + if (url.includes('<%')) { + return 'REDACTED'; + } + return url; + }, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      testhi

      ', + ); + }); + + describe('overriding paragraphTag', () => { + const ops = [ + { insert: 'hey' }, + { insert: '\n', attributes: { align: 'center' } }, + { insert: '\n', attributes: { direction: 'rtl' } }, + { insert: '\n', attributes: { indent: 2 } }, + ]; + + it('should render with div tag', () => { + const rd = new RenderDelta({ + ops, + options: { paragraphTag: 'div' }, + }); + const html = renderToStaticMarkup(rd.render()); + assert.equal(html.includes('hey'), true); + assert.equal(html.includes('
      { + const ops = [ + { attributes: { target: '_self', link: 'http://#' }, insert: 'A' }, + { attributes: { target: '_blank', link: 'http://#' }, insert: 'B' }, + { attributes: { link: 'http://#' }, insert: 'C' }, + { insert: '\n' }, + ]; + + it('should render the target attribute when linkTarget is unspecified', () => { + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      ABC

      ', + ); + }); + + it('should render the target attribute when linkTarget is an empty string', () => { + const rd = new RenderDelta({ ops, options: { linkTarget: '' } }); + const html = renderToStaticMarkup(rd.render()); + assert.equal( + html, + '

      ABC

      ', + ); + }); + + it('should render the target attribute when linkTarget is _top', () => { + const rd = new RenderDelta({ ops, options: { linkTarget: '_top' } }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      ABC

      ', + ); + }); + }); + + describe('tables', () => { + it('should render an empty table', () => { + const ops = [ + { + insert: '\n\n\n', + attributes: { table: 'row-1' }, + }, + { + insert: '\n\n\n', + attributes: { table: 'row-2' }, + }, + { + insert: '\n\n\n', + attributes: { table: 'row-3' }, + }, + { + insert: '\n', + }, + ]; + + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + [ + '', + '', + '', + '', + '
      ', + '

      ', + ].join(''), + ); + }); + + it('should render singe cell table', () => { + const ops = [ + { + insert: 'cell', + }, + { + insert: '\n', + attributes: { + table: 'row-1', + }, + }, + ]; + + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + [ + '', + '', + '
      cell
      ', + ].join(''), + ); + }); + + it('should render filled table', () => { + const ops = [ + { + insert: '11', + }, + { + attributes: { + table: 'row-1', + }, + insert: '\n', + }, + { + insert: '12', + }, + { + attributes: { + table: 'row-1', + }, + insert: '\n', + }, + { + insert: '13', + }, + { + attributes: { + table: 'row-1', + }, + insert: '\n', + }, + { + insert: '21', + }, + { + attributes: { + table: 'row-2', + }, + insert: '\n', + }, + { + insert: '22', + }, + { + attributes: { + table: 'row-2', + }, + insert: '\n', + }, + { + insert: '23', + }, + { + attributes: { + table: 'row-2', + }, + insert: '\n', + }, + { + insert: '31', + }, + { + attributes: { + table: 'row-3', + }, + insert: '\n', + }, + { + insert: '32', + }, + { + attributes: { + table: 'row-3', + }, + insert: '\n', + }, + { + insert: '33', + }, + { + attributes: { + table: 'row-3', + }, + insert: '\n', + }, + { + insert: '\n', + }, + ]; + + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + [ + '', + '', + '', + '', + '
      111213
      212223
      313233
      ', + '

      ', + ].join(''), + ); + }); + }); + + describe('blocks', () => { + const ops = [ + { + insert: 'line 1', + }, + { + attributes: { + 'code-block': true, + }, + insert: '\n', + }, + { + insert: 'line 2', + }, + { + attributes: { + 'code-block': true, + }, + insert: '\n', + }, + { + insert: 'line 3', + }, + { + attributes: { + 'code-block': 'javascript', + }, + insert: '\n', + }, + { + insert: '

      line 4

      ', + }, + { + attributes: { + 'code-block': true, + }, + insert: '\n', + }, + { + insert: 'line 5', + }, + { + attributes: { + // This value should be sanitized out. + 'code-block': 'ja"va', + }, + insert: '\n', + }, + ]; + + it('should correctly render code block', () => { + const rd = new RenderDelta({ ops }); + const html = renderToStaticMarkup(rd.render()); + assert.equal( + html, + `
      line 1\nline 2
      line 3
      ${encodeHtml(
      +            '

      line 4

      ', + )}\nline 5
      `, + ); + }); + + it('should render code block with the multiLineCodeBlock option set to false', () => { + const rd = new RenderDelta({ + ops, + options: { + multiLineCodeBlock: false, + }, + }); + const html = renderToStaticMarkup(rd.render()); + assert.equal( + html, + `
      line 1
      line 2
      line 3
      ${encodeHtml(
      +            '

      line 4

      ', + )}
      line 5
      `, + ); + }); + }); + + describe('custom types', () => { + it('should render custom insert types with the given renderer', () => { + const ops = [ + { insert: { boldAndItalic: 'my text' } }, + { insert: { blah: 1 } }, + ]; + const rd = new RenderDelta({ + ops, + customRenderer: (op) => { + if ('boldAndItalic' in op.insert.value) { + return ( + + {op.insert.value.boldAndItalic as string} + + ); + } + return 'unknown'; + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      my textunknown

      ', + ); + }); + + describe('the renderAsBlock attribute', () => { + it('should render as a top-level element when renderAsBlock is true', () => { + const ops = [ + { insert: 'hello ' }, + // Notice here there's no renderAsBlock. + { insert: { myAbbr: 'my friend', title: 'T1' } }, + { insert: '!' }, + // And here it's true. + { + insert: { myAbbr: 'how r u?', title: 'T2' }, + attributes: { renderAsBlock: true }, + }, + ]; + const rd = new RenderDelta({ + ops, + customRenderer: ({ insert }) => { + if ( + 'myAbbr' in insert.value && + typeof insert.value.myAbbr === 'string' + ) { + return ( + + {insert.value.myAbbr} + + ); + } + return 'unknown'; + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hello my friend!

      how r u?', + ); + }); + + it('should render wrapped in a p tag when renderAsBlock is false', () => { + const ops = [ + { insert: 'hello ' }, + // Notice here there's no renderAsBlock. + { insert: { myAbbr: 'my friend', title: 'T1' } }, + { insert: '!' }, + // And here it's false. + { + insert: { myAbbr: 'how r u?', title: 'T2' }, + attributes: { renderAsBlock: false }, + }, + ]; + const rd = new RenderDelta({ + ops, + customRenderer: ({ insert }) => { + if ( + 'myAbbr' in insert.value && + typeof insert.value.myAbbr === 'string' + ) { + return ( + + {insert.value.myAbbr} + + ); + } + return 'unknown'; + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      hello my friend!how r u?

      ', + ); + }); + }); + + describe('inside code blocks', () => { + const ops = [ + { insert: { colonizer: ':' } }, + { insert: '\n', attributes: { 'code-block': true } }, + { insert: 'code1' }, + { insert: '\n', attributes: { 'code-block': true } }, + { insert: { colonizer: ':' } }, + { insert: '\n', attributes: { 'code-block': true } }, + ]; + + const customRenderer: CustomRenderer = (op) => { + if ('colonizer' in op.insert.value) { + return op.insert.value.colonizer as string; + } + return null; + }; + + it('should render a simple custom insert type', () => { + const rd = new RenderDelta({ ops: ops.slice(0, 2), customRenderer }); + assert.equal(renderToStaticMarkup(rd.render()), '
      :
      '); + }); + + it('should render a custom insert type among other inserts', () => { + const rd = new RenderDelta({ ops, customRenderer }); + assert.equal( + renderToStaticMarkup(rd.render()), + '
      :\ncode1\n:
      ', + ); + }); + + it('should render custom insert types along with inserts with a custom tag', () => { + const rd = new RenderDelta({ + ops, + options: { + customTag: (format) => { + if (format === 'code-block') { + return 'code'; + } + }, + }, + customRenderer, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + ':\ncode1\n:', + ); + }); + }); + + describe('inside headers', () => { + const customRenderer: CustomRenderer = (op) => { + if ('colonizer' in op.insert.value) { + return op.insert.value.colonizer as string; + } + return ''; + }; + + it('should render a simple custom insert type', () => { + const rd = new RenderDelta({ + ops: [ + { insert: { colonizer: ':' } }, + { insert: '\n', attributes: { header: 1 } }, + ], + customRenderer, + }); + assert.equal(renderToStaticMarkup(rd.render()), '

      :

      '); + }); + + it('should render a custom insert type among other inserts', () => { + const rd = new RenderDelta({ + ops: [ + { insert: { colonizer: ':' } }, + { insert: '\n', attributes: { header: 1 } }, + { insert: 'hello' }, + { insert: '\n', attributes: { header: 1 } }, + { insert: { colonizer: ';' } }, + { insert: '\n', attributes: { header: 1 } }, + ], + customRenderer, + }); + assert.equal( + // Note that there's one outer-level h1 tag because of combining multi-line headers. + renderToStaticMarkup(rd.render()), + '

      :\nhello\n;

      ', + ); + }); + + it('should render a custom insert type among other header inserts when not multiline', () => { + const rd = new RenderDelta({ + ops: [ + { insert: { colonizer: ':' } }, + { insert: '\n', attributes: { header: 1 } }, + { insert: 'hello' }, + { insert: '\n', attributes: { header: 1 } }, + { insert: { colonizer: ';' } }, + { insert: '\n', attributes: { header: 1 } }, + ], + customRenderer, + options: { + multiLineHeader: false, + }, + }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      :

      hello

      ;

      ', + ); + }); + }); + }); + + describe('multi-line headers', () => { + it('should render multi-line headers of the same style', () => { + const rd = new RenderDelta({ + ops: [ + { insert: 'hello\n', attributes: { header: 1 } }, + { insert: 'bye\n', attributes: { header: 1 } }, + ], + }); + assert.equal(renderToStaticMarkup(rd.render()), '

      hello\nbye

      '); + }); + + it('should render styling within a multi-line header', () => { + const ops = [ + { insert: 'Hello ' }, + { insert: 'there', attributes: { italic: true } }, + { insert: '\n', attributes: { header: 1 } }, + { insert: 'yo' }, + { insert: '\n', attributes: { header: 1 } }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      Hello there\nyo

      ', + ); + }); + + it('should render complex nested styling within a multi-line header', () => { + const ops = [ + { + insert: 'H', + }, + { + attributes: { + underline: true, + bold: true, + }, + insert: 'e', + }, + { + attributes: { + underline: true, + }, + insert: 'llo', + }, + { + insert: ' ', + }, + { + attributes: { + italic: true, + }, + insert: 'ther', + }, + { + attributes: { + color: '#e60000', + italic: true, + }, + insert: 'e', + }, + { + attributes: { + header: 1, + }, + insert: '\n', + }, + { + attributes: { + color: '#e60000', + }, + insert: 'y', + }, + { + attributes: { + underline: true, + }, + insert: 'o', + }, + { + attributes: { + header: 1, + }, + insert: '\n', + }, + ]; + const rd = new RenderDelta({ ops }); + assert.equal( + renderToStaticMarkup(rd.render()), + '

      Hello there\nyo

      ', + ); + }); + }); + }); + + describe('getGroupedOps', () => { + it('should transform raw Delta ops to an array of DeltaInsertOp', function () { + const ops = [ + { insert: 'This ' }, + { attributes: { font: 'monospace' }, insert: 'is' }, + { insert: ' a ' }, + { attributes: { size: 'large' }, insert: 'test' }, + { insert: ' ' }, + { attributes: { italic: true, bold: true }, insert: 'data' }, + { insert: ' ' }, + { attributes: { underline: true, strike: true }, insert: 'that' }, + { insert: ' is ' }, + { attributes: { color: '#e60000' }, insert: 'will' }, + { insert: ' ' }, + { attributes: { background: '#ffebcc' }, insert: 'test' }, + { insert: ' ' }, + { attributes: { script: ScriptType.Sub }, insert: 'the' }, + { insert: ' ' }, + { attributes: { script: ScriptType.Super }, insert: 'rendering' }, + { insert: ' of ' }, + { attributes: { link: 'yahoo' }, insert: 'inline' }, + { insert: ' ' }, + { insert: { formula: 'x=data' } }, + { insert: ' formats.\n' }, + ]; + + const rd = new RenderDelta({ + ops, + options: { + urlSanitizer: (url) => + url.includes('yahoo') ? `unsafe:${url}` : url, + }, + }); + + const groupedOps = rd.getGroupedOps(); + assert.deepEqual(groupedOps, [ + new InlineGroup([ + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'This ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'is'), { + font: 'monospace', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' a ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'test'), { + size: 'large', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'data'), { + italic: true, + bold: true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'that'), { + underline: true, + strike: true, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' is ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'will'), { + color: '#e60000', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'test'), { + background: '#ffebcc', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'the'), { + script: ScriptType.Sub, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'rendering'), { + script: ScriptType.Super, + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' of ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'inline'), { + link: 'unsafe:yahoo', + }), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' ')), + new DeltaInsertOp(new InsertDataQuill(DataType.Formula, 'x=data')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, ' formats.')), + new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n')), + ]), + ]); + }); + + it('should transform raw custom ops', () => { + const rd = new RenderDelta({ + ops: [{ insert: { cake: 'chocolate' } }], + }); + assert.deepEqual(rd.getGroupedOps(), [ + new InlineGroup([ + new DeltaInsertOp(new InsertDataCustom({ cake: 'chocolate' })), + ]), + ]); + }); + + it('should exclude invalid ops', () => { + [null, undefined, 3, {}].forEach((op: unknown) => { + const rd = new RenderDelta({ ops: [op] }); + assert.deepEqual(rd.getGroupedOps(), []); + }); + }); + }); + + describe('getListTag', () => { + const rd = new RenderDelta({ ops: [] }); + + it('should return the expected list tag for an ordered list', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Ordered, + }); + assert.equal(rd.getListTag(op), 'ol'); + }); + + it('should return the expected list tag for a bullet list', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Bullet, + }); + assert.equal(rd.getListTag(op), 'ul'); + }); + + it('should return the expected list tag for a checked list', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Checked, + }); + assert.equal(rd.getListTag(op), 'ul'); + }); + + it('should return the expected list tag for an unchecked list', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '\n'), { + list: ListType.Unchecked, + }); + assert.equal(rd.getListTag(op), 'ul'); + }); + }); +}); diff --git a/test/render-op.test.ts b/test/render-op.test.ts new file mode 100644 index 0000000..a350ac5 --- /dev/null +++ b/test/render-op.test.ts @@ -0,0 +1,766 @@ +import { strict as assert } from 'node:assert'; +import { describe, it } from 'vitest'; +import { OpToNodeConverterOptions, RenderOp } from '../src/render-op.js'; +import { DeltaInsertOp } from '../src/DeltaInsertOp.js'; +import { InsertDataQuill } from '../src/InsertData.js'; +import { + AlignType, + DataType, + DirectionType, + ListType, + ScriptType, +} from '../src/value-types.js'; +import type { CSSProperties } from 'react'; +import type { OpAttributes } from '../src/OpAttributeSanitizer.js'; +import { renderToStaticMarkup } from 'react-dom/server'; + +describe('RenderOp', () => { + describe('constructor', () => { + it('should set default options', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')), + { + customClasses: () => 'my-class', + }, + ); + assert.deepEqual(ro.getCustomClasses(), ['my-class']); + }); + }); + + describe('getCssStyles', () => { + const attrs: OpAttributes = { + indent: 1, + align: AlignType.Center, + direction: DirectionType.Rtl, + font: 'roman', + size: 'small', + background: 'red', + }; + + const expectedStyles: CSSProperties = { + backgroundColor: 'red', + paddingRight: '3em', + textAlign: 'center', + direction: 'rtl', + fontFamily: 'roman', + fontSize: '0.75em', + }; + + it('should return an empty object when there are no styles', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')), + ); + assert.deepEqual(ro.getCssStyles(), {}); + }); + + it('should return custom styles for a custom attribute', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + attr1: 'red', + }); + const ro = new RenderOp(op, { + customCssStyles: (op) => { + const value = op.attributes['attr1']; + if (value) { + return { + color: value as string, + }; + } + return undefined; + }, + }); + assert.deepEqual(ro.getCssStyles(), { + color: 'red', + }); + }); + + it('should not set the CSS backgroundColor property with the allowBackgroundClasses option', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + background: 'red', + color: 'blue', + }); + const ro = new RenderOp(op, { allowBackgroundClasses: true }); + assert.deepEqual(ro.getCssStyles(), { + color: 'blue', + }); + }); + + it('should return custom styles for a custom attribute and the background attribute', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + attr1: 'green', + background: 'red', + }); + const ro = new RenderOp(op, { + customCssStyles: (op) => { + const value = op.attributes['attr1']; + if (value) { + return { + color: value as string, + }; + } + return undefined; + }, + }); + assert.deepEqual(ro.getCssStyles(), { + backgroundColor: 'red', + color: 'green', + }); + }); + + it('should return inline styles for an inline insert', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), attrs), + { + inlineStyles: {}, + }, + ); + assert.deepEqual(ro.getCssStyles(), expectedStyles); + }); + + it('should return inline styles for an image', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, ''), + attrs, + ); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), expectedStyles); + }); + + it('should return inline styles for a video', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Video, ''), + attrs, + ); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), { + ...expectedStyles, + border: 'none', + }); + }); + + it('should return inline styles for a formula', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Formula, ''), + attrs, + ); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), expectedStyles); + }); + + it('should return the styling for RTL', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + direction: DirectionType.Rtl, + }); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), { + direction: 'rtl', + textAlign: 'inherit', + }); + }); + + it('should return padding styling', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), { + indent: 2, + }); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), { + paddingLeft: '6em', + }); + }); + + it('should ignore an invalid direction', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Image, ''), { + // @ts-expect-error -- Notice this is 'ltr' instead of DirectionType.Rtl. + direction: 'ltr', + }); + const ro = new RenderOp(op); + assert.deepEqual(ro.getCssStyles(), {}); + }); + + it('should allow setting inline styles', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + size: 'huge', + }); + const ro = new RenderOp(op, { + inlineStyles: { + size: (value) => + value === 'huge' + ? { + fontSize: '6em', + } + : undefined, + }, + }); + assert.deepEqual(ro.getCssStyles(), { fontSize: '6em' }); + }); + + it('should render default font inline styles', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + font: 'monospace', + }); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getCssStyles(), { + fontFamily: 'Monaco, Courier New, monospace', + }); + }); + + it('should return nothing for an inline style with no mapped entry', function () { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + size: 'biggest', + }), + { + inlineStyles: { + somethingElse: () => ({ + fontSize: '0.75em', + }), + }, + }, + ); + assert.deepEqual(ro.getCssStyles(), {}); + }); + + it('should return nothing for an inline style where the custom styling function returns undefined', function () { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'f'), { + size: 'biggest', + }), + { + inlineStyles: { + size: () => undefined, + }, + }, + ); + assert.deepEqual(ro.getCssStyles(), {}); + }); + }); + + describe('getClasses', () => { + const options: Partial = { + customClasses: (op) => { + if (op.attributes.size === 'small') { + return ['small-size-a']; + } + }, + }; + + const attrs: OpAttributes = { + indent: 1, + align: AlignType.Center, + direction: DirectionType.Rtl, + font: 'roman', + size: 'small', + background: 'red', + }; + + const expectedClasses = [ + 'small-size-a', + 'ql-align-center', + 'ql-direction-rtl', + 'ql-font-roman', + 'ql-indent-1', + 'ql-size-small', + ]; + + it('should return an empty array when there are no classes', () => { + // Notice we are not passing in attrs. + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')), + options, + ); + assert.deepEqual(ro.getClasses(), []); + }); + + it('should not prefix a class with an empty custom prefix', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), attrs), + { ...options, classPrefix: '' }, + ); + assert.deepEqual(ro.getClasses(), [ + 'small-size-a', + 'align-center', + 'direction-rtl', + 'font-roman', + 'indent-1', + 'size-small', + ]); + }); + + it('should prefix each class with a non-empty custom prefix', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'aa'), attrs), + { ...options, classPrefix: 'xx' }, + ); + assert.deepEqual(ro.getClasses(), [ + 'small-size-a', + 'xx-align-center', + 'xx-direction-rtl', + 'xx-font-roman', + 'xx-indent-1', + 'xx-size-small', + ]); + }); + + it('should by default return prefixed classes for an inline insert', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), attrs), + options, + ); + assert.deepEqual(ro.getClasses(), expectedClasses); + }); + + it('should return prefixed classes for an image', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, ''), + attrs, + ); + const ro = new RenderOp(op, options); + assert.deepEqual(ro.getClasses(), expectedClasses.concat('ql-image')); + }); + + it('should return prefixed classes for a video', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Video, ''), + attrs, + ); + const ro = new RenderOp(op, options); + assert.deepEqual(ro.getClasses(), expectedClasses.concat('ql-video')); + }); + + it('should return prefixed classes for a formula', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Formula, ''), + attrs, + ); + const ro = new RenderOp(op, options); + assert.deepEqual(ro.getClasses(), expectedClasses.concat('ql-formula')); + }); + + it('should add a background class with the allowBackgroundClasses option', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'f'), + attrs, + ); + const ro = new RenderOp(op, { + ...options, + allowBackgroundClasses: true, + }); + assert.deepEqual(ro.getClasses(), [ + 'small-size-a', + 'ql-align-center', + 'ql-background-red', + 'ql-direction-rtl', + 'ql-font-roman', + 'ql-indent-1', + 'ql-size-small', + ]); + }); + + it('should not return any classes with inlineStyles being specified', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'f'), + attrs, + ); + const ro = new RenderOp(op, { inlineStyles: {} }); + assert.deepEqual(ro.getClasses(), []); + }); + }); + + describe('getTagAttributes', () => { + it('should return an empty object when there are no attributes', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')), + ); + assert.deepEqual(ro.getTagAttributes(), {}); + }); + + it('should return an object with the proper attributes for an inline code element', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, ''), { + code: true, + color: 'red', + }); + const ro = new RenderOp(op, { inlineStyles: true }); + assert.deepEqual(ro.getTagAttributes(), { + style: { + color: 'red', + }, + }); + }); + + it('should return an object with the proper attributes for an image', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, 'https://example.com/image.png'), + { + width: '200', + }, + ); + const ro = new RenderOp(op); + assert.deepEqual(ro.getTagAttributes(), { + className: 'ql-image', + src: 'https://example.com/image.png', + width: '200', + }); + }); + + it('should return an object with the proper attributes for a formula', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Formula, ''), { + color: 'red', + }); + const ro = new RenderOp(op); + assert.deepEqual(ro.getTagAttributes(), { + className: 'ql-formula', + style: { + color: 'red', + }, + }); + }); + + it('should return an object with the proper attributes for a video', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Video, 'https://example.com/video.mp4'), + { + color: 'red', + }, + ); + const ro = new RenderOp(op); + assert.deepEqual(ro.getTagAttributes(), { + className: 'ql-video', + allowFullScreen: true, + src: 'https://example.com/video.mp4', + style: { + border: 'none', + color: 'red', + }, + }); + }); + + it('should return an object with the proper attributes for a link', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'link'), { + color: 'red', + link: 'https://example.com/hello', + }); + const ro = new RenderOp(op); + assert.deepEqual(ro.getTagAttributes(), { + href: 'https://example.com/hello', + style: { + color: 'red', + }, + }); + }); + + it('should return an object with the proper attributes for a link with a linkRel option', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'link'), { + color: 'red', + link: 'https://example.com/hello', + }); + const ro = new RenderOp(op, { linkRel: 'nofollow' }); + assert.deepEqual(ro.getTagAttributes(), { + href: 'https://example.com/hello', + rel: 'nofollow', + style: { + color: 'red', + }, + }); + }); + + it('should return an object with the data-language attribute for a code block', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, ''), { + 'code-block': 'javascript', + }); + const ro = new RenderOp(op); + assert.deepEqual(ro.getTagAttributes(), { + 'data-language': 'javascript', + }); + }); + }); + + describe('renderOp', () => { + it('should return children directly in a simple case with no formats', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello')); + const ro = new RenderOp(op); + assert.equal(renderToStaticMarkup(ro.renderOp('something')), 'something'); + }); + + it('should wrap its argument with attributes', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'hello'), + { bold: true, color: 'red' }, + ); + const ro = new RenderOp(op, { + inlineStyles: { + color: (value) => + typeof value === 'string' + ? { + color: value, + } + : undefined, + }, + customAttributes: () => ({ + 'data-custom': '', + }), + }); + assert.equal( + renderToStaticMarkup(ro.renderOp('something')), + 'something', + ); + }); + + it('should ignore children for an image', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, 'https://example.com/hello.png'), + ); + const ro = new RenderOp(op, { + customClasses: () => 'my-img', + }); + assert.equal( + renderToStaticMarkup(ro.renderOp('something')), + '', + ); + }); + + it('should ignore children for an image link', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, 'https://example.com/hello.png'), + { + link: 'https://example.com/hello', + }, + ); + const ro = new RenderOp(op, { + customClasses: () => 'my-img', + }); + assert.equal( + renderToStaticMarkup(ro.renderOp('something')), + '', + ); + }); + + it('should render the span tag for a formula', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Formula, '')), + ); + assert.deepEqual( + renderToStaticMarkup(ro.renderOp('hello')), + 'hello', + ); + }); + + it('should render the blockquote tag for a blockquote', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), { + blockquote: true, + }), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + '
      hello
      ', + ); + }); + + it('should render the pre tag for a code block', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), { + 'code-block': true, + }), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + '
      hello
      ', + ); + }); + + it('should render the li tag for a list item', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), { + list: ListType.Bullet, + }), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + '
    • hello
    • ', + ); + }); + + it('should render a custom tag', () => { + const cases = [ + ['code-block', 'div'], + ['bold', 'h2'], + ['list', 'li'], + ['header', 'h2'], + ] as const; + cases.forEach(([attr, expected]) => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, ''), { + [attr]: true, + header: 2, + }); + const ro = new RenderOp(op, { + customTag: (format) => { + if (format === 'code-block') { + return 'div'; + } + if (format === 'bold') { + return 'b'; + } + }, + }); + assert.deepEqual( + renderToStaticMarkup(ro.renderOp('hello')), + `<${expected}>hello`, + ); + }); + }); + + it('should render both custom inline tags and built-in inline tags nested', () => { + const attributes: OpAttributes = { + bold: true, + italic: true, + mentions: true, + strike: true, + underline: true, + }; + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Text, 'hello'), + attributes, + ); + const ro = new RenderOp(op, { + customTag: (format) => { + if (format === 'mentions') { + // Note the default is 'a'. + return 'span'; + } + if (format === 'strike') { + return 'cite'; + } + return undefined; + }, + }); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + 'hello', + ); + }); + + it('should return the proper tag for a block insert with custom tags and attributes', () => { + const cases = [ + ['blockquote', 'blockquote'], + ['code-block', 'pre'], + ['list', 'li'], + ] as const; + + cases.forEach(([attribute, expected]) => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, ''), { + [attribute]: true, + }); + const ro = new RenderOp(op); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + `<${expected}>hello`, + ); + }); + }); + + it('should return the insert plainly when it has no attributes', () => { + const op = new DeltaInsertOp(new InsertDataQuill(DataType.Text, '')); + const ro = new RenderOp(op); + assert.equal(renderToStaticMarkup(ro.renderOp('hello')), 'hello'); + }); + + it('should return proper HTML content for a complex op', () => { + const attributes: OpAttributes = { + link: 'https://example.com/hello', + bold: true, + italic: true, + underline: true, + strike: true, + script: ScriptType.Super, + font: 'verdana', + size: 'small', + color: 'red', + background: '#fff', + }; + + const ro = new RenderOp( + new DeltaInsertOp( + // Notice this value should be ignored. + new InsertDataQuill(DataType.Text, 'aaa'), + attributes, + ), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp()), + ``, + ); + assert.equal( + renderToStaticMarkup(ro.renderOp('hello')), + `hello`, + ); + }); + + it('should return proper HTML content for a paragraph', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'aa'), { + indent: 1, + }), + ); + assert.equal( + // Notice that what we pass in takes precedence. + renderToStaticMarkup(ro.renderOp('something')), + '

      something

      ', + ); + }); + + it('should return proper HTML content for a blockquote', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Text, 'hello'), { + blockquote: true, + }), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp(null)), + // See the above test for why this is empty. + '
      ', + ); + }); + + it('should return proper HTML content for a formula', () => { + const ro = new RenderOp( + new DeltaInsertOp(new InsertDataQuill(DataType.Formula, ''), { + bold: true, + }), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp('ff')), + 'ff', + ); + }); + + it('should return proper HTML content for an image', () => { + const op = new DeltaInsertOp( + new InsertDataQuill(DataType.Image, 'https://example.com/hello.png'), + ); + const ro = new RenderOp(op, { + customClasses: () => 'my-custom-class', + customAttributes: () => ({ + alt: 'Hello', + }), + }); + assert.equal( + renderToStaticMarkup(ro.renderOp(null)), + 'Hello', + ); + }); + + it('should return proper HTML content for a video', () => { + const ro = new RenderOp( + new DeltaInsertOp( + new InsertDataQuill(DataType.Video, 'https://example.com/vid1.mp4'), + { + bold: true, + }, + ), + ); + assert.equal( + renderToStaticMarkup(ro.renderOp(null)), + ``, + ); + }); + }); +}); diff --git a/test/sanitize-mention.test.ts b/test/sanitize-mention.test.ts new file mode 100644 index 0000000..cf88d19 --- /dev/null +++ b/test/sanitize-mention.test.ts @@ -0,0 +1,37 @@ +import { describe, it } from 'vitest'; +import { strict as assert } from 'node:assert'; +import { sanitizeMention } from '../src/sanitize-mention.js'; + +describe('sanitizeMention', () => { + it('should run sanitized data while running the link URL through the URL sanitizer', () => { + const sanitized = sanitizeMention( + { + class: 'cls-9', + id: 'An-id_9', + target: '_blank', + link: 'http://www.yahoo.com', + slug: 'my-name', + }, + { + urlSanitizer: (url) => `${url}1`, + }, + ); + + assert.deepEqual(sanitized, { + class: 'cls-9', + id: 'An-id_9', + target: '_blank', + link: 'http://www.yahoo.com1', + slug: 'my-name', + }); + }); + + it('should discard a string', () => { + assert.deepEqual( + sanitizeMention('a', { + urlSanitizer: (url) => url, + }), + {}, + ); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 6075b9a..52a88c1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": false, - "target": "es5", - "outDir": "dist/commonjs/", - "lib": [ - "es6" - ], - "types": [ - "node", - "mocha" - ], - "declaration": true, - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "alwaysStrict": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "noFallthroughCasesInSwitch": true, - "esModuleInterop": true - }, - "include": [ - "src/**/*.ts" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "preserveConstEnums": true, + "sourceMap": false, + "target": "ES2022", + "lib": ["DOM", "ES2021", "ES2023.Array"], + "outDir": "dist", + "types": ["node"], + "declaration": true, + "noImplicitThis": true, + "noImplicitAny": true, + "strict": true, + "strictNullChecks": true, + "skipLibCheck": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "jsx": "react-jsx" + }, + "include": ["src/**/*.ts", "src/**/*.tsx"] +} diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..d6b23fb --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "eslint.config.js", + "src/**/*.ts", + "test/**/*.ts", + "test/**/*.tsx" + ] +}