@quartz-community/github-flavored-markdown 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +2323 -2147
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -1,122 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
var __create = Object.create;
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
12
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
28
|
-
mod
|
|
29
|
-
));
|
|
30
|
-
|
|
31
|
-
// node_modules/extend/index.js
|
|
32
|
-
var require_extend = __commonJS({
|
|
33
|
-
"node_modules/extend/index.js"(exports, module) {
|
|
34
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
35
|
-
var toStr = Object.prototype.toString;
|
|
36
|
-
var defineProperty = Object.defineProperty;
|
|
37
|
-
var gOPD = Object.getOwnPropertyDescriptor;
|
|
38
|
-
var isArray = function isArray2(arr) {
|
|
39
|
-
if (typeof Array.isArray === "function") {
|
|
40
|
-
return Array.isArray(arr);
|
|
41
|
-
}
|
|
42
|
-
return toStr.call(arr) === "[object Array]";
|
|
43
|
-
};
|
|
44
|
-
var isPlainObject2 = function isPlainObject3(obj) {
|
|
45
|
-
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
var hasOwnConstructor = hasOwn.call(obj, "constructor");
|
|
49
|
-
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
|
|
50
|
-
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
var key;
|
|
54
|
-
for (key in obj) {
|
|
55
|
-
}
|
|
56
|
-
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
57
|
-
};
|
|
58
|
-
var setProperty = function setProperty2(target, options) {
|
|
59
|
-
if (defineProperty && options.name === "__proto__") {
|
|
60
|
-
defineProperty(target, options.name, {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
configurable: true,
|
|
63
|
-
value: options.newValue,
|
|
64
|
-
writable: true
|
|
65
|
-
});
|
|
66
|
-
} else {
|
|
67
|
-
target[options.name] = options.newValue;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var getProperty = function getProperty2(obj, name) {
|
|
71
|
-
if (name === "__proto__") {
|
|
72
|
-
if (!hasOwn.call(obj, name)) {
|
|
73
|
-
return void 0;
|
|
74
|
-
} else if (gOPD) {
|
|
75
|
-
return gOPD(obj, name).value;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return obj[name];
|
|
79
|
-
};
|
|
80
|
-
module.exports = function extend2() {
|
|
81
|
-
var options, name, src, copy, copyIsArray, clone2;
|
|
82
|
-
var target = arguments[0];
|
|
83
|
-
var i = 1;
|
|
84
|
-
var length = arguments.length;
|
|
85
|
-
var deep = false;
|
|
86
|
-
if (typeof target === "boolean") {
|
|
87
|
-
deep = target;
|
|
88
|
-
target = arguments[1] || {};
|
|
89
|
-
i = 2;
|
|
90
|
-
}
|
|
91
|
-
if (target == null || typeof target !== "object" && typeof target !== "function") {
|
|
92
|
-
target = {};
|
|
93
|
-
}
|
|
94
|
-
for (; i < length; ++i) {
|
|
95
|
-
options = arguments[i];
|
|
96
|
-
if (options != null) {
|
|
97
|
-
for (name in options) {
|
|
98
|
-
src = getProperty(target, name);
|
|
99
|
-
copy = getProperty(options, name);
|
|
100
|
-
if (target !== copy) {
|
|
101
|
-
if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray(copy)))) {
|
|
102
|
-
if (copyIsArray) {
|
|
103
|
-
copyIsArray = false;
|
|
104
|
-
clone2 = src && isArray(src) ? src : [];
|
|
105
|
-
} else {
|
|
106
|
-
clone2 = src && isPlainObject2(src) ? src : {};
|
|
107
|
-
}
|
|
108
|
-
setProperty(target, { name, newValue: extend2(deep, clone2, copy) });
|
|
109
|
-
} else if (typeof copy !== "undefined") {
|
|
110
|
-
setProperty(target, { name, newValue: copy });
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return target;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
});
|
|
1
|
+
import { unified } from 'unified';
|
|
2
|
+
import 'preact/jsx-runtime';
|
|
3
|
+
import 'preact';
|
|
120
4
|
|
|
121
5
|
// node_modules/ccount/index.js
|
|
122
6
|
function ccount(value, character) {
|
|
@@ -213,16 +97,16 @@ var convert = (
|
|
|
213
97
|
})
|
|
214
98
|
);
|
|
215
99
|
function anyFactory(tests) {
|
|
216
|
-
const
|
|
100
|
+
const checks2 = [];
|
|
217
101
|
let index2 = -1;
|
|
218
102
|
while (++index2 < tests.length) {
|
|
219
|
-
|
|
103
|
+
checks2[index2] = convert(tests[index2]);
|
|
220
104
|
}
|
|
221
105
|
return castFactory(any);
|
|
222
106
|
function any(...parameters) {
|
|
223
107
|
let index3 = -1;
|
|
224
|
-
while (++index3 <
|
|
225
|
-
if (
|
|
108
|
+
while (++index3 < checks2.length) {
|
|
109
|
+
if (checks2[index3].apply(this, parameters)) return true;
|
|
226
110
|
}
|
|
227
111
|
return false;
|
|
228
112
|
}
|
|
@@ -232,8 +116,8 @@ function propertiesFactory(check2) {
|
|
|
232
116
|
/** @type {Record<string, unknown>} */
|
|
233
117
|
check2
|
|
234
118
|
);
|
|
235
|
-
return castFactory(
|
|
236
|
-
function
|
|
119
|
+
return castFactory(all2);
|
|
120
|
+
function all2(node2) {
|
|
237
121
|
const nodeAsRecord = (
|
|
238
122
|
/** @type {Record<string, unknown>} */
|
|
239
123
|
/** @type {unknown} */
|
|
@@ -394,7 +278,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
394
278
|
find.lastIndex = 0;
|
|
395
279
|
let match = find.exec(node2.value);
|
|
396
280
|
while (match) {
|
|
397
|
-
const
|
|
281
|
+
const position = match.index;
|
|
398
282
|
const matchObject = {
|
|
399
283
|
index: match.index,
|
|
400
284
|
input: match.input,
|
|
@@ -405,12 +289,12 @@ function findAndReplace(tree, list2, options) {
|
|
|
405
289
|
value = value.length > 0 ? { type: "text", value } : void 0;
|
|
406
290
|
}
|
|
407
291
|
if (value === false) {
|
|
408
|
-
find.lastIndex =
|
|
292
|
+
find.lastIndex = position + 1;
|
|
409
293
|
} else {
|
|
410
|
-
if (start !==
|
|
294
|
+
if (start !== position) {
|
|
411
295
|
nodes.push({
|
|
412
296
|
type: "text",
|
|
413
|
-
value: node2.value.slice(start,
|
|
297
|
+
value: node2.value.slice(start, position)
|
|
414
298
|
});
|
|
415
299
|
}
|
|
416
300
|
if (Array.isArray(value)) {
|
|
@@ -418,7 +302,7 @@ function findAndReplace(tree, list2, options) {
|
|
|
418
302
|
} else if (value) {
|
|
419
303
|
nodes.push(value);
|
|
420
304
|
}
|
|
421
|
-
start =
|
|
305
|
+
start = position + match[0].length;
|
|
422
306
|
change = true;
|
|
423
307
|
}
|
|
424
308
|
if (!find.global) {
|
|
@@ -1478,11 +1362,11 @@ function inlineCode(node2, _, state) {
|
|
|
1478
1362
|
let match;
|
|
1479
1363
|
if (!pattern.atBreak) continue;
|
|
1480
1364
|
while (match = expression.exec(value)) {
|
|
1481
|
-
let
|
|
1482
|
-
if (value.charCodeAt(
|
|
1483
|
-
|
|
1365
|
+
let position = match.index;
|
|
1366
|
+
if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) {
|
|
1367
|
+
position--;
|
|
1484
1368
|
}
|
|
1485
|
-
value = value.slice(0,
|
|
1369
|
+
value = value.slice(0, position) + " " + value.slice(match.index + 1);
|
|
1486
1370
|
}
|
|
1487
1371
|
}
|
|
1488
1372
|
return sequence + value + sequence;
|
|
@@ -2179,18 +2063,18 @@ function splice(list2, start, remove, items) {
|
|
|
2179
2063
|
// node_modules/micromark-util-combine-extensions/index.js
|
|
2180
2064
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
2181
2065
|
function combineExtensions(extensions) {
|
|
2182
|
-
const
|
|
2066
|
+
const all2 = {};
|
|
2183
2067
|
let index2 = -1;
|
|
2184
2068
|
while (++index2 < extensions.length) {
|
|
2185
|
-
syntaxExtension(
|
|
2069
|
+
syntaxExtension(all2, extensions[index2]);
|
|
2186
2070
|
}
|
|
2187
|
-
return
|
|
2071
|
+
return all2;
|
|
2188
2072
|
}
|
|
2189
|
-
function syntaxExtension(
|
|
2073
|
+
function syntaxExtension(all2, extension) {
|
|
2190
2074
|
let hook;
|
|
2191
2075
|
for (hook in extension) {
|
|
2192
|
-
const maybe = hasOwnProperty.call(
|
|
2193
|
-
const left = maybe || (
|
|
2076
|
+
const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0;
|
|
2077
|
+
const left = maybe || (all2[hook] = {});
|
|
2194
2078
|
const right = extension[hook];
|
|
2195
2079
|
let code3;
|
|
2196
2080
|
if (right) {
|
|
@@ -3570,1720 +3454,336 @@ function remarkGfm(options) {
|
|
|
3570
3454
|
toMarkdownExtensions.push(gfmToMarkdown(settings));
|
|
3571
3455
|
}
|
|
3572
3456
|
|
|
3573
|
-
// node_modules/
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3457
|
+
// node_modules/nlcst-to-string/lib/index.js
|
|
3458
|
+
var emptyNodes = [];
|
|
3459
|
+
function toString2(value) {
|
|
3460
|
+
let index2 = -1;
|
|
3461
|
+
if (!value || !Array.isArray(value) && !value.type) {
|
|
3462
|
+
throw new Error("Expected node, not `" + value + "`");
|
|
3463
|
+
}
|
|
3464
|
+
if ("value" in value) return value.value;
|
|
3465
|
+
const children = (Array.isArray(value) ? value : value.children) || emptyNodes;
|
|
3466
|
+
const values = [];
|
|
3467
|
+
while (++index2 < children.length) {
|
|
3468
|
+
values[index2] = toString2(children[index2]);
|
|
3577
3469
|
}
|
|
3470
|
+
return values.join("");
|
|
3578
3471
|
}
|
|
3579
3472
|
|
|
3580
|
-
// node_modules/
|
|
3581
|
-
var
|
|
3473
|
+
// node_modules/array-iterate/lib/index.js
|
|
3474
|
+
var own = {}.hasOwnProperty;
|
|
3475
|
+
function arrayIterate(values, callbackFn, thisArg) {
|
|
3476
|
+
let index2 = -1;
|
|
3477
|
+
if (!values) {
|
|
3478
|
+
throw new Error("Iterate requires that |this| not be " + values);
|
|
3479
|
+
}
|
|
3480
|
+
if (!own.call(values, "length")) {
|
|
3481
|
+
throw new Error("Iterate requires that |this| has a `length`");
|
|
3482
|
+
}
|
|
3483
|
+
if (typeof callbackFn !== "function") {
|
|
3484
|
+
throw new TypeError("`callback` must be a function");
|
|
3485
|
+
}
|
|
3486
|
+
while (++index2 < values.length) {
|
|
3487
|
+
if (!(index2 in values)) {
|
|
3488
|
+
continue;
|
|
3489
|
+
}
|
|
3490
|
+
const result = callbackFn.call(thisArg, values[index2], index2, values);
|
|
3491
|
+
if (typeof result === "number") {
|
|
3492
|
+
if (result < 0) {
|
|
3493
|
+
index2 = 0;
|
|
3494
|
+
}
|
|
3495
|
+
index2 = result - 1;
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
}
|
|
3582
3499
|
|
|
3583
|
-
// node_modules/
|
|
3584
|
-
function
|
|
3585
|
-
|
|
3586
|
-
|
|
3500
|
+
// node_modules/unist-util-modify-children/lib/index.js
|
|
3501
|
+
function modifyChildren(modifier) {
|
|
3502
|
+
return modify;
|
|
3503
|
+
function modify(parent) {
|
|
3504
|
+
if (!parent || !parent.children) {
|
|
3505
|
+
throw new Error("Missing children in `parent` for `modifier`");
|
|
3506
|
+
}
|
|
3507
|
+
arrayIterate(parent.children, iteratee, parent);
|
|
3508
|
+
}
|
|
3509
|
+
function iteratee(node2, index2) {
|
|
3510
|
+
return modifier(node2, index2, this);
|
|
3587
3511
|
}
|
|
3588
|
-
const prototype = Object.getPrototypeOf(value);
|
|
3589
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
3590
3512
|
}
|
|
3591
3513
|
|
|
3592
|
-
// node_modules/
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
function
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3514
|
+
// node_modules/parse-latin/lib/plugin/merge-affix-exceptions.js
|
|
3515
|
+
var mergeAffixExceptions = modifyChildren(
|
|
3516
|
+
/**
|
|
3517
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
3518
|
+
*/
|
|
3519
|
+
function(child, index2, parent) {
|
|
3520
|
+
const previous2 = parent.children[index2 - 1];
|
|
3521
|
+
if (previous2 && "children" in previous2 && "children" in child && child.children.length > 0) {
|
|
3522
|
+
let position = -1;
|
|
3523
|
+
while (child.children[++position]) {
|
|
3524
|
+
const node2 = child.children[position];
|
|
3525
|
+
if (node2.type === "WordNode") {
|
|
3526
|
+
return;
|
|
3527
|
+
}
|
|
3528
|
+
if (node2.type === "SymbolNode" || node2.type === "PunctuationNode") {
|
|
3529
|
+
const value = toString2(node2);
|
|
3530
|
+
if (value !== "," && value !== ";") {
|
|
3531
|
+
return;
|
|
3532
|
+
}
|
|
3533
|
+
previous2.children.push(...child.children);
|
|
3534
|
+
if (previous2.position && child.position) {
|
|
3535
|
+
previous2.position.end = child.position.end;
|
|
3536
|
+
}
|
|
3537
|
+
parent.children.splice(index2, 1);
|
|
3538
|
+
return index2;
|
|
3614
3539
|
}
|
|
3615
3540
|
}
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
);
|
|
3544
|
+
|
|
3545
|
+
// node_modules/parse-latin/lib/expressions.js
|
|
3546
|
+
var affixSymbol = /^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/;
|
|
3547
|
+
var newLine = /^[ \t]*((\r?\n|\r)[\t ]*)+$/;
|
|
3548
|
+
var terminalMarker = /^([!.?\u2026\u203D]+)$/;
|
|
3549
|
+
var wordSymbolInner = /^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/;
|
|
3550
|
+
var numerical = /^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-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
|
|
3551
|
+
var digitStart = /^\d/;
|
|
3552
|
+
var lowerInitial = /^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/;
|
|
3553
|
+
var surrogates = /[\uD800-\uDFFF]/;
|
|
3554
|
+
var punctuation = /[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
|
|
3555
|
+
var word = /[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF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DC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82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DE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF]/;
|
|
3556
|
+
var whiteSpace = /[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
|
3557
|
+
|
|
3558
|
+
// node_modules/parse-latin/lib/plugin/merge-affix-symbol.js
|
|
3559
|
+
var mergeAffixSymbol = modifyChildren(
|
|
3560
|
+
/**
|
|
3561
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
3562
|
+
*/
|
|
3563
|
+
function(child, index2, parent) {
|
|
3564
|
+
if ("children" in child && child.children.length > 0 && index2 > 0) {
|
|
3565
|
+
const previous2 = parent.children[index2 - 1];
|
|
3566
|
+
const first = child.children[0];
|
|
3567
|
+
const second = child.children[1];
|
|
3568
|
+
if (previous2 && previous2.type === "SentenceNode" && (first.type === "SymbolNode" || first.type === "PunctuationNode") && affixSymbol.test(toString2(first))) {
|
|
3569
|
+
child.children.shift();
|
|
3570
|
+
previous2.children.push(first);
|
|
3571
|
+
if (first.position && previous2.position) {
|
|
3572
|
+
previous2.position.end = first.position.end;
|
|
3573
|
+
}
|
|
3574
|
+
if (second && second.position && child.position) {
|
|
3575
|
+
child.position.start = second.position.start;
|
|
3576
|
+
}
|
|
3577
|
+
return index2 - 1;
|
|
3621
3578
|
}
|
|
3622
3579
|
}
|
|
3623
3580
|
}
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3581
|
+
);
|
|
3582
|
+
|
|
3583
|
+
// node_modules/parse-latin/lib/plugin/break-implicit-sentences.js
|
|
3584
|
+
var breakImplicitSentences = modifyChildren(
|
|
3585
|
+
/**
|
|
3586
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
3587
|
+
*/
|
|
3588
|
+
function(child, index2, parent) {
|
|
3589
|
+
if (child.type !== "SentenceNode") {
|
|
3590
|
+
return;
|
|
3629
3591
|
}
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
return wrapped;
|
|
3637
|
-
function wrapped(...parameters) {
|
|
3638
|
-
const fnExpectsCallback = middleware.length > parameters.length;
|
|
3639
|
-
let result;
|
|
3640
|
-
if (fnExpectsCallback) {
|
|
3641
|
-
parameters.push(done);
|
|
3642
|
-
}
|
|
3643
|
-
try {
|
|
3644
|
-
result = middleware.apply(this, parameters);
|
|
3645
|
-
} catch (error) {
|
|
3646
|
-
const exception = (
|
|
3647
|
-
/** @type {Error} */
|
|
3648
|
-
error
|
|
3649
|
-
);
|
|
3650
|
-
if (fnExpectsCallback && called) {
|
|
3651
|
-
throw exception;
|
|
3592
|
+
const children = child.children;
|
|
3593
|
+
let position = 0;
|
|
3594
|
+
while (++position < children.length - 1) {
|
|
3595
|
+
const node2 = children[position];
|
|
3596
|
+
if (node2.type !== "WhiteSpaceNode" || toString2(node2).split(/\r\n|\r|\n/).length < 3) {
|
|
3597
|
+
continue;
|
|
3652
3598
|
}
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3599
|
+
child.children = children.slice(0, position);
|
|
3600
|
+
const insertion = {
|
|
3601
|
+
type: "SentenceNode",
|
|
3602
|
+
children: children.slice(position + 1)
|
|
3603
|
+
};
|
|
3604
|
+
const tail = children[position - 1];
|
|
3605
|
+
const head = children[position + 1];
|
|
3606
|
+
parent.children.splice(index2 + 1, 0, node2, insertion);
|
|
3607
|
+
if (child.position && tail.position && head.position) {
|
|
3608
|
+
const end = child.position.end;
|
|
3609
|
+
child.position.end = tail.position.end;
|
|
3610
|
+
insertion.position = { start: head.position.start, end };
|
|
3662
3611
|
}
|
|
3612
|
+
return index2 + 1;
|
|
3663
3613
|
}
|
|
3664
3614
|
}
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3615
|
+
);
|
|
3616
|
+
|
|
3617
|
+
// node_modules/parse-latin/lib/plugin/make-final-white-space-siblings.js
|
|
3618
|
+
var makeFinalWhiteSpaceSiblings = modifyChildren(
|
|
3619
|
+
/**
|
|
3620
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph | Root>}
|
|
3621
|
+
*/
|
|
3622
|
+
function(child, index2, parent) {
|
|
3623
|
+
if ("children" in child) {
|
|
3624
|
+
const tail = child.children[child.children.length - 1];
|
|
3625
|
+
if (tail && tail.type === "WhiteSpaceNode") {
|
|
3626
|
+
child.children.pop();
|
|
3627
|
+
parent.children.splice(index2 + 1, 0, tail);
|
|
3628
|
+
const previous2 = child.children[child.children.length - 1];
|
|
3629
|
+
if (previous2 && previous2.position && child.position) {
|
|
3630
|
+
child.position.end = previous2.position.end;
|
|
3631
|
+
}
|
|
3632
|
+
return index2;
|
|
3633
|
+
}
|
|
3669
3634
|
}
|
|
3670
3635
|
}
|
|
3671
|
-
|
|
3672
|
-
done(null, value);
|
|
3673
|
-
}
|
|
3674
|
-
}
|
|
3636
|
+
);
|
|
3675
3637
|
|
|
3676
|
-
// node_modules/unist-util-
|
|
3677
|
-
function
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
return point(value);
|
|
3638
|
+
// node_modules/unist-util-visit-children/lib/index.js
|
|
3639
|
+
function visitChildren(visitor) {
|
|
3640
|
+
return visit2;
|
|
3641
|
+
function visit2(parent) {
|
|
3642
|
+
const children = parent && parent.children;
|
|
3643
|
+
let index2 = -1;
|
|
3644
|
+
if (!children) {
|
|
3645
|
+
throw new Error("Missing children in `parent` for `visit`");
|
|
3646
|
+
}
|
|
3647
|
+
while (++index2 in children) {
|
|
3648
|
+
visitor(children[index2], index2, parent);
|
|
3649
|
+
}
|
|
3689
3650
|
}
|
|
3690
|
-
return "";
|
|
3691
|
-
}
|
|
3692
|
-
function point(point2) {
|
|
3693
|
-
return index(point2 && point2.line) + ":" + index(point2 && point2.column);
|
|
3694
|
-
}
|
|
3695
|
-
function position(pos) {
|
|
3696
|
-
return point(pos && pos.start) + "-" + point(pos && pos.end);
|
|
3697
|
-
}
|
|
3698
|
-
function index(value) {
|
|
3699
|
-
return value && typeof value === "number" ? value : 1;
|
|
3700
3651
|
}
|
|
3701
3652
|
|
|
3702
|
-
// node_modules/
|
|
3703
|
-
var
|
|
3653
|
+
// node_modules/parse-latin/lib/plugin/make-initial-white-space-siblings.js
|
|
3654
|
+
var makeInitialWhiteSpaceSiblings = visitChildren(
|
|
3704
3655
|
/**
|
|
3705
|
-
*
|
|
3706
|
-
*
|
|
3707
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
3708
|
-
*
|
|
3709
|
-
* @overload
|
|
3710
|
-
* @param {string} reason
|
|
3711
|
-
* @param {Options | null | undefined} [options]
|
|
3712
|
-
* @returns
|
|
3713
|
-
*
|
|
3714
|
-
* @overload
|
|
3715
|
-
* @param {string} reason
|
|
3716
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
3717
|
-
* @param {string | null | undefined} [origin]
|
|
3718
|
-
* @returns
|
|
3719
|
-
*
|
|
3720
|
-
* @overload
|
|
3721
|
-
* @param {string} reason
|
|
3722
|
-
* @param {Point | Position | null | undefined} place
|
|
3723
|
-
* @param {string | null | undefined} [origin]
|
|
3724
|
-
* @returns
|
|
3725
|
-
*
|
|
3726
|
-
* @overload
|
|
3727
|
-
* @param {string} reason
|
|
3728
|
-
* @param {string | null | undefined} [origin]
|
|
3729
|
-
* @returns
|
|
3730
|
-
*
|
|
3731
|
-
* @overload
|
|
3732
|
-
* @param {Error | VFileMessage} cause
|
|
3733
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
3734
|
-
* @param {string | null | undefined} [origin]
|
|
3735
|
-
* @returns
|
|
3736
|
-
*
|
|
3737
|
-
* @overload
|
|
3738
|
-
* @param {Error | VFileMessage} cause
|
|
3739
|
-
* @param {Point | Position | null | undefined} place
|
|
3740
|
-
* @param {string | null | undefined} [origin]
|
|
3741
|
-
* @returns
|
|
3742
|
-
*
|
|
3743
|
-
* @overload
|
|
3744
|
-
* @param {Error | VFileMessage} cause
|
|
3745
|
-
* @param {string | null | undefined} [origin]
|
|
3746
|
-
* @returns
|
|
3747
|
-
*
|
|
3748
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
3749
|
-
* Reason for message, should use markdown.
|
|
3750
|
-
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
3751
|
-
* Configuration (optional).
|
|
3752
|
-
* @param {string | null | undefined} [origin]
|
|
3753
|
-
* Place in code where the message originates (example:
|
|
3754
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
3755
|
-
* @returns
|
|
3756
|
-
* Instance of `VFileMessage`.
|
|
3656
|
+
* @type {import('unist-util-visit-children').Visitor<Paragraph | Root>}
|
|
3757
3657
|
*/
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
if (optionsOrParentOrPlace) {
|
|
3769
|
-
if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
|
|
3770
|
-
options = { place: optionsOrParentOrPlace };
|
|
3771
|
-
} else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
|
|
3772
|
-
options = { place: optionsOrParentOrPlace };
|
|
3773
|
-
} else if ("type" in optionsOrParentOrPlace) {
|
|
3774
|
-
options = {
|
|
3775
|
-
ancestors: [optionsOrParentOrPlace],
|
|
3776
|
-
place: optionsOrParentOrPlace.position
|
|
3777
|
-
};
|
|
3778
|
-
} else {
|
|
3779
|
-
options = { ...optionsOrParentOrPlace };
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
if (typeof causeOrReason === "string") {
|
|
3783
|
-
reason = causeOrReason;
|
|
3784
|
-
} else if (!options.cause && causeOrReason) {
|
|
3785
|
-
legacyCause = true;
|
|
3786
|
-
reason = causeOrReason.message;
|
|
3787
|
-
options.cause = causeOrReason;
|
|
3788
|
-
}
|
|
3789
|
-
if (!options.ruleId && !options.source && typeof origin === "string") {
|
|
3790
|
-
const index2 = origin.indexOf(":");
|
|
3791
|
-
if (index2 === -1) {
|
|
3792
|
-
options.ruleId = origin;
|
|
3793
|
-
} else {
|
|
3794
|
-
options.source = origin.slice(0, index2);
|
|
3795
|
-
options.ruleId = origin.slice(index2 + 1);
|
|
3796
|
-
}
|
|
3797
|
-
}
|
|
3798
|
-
if (!options.place && options.ancestors && options.ancestors) {
|
|
3799
|
-
const parent = options.ancestors[options.ancestors.length - 1];
|
|
3800
|
-
if (parent) {
|
|
3801
|
-
options.place = parent.position;
|
|
3658
|
+
function(child, index2, parent) {
|
|
3659
|
+
if ("children" in child && child.children) {
|
|
3660
|
+
const head = child.children[0];
|
|
3661
|
+
if (head && head.type === "WhiteSpaceNode") {
|
|
3662
|
+
child.children.shift();
|
|
3663
|
+
parent.children.splice(index2, 0, head);
|
|
3664
|
+
const next = child.children[0];
|
|
3665
|
+
if (next && next.position && child.position) {
|
|
3666
|
+
child.position.start = next.position.start;
|
|
3667
|
+
}
|
|
3802
3668
|
}
|
|
3803
3669
|
}
|
|
3804
|
-
const start = options.place && "start" in options.place ? options.place.start : options.place;
|
|
3805
|
-
this.ancestors = options.ancestors || void 0;
|
|
3806
|
-
this.cause = options.cause || void 0;
|
|
3807
|
-
this.column = start ? start.column : void 0;
|
|
3808
|
-
this.fatal = void 0;
|
|
3809
|
-
this.file = "";
|
|
3810
|
-
this.message = reason;
|
|
3811
|
-
this.line = start ? start.line : void 0;
|
|
3812
|
-
this.name = stringifyPosition(options.place) || "1:1";
|
|
3813
|
-
this.place = options.place || void 0;
|
|
3814
|
-
this.reason = this.message;
|
|
3815
|
-
this.ruleId = options.ruleId || void 0;
|
|
3816
|
-
this.source = options.source || void 0;
|
|
3817
|
-
this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
|
|
3818
|
-
this.actual = void 0;
|
|
3819
|
-
this.expected = void 0;
|
|
3820
|
-
this.note = void 0;
|
|
3821
|
-
this.url = void 0;
|
|
3822
3670
|
}
|
|
3823
|
-
};
|
|
3824
|
-
VFileMessage.prototype.file = "";
|
|
3825
|
-
VFileMessage.prototype.name = "";
|
|
3826
|
-
VFileMessage.prototype.reason = "";
|
|
3827
|
-
VFileMessage.prototype.message = "";
|
|
3828
|
-
VFileMessage.prototype.stack = "";
|
|
3829
|
-
VFileMessage.prototype.column = void 0;
|
|
3830
|
-
VFileMessage.prototype.line = void 0;
|
|
3831
|
-
VFileMessage.prototype.ancestors = void 0;
|
|
3832
|
-
VFileMessage.prototype.cause = void 0;
|
|
3833
|
-
VFileMessage.prototype.fatal = void 0;
|
|
3834
|
-
VFileMessage.prototype.place = void 0;
|
|
3835
|
-
VFileMessage.prototype.ruleId = void 0;
|
|
3836
|
-
VFileMessage.prototype.source = void 0;
|
|
3837
|
-
|
|
3838
|
-
// node_modules/vfile/lib/minurl.shared.js
|
|
3839
|
-
function isUrl(fileUrlOrPath) {
|
|
3840
|
-
return Boolean(
|
|
3841
|
-
fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && // @ts-expect-error: indexing is fine.
|
|
3842
|
-
fileUrlOrPath.auth === void 0
|
|
3843
|
-
);
|
|
3844
|
-
}
|
|
3845
|
-
|
|
3846
|
-
// node_modules/vfile/lib/index.js
|
|
3847
|
-
var order = (
|
|
3848
|
-
/** @type {const} */
|
|
3849
|
-
[
|
|
3850
|
-
"history",
|
|
3851
|
-
"path",
|
|
3852
|
-
"basename",
|
|
3853
|
-
"stem",
|
|
3854
|
-
"extname",
|
|
3855
|
-
"dirname"
|
|
3856
|
-
]
|
|
3857
3671
|
);
|
|
3858
|
-
|
|
3672
|
+
|
|
3673
|
+
// node_modules/parse-latin/lib/plugin/merge-final-word-symbol.js
|
|
3674
|
+
var mergeFinalWordSymbol = modifyChildren(
|
|
3859
3675
|
/**
|
|
3860
|
-
*
|
|
3861
|
-
*
|
|
3862
|
-
* `options` is treated as:
|
|
3863
|
-
*
|
|
3864
|
-
* * `string` or `Uint8Array` — `{value: options}`
|
|
3865
|
-
* * `URL` — `{path: options}`
|
|
3866
|
-
* * `VFile` — shallow copies its data over to the new file
|
|
3867
|
-
* * `object` — all fields are shallow copied over to the new file
|
|
3868
|
-
*
|
|
3869
|
-
* Path related fields are set in the following order (least specific to
|
|
3870
|
-
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
3871
|
-
* `dirname`.
|
|
3872
|
-
*
|
|
3873
|
-
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
3874
|
-
* `path`, `basename`, or `stem` too.
|
|
3875
|
-
*
|
|
3876
|
-
* @param {Compatible | null | undefined} [value]
|
|
3877
|
-
* File value.
|
|
3878
|
-
* @returns
|
|
3879
|
-
* New instance.
|
|
3676
|
+
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
3880
3677
|
*/
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
this.data = {};
|
|
3894
|
-
this.history = [];
|
|
3895
|
-
this.messages = [];
|
|
3896
|
-
this.value;
|
|
3897
|
-
this.map;
|
|
3898
|
-
this.result;
|
|
3899
|
-
this.stored;
|
|
3900
|
-
let index2 = -1;
|
|
3901
|
-
while (++index2 < order.length) {
|
|
3902
|
-
const field2 = order[index2];
|
|
3903
|
-
if (field2 in options && options[field2] !== void 0 && options[field2] !== null) {
|
|
3904
|
-
this[field2] = field2 === "history" ? [...options[field2]] : options[field2];
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
let field;
|
|
3908
|
-
for (field in options) {
|
|
3909
|
-
if (!order.includes(field)) {
|
|
3910
|
-
this[field] = options[field];
|
|
3678
|
+
function(child, index2, parent) {
|
|
3679
|
+
if (index2 > 0 && (child.type === "SymbolNode" || child.type === "PunctuationNode") && toString2(child) === "-") {
|
|
3680
|
+
const children = parent.children;
|
|
3681
|
+
const previous2 = children[index2 - 1];
|
|
3682
|
+
const next = children[index2 + 1];
|
|
3683
|
+
if ((!next || next.type !== "WordNode") && previous2 && previous2.type === "WordNode") {
|
|
3684
|
+
children.splice(index2, 1);
|
|
3685
|
+
previous2.children.push(child);
|
|
3686
|
+
if (previous2.position && child.position) {
|
|
3687
|
+
previous2.position.end = child.position.end;
|
|
3688
|
+
}
|
|
3689
|
+
return index2;
|
|
3911
3690
|
}
|
|
3912
3691
|
}
|
|
3913
3692
|
}
|
|
3693
|
+
);
|
|
3694
|
+
|
|
3695
|
+
// node_modules/parse-latin/lib/plugin/merge-initial-digit-sentences.js
|
|
3696
|
+
var mergeInitialDigitSentences = modifyChildren(
|
|
3914
3697
|
/**
|
|
3915
|
-
*
|
|
3916
|
-
*
|
|
3917
|
-
* @returns {string | undefined}
|
|
3918
|
-
* Basename.
|
|
3919
|
-
*/
|
|
3920
|
-
get basename() {
|
|
3921
|
-
return typeof this.path === "string" ? default2.basename(this.path) : void 0;
|
|
3922
|
-
}
|
|
3923
|
-
/**
|
|
3924
|
-
* Set basename (including extname) (`'index.min.js'`).
|
|
3925
|
-
*
|
|
3926
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
3927
|
-
* on windows).
|
|
3928
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
3929
|
-
*
|
|
3930
|
-
* @param {string} basename
|
|
3931
|
-
* Basename.
|
|
3932
|
-
* @returns {undefined}
|
|
3933
|
-
* Nothing.
|
|
3934
|
-
*/
|
|
3935
|
-
set basename(basename) {
|
|
3936
|
-
assertNonEmpty(basename, "basename");
|
|
3937
|
-
assertPart(basename, "basename");
|
|
3938
|
-
this.path = default2.join(this.dirname || "", basename);
|
|
3939
|
-
}
|
|
3940
|
-
/**
|
|
3941
|
-
* Get the parent path (example: `'~'`).
|
|
3942
|
-
*
|
|
3943
|
-
* @returns {string | undefined}
|
|
3944
|
-
* Dirname.
|
|
3945
|
-
*/
|
|
3946
|
-
get dirname() {
|
|
3947
|
-
return typeof this.path === "string" ? default2.dirname(this.path) : void 0;
|
|
3948
|
-
}
|
|
3949
|
-
/**
|
|
3950
|
-
* Set the parent path (example: `'~'`).
|
|
3951
|
-
*
|
|
3952
|
-
* Cannot be set if there’s no `path` yet.
|
|
3953
|
-
*
|
|
3954
|
-
* @param {string | undefined} dirname
|
|
3955
|
-
* Dirname.
|
|
3956
|
-
* @returns {undefined}
|
|
3957
|
-
* Nothing.
|
|
3958
|
-
*/
|
|
3959
|
-
set dirname(dirname) {
|
|
3960
|
-
assertPath(this.basename, "dirname");
|
|
3961
|
-
this.path = default2.join(dirname || "", this.basename);
|
|
3962
|
-
}
|
|
3963
|
-
/**
|
|
3964
|
-
* Get the extname (including dot) (example: `'.js'`).
|
|
3965
|
-
*
|
|
3966
|
-
* @returns {string | undefined}
|
|
3967
|
-
* Extname.
|
|
3968
|
-
*/
|
|
3969
|
-
get extname() {
|
|
3970
|
-
return typeof this.path === "string" ? default2.extname(this.path) : void 0;
|
|
3971
|
-
}
|
|
3972
|
-
/**
|
|
3973
|
-
* Set the extname (including dot) (example: `'.js'`).
|
|
3974
|
-
*
|
|
3975
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
3976
|
-
* on windows).
|
|
3977
|
-
* Cannot be set if there’s no `path` yet.
|
|
3978
|
-
*
|
|
3979
|
-
* @param {string | undefined} extname
|
|
3980
|
-
* Extname.
|
|
3981
|
-
* @returns {undefined}
|
|
3982
|
-
* Nothing.
|
|
3698
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
3983
3699
|
*/
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
if (
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3700
|
+
function(child, index2, parent) {
|
|
3701
|
+
const previous2 = parent.children[index2 - 1];
|
|
3702
|
+
if (previous2 && previous2.type === "SentenceNode" && child.type === "SentenceNode") {
|
|
3703
|
+
const head = child.children[0];
|
|
3704
|
+
if (head && head.type === "WordNode" && digitStart.test(toString2(head))) {
|
|
3705
|
+
previous2.children.push(...child.children);
|
|
3706
|
+
parent.children.splice(index2, 1);
|
|
3707
|
+
if (previous2.position && child.position) {
|
|
3708
|
+
previous2.position.end = child.position.end;
|
|
3709
|
+
}
|
|
3710
|
+
return index2;
|
|
3993
3711
|
}
|
|
3994
3712
|
}
|
|
3995
|
-
this.path = default2.join(this.dirname, this.stem + (extname || ""));
|
|
3996
3713
|
}
|
|
3714
|
+
);
|
|
3715
|
+
|
|
3716
|
+
// node_modules/parse-latin/lib/plugin/merge-initial-lower-case-letter-sentences.js
|
|
3717
|
+
var mergeInitialLowerCaseLetterSentences = modifyChildren(
|
|
3997
3718
|
/**
|
|
3998
|
-
*
|
|
3999
|
-
*
|
|
4000
|
-
* @returns {string}
|
|
4001
|
-
* Path.
|
|
3719
|
+
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
4002
3720
|
*/
|
|
4003
|
-
|
|
4004
|
-
|
|
3721
|
+
function(child, index2, parent) {
|
|
3722
|
+
if (child.type === "SentenceNode" && index2 > 0) {
|
|
3723
|
+
const previous2 = parent.children[index2 - 1];
|
|
3724
|
+
const children = child.children;
|
|
3725
|
+
if (children.length > 0 && previous2.type === "SentenceNode") {
|
|
3726
|
+
let position = -1;
|
|
3727
|
+
while (children[++position]) {
|
|
3728
|
+
const node2 = children[position];
|
|
3729
|
+
if (node2.type === "WordNode") {
|
|
3730
|
+
if (!lowerInitial.test(toString2(node2))) {
|
|
3731
|
+
return;
|
|
3732
|
+
}
|
|
3733
|
+
previous2.children.push(...children);
|
|
3734
|
+
parent.children.splice(index2, 1);
|
|
3735
|
+
if (previous2.position && child.position) {
|
|
3736
|
+
previous2.position.end = child.position.end;
|
|
3737
|
+
}
|
|
3738
|
+
return index2;
|
|
3739
|
+
}
|
|
3740
|
+
if (node2.type === "SymbolNode" || node2.type === "PunctuationNode") {
|
|
3741
|
+
return;
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
4005
3746
|
}
|
|
3747
|
+
);
|
|
3748
|
+
|
|
3749
|
+
// node_modules/parse-latin/lib/plugin/merge-initial-word-symbol.js
|
|
3750
|
+
var mergeInitialWordSymbol = modifyChildren(
|
|
4006
3751
|
/**
|
|
4007
|
-
*
|
|
4008
|
-
*
|
|
4009
|
-
* Cannot be nullified.
|
|
4010
|
-
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
4011
|
-
* be turned into a path with `url.fileURLToPath`.
|
|
4012
|
-
*
|
|
4013
|
-
* @param {URL | string} path
|
|
4014
|
-
* Path.
|
|
4015
|
-
* @returns {undefined}
|
|
4016
|
-
* Nothing.
|
|
3752
|
+
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
4017
3753
|
*/
|
|
4018
|
-
|
|
4019
|
-
if (
|
|
4020
|
-
|
|
3754
|
+
function(child, index2, parent) {
|
|
3755
|
+
if (child.type !== "SymbolNode" && child.type !== "PunctuationNode" || toString2(child) !== "&") {
|
|
3756
|
+
return;
|
|
3757
|
+
}
|
|
3758
|
+
const children = parent.children;
|
|
3759
|
+
const next = children[index2 + 1];
|
|
3760
|
+
if (index2 > 0 && children[index2 - 1].type === "WordNode" || !(next && next.type === "WordNode")) {
|
|
3761
|
+
return;
|
|
4021
3762
|
}
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
3763
|
+
children.splice(index2, 1);
|
|
3764
|
+
next.children.unshift(child);
|
|
3765
|
+
if (next.position && child.position) {
|
|
3766
|
+
next.position.start = child.position.start;
|
|
4025
3767
|
}
|
|
3768
|
+
return index2 - 1;
|
|
4026
3769
|
}
|
|
3770
|
+
);
|
|
3771
|
+
|
|
3772
|
+
// node_modules/parse-latin/lib/plugin/merge-initialisms.js
|
|
3773
|
+
var mergeInitialisms = modifyChildren(
|
|
4027
3774
|
/**
|
|
4028
|
-
*
|
|
4029
|
-
*
|
|
4030
|
-
* @returns {string | undefined}
|
|
4031
|
-
* Stem.
|
|
4032
|
-
*/
|
|
4033
|
-
get stem() {
|
|
4034
|
-
return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0;
|
|
4035
|
-
}
|
|
4036
|
-
/**
|
|
4037
|
-
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
4038
|
-
*
|
|
4039
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
4040
|
-
* on windows).
|
|
4041
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
4042
|
-
*
|
|
4043
|
-
* @param {string} stem
|
|
4044
|
-
* Stem.
|
|
4045
|
-
* @returns {undefined}
|
|
4046
|
-
* Nothing.
|
|
4047
|
-
*/
|
|
4048
|
-
set stem(stem) {
|
|
4049
|
-
assertNonEmpty(stem, "stem");
|
|
4050
|
-
assertPart(stem, "stem");
|
|
4051
|
-
this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
|
|
4052
|
-
}
|
|
4053
|
-
// Normal prototypal methods.
|
|
4054
|
-
/**
|
|
4055
|
-
* Create a fatal message for `reason` associated with the file.
|
|
4056
|
-
*
|
|
4057
|
-
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
4058
|
-
* and the `file` field is set to the current file path.
|
|
4059
|
-
* The message is added to the `messages` field on `file`.
|
|
4060
|
-
*
|
|
4061
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
4062
|
-
*
|
|
4063
|
-
* @overload
|
|
4064
|
-
* @param {string} reason
|
|
4065
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
4066
|
-
* @returns {never}
|
|
4067
|
-
*
|
|
4068
|
-
* @overload
|
|
4069
|
-
* @param {string} reason
|
|
4070
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4071
|
-
* @param {string | null | undefined} [origin]
|
|
4072
|
-
* @returns {never}
|
|
4073
|
-
*
|
|
4074
|
-
* @overload
|
|
4075
|
-
* @param {string} reason
|
|
4076
|
-
* @param {Point | Position | null | undefined} place
|
|
4077
|
-
* @param {string | null | undefined} [origin]
|
|
4078
|
-
* @returns {never}
|
|
4079
|
-
*
|
|
4080
|
-
* @overload
|
|
4081
|
-
* @param {string} reason
|
|
4082
|
-
* @param {string | null | undefined} [origin]
|
|
4083
|
-
* @returns {never}
|
|
4084
|
-
*
|
|
4085
|
-
* @overload
|
|
4086
|
-
* @param {Error | VFileMessage} cause
|
|
4087
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4088
|
-
* @param {string | null | undefined} [origin]
|
|
4089
|
-
* @returns {never}
|
|
4090
|
-
*
|
|
4091
|
-
* @overload
|
|
4092
|
-
* @param {Error | VFileMessage} cause
|
|
4093
|
-
* @param {Point | Position | null | undefined} place
|
|
4094
|
-
* @param {string | null | undefined} [origin]
|
|
4095
|
-
* @returns {never}
|
|
4096
|
-
*
|
|
4097
|
-
* @overload
|
|
4098
|
-
* @param {Error | VFileMessage} cause
|
|
4099
|
-
* @param {string | null | undefined} [origin]
|
|
4100
|
-
* @returns {never}
|
|
4101
|
-
*
|
|
4102
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
4103
|
-
* Reason for message, should use markdown.
|
|
4104
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
4105
|
-
* Configuration (optional).
|
|
4106
|
-
* @param {string | null | undefined} [origin]
|
|
4107
|
-
* Place in code where the message originates (example:
|
|
4108
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
4109
|
-
* @returns {never}
|
|
4110
|
-
* Never.
|
|
4111
|
-
* @throws {VFileMessage}
|
|
4112
|
-
* Message.
|
|
4113
|
-
*/
|
|
4114
|
-
fail(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
4115
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
4116
|
-
message.fatal = true;
|
|
4117
|
-
throw message;
|
|
4118
|
-
}
|
|
4119
|
-
/**
|
|
4120
|
-
* Create an info message for `reason` associated with the file.
|
|
4121
|
-
*
|
|
4122
|
-
* The `fatal` field of the message is set to `undefined` (info; change
|
|
4123
|
-
* likely not needed) and the `file` field is set to the current file path.
|
|
4124
|
-
* The message is added to the `messages` field on `file`.
|
|
4125
|
-
*
|
|
4126
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
4127
|
-
*
|
|
4128
|
-
* @overload
|
|
4129
|
-
* @param {string} reason
|
|
4130
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
4131
|
-
* @returns {VFileMessage}
|
|
4132
|
-
*
|
|
4133
|
-
* @overload
|
|
4134
|
-
* @param {string} reason
|
|
4135
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4136
|
-
* @param {string | null | undefined} [origin]
|
|
4137
|
-
* @returns {VFileMessage}
|
|
4138
|
-
*
|
|
4139
|
-
* @overload
|
|
4140
|
-
* @param {string} reason
|
|
4141
|
-
* @param {Point | Position | null | undefined} place
|
|
4142
|
-
* @param {string | null | undefined} [origin]
|
|
4143
|
-
* @returns {VFileMessage}
|
|
4144
|
-
*
|
|
4145
|
-
* @overload
|
|
4146
|
-
* @param {string} reason
|
|
4147
|
-
* @param {string | null | undefined} [origin]
|
|
4148
|
-
* @returns {VFileMessage}
|
|
4149
|
-
*
|
|
4150
|
-
* @overload
|
|
4151
|
-
* @param {Error | VFileMessage} cause
|
|
4152
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4153
|
-
* @param {string | null | undefined} [origin]
|
|
4154
|
-
* @returns {VFileMessage}
|
|
4155
|
-
*
|
|
4156
|
-
* @overload
|
|
4157
|
-
* @param {Error | VFileMessage} cause
|
|
4158
|
-
* @param {Point | Position | null | undefined} place
|
|
4159
|
-
* @param {string | null | undefined} [origin]
|
|
4160
|
-
* @returns {VFileMessage}
|
|
4161
|
-
*
|
|
4162
|
-
* @overload
|
|
4163
|
-
* @param {Error | VFileMessage} cause
|
|
4164
|
-
* @param {string | null | undefined} [origin]
|
|
4165
|
-
* @returns {VFileMessage}
|
|
4166
|
-
*
|
|
4167
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
4168
|
-
* Reason for message, should use markdown.
|
|
4169
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
4170
|
-
* Configuration (optional).
|
|
4171
|
-
* @param {string | null | undefined} [origin]
|
|
4172
|
-
* Place in code where the message originates (example:
|
|
4173
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
4174
|
-
* @returns {VFileMessage}
|
|
4175
|
-
* Message.
|
|
4176
|
-
*/
|
|
4177
|
-
info(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
4178
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
4179
|
-
message.fatal = void 0;
|
|
4180
|
-
return message;
|
|
4181
|
-
}
|
|
4182
|
-
/**
|
|
4183
|
-
* Create a message for `reason` associated with the file.
|
|
4184
|
-
*
|
|
4185
|
-
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
4186
|
-
* needed) and the `file` field is set to the current file path.
|
|
4187
|
-
* The message is added to the `messages` field on `file`.
|
|
4188
|
-
*
|
|
4189
|
-
* > 🪦 **Note**: also has obsolete signatures.
|
|
4190
|
-
*
|
|
4191
|
-
* @overload
|
|
4192
|
-
* @param {string} reason
|
|
4193
|
-
* @param {MessageOptions | null | undefined} [options]
|
|
4194
|
-
* @returns {VFileMessage}
|
|
4195
|
-
*
|
|
4196
|
-
* @overload
|
|
4197
|
-
* @param {string} reason
|
|
4198
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4199
|
-
* @param {string | null | undefined} [origin]
|
|
4200
|
-
* @returns {VFileMessage}
|
|
4201
|
-
*
|
|
4202
|
-
* @overload
|
|
4203
|
-
* @param {string} reason
|
|
4204
|
-
* @param {Point | Position | null | undefined} place
|
|
4205
|
-
* @param {string | null | undefined} [origin]
|
|
4206
|
-
* @returns {VFileMessage}
|
|
4207
|
-
*
|
|
4208
|
-
* @overload
|
|
4209
|
-
* @param {string} reason
|
|
4210
|
-
* @param {string | null | undefined} [origin]
|
|
4211
|
-
* @returns {VFileMessage}
|
|
4212
|
-
*
|
|
4213
|
-
* @overload
|
|
4214
|
-
* @param {Error | VFileMessage} cause
|
|
4215
|
-
* @param {Node | NodeLike | null | undefined} parent
|
|
4216
|
-
* @param {string | null | undefined} [origin]
|
|
4217
|
-
* @returns {VFileMessage}
|
|
4218
|
-
*
|
|
4219
|
-
* @overload
|
|
4220
|
-
* @param {Error | VFileMessage} cause
|
|
4221
|
-
* @param {Point | Position | null | undefined} place
|
|
4222
|
-
* @param {string | null | undefined} [origin]
|
|
4223
|
-
* @returns {VFileMessage}
|
|
4224
|
-
*
|
|
4225
|
-
* @overload
|
|
4226
|
-
* @param {Error | VFileMessage} cause
|
|
4227
|
-
* @param {string | null | undefined} [origin]
|
|
4228
|
-
* @returns {VFileMessage}
|
|
4229
|
-
*
|
|
4230
|
-
* @param {Error | VFileMessage | string} causeOrReason
|
|
4231
|
-
* Reason for message, should use markdown.
|
|
4232
|
-
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
4233
|
-
* Configuration (optional).
|
|
4234
|
-
* @param {string | null | undefined} [origin]
|
|
4235
|
-
* Place in code where the message originates (example:
|
|
4236
|
-
* `'my-package:my-rule'` or `'my-rule'`).
|
|
4237
|
-
* @returns {VFileMessage}
|
|
4238
|
-
* Message.
|
|
4239
|
-
*/
|
|
4240
|
-
message(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
4241
|
-
const message = new VFileMessage(
|
|
4242
|
-
// @ts-expect-error: the overloads are fine.
|
|
4243
|
-
causeOrReason,
|
|
4244
|
-
optionsOrParentOrPlace,
|
|
4245
|
-
origin
|
|
4246
|
-
);
|
|
4247
|
-
if (this.path) {
|
|
4248
|
-
message.name = this.path + ":" + message.name;
|
|
4249
|
-
message.file = this.path;
|
|
4250
|
-
}
|
|
4251
|
-
message.fatal = false;
|
|
4252
|
-
this.messages.push(message);
|
|
4253
|
-
return message;
|
|
4254
|
-
}
|
|
4255
|
-
/**
|
|
4256
|
-
* Serialize the file.
|
|
4257
|
-
*
|
|
4258
|
-
* > **Note**: which encodings are supported depends on the engine.
|
|
4259
|
-
* > For info on Node.js, see:
|
|
4260
|
-
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
4261
|
-
*
|
|
4262
|
-
* @param {string | null | undefined} [encoding='utf8']
|
|
4263
|
-
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
4264
|
-
* (default: `'utf-8'`).
|
|
4265
|
-
* @returns {string}
|
|
4266
|
-
* Serialized file.
|
|
4267
|
-
*/
|
|
4268
|
-
toString(encoding) {
|
|
4269
|
-
if (this.value === void 0) {
|
|
4270
|
-
return "";
|
|
4271
|
-
}
|
|
4272
|
-
if (typeof this.value === "string") {
|
|
4273
|
-
return this.value;
|
|
4274
|
-
}
|
|
4275
|
-
const decoder = new TextDecoder(encoding || void 0);
|
|
4276
|
-
return decoder.decode(this.value);
|
|
4277
|
-
}
|
|
4278
|
-
};
|
|
4279
|
-
function assertPart(part, name) {
|
|
4280
|
-
if (part && part.includes(default2.sep)) {
|
|
4281
|
-
throw new Error(
|
|
4282
|
-
"`" + name + "` cannot be a path: did not expect `" + default2.sep + "`"
|
|
4283
|
-
);
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
|
-
function assertNonEmpty(part, name) {
|
|
4287
|
-
if (!part) {
|
|
4288
|
-
throw new Error("`" + name + "` cannot be empty");
|
|
4289
|
-
}
|
|
4290
|
-
}
|
|
4291
|
-
function assertPath(path2, name) {
|
|
4292
|
-
if (!path2) {
|
|
4293
|
-
throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
4294
|
-
}
|
|
4295
|
-
}
|
|
4296
|
-
function isUint8Array(value) {
|
|
4297
|
-
return Boolean(
|
|
4298
|
-
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
4299
|
-
);
|
|
4300
|
-
}
|
|
4301
|
-
|
|
4302
|
-
// node_modules/unified/lib/callable-instance.js
|
|
4303
|
-
var CallableInstance = (
|
|
4304
|
-
/**
|
|
4305
|
-
* @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
|
|
4306
|
-
*/
|
|
4307
|
-
/** @type {unknown} */
|
|
4308
|
-
/**
|
|
4309
|
-
* @this {Function}
|
|
4310
|
-
* @param {string | symbol} property
|
|
4311
|
-
* @returns {(...parameters: Array<unknown>) => unknown}
|
|
4312
|
-
*/
|
|
4313
|
-
(function(property) {
|
|
4314
|
-
const self2 = this;
|
|
4315
|
-
const constr = self2.constructor;
|
|
4316
|
-
const proto = (
|
|
4317
|
-
/** @type {Record<string | symbol, Function>} */
|
|
4318
|
-
// Prototypes do exist.
|
|
4319
|
-
// type-coverage:ignore-next-line
|
|
4320
|
-
constr.prototype
|
|
4321
|
-
);
|
|
4322
|
-
const value = proto[property];
|
|
4323
|
-
const apply = function() {
|
|
4324
|
-
return value.apply(apply, arguments);
|
|
4325
|
-
};
|
|
4326
|
-
Object.setPrototypeOf(apply, proto);
|
|
4327
|
-
return apply;
|
|
4328
|
-
})
|
|
4329
|
-
);
|
|
4330
|
-
|
|
4331
|
-
// node_modules/unified/lib/index.js
|
|
4332
|
-
var own = {}.hasOwnProperty;
|
|
4333
|
-
var Processor = class _Processor extends CallableInstance {
|
|
4334
|
-
/**
|
|
4335
|
-
* Create a processor.
|
|
4336
|
-
*/
|
|
4337
|
-
constructor() {
|
|
4338
|
-
super("copy");
|
|
4339
|
-
this.Compiler = void 0;
|
|
4340
|
-
this.Parser = void 0;
|
|
4341
|
-
this.attachers = [];
|
|
4342
|
-
this.compiler = void 0;
|
|
4343
|
-
this.freezeIndex = -1;
|
|
4344
|
-
this.frozen = void 0;
|
|
4345
|
-
this.namespace = {};
|
|
4346
|
-
this.parser = void 0;
|
|
4347
|
-
this.transformers = trough();
|
|
4348
|
-
}
|
|
4349
|
-
/**
|
|
4350
|
-
* Copy a processor.
|
|
4351
|
-
*
|
|
4352
|
-
* @deprecated
|
|
4353
|
-
* This is a private internal method and should not be used.
|
|
4354
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4355
|
-
* New *unfrozen* processor ({@linkcode Processor}) that is
|
|
4356
|
-
* configured to work the same as its ancestor.
|
|
4357
|
-
* When the descendant processor is configured in the future it does not
|
|
4358
|
-
* affect the ancestral processor.
|
|
4359
|
-
*/
|
|
4360
|
-
copy() {
|
|
4361
|
-
const destination = (
|
|
4362
|
-
/** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */
|
|
4363
|
-
new _Processor()
|
|
4364
|
-
);
|
|
4365
|
-
let index2 = -1;
|
|
4366
|
-
while (++index2 < this.attachers.length) {
|
|
4367
|
-
const attacher = this.attachers[index2];
|
|
4368
|
-
destination.use(...attacher);
|
|
4369
|
-
}
|
|
4370
|
-
destination.data((0, import_extend.default)(true, {}, this.namespace));
|
|
4371
|
-
return destination;
|
|
4372
|
-
}
|
|
4373
|
-
/**
|
|
4374
|
-
* Configure the processor with info available to all plugins.
|
|
4375
|
-
* Information is stored in an object.
|
|
4376
|
-
*
|
|
4377
|
-
* Typically, options can be given to a specific plugin, but sometimes it
|
|
4378
|
-
* makes sense to have information shared with several plugins.
|
|
4379
|
-
* For example, a list of HTML elements that are self-closing, which is
|
|
4380
|
-
* needed during all phases.
|
|
4381
|
-
*
|
|
4382
|
-
* > **Note**: setting information cannot occur on *frozen* processors.
|
|
4383
|
-
* > Call the processor first to create a new unfrozen processor.
|
|
4384
|
-
*
|
|
4385
|
-
* > **Note**: to register custom data in TypeScript, augment the
|
|
4386
|
-
* > {@linkcode Data} interface.
|
|
4387
|
-
*
|
|
4388
|
-
* @example
|
|
4389
|
-
* This example show how to get and set info:
|
|
4390
|
-
*
|
|
4391
|
-
* ```js
|
|
4392
|
-
* import {unified} from 'unified'
|
|
4393
|
-
*
|
|
4394
|
-
* const processor = unified().data('alpha', 'bravo')
|
|
4395
|
-
*
|
|
4396
|
-
* processor.data('alpha') // => 'bravo'
|
|
4397
|
-
*
|
|
4398
|
-
* processor.data() // => {alpha: 'bravo'}
|
|
4399
|
-
*
|
|
4400
|
-
* processor.data({charlie: 'delta'})
|
|
4401
|
-
*
|
|
4402
|
-
* processor.data() // => {charlie: 'delta'}
|
|
4403
|
-
* ```
|
|
4404
|
-
*
|
|
4405
|
-
* @template {keyof Data} Key
|
|
4406
|
-
*
|
|
4407
|
-
* @overload
|
|
4408
|
-
* @returns {Data}
|
|
4409
|
-
*
|
|
4410
|
-
* @overload
|
|
4411
|
-
* @param {Data} dataset
|
|
4412
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4413
|
-
*
|
|
4414
|
-
* @overload
|
|
4415
|
-
* @param {Key} key
|
|
4416
|
-
* @returns {Data[Key]}
|
|
4417
|
-
*
|
|
4418
|
-
* @overload
|
|
4419
|
-
* @param {Key} key
|
|
4420
|
-
* @param {Data[Key]} value
|
|
4421
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4422
|
-
*
|
|
4423
|
-
* @param {Data | Key} [key]
|
|
4424
|
-
* Key to get or set, or entire dataset to set, or nothing to get the
|
|
4425
|
-
* entire dataset (optional).
|
|
4426
|
-
* @param {Data[Key]} [value]
|
|
4427
|
-
* Value to set (optional).
|
|
4428
|
-
* @returns {unknown}
|
|
4429
|
-
* The current processor when setting, the value at `key` when getting, or
|
|
4430
|
-
* the entire dataset when getting without key.
|
|
4431
|
-
*/
|
|
4432
|
-
data(key, value) {
|
|
4433
|
-
if (typeof key === "string") {
|
|
4434
|
-
if (arguments.length === 2) {
|
|
4435
|
-
assertUnfrozen("data", this.frozen);
|
|
4436
|
-
this.namespace[key] = value;
|
|
4437
|
-
return this;
|
|
4438
|
-
}
|
|
4439
|
-
return own.call(this.namespace, key) && this.namespace[key] || void 0;
|
|
4440
|
-
}
|
|
4441
|
-
if (key) {
|
|
4442
|
-
assertUnfrozen("data", this.frozen);
|
|
4443
|
-
this.namespace = key;
|
|
4444
|
-
return this;
|
|
4445
|
-
}
|
|
4446
|
-
return this.namespace;
|
|
4447
|
-
}
|
|
4448
|
-
/**
|
|
4449
|
-
* Freeze a processor.
|
|
4450
|
-
*
|
|
4451
|
-
* Frozen processors are meant to be extended and not to be configured
|
|
4452
|
-
* directly.
|
|
4453
|
-
*
|
|
4454
|
-
* When a processor is frozen it cannot be unfrozen.
|
|
4455
|
-
* New processors working the same way can be created by calling the
|
|
4456
|
-
* processor.
|
|
4457
|
-
*
|
|
4458
|
-
* It’s possible to freeze processors explicitly by calling `.freeze()`.
|
|
4459
|
-
* Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
|
|
4460
|
-
* `.stringify()`, `.process()`, or `.processSync()` are called.
|
|
4461
|
-
*
|
|
4462
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4463
|
-
* The current processor.
|
|
4464
|
-
*/
|
|
4465
|
-
freeze() {
|
|
4466
|
-
if (this.frozen) {
|
|
4467
|
-
return this;
|
|
4468
|
-
}
|
|
4469
|
-
const self2 = (
|
|
4470
|
-
/** @type {Processor} */
|
|
4471
|
-
/** @type {unknown} */
|
|
4472
|
-
this
|
|
4473
|
-
);
|
|
4474
|
-
while (++this.freezeIndex < this.attachers.length) {
|
|
4475
|
-
const [attacher, ...options] = this.attachers[this.freezeIndex];
|
|
4476
|
-
if (options[0] === false) {
|
|
4477
|
-
continue;
|
|
4478
|
-
}
|
|
4479
|
-
if (options[0] === true) {
|
|
4480
|
-
options[0] = void 0;
|
|
4481
|
-
}
|
|
4482
|
-
const transformer = attacher.call(self2, ...options);
|
|
4483
|
-
if (typeof transformer === "function") {
|
|
4484
|
-
this.transformers.use(transformer);
|
|
4485
|
-
}
|
|
4486
|
-
}
|
|
4487
|
-
this.frozen = true;
|
|
4488
|
-
this.freezeIndex = Number.POSITIVE_INFINITY;
|
|
4489
|
-
return this;
|
|
4490
|
-
}
|
|
4491
|
-
/**
|
|
4492
|
-
* Parse text to a syntax tree.
|
|
4493
|
-
*
|
|
4494
|
-
* > **Note**: `parse` freezes the processor if not already *frozen*.
|
|
4495
|
-
*
|
|
4496
|
-
* > **Note**: `parse` performs the parse phase, not the run phase or other
|
|
4497
|
-
* > phases.
|
|
4498
|
-
*
|
|
4499
|
-
* @param {Compatible | undefined} [file]
|
|
4500
|
-
* file to parse (optional); typically `string` or `VFile`; any value
|
|
4501
|
-
* accepted as `x` in `new VFile(x)`.
|
|
4502
|
-
* @returns {ParseTree extends undefined ? Node : ParseTree}
|
|
4503
|
-
* Syntax tree representing `file`.
|
|
4504
|
-
*/
|
|
4505
|
-
parse(file) {
|
|
4506
|
-
this.freeze();
|
|
4507
|
-
const realFile = vfile(file);
|
|
4508
|
-
const parser = this.parser || this.Parser;
|
|
4509
|
-
assertParser("parse", parser);
|
|
4510
|
-
return parser(String(realFile), realFile);
|
|
4511
|
-
}
|
|
4512
|
-
/**
|
|
4513
|
-
* Process the given file as configured on the processor.
|
|
4514
|
-
*
|
|
4515
|
-
* > **Note**: `process` freezes the processor if not already *frozen*.
|
|
4516
|
-
*
|
|
4517
|
-
* > **Note**: `process` performs the parse, run, and stringify phases.
|
|
4518
|
-
*
|
|
4519
|
-
* @overload
|
|
4520
|
-
* @param {Compatible | undefined} file
|
|
4521
|
-
* @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
|
|
4522
|
-
* @returns {undefined}
|
|
4523
|
-
*
|
|
4524
|
-
* @overload
|
|
4525
|
-
* @param {Compatible | undefined} [file]
|
|
4526
|
-
* @returns {Promise<VFileWithOutput<CompileResult>>}
|
|
4527
|
-
*
|
|
4528
|
-
* @param {Compatible | undefined} [file]
|
|
4529
|
-
* File (optional); typically `string` or `VFile`]; any value accepted as
|
|
4530
|
-
* `x` in `new VFile(x)`.
|
|
4531
|
-
* @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
|
|
4532
|
-
* Callback (optional).
|
|
4533
|
-
* @returns {Promise<VFile> | undefined}
|
|
4534
|
-
* Nothing if `done` is given.
|
|
4535
|
-
* Otherwise a promise, rejected with a fatal error or resolved with the
|
|
4536
|
-
* processed file.
|
|
4537
|
-
*
|
|
4538
|
-
* The parsed, transformed, and compiled value is available at
|
|
4539
|
-
* `file.value` (see note).
|
|
4540
|
-
*
|
|
4541
|
-
* > **Note**: unified typically compiles by serializing: most
|
|
4542
|
-
* > compilers return `string` (or `Uint8Array`).
|
|
4543
|
-
* > Some compilers, such as the one configured with
|
|
4544
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
4545
|
-
* > React tree).
|
|
4546
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
4547
|
-
* > result values.
|
|
4548
|
-
* >
|
|
4549
|
-
* > To register custom results in TypeScript, add them to
|
|
4550
|
-
* > {@linkcode CompileResultMap}.
|
|
4551
|
-
*
|
|
4552
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
4553
|
-
*/
|
|
4554
|
-
process(file, done) {
|
|
4555
|
-
const self2 = this;
|
|
4556
|
-
this.freeze();
|
|
4557
|
-
assertParser("process", this.parser || this.Parser);
|
|
4558
|
-
assertCompiler("process", this.compiler || this.Compiler);
|
|
4559
|
-
return done ? executor(void 0, done) : new Promise(executor);
|
|
4560
|
-
function executor(resolve, reject) {
|
|
4561
|
-
const realFile = vfile(file);
|
|
4562
|
-
const parseTree = (
|
|
4563
|
-
/** @type {HeadTree extends undefined ? Node : HeadTree} */
|
|
4564
|
-
/** @type {unknown} */
|
|
4565
|
-
self2.parse(realFile)
|
|
4566
|
-
);
|
|
4567
|
-
self2.run(parseTree, realFile, function(error, tree, file2) {
|
|
4568
|
-
if (error || !tree || !file2) {
|
|
4569
|
-
return realDone(error);
|
|
4570
|
-
}
|
|
4571
|
-
const compileTree = (
|
|
4572
|
-
/** @type {CompileTree extends undefined ? Node : CompileTree} */
|
|
4573
|
-
/** @type {unknown} */
|
|
4574
|
-
tree
|
|
4575
|
-
);
|
|
4576
|
-
const compileResult = self2.stringify(compileTree, file2);
|
|
4577
|
-
if (looksLikeAValue(compileResult)) {
|
|
4578
|
-
file2.value = compileResult;
|
|
4579
|
-
} else {
|
|
4580
|
-
file2.result = compileResult;
|
|
4581
|
-
}
|
|
4582
|
-
realDone(
|
|
4583
|
-
error,
|
|
4584
|
-
/** @type {VFileWithOutput<CompileResult>} */
|
|
4585
|
-
file2
|
|
4586
|
-
);
|
|
4587
|
-
});
|
|
4588
|
-
function realDone(error, file2) {
|
|
4589
|
-
if (error || !file2) {
|
|
4590
|
-
reject(error);
|
|
4591
|
-
} else if (resolve) {
|
|
4592
|
-
resolve(file2);
|
|
4593
|
-
} else {
|
|
4594
|
-
done(void 0, file2);
|
|
4595
|
-
}
|
|
4596
|
-
}
|
|
4597
|
-
}
|
|
4598
|
-
}
|
|
4599
|
-
/**
|
|
4600
|
-
* Process the given file as configured on the processor.
|
|
4601
|
-
*
|
|
4602
|
-
* An error is thrown if asynchronous transforms are configured.
|
|
4603
|
-
*
|
|
4604
|
-
* > **Note**: `processSync` freezes the processor if not already *frozen*.
|
|
4605
|
-
*
|
|
4606
|
-
* > **Note**: `processSync` performs the parse, run, and stringify phases.
|
|
4607
|
-
*
|
|
4608
|
-
* @param {Compatible | undefined} [file]
|
|
4609
|
-
* File (optional); typically `string` or `VFile`; any value accepted as
|
|
4610
|
-
* `x` in `new VFile(x)`.
|
|
4611
|
-
* @returns {VFileWithOutput<CompileResult>}
|
|
4612
|
-
* The processed file.
|
|
4613
|
-
*
|
|
4614
|
-
* The parsed, transformed, and compiled value is available at
|
|
4615
|
-
* `file.value` (see note).
|
|
4616
|
-
*
|
|
4617
|
-
* > **Note**: unified typically compiles by serializing: most
|
|
4618
|
-
* > compilers return `string` (or `Uint8Array`).
|
|
4619
|
-
* > Some compilers, such as the one configured with
|
|
4620
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
4621
|
-
* > React tree).
|
|
4622
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
4623
|
-
* > result values.
|
|
4624
|
-
* >
|
|
4625
|
-
* > To register custom results in TypeScript, add them to
|
|
4626
|
-
* > {@linkcode CompileResultMap}.
|
|
4627
|
-
*
|
|
4628
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
4629
|
-
*/
|
|
4630
|
-
processSync(file) {
|
|
4631
|
-
let complete = false;
|
|
4632
|
-
let result;
|
|
4633
|
-
this.freeze();
|
|
4634
|
-
assertParser("processSync", this.parser || this.Parser);
|
|
4635
|
-
assertCompiler("processSync", this.compiler || this.Compiler);
|
|
4636
|
-
this.process(file, realDone);
|
|
4637
|
-
assertDone("processSync", "process", complete);
|
|
4638
|
-
return result;
|
|
4639
|
-
function realDone(error, file2) {
|
|
4640
|
-
complete = true;
|
|
4641
|
-
bail(error);
|
|
4642
|
-
result = file2;
|
|
4643
|
-
}
|
|
4644
|
-
}
|
|
4645
|
-
/**
|
|
4646
|
-
* Run *transformers* on a syntax tree.
|
|
4647
|
-
*
|
|
4648
|
-
* > **Note**: `run` freezes the processor if not already *frozen*.
|
|
4649
|
-
*
|
|
4650
|
-
* > **Note**: `run` performs the run phase, not other phases.
|
|
4651
|
-
*
|
|
4652
|
-
* @overload
|
|
4653
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
4654
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
|
|
4655
|
-
* @returns {undefined}
|
|
4656
|
-
*
|
|
4657
|
-
* @overload
|
|
4658
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
4659
|
-
* @param {Compatible | undefined} file
|
|
4660
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
|
|
4661
|
-
* @returns {undefined}
|
|
4662
|
-
*
|
|
4663
|
-
* @overload
|
|
4664
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
4665
|
-
* @param {Compatible | undefined} [file]
|
|
4666
|
-
* @returns {Promise<TailTree extends undefined ? Node : TailTree>}
|
|
4667
|
-
*
|
|
4668
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
4669
|
-
* Tree to transform and inspect.
|
|
4670
|
-
* @param {(
|
|
4671
|
-
* RunCallback<TailTree extends undefined ? Node : TailTree> |
|
|
4672
|
-
* Compatible
|
|
4673
|
-
* )} [file]
|
|
4674
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
4675
|
-
* `new VFile(x)`.
|
|
4676
|
-
* @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
|
|
4677
|
-
* Callback (optional).
|
|
4678
|
-
* @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
|
|
4679
|
-
* Nothing if `done` is given.
|
|
4680
|
-
* Otherwise, a promise rejected with a fatal error or resolved with the
|
|
4681
|
-
* transformed tree.
|
|
4682
|
-
*/
|
|
4683
|
-
run(tree, file, done) {
|
|
4684
|
-
assertNode(tree);
|
|
4685
|
-
this.freeze();
|
|
4686
|
-
const transformers = this.transformers;
|
|
4687
|
-
if (!done && typeof file === "function") {
|
|
4688
|
-
done = file;
|
|
4689
|
-
file = void 0;
|
|
4690
|
-
}
|
|
4691
|
-
return done ? executor(void 0, done) : new Promise(executor);
|
|
4692
|
-
function executor(resolve, reject) {
|
|
4693
|
-
const realFile = vfile(file);
|
|
4694
|
-
transformers.run(tree, realFile, realDone);
|
|
4695
|
-
function realDone(error, outputTree, file2) {
|
|
4696
|
-
const resultingTree = (
|
|
4697
|
-
/** @type {TailTree extends undefined ? Node : TailTree} */
|
|
4698
|
-
outputTree || tree
|
|
4699
|
-
);
|
|
4700
|
-
if (error) {
|
|
4701
|
-
reject(error);
|
|
4702
|
-
} else if (resolve) {
|
|
4703
|
-
resolve(resultingTree);
|
|
4704
|
-
} else {
|
|
4705
|
-
done(void 0, resultingTree, file2);
|
|
4706
|
-
}
|
|
4707
|
-
}
|
|
4708
|
-
}
|
|
4709
|
-
}
|
|
4710
|
-
/**
|
|
4711
|
-
* Run *transformers* on a syntax tree.
|
|
4712
|
-
*
|
|
4713
|
-
* An error is thrown if asynchronous transforms are configured.
|
|
4714
|
-
*
|
|
4715
|
-
* > **Note**: `runSync` freezes the processor if not already *frozen*.
|
|
4716
|
-
*
|
|
4717
|
-
* > **Note**: `runSync` performs the run phase, not other phases.
|
|
4718
|
-
*
|
|
4719
|
-
* @param {HeadTree extends undefined ? Node : HeadTree} tree
|
|
4720
|
-
* Tree to transform and inspect.
|
|
4721
|
-
* @param {Compatible | undefined} [file]
|
|
4722
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
4723
|
-
* `new VFile(x)`.
|
|
4724
|
-
* @returns {TailTree extends undefined ? Node : TailTree}
|
|
4725
|
-
* Transformed tree.
|
|
4726
|
-
*/
|
|
4727
|
-
runSync(tree, file) {
|
|
4728
|
-
let complete = false;
|
|
4729
|
-
let result;
|
|
4730
|
-
this.run(tree, file, realDone);
|
|
4731
|
-
assertDone("runSync", "run", complete);
|
|
4732
|
-
return result;
|
|
4733
|
-
function realDone(error, tree2) {
|
|
4734
|
-
bail(error);
|
|
4735
|
-
result = tree2;
|
|
4736
|
-
complete = true;
|
|
4737
|
-
}
|
|
4738
|
-
}
|
|
4739
|
-
/**
|
|
4740
|
-
* Compile a syntax tree.
|
|
4741
|
-
*
|
|
4742
|
-
* > **Note**: `stringify` freezes the processor if not already *frozen*.
|
|
4743
|
-
*
|
|
4744
|
-
* > **Note**: `stringify` performs the stringify phase, not the run phase
|
|
4745
|
-
* > or other phases.
|
|
4746
|
-
*
|
|
4747
|
-
* @param {CompileTree extends undefined ? Node : CompileTree} tree
|
|
4748
|
-
* Tree to compile.
|
|
4749
|
-
* @param {Compatible | undefined} [file]
|
|
4750
|
-
* File associated with `node` (optional); any value accepted as `x` in
|
|
4751
|
-
* `new VFile(x)`.
|
|
4752
|
-
* @returns {CompileResult extends undefined ? Value : CompileResult}
|
|
4753
|
-
* Textual representation of the tree (see note).
|
|
4754
|
-
*
|
|
4755
|
-
* > **Note**: unified typically compiles by serializing: most compilers
|
|
4756
|
-
* > return `string` (or `Uint8Array`).
|
|
4757
|
-
* > Some compilers, such as the one configured with
|
|
4758
|
-
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
4759
|
-
* > React tree).
|
|
4760
|
-
* > If you’re using a compiler that doesn’t serialize, expect different
|
|
4761
|
-
* > result values.
|
|
4762
|
-
* >
|
|
4763
|
-
* > To register custom results in TypeScript, add them to
|
|
4764
|
-
* > {@linkcode CompileResultMap}.
|
|
4765
|
-
*
|
|
4766
|
-
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
4767
|
-
*/
|
|
4768
|
-
stringify(tree, file) {
|
|
4769
|
-
this.freeze();
|
|
4770
|
-
const realFile = vfile(file);
|
|
4771
|
-
const compiler2 = this.compiler || this.Compiler;
|
|
4772
|
-
assertCompiler("stringify", compiler2);
|
|
4773
|
-
assertNode(tree);
|
|
4774
|
-
return compiler2(tree, realFile);
|
|
4775
|
-
}
|
|
4776
|
-
/**
|
|
4777
|
-
* Configure the processor to use a plugin, a list of usable values, or a
|
|
4778
|
-
* preset.
|
|
4779
|
-
*
|
|
4780
|
-
* If the processor is already using a plugin, the previous plugin
|
|
4781
|
-
* configuration is changed based on the options that are passed in.
|
|
4782
|
-
* In other words, the plugin is not added a second time.
|
|
4783
|
-
*
|
|
4784
|
-
* > **Note**: `use` cannot be called on *frozen* processors.
|
|
4785
|
-
* > Call the processor first to create a new unfrozen processor.
|
|
4786
|
-
*
|
|
4787
|
-
* @example
|
|
4788
|
-
* There are many ways to pass plugins to `.use()`.
|
|
4789
|
-
* This example gives an overview:
|
|
4790
|
-
*
|
|
4791
|
-
* ```js
|
|
4792
|
-
* import {unified} from 'unified'
|
|
4793
|
-
*
|
|
4794
|
-
* unified()
|
|
4795
|
-
* // Plugin with options:
|
|
4796
|
-
* .use(pluginA, {x: true, y: true})
|
|
4797
|
-
* // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
|
|
4798
|
-
* .use(pluginA, {y: false, z: true})
|
|
4799
|
-
* // Plugins:
|
|
4800
|
-
* .use([pluginB, pluginC])
|
|
4801
|
-
* // Two plugins, the second with options:
|
|
4802
|
-
* .use([pluginD, [pluginE, {}]])
|
|
4803
|
-
* // Preset with plugins and settings:
|
|
4804
|
-
* .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
|
|
4805
|
-
* // Settings only:
|
|
4806
|
-
* .use({settings: {position: false}})
|
|
4807
|
-
* ```
|
|
4808
|
-
*
|
|
4809
|
-
* @template {Array<unknown>} [Parameters=[]]
|
|
4810
|
-
* @template {Node | string | undefined} [Input=undefined]
|
|
4811
|
-
* @template [Output=Input]
|
|
4812
|
-
*
|
|
4813
|
-
* @overload
|
|
4814
|
-
* @param {Preset | null | undefined} [preset]
|
|
4815
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4816
|
-
*
|
|
4817
|
-
* @overload
|
|
4818
|
-
* @param {PluggableList} list
|
|
4819
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4820
|
-
*
|
|
4821
|
-
* @overload
|
|
4822
|
-
* @param {Plugin<Parameters, Input, Output>} plugin
|
|
4823
|
-
* @param {...(Parameters | [boolean])} parameters
|
|
4824
|
-
* @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
|
|
4825
|
-
*
|
|
4826
|
-
* @param {PluggableList | Plugin | Preset | null | undefined} value
|
|
4827
|
-
* Usable value.
|
|
4828
|
-
* @param {...unknown} parameters
|
|
4829
|
-
* Parameters, when a plugin is given as a usable value.
|
|
4830
|
-
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
4831
|
-
* Current processor.
|
|
4832
|
-
*/
|
|
4833
|
-
use(value, ...parameters) {
|
|
4834
|
-
const attachers = this.attachers;
|
|
4835
|
-
const namespace = this.namespace;
|
|
4836
|
-
assertUnfrozen("use", this.frozen);
|
|
4837
|
-
if (value === null || value === void 0) ; else if (typeof value === "function") {
|
|
4838
|
-
addPlugin(value, parameters);
|
|
4839
|
-
} else if (typeof value === "object") {
|
|
4840
|
-
if (Array.isArray(value)) {
|
|
4841
|
-
addList(value);
|
|
4842
|
-
} else {
|
|
4843
|
-
addPreset(value);
|
|
4844
|
-
}
|
|
4845
|
-
} else {
|
|
4846
|
-
throw new TypeError("Expected usable value, not `" + value + "`");
|
|
4847
|
-
}
|
|
4848
|
-
return this;
|
|
4849
|
-
function add2(value2) {
|
|
4850
|
-
if (typeof value2 === "function") {
|
|
4851
|
-
addPlugin(value2, []);
|
|
4852
|
-
} else if (typeof value2 === "object") {
|
|
4853
|
-
if (Array.isArray(value2)) {
|
|
4854
|
-
const [plugin, ...parameters2] = (
|
|
4855
|
-
/** @type {PluginTuple<Array<unknown>>} */
|
|
4856
|
-
value2
|
|
4857
|
-
);
|
|
4858
|
-
addPlugin(plugin, parameters2);
|
|
4859
|
-
} else {
|
|
4860
|
-
addPreset(value2);
|
|
4861
|
-
}
|
|
4862
|
-
} else {
|
|
4863
|
-
throw new TypeError("Expected usable value, not `" + value2 + "`");
|
|
4864
|
-
}
|
|
4865
|
-
}
|
|
4866
|
-
function addPreset(result) {
|
|
4867
|
-
if (!("plugins" in result) && !("settings" in result)) {
|
|
4868
|
-
throw new Error(
|
|
4869
|
-
"Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither"
|
|
4870
|
-
);
|
|
4871
|
-
}
|
|
4872
|
-
addList(result.plugins);
|
|
4873
|
-
if (result.settings) {
|
|
4874
|
-
namespace.settings = (0, import_extend.default)(true, namespace.settings, result.settings);
|
|
4875
|
-
}
|
|
4876
|
-
}
|
|
4877
|
-
function addList(plugins) {
|
|
4878
|
-
let index2 = -1;
|
|
4879
|
-
if (plugins === null || plugins === void 0) ; else if (Array.isArray(plugins)) {
|
|
4880
|
-
while (++index2 < plugins.length) {
|
|
4881
|
-
const thing = plugins[index2];
|
|
4882
|
-
add2(thing);
|
|
4883
|
-
}
|
|
4884
|
-
} else {
|
|
4885
|
-
throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
|
|
4886
|
-
}
|
|
4887
|
-
}
|
|
4888
|
-
function addPlugin(plugin, parameters2) {
|
|
4889
|
-
let index2 = -1;
|
|
4890
|
-
let entryIndex = -1;
|
|
4891
|
-
while (++index2 < attachers.length) {
|
|
4892
|
-
if (attachers[index2][0] === plugin) {
|
|
4893
|
-
entryIndex = index2;
|
|
4894
|
-
break;
|
|
4895
|
-
}
|
|
4896
|
-
}
|
|
4897
|
-
if (entryIndex === -1) {
|
|
4898
|
-
attachers.push([plugin, ...parameters2]);
|
|
4899
|
-
} else if (parameters2.length > 0) {
|
|
4900
|
-
let [primary, ...rest] = parameters2;
|
|
4901
|
-
const currentPrimary = attachers[entryIndex][1];
|
|
4902
|
-
if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
|
|
4903
|
-
primary = (0, import_extend.default)(true, currentPrimary, primary);
|
|
4904
|
-
}
|
|
4905
|
-
attachers[entryIndex] = [plugin, primary, ...rest];
|
|
4906
|
-
}
|
|
4907
|
-
}
|
|
4908
|
-
}
|
|
4909
|
-
};
|
|
4910
|
-
var unified = new Processor().freeze();
|
|
4911
|
-
function assertParser(name, value) {
|
|
4912
|
-
if (typeof value !== "function") {
|
|
4913
|
-
throw new TypeError("Cannot `" + name + "` without `parser`");
|
|
4914
|
-
}
|
|
4915
|
-
}
|
|
4916
|
-
function assertCompiler(name, value) {
|
|
4917
|
-
if (typeof value !== "function") {
|
|
4918
|
-
throw new TypeError("Cannot `" + name + "` without `compiler`");
|
|
4919
|
-
}
|
|
4920
|
-
}
|
|
4921
|
-
function assertUnfrozen(name, frozen) {
|
|
4922
|
-
if (frozen) {
|
|
4923
|
-
throw new Error(
|
|
4924
|
-
"Cannot call `" + name + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
|
|
4925
|
-
);
|
|
4926
|
-
}
|
|
4927
|
-
}
|
|
4928
|
-
function assertNode(node2) {
|
|
4929
|
-
if (!isPlainObject(node2) || typeof node2.type !== "string") {
|
|
4930
|
-
throw new TypeError("Expected node, got `" + node2 + "`");
|
|
4931
|
-
}
|
|
4932
|
-
}
|
|
4933
|
-
function assertDone(name, asyncName, complete) {
|
|
4934
|
-
if (!complete) {
|
|
4935
|
-
throw new Error(
|
|
4936
|
-
"`" + name + "` finished async. Use `" + asyncName + "` instead"
|
|
4937
|
-
);
|
|
4938
|
-
}
|
|
4939
|
-
}
|
|
4940
|
-
function vfile(value) {
|
|
4941
|
-
return looksLikeAVFile(value) ? value : new VFile(value);
|
|
4942
|
-
}
|
|
4943
|
-
function looksLikeAVFile(value) {
|
|
4944
|
-
return Boolean(
|
|
4945
|
-
value && typeof value === "object" && "message" in value && "messages" in value
|
|
4946
|
-
);
|
|
4947
|
-
}
|
|
4948
|
-
function looksLikeAValue(value) {
|
|
4949
|
-
return typeof value === "string" || isUint8Array2(value);
|
|
4950
|
-
}
|
|
4951
|
-
function isUint8Array2(value) {
|
|
4952
|
-
return Boolean(
|
|
4953
|
-
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
4954
|
-
);
|
|
4955
|
-
}
|
|
4956
|
-
|
|
4957
|
-
// node_modules/nlcst-to-string/lib/index.js
|
|
4958
|
-
var emptyNodes = [];
|
|
4959
|
-
function toString2(value) {
|
|
4960
|
-
let index2 = -1;
|
|
4961
|
-
if (!value || !Array.isArray(value) && !value.type) {
|
|
4962
|
-
throw new Error("Expected node, not `" + value + "`");
|
|
4963
|
-
}
|
|
4964
|
-
if ("value" in value) return value.value;
|
|
4965
|
-
const children = (Array.isArray(value) ? value : value.children) || emptyNodes;
|
|
4966
|
-
const values = [];
|
|
4967
|
-
while (++index2 < children.length) {
|
|
4968
|
-
values[index2] = toString2(children[index2]);
|
|
4969
|
-
}
|
|
4970
|
-
return values.join("");
|
|
4971
|
-
}
|
|
4972
|
-
|
|
4973
|
-
// node_modules/array-iterate/lib/index.js
|
|
4974
|
-
var own2 = {}.hasOwnProperty;
|
|
4975
|
-
function arrayIterate(values, callbackFn, thisArg) {
|
|
4976
|
-
let index2 = -1;
|
|
4977
|
-
if (!values) {
|
|
4978
|
-
throw new Error("Iterate requires that |this| not be " + values);
|
|
4979
|
-
}
|
|
4980
|
-
if (!own2.call(values, "length")) {
|
|
4981
|
-
throw new Error("Iterate requires that |this| has a `length`");
|
|
4982
|
-
}
|
|
4983
|
-
if (typeof callbackFn !== "function") {
|
|
4984
|
-
throw new TypeError("`callback` must be a function");
|
|
4985
|
-
}
|
|
4986
|
-
while (++index2 < values.length) {
|
|
4987
|
-
if (!(index2 in values)) {
|
|
4988
|
-
continue;
|
|
4989
|
-
}
|
|
4990
|
-
const result = callbackFn.call(thisArg, values[index2], index2, values);
|
|
4991
|
-
if (typeof result === "number") {
|
|
4992
|
-
if (result < 0) {
|
|
4993
|
-
index2 = 0;
|
|
4994
|
-
}
|
|
4995
|
-
index2 = result - 1;
|
|
4996
|
-
}
|
|
4997
|
-
}
|
|
4998
|
-
}
|
|
4999
|
-
|
|
5000
|
-
// node_modules/unist-util-modify-children/lib/index.js
|
|
5001
|
-
function modifyChildren(modifier) {
|
|
5002
|
-
return modify;
|
|
5003
|
-
function modify(parent) {
|
|
5004
|
-
if (!parent || !parent.children) {
|
|
5005
|
-
throw new Error("Missing children in `parent` for `modifier`");
|
|
5006
|
-
}
|
|
5007
|
-
arrayIterate(parent.children, iteratee, parent);
|
|
5008
|
-
}
|
|
5009
|
-
function iteratee(node2, index2) {
|
|
5010
|
-
return modifier(node2, index2, this);
|
|
5011
|
-
}
|
|
5012
|
-
}
|
|
5013
|
-
|
|
5014
|
-
// node_modules/parse-latin/lib/plugin/merge-affix-exceptions.js
|
|
5015
|
-
var mergeAffixExceptions = modifyChildren(
|
|
5016
|
-
/**
|
|
5017
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
5018
|
-
*/
|
|
5019
|
-
function(child, index2, parent) {
|
|
5020
|
-
const previous2 = parent.children[index2 - 1];
|
|
5021
|
-
if (previous2 && "children" in previous2 && "children" in child && child.children.length > 0) {
|
|
5022
|
-
let position2 = -1;
|
|
5023
|
-
while (child.children[++position2]) {
|
|
5024
|
-
const node2 = child.children[position2];
|
|
5025
|
-
if (node2.type === "WordNode") {
|
|
5026
|
-
return;
|
|
5027
|
-
}
|
|
5028
|
-
if (node2.type === "SymbolNode" || node2.type === "PunctuationNode") {
|
|
5029
|
-
const value = toString2(node2);
|
|
5030
|
-
if (value !== "," && value !== ";") {
|
|
5031
|
-
return;
|
|
5032
|
-
}
|
|
5033
|
-
previous2.children.push(...child.children);
|
|
5034
|
-
if (previous2.position && child.position) {
|
|
5035
|
-
previous2.position.end = child.position.end;
|
|
5036
|
-
}
|
|
5037
|
-
parent.children.splice(index2, 1);
|
|
5038
|
-
return index2;
|
|
5039
|
-
}
|
|
5040
|
-
}
|
|
5041
|
-
}
|
|
5042
|
-
}
|
|
5043
|
-
);
|
|
5044
|
-
|
|
5045
|
-
// node_modules/parse-latin/lib/expressions.js
|
|
5046
|
-
var affixSymbol = /^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/;
|
|
5047
|
-
var newLine = /^[ \t]*((\r?\n|\r)[\t ]*)+$/;
|
|
5048
|
-
var terminalMarker = /^([!.?\u2026\u203D]+)$/;
|
|
5049
|
-
var wordSymbolInner = /^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/;
|
|
5050
|
-
var numerical = /^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])+$/;
|
|
5051
|
-
var digitStart = /^\d/;
|
|
5052
|
-
var lowerInitial = /^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1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\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/;
|
|
5053
|
-
var surrogates = /[\uD800-\uDFFF]/;
|
|
5054
|
-
var punctuation = /[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
|
|
5055
|
-
var word = /[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\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-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\u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6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\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\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF]/;
|
|
5056
|
-
var whiteSpace = /[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
|
5057
|
-
|
|
5058
|
-
// node_modules/parse-latin/lib/plugin/merge-affix-symbol.js
|
|
5059
|
-
var mergeAffixSymbol = modifyChildren(
|
|
5060
|
-
/**
|
|
5061
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
5062
|
-
*/
|
|
5063
|
-
function(child, index2, parent) {
|
|
5064
|
-
if ("children" in child && child.children.length > 0 && index2 > 0) {
|
|
5065
|
-
const previous2 = parent.children[index2 - 1];
|
|
5066
|
-
const first = child.children[0];
|
|
5067
|
-
const second = child.children[1];
|
|
5068
|
-
if (previous2 && previous2.type === "SentenceNode" && (first.type === "SymbolNode" || first.type === "PunctuationNode") && affixSymbol.test(toString2(first))) {
|
|
5069
|
-
child.children.shift();
|
|
5070
|
-
previous2.children.push(first);
|
|
5071
|
-
if (first.position && previous2.position) {
|
|
5072
|
-
previous2.position.end = first.position.end;
|
|
5073
|
-
}
|
|
5074
|
-
if (second && second.position && child.position) {
|
|
5075
|
-
child.position.start = second.position.start;
|
|
5076
|
-
}
|
|
5077
|
-
return index2 - 1;
|
|
5078
|
-
}
|
|
5079
|
-
}
|
|
5080
|
-
}
|
|
5081
|
-
);
|
|
5082
|
-
|
|
5083
|
-
// node_modules/parse-latin/lib/plugin/break-implicit-sentences.js
|
|
5084
|
-
var breakImplicitSentences = modifyChildren(
|
|
5085
|
-
/**
|
|
5086
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
5087
|
-
*/
|
|
5088
|
-
function(child, index2, parent) {
|
|
5089
|
-
if (child.type !== "SentenceNode") {
|
|
5090
|
-
return;
|
|
5091
|
-
}
|
|
5092
|
-
const children = child.children;
|
|
5093
|
-
let position2 = 0;
|
|
5094
|
-
while (++position2 < children.length - 1) {
|
|
5095
|
-
const node2 = children[position2];
|
|
5096
|
-
if (node2.type !== "WhiteSpaceNode" || toString2(node2).split(/\r\n|\r|\n/).length < 3) {
|
|
5097
|
-
continue;
|
|
5098
|
-
}
|
|
5099
|
-
child.children = children.slice(0, position2);
|
|
5100
|
-
const insertion = {
|
|
5101
|
-
type: "SentenceNode",
|
|
5102
|
-
children: children.slice(position2 + 1)
|
|
5103
|
-
};
|
|
5104
|
-
const tail = children[position2 - 1];
|
|
5105
|
-
const head = children[position2 + 1];
|
|
5106
|
-
parent.children.splice(index2 + 1, 0, node2, insertion);
|
|
5107
|
-
if (child.position && tail.position && head.position) {
|
|
5108
|
-
const end = child.position.end;
|
|
5109
|
-
child.position.end = tail.position.end;
|
|
5110
|
-
insertion.position = { start: head.position.start, end };
|
|
5111
|
-
}
|
|
5112
|
-
return index2 + 1;
|
|
5113
|
-
}
|
|
5114
|
-
}
|
|
5115
|
-
);
|
|
5116
|
-
|
|
5117
|
-
// node_modules/parse-latin/lib/plugin/make-final-white-space-siblings.js
|
|
5118
|
-
var makeFinalWhiteSpaceSiblings = modifyChildren(
|
|
5119
|
-
/**
|
|
5120
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph | Root>}
|
|
5121
|
-
*/
|
|
5122
|
-
function(child, index2, parent) {
|
|
5123
|
-
if ("children" in child) {
|
|
5124
|
-
const tail = child.children[child.children.length - 1];
|
|
5125
|
-
if (tail && tail.type === "WhiteSpaceNode") {
|
|
5126
|
-
child.children.pop();
|
|
5127
|
-
parent.children.splice(index2 + 1, 0, tail);
|
|
5128
|
-
const previous2 = child.children[child.children.length - 1];
|
|
5129
|
-
if (previous2 && previous2.position && child.position) {
|
|
5130
|
-
child.position.end = previous2.position.end;
|
|
5131
|
-
}
|
|
5132
|
-
return index2;
|
|
5133
|
-
}
|
|
5134
|
-
}
|
|
5135
|
-
}
|
|
5136
|
-
);
|
|
5137
|
-
|
|
5138
|
-
// node_modules/unist-util-visit-children/lib/index.js
|
|
5139
|
-
function visitChildren(visitor) {
|
|
5140
|
-
return visit2;
|
|
5141
|
-
function visit2(parent) {
|
|
5142
|
-
const children = parent && parent.children;
|
|
5143
|
-
let index2 = -1;
|
|
5144
|
-
if (!children) {
|
|
5145
|
-
throw new Error("Missing children in `parent` for `visit`");
|
|
5146
|
-
}
|
|
5147
|
-
while (++index2 in children) {
|
|
5148
|
-
visitor(children[index2], index2, parent);
|
|
5149
|
-
}
|
|
5150
|
-
}
|
|
5151
|
-
}
|
|
5152
|
-
|
|
5153
|
-
// node_modules/parse-latin/lib/plugin/make-initial-white-space-siblings.js
|
|
5154
|
-
var makeInitialWhiteSpaceSiblings = visitChildren(
|
|
5155
|
-
/**
|
|
5156
|
-
* @type {import('unist-util-visit-children').Visitor<Paragraph | Root>}
|
|
5157
|
-
*/
|
|
5158
|
-
function(child, index2, parent) {
|
|
5159
|
-
if ("children" in child && child.children) {
|
|
5160
|
-
const head = child.children[0];
|
|
5161
|
-
if (head && head.type === "WhiteSpaceNode") {
|
|
5162
|
-
child.children.shift();
|
|
5163
|
-
parent.children.splice(index2, 0, head);
|
|
5164
|
-
const next = child.children[0];
|
|
5165
|
-
if (next && next.position && child.position) {
|
|
5166
|
-
child.position.start = next.position.start;
|
|
5167
|
-
}
|
|
5168
|
-
}
|
|
5169
|
-
}
|
|
5170
|
-
}
|
|
5171
|
-
);
|
|
5172
|
-
|
|
5173
|
-
// node_modules/parse-latin/lib/plugin/merge-final-word-symbol.js
|
|
5174
|
-
var mergeFinalWordSymbol = modifyChildren(
|
|
5175
|
-
/**
|
|
5176
|
-
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
5177
|
-
*/
|
|
5178
|
-
function(child, index2, parent) {
|
|
5179
|
-
if (index2 > 0 && (child.type === "SymbolNode" || child.type === "PunctuationNode") && toString2(child) === "-") {
|
|
5180
|
-
const children = parent.children;
|
|
5181
|
-
const previous2 = children[index2 - 1];
|
|
5182
|
-
const next = children[index2 + 1];
|
|
5183
|
-
if ((!next || next.type !== "WordNode") && previous2 && previous2.type === "WordNode") {
|
|
5184
|
-
children.splice(index2, 1);
|
|
5185
|
-
previous2.children.push(child);
|
|
5186
|
-
if (previous2.position && child.position) {
|
|
5187
|
-
previous2.position.end = child.position.end;
|
|
5188
|
-
}
|
|
5189
|
-
return index2;
|
|
5190
|
-
}
|
|
5191
|
-
}
|
|
5192
|
-
}
|
|
5193
|
-
);
|
|
5194
|
-
|
|
5195
|
-
// node_modules/parse-latin/lib/plugin/merge-initial-digit-sentences.js
|
|
5196
|
-
var mergeInitialDigitSentences = modifyChildren(
|
|
5197
|
-
/**
|
|
5198
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
5199
|
-
*/
|
|
5200
|
-
function(child, index2, parent) {
|
|
5201
|
-
const previous2 = parent.children[index2 - 1];
|
|
5202
|
-
if (previous2 && previous2.type === "SentenceNode" && child.type === "SentenceNode") {
|
|
5203
|
-
const head = child.children[0];
|
|
5204
|
-
if (head && head.type === "WordNode" && digitStart.test(toString2(head))) {
|
|
5205
|
-
previous2.children.push(...child.children);
|
|
5206
|
-
parent.children.splice(index2, 1);
|
|
5207
|
-
if (previous2.position && child.position) {
|
|
5208
|
-
previous2.position.end = child.position.end;
|
|
5209
|
-
}
|
|
5210
|
-
return index2;
|
|
5211
|
-
}
|
|
5212
|
-
}
|
|
5213
|
-
}
|
|
5214
|
-
);
|
|
5215
|
-
|
|
5216
|
-
// node_modules/parse-latin/lib/plugin/merge-initial-lower-case-letter-sentences.js
|
|
5217
|
-
var mergeInitialLowerCaseLetterSentences = modifyChildren(
|
|
5218
|
-
/**
|
|
5219
|
-
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
5220
|
-
*/
|
|
5221
|
-
function(child, index2, parent) {
|
|
5222
|
-
if (child.type === "SentenceNode" && index2 > 0) {
|
|
5223
|
-
const previous2 = parent.children[index2 - 1];
|
|
5224
|
-
const children = child.children;
|
|
5225
|
-
if (children.length > 0 && previous2.type === "SentenceNode") {
|
|
5226
|
-
let position2 = -1;
|
|
5227
|
-
while (children[++position2]) {
|
|
5228
|
-
const node2 = children[position2];
|
|
5229
|
-
if (node2.type === "WordNode") {
|
|
5230
|
-
if (!lowerInitial.test(toString2(node2))) {
|
|
5231
|
-
return;
|
|
5232
|
-
}
|
|
5233
|
-
previous2.children.push(...children);
|
|
5234
|
-
parent.children.splice(index2, 1);
|
|
5235
|
-
if (previous2.position && child.position) {
|
|
5236
|
-
previous2.position.end = child.position.end;
|
|
5237
|
-
}
|
|
5238
|
-
return index2;
|
|
5239
|
-
}
|
|
5240
|
-
if (node2.type === "SymbolNode" || node2.type === "PunctuationNode") {
|
|
5241
|
-
return;
|
|
5242
|
-
}
|
|
5243
|
-
}
|
|
5244
|
-
}
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
);
|
|
5248
|
-
|
|
5249
|
-
// node_modules/parse-latin/lib/plugin/merge-initial-word-symbol.js
|
|
5250
|
-
var mergeInitialWordSymbol = modifyChildren(
|
|
5251
|
-
/**
|
|
5252
|
-
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
5253
|
-
*/
|
|
5254
|
-
function(child, index2, parent) {
|
|
5255
|
-
if (child.type !== "SymbolNode" && child.type !== "PunctuationNode" || toString2(child) !== "&") {
|
|
5256
|
-
return;
|
|
5257
|
-
}
|
|
5258
|
-
const children = parent.children;
|
|
5259
|
-
const next = children[index2 + 1];
|
|
5260
|
-
if (index2 > 0 && children[index2 - 1].type === "WordNode" || !(next && next.type === "WordNode")) {
|
|
5261
|
-
return;
|
|
5262
|
-
}
|
|
5263
|
-
children.splice(index2, 1);
|
|
5264
|
-
next.children.unshift(child);
|
|
5265
|
-
if (next.position && child.position) {
|
|
5266
|
-
next.position.start = child.position.start;
|
|
5267
|
-
}
|
|
5268
|
-
return index2 - 1;
|
|
5269
|
-
}
|
|
5270
|
-
);
|
|
5271
|
-
|
|
5272
|
-
// node_modules/parse-latin/lib/plugin/merge-initialisms.js
|
|
5273
|
-
var mergeInitialisms = modifyChildren(
|
|
5274
|
-
/**
|
|
5275
|
-
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
3775
|
+
* @type {import('unist-util-modify-children').Modifier<Sentence>}
|
|
5276
3776
|
*/
|
|
5277
3777
|
function(child, index2, parent) {
|
|
5278
3778
|
if (index2 > 0 && child.type === "PunctuationNode" && toString2(child) === ".") {
|
|
5279
3779
|
const previous2 = parent.children[index2 - 1];
|
|
5280
3780
|
if (previous2.type === "WordNode" && previous2.children && previous2.children.length !== 1 && previous2.children.length % 2 !== 0) {
|
|
5281
|
-
let
|
|
3781
|
+
let position = previous2.children.length;
|
|
5282
3782
|
let isAllDigits = true;
|
|
5283
|
-
while (previous2.children[--
|
|
5284
|
-
const otherChild = previous2.children[
|
|
3783
|
+
while (previous2.children[--position]) {
|
|
3784
|
+
const otherChild = previous2.children[position];
|
|
5285
3785
|
const value = toString2(otherChild);
|
|
5286
|
-
if (
|
|
3786
|
+
if (position % 2 === 0) {
|
|
5287
3787
|
if (value.length > 1) {
|
|
5288
3788
|
return;
|
|
5289
3789
|
}
|
|
@@ -5291,7 +3791,7 @@ var mergeInitialisms = modifyChildren(
|
|
|
5291
3791
|
isAllDigits = false;
|
|
5292
3792
|
}
|
|
5293
3793
|
} else if (value !== ".") {
|
|
5294
|
-
if (
|
|
3794
|
+
if (position < previous2.children.length - 2) {
|
|
5295
3795
|
break;
|
|
5296
3796
|
} else {
|
|
5297
3797
|
return;
|
|
@@ -5321,11 +3821,11 @@ var mergeInnerWordSymbol = modifyChildren(
|
|
|
5321
3821
|
const siblings = parent.children;
|
|
5322
3822
|
const previous2 = siblings[index2 - 1];
|
|
5323
3823
|
if (previous2 && previous2.type === "WordNode") {
|
|
5324
|
-
let
|
|
3824
|
+
let position = index2 - 1;
|
|
5325
3825
|
const tokens = [];
|
|
5326
3826
|
let queue = [];
|
|
5327
|
-
while (siblings[++
|
|
5328
|
-
const sibling = siblings[
|
|
3827
|
+
while (siblings[++position]) {
|
|
3828
|
+
const sibling = siblings[position];
|
|
5329
3829
|
if (sibling.type === "WordNode") {
|
|
5330
3830
|
tokens.push(...queue, ...sibling.children);
|
|
5331
3831
|
queue = [];
|
|
@@ -5337,9 +3837,9 @@ var mergeInnerWordSymbol = modifyChildren(
|
|
|
5337
3837
|
}
|
|
5338
3838
|
if (tokens.length > 0) {
|
|
5339
3839
|
if (queue.length > 0) {
|
|
5340
|
-
|
|
3840
|
+
position -= queue.length;
|
|
5341
3841
|
}
|
|
5342
|
-
siblings.splice(index2,
|
|
3842
|
+
siblings.splice(index2, position - index2);
|
|
5343
3843
|
previous2.children.push(...tokens);
|
|
5344
3844
|
const last = tokens[tokens.length - 1];
|
|
5345
3845
|
if (previous2.position && last.position) {
|
|
@@ -5392,9 +3892,9 @@ var mergeNonWordSentences = modifyChildren(
|
|
|
5392
3892
|
*/
|
|
5393
3893
|
function(child, index2, parent) {
|
|
5394
3894
|
if ("children" in child) {
|
|
5395
|
-
let
|
|
5396
|
-
while (child.children[++
|
|
5397
|
-
if (child.children[
|
|
3895
|
+
let position = -1;
|
|
3896
|
+
while (child.children[++position]) {
|
|
3897
|
+
if (child.children[position].type === "WordNode") {
|
|
5398
3898
|
return;
|
|
5399
3899
|
}
|
|
5400
3900
|
}
|
|
@@ -5461,10 +3961,10 @@ var mergeRemainingFullStops = visitChildren(
|
|
|
5461
3961
|
// eslint-disable-next-line complexity
|
|
5462
3962
|
function(child, _, _parent) {
|
|
5463
3963
|
if ("children" in child) {
|
|
5464
|
-
let
|
|
3964
|
+
let position = child.children.length;
|
|
5465
3965
|
let hasFoundDelimiter = false;
|
|
5466
|
-
while (child.children[--
|
|
5467
|
-
const grandchild = child.children[
|
|
3966
|
+
while (child.children[--position]) {
|
|
3967
|
+
const grandchild = child.children[position];
|
|
5468
3968
|
if (grandchild.type !== "SymbolNode" && grandchild.type !== "PunctuationNode") {
|
|
5469
3969
|
if (grandchild.type === "WordNode") {
|
|
5470
3970
|
hasFoundDelimiter = true;
|
|
@@ -5481,21 +3981,21 @@ var mergeRemainingFullStops = visitChildren(
|
|
|
5481
3981
|
if (toString2(grandchild) !== ".") {
|
|
5482
3982
|
continue;
|
|
5483
3983
|
}
|
|
5484
|
-
const previous2 = child.children[
|
|
5485
|
-
const next = child.children[
|
|
3984
|
+
const previous2 = child.children[position - 1];
|
|
3985
|
+
const next = child.children[position + 1];
|
|
5486
3986
|
if (previous2 && previous2.type === "WordNode") {
|
|
5487
|
-
const nextNext = child.children[
|
|
3987
|
+
const nextNext = child.children[position + 2];
|
|
5488
3988
|
if (next && nextNext && next.type === "WhiteSpaceNode" && toString2(nextNext) === ".") {
|
|
5489
3989
|
continue;
|
|
5490
3990
|
}
|
|
5491
|
-
child.children.splice(
|
|
3991
|
+
child.children.splice(position, 1);
|
|
5492
3992
|
previous2.children.push(grandchild);
|
|
5493
3993
|
if (grandchild.position && previous2.position) {
|
|
5494
3994
|
previous2.position.end = grandchild.position.end;
|
|
5495
3995
|
}
|
|
5496
|
-
|
|
3996
|
+
position--;
|
|
5497
3997
|
} else if (next && next.type === "WordNode") {
|
|
5498
|
-
child.children.splice(
|
|
3998
|
+
child.children.splice(position, 1);
|
|
5499
3999
|
next.children.unshift(grandchild);
|
|
5500
4000
|
if (grandchild.position && next.position) {
|
|
5501
4001
|
next.position.start = grandchild.position.start;
|
|
@@ -5817,15 +4317,15 @@ function retextSmartypants(options) {
|
|
|
5817
4317
|
open: settings.openingQuotes ? [settings.openingQuotes.double, settings.openingQuotes.single] : defaultOpeningQuotes
|
|
5818
4318
|
};
|
|
5819
4319
|
return function(tree) {
|
|
5820
|
-
visit(tree, function(node2,
|
|
4320
|
+
visit(tree, function(node2, position, parent) {
|
|
5821
4321
|
let index2 = -1;
|
|
5822
|
-
if (parent &&
|
|
4322
|
+
if (parent && position !== void 0 && (node2.type === "PunctuationNode" || node2.type === "SymbolNode")) {
|
|
5823
4323
|
while (++index2 < methods.length) {
|
|
5824
|
-
const result = methods[index2](state, node2,
|
|
4324
|
+
const result = methods[index2](state, node2, position, parent);
|
|
5825
4325
|
if (result === true) {
|
|
5826
4326
|
console.log("drop", node2);
|
|
5827
|
-
parent.children.splice(
|
|
5828
|
-
return
|
|
4327
|
+
parent.children.splice(position, 1);
|
|
4328
|
+
return position;
|
|
5829
4329
|
}
|
|
5830
4330
|
}
|
|
5831
4331
|
}
|
|
@@ -5887,15 +4387,15 @@ function ellipsesSpaced(_, node2, index2, parent) {
|
|
|
5887
4387
|
return;
|
|
5888
4388
|
}
|
|
5889
4389
|
const nodes = [];
|
|
5890
|
-
let
|
|
4390
|
+
let position = index2;
|
|
5891
4391
|
let count = 1;
|
|
5892
|
-
while (--
|
|
5893
|
-
let sibling = siblings[
|
|
4392
|
+
while (--position > 0) {
|
|
4393
|
+
let sibling = siblings[position];
|
|
5894
4394
|
if (sibling.type !== "WhiteSpaceNode") {
|
|
5895
4395
|
break;
|
|
5896
4396
|
}
|
|
5897
4397
|
const queue = sibling;
|
|
5898
|
-
sibling = siblings[--
|
|
4398
|
+
sibling = siblings[--position];
|
|
5899
4399
|
if (sibling && (sibling.type === "PunctuationNode" || sibling.type === "SymbolNode") && /^\.+$/.test(sibling.value)) {
|
|
5900
4400
|
nodes.push(queue, sibling);
|
|
5901
4401
|
count++;
|
|
@@ -5995,108 +4495,10 @@ var remarkSmartypants = (options) => {
|
|
|
5995
4495
|
function isLiteral(node2) {
|
|
5996
4496
|
return "value" in node2 && typeof node2.value === "string";
|
|
5997
4497
|
}
|
|
5998
|
-
function isParagraph(node2) {
|
|
5999
|
-
return node2.type === "paragraph";
|
|
6000
|
-
}
|
|
6001
|
-
var plugin_default = remarkSmartypants;
|
|
6002
|
-
|
|
6003
|
-
// node_modules/github-slugger/regex.js
|
|
6004
|
-
var regex = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7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C4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;
|
|
6005
|
-
|
|
6006
|
-
// node_modules/github-slugger/index.js
|
|
6007
|
-
var own3 = Object.hasOwnProperty;
|
|
6008
|
-
var BananaSlug = class {
|
|
6009
|
-
/**
|
|
6010
|
-
* Create a new slug class.
|
|
6011
|
-
*/
|
|
6012
|
-
constructor() {
|
|
6013
|
-
this.occurrences;
|
|
6014
|
-
this.reset();
|
|
6015
|
-
}
|
|
6016
|
-
/**
|
|
6017
|
-
* Generate a unique slug.
|
|
6018
|
-
*
|
|
6019
|
-
* Tracks previously generated slugs: repeated calls with the same value
|
|
6020
|
-
* will result in different slugs.
|
|
6021
|
-
* Use the `slug` function to get same slugs.
|
|
6022
|
-
*
|
|
6023
|
-
* @param {string} value
|
|
6024
|
-
* String of text to slugify
|
|
6025
|
-
* @param {boolean} [maintainCase=false]
|
|
6026
|
-
* Keep the current case, otherwise make all lowercase
|
|
6027
|
-
* @return {string}
|
|
6028
|
-
* A unique slug string
|
|
6029
|
-
*/
|
|
6030
|
-
slug(value, maintainCase) {
|
|
6031
|
-
const self2 = this;
|
|
6032
|
-
let result = slug(value, maintainCase === true);
|
|
6033
|
-
const originalSlug = result;
|
|
6034
|
-
while (own3.call(self2.occurrences, result)) {
|
|
6035
|
-
self2.occurrences[originalSlug]++;
|
|
6036
|
-
result = originalSlug + "-" + self2.occurrences[originalSlug];
|
|
6037
|
-
}
|
|
6038
|
-
self2.occurrences[result] = 0;
|
|
6039
|
-
return result;
|
|
6040
|
-
}
|
|
6041
|
-
/**
|
|
6042
|
-
* Reset - Forget all previous slugs
|
|
6043
|
-
*
|
|
6044
|
-
* @return void
|
|
6045
|
-
*/
|
|
6046
|
-
reset() {
|
|
6047
|
-
this.occurrences = /* @__PURE__ */ Object.create(null);
|
|
6048
|
-
}
|
|
6049
|
-
};
|
|
6050
|
-
function slug(value, maintainCase) {
|
|
6051
|
-
if (typeof value !== "string") return "";
|
|
6052
|
-
if (!maintainCase) value = value.toLowerCase();
|
|
6053
|
-
return value.replace(regex, "").replace(/ /g, "-");
|
|
6054
|
-
}
|
|
6055
|
-
|
|
6056
|
-
// node_modules/hast-util-heading-rank/lib/index.js
|
|
6057
|
-
function headingRank(node2) {
|
|
6058
|
-
const name = node2.type === "element" ? node2.tagName.toLowerCase() : "";
|
|
6059
|
-
const code3 = name.length === 2 && name.charCodeAt(0) === 104 ? name.charCodeAt(1) : 0;
|
|
6060
|
-
return code3 > 48 && code3 < 55 ? code3 - 48 : void 0;
|
|
6061
|
-
}
|
|
6062
|
-
|
|
6063
|
-
// node_modules/hast-util-to-string/lib/index.js
|
|
6064
|
-
function toString3(node2) {
|
|
6065
|
-
if ("children" in node2) {
|
|
6066
|
-
return all2(node2);
|
|
6067
|
-
}
|
|
6068
|
-
return "value" in node2 ? node2.value : "";
|
|
6069
|
-
}
|
|
6070
|
-
function one2(node2) {
|
|
6071
|
-
if (node2.type === "text") {
|
|
6072
|
-
return node2.value;
|
|
6073
|
-
}
|
|
6074
|
-
return "children" in node2 ? all2(node2) : "";
|
|
6075
|
-
}
|
|
6076
|
-
function all2(node2) {
|
|
6077
|
-
let index2 = -1;
|
|
6078
|
-
const result = [];
|
|
6079
|
-
while (++index2 < node2.children.length) {
|
|
6080
|
-
result[index2] = one2(node2.children[index2]);
|
|
6081
|
-
}
|
|
6082
|
-
return result.join("");
|
|
6083
|
-
}
|
|
6084
|
-
|
|
6085
|
-
// node_modules/rehype-slug/lib/index.js
|
|
6086
|
-
var emptyOptions4 = {};
|
|
6087
|
-
var slugs = new BananaSlug();
|
|
6088
|
-
function rehypeSlug(options) {
|
|
6089
|
-
const settings = options || emptyOptions4;
|
|
6090
|
-
const prefix = settings.prefix || "";
|
|
6091
|
-
return function(tree) {
|
|
6092
|
-
slugs.reset();
|
|
6093
|
-
visit(tree, "element", function(node2) {
|
|
6094
|
-
if (headingRank(node2) && !node2.properties.id) {
|
|
6095
|
-
node2.properties.id = prefix + slugs.slug(toString3(node2));
|
|
6096
|
-
}
|
|
6097
|
-
});
|
|
6098
|
-
};
|
|
4498
|
+
function isParagraph(node2) {
|
|
4499
|
+
return node2.type === "paragraph";
|
|
6099
4500
|
}
|
|
4501
|
+
var plugin_default = remarkSmartypants;
|
|
6100
4502
|
|
|
6101
4503
|
// node_modules/@ungap/structured-clone/esm/types.js
|
|
6102
4504
|
var VOID = -1;
|
|
@@ -6193,13 +4595,13 @@ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serial
|
|
|
6193
4595
|
|
|
6194
4596
|
// node_modules/@ungap/structured-clone/esm/serialize.js
|
|
6195
4597
|
var EMPTY = "";
|
|
6196
|
-
var { toString:
|
|
4598
|
+
var { toString: toString3 } = {};
|
|
6197
4599
|
var { keys } = Object;
|
|
6198
4600
|
var typeOf = (value) => {
|
|
6199
4601
|
const type = typeof value;
|
|
6200
4602
|
if (type !== "object" || !value)
|
|
6201
4603
|
return [PRIMITIVE, type];
|
|
6202
|
-
const asString =
|
|
4604
|
+
const asString = toString3.call(value).slice(8, -1);
|
|
6203
4605
|
switch (asString) {
|
|
6204
4606
|
case "Array":
|
|
6205
4607
|
return [ARRAY, EMPTY];
|
|
@@ -6250,261 +4652,2034 @@ var serializer = (strict, json, $, _) => {
|
|
|
6250
4652
|
case "undefined":
|
|
6251
4653
|
return as([VOID], value);
|
|
6252
4654
|
}
|
|
6253
|
-
return as([TYPE, entry], value);
|
|
4655
|
+
return as([TYPE, entry], value);
|
|
4656
|
+
}
|
|
4657
|
+
case ARRAY: {
|
|
4658
|
+
if (type) {
|
|
4659
|
+
let spread = value;
|
|
4660
|
+
if (type === "DataView") {
|
|
4661
|
+
spread = new Uint8Array(value.buffer);
|
|
4662
|
+
} else if (type === "ArrayBuffer") {
|
|
4663
|
+
spread = new Uint8Array(value);
|
|
4664
|
+
}
|
|
4665
|
+
return as([type, [...spread]], value);
|
|
4666
|
+
}
|
|
4667
|
+
const arr = [];
|
|
4668
|
+
const index2 = as([TYPE, arr], value);
|
|
4669
|
+
for (const entry of value)
|
|
4670
|
+
arr.push(pair(entry));
|
|
4671
|
+
return index2;
|
|
4672
|
+
}
|
|
4673
|
+
case OBJECT: {
|
|
4674
|
+
if (type) {
|
|
4675
|
+
switch (type) {
|
|
4676
|
+
case "BigInt":
|
|
4677
|
+
return as([type, value.toString()], value);
|
|
4678
|
+
case "Boolean":
|
|
4679
|
+
case "Number":
|
|
4680
|
+
case "String":
|
|
4681
|
+
return as([type, value.valueOf()], value);
|
|
4682
|
+
}
|
|
4683
|
+
}
|
|
4684
|
+
if (json && "toJSON" in value)
|
|
4685
|
+
return pair(value.toJSON());
|
|
4686
|
+
const entries = [];
|
|
4687
|
+
const index2 = as([TYPE, entries], value);
|
|
4688
|
+
for (const key of keys(value)) {
|
|
4689
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
4690
|
+
entries.push([pair(key), pair(value[key])]);
|
|
4691
|
+
}
|
|
4692
|
+
return index2;
|
|
4693
|
+
}
|
|
4694
|
+
case DATE:
|
|
4695
|
+
return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
|
|
4696
|
+
case REGEXP: {
|
|
4697
|
+
const { source, flags } = value;
|
|
4698
|
+
return as([TYPE, { source, flags }], value);
|
|
4699
|
+
}
|
|
4700
|
+
case MAP: {
|
|
4701
|
+
const entries = [];
|
|
4702
|
+
const index2 = as([TYPE, entries], value);
|
|
4703
|
+
for (const [key, entry] of value) {
|
|
4704
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
4705
|
+
entries.push([pair(key), pair(entry)]);
|
|
4706
|
+
}
|
|
4707
|
+
return index2;
|
|
4708
|
+
}
|
|
4709
|
+
case SET: {
|
|
4710
|
+
const entries = [];
|
|
4711
|
+
const index2 = as([TYPE, entries], value);
|
|
4712
|
+
for (const entry of value) {
|
|
4713
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
4714
|
+
entries.push(pair(entry));
|
|
4715
|
+
}
|
|
4716
|
+
return index2;
|
|
4717
|
+
}
|
|
4718
|
+
}
|
|
4719
|
+
const { message } = value;
|
|
4720
|
+
return as([TYPE, { name: type, message }], value);
|
|
4721
|
+
};
|
|
4722
|
+
return pair;
|
|
4723
|
+
};
|
|
4724
|
+
var serialize2 = (value, { json, lossy } = {}) => {
|
|
4725
|
+
const _ = [];
|
|
4726
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
4727
|
+
};
|
|
4728
|
+
|
|
4729
|
+
// node_modules/@ungap/structured-clone/esm/index.js
|
|
4730
|
+
var esm_default = typeof structuredClone === "function" ? (
|
|
4731
|
+
/* c8 ignore start */
|
|
4732
|
+
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize2(any, options)) : structuredClone(any)
|
|
4733
|
+
) : (any, options) => deserialize(serialize2(any, options));
|
|
4734
|
+
|
|
4735
|
+
// node_modules/hast-util-heading-rank/lib/index.js
|
|
4736
|
+
function headingRank(node2) {
|
|
4737
|
+
const name = node2.type === "element" ? node2.tagName.toLowerCase() : "";
|
|
4738
|
+
const code3 = name.length === 2 && name.charCodeAt(0) === 104 ? name.charCodeAt(1) : 0;
|
|
4739
|
+
return code3 > 48 && code3 < 55 ? code3 - 48 : void 0;
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4742
|
+
// node_modules/hast-util-is-element/lib/index.js
|
|
4743
|
+
var convertElement = (
|
|
4744
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
4745
|
+
/**
|
|
4746
|
+
* @type {(
|
|
4747
|
+
* (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
4748
|
+
* (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
4749
|
+
* ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
4750
|
+
* ((test?: Test) => Check)
|
|
4751
|
+
* )}
|
|
4752
|
+
*/
|
|
4753
|
+
/**
|
|
4754
|
+
* @param {Test | null | undefined} [test]
|
|
4755
|
+
* @returns {Check}
|
|
4756
|
+
*/
|
|
4757
|
+
(function(test) {
|
|
4758
|
+
if (test === null || test === void 0) {
|
|
4759
|
+
return element;
|
|
4760
|
+
}
|
|
4761
|
+
if (typeof test === "string") {
|
|
4762
|
+
return tagNameFactory(test);
|
|
4763
|
+
}
|
|
4764
|
+
if (typeof test === "object") {
|
|
4765
|
+
return anyFactory2(test);
|
|
4766
|
+
}
|
|
4767
|
+
if (typeof test === "function") {
|
|
4768
|
+
return castFactory2(test);
|
|
4769
|
+
}
|
|
4770
|
+
throw new Error("Expected function, string, or array as `test`");
|
|
4771
|
+
})
|
|
4772
|
+
);
|
|
4773
|
+
function anyFactory2(tests) {
|
|
4774
|
+
const checks2 = [];
|
|
4775
|
+
let index2 = -1;
|
|
4776
|
+
while (++index2 < tests.length) {
|
|
4777
|
+
checks2[index2] = convertElement(tests[index2]);
|
|
4778
|
+
}
|
|
4779
|
+
return castFactory2(any);
|
|
4780
|
+
function any(...parameters) {
|
|
4781
|
+
let index3 = -1;
|
|
4782
|
+
while (++index3 < checks2.length) {
|
|
4783
|
+
if (checks2[index3].apply(this, parameters)) return true;
|
|
4784
|
+
}
|
|
4785
|
+
return false;
|
|
4786
|
+
}
|
|
4787
|
+
}
|
|
4788
|
+
function tagNameFactory(check2) {
|
|
4789
|
+
return castFactory2(tagName);
|
|
4790
|
+
function tagName(element2) {
|
|
4791
|
+
return element2.tagName === check2;
|
|
4792
|
+
}
|
|
4793
|
+
}
|
|
4794
|
+
function castFactory2(testFunction) {
|
|
4795
|
+
return check2;
|
|
4796
|
+
function check2(value, index2, parent) {
|
|
4797
|
+
return Boolean(
|
|
4798
|
+
looksLikeAnElement(value) && testFunction.call(
|
|
4799
|
+
this,
|
|
4800
|
+
value,
|
|
4801
|
+
typeof index2 === "number" ? index2 : void 0,
|
|
4802
|
+
parent || void 0
|
|
4803
|
+
)
|
|
4804
|
+
);
|
|
4805
|
+
}
|
|
4806
|
+
}
|
|
4807
|
+
function element(element2) {
|
|
4808
|
+
return Boolean(
|
|
4809
|
+
element2 && typeof element2 === "object" && "type" in element2 && element2.type === "element" && "tagName" in element2 && typeof element2.tagName === "string"
|
|
4810
|
+
);
|
|
4811
|
+
}
|
|
4812
|
+
function looksLikeAnElement(value) {
|
|
4813
|
+
return value !== null && typeof value === "object" && "type" in value && "tagName" in value;
|
|
4814
|
+
}
|
|
4815
|
+
|
|
4816
|
+
// node_modules/rehype-autolink-headings/lib/index.js
|
|
4817
|
+
var contentDefaults = {
|
|
4818
|
+
type: "element",
|
|
4819
|
+
tagName: "span",
|
|
4820
|
+
properties: { className: ["icon", "icon-link"] },
|
|
4821
|
+
children: []
|
|
4822
|
+
};
|
|
4823
|
+
var emptyOptions4 = {};
|
|
4824
|
+
function rehypeAutolinkHeadings(options) {
|
|
4825
|
+
const settings = options || emptyOptions4;
|
|
4826
|
+
let properties = settings.properties;
|
|
4827
|
+
const headingOroperties = settings.headingProperties;
|
|
4828
|
+
const behavior = settings.behavior || "prepend";
|
|
4829
|
+
const content = settings.content;
|
|
4830
|
+
const group = settings.group;
|
|
4831
|
+
const is2 = convertElement(settings.test);
|
|
4832
|
+
let method;
|
|
4833
|
+
if (behavior === "after" || behavior === "before") {
|
|
4834
|
+
method = around;
|
|
4835
|
+
} else if (behavior === "wrap") {
|
|
4836
|
+
method = wrap;
|
|
4837
|
+
} else {
|
|
4838
|
+
method = inject;
|
|
4839
|
+
if (!properties) {
|
|
4840
|
+
properties = { ariaHidden: "true", tabIndex: -1 };
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
return function(tree) {
|
|
4844
|
+
visit(tree, "element", function(node2, index2, parent) {
|
|
4845
|
+
if (headingRank(node2) && node2.properties.id && is2(node2, index2, parent)) {
|
|
4846
|
+
Object.assign(node2.properties, toProperties(headingOroperties, node2));
|
|
4847
|
+
return method(node2, index2, parent);
|
|
4848
|
+
}
|
|
4849
|
+
});
|
|
4850
|
+
};
|
|
4851
|
+
function inject(node2) {
|
|
4852
|
+
const children = toChildren(content || contentDefaults, node2);
|
|
4853
|
+
node2.children[behavior === "prepend" ? "unshift" : "push"](
|
|
4854
|
+
create(node2, toProperties(properties, node2), children)
|
|
4855
|
+
);
|
|
4856
|
+
return [SKIP];
|
|
4857
|
+
}
|
|
4858
|
+
function around(node2, index2, parent) {
|
|
4859
|
+
if (typeof index2 !== "number" || !parent) return;
|
|
4860
|
+
const children = toChildren(content || contentDefaults, node2);
|
|
4861
|
+
const link2 = create(node2, toProperties(properties, node2), children);
|
|
4862
|
+
let nodes = behavior === "before" ? [link2, node2] : [node2, link2];
|
|
4863
|
+
if (group) {
|
|
4864
|
+
const grouping = toNode(group, node2);
|
|
4865
|
+
if (grouping && !Array.isArray(grouping) && grouping.type === "element") {
|
|
4866
|
+
grouping.children = nodes;
|
|
4867
|
+
nodes = [grouping];
|
|
4868
|
+
}
|
|
4869
|
+
}
|
|
4870
|
+
parent.children.splice(index2, 1, ...nodes);
|
|
4871
|
+
return [SKIP, index2 + nodes.length];
|
|
4872
|
+
}
|
|
4873
|
+
function wrap(node2) {
|
|
4874
|
+
let before = node2.children;
|
|
4875
|
+
let after = [];
|
|
4876
|
+
if (typeof content === "function") {
|
|
4877
|
+
before = [];
|
|
4878
|
+
after = content(node2);
|
|
4879
|
+
} else if (content) {
|
|
4880
|
+
after = clone(content);
|
|
4881
|
+
}
|
|
4882
|
+
node2.children = [
|
|
4883
|
+
create(
|
|
4884
|
+
node2,
|
|
4885
|
+
toProperties(properties, node2),
|
|
4886
|
+
Array.isArray(after) ? [...before, ...after] : [...before, after]
|
|
4887
|
+
)
|
|
4888
|
+
];
|
|
4889
|
+
return [SKIP];
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
function clone(thing) {
|
|
4893
|
+
return (
|
|
4894
|
+
/** @type {Cloneable<T>} */
|
|
4895
|
+
esm_default(thing)
|
|
4896
|
+
);
|
|
4897
|
+
}
|
|
4898
|
+
function create(node2, properties, children) {
|
|
4899
|
+
return {
|
|
4900
|
+
type: "element",
|
|
4901
|
+
tagName: "a",
|
|
4902
|
+
properties: { ...properties, href: "#" + node2.properties.id },
|
|
4903
|
+
children
|
|
4904
|
+
};
|
|
4905
|
+
}
|
|
4906
|
+
function toChildren(value, node2) {
|
|
4907
|
+
const result = toNode(value, node2);
|
|
4908
|
+
return Array.isArray(result) ? result : [result];
|
|
4909
|
+
}
|
|
4910
|
+
function toNode(value, node2) {
|
|
4911
|
+
if (typeof value === "function") return value(node2);
|
|
4912
|
+
return clone(value);
|
|
4913
|
+
}
|
|
4914
|
+
function toProperties(value, node2) {
|
|
4915
|
+
if (typeof value === "function") return value(node2);
|
|
4916
|
+
return value ? clone(value) : {};
|
|
4917
|
+
}
|
|
4918
|
+
var __create = Object.create;
|
|
4919
|
+
var __defProp = Object.defineProperty;
|
|
4920
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4921
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4922
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4923
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4924
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
4925
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4926
|
+
};
|
|
4927
|
+
var __export = (target, all2) => {
|
|
4928
|
+
for (var name2 in all2)
|
|
4929
|
+
__defProp(target, name2, { get: all2[name2], enumerable: true });
|
|
4930
|
+
};
|
|
4931
|
+
var __copyProps = (to, from, except, desc) => {
|
|
4932
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
4933
|
+
for (let key of __getOwnPropNames(from))
|
|
4934
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
4935
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
4936
|
+
}
|
|
4937
|
+
return to;
|
|
4938
|
+
};
|
|
4939
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
4940
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
4941
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
4942
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
4943
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
4944
|
+
__defProp(target, "default", { value: mod, enumerable: true }),
|
|
4945
|
+
mod
|
|
4946
|
+
));
|
|
4947
|
+
var require_cjs = __commonJS({
|
|
4948
|
+
"node_modules/inline-style-parser/cjs/index.js"(exports, module) {
|
|
4949
|
+
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
4950
|
+
var NEWLINE_REGEX = /\n/g;
|
|
4951
|
+
var WHITESPACE_REGEX = /^\s*/;
|
|
4952
|
+
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
|
|
4953
|
+
var COLON_REGEX = /^:\s*/;
|
|
4954
|
+
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
|
|
4955
|
+
var SEMICOLON_REGEX = /^[;\s]*/;
|
|
4956
|
+
var TRIM_REGEX = /^\s+|\s+$/g;
|
|
4957
|
+
var NEWLINE = "\n";
|
|
4958
|
+
var FORWARD_SLASH = "/";
|
|
4959
|
+
var ASTERISK = "*";
|
|
4960
|
+
var EMPTY_STRING = "";
|
|
4961
|
+
var TYPE_COMMENT = "comment";
|
|
4962
|
+
var TYPE_DECLARATION = "declaration";
|
|
4963
|
+
function index2(style, options) {
|
|
4964
|
+
if (typeof style !== "string") {
|
|
4965
|
+
throw new TypeError("First argument must be a string");
|
|
4966
|
+
}
|
|
4967
|
+
if (!style) return [];
|
|
4968
|
+
options = options || {};
|
|
4969
|
+
var lineno = 1;
|
|
4970
|
+
var column = 1;
|
|
4971
|
+
function updatePosition(str) {
|
|
4972
|
+
var lines = str.match(NEWLINE_REGEX);
|
|
4973
|
+
if (lines) lineno += lines.length;
|
|
4974
|
+
var i = str.lastIndexOf(NEWLINE);
|
|
4975
|
+
column = ~i ? str.length - i : column + str.length;
|
|
4976
|
+
}
|
|
4977
|
+
function position3() {
|
|
4978
|
+
var start2 = { line: lineno, column };
|
|
4979
|
+
return function(node2) {
|
|
4980
|
+
node2.position = new Position(start2);
|
|
4981
|
+
whitespace2();
|
|
4982
|
+
return node2;
|
|
4983
|
+
};
|
|
4984
|
+
}
|
|
4985
|
+
function Position(start2) {
|
|
4986
|
+
this.start = start2;
|
|
4987
|
+
this.end = { line: lineno, column };
|
|
4988
|
+
this.source = options.source;
|
|
4989
|
+
}
|
|
4990
|
+
Position.prototype.content = style;
|
|
4991
|
+
function error(msg) {
|
|
4992
|
+
var err = new Error(
|
|
4993
|
+
options.source + ":" + lineno + ":" + column + ": " + msg
|
|
4994
|
+
);
|
|
4995
|
+
err.reason = msg;
|
|
4996
|
+
err.filename = options.source;
|
|
4997
|
+
err.line = lineno;
|
|
4998
|
+
err.column = column;
|
|
4999
|
+
err.source = style;
|
|
5000
|
+
if (options.silent) ;
|
|
5001
|
+
else {
|
|
5002
|
+
throw err;
|
|
5003
|
+
}
|
|
6254
5004
|
}
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
5005
|
+
function match(re2) {
|
|
5006
|
+
var m = re2.exec(style);
|
|
5007
|
+
if (!m) return;
|
|
5008
|
+
var str = m[0];
|
|
5009
|
+
updatePosition(str);
|
|
5010
|
+
style = style.slice(str.length);
|
|
5011
|
+
return m;
|
|
5012
|
+
}
|
|
5013
|
+
function whitespace2() {
|
|
5014
|
+
match(WHITESPACE_REGEX);
|
|
5015
|
+
}
|
|
5016
|
+
function comments(rules) {
|
|
5017
|
+
var c;
|
|
5018
|
+
rules = rules || [];
|
|
5019
|
+
while (c = comment()) {
|
|
5020
|
+
if (c !== false) {
|
|
5021
|
+
rules.push(c);
|
|
6262
5022
|
}
|
|
6263
|
-
return as([type, [...spread]], value);
|
|
6264
5023
|
}
|
|
6265
|
-
|
|
6266
|
-
const index2 = as([TYPE, arr], value);
|
|
6267
|
-
for (const entry of value)
|
|
6268
|
-
arr.push(pair(entry));
|
|
6269
|
-
return index2;
|
|
5024
|
+
return rules;
|
|
6270
5025
|
}
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
case "Number":
|
|
6278
|
-
case "String":
|
|
6279
|
-
return as([type, value.valueOf()], value);
|
|
6280
|
-
}
|
|
5026
|
+
function comment() {
|
|
5027
|
+
var pos = position3();
|
|
5028
|
+
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
|
|
5029
|
+
var i = 2;
|
|
5030
|
+
while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) {
|
|
5031
|
+
++i;
|
|
6281
5032
|
}
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
const index2 = as([TYPE, entries], value);
|
|
6286
|
-
for (const key of keys(value)) {
|
|
6287
|
-
if (strict || !shouldSkip(typeOf(value[key])))
|
|
6288
|
-
entries.push([pair(key), pair(value[key])]);
|
|
5033
|
+
i += 2;
|
|
5034
|
+
if (EMPTY_STRING === style.charAt(i - 1)) {
|
|
5035
|
+
return error("End of comment missing");
|
|
6289
5036
|
}
|
|
6290
|
-
|
|
5037
|
+
var str = style.slice(2, i - 2);
|
|
5038
|
+
column += 2;
|
|
5039
|
+
updatePosition(str);
|
|
5040
|
+
style = style.slice(i);
|
|
5041
|
+
column += 2;
|
|
5042
|
+
return pos({
|
|
5043
|
+
type: TYPE_COMMENT,
|
|
5044
|
+
comment: str
|
|
5045
|
+
});
|
|
6291
5046
|
}
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
5047
|
+
function declaration() {
|
|
5048
|
+
var pos = position3();
|
|
5049
|
+
var prop = match(PROPERTY_REGEX);
|
|
5050
|
+
if (!prop) return;
|
|
5051
|
+
comment();
|
|
5052
|
+
if (!match(COLON_REGEX)) return error("property missing ':'");
|
|
5053
|
+
var val = match(VALUE_REGEX);
|
|
5054
|
+
var ret = pos({
|
|
5055
|
+
type: TYPE_DECLARATION,
|
|
5056
|
+
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
|
|
5057
|
+
value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
|
|
5058
|
+
});
|
|
5059
|
+
match(SEMICOLON_REGEX);
|
|
5060
|
+
return ret;
|
|
6297
5061
|
}
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
5062
|
+
function declarations() {
|
|
5063
|
+
var decls = [];
|
|
5064
|
+
comments(decls);
|
|
5065
|
+
var decl;
|
|
5066
|
+
while (decl = declaration()) {
|
|
5067
|
+
if (decl !== false) {
|
|
5068
|
+
decls.push(decl);
|
|
5069
|
+
comments(decls);
|
|
5070
|
+
}
|
|
6304
5071
|
}
|
|
6305
|
-
return
|
|
5072
|
+
return decls;
|
|
6306
5073
|
}
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
5074
|
+
whitespace2();
|
|
5075
|
+
return declarations();
|
|
5076
|
+
}
|
|
5077
|
+
function trim(str) {
|
|
5078
|
+
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
5079
|
+
}
|
|
5080
|
+
module.exports = index2;
|
|
5081
|
+
}
|
|
5082
|
+
});
|
|
5083
|
+
var require_cjs2 = __commonJS({
|
|
5084
|
+
"node_modules/style-to-object/cjs/index.js"(exports) {
|
|
5085
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
5086
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5087
|
+
};
|
|
5088
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5089
|
+
exports.default = StyleToObject;
|
|
5090
|
+
var inline_style_parser_1 = __importDefault(require_cjs());
|
|
5091
|
+
function StyleToObject(style, iterator) {
|
|
5092
|
+
let styleObject = null;
|
|
5093
|
+
if (!style || typeof style !== "string") {
|
|
5094
|
+
return styleObject;
|
|
5095
|
+
}
|
|
5096
|
+
const declarations = (0, inline_style_parser_1.default)(style);
|
|
5097
|
+
const hasIterator = typeof iterator === "function";
|
|
5098
|
+
declarations.forEach((declaration) => {
|
|
5099
|
+
if (declaration.type !== "declaration") {
|
|
5100
|
+
return;
|
|
6313
5101
|
}
|
|
6314
|
-
|
|
5102
|
+
const { property, value } = declaration;
|
|
5103
|
+
if (hasIterator) {
|
|
5104
|
+
iterator(property, value, declaration);
|
|
5105
|
+
} else if (value) {
|
|
5106
|
+
styleObject = styleObject || {};
|
|
5107
|
+
styleObject[property] = value;
|
|
5108
|
+
}
|
|
5109
|
+
});
|
|
5110
|
+
return styleObject;
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
5113
|
+
});
|
|
5114
|
+
var require_utilities = __commonJS({
|
|
5115
|
+
"node_modules/style-to-js/cjs/utilities.js"(exports) {
|
|
5116
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5117
|
+
exports.camelCase = void 0;
|
|
5118
|
+
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
|
|
5119
|
+
var HYPHEN_REGEX = /-([a-z])/g;
|
|
5120
|
+
var NO_HYPHEN_REGEX = /^[^-]+$/;
|
|
5121
|
+
var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
|
|
5122
|
+
var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
|
|
5123
|
+
var skipCamelCase = function(property) {
|
|
5124
|
+
return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
|
|
5125
|
+
};
|
|
5126
|
+
var capitalize2 = function(match, character) {
|
|
5127
|
+
return character.toUpperCase();
|
|
5128
|
+
};
|
|
5129
|
+
var trimHyphen = function(match, prefix) {
|
|
5130
|
+
return "".concat(prefix, "-");
|
|
5131
|
+
};
|
|
5132
|
+
var camelCase = function(property, options) {
|
|
5133
|
+
if (options === void 0) {
|
|
5134
|
+
options = {};
|
|
5135
|
+
}
|
|
5136
|
+
if (skipCamelCase(property)) {
|
|
5137
|
+
return property;
|
|
5138
|
+
}
|
|
5139
|
+
property = property.toLowerCase();
|
|
5140
|
+
if (options.reactCompat) {
|
|
5141
|
+
property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
|
|
5142
|
+
} else {
|
|
5143
|
+
property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
|
|
5144
|
+
}
|
|
5145
|
+
return property.replace(HYPHEN_REGEX, capitalize2);
|
|
5146
|
+
};
|
|
5147
|
+
exports.camelCase = camelCase;
|
|
5148
|
+
}
|
|
5149
|
+
});
|
|
5150
|
+
var require_cjs3 = __commonJS({
|
|
5151
|
+
"node_modules/style-to-js/cjs/index.js"(exports, module) {
|
|
5152
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
5153
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5154
|
+
};
|
|
5155
|
+
var style_to_object_1 = __importDefault(require_cjs2());
|
|
5156
|
+
var utilities_1 = require_utilities();
|
|
5157
|
+
function StyleToJS(style, options) {
|
|
5158
|
+
var output = {};
|
|
5159
|
+
if (!style || typeof style !== "string") {
|
|
5160
|
+
return output;
|
|
6315
5161
|
}
|
|
5162
|
+
(0, style_to_object_1.default)(style, function(property, value) {
|
|
5163
|
+
if (property && value) {
|
|
5164
|
+
output[(0, utilities_1.camelCase)(property, options)] = value;
|
|
5165
|
+
}
|
|
5166
|
+
});
|
|
5167
|
+
return output;
|
|
6316
5168
|
}
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
}
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
var
|
|
6323
|
-
|
|
6324
|
-
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
6325
|
-
};
|
|
6326
|
-
|
|
6327
|
-
// node_modules/@ungap/structured-clone/esm/index.js
|
|
6328
|
-
var esm_default = typeof structuredClone === "function" ? (
|
|
6329
|
-
/* c8 ignore start */
|
|
6330
|
-
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize2(any, options)) : structuredClone(any)
|
|
6331
|
-
) : (any, options) => deserialize(serialize2(any, options));
|
|
6332
|
-
|
|
6333
|
-
// node_modules/hast-util-is-element/lib/index.js
|
|
6334
|
-
var convertElement = (
|
|
6335
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
5169
|
+
StyleToJS.default = StyleToJS;
|
|
5170
|
+
module.exports = StyleToJS;
|
|
5171
|
+
}
|
|
5172
|
+
});
|
|
5173
|
+
var regex = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-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5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uF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DE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;
|
|
5174
|
+
var own2 = Object.hasOwnProperty;
|
|
5175
|
+
var BananaSlug = class {
|
|
6336
5176
|
/**
|
|
6337
|
-
*
|
|
6338
|
-
* (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
6339
|
-
* (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
6340
|
-
* ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
6341
|
-
* ((test?: Test) => Check)
|
|
6342
|
-
* )}
|
|
5177
|
+
* Create a new slug class.
|
|
6343
5178
|
*/
|
|
5179
|
+
constructor() {
|
|
5180
|
+
this.occurrences;
|
|
5181
|
+
this.reset();
|
|
5182
|
+
}
|
|
6344
5183
|
/**
|
|
6345
|
-
*
|
|
6346
|
-
|
|
5184
|
+
* Generate a unique slug.
|
|
5185
|
+
*
|
|
5186
|
+
* Tracks previously generated slugs: repeated calls with the same value
|
|
5187
|
+
* will result in different slugs.
|
|
5188
|
+
* Use the `slug` function to get same slugs.
|
|
5189
|
+
*
|
|
5190
|
+
* @param {string} value
|
|
5191
|
+
* String of text to slugify
|
|
5192
|
+
* @param {boolean} [maintainCase=false]
|
|
5193
|
+
* Keep the current case, otherwise make all lowercase
|
|
5194
|
+
* @return {string}
|
|
5195
|
+
* A unique slug string
|
|
6347
5196
|
*/
|
|
6348
|
-
(
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
if (typeof test === "object") {
|
|
6356
|
-
return anyFactory2(test);
|
|
5197
|
+
slug(value, maintainCase) {
|
|
5198
|
+
const self2 = this;
|
|
5199
|
+
let result = slug(value, maintainCase === true);
|
|
5200
|
+
const originalSlug = result;
|
|
5201
|
+
while (own2.call(self2.occurrences, result)) {
|
|
5202
|
+
self2.occurrences[originalSlug]++;
|
|
5203
|
+
result = originalSlug + "-" + self2.occurrences[originalSlug];
|
|
6357
5204
|
}
|
|
6358
|
-
|
|
6359
|
-
|
|
5205
|
+
self2.occurrences[result] = 0;
|
|
5206
|
+
return result;
|
|
5207
|
+
}
|
|
5208
|
+
/**
|
|
5209
|
+
* Reset - Forget all previous slugs
|
|
5210
|
+
*
|
|
5211
|
+
* @return void
|
|
5212
|
+
*/
|
|
5213
|
+
reset() {
|
|
5214
|
+
this.occurrences = /* @__PURE__ */ Object.create(null);
|
|
5215
|
+
}
|
|
5216
|
+
};
|
|
5217
|
+
function slug(value, maintainCase) {
|
|
5218
|
+
if (typeof value !== "string") return "";
|
|
5219
|
+
if (!maintainCase) value = value.toLowerCase();
|
|
5220
|
+
return value.replace(regex, "").replace(/ /g, "-");
|
|
5221
|
+
}
|
|
5222
|
+
function slugHeading(text22) {
|
|
5223
|
+
return slug(text22);
|
|
5224
|
+
}
|
|
5225
|
+
var HeadingSlugger = class {
|
|
5226
|
+
slugger = new BananaSlug();
|
|
5227
|
+
/** Slug `text`, unique among the slugs this instance has returned. */
|
|
5228
|
+
slug(text22) {
|
|
5229
|
+
return this.slugger.slug(text22);
|
|
5230
|
+
}
|
|
5231
|
+
reset() {
|
|
5232
|
+
this.slugger.reset();
|
|
5233
|
+
}
|
|
5234
|
+
};
|
|
5235
|
+
function obsidianHeadingAnchor(text22) {
|
|
5236
|
+
return text22.replace(/[:|^#\\]/g, " ").replace(/\s+/g, " ").trim();
|
|
5237
|
+
}
|
|
5238
|
+
function resolveAnchorHref(href, ids) {
|
|
5239
|
+
if (!href.startsWith("#") || href.length === 1) return href;
|
|
5240
|
+
const raw = href.slice(1);
|
|
5241
|
+
let decoded = raw;
|
|
5242
|
+
try {
|
|
5243
|
+
decoded = decodeURIComponent(raw);
|
|
5244
|
+
} catch {
|
|
5245
|
+
}
|
|
5246
|
+
if (ids.has(raw) || ids.has(decoded)) return href;
|
|
5247
|
+
const bare = decoded.startsWith("^") ? decoded.slice(1) : decoded;
|
|
5248
|
+
if (ids.has(bare)) return "#" + bare;
|
|
5249
|
+
const slugged = slugHeading(bare);
|
|
5250
|
+
return ids.has(slugged) ? "#" + slugged : href;
|
|
5251
|
+
}
|
|
5252
|
+
var Schema = class {
|
|
5253
|
+
/**
|
|
5254
|
+
* @param {SchemaType['property']} property
|
|
5255
|
+
* Property.
|
|
5256
|
+
* @param {SchemaType['normal']} normal
|
|
5257
|
+
* Normal.
|
|
5258
|
+
* @param {Space | undefined} [space]
|
|
5259
|
+
* Space.
|
|
5260
|
+
* @returns
|
|
5261
|
+
* Schema.
|
|
5262
|
+
*/
|
|
5263
|
+
constructor(property, normal, space) {
|
|
5264
|
+
this.normal = normal;
|
|
5265
|
+
this.property = property;
|
|
5266
|
+
if (space) {
|
|
5267
|
+
this.space = space;
|
|
6360
5268
|
}
|
|
6361
|
-
throw new Error("Expected function, string, or array as `test`");
|
|
6362
|
-
})
|
|
6363
|
-
);
|
|
6364
|
-
function anyFactory2(tests) {
|
|
6365
|
-
const checks = [];
|
|
6366
|
-
let index2 = -1;
|
|
6367
|
-
while (++index2 < tests.length) {
|
|
6368
|
-
checks[index2] = convertElement(tests[index2]);
|
|
6369
5269
|
}
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
5270
|
+
};
|
|
5271
|
+
Schema.prototype.normal = {};
|
|
5272
|
+
Schema.prototype.property = {};
|
|
5273
|
+
Schema.prototype.space = void 0;
|
|
5274
|
+
function merge(definitions, space) {
|
|
5275
|
+
const property = {};
|
|
5276
|
+
const normal = {};
|
|
5277
|
+
for (const definition2 of definitions) {
|
|
5278
|
+
Object.assign(property, definition2.property);
|
|
5279
|
+
Object.assign(normal, definition2.normal);
|
|
5280
|
+
}
|
|
5281
|
+
return new Schema(property, normal, space);
|
|
5282
|
+
}
|
|
5283
|
+
function normalize(value) {
|
|
5284
|
+
return value.toLowerCase();
|
|
5285
|
+
}
|
|
5286
|
+
var Info = class {
|
|
5287
|
+
/**
|
|
5288
|
+
* @param {string} property
|
|
5289
|
+
* Property.
|
|
5290
|
+
* @param {string} attribute
|
|
5291
|
+
* Attribute.
|
|
5292
|
+
* @returns
|
|
5293
|
+
* Info.
|
|
5294
|
+
*/
|
|
5295
|
+
constructor(property, attribute) {
|
|
5296
|
+
this.attribute = attribute;
|
|
5297
|
+
this.property = property;
|
|
5298
|
+
}
|
|
5299
|
+
};
|
|
5300
|
+
Info.prototype.attribute = "";
|
|
5301
|
+
Info.prototype.booleanish = false;
|
|
5302
|
+
Info.prototype.boolean = false;
|
|
5303
|
+
Info.prototype.commaOrSpaceSeparated = false;
|
|
5304
|
+
Info.prototype.commaSeparated = false;
|
|
5305
|
+
Info.prototype.defined = false;
|
|
5306
|
+
Info.prototype.mustUseProperty = false;
|
|
5307
|
+
Info.prototype.number = false;
|
|
5308
|
+
Info.prototype.overloadedBoolean = false;
|
|
5309
|
+
Info.prototype.property = "";
|
|
5310
|
+
Info.prototype.spaceSeparated = false;
|
|
5311
|
+
Info.prototype.space = void 0;
|
|
5312
|
+
var types_exports = {};
|
|
5313
|
+
__export(types_exports, {
|
|
5314
|
+
boolean: () => boolean,
|
|
5315
|
+
booleanish: () => booleanish,
|
|
5316
|
+
commaOrSpaceSeparated: () => commaOrSpaceSeparated,
|
|
5317
|
+
commaSeparated: () => commaSeparated,
|
|
5318
|
+
number: () => number,
|
|
5319
|
+
overloadedBoolean: () => overloadedBoolean,
|
|
5320
|
+
spaceSeparated: () => spaceSeparated
|
|
5321
|
+
});
|
|
5322
|
+
var powers = 0;
|
|
5323
|
+
var boolean = increment();
|
|
5324
|
+
var booleanish = increment();
|
|
5325
|
+
var overloadedBoolean = increment();
|
|
5326
|
+
var number = increment();
|
|
5327
|
+
var spaceSeparated = increment();
|
|
5328
|
+
var commaSeparated = increment();
|
|
5329
|
+
var commaOrSpaceSeparated = increment();
|
|
5330
|
+
function increment() {
|
|
5331
|
+
return 2 ** ++powers;
|
|
5332
|
+
}
|
|
5333
|
+
var checks = (
|
|
5334
|
+
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
5335
|
+
Object.keys(types_exports)
|
|
5336
|
+
);
|
|
5337
|
+
var DefinedInfo = class extends Info {
|
|
5338
|
+
/**
|
|
5339
|
+
* @constructor
|
|
5340
|
+
* @param {string} property
|
|
5341
|
+
* Property.
|
|
5342
|
+
* @param {string} attribute
|
|
5343
|
+
* Attribute.
|
|
5344
|
+
* @param {number | null | undefined} [mask]
|
|
5345
|
+
* Mask.
|
|
5346
|
+
* @param {Space | undefined} [space]
|
|
5347
|
+
* Space.
|
|
5348
|
+
* @returns
|
|
5349
|
+
* Info.
|
|
5350
|
+
*/
|
|
5351
|
+
constructor(property, attribute, mask, space) {
|
|
5352
|
+
let index2 = -1;
|
|
5353
|
+
super(property, attribute);
|
|
5354
|
+
mark(this, "space", space);
|
|
5355
|
+
if (typeof mask === "number") {
|
|
5356
|
+
while (++index2 < checks.length) {
|
|
5357
|
+
const check2 = checks[index2];
|
|
5358
|
+
mark(this, checks[index2], (mask & types_exports[check2]) === types_exports[check2]);
|
|
5359
|
+
}
|
|
6375
5360
|
}
|
|
6376
|
-
return false;
|
|
6377
5361
|
}
|
|
6378
|
-
}
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
5362
|
+
};
|
|
5363
|
+
DefinedInfo.prototype.defined = true;
|
|
5364
|
+
function mark(values, key, value) {
|
|
5365
|
+
if (value) {
|
|
5366
|
+
values[key] = value;
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
function create2(definition2) {
|
|
5370
|
+
const properties = {};
|
|
5371
|
+
const normals = {};
|
|
5372
|
+
for (const [property, value] of Object.entries(definition2.properties)) {
|
|
5373
|
+
const info = new DefinedInfo(
|
|
5374
|
+
property,
|
|
5375
|
+
definition2.transform(definition2.attributes || {}, property),
|
|
5376
|
+
value,
|
|
5377
|
+
definition2.space
|
|
5378
|
+
);
|
|
5379
|
+
if (definition2.mustUseProperty && definition2.mustUseProperty.includes(property)) {
|
|
5380
|
+
info.mustUseProperty = true;
|
|
5381
|
+
}
|
|
5382
|
+
properties[property] = info;
|
|
5383
|
+
normals[normalize(property)] = property;
|
|
5384
|
+
normals[normalize(info.attribute)] = property;
|
|
5385
|
+
}
|
|
5386
|
+
return new Schema(properties, normals, definition2.space);
|
|
5387
|
+
}
|
|
5388
|
+
var aria = create2({
|
|
5389
|
+
properties: {
|
|
5390
|
+
ariaActiveDescendant: null,
|
|
5391
|
+
ariaAtomic: booleanish,
|
|
5392
|
+
ariaAutoComplete: null,
|
|
5393
|
+
ariaBusy: booleanish,
|
|
5394
|
+
ariaChecked: booleanish,
|
|
5395
|
+
ariaColCount: number,
|
|
5396
|
+
ariaColIndex: number,
|
|
5397
|
+
ariaColSpan: number,
|
|
5398
|
+
ariaControls: spaceSeparated,
|
|
5399
|
+
ariaCurrent: null,
|
|
5400
|
+
ariaDescribedBy: spaceSeparated,
|
|
5401
|
+
ariaDetails: null,
|
|
5402
|
+
ariaDisabled: booleanish,
|
|
5403
|
+
ariaDropEffect: spaceSeparated,
|
|
5404
|
+
ariaErrorMessage: null,
|
|
5405
|
+
ariaExpanded: booleanish,
|
|
5406
|
+
ariaFlowTo: spaceSeparated,
|
|
5407
|
+
ariaGrabbed: booleanish,
|
|
5408
|
+
ariaHasPopup: null,
|
|
5409
|
+
ariaHidden: booleanish,
|
|
5410
|
+
ariaInvalid: null,
|
|
5411
|
+
ariaKeyShortcuts: null,
|
|
5412
|
+
ariaLabel: null,
|
|
5413
|
+
ariaLabelledBy: spaceSeparated,
|
|
5414
|
+
ariaLevel: number,
|
|
5415
|
+
ariaLive: null,
|
|
5416
|
+
ariaModal: booleanish,
|
|
5417
|
+
ariaMultiLine: booleanish,
|
|
5418
|
+
ariaMultiSelectable: booleanish,
|
|
5419
|
+
ariaOrientation: null,
|
|
5420
|
+
ariaOwns: spaceSeparated,
|
|
5421
|
+
ariaPlaceholder: null,
|
|
5422
|
+
ariaPosInSet: number,
|
|
5423
|
+
ariaPressed: booleanish,
|
|
5424
|
+
ariaReadOnly: booleanish,
|
|
5425
|
+
ariaRelevant: null,
|
|
5426
|
+
ariaRequired: booleanish,
|
|
5427
|
+
ariaRoleDescription: spaceSeparated,
|
|
5428
|
+
ariaRowCount: number,
|
|
5429
|
+
ariaRowIndex: number,
|
|
5430
|
+
ariaRowSpan: number,
|
|
5431
|
+
ariaSelected: booleanish,
|
|
5432
|
+
ariaSetSize: number,
|
|
5433
|
+
ariaSort: null,
|
|
5434
|
+
ariaValueMax: number,
|
|
5435
|
+
ariaValueMin: number,
|
|
5436
|
+
ariaValueNow: number,
|
|
5437
|
+
ariaValueText: null,
|
|
5438
|
+
role: null
|
|
5439
|
+
},
|
|
5440
|
+
transform(_, property) {
|
|
5441
|
+
return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
|
|
5442
|
+
}
|
|
5443
|
+
});
|
|
5444
|
+
function caseSensitiveTransform(attributes, attribute) {
|
|
5445
|
+
return attribute in attributes ? attributes[attribute] : attribute;
|
|
5446
|
+
}
|
|
5447
|
+
function caseInsensitiveTransform(attributes, property) {
|
|
5448
|
+
return caseSensitiveTransform(attributes, property.toLowerCase());
|
|
5449
|
+
}
|
|
5450
|
+
var html2 = create2({
|
|
5451
|
+
attributes: {
|
|
5452
|
+
acceptcharset: "accept-charset",
|
|
5453
|
+
classname: "class",
|
|
5454
|
+
htmlfor: "for",
|
|
5455
|
+
httpequiv: "http-equiv"
|
|
5456
|
+
},
|
|
5457
|
+
mustUseProperty: ["checked", "multiple", "muted", "selected"],
|
|
5458
|
+
properties: {
|
|
5459
|
+
// Standard Properties.
|
|
5460
|
+
abbr: null,
|
|
5461
|
+
accept: commaSeparated,
|
|
5462
|
+
acceptCharset: spaceSeparated,
|
|
5463
|
+
accessKey: spaceSeparated,
|
|
5464
|
+
action: null,
|
|
5465
|
+
allow: null,
|
|
5466
|
+
allowFullScreen: boolean,
|
|
5467
|
+
allowPaymentRequest: boolean,
|
|
5468
|
+
allowUserMedia: boolean,
|
|
5469
|
+
alpha: boolean,
|
|
5470
|
+
alt: null,
|
|
5471
|
+
as: null,
|
|
5472
|
+
async: boolean,
|
|
5473
|
+
autoCapitalize: null,
|
|
5474
|
+
autoComplete: spaceSeparated,
|
|
5475
|
+
autoFocus: boolean,
|
|
5476
|
+
autoPlay: boolean,
|
|
5477
|
+
blocking: spaceSeparated,
|
|
5478
|
+
capture: null,
|
|
5479
|
+
charSet: null,
|
|
5480
|
+
checked: boolean,
|
|
5481
|
+
cite: null,
|
|
5482
|
+
className: spaceSeparated,
|
|
5483
|
+
closedBy: null,
|
|
5484
|
+
colorSpace: null,
|
|
5485
|
+
cols: number,
|
|
5486
|
+
colSpan: number,
|
|
5487
|
+
command: null,
|
|
5488
|
+
commandFor: null,
|
|
5489
|
+
content: null,
|
|
5490
|
+
contentEditable: booleanish,
|
|
5491
|
+
controls: boolean,
|
|
5492
|
+
controlsList: spaceSeparated,
|
|
5493
|
+
coords: number | commaSeparated,
|
|
5494
|
+
crossOrigin: null,
|
|
5495
|
+
data: null,
|
|
5496
|
+
dateTime: null,
|
|
5497
|
+
decoding: null,
|
|
5498
|
+
default: boolean,
|
|
5499
|
+
defer: boolean,
|
|
5500
|
+
dir: null,
|
|
5501
|
+
dirName: null,
|
|
5502
|
+
disabled: boolean,
|
|
5503
|
+
download: overloadedBoolean,
|
|
5504
|
+
draggable: booleanish,
|
|
5505
|
+
encType: null,
|
|
5506
|
+
enterKeyHint: null,
|
|
5507
|
+
fetchPriority: null,
|
|
5508
|
+
form: null,
|
|
5509
|
+
formAction: null,
|
|
5510
|
+
formEncType: null,
|
|
5511
|
+
formMethod: null,
|
|
5512
|
+
formNoValidate: boolean,
|
|
5513
|
+
formTarget: null,
|
|
5514
|
+
headers: spaceSeparated,
|
|
5515
|
+
height: number,
|
|
5516
|
+
hidden: overloadedBoolean,
|
|
5517
|
+
high: number,
|
|
5518
|
+
href: null,
|
|
5519
|
+
hrefLang: null,
|
|
5520
|
+
htmlFor: spaceSeparated,
|
|
5521
|
+
httpEquiv: spaceSeparated,
|
|
5522
|
+
id: null,
|
|
5523
|
+
imageSizes: null,
|
|
5524
|
+
imageSrcSet: null,
|
|
5525
|
+
inert: boolean,
|
|
5526
|
+
inputMode: null,
|
|
5527
|
+
integrity: null,
|
|
5528
|
+
is: null,
|
|
5529
|
+
isMap: boolean,
|
|
5530
|
+
itemId: null,
|
|
5531
|
+
itemProp: spaceSeparated,
|
|
5532
|
+
itemRef: spaceSeparated,
|
|
5533
|
+
itemScope: boolean,
|
|
5534
|
+
itemType: spaceSeparated,
|
|
5535
|
+
kind: null,
|
|
5536
|
+
label: null,
|
|
5537
|
+
lang: null,
|
|
5538
|
+
language: null,
|
|
5539
|
+
list: null,
|
|
5540
|
+
loading: null,
|
|
5541
|
+
loop: boolean,
|
|
5542
|
+
low: number,
|
|
5543
|
+
manifest: null,
|
|
5544
|
+
max: null,
|
|
5545
|
+
maxLength: number,
|
|
5546
|
+
media: null,
|
|
5547
|
+
method: null,
|
|
5548
|
+
min: null,
|
|
5549
|
+
minLength: number,
|
|
5550
|
+
multiple: boolean,
|
|
5551
|
+
muted: boolean,
|
|
5552
|
+
name: null,
|
|
5553
|
+
nonce: null,
|
|
5554
|
+
noModule: boolean,
|
|
5555
|
+
noValidate: boolean,
|
|
5556
|
+
onAbort: null,
|
|
5557
|
+
onAfterPrint: null,
|
|
5558
|
+
onAuxClick: null,
|
|
5559
|
+
onBeforeMatch: null,
|
|
5560
|
+
onBeforePrint: null,
|
|
5561
|
+
onBeforeToggle: null,
|
|
5562
|
+
onBeforeUnload: null,
|
|
5563
|
+
onBlur: null,
|
|
5564
|
+
onCancel: null,
|
|
5565
|
+
onCanPlay: null,
|
|
5566
|
+
onCanPlayThrough: null,
|
|
5567
|
+
onChange: null,
|
|
5568
|
+
onClick: null,
|
|
5569
|
+
onClose: null,
|
|
5570
|
+
onContextLost: null,
|
|
5571
|
+
onContextMenu: null,
|
|
5572
|
+
onContextRestored: null,
|
|
5573
|
+
onCopy: null,
|
|
5574
|
+
onCueChange: null,
|
|
5575
|
+
onCut: null,
|
|
5576
|
+
onDblClick: null,
|
|
5577
|
+
onDrag: null,
|
|
5578
|
+
onDragEnd: null,
|
|
5579
|
+
onDragEnter: null,
|
|
5580
|
+
onDragExit: null,
|
|
5581
|
+
onDragLeave: null,
|
|
5582
|
+
onDragOver: null,
|
|
5583
|
+
onDragStart: null,
|
|
5584
|
+
onDrop: null,
|
|
5585
|
+
onDurationChange: null,
|
|
5586
|
+
onEmptied: null,
|
|
5587
|
+
onEnded: null,
|
|
5588
|
+
onError: null,
|
|
5589
|
+
onFocus: null,
|
|
5590
|
+
onFormData: null,
|
|
5591
|
+
onHashChange: null,
|
|
5592
|
+
onInput: null,
|
|
5593
|
+
onInvalid: null,
|
|
5594
|
+
onKeyDown: null,
|
|
5595
|
+
onKeyPress: null,
|
|
5596
|
+
onKeyUp: null,
|
|
5597
|
+
onLanguageChange: null,
|
|
5598
|
+
onLoad: null,
|
|
5599
|
+
onLoadedData: null,
|
|
5600
|
+
onLoadedMetadata: null,
|
|
5601
|
+
onLoadEnd: null,
|
|
5602
|
+
onLoadStart: null,
|
|
5603
|
+
onMessage: null,
|
|
5604
|
+
onMessageError: null,
|
|
5605
|
+
onMouseDown: null,
|
|
5606
|
+
onMouseEnter: null,
|
|
5607
|
+
onMouseLeave: null,
|
|
5608
|
+
onMouseMove: null,
|
|
5609
|
+
onMouseOut: null,
|
|
5610
|
+
onMouseOver: null,
|
|
5611
|
+
onMouseUp: null,
|
|
5612
|
+
onOffline: null,
|
|
5613
|
+
onOnline: null,
|
|
5614
|
+
onPageHide: null,
|
|
5615
|
+
onPageShow: null,
|
|
5616
|
+
onPaste: null,
|
|
5617
|
+
onPause: null,
|
|
5618
|
+
onPlay: null,
|
|
5619
|
+
onPlaying: null,
|
|
5620
|
+
onPopState: null,
|
|
5621
|
+
onProgress: null,
|
|
5622
|
+
onRateChange: null,
|
|
5623
|
+
onRejectionHandled: null,
|
|
5624
|
+
onReset: null,
|
|
5625
|
+
onResize: null,
|
|
5626
|
+
onScroll: null,
|
|
5627
|
+
onScrollEnd: null,
|
|
5628
|
+
onSecurityPolicyViolation: null,
|
|
5629
|
+
onSeeked: null,
|
|
5630
|
+
onSeeking: null,
|
|
5631
|
+
onSelect: null,
|
|
5632
|
+
onSlotChange: null,
|
|
5633
|
+
onStalled: null,
|
|
5634
|
+
onStorage: null,
|
|
5635
|
+
onSubmit: null,
|
|
5636
|
+
onSuspend: null,
|
|
5637
|
+
onTimeUpdate: null,
|
|
5638
|
+
onToggle: null,
|
|
5639
|
+
onUnhandledRejection: null,
|
|
5640
|
+
onUnload: null,
|
|
5641
|
+
onVolumeChange: null,
|
|
5642
|
+
onWaiting: null,
|
|
5643
|
+
onWheel: null,
|
|
5644
|
+
open: boolean,
|
|
5645
|
+
optimum: number,
|
|
5646
|
+
pattern: null,
|
|
5647
|
+
ping: spaceSeparated,
|
|
5648
|
+
placeholder: null,
|
|
5649
|
+
playsInline: boolean,
|
|
5650
|
+
popover: null,
|
|
5651
|
+
popoverTarget: null,
|
|
5652
|
+
popoverTargetAction: null,
|
|
5653
|
+
poster: null,
|
|
5654
|
+
preload: null,
|
|
5655
|
+
readOnly: boolean,
|
|
5656
|
+
referrerPolicy: null,
|
|
5657
|
+
rel: spaceSeparated,
|
|
5658
|
+
required: boolean,
|
|
5659
|
+
reversed: boolean,
|
|
5660
|
+
rows: number,
|
|
5661
|
+
rowSpan: number,
|
|
5662
|
+
sandbox: spaceSeparated,
|
|
5663
|
+
scope: null,
|
|
5664
|
+
scoped: boolean,
|
|
5665
|
+
seamless: boolean,
|
|
5666
|
+
selected: boolean,
|
|
5667
|
+
shadowRootClonable: boolean,
|
|
5668
|
+
shadowRootCustomElementRegistry: boolean,
|
|
5669
|
+
shadowRootDelegatesFocus: boolean,
|
|
5670
|
+
shadowRootMode: null,
|
|
5671
|
+
shadowRootSerializable: boolean,
|
|
5672
|
+
shape: null,
|
|
5673
|
+
size: number,
|
|
5674
|
+
sizes: null,
|
|
5675
|
+
slot: null,
|
|
5676
|
+
span: number,
|
|
5677
|
+
spellCheck: booleanish,
|
|
5678
|
+
src: null,
|
|
5679
|
+
srcDoc: null,
|
|
5680
|
+
srcLang: null,
|
|
5681
|
+
srcSet: null,
|
|
5682
|
+
start: number,
|
|
5683
|
+
step: null,
|
|
5684
|
+
style: null,
|
|
5685
|
+
tabIndex: number,
|
|
5686
|
+
target: null,
|
|
5687
|
+
title: null,
|
|
5688
|
+
translate: null,
|
|
5689
|
+
type: null,
|
|
5690
|
+
typeMustMatch: boolean,
|
|
5691
|
+
useMap: null,
|
|
5692
|
+
value: booleanish,
|
|
5693
|
+
width: number,
|
|
5694
|
+
wrap: null,
|
|
5695
|
+
writingSuggestions: null,
|
|
5696
|
+
// Legacy.
|
|
5697
|
+
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
|
|
5698
|
+
align: null,
|
|
5699
|
+
// Several. Use CSS `text-align` instead,
|
|
5700
|
+
aLink: null,
|
|
5701
|
+
// `<body>`. Use CSS `a:active {color}` instead
|
|
5702
|
+
archive: spaceSeparated,
|
|
5703
|
+
// `<object>`. List of URIs to archives
|
|
5704
|
+
axis: null,
|
|
5705
|
+
// `<td>` and `<th>`. Use `scope` on `<th>`
|
|
5706
|
+
background: null,
|
|
5707
|
+
// `<body>`. Use CSS `background-image` instead
|
|
5708
|
+
bgColor: null,
|
|
5709
|
+
// `<body>` and table elements. Use CSS `background-color` instead
|
|
5710
|
+
border: number,
|
|
5711
|
+
// `<table>`. Use CSS `border-width` instead,
|
|
5712
|
+
borderColor: null,
|
|
5713
|
+
// `<table>`. Use CSS `border-color` instead,
|
|
5714
|
+
bottomMargin: number,
|
|
5715
|
+
// `<body>`
|
|
5716
|
+
cellPadding: null,
|
|
5717
|
+
// `<table>`
|
|
5718
|
+
cellSpacing: null,
|
|
5719
|
+
// `<table>`
|
|
5720
|
+
char: null,
|
|
5721
|
+
// Several table elements. When `align=char`, sets the character to align on
|
|
5722
|
+
charOff: null,
|
|
5723
|
+
// Several table elements. When `char`, offsets the alignment
|
|
5724
|
+
classId: null,
|
|
5725
|
+
// `<object>`
|
|
5726
|
+
clear: null,
|
|
5727
|
+
// `<br>`. Use CSS `clear` instead
|
|
5728
|
+
code: null,
|
|
5729
|
+
// `<object>`
|
|
5730
|
+
codeBase: null,
|
|
5731
|
+
// `<object>`
|
|
5732
|
+
codeType: null,
|
|
5733
|
+
// `<object>`
|
|
5734
|
+
color: null,
|
|
5735
|
+
// `<font>` and `<hr>`. Use CSS instead
|
|
5736
|
+
compact: boolean,
|
|
5737
|
+
// Lists. Use CSS to reduce space between items instead
|
|
5738
|
+
declare: boolean,
|
|
5739
|
+
// `<object>`
|
|
5740
|
+
event: null,
|
|
5741
|
+
// `<script>`
|
|
5742
|
+
face: null,
|
|
5743
|
+
// `<font>`. Use CSS instead
|
|
5744
|
+
frame: null,
|
|
5745
|
+
// `<table>`
|
|
5746
|
+
frameBorder: null,
|
|
5747
|
+
// `<iframe>`. Use CSS `border` instead
|
|
5748
|
+
hSpace: number,
|
|
5749
|
+
// `<img>` and `<object>`
|
|
5750
|
+
leftMargin: number,
|
|
5751
|
+
// `<body>`
|
|
5752
|
+
link: null,
|
|
5753
|
+
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
5754
|
+
longDesc: null,
|
|
5755
|
+
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
5756
|
+
lowSrc: null,
|
|
5757
|
+
// `<img>`. Use a `<picture>`
|
|
5758
|
+
marginHeight: number,
|
|
5759
|
+
// `<body>`
|
|
5760
|
+
marginWidth: number,
|
|
5761
|
+
// `<body>`
|
|
5762
|
+
noResize: boolean,
|
|
5763
|
+
// `<frame>`
|
|
5764
|
+
noHref: boolean,
|
|
5765
|
+
// `<area>`. Use no href instead of an explicit `nohref`
|
|
5766
|
+
noShade: boolean,
|
|
5767
|
+
// `<hr>`. Use background-color and height instead of borders
|
|
5768
|
+
noWrap: boolean,
|
|
5769
|
+
// `<td>` and `<th>`
|
|
5770
|
+
object: null,
|
|
5771
|
+
// `<applet>`
|
|
5772
|
+
profile: null,
|
|
5773
|
+
// `<head>`
|
|
5774
|
+
prompt: null,
|
|
5775
|
+
// `<isindex>`
|
|
5776
|
+
rev: null,
|
|
5777
|
+
// `<link>`
|
|
5778
|
+
rightMargin: number,
|
|
5779
|
+
// `<body>`
|
|
5780
|
+
rules: null,
|
|
5781
|
+
// `<table>`
|
|
5782
|
+
scheme: null,
|
|
5783
|
+
// `<meta>`
|
|
5784
|
+
scrolling: booleanish,
|
|
5785
|
+
// `<frame>`. Use overflow in the child context
|
|
5786
|
+
standby: null,
|
|
5787
|
+
// `<object>`
|
|
5788
|
+
summary: null,
|
|
5789
|
+
// `<table>`
|
|
5790
|
+
text: null,
|
|
5791
|
+
// `<body>`. Use CSS `color` instead
|
|
5792
|
+
topMargin: number,
|
|
5793
|
+
// `<body>`
|
|
5794
|
+
valueType: null,
|
|
5795
|
+
// `<param>`
|
|
5796
|
+
version: null,
|
|
5797
|
+
// `<html>`. Use a doctype.
|
|
5798
|
+
vAlign: null,
|
|
5799
|
+
// Several. Use CSS `vertical-align` instead
|
|
5800
|
+
vLink: null,
|
|
5801
|
+
// `<body>`. Use CSS `a:visited {color}` instead
|
|
5802
|
+
vSpace: number,
|
|
5803
|
+
// `<img>` and `<object>`
|
|
5804
|
+
// Non-standard Properties.
|
|
5805
|
+
allowTransparency: null,
|
|
5806
|
+
autoCorrect: null,
|
|
5807
|
+
autoSave: null,
|
|
5808
|
+
credentialless: boolean,
|
|
5809
|
+
disablePictureInPicture: boolean,
|
|
5810
|
+
disableRemotePlayback: boolean,
|
|
5811
|
+
exportParts: commaSeparated,
|
|
5812
|
+
part: spaceSeparated,
|
|
5813
|
+
prefix: null,
|
|
5814
|
+
property: null,
|
|
5815
|
+
results: number,
|
|
5816
|
+
security: null,
|
|
5817
|
+
unselectable: null
|
|
5818
|
+
},
|
|
5819
|
+
space: "html",
|
|
5820
|
+
transform: caseInsensitiveTransform
|
|
5821
|
+
});
|
|
5822
|
+
var svg = create2({
|
|
5823
|
+
attributes: {
|
|
5824
|
+
accentHeight: "accent-height",
|
|
5825
|
+
alignmentBaseline: "alignment-baseline",
|
|
5826
|
+
arabicForm: "arabic-form",
|
|
5827
|
+
baselineShift: "baseline-shift",
|
|
5828
|
+
capHeight: "cap-height",
|
|
5829
|
+
className: "class",
|
|
5830
|
+
clipPath: "clip-path",
|
|
5831
|
+
clipRule: "clip-rule",
|
|
5832
|
+
colorInterpolation: "color-interpolation",
|
|
5833
|
+
colorInterpolationFilters: "color-interpolation-filters",
|
|
5834
|
+
colorProfile: "color-profile",
|
|
5835
|
+
colorRendering: "color-rendering",
|
|
5836
|
+
crossOrigin: "crossorigin",
|
|
5837
|
+
dataType: "datatype",
|
|
5838
|
+
dominantBaseline: "dominant-baseline",
|
|
5839
|
+
enableBackground: "enable-background",
|
|
5840
|
+
fillOpacity: "fill-opacity",
|
|
5841
|
+
fillRule: "fill-rule",
|
|
5842
|
+
floodColor: "flood-color",
|
|
5843
|
+
floodOpacity: "flood-opacity",
|
|
5844
|
+
fontFamily: "font-family",
|
|
5845
|
+
fontSize: "font-size",
|
|
5846
|
+
fontSizeAdjust: "font-size-adjust",
|
|
5847
|
+
fontStretch: "font-stretch",
|
|
5848
|
+
fontStyle: "font-style",
|
|
5849
|
+
fontVariant: "font-variant",
|
|
5850
|
+
fontWeight: "font-weight",
|
|
5851
|
+
glyphName: "glyph-name",
|
|
5852
|
+
glyphOrientationHorizontal: "glyph-orientation-horizontal",
|
|
5853
|
+
glyphOrientationVertical: "glyph-orientation-vertical",
|
|
5854
|
+
hrefLang: "hreflang",
|
|
5855
|
+
horizAdvX: "horiz-adv-x",
|
|
5856
|
+
horizOriginX: "horiz-origin-x",
|
|
5857
|
+
horizOriginY: "horiz-origin-y",
|
|
5858
|
+
imageRendering: "image-rendering",
|
|
5859
|
+
letterSpacing: "letter-spacing",
|
|
5860
|
+
lightingColor: "lighting-color",
|
|
5861
|
+
markerEnd: "marker-end",
|
|
5862
|
+
markerMid: "marker-mid",
|
|
5863
|
+
markerStart: "marker-start",
|
|
5864
|
+
maskType: "mask-type",
|
|
5865
|
+
navDown: "nav-down",
|
|
5866
|
+
navDownLeft: "nav-down-left",
|
|
5867
|
+
navDownRight: "nav-down-right",
|
|
5868
|
+
navLeft: "nav-left",
|
|
5869
|
+
navNext: "nav-next",
|
|
5870
|
+
navPrev: "nav-prev",
|
|
5871
|
+
navRight: "nav-right",
|
|
5872
|
+
navUp: "nav-up",
|
|
5873
|
+
navUpLeft: "nav-up-left",
|
|
5874
|
+
navUpRight: "nav-up-right",
|
|
5875
|
+
onAbort: "onabort",
|
|
5876
|
+
onActivate: "onactivate",
|
|
5877
|
+
onAfterPrint: "onafterprint",
|
|
5878
|
+
onBeforePrint: "onbeforeprint",
|
|
5879
|
+
onBegin: "onbegin",
|
|
5880
|
+
onCancel: "oncancel",
|
|
5881
|
+
onCanPlay: "oncanplay",
|
|
5882
|
+
onCanPlayThrough: "oncanplaythrough",
|
|
5883
|
+
onChange: "onchange",
|
|
5884
|
+
onClick: "onclick",
|
|
5885
|
+
onClose: "onclose",
|
|
5886
|
+
onCopy: "oncopy",
|
|
5887
|
+
onCueChange: "oncuechange",
|
|
5888
|
+
onCut: "oncut",
|
|
5889
|
+
onDblClick: "ondblclick",
|
|
5890
|
+
onDrag: "ondrag",
|
|
5891
|
+
onDragEnd: "ondragend",
|
|
5892
|
+
onDragEnter: "ondragenter",
|
|
5893
|
+
onDragExit: "ondragexit",
|
|
5894
|
+
onDragLeave: "ondragleave",
|
|
5895
|
+
onDragOver: "ondragover",
|
|
5896
|
+
onDragStart: "ondragstart",
|
|
5897
|
+
onDrop: "ondrop",
|
|
5898
|
+
onDurationChange: "ondurationchange",
|
|
5899
|
+
onEmptied: "onemptied",
|
|
5900
|
+
onEnd: "onend",
|
|
5901
|
+
onEnded: "onended",
|
|
5902
|
+
onError: "onerror",
|
|
5903
|
+
onFocus: "onfocus",
|
|
5904
|
+
onFocusIn: "onfocusin",
|
|
5905
|
+
onFocusOut: "onfocusout",
|
|
5906
|
+
onHashChange: "onhashchange",
|
|
5907
|
+
onInput: "oninput",
|
|
5908
|
+
onInvalid: "oninvalid",
|
|
5909
|
+
onKeyDown: "onkeydown",
|
|
5910
|
+
onKeyPress: "onkeypress",
|
|
5911
|
+
onKeyUp: "onkeyup",
|
|
5912
|
+
onLoad: "onload",
|
|
5913
|
+
onLoadedData: "onloadeddata",
|
|
5914
|
+
onLoadedMetadata: "onloadedmetadata",
|
|
5915
|
+
onLoadStart: "onloadstart",
|
|
5916
|
+
onMessage: "onmessage",
|
|
5917
|
+
onMouseDown: "onmousedown",
|
|
5918
|
+
onMouseEnter: "onmouseenter",
|
|
5919
|
+
onMouseLeave: "onmouseleave",
|
|
5920
|
+
onMouseMove: "onmousemove",
|
|
5921
|
+
onMouseOut: "onmouseout",
|
|
5922
|
+
onMouseOver: "onmouseover",
|
|
5923
|
+
onMouseUp: "onmouseup",
|
|
5924
|
+
onMouseWheel: "onmousewheel",
|
|
5925
|
+
onOffline: "onoffline",
|
|
5926
|
+
onOnline: "ononline",
|
|
5927
|
+
onPageHide: "onpagehide",
|
|
5928
|
+
onPageShow: "onpageshow",
|
|
5929
|
+
onPaste: "onpaste",
|
|
5930
|
+
onPause: "onpause",
|
|
5931
|
+
onPlay: "onplay",
|
|
5932
|
+
onPlaying: "onplaying",
|
|
5933
|
+
onPopState: "onpopstate",
|
|
5934
|
+
onProgress: "onprogress",
|
|
5935
|
+
onRateChange: "onratechange",
|
|
5936
|
+
onRepeat: "onrepeat",
|
|
5937
|
+
onReset: "onreset",
|
|
5938
|
+
onResize: "onresize",
|
|
5939
|
+
onScroll: "onscroll",
|
|
5940
|
+
onSeeked: "onseeked",
|
|
5941
|
+
onSeeking: "onseeking",
|
|
5942
|
+
onSelect: "onselect",
|
|
5943
|
+
onShow: "onshow",
|
|
5944
|
+
onStalled: "onstalled",
|
|
5945
|
+
onStorage: "onstorage",
|
|
5946
|
+
onSubmit: "onsubmit",
|
|
5947
|
+
onSuspend: "onsuspend",
|
|
5948
|
+
onTimeUpdate: "ontimeupdate",
|
|
5949
|
+
onToggle: "ontoggle",
|
|
5950
|
+
onUnload: "onunload",
|
|
5951
|
+
onVolumeChange: "onvolumechange",
|
|
5952
|
+
onWaiting: "onwaiting",
|
|
5953
|
+
onZoom: "onzoom",
|
|
5954
|
+
overlinePosition: "overline-position",
|
|
5955
|
+
overlineThickness: "overline-thickness",
|
|
5956
|
+
paintOrder: "paint-order",
|
|
5957
|
+
panose1: "panose-1",
|
|
5958
|
+
pointerEvents: "pointer-events",
|
|
5959
|
+
referrerPolicy: "referrerpolicy",
|
|
5960
|
+
renderingIntent: "rendering-intent",
|
|
5961
|
+
shapeRendering: "shape-rendering",
|
|
5962
|
+
stopColor: "stop-color",
|
|
5963
|
+
stopOpacity: "stop-opacity",
|
|
5964
|
+
strikethroughPosition: "strikethrough-position",
|
|
5965
|
+
strikethroughThickness: "strikethrough-thickness",
|
|
5966
|
+
strokeDashArray: "stroke-dasharray",
|
|
5967
|
+
strokeDashOffset: "stroke-dashoffset",
|
|
5968
|
+
strokeLineCap: "stroke-linecap",
|
|
5969
|
+
strokeLineJoin: "stroke-linejoin",
|
|
5970
|
+
strokeMiterLimit: "stroke-miterlimit",
|
|
5971
|
+
strokeOpacity: "stroke-opacity",
|
|
5972
|
+
strokeWidth: "stroke-width",
|
|
5973
|
+
tabIndex: "tabindex",
|
|
5974
|
+
textAnchor: "text-anchor",
|
|
5975
|
+
textDecoration: "text-decoration",
|
|
5976
|
+
textRendering: "text-rendering",
|
|
5977
|
+
transformOrigin: "transform-origin",
|
|
5978
|
+
typeOf: "typeof",
|
|
5979
|
+
underlinePosition: "underline-position",
|
|
5980
|
+
underlineThickness: "underline-thickness",
|
|
5981
|
+
unicodeBidi: "unicode-bidi",
|
|
5982
|
+
unicodeRange: "unicode-range",
|
|
5983
|
+
unitsPerEm: "units-per-em",
|
|
5984
|
+
vAlphabetic: "v-alphabetic",
|
|
5985
|
+
vHanging: "v-hanging",
|
|
5986
|
+
vIdeographic: "v-ideographic",
|
|
5987
|
+
vMathematical: "v-mathematical",
|
|
5988
|
+
vectorEffect: "vector-effect",
|
|
5989
|
+
vertAdvY: "vert-adv-y",
|
|
5990
|
+
vertOriginX: "vert-origin-x",
|
|
5991
|
+
vertOriginY: "vert-origin-y",
|
|
5992
|
+
wordSpacing: "word-spacing",
|
|
5993
|
+
writingMode: "writing-mode",
|
|
5994
|
+
xHeight: "x-height",
|
|
5995
|
+
// These were camelcased in Tiny. Now lowercased in SVG 2
|
|
5996
|
+
playbackOrder: "playbackorder",
|
|
5997
|
+
timelineBegin: "timelinebegin"
|
|
5998
|
+
},
|
|
5999
|
+
properties: {
|
|
6000
|
+
about: commaOrSpaceSeparated,
|
|
6001
|
+
accentHeight: number,
|
|
6002
|
+
accumulate: null,
|
|
6003
|
+
additive: null,
|
|
6004
|
+
alignmentBaseline: null,
|
|
6005
|
+
alphabetic: number,
|
|
6006
|
+
amplitude: number,
|
|
6007
|
+
arabicForm: null,
|
|
6008
|
+
ascent: number,
|
|
6009
|
+
attributeName: null,
|
|
6010
|
+
attributeType: null,
|
|
6011
|
+
azimuth: number,
|
|
6012
|
+
bandwidth: null,
|
|
6013
|
+
baselineShift: null,
|
|
6014
|
+
baseFrequency: null,
|
|
6015
|
+
baseProfile: null,
|
|
6016
|
+
bbox: null,
|
|
6017
|
+
begin: null,
|
|
6018
|
+
bias: number,
|
|
6019
|
+
by: null,
|
|
6020
|
+
calcMode: null,
|
|
6021
|
+
capHeight: number,
|
|
6022
|
+
className: spaceSeparated,
|
|
6023
|
+
clip: null,
|
|
6024
|
+
clipPath: null,
|
|
6025
|
+
clipPathUnits: null,
|
|
6026
|
+
clipRule: null,
|
|
6027
|
+
color: null,
|
|
6028
|
+
colorInterpolation: null,
|
|
6029
|
+
colorInterpolationFilters: null,
|
|
6030
|
+
colorProfile: null,
|
|
6031
|
+
colorRendering: null,
|
|
6032
|
+
content: null,
|
|
6033
|
+
contentScriptType: null,
|
|
6034
|
+
contentStyleType: null,
|
|
6035
|
+
crossOrigin: null,
|
|
6036
|
+
cursor: null,
|
|
6037
|
+
cx: null,
|
|
6038
|
+
cy: null,
|
|
6039
|
+
d: null,
|
|
6040
|
+
dataType: null,
|
|
6041
|
+
defaultAction: null,
|
|
6042
|
+
descent: number,
|
|
6043
|
+
diffuseConstant: number,
|
|
6044
|
+
direction: null,
|
|
6045
|
+
display: null,
|
|
6046
|
+
dur: null,
|
|
6047
|
+
divisor: number,
|
|
6048
|
+
dominantBaseline: null,
|
|
6049
|
+
download: boolean,
|
|
6050
|
+
dx: null,
|
|
6051
|
+
dy: null,
|
|
6052
|
+
edgeMode: null,
|
|
6053
|
+
editable: null,
|
|
6054
|
+
elevation: number,
|
|
6055
|
+
enableBackground: null,
|
|
6056
|
+
end: null,
|
|
6057
|
+
event: null,
|
|
6058
|
+
exponent: number,
|
|
6059
|
+
externalResourcesRequired: null,
|
|
6060
|
+
fill: null,
|
|
6061
|
+
fillOpacity: number,
|
|
6062
|
+
fillRule: null,
|
|
6063
|
+
filter: null,
|
|
6064
|
+
filterRes: null,
|
|
6065
|
+
filterUnits: null,
|
|
6066
|
+
floodColor: null,
|
|
6067
|
+
floodOpacity: null,
|
|
6068
|
+
focusable: null,
|
|
6069
|
+
focusHighlight: null,
|
|
6070
|
+
fontFamily: null,
|
|
6071
|
+
fontSize: null,
|
|
6072
|
+
fontSizeAdjust: null,
|
|
6073
|
+
fontStretch: null,
|
|
6074
|
+
fontStyle: null,
|
|
6075
|
+
fontVariant: null,
|
|
6076
|
+
fontWeight: null,
|
|
6077
|
+
format: null,
|
|
6078
|
+
fr: null,
|
|
6079
|
+
from: null,
|
|
6080
|
+
fx: null,
|
|
6081
|
+
fy: null,
|
|
6082
|
+
g1: commaSeparated,
|
|
6083
|
+
g2: commaSeparated,
|
|
6084
|
+
glyphName: commaSeparated,
|
|
6085
|
+
glyphOrientationHorizontal: null,
|
|
6086
|
+
glyphOrientationVertical: null,
|
|
6087
|
+
glyphRef: null,
|
|
6088
|
+
gradientTransform: null,
|
|
6089
|
+
gradientUnits: null,
|
|
6090
|
+
handler: null,
|
|
6091
|
+
hanging: number,
|
|
6092
|
+
hatchContentUnits: null,
|
|
6093
|
+
hatchUnits: null,
|
|
6094
|
+
height: null,
|
|
6095
|
+
href: null,
|
|
6096
|
+
hrefLang: null,
|
|
6097
|
+
horizAdvX: number,
|
|
6098
|
+
horizOriginX: number,
|
|
6099
|
+
horizOriginY: number,
|
|
6100
|
+
id: null,
|
|
6101
|
+
ideographic: number,
|
|
6102
|
+
imageRendering: null,
|
|
6103
|
+
initialVisibility: null,
|
|
6104
|
+
in: null,
|
|
6105
|
+
in2: null,
|
|
6106
|
+
intercept: number,
|
|
6107
|
+
k: number,
|
|
6108
|
+
k1: number,
|
|
6109
|
+
k2: number,
|
|
6110
|
+
k3: number,
|
|
6111
|
+
k4: number,
|
|
6112
|
+
kernelMatrix: commaOrSpaceSeparated,
|
|
6113
|
+
kernelUnitLength: null,
|
|
6114
|
+
keyPoints: null,
|
|
6115
|
+
// SEMI_COLON_SEPARATED
|
|
6116
|
+
keySplines: null,
|
|
6117
|
+
// SEMI_COLON_SEPARATED
|
|
6118
|
+
keyTimes: null,
|
|
6119
|
+
// SEMI_COLON_SEPARATED
|
|
6120
|
+
kerning: null,
|
|
6121
|
+
lang: null,
|
|
6122
|
+
lengthAdjust: null,
|
|
6123
|
+
letterSpacing: null,
|
|
6124
|
+
lightingColor: null,
|
|
6125
|
+
limitingConeAngle: number,
|
|
6126
|
+
local: null,
|
|
6127
|
+
markerEnd: null,
|
|
6128
|
+
markerMid: null,
|
|
6129
|
+
markerStart: null,
|
|
6130
|
+
markerHeight: null,
|
|
6131
|
+
markerUnits: null,
|
|
6132
|
+
markerWidth: null,
|
|
6133
|
+
mask: null,
|
|
6134
|
+
maskContentUnits: null,
|
|
6135
|
+
maskType: null,
|
|
6136
|
+
maskUnits: null,
|
|
6137
|
+
mathematical: null,
|
|
6138
|
+
max: null,
|
|
6139
|
+
media: null,
|
|
6140
|
+
mediaCharacterEncoding: null,
|
|
6141
|
+
mediaContentEncodings: null,
|
|
6142
|
+
mediaSize: number,
|
|
6143
|
+
mediaTime: null,
|
|
6144
|
+
method: null,
|
|
6145
|
+
min: null,
|
|
6146
|
+
mode: null,
|
|
6147
|
+
name: null,
|
|
6148
|
+
navDown: null,
|
|
6149
|
+
navDownLeft: null,
|
|
6150
|
+
navDownRight: null,
|
|
6151
|
+
navLeft: null,
|
|
6152
|
+
navNext: null,
|
|
6153
|
+
navPrev: null,
|
|
6154
|
+
navRight: null,
|
|
6155
|
+
navUp: null,
|
|
6156
|
+
navUpLeft: null,
|
|
6157
|
+
navUpRight: null,
|
|
6158
|
+
numOctaves: null,
|
|
6159
|
+
observer: null,
|
|
6160
|
+
offset: null,
|
|
6161
|
+
onAbort: null,
|
|
6162
|
+
onActivate: null,
|
|
6163
|
+
onAfterPrint: null,
|
|
6164
|
+
onBeforePrint: null,
|
|
6165
|
+
onBegin: null,
|
|
6166
|
+
onCancel: null,
|
|
6167
|
+
onCanPlay: null,
|
|
6168
|
+
onCanPlayThrough: null,
|
|
6169
|
+
onChange: null,
|
|
6170
|
+
onClick: null,
|
|
6171
|
+
onClose: null,
|
|
6172
|
+
onCopy: null,
|
|
6173
|
+
onCueChange: null,
|
|
6174
|
+
onCut: null,
|
|
6175
|
+
onDblClick: null,
|
|
6176
|
+
onDrag: null,
|
|
6177
|
+
onDragEnd: null,
|
|
6178
|
+
onDragEnter: null,
|
|
6179
|
+
onDragExit: null,
|
|
6180
|
+
onDragLeave: null,
|
|
6181
|
+
onDragOver: null,
|
|
6182
|
+
onDragStart: null,
|
|
6183
|
+
onDrop: null,
|
|
6184
|
+
onDurationChange: null,
|
|
6185
|
+
onEmptied: null,
|
|
6186
|
+
onEnd: null,
|
|
6187
|
+
onEnded: null,
|
|
6188
|
+
onError: null,
|
|
6189
|
+
onFocus: null,
|
|
6190
|
+
onFocusIn: null,
|
|
6191
|
+
onFocusOut: null,
|
|
6192
|
+
onHashChange: null,
|
|
6193
|
+
onInput: null,
|
|
6194
|
+
onInvalid: null,
|
|
6195
|
+
onKeyDown: null,
|
|
6196
|
+
onKeyPress: null,
|
|
6197
|
+
onKeyUp: null,
|
|
6198
|
+
onLoad: null,
|
|
6199
|
+
onLoadedData: null,
|
|
6200
|
+
onLoadedMetadata: null,
|
|
6201
|
+
onLoadStart: null,
|
|
6202
|
+
onMessage: null,
|
|
6203
|
+
onMouseDown: null,
|
|
6204
|
+
onMouseEnter: null,
|
|
6205
|
+
onMouseLeave: null,
|
|
6206
|
+
onMouseMove: null,
|
|
6207
|
+
onMouseOut: null,
|
|
6208
|
+
onMouseOver: null,
|
|
6209
|
+
onMouseUp: null,
|
|
6210
|
+
onMouseWheel: null,
|
|
6211
|
+
onOffline: null,
|
|
6212
|
+
onOnline: null,
|
|
6213
|
+
onPageHide: null,
|
|
6214
|
+
onPageShow: null,
|
|
6215
|
+
onPaste: null,
|
|
6216
|
+
onPause: null,
|
|
6217
|
+
onPlay: null,
|
|
6218
|
+
onPlaying: null,
|
|
6219
|
+
onPopState: null,
|
|
6220
|
+
onProgress: null,
|
|
6221
|
+
onRateChange: null,
|
|
6222
|
+
onRepeat: null,
|
|
6223
|
+
onReset: null,
|
|
6224
|
+
onResize: null,
|
|
6225
|
+
onScroll: null,
|
|
6226
|
+
onSeeked: null,
|
|
6227
|
+
onSeeking: null,
|
|
6228
|
+
onSelect: null,
|
|
6229
|
+
onShow: null,
|
|
6230
|
+
onStalled: null,
|
|
6231
|
+
onStorage: null,
|
|
6232
|
+
onSubmit: null,
|
|
6233
|
+
onSuspend: null,
|
|
6234
|
+
onTimeUpdate: null,
|
|
6235
|
+
onToggle: null,
|
|
6236
|
+
onUnload: null,
|
|
6237
|
+
onVolumeChange: null,
|
|
6238
|
+
onWaiting: null,
|
|
6239
|
+
onZoom: null,
|
|
6240
|
+
opacity: null,
|
|
6241
|
+
operator: null,
|
|
6242
|
+
order: null,
|
|
6243
|
+
orient: null,
|
|
6244
|
+
orientation: null,
|
|
6245
|
+
origin: null,
|
|
6246
|
+
overflow: null,
|
|
6247
|
+
overlay: null,
|
|
6248
|
+
overlinePosition: number,
|
|
6249
|
+
overlineThickness: number,
|
|
6250
|
+
paintOrder: null,
|
|
6251
|
+
panose1: null,
|
|
6252
|
+
path: null,
|
|
6253
|
+
pathLength: number,
|
|
6254
|
+
patternContentUnits: null,
|
|
6255
|
+
patternTransform: null,
|
|
6256
|
+
patternUnits: null,
|
|
6257
|
+
phase: null,
|
|
6258
|
+
ping: spaceSeparated,
|
|
6259
|
+
pitch: null,
|
|
6260
|
+
playbackOrder: null,
|
|
6261
|
+
pointerEvents: null,
|
|
6262
|
+
points: null,
|
|
6263
|
+
pointsAtX: number,
|
|
6264
|
+
pointsAtY: number,
|
|
6265
|
+
pointsAtZ: number,
|
|
6266
|
+
preserveAlpha: null,
|
|
6267
|
+
preserveAspectRatio: null,
|
|
6268
|
+
primitiveUnits: null,
|
|
6269
|
+
propagate: null,
|
|
6270
|
+
property: commaOrSpaceSeparated,
|
|
6271
|
+
r: null,
|
|
6272
|
+
radius: null,
|
|
6273
|
+
referrerPolicy: null,
|
|
6274
|
+
refX: null,
|
|
6275
|
+
refY: null,
|
|
6276
|
+
rel: commaOrSpaceSeparated,
|
|
6277
|
+
rev: commaOrSpaceSeparated,
|
|
6278
|
+
renderingIntent: null,
|
|
6279
|
+
repeatCount: null,
|
|
6280
|
+
repeatDur: null,
|
|
6281
|
+
requiredExtensions: commaOrSpaceSeparated,
|
|
6282
|
+
requiredFeatures: commaOrSpaceSeparated,
|
|
6283
|
+
requiredFonts: commaOrSpaceSeparated,
|
|
6284
|
+
requiredFormats: commaOrSpaceSeparated,
|
|
6285
|
+
resource: null,
|
|
6286
|
+
restart: null,
|
|
6287
|
+
result: null,
|
|
6288
|
+
rotate: null,
|
|
6289
|
+
rx: null,
|
|
6290
|
+
ry: null,
|
|
6291
|
+
scale: null,
|
|
6292
|
+
seed: null,
|
|
6293
|
+
shapeRendering: null,
|
|
6294
|
+
side: null,
|
|
6295
|
+
slope: null,
|
|
6296
|
+
snapshotTime: null,
|
|
6297
|
+
specularConstant: number,
|
|
6298
|
+
specularExponent: number,
|
|
6299
|
+
spreadMethod: null,
|
|
6300
|
+
spacing: null,
|
|
6301
|
+
startOffset: null,
|
|
6302
|
+
stdDeviation: null,
|
|
6303
|
+
stemh: null,
|
|
6304
|
+
stemv: null,
|
|
6305
|
+
stitchTiles: null,
|
|
6306
|
+
stopColor: null,
|
|
6307
|
+
stopOpacity: null,
|
|
6308
|
+
strikethroughPosition: number,
|
|
6309
|
+
strikethroughThickness: number,
|
|
6310
|
+
string: null,
|
|
6311
|
+
stroke: null,
|
|
6312
|
+
strokeDashArray: commaOrSpaceSeparated,
|
|
6313
|
+
strokeDashOffset: null,
|
|
6314
|
+
strokeLineCap: null,
|
|
6315
|
+
strokeLineJoin: null,
|
|
6316
|
+
strokeMiterLimit: number,
|
|
6317
|
+
strokeOpacity: number,
|
|
6318
|
+
strokeWidth: null,
|
|
6319
|
+
style: null,
|
|
6320
|
+
surfaceScale: number,
|
|
6321
|
+
syncBehavior: null,
|
|
6322
|
+
syncBehaviorDefault: null,
|
|
6323
|
+
syncMaster: null,
|
|
6324
|
+
syncTolerance: null,
|
|
6325
|
+
syncToleranceDefault: null,
|
|
6326
|
+
systemLanguage: commaOrSpaceSeparated,
|
|
6327
|
+
tabIndex: number,
|
|
6328
|
+
tableValues: null,
|
|
6329
|
+
target: null,
|
|
6330
|
+
targetX: number,
|
|
6331
|
+
targetY: number,
|
|
6332
|
+
textAnchor: null,
|
|
6333
|
+
textDecoration: null,
|
|
6334
|
+
textRendering: null,
|
|
6335
|
+
textLength: null,
|
|
6336
|
+
timelineBegin: null,
|
|
6337
|
+
title: null,
|
|
6338
|
+
transformBehavior: null,
|
|
6339
|
+
type: null,
|
|
6340
|
+
typeOf: commaOrSpaceSeparated,
|
|
6341
|
+
to: null,
|
|
6342
|
+
transform: null,
|
|
6343
|
+
transformOrigin: null,
|
|
6344
|
+
u1: null,
|
|
6345
|
+
u2: null,
|
|
6346
|
+
underlinePosition: number,
|
|
6347
|
+
underlineThickness: number,
|
|
6348
|
+
unicode: null,
|
|
6349
|
+
unicodeBidi: null,
|
|
6350
|
+
unicodeRange: null,
|
|
6351
|
+
unitsPerEm: number,
|
|
6352
|
+
values: null,
|
|
6353
|
+
vAlphabetic: number,
|
|
6354
|
+
vMathematical: number,
|
|
6355
|
+
vectorEffect: null,
|
|
6356
|
+
vHanging: number,
|
|
6357
|
+
vIdeographic: number,
|
|
6358
|
+
version: null,
|
|
6359
|
+
vertAdvY: number,
|
|
6360
|
+
vertOriginX: number,
|
|
6361
|
+
vertOriginY: number,
|
|
6362
|
+
viewBox: null,
|
|
6363
|
+
viewTarget: null,
|
|
6364
|
+
visibility: null,
|
|
6365
|
+
width: null,
|
|
6366
|
+
widths: null,
|
|
6367
|
+
wordSpacing: null,
|
|
6368
|
+
writingMode: null,
|
|
6369
|
+
x: null,
|
|
6370
|
+
x1: null,
|
|
6371
|
+
x2: null,
|
|
6372
|
+
xChannelSelector: null,
|
|
6373
|
+
xHeight: number,
|
|
6374
|
+
y: null,
|
|
6375
|
+
y1: null,
|
|
6376
|
+
y2: null,
|
|
6377
|
+
yChannelSelector: null,
|
|
6378
|
+
z: null,
|
|
6379
|
+
zoomAndPan: null
|
|
6380
|
+
},
|
|
6381
|
+
space: "svg",
|
|
6382
|
+
transform: caseSensitiveTransform
|
|
6383
|
+
});
|
|
6384
|
+
var xlink = create2({
|
|
6385
|
+
properties: {
|
|
6386
|
+
xLinkActuate: null,
|
|
6387
|
+
xLinkArcRole: null,
|
|
6388
|
+
xLinkHref: null,
|
|
6389
|
+
xLinkRole: null,
|
|
6390
|
+
xLinkShow: null,
|
|
6391
|
+
xLinkTitle: null,
|
|
6392
|
+
xLinkType: null
|
|
6393
|
+
},
|
|
6394
|
+
space: "xlink",
|
|
6395
|
+
transform(_, property) {
|
|
6396
|
+
return "xlink:" + property.slice(5).toLowerCase();
|
|
6397
|
+
}
|
|
6398
|
+
});
|
|
6399
|
+
var xmlns = create2({
|
|
6400
|
+
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
6401
|
+
properties: { xmlnsXLink: null, xmlns: null },
|
|
6402
|
+
space: "xmlns",
|
|
6403
|
+
transform: caseInsensitiveTransform
|
|
6404
|
+
});
|
|
6405
|
+
var xml = create2({
|
|
6406
|
+
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
6407
|
+
space: "xml",
|
|
6408
|
+
transform(_, property) {
|
|
6409
|
+
return "xml:" + property.slice(3).toLowerCase();
|
|
6410
|
+
}
|
|
6411
|
+
});
|
|
6412
|
+
merge([aria, html2, xlink, xmlns, xml], "html");
|
|
6413
|
+
merge([aria, svg, xlink, xmlns, xml], "svg");
|
|
6414
|
+
__toESM(require_cjs3());
|
|
6415
|
+
function stringifyPosition(value) {
|
|
6416
|
+
if (!value || typeof value !== "object") {
|
|
6417
|
+
return "";
|
|
6418
|
+
}
|
|
6419
|
+
if ("position" in value || "type" in value) {
|
|
6420
|
+
return position2(value.position);
|
|
6421
|
+
}
|
|
6422
|
+
if ("start" in value || "end" in value) {
|
|
6423
|
+
return position2(value);
|
|
6383
6424
|
}
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
return check2;
|
|
6387
|
-
function check2(value, index2, parent) {
|
|
6388
|
-
return Boolean(
|
|
6389
|
-
looksLikeAnElement(value) && testFunction.call(
|
|
6390
|
-
this,
|
|
6391
|
-
value,
|
|
6392
|
-
typeof index2 === "number" ? index2 : void 0,
|
|
6393
|
-
parent || void 0
|
|
6394
|
-
)
|
|
6395
|
-
);
|
|
6425
|
+
if ("line" in value || "column" in value) {
|
|
6426
|
+
return point2(value);
|
|
6396
6427
|
}
|
|
6428
|
+
return "";
|
|
6397
6429
|
}
|
|
6398
|
-
function
|
|
6399
|
-
return
|
|
6400
|
-
element2 && typeof element2 === "object" && "type" in element2 && element2.type === "element" && "tagName" in element2 && typeof element2.tagName === "string"
|
|
6401
|
-
);
|
|
6430
|
+
function point2(point3) {
|
|
6431
|
+
return index(point3 && point3.line) + ":" + index(point3 && point3.column);
|
|
6402
6432
|
}
|
|
6403
|
-
function
|
|
6404
|
-
return
|
|
6433
|
+
function position2(pos) {
|
|
6434
|
+
return point2(pos && pos.start) + "-" + point2(pos && pos.end);
|
|
6405
6435
|
}
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6436
|
+
function index(value) {
|
|
6437
|
+
return value && typeof value === "number" ? value : 1;
|
|
6438
|
+
}
|
|
6439
|
+
var VFileMessage = class extends Error {
|
|
6440
|
+
/**
|
|
6441
|
+
* Create a message for `reason`.
|
|
6442
|
+
*
|
|
6443
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
6444
|
+
*
|
|
6445
|
+
* @overload
|
|
6446
|
+
* @param {string} reason
|
|
6447
|
+
* @param {Options | null | undefined} [options]
|
|
6448
|
+
* @returns
|
|
6449
|
+
*
|
|
6450
|
+
* @overload
|
|
6451
|
+
* @param {string} reason
|
|
6452
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
6453
|
+
* @param {string | null | undefined} [origin]
|
|
6454
|
+
* @returns
|
|
6455
|
+
*
|
|
6456
|
+
* @overload
|
|
6457
|
+
* @param {string} reason
|
|
6458
|
+
* @param {Point | Position | null | undefined} place
|
|
6459
|
+
* @param {string | null | undefined} [origin]
|
|
6460
|
+
* @returns
|
|
6461
|
+
*
|
|
6462
|
+
* @overload
|
|
6463
|
+
* @param {string} reason
|
|
6464
|
+
* @param {string | null | undefined} [origin]
|
|
6465
|
+
* @returns
|
|
6466
|
+
*
|
|
6467
|
+
* @overload
|
|
6468
|
+
* @param {Error | VFileMessage} cause
|
|
6469
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
6470
|
+
* @param {string | null | undefined} [origin]
|
|
6471
|
+
* @returns
|
|
6472
|
+
*
|
|
6473
|
+
* @overload
|
|
6474
|
+
* @param {Error | VFileMessage} cause
|
|
6475
|
+
* @param {Point | Position | null | undefined} place
|
|
6476
|
+
* @param {string | null | undefined} [origin]
|
|
6477
|
+
* @returns
|
|
6478
|
+
*
|
|
6479
|
+
* @overload
|
|
6480
|
+
* @param {Error | VFileMessage} cause
|
|
6481
|
+
* @param {string | null | undefined} [origin]
|
|
6482
|
+
* @returns
|
|
6483
|
+
*
|
|
6484
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
6485
|
+
* Reason for message, should use markdown.
|
|
6486
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
6487
|
+
* Configuration (optional).
|
|
6488
|
+
* @param {string | null | undefined} [origin]
|
|
6489
|
+
* Place in code where the message originates (example:
|
|
6490
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
6491
|
+
* @returns
|
|
6492
|
+
* Instance of `VFileMessage`.
|
|
6493
|
+
*/
|
|
6494
|
+
// eslint-disable-next-line complexity
|
|
6495
|
+
constructor(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
6496
|
+
super();
|
|
6497
|
+
if (typeof optionsOrParentOrPlace === "string") {
|
|
6498
|
+
origin = optionsOrParentOrPlace;
|
|
6499
|
+
optionsOrParentOrPlace = void 0;
|
|
6432
6500
|
}
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6501
|
+
let reason = "";
|
|
6502
|
+
let options = {};
|
|
6503
|
+
let legacyCause = false;
|
|
6504
|
+
if (optionsOrParentOrPlace) {
|
|
6505
|
+
if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
|
|
6506
|
+
options = { place: optionsOrParentOrPlace };
|
|
6507
|
+
} else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
|
|
6508
|
+
options = { place: optionsOrParentOrPlace };
|
|
6509
|
+
} else if ("type" in optionsOrParentOrPlace) {
|
|
6510
|
+
options = {
|
|
6511
|
+
ancestors: [optionsOrParentOrPlace],
|
|
6512
|
+
place: optionsOrParentOrPlace.position
|
|
6513
|
+
};
|
|
6514
|
+
} else {
|
|
6515
|
+
options = { ...optionsOrParentOrPlace };
|
|
6439
6516
|
}
|
|
6440
|
-
}
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
const grouping = toNode(group, node2);
|
|
6456
|
-
if (grouping && !Array.isArray(grouping) && grouping.type === "element") {
|
|
6457
|
-
grouping.children = nodes;
|
|
6458
|
-
nodes = [grouping];
|
|
6517
|
+
}
|
|
6518
|
+
if (typeof causeOrReason === "string") {
|
|
6519
|
+
reason = causeOrReason;
|
|
6520
|
+
} else if (!options.cause && causeOrReason) {
|
|
6521
|
+
legacyCause = true;
|
|
6522
|
+
reason = causeOrReason.message;
|
|
6523
|
+
options.cause = causeOrReason;
|
|
6524
|
+
}
|
|
6525
|
+
if (!options.ruleId && !options.source && typeof origin === "string") {
|
|
6526
|
+
const index2 = origin.indexOf(":");
|
|
6527
|
+
if (index2 === -1) {
|
|
6528
|
+
options.ruleId = origin;
|
|
6529
|
+
} else {
|
|
6530
|
+
options.source = origin.slice(0, index2);
|
|
6531
|
+
options.ruleId = origin.slice(index2 + 1);
|
|
6459
6532
|
}
|
|
6460
6533
|
}
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
let after = [];
|
|
6467
|
-
if (typeof content === "function") {
|
|
6468
|
-
before = [];
|
|
6469
|
-
after = content(node2);
|
|
6470
|
-
} else if (content) {
|
|
6471
|
-
after = clone(content);
|
|
6534
|
+
if (!options.place && options.ancestors && options.ancestors) {
|
|
6535
|
+
const parent = options.ancestors[options.ancestors.length - 1];
|
|
6536
|
+
if (parent) {
|
|
6537
|
+
options.place = parent.position;
|
|
6538
|
+
}
|
|
6472
6539
|
}
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6540
|
+
const start2 = options.place && "start" in options.place ? options.place.start : options.place;
|
|
6541
|
+
this.ancestors = options.ancestors || void 0;
|
|
6542
|
+
this.cause = options.cause || void 0;
|
|
6543
|
+
this.column = start2 ? start2.column : void 0;
|
|
6544
|
+
this.fatal = void 0;
|
|
6545
|
+
this.file = "";
|
|
6546
|
+
this.message = reason;
|
|
6547
|
+
this.line = start2 ? start2.line : void 0;
|
|
6548
|
+
this.name = stringifyPosition(options.place) || "1:1";
|
|
6549
|
+
this.place = options.place || void 0;
|
|
6550
|
+
this.reason = this.message;
|
|
6551
|
+
this.ruleId = options.ruleId || void 0;
|
|
6552
|
+
this.source = options.source || void 0;
|
|
6553
|
+
this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
|
|
6554
|
+
this.actual = void 0;
|
|
6555
|
+
this.expected = void 0;
|
|
6556
|
+
this.note = void 0;
|
|
6557
|
+
this.url = void 0;
|
|
6558
|
+
}
|
|
6559
|
+
};
|
|
6560
|
+
VFileMessage.prototype.file = "";
|
|
6561
|
+
VFileMessage.prototype.name = "";
|
|
6562
|
+
VFileMessage.prototype.reason = "";
|
|
6563
|
+
VFileMessage.prototype.message = "";
|
|
6564
|
+
VFileMessage.prototype.stack = "";
|
|
6565
|
+
VFileMessage.prototype.column = void 0;
|
|
6566
|
+
VFileMessage.prototype.line = void 0;
|
|
6567
|
+
VFileMessage.prototype.ancestors = void 0;
|
|
6568
|
+
VFileMessage.prototype.cause = void 0;
|
|
6569
|
+
VFileMessage.prototype.fatal = void 0;
|
|
6570
|
+
VFileMessage.prototype.place = void 0;
|
|
6571
|
+
VFileMessage.prototype.ruleId = void 0;
|
|
6572
|
+
VFileMessage.prototype.source = void 0;
|
|
6573
|
+
|
|
6574
|
+
// src/headingIds.ts
|
|
6575
|
+
var REWRITES_PROPERTY = "dataQuartzHeadingRewrites";
|
|
6576
|
+
var originalText = /* @__PURE__ */ new WeakMap();
|
|
6577
|
+
function eachMdastHeading(tree, fn) {
|
|
6578
|
+
if (tree.type === "heading") {
|
|
6579
|
+
fn(tree);
|
|
6580
|
+
return;
|
|
6481
6581
|
}
|
|
6582
|
+
if ("children" in tree) for (const child of tree.children) eachMdastHeading(child, fn);
|
|
6482
6583
|
}
|
|
6483
|
-
function
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
esm_default(thing)
|
|
6487
|
-
);
|
|
6584
|
+
function eachMdastText(node2, fn) {
|
|
6585
|
+
if (node2.type === "text") fn(node2);
|
|
6586
|
+
if ("children" in node2) for (const child of node2.children) eachMdastText(child, fn);
|
|
6488
6587
|
}
|
|
6489
|
-
function
|
|
6490
|
-
return {
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6588
|
+
function remarkRememberHeadingText() {
|
|
6589
|
+
return (tree) => {
|
|
6590
|
+
eachMdastHeading(
|
|
6591
|
+
tree,
|
|
6592
|
+
(heading2) => eachMdastText(heading2, (text3) => originalText.set(text3, text3.value))
|
|
6593
|
+
);
|
|
6495
6594
|
};
|
|
6496
6595
|
}
|
|
6497
|
-
function
|
|
6498
|
-
|
|
6499
|
-
|
|
6596
|
+
function remarkRecordHeadingRewrites() {
|
|
6597
|
+
return (tree) => {
|
|
6598
|
+
eachMdastHeading(tree, (heading2) => {
|
|
6599
|
+
const rewrites = [];
|
|
6600
|
+
eachMdastText(heading2, (text3) => {
|
|
6601
|
+
const original = originalText.get(text3);
|
|
6602
|
+
if (original !== void 0 && original !== text3.value)
|
|
6603
|
+
rewrites.push([text3.value, original]);
|
|
6604
|
+
});
|
|
6605
|
+
if (rewrites.length === 0) return;
|
|
6606
|
+
heading2.data ??= {};
|
|
6607
|
+
heading2.data.hProperties = {
|
|
6608
|
+
...heading2.data.hProperties,
|
|
6609
|
+
[REWRITES_PROPERTY]: JSON.stringify(rewrites)
|
|
6610
|
+
};
|
|
6611
|
+
});
|
|
6612
|
+
};
|
|
6500
6613
|
}
|
|
6501
|
-
function
|
|
6502
|
-
if (
|
|
6503
|
-
|
|
6614
|
+
function eachElement(node2, fn) {
|
|
6615
|
+
if (node2.type === "element") fn(node2);
|
|
6616
|
+
if ("children" in node2) for (const child of node2.children) eachElement(child, fn);
|
|
6617
|
+
}
|
|
6618
|
+
var isHeading = (el) => /^h[1-6]$/.test(el.tagName);
|
|
6619
|
+
function takeRewrites(el) {
|
|
6620
|
+
const raw = el.properties[REWRITES_PROPERTY];
|
|
6621
|
+
delete el.properties[REWRITES_PROPERTY];
|
|
6622
|
+
if (typeof raw !== "string") return [];
|
|
6623
|
+
try {
|
|
6624
|
+
return JSON.parse(raw);
|
|
6625
|
+
} catch {
|
|
6626
|
+
return [];
|
|
6627
|
+
}
|
|
6628
|
+
}
|
|
6629
|
+
function headingText(el, rewrites = []) {
|
|
6630
|
+
const pending = [...rewrites];
|
|
6631
|
+
let text3 = "";
|
|
6632
|
+
const walk = (node2) => {
|
|
6633
|
+
if (node2.type === "text") {
|
|
6634
|
+
const i = pending.findIndex(([rewritten]) => rewritten === node2.value);
|
|
6635
|
+
if (i === -1) {
|
|
6636
|
+
text3 += node2.value;
|
|
6637
|
+
} else {
|
|
6638
|
+
text3 += pending[i][1];
|
|
6639
|
+
pending.splice(i, 1);
|
|
6640
|
+
}
|
|
6641
|
+
} else if ("children" in node2) {
|
|
6642
|
+
for (const child of node2.children) walk(child);
|
|
6643
|
+
}
|
|
6644
|
+
};
|
|
6645
|
+
walk(el);
|
|
6646
|
+
return text3;
|
|
6504
6647
|
}
|
|
6505
|
-
function
|
|
6506
|
-
|
|
6507
|
-
|
|
6648
|
+
function rehypeHeadingIds() {
|
|
6649
|
+
return (tree) => {
|
|
6650
|
+
const slugger = new HeadingSlugger();
|
|
6651
|
+
const slugged = [];
|
|
6652
|
+
eachElement(tree, (el) => {
|
|
6653
|
+
if (!isHeading(el)) return;
|
|
6654
|
+
const rewrites = takeRewrites(el);
|
|
6655
|
+
if (el.properties.id) return;
|
|
6656
|
+
const text3 = headingText(el, rewrites);
|
|
6657
|
+
el.properties.id = slugger.slug(text3);
|
|
6658
|
+
slugged.push({ el, text: text3 });
|
|
6659
|
+
});
|
|
6660
|
+
const ids = /* @__PURE__ */ new Set();
|
|
6661
|
+
eachElement(tree, (el) => {
|
|
6662
|
+
const id = el.properties.id;
|
|
6663
|
+
if (typeof id === "string" && id !== "") ids.add(id);
|
|
6664
|
+
});
|
|
6665
|
+
for (const { el, text: text3 } of slugged) {
|
|
6666
|
+
const alias = slugHeading(obsidianHeadingAnchor(text3));
|
|
6667
|
+
if (alias === "" || ids.has(alias)) continue;
|
|
6668
|
+
ids.add(alias);
|
|
6669
|
+
el.children.unshift({
|
|
6670
|
+
type: "element",
|
|
6671
|
+
tagName: "span",
|
|
6672
|
+
properties: { id: alias, className: ["heading-alias"] },
|
|
6673
|
+
children: []
|
|
6674
|
+
});
|
|
6675
|
+
}
|
|
6676
|
+
eachElement(tree, (el) => {
|
|
6677
|
+
const href = el.properties.href;
|
|
6678
|
+
if (el.tagName === "a" && typeof href === "string" && href.startsWith("#")) {
|
|
6679
|
+
el.properties.href = resolveAnchorHref(href, ids);
|
|
6680
|
+
}
|
|
6681
|
+
});
|
|
6682
|
+
};
|
|
6508
6683
|
}
|
|
6509
6684
|
|
|
6510
6685
|
// src/transformer.ts
|
|
@@ -6517,12 +6692,13 @@ var GitHubFlavoredMarkdown = (userOpts) => {
|
|
|
6517
6692
|
return {
|
|
6518
6693
|
name: "GitHubFlavoredMarkdown",
|
|
6519
6694
|
markdownPlugins() {
|
|
6520
|
-
|
|
6695
|
+
if (!opts.enableSmartyPants) return [remarkGfm];
|
|
6696
|
+
return opts.linkHeadings ? [remarkGfm, remarkRememberHeadingText, plugin_default, remarkRecordHeadingRewrites] : [remarkGfm, plugin_default];
|
|
6521
6697
|
},
|
|
6522
6698
|
htmlPlugins() {
|
|
6523
6699
|
if (opts.linkHeadings) {
|
|
6524
6700
|
return [
|
|
6525
|
-
|
|
6701
|
+
rehypeHeadingIds,
|
|
6526
6702
|
[
|
|
6527
6703
|
rehypeAutolinkHeadings,
|
|
6528
6704
|
{
|