first commit
This commit is contained in:
19
app_vue/node_modules/html-entities/LICENSE
generated
vendored
Normal file
19
app_vue/node_modules/html-entities/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2021 Dulin Marat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
220
app_vue/node_modules/html-entities/README.md
generated
vendored
Normal file
220
app_vue/node_modules/html-entities/README.md
generated
vendored
Normal file
@ -0,0 +1,220 @@
|
||||
html-entities
|
||||
=============
|
||||
|
||||
Fastest HTML entities library.
|
||||
|
||||
Comes with both TypeScript and Flow types.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
```bash
|
||||
$ npm install html-entities
|
||||
```
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
### encode(text, options)
|
||||
|
||||
Encodes text replacing HTML special characters (`<>&"'`) and/or other character ranges depending on `mode` option value.
|
||||
|
||||
```js
|
||||
import {encode} from 'html-entities';
|
||||
|
||||
encode('< > " \' & © ∆');
|
||||
// -> '< > " ' & © ∆'
|
||||
|
||||
encode('< ©', {mode: 'nonAsciiPrintable'});
|
||||
// -> '< ©'
|
||||
|
||||
encode('< ©', {mode: 'nonAsciiPrintable', level: 'xml'});
|
||||
// -> '< ©'
|
||||
|
||||
encode('< > " \' & ©', {mode: 'nonAsciiPrintableOnly', level: 'xml'});
|
||||
// -> '< > " \' & ©'
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
#### level
|
||||
|
||||
* `all` alias to `html5` (default).
|
||||
* `html5` uses `HTML5` named references.
|
||||
* `html4` uses `HTML4` named references.
|
||||
* `xml` uses `XML` named references.
|
||||
|
||||
#### mode
|
||||
|
||||
* `specialChars` encodes only HTML special characters (default).
|
||||
* `nonAscii` encodes HTML special characters and everything outside the [ASCII character range](https://en.wikipedia.org/wiki/ASCII).
|
||||
* `nonAsciiPrintable` encodes HTML special characters and everything outiside of the [ASCII printable characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters).
|
||||
* `nonAsciiPrintableOnly` everything outiside of the [ASCII printable characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters) keeping HTML special characters intact.
|
||||
* `extensive` encodes all non-printable characters, non-ASCII characters and all characters with named references.
|
||||
|
||||
#### numeric
|
||||
|
||||
* `decimal` uses decimal numbers when encoding html entities. i.e. `©` (default).
|
||||
* `hexadecimal` uses hexadecimal numbers when encoding html entities. i.e. `©`.
|
||||
|
||||
|
||||
### decode(text, options)
|
||||
|
||||
Decodes text replacing entities to characters. Unknown entities are left as is.
|
||||
|
||||
```js
|
||||
import {decode} from 'html-entities';
|
||||
|
||||
decode('< > " ' & © ∆');
|
||||
// -> '< > " \' & © ∆'
|
||||
|
||||
decode('©', {level: 'html5'});
|
||||
// -> '©'
|
||||
|
||||
decode('©', {level: 'xml'});
|
||||
// -> '©'
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
#### level
|
||||
|
||||
* `all` alias to `html5` (default).
|
||||
* `html5` uses `HTML5` named references.
|
||||
* `html4` uses `HTML4` named references.
|
||||
* `xml` uses `XML` named references.
|
||||
|
||||
#### scope
|
||||
|
||||
* `body` emulates behavior of browser when parsing tag bodies: entities without semicolon are also replaced (default).
|
||||
* `attribute` emulates behavior of browser when parsing tag attributes: entities without semicolon are replaced when not followed by equality sign `=`.
|
||||
* `strict` ignores entities without semicolon.
|
||||
|
||||
### decodeEntity(text, options)
|
||||
|
||||
Decodes a single HTML entity. Unknown entitiy is left as is.
|
||||
|
||||
```js
|
||||
import {decodeEntity} from 'html-entities';
|
||||
|
||||
decodeEntity('<');
|
||||
// -> '<'
|
||||
|
||||
decodeEntity('©', {level: 'html5'});
|
||||
// -> '©'
|
||||
|
||||
decodeEntity('©', {level: 'xml'});
|
||||
// -> '©'
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
#### level
|
||||
|
||||
* `all` alias to `html5` (default).
|
||||
* `html5` uses `HTML5` named references.
|
||||
* `html4` uses `HTML4` named references.
|
||||
* `xml` uses `XML` named references.
|
||||
|
||||
Performance
|
||||
-----------
|
||||
|
||||
Statistically significant comparison with other libraries using `benchmark.js`.
|
||||
Results by this library are marked with `*`.
|
||||
The source code of the benchmark is available at `benchmark/benchmark.ts`.
|
||||
|
||||
```
|
||||
Common
|
||||
|
||||
Initialization / Load speed
|
||||
|
||||
#1: he x 516 ops/sec ±5.71% (78 runs sampled)
|
||||
* #2: html-entities x 407 ops/sec ±5.64% (81 runs sampled)
|
||||
#3: entities x 352 ops/sec ±4.16% (80 runs sampled)
|
||||
|
||||
HTML5
|
||||
|
||||
Encode test
|
||||
|
||||
* #1: html-entities.encode - html5, extensive x 437,236 ops/sec ±0.90% (98 runs sampled)
|
||||
#2: entities.encodeHTML x 335,714 ops/sec ±0.87% (92 runs sampled)
|
||||
|
||||
Encode non-ASCII test
|
||||
|
||||
* #1: html-entities.encode - html5, nonAscii x 749,246 ops/sec ±0.61% (96 runs sampled)
|
||||
#2: entities.encodeNonAsciiHTML x 706,984 ops/sec ±1.06% (98 runs sampled)
|
||||
* #3: html-entities.encode - html5, nonAsciiPrintable x 691,193 ops/sec ±4.47% (90 runs sampled)
|
||||
#4: he.encode x 141,105 ops/sec ±0.87% (92 runs sampled)
|
||||
|
||||
Decode test
|
||||
|
||||
#1: entities.decodeHTML x 678,595 ops/sec ±1.28% (92 runs sampled)
|
||||
#2: entities.decodeHTMLStrict x 684,372 ops/sec ±2.76% (82 runs sampled)
|
||||
* #3: html-entities.decode - html5, strict x 485,664 ops/sec ±0.80% (94 runs sampled)
|
||||
* #4: html-entities.decode - html5, body x 463,074 ops/sec ±1.11% (93 runs sampled)
|
||||
* #5: html-entities.decode - html5, attribute x 456,185 ops/sec ±2.24% (91 runs sampled)
|
||||
#6: he.decode x 302,668 ops/sec ±2.73% (90 runs sampled)
|
||||
|
||||
HTML4
|
||||
|
||||
Encode test
|
||||
|
||||
* #1: html-entities.encode - html4, nonAscii x 737,475 ops/sec ±1.04% (95 runs sampled)
|
||||
* #2: html-entities.encode - html4, nonAsciiPrintable x 649,866 ops/sec ±4.28% (79 runs sampled)
|
||||
* #3: html-entities.encode - html4, extensive x 202,337 ops/sec ±3.66% (64 runs sampled)
|
||||
|
||||
Decode test
|
||||
|
||||
* #1: html-entities.decode - html4, attribute x 529,674 ops/sec ±0.90% (90 runs sampled)
|
||||
* #2: html-entities.decode - html4, body x 499,135 ops/sec ±2.27% (80 runs sampled)
|
||||
* #3: html-entities.decode - html4, strict x 489,806 ops/sec ±4.37% (84 runs sampled)
|
||||
|
||||
XML
|
||||
|
||||
Encode test
|
||||
|
||||
* #1: html-entities.encode - xml, nonAscii x 823,097 ops/sec ±0.75% (81 runs sampled)
|
||||
* #2: html-entities.encode - xml, nonAsciiPrintable x 764,638 ops/sec ±0.93% (93 runs sampled)
|
||||
#3: entities.encodeXML x 672,186 ops/sec ±1.51% (92 runs sampled)
|
||||
* #4: html-entities.encode - xml, extensive x 376,870 ops/sec ±0.76% (77 runs sampled)
|
||||
|
||||
Decode test
|
||||
|
||||
#1: entities.decodeXML x 930,758 ops/sec ±2.90% (90 runs sampled)
|
||||
* #2: html-entities.decode - xml, body x 617,321 ops/sec ±0.74% (83 runs sampled)
|
||||
* #3: html-entities.decode - xml, attribute x 611,598 ops/sec ±0.50% (92 runs sampled)
|
||||
* #4: html-entities.decode - xml, strict x 607,191 ops/sec ±2.30% (85 runs sampled)
|
||||
|
||||
Escaping
|
||||
|
||||
Escape test
|
||||
|
||||
#1: entities.escapeUTF8 x 1,930,874 ops/sec ±0.80% (95 runs sampled)
|
||||
#2: he.escape x 1,717,522 ops/sec ±0.75% (84 runs sampled)
|
||||
* #3: html-entities.encode - xml, specialChars x 1,611,374 ops/sec ±1.30% (92 runs sampled)
|
||||
#4: entities.escape x 673,710 ops/sec ±1.30% (94 runs sampled)
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
MIT
|
||||
|
||||
Security contact information
|
||||
----------------------------
|
||||
|
||||
To report a security vulnerability, please use the
|
||||
[Tidelift security contact](https://tidelift.com/security). Tidelift will
|
||||
coordinate the fix and disclosure.
|
||||
|
||||
`html-entities` for enterprise
|
||||
------------------------------
|
||||
|
||||
Available as part of the Tidelift Subscription
|
||||
|
||||
The maintainers of `html-entities` and thousands of other packages are working with
|
||||
Tidelift to deliver commercial support and maintenance for the open source
|
||||
dependencies you use to build your applications. Save time, reduce risk, and
|
||||
improve code health, while paying the maintainers of the exact dependencies you
|
||||
use.
|
||||
[Learn more.](https://tidelift.com/subscription/pkg/npm-html-entities?utm_source=npm-html-entities&utm_medium=referral&utm_campaign=enterprise)
|
20
app_vue/node_modules/html-entities/dist/commonjs/index.d.ts
generated
vendored
Normal file
20
app_vue/node_modules/html-entities/dist/commonjs/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export type Level = 'xml' | 'html4' | 'html5' | 'all';
|
||||
interface CommonOptions {
|
||||
level?: Level;
|
||||
}
|
||||
export type EncodeMode = 'specialChars' | 'nonAscii' | 'nonAsciiPrintable' | 'nonAsciiPrintableOnly' | 'extensive';
|
||||
export interface EncodeOptions extends CommonOptions {
|
||||
mode?: EncodeMode;
|
||||
numeric?: 'decimal' | 'hexadecimal';
|
||||
}
|
||||
export type DecodeScope = 'strict' | 'body' | 'attribute';
|
||||
export interface DecodeOptions extends CommonOptions {
|
||||
scope?: DecodeScope;
|
||||
}
|
||||
/** Encodes all the necessary (specified by `level`) characters in the text */
|
||||
export declare function encode(text: string | undefined | null, { mode, numeric, level }?: EncodeOptions): string;
|
||||
/** Decodes a single entity */
|
||||
export declare function decodeEntity(entity: string | undefined | null, { level }?: CommonOptions): string;
|
||||
/** Decodes all entities in the text */
|
||||
export declare function decode(text: string | undefined | null, { level, scope }?: DecodeOptions): string;
|
||||
export {};
|
129
app_vue/node_modules/html-entities/dist/commonjs/index.js
generated
vendored
Normal file
129
app_vue/node_modules/html-entities/dist/commonjs/index.js
generated
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.encode = encode;
|
||||
exports.decodeEntity = decodeEntity;
|
||||
exports.decode = decode;
|
||||
var named_references_js_1 = require("./named-references.js");
|
||||
var numeric_unicode_map_js_1 = require("./numeric-unicode-map.js");
|
||||
var surrogate_pairs_js_1 = require("./surrogate-pairs.js");
|
||||
var allNamedReferences = __assign(__assign({}, named_references_js_1.namedReferences), { all: named_references_js_1.namedReferences.html5 });
|
||||
var encodeRegExps = {
|
||||
specialChars: /[<>'"&]/g,
|
||||
nonAscii: /[<>'"&\u0080-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintable: /[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintableOnly: /[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
extensive: /[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g
|
||||
};
|
||||
var defaultEncodeOptions = {
|
||||
mode: 'specialChars',
|
||||
level: 'all',
|
||||
numeric: 'decimal'
|
||||
};
|
||||
/** Encodes all the necessary (specified by `level`) characters in the text */
|
||||
function encode(text, _a) {
|
||||
var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e;
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
var encodeRegExp = encodeRegExps[mode];
|
||||
var references = allNamedReferences[level].characters;
|
||||
var isHex = numeric === 'hexadecimal';
|
||||
return String.prototype.replace.call(text, encodeRegExp, function (input) {
|
||||
var result = references[input];
|
||||
if (!result) {
|
||||
var code = input.length > 1 ? (0, surrogate_pairs_js_1.getCodePoint)(input, 0) : input.charCodeAt(0);
|
||||
result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';';
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
var defaultDecodeOptions = {
|
||||
scope: 'body',
|
||||
level: 'all'
|
||||
};
|
||||
var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;
|
||||
var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;
|
||||
var baseDecodeRegExps = {
|
||||
xml: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: named_references_js_1.bodyRegExps.xml
|
||||
},
|
||||
html4: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: named_references_js_1.bodyRegExps.html4
|
||||
},
|
||||
html5: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: named_references_js_1.bodyRegExps.html5
|
||||
}
|
||||
};
|
||||
var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 });
|
||||
var fromCharCode = String.fromCharCode;
|
||||
var outOfBoundsChar = fromCharCode(65533);
|
||||
var defaultDecodeEntityOptions = {
|
||||
level: 'all'
|
||||
};
|
||||
function getDecodedEntity(entity, references, isAttribute, isStrict) {
|
||||
var decodeResult = entity;
|
||||
var decodeEntityLastChar = entity[entity.length - 1];
|
||||
if (isAttribute && decodeEntityLastChar === '=') {
|
||||
decodeResult = entity;
|
||||
}
|
||||
else if (isStrict && decodeEntityLastChar !== ';') {
|
||||
decodeResult = entity;
|
||||
}
|
||||
else {
|
||||
var decodeResultByReference = references[entity];
|
||||
if (decodeResultByReference) {
|
||||
decodeResult = decodeResultByReference;
|
||||
}
|
||||
else if (entity[0] === '&' && entity[1] === '#') {
|
||||
var decodeSecondChar = entity[2];
|
||||
var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X'
|
||||
? parseInt(entity.substr(3), 16)
|
||||
: parseInt(entity.substr(2));
|
||||
decodeResult =
|
||||
decodeCode >= 0x10ffff
|
||||
? outOfBoundsChar
|
||||
: decodeCode > 65535
|
||||
? (0, surrogate_pairs_js_1.fromCodePoint)(decodeCode)
|
||||
: fromCharCode(numeric_unicode_map_js_1.numericUnicodeMap[decodeCode] || decodeCode);
|
||||
}
|
||||
}
|
||||
return decodeResult;
|
||||
}
|
||||
/** Decodes a single entity */
|
||||
function decodeEntity(entity, _a) {
|
||||
var _b = _a === void 0 ? defaultDecodeEntityOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c;
|
||||
if (!entity) {
|
||||
return '';
|
||||
}
|
||||
return getDecodedEntity(entity, allNamedReferences[level].entities, false, false);
|
||||
}
|
||||
/** Decodes all entities in the text */
|
||||
function decode(text, _a) {
|
||||
var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d;
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
var decodeRegExp = decodeRegExps[level][scope];
|
||||
var references = allNamedReferences[level].entities;
|
||||
var isAttribute = scope === 'attribute';
|
||||
var isStrict = scope === 'strict';
|
||||
return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); });
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
52
app_vue/node_modules/html-entities/dist/commonjs/index.js.flow
generated
vendored
Normal file
52
app_vue/node_modules/html-entities/dist/commonjs/index.js.flow
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Flowtype definitions for index
|
||||
* Generated by Flowgen from a Typescript Definition
|
||||
* Flowgen v1.13.0
|
||||
* @flow
|
||||
*/
|
||||
|
||||
export type Level = "xml" | "html4" | "html5" | "all";
|
||||
declare interface CommonOptions {
|
||||
level?: Level;
|
||||
}
|
||||
export type EncodeMode =
|
||||
| "specialChars"
|
||||
| "nonAscii"
|
||||
| "nonAsciiPrintable"
|
||||
| "nonAsciiPrintableOnly"
|
||||
| "extensive";
|
||||
export type EncodeOptions = {
|
||||
mode?: EncodeMode,
|
||||
numeric?: "decimal" | "hexadecimal",
|
||||
...
|
||||
} & CommonOptions;
|
||||
export type DecodeScope = "strict" | "body" | "attribute";
|
||||
export type DecodeOptions = {
|
||||
scope?: DecodeScope,
|
||||
...
|
||||
} & CommonOptions;
|
||||
|
||||
/**
|
||||
* Encodes all the necessary (specified by `level`) characters in the text
|
||||
*/
|
||||
declare export function encode(
|
||||
text: string | void | null,
|
||||
x?: EncodeOptions
|
||||
): string;
|
||||
|
||||
/**
|
||||
* Decodes a single entity
|
||||
*/
|
||||
declare export function decodeEntity(
|
||||
entity: string | void | null,
|
||||
x?: CommonOptions
|
||||
): string;
|
||||
|
||||
/**
|
||||
* Decodes all entities in the text
|
||||
*/
|
||||
declare export function decode(
|
||||
text: string | void | null,
|
||||
x?: DecodeOptions
|
||||
): string;
|
||||
declare export {};
|
1
app_vue/node_modules/html-entities/dist/commonjs/index.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/commonjs/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA2CA,wBAoBC;AA2ED,oCAQC;AAGD,wBAcC;AAnKD,6DAAmE;AACnE,mEAA2D;AAC3D,2DAAiE;AAEjE,IAAM,kBAAkB,yBACjB,qCAAe,KAClB,GAAG,EAAE,qCAAe,CAAC,KAAK,GAC7B,CAAC;AAqBF,IAAM,aAAa,GAA+B;IAC9C,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,iFAAiF;IAC3F,iBAAiB,EAAE,0GAA0G;IAC7H,qBAAqB,EAAE,qGAAqG;IAC5H,SAAS,EAAE,yIAAyI;CACvJ,CAAC;AAEF,IAAM,oBAAoB,GAAkB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,SAAS;CACrB,CAAC;AAEF,8EAA8E;AAC9E,SAAgB,MAAM,CAClB,IAA+B,EAC/B,EAAiG;QAAjG,qBAA6E,oBAAoB,KAAA,EAAhG,YAAqB,EAArB,IAAI,mBAAG,cAAc,KAAA,EAAE,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EAAE,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AK,KAAK,QAAQ,CAAC;IAEpC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,UAAC,MAAM,IAAK,OAAA,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,EAA3D,CAA2D,CAAC,CAAC;AAC/G,CAAC"}
|
50
app_vue/node_modules/html-entities/dist/commonjs/named-references.js
generated
vendored
Normal file
50
app_vue/node_modules/html-entities/dist/commonjs/named-references.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
app_vue/node_modules/html-entities/dist/commonjs/named-references.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/commonjs/named-references.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"named-references.js","sourceRoot":"","sources":["../../src/named-references.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kEAAkE;AAClE,IAAM,WAAW,GAAG,GAAG,CAAC;AACxB,IAAM,YAAY,GAAG,IAAI,CAAC;AAO1B,SAAS,uBAAuB,CAAC,KAAa,EAAE,IAA0B;IACtE,IAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,IAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,IAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAE,CAAC,EAAE,CAAC;YACvC,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAM,SAAS,GAAG,OAAO,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,UAAU,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,CAAC;YACtC,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;YACjC,IAAI,eAAe,EAAE,CAAC;gBAClB,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;YACvC,CAAC;YACD,UAAU,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;QACvC,CAAC;QACD,eAAe,GAAG,IAAI,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC,CAAC;QACT,EAAC,QAAQ,wBAAM,QAAQ,GAAK,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,wBAAM,UAAU,GAAK,IAAI,CAAC,UAAU,CAAC,EAAC,CAAC,CAAC;QAC9F,EAAC,QAAQ,UAAA,EAAE,UAAU,YAAA,EAAC,CAAC;AAC/B,CAAC;AAQY,QAAA,WAAW,GAAG;IACvB,GAAG,EAAE,4CAA4C;IACjD,KAAK,EAAE,soBAAsoB;IAC7oB,KAAK,EAAE,mhCAAmhC;CAC7hC,CAAC;AACW,QAAA,eAAe,GAAG,EAAqB,CAAC;AACrD,uBAAe,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,gCAAgC,CAAC,CAAC;AACnF,uBAAe,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,04DAA04D,CAAC,CAAC;AAC/7D,uBAAe,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,4vkBAA4vkB,EAAE,uBAAe,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
34
app_vue/node_modules/html-entities/dist/commonjs/numeric-unicode-map.js
generated
vendored
Normal file
34
app_vue/node_modules/html-entities/dist/commonjs/numeric-unicode-map.js
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.numericUnicodeMap = void 0;
|
||||
exports.numericUnicodeMap = {
|
||||
0: 65533,
|
||||
128: 8364,
|
||||
130: 8218,
|
||||
131: 402,
|
||||
132: 8222,
|
||||
133: 8230,
|
||||
134: 8224,
|
||||
135: 8225,
|
||||
136: 710,
|
||||
137: 8240,
|
||||
138: 352,
|
||||
139: 8249,
|
||||
140: 338,
|
||||
142: 381,
|
||||
145: 8216,
|
||||
146: 8217,
|
||||
147: 8220,
|
||||
148: 8221,
|
||||
149: 8226,
|
||||
150: 8211,
|
||||
151: 8212,
|
||||
152: 732,
|
||||
153: 8482,
|
||||
154: 353,
|
||||
155: 8250,
|
||||
156: 339,
|
||||
158: 382,
|
||||
159: 376
|
||||
};
|
||||
//# sourceMappingURL=numeric-unicode-map.js.map
|
1
app_vue/node_modules/html-entities/dist/commonjs/numeric-unicode-map.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/commonjs/numeric-unicode-map.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"numeric-unicode-map.js","sourceRoot":"","sources":["../../src/numeric-unicode-map.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAA2B;IACrD,CAAC,EAAE,KAAK;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;CACX,CAAC"}
|
3
app_vue/node_modules/html-entities/dist/commonjs/package.json
generated
vendored
Normal file
3
app_vue/node_modules/html-entities/dist/commonjs/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
18
app_vue/node_modules/html-entities/dist/commonjs/surrogate-pairs.js
generated
vendored
Normal file
18
app_vue/node_modules/html-entities/dist/commonjs/surrogate-pairs.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.highSurrogateTo = exports.highSurrogateFrom = exports.getCodePoint = exports.fromCodePoint = void 0;
|
||||
exports.fromCodePoint = String.fromCodePoint ||
|
||||
function (astralCodePoint) {
|
||||
return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00);
|
||||
};
|
||||
// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions
|
||||
exports.getCodePoint = String.prototype.codePointAt
|
||||
? function (input, position) {
|
||||
return input.codePointAt(position);
|
||||
}
|
||||
: function (input, position) {
|
||||
return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;
|
||||
};
|
||||
exports.highSurrogateFrom = 0xd800;
|
||||
exports.highSurrogateTo = 0xdbff;
|
||||
//# sourceMappingURL=surrogate-pairs.js.map
|
1
app_vue/node_modules/html-entities/dist/commonjs/surrogate-pairs.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/commonjs/surrogate-pairs.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"surrogate-pairs.js","sourceRoot":"","sources":["../../src/surrogate-pairs.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GACtB,MAAM,CAAC,aAAa;IACpB,UAAU,eAAuB;QAC7B,OAAO,MAAM,CAAC,YAAY,CACtB,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,EACxD,CAAC,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACjD,CAAC;IACN,CAAC,CAAC;AAEN,yFAAyF;AAC5E,QAAA,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW;IACpD,CAAC,CAAC,UAAU,KAAa,EAAE,QAAgB;QACrC,OAAO,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IACH,CAAC,CAAC,UAAU,KAAa,EAAE,QAAgB;QACrC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7G,CAAC,CAAC;AAEK,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAC3B,QAAA,eAAe,GAAG,MAAM,CAAC"}
|
20
app_vue/node_modules/html-entities/dist/esm/index.d.ts
generated
vendored
Normal file
20
app_vue/node_modules/html-entities/dist/esm/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export type Level = 'xml' | 'html4' | 'html5' | 'all';
|
||||
interface CommonOptions {
|
||||
level?: Level;
|
||||
}
|
||||
export type EncodeMode = 'specialChars' | 'nonAscii' | 'nonAsciiPrintable' | 'nonAsciiPrintableOnly' | 'extensive';
|
||||
export interface EncodeOptions extends CommonOptions {
|
||||
mode?: EncodeMode;
|
||||
numeric?: 'decimal' | 'hexadecimal';
|
||||
}
|
||||
export type DecodeScope = 'strict' | 'body' | 'attribute';
|
||||
export interface DecodeOptions extends CommonOptions {
|
||||
scope?: DecodeScope;
|
||||
}
|
||||
/** Encodes all the necessary (specified by `level`) characters in the text */
|
||||
export declare function encode(text: string | undefined | null, { mode, numeric, level }?: EncodeOptions): string;
|
||||
/** Decodes a single entity */
|
||||
export declare function decodeEntity(entity: string | undefined | null, { level }?: CommonOptions): string;
|
||||
/** Decodes all entities in the text */
|
||||
export declare function decode(text: string | undefined | null, { level, scope }?: DecodeOptions): string;
|
||||
export {};
|
124
app_vue/node_modules/html-entities/dist/esm/index.js
generated
vendored
Normal file
124
app_vue/node_modules/html-entities/dist/esm/index.js
generated
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
import { bodyRegExps, namedReferences } from './named-references.js';
|
||||
import { numericUnicodeMap } from './numeric-unicode-map.js';
|
||||
import { fromCodePoint, getCodePoint } from './surrogate-pairs.js';
|
||||
var allNamedReferences = __assign(__assign({}, namedReferences), { all: namedReferences.html5 });
|
||||
var encodeRegExps = {
|
||||
specialChars: /[<>'"&]/g,
|
||||
nonAscii: /[<>'"&\u0080-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintable: /[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintableOnly: /[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
extensive: /[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g
|
||||
};
|
||||
var defaultEncodeOptions = {
|
||||
mode: 'specialChars',
|
||||
level: 'all',
|
||||
numeric: 'decimal'
|
||||
};
|
||||
/** Encodes all the necessary (specified by `level`) characters in the text */
|
||||
export function encode(text, _a) {
|
||||
var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e;
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
var encodeRegExp = encodeRegExps[mode];
|
||||
var references = allNamedReferences[level].characters;
|
||||
var isHex = numeric === 'hexadecimal';
|
||||
return String.prototype.replace.call(text, encodeRegExp, function (input) {
|
||||
var result = references[input];
|
||||
if (!result) {
|
||||
var code = input.length > 1 ? getCodePoint(input, 0) : input.charCodeAt(0);
|
||||
result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';';
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
var defaultDecodeOptions = {
|
||||
scope: 'body',
|
||||
level: 'all'
|
||||
};
|
||||
var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;
|
||||
var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;
|
||||
var baseDecodeRegExps = {
|
||||
xml: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: bodyRegExps.xml
|
||||
},
|
||||
html4: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: bodyRegExps.html4
|
||||
},
|
||||
html5: {
|
||||
strict: strict,
|
||||
attribute: attribute,
|
||||
body: bodyRegExps.html5
|
||||
}
|
||||
};
|
||||
var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 });
|
||||
var fromCharCode = String.fromCharCode;
|
||||
var outOfBoundsChar = fromCharCode(65533);
|
||||
var defaultDecodeEntityOptions = {
|
||||
level: 'all'
|
||||
};
|
||||
function getDecodedEntity(entity, references, isAttribute, isStrict) {
|
||||
var decodeResult = entity;
|
||||
var decodeEntityLastChar = entity[entity.length - 1];
|
||||
if (isAttribute && decodeEntityLastChar === '=') {
|
||||
decodeResult = entity;
|
||||
}
|
||||
else if (isStrict && decodeEntityLastChar !== ';') {
|
||||
decodeResult = entity;
|
||||
}
|
||||
else {
|
||||
var decodeResultByReference = references[entity];
|
||||
if (decodeResultByReference) {
|
||||
decodeResult = decodeResultByReference;
|
||||
}
|
||||
else if (entity[0] === '&' && entity[1] === '#') {
|
||||
var decodeSecondChar = entity[2];
|
||||
var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X'
|
||||
? parseInt(entity.substr(3), 16)
|
||||
: parseInt(entity.substr(2));
|
||||
decodeResult =
|
||||
decodeCode >= 0x10ffff
|
||||
? outOfBoundsChar
|
||||
: decodeCode > 65535
|
||||
? fromCodePoint(decodeCode)
|
||||
: fromCharCode(numericUnicodeMap[decodeCode] || decodeCode);
|
||||
}
|
||||
}
|
||||
return decodeResult;
|
||||
}
|
||||
/** Decodes a single entity */
|
||||
export function decodeEntity(entity, _a) {
|
||||
var _b = _a === void 0 ? defaultDecodeEntityOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c;
|
||||
if (!entity) {
|
||||
return '';
|
||||
}
|
||||
return getDecodedEntity(entity, allNamedReferences[level].entities, false, false);
|
||||
}
|
||||
/** Decodes all entities in the text */
|
||||
export function decode(text, _a) {
|
||||
var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d;
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
var decodeRegExp = decodeRegExps[level][scope];
|
||||
var references = allNamedReferences[level].entities;
|
||||
var isAttribute = scope === 'attribute';
|
||||
var isStrict = scope === 'strict';
|
||||
return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); });
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
1
app_vue/node_modules/html-entities/dist/esm/index.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/esm/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAEjE,IAAM,kBAAkB,yBACjB,eAAe,KAClB,GAAG,EAAE,eAAe,CAAC,KAAK,GAC7B,CAAC;AAqBF,IAAM,aAAa,GAA+B;IAC9C,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,iFAAiF;IAC3F,iBAAiB,EAAE,0GAA0G;IAC7H,qBAAqB,EAAE,qGAAqG;IAC5H,SAAS,EAAE,yIAAyI;CACvJ,CAAC;AAEF,IAAM,oBAAoB,GAAkB;IACxC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,SAAS;CACrB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,UAAU,MAAM,CAClB,IAA+B,EAC/B,EAAiG;QAAjG,qBAA6E,oBAAoB,KAAA,EAAhG,YAAqB,EAArB,IAAI,mBAAG,cAAc,KAAA,EAAE,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EAAE,aAAa,EAAb,KAAK,mBAAG,KAAK,KAAA;IAE1D,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;IACd,CAAC;IAED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E,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,EAA3D,CAA2D,CAAC,CAAC;AAC/G,CAAC"}
|
47
app_vue/node_modules/html-entities/dist/esm/named-references.js
generated
vendored
Normal file
47
app_vue/node_modules/html-entities/dist/esm/named-references.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
app_vue/node_modules/html-entities/dist/esm/named-references.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/esm/named-references.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"named-references.js","sourceRoot":"","sources":["../../src/named-references.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kEAAkE;AAClE,IAAM,WAAW,GAAG,GAAG,CAAC;AACxB,IAAM,YAAY,GAAG,IAAI,CAAC;AAO1B,SAAS,uBAAuB,CAAC,KAAa,EAAE,IAA0B;IACtE,IAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,IAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,IAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAE,CAAC,EAAE,CAAC;YACvC,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAM,SAAS,GAAG,OAAO,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,UAAU,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,CAAC;YACtC,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;YACjC,IAAI,eAAe,EAAE,CAAC;gBAClB,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;YACvC,CAAC;YACD,UAAU,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;QACvC,CAAC;QACD,eAAe,GAAG,IAAI,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC,CAAC;QACT,EAAC,QAAQ,wBAAM,QAAQ,GAAK,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,wBAAM,UAAU,GAAK,IAAI,CAAC,UAAU,CAAC,EAAC,CAAC,CAAC;QAC9F,EAAC,QAAQ,UAAA,EAAE,UAAU,YAAA,EAAC,CAAC;AAC/B,CAAC;AAQD,MAAM,CAAC,IAAM,WAAW,GAAG;IACvB,GAAG,EAAE,4CAA4C;IACjD,KAAK,EAAE,soBAAsoB;IAC7oB,KAAK,EAAE,mhCAAmhC;CAC7hC,CAAC;AACF,MAAM,CAAC,IAAM,eAAe,GAAG,EAAqB,CAAC;AACrD,eAAe,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,gCAAgC,CAAC,CAAC;AACnF,eAAe,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,04DAA04D,CAAC,CAAC;AAC/7D,eAAe,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,4vkBAA4vkB,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
31
app_vue/node_modules/html-entities/dist/esm/numeric-unicode-map.js
generated
vendored
Normal file
31
app_vue/node_modules/html-entities/dist/esm/numeric-unicode-map.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
export var numericUnicodeMap = {
|
||||
0: 65533,
|
||||
128: 8364,
|
||||
130: 8218,
|
||||
131: 402,
|
||||
132: 8222,
|
||||
133: 8230,
|
||||
134: 8224,
|
||||
135: 8225,
|
||||
136: 710,
|
||||
137: 8240,
|
||||
138: 352,
|
||||
139: 8249,
|
||||
140: 338,
|
||||
142: 381,
|
||||
145: 8216,
|
||||
146: 8217,
|
||||
147: 8220,
|
||||
148: 8221,
|
||||
149: 8226,
|
||||
150: 8211,
|
||||
151: 8212,
|
||||
152: 732,
|
||||
153: 8482,
|
||||
154: 353,
|
||||
155: 8250,
|
||||
156: 339,
|
||||
158: 382,
|
||||
159: 376
|
||||
};
|
||||
//# sourceMappingURL=numeric-unicode-map.js.map
|
1
app_vue/node_modules/html-entities/dist/esm/numeric-unicode-map.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/esm/numeric-unicode-map.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"numeric-unicode-map.js","sourceRoot":"","sources":["../../src/numeric-unicode-map.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,iBAAiB,GAA2B;IACrD,CAAC,EAAE,KAAK;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;CACX,CAAC"}
|
3
app_vue/node_modules/html-entities/dist/esm/package.json
generated
vendored
Normal file
3
app_vue/node_modules/html-entities/dist/esm/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
15
app_vue/node_modules/html-entities/dist/esm/surrogate-pairs.js
generated
vendored
Normal file
15
app_vue/node_modules/html-entities/dist/esm/surrogate-pairs.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export var fromCodePoint = String.fromCodePoint ||
|
||||
function (astralCodePoint) {
|
||||
return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00);
|
||||
};
|
||||
// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions
|
||||
export var getCodePoint = String.prototype.codePointAt
|
||||
? function (input, position) {
|
||||
return input.codePointAt(position);
|
||||
}
|
||||
: function (input, position) {
|
||||
return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;
|
||||
};
|
||||
export var highSurrogateFrom = 0xd800;
|
||||
export var highSurrogateTo = 0xdbff;
|
||||
//# sourceMappingURL=surrogate-pairs.js.map
|
1
app_vue/node_modules/html-entities/dist/esm/surrogate-pairs.js.map
generated
vendored
Normal file
1
app_vue/node_modules/html-entities/dist/esm/surrogate-pairs.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"surrogate-pairs.js","sourceRoot":"","sources":["../../src/surrogate-pairs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,aAAa,GACtB,MAAM,CAAC,aAAa;IACpB,UAAU,eAAuB;QAC7B,OAAO,MAAM,CAAC,YAAY,CACtB,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,EACxD,CAAC,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACjD,CAAC;IACN,CAAC,CAAC;AAEN,yFAAyF;AACzF,MAAM,CAAC,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW;IACpD,CAAC,CAAC,UAAU,KAAa,EAAE,QAAgB;QACrC,OAAO,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IACH,CAAC,CAAC,UAAU,KAAa,EAAE,QAAgB;QACrC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7G,CAAC,CAAC;AAER,MAAM,CAAC,IAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC,MAAM,CAAC,IAAM,eAAe,GAAG,MAAM,CAAC"}
|
106
app_vue/node_modules/html-entities/package.json
generated
vendored
Normal file
106
app_vue/node_modules/html-entities/package.json
generated
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
{
|
||||
"name": "html-entities",
|
||||
"version": "2.6.0",
|
||||
"description": "Fastest HTML entities encode/decode library.",
|
||||
"keywords": [
|
||||
"html",
|
||||
"html entities",
|
||||
"html entities encode",
|
||||
"html entities decode",
|
||||
"entities",
|
||||
"entities encode",
|
||||
"entities decode"
|
||||
],
|
||||
"author": {
|
||||
"name": "Marat Dulin",
|
||||
"email": "mdevils@yandex.ru"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/mdevils"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://patreon.com/mdevils"
|
||||
}
|
||||
],
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.6.6",
|
||||
"@commitlint/config-conventional": "^17.6.6",
|
||||
"@types/benchmark": "^2.1.0",
|
||||
"@types/he": "^1.1.1",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.13.14",
|
||||
"benchmark": "^2.1.4",
|
||||
"entities": "^6.0.0",
|
||||
"eslint": "^9.23.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"flowgen": "^1.13.0",
|
||||
"he": "^1.2.0",
|
||||
"husky": "^4.3.6",
|
||||
"prettier": "^3.5.3",
|
||||
"standard-version": "^9.5.0",
|
||||
"ts-jest": "^29.3.0",
|
||||
"tshy": "^3.0.2",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript-eslint": "^8.28.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mdevils/html-entities.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"main": "./dist/commonjs/index.js",
|
||||
"typings": "./dist/commonjs/index.d.ts",
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:dist": "npm run test:dist:commonjs && npm run test:dist:esm",
|
||||
"test:dist:commonjs": "TEST_DIST=commonjs npm run test",
|
||||
"test:dist:esm": "TEST_DIST=esm node --experimental-vm-modules node_modules/.bin/jest",
|
||||
"benchmark": "tsx benchmark/benchmark",
|
||||
"lint": "eslint src/**.ts",
|
||||
"flow-type-gen": "flowgen --add-flow-header dist/esm/index.d.ts -o dist/commonjs/index.js.flow",
|
||||
"remove-unused-declarations": "find dist -type f \\( -name '*.d.ts' ! -name index.d.ts \\) | xargs rm",
|
||||
"build": "rm -Rf dist && tsc --noEmit && tshy && tsc --declaration --emitDeclarationOnly -p tsconfig.json && tsc --emitDeclarationOnly -p tsconfig.esm.json && npm run remove-unused-declarations && npm run flow-type-gen",
|
||||
"prepublishOnly": "npm run build && npm run test && npm run test:dist",
|
||||
"release": "standard-version"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src",
|
||||
"LICENSE"
|
||||
],
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm run lint && npm run test"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"tshy": {
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"selfLink": false
|
||||
},
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/commonjs/index.d.ts",
|
||||
"default": "./dist/commonjs/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"module": "./dist/esm/index.js"
|
||||
}
|
164
app_vue/node_modules/html-entities/src/index.ts
generated
vendored
Normal file
164
app_vue/node_modules/html-entities/src/index.ts
generated
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
import {bodyRegExps, namedReferences} from './named-references.js';
|
||||
import {numericUnicodeMap} from './numeric-unicode-map.js';
|
||||
import {fromCodePoint, getCodePoint} from './surrogate-pairs.js';
|
||||
|
||||
const allNamedReferences = {
|
||||
...namedReferences,
|
||||
all: namedReferences.html5
|
||||
};
|
||||
|
||||
export type Level = 'xml' | 'html4' | 'html5' | 'all';
|
||||
|
||||
interface CommonOptions {
|
||||
level?: Level;
|
||||
}
|
||||
|
||||
export type EncodeMode = 'specialChars' | 'nonAscii' | 'nonAsciiPrintable' | 'nonAsciiPrintableOnly' | 'extensive';
|
||||
|
||||
export interface EncodeOptions extends CommonOptions {
|
||||
mode?: EncodeMode;
|
||||
numeric?: 'decimal' | 'hexadecimal';
|
||||
}
|
||||
|
||||
export type DecodeScope = 'strict' | 'body' | 'attribute';
|
||||
|
||||
export interface DecodeOptions extends CommonOptions {
|
||||
scope?: DecodeScope;
|
||||
}
|
||||
|
||||
const encodeRegExps: Record<EncodeMode, RegExp> = {
|
||||
specialChars: /[<>'"&]/g,
|
||||
nonAscii: /[<>'"&\u0080-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintable: /[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
nonAsciiPrintableOnly: /[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,
|
||||
extensive: /[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g
|
||||
};
|
||||
|
||||
const defaultEncodeOptions: EncodeOptions = {
|
||||
mode: 'specialChars',
|
||||
level: 'all',
|
||||
numeric: 'decimal'
|
||||
};
|
||||
|
||||
/** Encodes all the necessary (specified by `level`) characters in the text */
|
||||
export function encode(
|
||||
text: string | undefined | null,
|
||||
{mode = 'specialChars', numeric = 'decimal', level = 'all'}: EncodeOptions = defaultEncodeOptions
|
||||
) {
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const encodeRegExp = encodeRegExps[mode];
|
||||
const references = allNamedReferences[level].characters;
|
||||
const isHex = numeric === 'hexadecimal';
|
||||
|
||||
return String.prototype.replace.call(text, encodeRegExp, (input) => {
|
||||
let result = references[input];
|
||||
if (!result) {
|
||||
const code = input.length > 1 ? getCodePoint(input, 0)! : input.charCodeAt(0);
|
||||
result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';';
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
const defaultDecodeOptions: DecodeOptions = {
|
||||
scope: 'body',
|
||||
level: 'all'
|
||||
};
|
||||
|
||||
const strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;
|
||||
const attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;
|
||||
|
||||
const baseDecodeRegExps: Record<Exclude<Level, 'all'>, Record<DecodeScope, RegExp>> = {
|
||||
xml: {
|
||||
strict,
|
||||
attribute,
|
||||
body: bodyRegExps.xml
|
||||
},
|
||||
html4: {
|
||||
strict,
|
||||
attribute,
|
||||
body: bodyRegExps.html4
|
||||
},
|
||||
html5: {
|
||||
strict,
|
||||
attribute,
|
||||
body: bodyRegExps.html5
|
||||
}
|
||||
};
|
||||
|
||||
const decodeRegExps: Record<Level, Record<DecodeScope, RegExp>> = {
|
||||
...baseDecodeRegExps,
|
||||
all: baseDecodeRegExps.html5
|
||||
};
|
||||
|
||||
const fromCharCode = String.fromCharCode;
|
||||
const outOfBoundsChar = fromCharCode(65533);
|
||||
|
||||
const defaultDecodeEntityOptions: CommonOptions = {
|
||||
level: 'all'
|
||||
};
|
||||
|
||||
function getDecodedEntity(
|
||||
entity: string,
|
||||
references: Record<string, string>,
|
||||
isAttribute: boolean,
|
||||
isStrict: boolean
|
||||
): string {
|
||||
let decodeResult = entity;
|
||||
const decodeEntityLastChar = entity[entity.length - 1];
|
||||
if (isAttribute && decodeEntityLastChar === '=') {
|
||||
decodeResult = entity;
|
||||
} else if (isStrict && decodeEntityLastChar !== ';') {
|
||||
decodeResult = entity;
|
||||
} else {
|
||||
const decodeResultByReference = references[entity];
|
||||
if (decodeResultByReference) {
|
||||
decodeResult = decodeResultByReference;
|
||||
} else if (entity[0] === '&' && entity[1] === '#') {
|
||||
const decodeSecondChar = entity[2];
|
||||
const decodeCode =
|
||||
decodeSecondChar == 'x' || decodeSecondChar == 'X'
|
||||
? parseInt(entity.substr(3), 16)
|
||||
: parseInt(entity.substr(2));
|
||||
|
||||
decodeResult =
|
||||
decodeCode >= 0x10ffff
|
||||
? outOfBoundsChar
|
||||
: decodeCode > 65535
|
||||
? fromCodePoint(decodeCode)
|
||||
: fromCharCode(numericUnicodeMap[decodeCode] || decodeCode);
|
||||
}
|
||||
}
|
||||
return decodeResult;
|
||||
}
|
||||
|
||||
/** Decodes a single entity */
|
||||
export function decodeEntity(
|
||||
entity: string | undefined | null,
|
||||
{level = 'all'}: CommonOptions = defaultDecodeEntityOptions
|
||||
): string {
|
||||
if (!entity) {
|
||||
return '';
|
||||
}
|
||||
return getDecodedEntity(entity, allNamedReferences[level].entities, false, false);
|
||||
}
|
||||
|
||||
/** Decodes all entities in the text */
|
||||
export function decode(
|
||||
text: string | undefined | null,
|
||||
{level = 'all', scope = level === 'xml' ? 'strict' : 'body'}: DecodeOptions = defaultDecodeOptions
|
||||
) {
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const decodeRegExp = decodeRegExps[level][scope];
|
||||
const references = allNamedReferences[level].entities;
|
||||
const isAttribute = scope === 'attribute';
|
||||
const isStrict = scope === 'strict';
|
||||
|
||||
return text.replace(decodeRegExp, (entity) => getDecodedEntity(entity, references, isAttribute, isStrict));
|
||||
}
|
48
app_vue/node_modules/html-entities/src/named-references.ts
generated
vendored
Normal file
48
app_vue/node_modules/html-entities/src/named-references.ts
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
30
app_vue/node_modules/html-entities/src/numeric-unicode-map.ts
generated
vendored
Normal file
30
app_vue/node_modules/html-entities/src/numeric-unicode-map.ts
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
export const numericUnicodeMap: Record<number, number> = {
|
||||
0: 65533,
|
||||
128: 8364,
|
||||
130: 8218,
|
||||
131: 402,
|
||||
132: 8222,
|
||||
133: 8230,
|
||||
134: 8224,
|
||||
135: 8225,
|
||||
136: 710,
|
||||
137: 8240,
|
||||
138: 352,
|
||||
139: 8249,
|
||||
140: 338,
|
||||
142: 381,
|
||||
145: 8216,
|
||||
146: 8217,
|
||||
147: 8220,
|
||||
148: 8221,
|
||||
149: 8226,
|
||||
150: 8211,
|
||||
151: 8212,
|
||||
152: 732,
|
||||
153: 8482,
|
||||
154: 353,
|
||||
155: 8250,
|
||||
156: 339,
|
||||
158: 382,
|
||||
159: 376
|
||||
};
|
20
app_vue/node_modules/html-entities/src/surrogate-pairs.ts
generated
vendored
Normal file
20
app_vue/node_modules/html-entities/src/surrogate-pairs.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export const fromCodePoint =
|
||||
String.fromCodePoint ||
|
||||
function (astralCodePoint: number) {
|
||||
return String.fromCharCode(
|
||||
Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800,
|
||||
((astralCodePoint - 0x10000) % 0x400) + 0xdc00
|
||||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions
|
||||
export const getCodePoint = String.prototype.codePointAt
|
||||
? function (input: string, position: number) {
|
||||
return input.codePointAt(position);
|
||||
}
|
||||
: function (input: string, position: number) {
|
||||
return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;
|
||||
};
|
||||
|
||||
export const highSurrogateFrom = 0xd800;
|
||||
export const highSurrogateTo = 0xdbff;
|
Reference in New Issue
Block a user