securemark 0.263.0 → 0.263.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 +4 -0
- package/dist/index.js +630 -653
- package/index.ts +0 -1
- package/package.json +9 -9
- package/src/combinator/control/constraint/block.ts +1 -2
- package/src/combinator/control/constraint/contract.ts +3 -3
- package/src/combinator/control/constraint/line.ts +1 -2
- package/src/combinator/control/manipulation/indent.ts +0 -1
- package/src/combinator/control/manipulation/match.ts +1 -2
- package/src/combinator/control/manipulation/scope.ts +3 -4
- package/src/combinator/control/manipulation/surround.ts +1 -2
- package/src/combinator/control/monad/bind.ts +2 -3
- package/src/combinator/data/parser/context.ts +0 -1
- package/src/combinator/data/parser/inits.ts +1 -2
- package/src/combinator/data/parser/sequence.ts +1 -2
- package/src/combinator/data/parser/some.ts +1 -2
- package/src/combinator/data/parser/union.ts +4 -12
- package/src/parser/api/bind.ts +0 -1
- package/src/parser/api/parse.ts +0 -1
- package/src/parser/block/codeblock.ts +0 -1
- package/src/parser/block/extension/figure.ts +0 -1
- package/src/parser/block/extension/table.ts +0 -1
- package/src/parser/block/mathblock.ts +0 -1
- package/src/parser/block/olist.ts +0 -1
- package/src/parser/block.ts +0 -1
- package/src/parser/inline/annotation.ts +0 -1
- package/src/parser/inline/bracket.ts +0 -1
- package/src/parser/inline/extension/index.ts +0 -1
- package/src/parser/inline/extension/indexee.ts +0 -1
- package/src/parser/inline/extension/label.ts +0 -1
- package/src/parser/inline/html.ts +0 -1
- package/src/parser/inline/htmlentity.ts +0 -1
- package/src/parser/inline/link.ts +0 -1
- package/src/parser/inline/media.ts +0 -1
- package/src/parser/inline/reference.ts +0 -1
- package/src/parser/inline/ruby.ts +0 -1
- package/src/parser/inline/template.ts +0 -1
- package/src/parser/processor/figure.ts +0 -1
- package/src/parser/processor/footnote.ts +0 -1
- package/src/parser/segment.ts +0 -1
- package/src/parser/source/line.ts +0 -1
- package/src/parser/source/str.ts +0 -1
- package/src/parser/source/text.ts +0 -1
- package/src/parser/visibility.ts +0 -1
- package/src/renderer/render/math.ts +0 -1
- package/src/renderer/render/media/image.ts +0 -1
- package/src/renderer/render/media/twitter.ts +0 -1
- package/src/renderer/render/media/video.ts +0 -1
- package/src/renderer/render/media/youtube.ts +0 -1
- package/src/renderer/render.ts +0 -1
- package/src/util/quote.ts +0 -1
- package/src/util/scope.ts +0 -2
- package/src/util/toc.ts +0 -1
- package/webpack.config.js +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! securemark v0.263.
|
|
1
|
+
/*! securemark v0.263.1 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED License */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
|
-
module.exports = factory(require("
|
|
4
|
+
module.exports = factory(require("Prism"), require("DOMPurify"));
|
|
5
5
|
else if(typeof define === 'function' && define.amd)
|
|
6
|
-
define(["
|
|
6
|
+
define(["Prism", "DOMPurify"], factory);
|
|
7
7
|
else if(typeof exports === 'object')
|
|
8
|
-
exports["securemark"] = factory(require("
|
|
8
|
+
exports["securemark"] = factory(require("Prism"), require("DOMPurify"));
|
|
9
9
|
else
|
|
10
|
-
root["securemark"] = factory(root["
|
|
11
|
-
})(this, (
|
|
10
|
+
root["securemark"] = factory(root["Prism"], root["DOMPurify"]);
|
|
11
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__9450__, __WEBPACK_EXTERNAL_MODULE__6231__) => {
|
|
12
12
|
return /******/ (() => { // webpackBootstrap
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
@@ -45,8 +45,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
45
45
|
value: true
|
|
46
46
|
}));
|
|
47
47
|
|
|
48
|
-
__webpack_require__(4128);
|
|
49
|
-
|
|
50
48
|
__exportStar(__webpack_require__(3019), exports);
|
|
51
49
|
|
|
52
50
|
__exportStar(__webpack_require__(4613), exports);
|
|
@@ -64,8 +62,8 @@ __exportStar(__webpack_require__(256), exports);
|
|
|
64
62
|
Object.defineProperty(exports, "__esModule", ({
|
|
65
63
|
value: true
|
|
66
64
|
}));
|
|
67
|
-
exports.ObjectSetPrototypeOf = exports.ObjectGetPrototypeOf = exports.ObjectCreate = exports.ObjectAssign = exports.toString = exports.isEnumerable = exports.isPrototypeOf = exports.hasOwnProperty = exports.isArray = exports.sqrt = exports.log = exports.tan = exports.cos = exports.sign = exports.round = exports.random = exports.min = exports.max = exports.floor = exports.ceil = exports.abs = exports.parseInt = exports.parseFloat = exports.isSafeInteger = exports.isNaN = exports.isInteger = exports.isFinite = exports
|
|
68
|
-
exports
|
|
65
|
+
exports.ObjectSetPrototypeOf = exports.ObjectGetPrototypeOf = exports.ObjectCreate = exports.ObjectAssign = exports.toString = exports.isEnumerable = exports.isPrototypeOf = exports.hasOwnProperty = exports.isArray = exports.sqrt = exports.log = exports.tan = exports.cos = exports.sign = exports.round = exports.random = exports.min = exports.max = exports.floor = exports.ceil = exports.abs = exports.parseInt = exports.parseFloat = exports.isSafeInteger = exports.isNaN = exports.isInteger = exports.isFinite = exports.MIN_VALUE = exports.MIN_SAFE_INTEGER = exports.MAX_VALUE = exports.MAX_SAFE_INTEGER = void 0;
|
|
66
|
+
exports.MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER, exports.MAX_VALUE = Number.MAX_VALUE, exports.MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER, exports.MIN_VALUE = Number.MIN_VALUE, exports.isFinite = Number.isFinite, exports.isInteger = Number.isInteger, exports.isNaN = Number.isNaN, exports.isSafeInteger = Number.isSafeInteger, exports.parseFloat = Number.parseFloat, exports.parseInt = Number.parseInt;
|
|
69
67
|
exports.abs = Math.abs, exports.ceil = Math.ceil, exports.floor = Math.floor, exports.max = Math.max, exports.min = Math.min, exports.random = Math.random, exports.round = Math.round, exports.sign = Math.sign, exports.cos = Math.cos, exports.tan = Math.tan, exports.log = Math.log, exports.sqrt = Math.sqrt;
|
|
70
68
|
exports.isArray = Array.isArray;
|
|
71
69
|
exports.hasOwnProperty = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);
|
|
@@ -80,7 +78,7 @@ exports.ObjectSetPrototypeOf = Object.setPrototypeOf;
|
|
|
80
78
|
/***/ }),
|
|
81
79
|
|
|
82
80
|
/***/ 8112:
|
|
83
|
-
/***/ ((__unused_webpack_module, exports
|
|
81
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
84
82
|
|
|
85
83
|
"use strict";
|
|
86
84
|
|
|
@@ -90,10 +88,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
90
88
|
}));
|
|
91
89
|
exports.splice = exports.pop = exports.push = exports.shift = exports.unshift = exports.indexOf = void 0;
|
|
92
90
|
|
|
93
|
-
const global_1 = __webpack_require__(4128);
|
|
94
|
-
|
|
95
|
-
const undefined = void 0;
|
|
96
|
-
|
|
97
91
|
function indexOf(as, a) {
|
|
98
92
|
if (as.length === 0) return -1;
|
|
99
93
|
return a === a ? as.indexOf(a) : as.findIndex(a => a !== a);
|
|
@@ -104,7 +98,7 @@ exports.indexOf = indexOf;
|
|
|
104
98
|
function unshift(as, bs) {
|
|
105
99
|
if ('length' in as) {
|
|
106
100
|
if (as.length === 1) return bs.unshift(as[0]), bs;
|
|
107
|
-
if (
|
|
101
|
+
if (Symbol.iterator in as) return bs.unshift(...as), bs;
|
|
108
102
|
|
|
109
103
|
for (let i = as.length; i--;) {
|
|
110
104
|
bs.unshift(as[i]);
|
|
@@ -128,7 +122,7 @@ exports.shift = shift;
|
|
|
128
122
|
function push(as, bs) {
|
|
129
123
|
if ('length' in bs) {
|
|
130
124
|
if (bs.length === 1) return as.push(bs[0]), as;
|
|
131
|
-
if (
|
|
125
|
+
if (Symbol.iterator in bs && bs.length > 50) return as.push(...bs), as;
|
|
132
126
|
|
|
133
127
|
for (let len = bs.length, i = 0; i < len; ++i) {
|
|
134
128
|
as.push(bs[i]);
|
|
@@ -165,15 +159,16 @@ function splice(as, index, count, ...values) {
|
|
|
165
159
|
if (count === 1 && values.length === 1) return [[as[index], as[index] = values[0]][0]];
|
|
166
160
|
|
|
167
161
|
switch (index) {
|
|
162
|
+
case as.length - 1:
|
|
163
|
+
if (as.length === 0) return push(as, values), [];
|
|
164
|
+
if (count >= 1) return [[as.pop()], push(as, values)][0];
|
|
165
|
+
break;
|
|
166
|
+
|
|
168
167
|
case 0:
|
|
169
168
|
if (count === 0) return unshift(values, as), [];
|
|
170
169
|
if (count === 1) return [[as.shift()], unshift(values, as)][0];
|
|
171
170
|
break;
|
|
172
171
|
|
|
173
|
-
case as.length - 1:
|
|
174
|
-
if (count === 1) return [[as.pop()], push(as, values)][0];
|
|
175
|
-
break;
|
|
176
|
-
|
|
177
172
|
case as.length:
|
|
178
173
|
return push(as, values), [];
|
|
179
174
|
}
|
|
@@ -217,8 +212,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
217
212
|
}));
|
|
218
213
|
exports.template = exports.inherit = exports.merge = exports.extend = exports.overwrite = exports.clone = exports.assign = void 0;
|
|
219
214
|
|
|
220
|
-
const global_1 = __webpack_require__(4128);
|
|
221
|
-
|
|
222
215
|
const alias_1 = __webpack_require__(5406);
|
|
223
216
|
|
|
224
217
|
const type_1 = __webpack_require__(5177);
|
|
@@ -342,7 +335,7 @@ function template(strategy) {
|
|
|
342
335
|
const source = sources[i];
|
|
343
336
|
if (source === target) continue;
|
|
344
337
|
if ((0, type_1.isPrimitive)(source)) continue;
|
|
345
|
-
const keys =
|
|
338
|
+
const keys = Object.keys(source);
|
|
346
339
|
|
|
347
340
|
for (let i = 0; i < keys.length; ++i) {
|
|
348
341
|
strategy(keys[i], target, source);
|
|
@@ -356,7 +349,7 @@ function template(strategy) {
|
|
|
356
349
|
exports.template = template;
|
|
357
350
|
|
|
358
351
|
function empty(source) {
|
|
359
|
-
return source instanceof
|
|
352
|
+
return source instanceof Object ? {} : (0, alias_1.ObjectCreate)(null);
|
|
360
353
|
}
|
|
361
354
|
|
|
362
355
|
/***/ }),
|
|
@@ -372,8 +365,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
372
365
|
}));
|
|
373
366
|
exports.Cache = void 0;
|
|
374
367
|
|
|
375
|
-
const global_1 = __webpack_require__(4128);
|
|
376
|
-
|
|
377
368
|
const alias_1 = __webpack_require__(5406);
|
|
378
369
|
|
|
379
370
|
const clock_1 = __webpack_require__(7681);
|
|
@@ -389,7 +380,7 @@ class Cache {
|
|
|
389
380
|
this.settings = {
|
|
390
381
|
capacity: 0,
|
|
391
382
|
window: 100,
|
|
392
|
-
age:
|
|
383
|
+
age: Infinity,
|
|
393
384
|
earlyExpiring: false,
|
|
394
385
|
capture: {
|
|
395
386
|
delete: true,
|
|
@@ -397,19 +388,18 @@ class Cache {
|
|
|
397
388
|
},
|
|
398
389
|
resolution: 1,
|
|
399
390
|
offset: 0,
|
|
400
|
-
entrance:
|
|
391
|
+
entrance: 5,
|
|
401
392
|
threshold: 20,
|
|
402
393
|
sweep: 10,
|
|
403
394
|
test: false
|
|
404
395
|
};
|
|
405
396
|
this.overlap = 0;
|
|
406
397
|
this.SIZE = 0;
|
|
407
|
-
this.memory = new
|
|
398
|
+
this.memory = new Map();
|
|
408
399
|
this.indexes = {
|
|
409
400
|
LRU: new invlist_1.List(),
|
|
410
401
|
LFU: new invlist_1.List()
|
|
411
402
|
};
|
|
412
|
-
this.expiries = new heap_1.Heap(heap_1.Heap.min);
|
|
413
403
|
this.misses = 0;
|
|
414
404
|
this.sweep = 0;
|
|
415
405
|
this.ratio = 500;
|
|
@@ -422,21 +412,25 @@ class Cache {
|
|
|
422
412
|
const settings = (0, assign_1.extend)(this.settings, opts, {
|
|
423
413
|
capacity
|
|
424
414
|
});
|
|
425
|
-
this.capacity = settings.capacity;
|
|
426
|
-
if (
|
|
415
|
+
this.capacity = capacity = settings.capacity;
|
|
416
|
+
if (capacity >>> 0 !== capacity) throw new Error(`Spica: Cache: Capacity must be integer.`);
|
|
417
|
+
if (capacity >= 1 === false) throw new Error(`Spica: Cache: Capacity must be 1 or more.`);
|
|
427
418
|
this.window = settings.window * this.capacity / 100 >>> 0 || this.capacity;
|
|
428
|
-
if (this.window * 1000 >= this.capacity === false) throw new Error(`Spica: Cache: Window must be 0.1% of capacity
|
|
419
|
+
if (this.window * 1000 >= this.capacity === false) throw new Error(`Spica: Cache: Window must be 0.1% or more of capacity.`);
|
|
429
420
|
this.threshold = settings.threshold;
|
|
430
|
-
this.limit = 1000 - settings.entrance;
|
|
421
|
+
this.limit = 1000 - settings.entrance * 10;
|
|
431
422
|
this.age = settings.age;
|
|
432
|
-
|
|
423
|
+
|
|
424
|
+
if (settings.earlyExpiring) {
|
|
425
|
+
this.expiries = new heap_1.Heap(heap_1.Heap.min);
|
|
426
|
+
}
|
|
427
|
+
|
|
433
428
|
this.disposer = settings.disposer;
|
|
434
429
|
this.stats = opts.resolution || opts.offset ? new StatsExperimental(this.window, settings.resolution, settings.offset) : new Stats(this.window);
|
|
435
430
|
this.test = settings.test;
|
|
436
431
|
}
|
|
437
432
|
|
|
438
433
|
get length() {
|
|
439
|
-
//assert(this.indexes.LRU.length + this.indexes.LFU.length === this.memory.size);
|
|
440
434
|
return this.indexes.LRU.length + this.indexes.LFU.length;
|
|
441
435
|
}
|
|
442
436
|
|
|
@@ -445,22 +439,21 @@ class Cache {
|
|
|
445
439
|
}
|
|
446
440
|
|
|
447
441
|
evict(node, callback) {
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
this.overlap -= +(index.region === 'LFU' && node.list === this.indexes.LRU);
|
|
442
|
+
const entry = node.value;
|
|
443
|
+
entry.region === 'LFU' && node.list === this.indexes.LRU && --this.overlap;
|
|
451
444
|
|
|
452
|
-
if (
|
|
453
|
-
this.expiries.delete(
|
|
454
|
-
|
|
445
|
+
if (entry.eid !== -1) {
|
|
446
|
+
this.expiries.delete(entry.eid);
|
|
447
|
+
entry.eid = -1;
|
|
455
448
|
}
|
|
456
449
|
|
|
457
450
|
node.delete();
|
|
458
|
-
this.memory.delete(
|
|
459
|
-
this.SIZE -=
|
|
460
|
-
callback && this.disposer?.(node.value.value,
|
|
451
|
+
this.memory.delete(entry.key);
|
|
452
|
+
this.SIZE -= entry.size;
|
|
453
|
+
callback && this.disposer?.(node.value.value, entry.key);
|
|
461
454
|
}
|
|
462
455
|
|
|
463
|
-
ensure(margin, skip) {
|
|
456
|
+
ensure(margin, skip, capture = false) {
|
|
464
457
|
let size = skip?.value.size ?? 0;
|
|
465
458
|
const {
|
|
466
459
|
LRU,
|
|
@@ -468,49 +461,47 @@ class Cache {
|
|
|
468
461
|
} = this.indexes;
|
|
469
462
|
|
|
470
463
|
while (this.size + margin - size > this.capacity) {
|
|
471
|
-
let
|
|
472
|
-
|
|
473
|
-
switch (true) {
|
|
474
|
-
case (target = this.expiries.peek()) && target !== skip && target.value.expiry < (0, clock_1.now)():
|
|
475
|
-
break;
|
|
464
|
+
let victim = this.expiries?.peek();
|
|
476
465
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
466
|
+
if (victim && victim !== skip && victim.value.expiry < (0, clock_1.now)()) {} else if (LRU.length === 0) {
|
|
467
|
+
victim = LFU.last !== skip ? LFU.last : LFU.last.prev;
|
|
468
|
+
} else {
|
|
469
|
+
if (this.misses > LRU.length * this.threshold / 100) {
|
|
470
|
+
this.sweep ||= (0, alias_1.round)(LRU.length * this.settings.sweep / 100) || 1;
|
|
471
|
+
|
|
472
|
+
if (this.sweep > 0) {
|
|
473
|
+
LRU.head = LRU.head.next.next;
|
|
474
|
+
--this.sweep;
|
|
475
|
+
this.sweep ||= -(0, alias_1.round)(LRU.length * this.settings.sweep / 100) || -1;
|
|
476
|
+
} else {
|
|
477
|
+
++this.sweep;
|
|
478
|
+
}
|
|
479
|
+
} else if (LFU.length > this.capacity * this.ratio / 1000) {
|
|
480
|
+
victim = LFU.last !== skip ? LFU.last : LFU.length !== 1 ? LFU.last.prev : undefined;
|
|
484
481
|
|
|
485
|
-
if (
|
|
486
|
-
LRU.unshiftNode(
|
|
482
|
+
if (victim) {
|
|
483
|
+
LRU.unshiftNode(victim);
|
|
487
484
|
++this.overlap;
|
|
488
485
|
}
|
|
486
|
+
}
|
|
489
487
|
|
|
490
|
-
|
|
488
|
+
victim = LRU.last !== skip ? LRU.last : LRU.length !== 1 ? LRU.last.prev : undefined;
|
|
491
489
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
LRU.head = LRU.head.next.next;
|
|
498
|
-
--this.sweep;
|
|
499
|
-
this.sweep ||= -(0, alias_1.round)(LRU.length * this.settings.sweep / 100 * 99 / 100);
|
|
500
|
-
} else {
|
|
501
|
-
++this.sweep;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
490
|
+
if (capture && !skip && victim) {
|
|
491
|
+
skip = victim;
|
|
492
|
+
size = skip?.value.size ?? 0;
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
504
495
|
|
|
505
|
-
|
|
496
|
+
victim ??= LFU.last;
|
|
506
497
|
}
|
|
507
498
|
|
|
508
|
-
this.evict(
|
|
499
|
+
this.evict(victim, true);
|
|
509
500
|
skip = skip?.list && skip;
|
|
510
501
|
size = skip?.value.size ?? 0;
|
|
511
502
|
}
|
|
512
503
|
|
|
513
|
-
return
|
|
504
|
+
return skip;
|
|
514
505
|
}
|
|
515
506
|
|
|
516
507
|
put(key, value, {
|
|
@@ -522,47 +513,61 @@ class Cache {
|
|
|
522
513
|
return false;
|
|
523
514
|
}
|
|
524
515
|
|
|
525
|
-
|
|
516
|
+
const {
|
|
517
|
+
LRU
|
|
518
|
+
} = this.indexes;
|
|
519
|
+
|
|
520
|
+
if (age === Infinity) {
|
|
526
521
|
age = 0;
|
|
527
522
|
}
|
|
528
523
|
|
|
529
|
-
const expiry = age ? (0, clock_1.now)() + age :
|
|
530
|
-
|
|
524
|
+
const expiry = age ? (0, clock_1.now)() + age : Infinity;
|
|
525
|
+
let node = this.memory.get(key);
|
|
526
|
+
const match = !!node;
|
|
527
|
+
node = this.ensure(size, node, true);
|
|
528
|
+
|
|
529
|
+
if (node !== undefined) {
|
|
530
|
+
const entry = node.value;
|
|
531
|
+
const key$ = entry.key;
|
|
532
|
+
const value$ = entry.value;
|
|
531
533
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
if (this.earlyExpiring && age) {
|
|
540
|
-
index.enode ? this.expiries.update(index.enode, expiry) : index.enode = this.expiries.insert(node, expiry);
|
|
541
|
-
} else if (index.enode) {
|
|
542
|
-
this.expiries.delete(index.enode);
|
|
543
|
-
index.enode = void 0;
|
|
534
|
+
if (!match) {
|
|
535
|
+
entry.region === 'LFU' && --this.overlap;
|
|
536
|
+
this.memory.delete(key$);
|
|
537
|
+
this.memory.set(key, node);
|
|
538
|
+
entry.key = key;
|
|
539
|
+
entry.region = 'LRU';
|
|
540
|
+
LRU.head = node;
|
|
544
541
|
}
|
|
545
542
|
|
|
546
|
-
|
|
547
|
-
this.
|
|
548
|
-
|
|
543
|
+
entry.value = value;
|
|
544
|
+
this.SIZE += size - entry.size;
|
|
545
|
+
entry.size = size;
|
|
546
|
+
entry.expiry = expiry;
|
|
547
|
+
|
|
548
|
+
if (this.expiries && age) {
|
|
549
|
+
entry.eid !== -1 ? this.expiries.update(entry.eid, expiry) : entry.eid = this.expiries.insert(node, expiry);
|
|
550
|
+
} else if (entry.eid !== -1) {
|
|
551
|
+
this.expiries.delete(entry.eid);
|
|
552
|
+
entry.eid = -1;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
this.disposer?.(value$, key$);
|
|
556
|
+
return match;
|
|
549
557
|
}
|
|
550
558
|
|
|
551
|
-
this.ensure(size);
|
|
552
|
-
const {
|
|
553
|
-
LRU
|
|
554
|
-
} = this.indexes;
|
|
555
559
|
this.SIZE += size;
|
|
556
560
|
this.memory.set(key, LRU.unshift({
|
|
557
561
|
key,
|
|
558
562
|
value,
|
|
559
563
|
size,
|
|
560
564
|
expiry,
|
|
565
|
+
eid: -1,
|
|
561
566
|
region: 'LRU'
|
|
562
567
|
}));
|
|
563
568
|
|
|
564
|
-
if (this.
|
|
565
|
-
LRU.head.value.
|
|
569
|
+
if (this.expiries && age) {
|
|
570
|
+
LRU.head.value.eid = this.expiries.insert(LRU.head, expiry);
|
|
566
571
|
}
|
|
567
572
|
|
|
568
573
|
return false;
|
|
@@ -576,14 +581,15 @@ class Cache {
|
|
|
576
581
|
get(key) {
|
|
577
582
|
const node = this.memory.get(key);
|
|
578
583
|
|
|
579
|
-
if (
|
|
584
|
+
if (node === undefined) {
|
|
580
585
|
++this.misses;
|
|
581
586
|
return;
|
|
582
587
|
}
|
|
583
588
|
|
|
584
|
-
const
|
|
589
|
+
const entry = node.value;
|
|
590
|
+
const expiry = entry.expiry;
|
|
585
591
|
|
|
586
|
-
if (expiry !==
|
|
592
|
+
if (expiry !== Infinity && expiry < (0, clock_1.now)()) {
|
|
587
593
|
++this.misses;
|
|
588
594
|
this.evict(node, true);
|
|
589
595
|
return;
|
|
@@ -592,20 +598,19 @@ class Cache {
|
|
|
592
598
|
this.misses &&= 0;
|
|
593
599
|
this.sweep &&= 0; // Optimization for memoize.
|
|
594
600
|
|
|
595
|
-
if (!this.test && node === node.list.head) return
|
|
601
|
+
if (!this.test && node === node.list.head) return entry.value;
|
|
596
602
|
this.access(node);
|
|
597
603
|
this.adjust();
|
|
598
|
-
return
|
|
604
|
+
return entry.value;
|
|
599
605
|
}
|
|
600
606
|
|
|
601
607
|
has(key) {
|
|
602
|
-
//assert(this.memory.has(key) === (this.indexes.LFU.has(key) || this.indexes.LRU.has(key)));
|
|
603
|
-
//assert(this.memory.size === this.indexes.LFU.length + this.indexes.LRU.length);
|
|
604
608
|
const node = this.memory.get(key);
|
|
605
|
-
if (
|
|
606
|
-
const
|
|
609
|
+
if (node === undefined) return false;
|
|
610
|
+
const entry = node.value;
|
|
611
|
+
const expiry = entry.expiry;
|
|
607
612
|
|
|
608
|
-
if (expiry !==
|
|
613
|
+
if (expiry !== Infinity && expiry < (0, clock_1.now)()) {
|
|
609
614
|
this.evict(node, true);
|
|
610
615
|
return false;
|
|
611
616
|
}
|
|
@@ -615,7 +620,7 @@ class Cache {
|
|
|
615
620
|
|
|
616
621
|
delete(key) {
|
|
617
622
|
const node = this.memory.get(key);
|
|
618
|
-
if (
|
|
623
|
+
if (node === undefined) return false;
|
|
619
624
|
this.evict(node, this.settings.capture.delete === true);
|
|
620
625
|
return true;
|
|
621
626
|
}
|
|
@@ -629,10 +634,10 @@ class Cache {
|
|
|
629
634
|
this.stats.clear();
|
|
630
635
|
this.indexes.LRU.clear();
|
|
631
636
|
this.indexes.LFU.clear();
|
|
632
|
-
this.expiries
|
|
637
|
+
this.expiries?.clear();
|
|
633
638
|
if (!this.disposer || !this.settings.capture.clear) return void this.memory.clear();
|
|
634
639
|
const memory = this.memory;
|
|
635
|
-
this.memory = new
|
|
640
|
+
this.memory = new Map();
|
|
636
641
|
|
|
637
642
|
for (const {
|
|
638
643
|
0: key,
|
|
@@ -647,10 +652,11 @@ class Cache {
|
|
|
647
652
|
}
|
|
648
653
|
|
|
649
654
|
resize(capacity) {
|
|
650
|
-
if (
|
|
655
|
+
if (capacity >>> 0 !== capacity) throw new Error(`Spica: Cache: Capacity must be integer.`);
|
|
656
|
+
if (capacity >= 1 === false) throw new Error(`Spica: Cache: Capacity must be 1 or more.`);
|
|
651
657
|
this.capacity = capacity;
|
|
652
|
-
this.window = this.settings.window || this.capacity;
|
|
653
|
-
if (this.window * 1000 >= this.capacity === false) throw new Error(`Spica: Cache: Window must be 0.1% of capacity
|
|
658
|
+
this.window = this.settings.window * this.capacity / 100 >>> 0 || this.capacity;
|
|
659
|
+
if (this.window * 1000 >= this.capacity === false) throw new Error(`Spica: Cache: Window must be 0.1% or more of capacity.`);
|
|
654
660
|
this.ensure(0);
|
|
655
661
|
}
|
|
656
662
|
|
|
@@ -669,6 +675,32 @@ class Cache {
|
|
|
669
675
|
return;
|
|
670
676
|
}
|
|
671
677
|
|
|
678
|
+
access(node) {
|
|
679
|
+
const entry = node.value;
|
|
680
|
+
const {
|
|
681
|
+
region
|
|
682
|
+
} = entry;
|
|
683
|
+
const {
|
|
684
|
+
LRU,
|
|
685
|
+
LFU
|
|
686
|
+
} = this.indexes;
|
|
687
|
+
|
|
688
|
+
if (node.list === LRU) {
|
|
689
|
+
++this.stats[region][0];
|
|
690
|
+
|
|
691
|
+
if (region === 'LFU') {
|
|
692
|
+
--this.overlap;
|
|
693
|
+
} else {
|
|
694
|
+
entry.region = 'LFU';
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
LFU.unshiftNode(node);
|
|
698
|
+
} else {
|
|
699
|
+
++this.stats[region][0];
|
|
700
|
+
node.moveToHead();
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
672
704
|
adjust() {
|
|
673
705
|
const {
|
|
674
706
|
capacity,
|
|
@@ -703,27 +735,6 @@ class Cache {
|
|
|
703
735
|
}
|
|
704
736
|
}
|
|
705
737
|
|
|
706
|
-
access(node) {
|
|
707
|
-
return this.accessLFU(node) || this.accessLRU(node);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
accessLRU(node) {
|
|
711
|
-
const index = node.value;
|
|
712
|
-
++this.stats[index.region][0];
|
|
713
|
-
this.overlap -= +(index.region === 'LFU');
|
|
714
|
-
index.region = 'LFU';
|
|
715
|
-
this.indexes.LFU.unshiftNode(node);
|
|
716
|
-
return true;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
accessLFU(node) {
|
|
720
|
-
if (node.list !== this.indexes.LFU) return false;
|
|
721
|
-
const index = node.value;
|
|
722
|
-
++this.stats[index.region][0];
|
|
723
|
-
node.moveToHead();
|
|
724
|
-
return true;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
738
|
}
|
|
728
739
|
|
|
729
740
|
exports.Cache = Cache;
|
|
@@ -878,13 +889,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
878
889
|
}));
|
|
879
890
|
exports.clock = exports.now = void 0;
|
|
880
891
|
|
|
881
|
-
const global_1 = __webpack_require__(4128);
|
|
882
|
-
|
|
883
892
|
const queue_1 = __webpack_require__(4934);
|
|
884
893
|
|
|
885
894
|
const exception_1 = __webpack_require__(7822);
|
|
886
895
|
|
|
887
|
-
const undefined = void 0;
|
|
888
896
|
let time;
|
|
889
897
|
let count = 0;
|
|
890
898
|
|
|
@@ -896,15 +904,15 @@ function now(nocache) {
|
|
|
896
904
|
}
|
|
897
905
|
|
|
898
906
|
count = 1;
|
|
899
|
-
return time =
|
|
907
|
+
return time = Date.now();
|
|
900
908
|
}
|
|
901
909
|
|
|
902
910
|
exports.now = now;
|
|
903
|
-
exports.clock = new class Clock extends
|
|
911
|
+
exports.clock = new class Clock extends Promise {
|
|
904
912
|
constructor() {
|
|
905
913
|
super(resolve => resolve(undefined)); // Promise subclass is slow.
|
|
906
914
|
|
|
907
|
-
const clock =
|
|
915
|
+
const clock = Promise.resolve();
|
|
908
916
|
clock.next = this.next;
|
|
909
917
|
clock.now = this.now;
|
|
910
918
|
return clock;
|
|
@@ -1132,15 +1140,13 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1132
1140
|
}));
|
|
1133
1141
|
exports.suppressAsyncException = exports.causeAsyncException = void 0;
|
|
1134
1142
|
|
|
1135
|
-
const global_1 = __webpack_require__(4128);
|
|
1136
|
-
|
|
1137
1143
|
const stack_1 = __webpack_require__(5352);
|
|
1138
1144
|
|
|
1139
1145
|
const stack = new stack_1.Stack();
|
|
1140
1146
|
|
|
1141
1147
|
function causeAsyncException(reason) {
|
|
1142
1148
|
if (stack.isEmpty()) {
|
|
1143
|
-
|
|
1149
|
+
Promise.reject(reason);
|
|
1144
1150
|
} else {
|
|
1145
1151
|
stack.peek().push(reason);
|
|
1146
1152
|
}
|
|
@@ -1170,7 +1176,7 @@ exports.suppressAsyncException = suppressAsyncException;
|
|
|
1170
1176
|
|
|
1171
1177
|
__webpack_require__(6921);
|
|
1172
1178
|
|
|
1173
|
-
const global =
|
|
1179
|
+
const global = false || typeof globalThis !== 'undefined' && globalThis // @ts-ignore
|
|
1174
1180
|
|| typeof self !== 'undefined' && self || Function('return this')();
|
|
1175
1181
|
global.global = global;
|
|
1176
1182
|
module.exports = global;
|
|
@@ -1200,33 +1206,29 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1200
1206
|
}));
|
|
1201
1207
|
exports.MultiHeap = exports.Heap = void 0;
|
|
1202
1208
|
|
|
1203
|
-
const
|
|
1209
|
+
const alias_1 = __webpack_require__(5406);
|
|
1204
1210
|
|
|
1205
1211
|
const invlist_1 = __webpack_require__(7452);
|
|
1206
1212
|
|
|
1207
1213
|
const memoize_1 = __webpack_require__(1808);
|
|
1208
1214
|
|
|
1209
|
-
const undefined = void 0;
|
|
1210
|
-
let size = 16;
|
|
1211
|
-
|
|
1212
1215
|
class Heap {
|
|
1213
|
-
constructor(cmp = Heap.max,
|
|
1216
|
+
constructor(cmp = Heap.max, options) {
|
|
1214
1217
|
this.cmp = cmp;
|
|
1215
|
-
this.stable = stable;
|
|
1216
|
-
this.array =
|
|
1217
|
-
this.$length = 0;
|
|
1218
|
+
this.stable = options?.stable ?? false;
|
|
1219
|
+
this.array = new List();
|
|
1218
1220
|
}
|
|
1219
1221
|
|
|
1220
1222
|
get length() {
|
|
1221
|
-
return this
|
|
1223
|
+
return this.array.length;
|
|
1222
1224
|
}
|
|
1223
1225
|
|
|
1224
1226
|
isEmpty() {
|
|
1225
|
-
return this.array
|
|
1227
|
+
return this.array.length === 0;
|
|
1226
1228
|
}
|
|
1227
1229
|
|
|
1228
1230
|
peek() {
|
|
1229
|
-
return this.array
|
|
1231
|
+
return this.array.value(this.array.index(0));
|
|
1230
1232
|
}
|
|
1231
1233
|
|
|
1232
1234
|
insert(value, order) {
|
|
@@ -1234,10 +1236,9 @@ class Heap {
|
|
|
1234
1236
|
order = value;
|
|
1235
1237
|
}
|
|
1236
1238
|
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
return node;
|
|
1239
|
+
const index = this.array.push(value, order);
|
|
1240
|
+
upHeapify(this.cmp, this.array, this.length);
|
|
1241
|
+
return index;
|
|
1241
1242
|
}
|
|
1242
1243
|
|
|
1243
1244
|
replace(value, order) {
|
|
@@ -1245,54 +1246,50 @@ class Heap {
|
|
|
1245
1246
|
order = value;
|
|
1246
1247
|
}
|
|
1247
1248
|
|
|
1248
|
-
if (this
|
|
1249
|
-
const
|
|
1250
|
-
const
|
|
1251
|
-
array
|
|
1252
|
-
|
|
1249
|
+
if (this.length === 0) return void this.insert(value, order);
|
|
1250
|
+
const replaced = this.peek();
|
|
1251
|
+
const index = this.array.index(0);
|
|
1252
|
+
this.array.setValue(index, value);
|
|
1253
|
+
this.array.setOrder(index, order);
|
|
1254
|
+
downHeapify(this.cmp, this.array, 1, this.length, this.stable);
|
|
1253
1255
|
return replaced;
|
|
1254
1256
|
}
|
|
1255
1257
|
|
|
1256
1258
|
extract() {
|
|
1257
|
-
if (this
|
|
1258
|
-
const
|
|
1259
|
-
this.
|
|
1260
|
-
return
|
|
1259
|
+
if (this.length === 0) return;
|
|
1260
|
+
const value = this.peek();
|
|
1261
|
+
this.del(0);
|
|
1262
|
+
return value;
|
|
1261
1263
|
}
|
|
1262
1264
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
swap(array, index, --this.$length);
|
|
1268
|
-
array[this.$length] = undefined;
|
|
1269
|
-
index < this.$length && sort(this.cmp, array, index, this.$length, this.stable);
|
|
1270
|
-
return node[1];
|
|
1265
|
+
del(pos) {
|
|
1266
|
+
swap(this.array, pos + 1, this.length);
|
|
1267
|
+
this.array.pop();
|
|
1268
|
+
sort(this.cmp, this.array, pos + 1, this.length, this.stable);
|
|
1271
1269
|
}
|
|
1272
1270
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1271
|
+
delete(index) {
|
|
1272
|
+
const value = this.array.value(index);
|
|
1273
|
+
this.del(this.array.position(index));
|
|
1274
|
+
return value;
|
|
1275
|
+
}
|
|
1277
1276
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1277
|
+
update(index, order, value) {
|
|
1278
|
+
const ord = this.array.order(index);
|
|
1280
1279
|
|
|
1281
|
-
if (arguments.length
|
|
1282
|
-
|
|
1280
|
+
if (arguments.length < 3) {
|
|
1281
|
+
this.array.setOrder(index, order);
|
|
1282
|
+
} else {
|
|
1283
|
+
this.array.setOrder(index, order);
|
|
1284
|
+
this.array.setValue(index, value);
|
|
1283
1285
|
}
|
|
1284
1286
|
|
|
1285
|
-
if (this.cmp(
|
|
1286
|
-
sort(this.cmp, array,
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
find(order) {
|
|
1290
|
-
return this.array.find(node => node && node[0] === order);
|
|
1287
|
+
if (this.cmp(ord, order) === 0) return;
|
|
1288
|
+
sort(this.cmp, this.array, this.array.position(index) + 1, this.length, this.stable);
|
|
1291
1289
|
}
|
|
1292
1290
|
|
|
1293
1291
|
clear() {
|
|
1294
|
-
this.array
|
|
1295
|
-
this.$length = 0;
|
|
1292
|
+
this.array.clear();
|
|
1296
1293
|
}
|
|
1297
1294
|
|
|
1298
1295
|
}
|
|
@@ -1303,12 +1300,186 @@ Heap.max = (a, b) => a > b ? -1 : a < b ? 1 : 0;
|
|
|
1303
1300
|
|
|
1304
1301
|
Heap.min = (a, b) => a > b ? 1 : a < b ? -1 : 0;
|
|
1305
1302
|
|
|
1303
|
+
function sort(cmp, array, index, length, stable) {
|
|
1304
|
+
if (length === 0) return false;
|
|
1305
|
+
|
|
1306
|
+
switch (index) {
|
|
1307
|
+
case 1:
|
|
1308
|
+
return false || downHeapify(cmp, array, index, length, stable);
|
|
1309
|
+
|
|
1310
|
+
case length:
|
|
1311
|
+
return upHeapify(cmp, array, index);
|
|
1312
|
+
|
|
1313
|
+
default:
|
|
1314
|
+
return upHeapify(cmp, array, index) || downHeapify(cmp, array, index, length, stable);
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
function upHeapify(cmp, array, index) {
|
|
1319
|
+
const order = array.ord(index - 1);
|
|
1320
|
+
let changed = false;
|
|
1321
|
+
|
|
1322
|
+
while (index > 1) {
|
|
1323
|
+
const parent = index / 2 | 0;
|
|
1324
|
+
if (cmp(array.ord(parent - 1), order) <= 0) break;
|
|
1325
|
+
swap(array, index, parent);
|
|
1326
|
+
index = parent;
|
|
1327
|
+
changed ||= true;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
return changed;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
function downHeapify(cmp, array, index, length, stable) {
|
|
1334
|
+
let changed = false;
|
|
1335
|
+
|
|
1336
|
+
while (index < length) {
|
|
1337
|
+
const left = index * 2;
|
|
1338
|
+
const right = index * 2 + 1;
|
|
1339
|
+
let min = index;
|
|
1340
|
+
|
|
1341
|
+
if (left <= length) {
|
|
1342
|
+
const result = cmp(array.ord(left - 1), array.ord(min - 1));
|
|
1343
|
+
|
|
1344
|
+
if (stable ? result <= 0 : result < 0) {
|
|
1345
|
+
min = left;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
if (right <= length) {
|
|
1350
|
+
const result = cmp(array.ord(right - 1), array.ord(min - 1));
|
|
1351
|
+
|
|
1352
|
+
if (stable ? result <= 0 : result < 0) {
|
|
1353
|
+
min = right;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
if (min === index) break;
|
|
1358
|
+
swap(array, index, min);
|
|
1359
|
+
index = min;
|
|
1360
|
+
changed ||= true;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
return changed;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
function swap(array, index1, index2) {
|
|
1367
|
+
array.swap(index1 - 1, index2 - 1);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
class List {
|
|
1371
|
+
constructor() {
|
|
1372
|
+
this.capacity = 4;
|
|
1373
|
+
this.orders = Array(this.capacity);
|
|
1374
|
+
this.values = Array(this.capacity);
|
|
1375
|
+
this.indexes = new Uint32Array(this.capacity);
|
|
1376
|
+
this.positions = new Uint32Array(this.capacity);
|
|
1377
|
+
this.$length = 0;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
get length() {
|
|
1381
|
+
return this.$length;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
index(pos) {
|
|
1385
|
+
return this.indexes[pos];
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
position(index) {
|
|
1389
|
+
return this.positions[index];
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
ord(pos) {
|
|
1393
|
+
return this.orders[this.indexes[pos]];
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
order(index) {
|
|
1397
|
+
return this.orders[index];
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
value(index) {
|
|
1401
|
+
return this.values[index];
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
isFull() {
|
|
1405
|
+
return this.$length === this.capacity;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
extend() {
|
|
1409
|
+
if (this.capacity === 2 ** 32) throw new Error(`Too large capacity`);
|
|
1410
|
+
const capacity = (0, alias_1.min)(this.capacity * 2, 2 ** 32);
|
|
1411
|
+
this.orders.length = capacity;
|
|
1412
|
+
this.values.length = capacity;
|
|
1413
|
+
const indexes = new Uint32Array(capacity);
|
|
1414
|
+
indexes.set(this.indexes);
|
|
1415
|
+
this.indexes = indexes;
|
|
1416
|
+
const positions = new Uint32Array(capacity);
|
|
1417
|
+
positions.set(this.positions);
|
|
1418
|
+
this.positions = positions;
|
|
1419
|
+
this.capacity = capacity;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
clear() {
|
|
1423
|
+
this.orders = Array(this.capacity);
|
|
1424
|
+
this.values = Array(this.capacity);
|
|
1425
|
+
this.$length = 0;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
setValue(index, value) {
|
|
1429
|
+
this.values[index] = value;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
setOrder(index, order) {
|
|
1433
|
+
this.orders[index] = order;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
push(value, order) {
|
|
1437
|
+
this.isFull() && this.extend();
|
|
1438
|
+
const pos = this.$length++;
|
|
1439
|
+
this.indexes[pos] = pos;
|
|
1440
|
+
this.positions[pos] = pos;
|
|
1441
|
+
this.values[pos] = value;
|
|
1442
|
+
this.orders[pos] = order;
|
|
1443
|
+
return pos;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
pop() {
|
|
1447
|
+
if (this.$length === 0) return;
|
|
1448
|
+
const pos = this.indexes[--this.$length];
|
|
1449
|
+
this.values[pos] = undefined;
|
|
1450
|
+
this.orders[pos] = undefined;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
swap(pos1, pos2) {
|
|
1454
|
+
if (pos1 === pos2) return false;
|
|
1455
|
+
const {
|
|
1456
|
+
indexes,
|
|
1457
|
+
positions
|
|
1458
|
+
} = this;
|
|
1459
|
+
const idx1 = indexes[pos1];
|
|
1460
|
+
const idx2 = indexes[pos2];
|
|
1461
|
+
indexes[pos1] = idx2;
|
|
1462
|
+
indexes[pos2] = idx1;
|
|
1463
|
+
positions[idx1] = pos2;
|
|
1464
|
+
positions[idx2] = pos1;
|
|
1465
|
+
return true;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
*[Symbol.iterator]() {
|
|
1469
|
+
if (this.$length === 0) return;
|
|
1470
|
+
|
|
1471
|
+
for (let i = 0; i < this.$length; ++i) {
|
|
1472
|
+
const index = this.indexes[i];
|
|
1473
|
+
yield [this.orders[index], this.values[index], i];
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1306
1479
|
class MultiHeap {
|
|
1307
|
-
constructor(cmp = MultiHeap.max,
|
|
1480
|
+
constructor(cmp = MultiHeap.max, options) {
|
|
1308
1481
|
this.cmp = cmp;
|
|
1309
|
-
this.
|
|
1310
|
-
this.heap = new Heap(this.cmp);
|
|
1311
|
-
this.dict = new global_1.Map();
|
|
1482
|
+
this.dict = new Map();
|
|
1312
1483
|
this.list = (0, memoize_1.memoize)(order => {
|
|
1313
1484
|
const list = new invlist_1.List();
|
|
1314
1485
|
list[MultiHeap.order] = order;
|
|
@@ -1316,6 +1487,8 @@ class MultiHeap {
|
|
|
1316
1487
|
return list;
|
|
1317
1488
|
}, this.dict);
|
|
1318
1489
|
this.$length = 0;
|
|
1490
|
+
this.clean = options?.clean ?? true;
|
|
1491
|
+
this.heap = new Heap(this.cmp);
|
|
1319
1492
|
}
|
|
1320
1493
|
|
|
1321
1494
|
get length() {
|
|
@@ -1401,60 +1574,6 @@ MultiHeap.heap = Symbol('heap');
|
|
|
1401
1574
|
MultiHeap.max = Heap.max;
|
|
1402
1575
|
MultiHeap.min = Heap.min;
|
|
1403
1576
|
|
|
1404
|
-
function sort(cmp, array, index, length, stable) {
|
|
1405
|
-
return upHeapify(cmp, array, index + 1) || downHeapify(cmp, array, index + 1, length, stable);
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
function upHeapify(cmp, array, index) {
|
|
1409
|
-
const order = array[index - 1][0];
|
|
1410
|
-
let changed = false;
|
|
1411
|
-
|
|
1412
|
-
while (index > 1) {
|
|
1413
|
-
const parent = index / 2 | 0;
|
|
1414
|
-
if (cmp(array[parent - 1][0], order) <= 0) break;
|
|
1415
|
-
swap(array, index - 1, parent - 1);
|
|
1416
|
-
index = parent;
|
|
1417
|
-
changed ||= true;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
return changed;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
function downHeapify(cmp, array, index, length, stable) {
|
|
1424
|
-
let changed = false;
|
|
1425
|
-
|
|
1426
|
-
while (index < length) {
|
|
1427
|
-
const left = index * 2;
|
|
1428
|
-
const right = index * 2 + 1;
|
|
1429
|
-
let min = index;
|
|
1430
|
-
|
|
1431
|
-
if (left <= length && (stable ? cmp(array[left - 1][0], array[min - 1][0]) <= 0 : cmp(array[left - 1][0], array[min - 1][0]) < 0)) {
|
|
1432
|
-
min = left;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
if (right <= length && (stable ? cmp(array[right - 1][0], array[min - 1][0]) <= 0 : cmp(array[right - 1][0], array[min - 1][0]) < 0)) {
|
|
1436
|
-
min = right;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
if (min === index) break;
|
|
1440
|
-
swap(array, index - 1, min - 1);
|
|
1441
|
-
index = min;
|
|
1442
|
-
changed ||= true;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
return changed;
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
function swap(array, index1, index2) {
|
|
1449
|
-
if (index1 === index2) return;
|
|
1450
|
-
const node1 = array[index1];
|
|
1451
|
-
const node2 = array[index2];
|
|
1452
|
-
node1[2] = index2;
|
|
1453
|
-
node2[2] = index1;
|
|
1454
|
-
array[index1] = node2;
|
|
1455
|
-
array[index2] = node1;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
1577
|
/***/ }),
|
|
1459
1578
|
|
|
1460
1579
|
/***/ 7452:
|
|
@@ -1504,7 +1623,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1504
1623
|
value: true
|
|
1505
1624
|
}));
|
|
1506
1625
|
exports.List = void 0;
|
|
1507
|
-
const undefined = void 0;
|
|
1508
1626
|
|
|
1509
1627
|
class List {
|
|
1510
1628
|
constructor() {
|
|
@@ -1534,7 +1652,8 @@ class List {
|
|
|
1534
1652
|
}
|
|
1535
1653
|
|
|
1536
1654
|
push(value) {
|
|
1537
|
-
|
|
1655
|
+
const head = this.head;
|
|
1656
|
+
return new Node(this, value, head, head?.prev);
|
|
1538
1657
|
}
|
|
1539
1658
|
|
|
1540
1659
|
unshiftNode(node) {
|
|
@@ -1547,7 +1666,7 @@ class List {
|
|
|
1547
1666
|
|
|
1548
1667
|
unshiftRotationally(value) {
|
|
1549
1668
|
const node = this.last;
|
|
1550
|
-
if (
|
|
1669
|
+
if (node === undefined) return this.unshift(value);
|
|
1551
1670
|
node.value = value;
|
|
1552
1671
|
this.head = node;
|
|
1553
1672
|
return node;
|
|
@@ -1555,7 +1674,7 @@ class List {
|
|
|
1555
1674
|
|
|
1556
1675
|
pushRotationally(value) {
|
|
1557
1676
|
const node = this.head;
|
|
1558
|
-
if (
|
|
1677
|
+
if (node === undefined) return this.push(value);
|
|
1559
1678
|
node.value = value;
|
|
1560
1679
|
this.head = node.next;
|
|
1561
1680
|
return node;
|
|
@@ -1570,10 +1689,13 @@ class List {
|
|
|
1570
1689
|
}
|
|
1571
1690
|
|
|
1572
1691
|
insert(node, before = this.head) {
|
|
1573
|
-
if (node.list === this) return node.
|
|
1692
|
+
if (node.list === this) return node.move(before), node;
|
|
1574
1693
|
node.delete();
|
|
1575
|
-
|
|
1576
|
-
this
|
|
1694
|
+
|
|
1695
|
+
if (this.$length++ === 0) {
|
|
1696
|
+
this.head = node;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1577
1699
|
node.list = this;
|
|
1578
1700
|
const next = node.next = before ?? node;
|
|
1579
1701
|
const prev = node.prev = next.prev ?? node;
|
|
@@ -1614,7 +1736,9 @@ class List {
|
|
|
1614
1736
|
}
|
|
1615
1737
|
|
|
1616
1738
|
*[Symbol.iterator]() {
|
|
1617
|
-
|
|
1739
|
+
const head = this.head;
|
|
1740
|
+
|
|
1741
|
+
for (let node = head; node;) {
|
|
1618
1742
|
yield node.value;
|
|
1619
1743
|
node = node.next;
|
|
1620
1744
|
if (node === head) return;
|
|
@@ -1631,9 +1755,13 @@ class Node {
|
|
|
1631
1755
|
this.value = value;
|
|
1632
1756
|
this.next = next;
|
|
1633
1757
|
this.prev = prev;
|
|
1634
|
-
++list['$length'];
|
|
1635
1758
|
list.head ??= this;
|
|
1636
|
-
|
|
1759
|
+
|
|
1760
|
+
if (list['$length']++ === 0) {
|
|
1761
|
+
this.next = this.prev = this;
|
|
1762
|
+
} else {
|
|
1763
|
+
next.prev = prev.next = this;
|
|
1764
|
+
}
|
|
1637
1765
|
}
|
|
1638
1766
|
|
|
1639
1767
|
get alive() {
|
|
@@ -1642,27 +1770,25 @@ class Node {
|
|
|
1642
1770
|
|
|
1643
1771
|
delete() {
|
|
1644
1772
|
const list = this.list;
|
|
1645
|
-
if (
|
|
1646
|
-
--list['$length'];
|
|
1773
|
+
if (list === undefined) return this.value;
|
|
1647
1774
|
const {
|
|
1648
1775
|
next,
|
|
1649
1776
|
prev
|
|
1650
1777
|
} = this;
|
|
1651
1778
|
|
|
1652
|
-
if (list
|
|
1653
|
-
list.head =
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
if (next) {
|
|
1779
|
+
if (--list['$length'] === 0) {
|
|
1780
|
+
list.head = undefined;
|
|
1781
|
+
} else {
|
|
1657
1782
|
next.prev = prev;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
if (prev) {
|
|
1661
1783
|
prev.next = next;
|
|
1784
|
+
|
|
1785
|
+
if (this === list.head) {
|
|
1786
|
+
list.head = next;
|
|
1787
|
+
}
|
|
1662
1788
|
}
|
|
1663
1789
|
|
|
1664
|
-
this.list = undefined;
|
|
1665
1790
|
this.next = this.prev = undefined;
|
|
1791
|
+
this.list = undefined;
|
|
1666
1792
|
return this.value;
|
|
1667
1793
|
}
|
|
1668
1794
|
|
|
@@ -1674,8 +1800,8 @@ class Node {
|
|
|
1674
1800
|
return new Node(this.list, value, this.next, this);
|
|
1675
1801
|
}
|
|
1676
1802
|
|
|
1677
|
-
|
|
1678
|
-
if (
|
|
1803
|
+
move(before) {
|
|
1804
|
+
if (before === undefined) return false;
|
|
1679
1805
|
if (this === before) return false;
|
|
1680
1806
|
if (before.list !== this.list) return before.list.insert(this, before), true;
|
|
1681
1807
|
const a1 = this;
|
|
@@ -1694,12 +1820,12 @@ class Node {
|
|
|
1694
1820
|
}
|
|
1695
1821
|
|
|
1696
1822
|
moveToHead() {
|
|
1697
|
-
this.
|
|
1823
|
+
this.move(this.list.head);
|
|
1698
1824
|
this.list.head = this;
|
|
1699
1825
|
}
|
|
1700
1826
|
|
|
1701
1827
|
moveToLast() {
|
|
1702
|
-
this.
|
|
1828
|
+
this.move(this.list.head);
|
|
1703
1829
|
}
|
|
1704
1830
|
|
|
1705
1831
|
swap(node) {
|
|
@@ -1708,8 +1834,8 @@ class Node {
|
|
|
1708
1834
|
if (node1 === node2) return false;
|
|
1709
1835
|
const node3 = node2.next;
|
|
1710
1836
|
if (node1.list !== node2.list) throw new Error(`Spica: InvList: Cannot swap nodes across lists.`);
|
|
1711
|
-
node2.
|
|
1712
|
-
node1.
|
|
1837
|
+
node2.move(node1);
|
|
1838
|
+
node1.move(node3);
|
|
1713
1839
|
|
|
1714
1840
|
switch (this.list.head) {
|
|
1715
1841
|
case node1:
|
|
@@ -1739,17 +1865,13 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1739
1865
|
}));
|
|
1740
1866
|
exports.reduce = exports.memoize = void 0;
|
|
1741
1867
|
|
|
1742
|
-
const global_1 = __webpack_require__(4128);
|
|
1743
|
-
|
|
1744
1868
|
const alias_1 = __webpack_require__(5406);
|
|
1745
1869
|
|
|
1746
1870
|
const compare_1 = __webpack_require__(5529);
|
|
1747
1871
|
|
|
1748
|
-
const undefined = void 0;
|
|
1749
|
-
|
|
1750
1872
|
function memoize(f, identify = (...as) => as[0], memory) {
|
|
1751
1873
|
if (typeof identify === 'object') return memoize(f, undefined, identify);
|
|
1752
|
-
return (0, alias_1.isArray)(memory) ? memoizeArray(f, identify, memory) : memoizeObject(f, identify, memory ?? new
|
|
1874
|
+
return (0, alias_1.isArray)(memory) ? memoizeArray(f, identify, memory) : memoizeObject(f, identify, memory ?? new Map());
|
|
1753
1875
|
}
|
|
1754
1876
|
|
|
1755
1877
|
exports.memoize = memoize;
|
|
@@ -1810,13 +1932,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1810
1932
|
}));
|
|
1811
1933
|
exports.MultiQueue = exports.PriorityQueue = exports.Queue = void 0;
|
|
1812
1934
|
|
|
1813
|
-
const global_1 = __webpack_require__(4128);
|
|
1814
|
-
|
|
1815
1935
|
const heap_1 = __webpack_require__(818);
|
|
1816
1936
|
|
|
1817
1937
|
const memoize_1 = __webpack_require__(1808);
|
|
1818
1938
|
|
|
1819
|
-
const undefined = void 0;
|
|
1820
1939
|
const size = 2048;
|
|
1821
1940
|
const initsize = 16;
|
|
1822
1941
|
|
|
@@ -1897,7 +2016,7 @@ exports.Queue = Queue;
|
|
|
1897
2016
|
class FixedQueue {
|
|
1898
2017
|
constructor(size, next) {
|
|
1899
2018
|
this.size = size;
|
|
1900
|
-
this.array =
|
|
2019
|
+
this.array = Array(this.size);
|
|
1901
2020
|
this.mask = this.array.length - 1;
|
|
1902
2021
|
this.head = 0;
|
|
1903
2022
|
this.tail = 0;
|
|
@@ -1938,7 +2057,7 @@ class FixedQueue {
|
|
|
1938
2057
|
class PriorityQueue {
|
|
1939
2058
|
constructor(cmp = PriorityQueue.max, clean = true) {
|
|
1940
2059
|
this.clean = clean;
|
|
1941
|
-
this.dict = new
|
|
2060
|
+
this.dict = new Map();
|
|
1942
2061
|
this.queue = (0, memoize_1.memoize)(priority => {
|
|
1943
2062
|
const queue = new Queue();
|
|
1944
2063
|
queue[PriorityQueue.priority] = priority;
|
|
@@ -2003,7 +2122,7 @@ PriorityQueue.min = heap_1.Heap.min;
|
|
|
2003
2122
|
|
|
2004
2123
|
class MultiQueue {
|
|
2005
2124
|
constructor(entries) {
|
|
2006
|
-
this.dict = new
|
|
2125
|
+
this.dict = new Map();
|
|
2007
2126
|
if (entries) for (const {
|
|
2008
2127
|
0: k,
|
|
2009
2128
|
1: v
|
|
@@ -2037,11 +2156,11 @@ class MultiQueue {
|
|
|
2037
2156
|
}
|
|
2038
2157
|
|
|
2039
2158
|
clear() {
|
|
2040
|
-
this.dict = new
|
|
2159
|
+
this.dict = new Map();
|
|
2041
2160
|
}
|
|
2042
2161
|
|
|
2043
2162
|
take(key, count) {
|
|
2044
|
-
if (count ===
|
|
2163
|
+
if (count === undefined) return this.pop(key);
|
|
2045
2164
|
const vs = this.dict.get(key);
|
|
2046
2165
|
const acc = [];
|
|
2047
2166
|
|
|
@@ -2101,7 +2220,7 @@ exports.MultiQueue = MultiQueue;
|
|
|
2101
2220
|
/***/ }),
|
|
2102
2221
|
|
|
2103
2222
|
/***/ 7325:
|
|
2104
|
-
/***/ ((__unused_webpack_module, exports
|
|
2223
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2105
2224
|
|
|
2106
2225
|
"use strict";
|
|
2107
2226
|
|
|
@@ -2110,9 +2229,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2110
2229
|
value: true
|
|
2111
2230
|
}));
|
|
2112
2231
|
exports.pcg32 = exports.xorshift = exports.unique = exports.rndAf = exports.rndAP = exports.rnd0_ = exports.rnd0Z = exports.rnd0v = exports.rnd0f = exports.rnd64 = exports.rnd62 = exports.rnd32 = exports.rnd16 = void 0;
|
|
2113
|
-
|
|
2114
|
-
const global_1 = __webpack_require__(4128);
|
|
2115
|
-
|
|
2116
2232
|
const radixes = Object.freeze([...Array(7)].map((_, i) => 1 << i));
|
|
2117
2233
|
const masks = Object.freeze(radixes.map(radix => radix - 1));
|
|
2118
2234
|
const dict0_ = [...[...Array(36)].map((_, i) => i.toString(36)), ...[...Array(36)].map((_, i) => i.toString(36).toUpperCase()).slice(-26), '-', '_'].join('');
|
|
@@ -2130,7 +2246,7 @@ exports.rndAf = conv(exports.rnd32, dictAz);
|
|
|
2130
2246
|
|
|
2131
2247
|
function unique(rnd, len = 1, mem) {
|
|
2132
2248
|
const independence = !mem;
|
|
2133
|
-
mem ??= new
|
|
2249
|
+
mem ??= new Set();
|
|
2134
2250
|
const trials = 3;
|
|
2135
2251
|
let prefixes;
|
|
2136
2252
|
let prefix = '';
|
|
@@ -2144,7 +2260,7 @@ function unique(rnd, len = 1, mem) {
|
|
|
2144
2260
|
} catch (reason) {
|
|
2145
2261
|
// ベンチマーク程度でもSetがパンクする場合がある。
|
|
2146
2262
|
if (!independence) throw reason;
|
|
2147
|
-
prefixes ??= new
|
|
2263
|
+
prefixes ??= new Set();
|
|
2148
2264
|
prefix ||= '?';
|
|
2149
2265
|
|
|
2150
2266
|
for (let i = 0; i < trials; ++i) {
|
|
@@ -2155,7 +2271,7 @@ function unique(rnd, len = 1, mem) {
|
|
|
2155
2271
|
return random();
|
|
2156
2272
|
}
|
|
2157
2273
|
|
|
2158
|
-
prefixes = new
|
|
2274
|
+
prefixes = new Set();
|
|
2159
2275
|
prefix += '?';
|
|
2160
2276
|
return random();
|
|
2161
2277
|
}
|
|
@@ -2193,30 +2309,25 @@ function conv(rnd, dict) {
|
|
|
2193
2309
|
|
|
2194
2310
|
const buffer = new Uint16Array(512);
|
|
2195
2311
|
const digit = 16;
|
|
2196
|
-
let index =
|
|
2197
|
-
let
|
|
2198
|
-
let offset =
|
|
2312
|
+
let index = 0;
|
|
2313
|
+
let buf = 0;
|
|
2314
|
+
let offset = 0;
|
|
2199
2315
|
|
|
2200
2316
|
function random(len) {
|
|
2201
|
-
if (
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
return r;
|
|
2212
|
-
} else if (offset > len) {
|
|
2213
|
-
offset -= len;
|
|
2214
|
-
return rnd >> offset & masks[len];
|
|
2215
|
-
} else {
|
|
2216
|
-
offset = digit;
|
|
2217
|
-
rnd = buffer[++index] ?? 2 ** digit;
|
|
2218
|
-
return random(len);
|
|
2317
|
+
if (offset < len) {
|
|
2318
|
+
if (index === 0) {
|
|
2319
|
+
crypto.getRandomValues(buffer);
|
|
2320
|
+
index = buffer.length - 1;
|
|
2321
|
+
buf = buffer[index];
|
|
2322
|
+
offset = digit;
|
|
2323
|
+
} else {
|
|
2324
|
+
buf = buf << digit | buffer[--index];
|
|
2325
|
+
offset += digit;
|
|
2326
|
+
}
|
|
2219
2327
|
}
|
|
2328
|
+
|
|
2329
|
+
offset -= len;
|
|
2330
|
+
return buf >> offset & masks[len];
|
|
2220
2331
|
}
|
|
2221
2332
|
|
|
2222
2333
|
function xorshift(seed = xorshift.seed()) {
|
|
@@ -2235,7 +2346,7 @@ exports.xorshift = xorshift;
|
|
|
2235
2346
|
const max = -1 >>> 0;
|
|
2236
2347
|
|
|
2237
2348
|
function seed() {
|
|
2238
|
-
return
|
|
2349
|
+
return Math.random() * max + 1 >>> 0;
|
|
2239
2350
|
}
|
|
2240
2351
|
|
|
2241
2352
|
xorshift.seed = seed;
|
|
@@ -2285,16 +2396,12 @@ exports.pcg32 = pcg32;
|
|
|
2285
2396
|
seed[0] = uint64n(oldstate * MULT + seed[1]);
|
|
2286
2397
|
const xorshifted = uint32n((oldstate >> 18n ^ oldstate) >> 27n);
|
|
2287
2398
|
const rot = oldstate >> 59n;
|
|
2288
|
-
return
|
|
2399
|
+
return Number(uint32n(xorshifted >> rot | xorshifted << (-rot & 31n)));
|
|
2289
2400
|
}
|
|
2290
2401
|
|
|
2291
2402
|
pcg32.next = next;
|
|
2292
2403
|
|
|
2293
2404
|
function advance(seed, delta) {
|
|
2294
|
-
while (delta < 0) {
|
|
2295
|
-
delta = 2n ** 64n + delta;
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
2405
|
delta = uint64n(delta);
|
|
2299
2406
|
let acc_mult = 1n;
|
|
2300
2407
|
let acc_plus = 0n;
|
|
@@ -2386,8 +2493,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2386
2493
|
}));
|
|
2387
2494
|
exports.isPrimitive = exports.is = exports.type = void 0;
|
|
2388
2495
|
|
|
2389
|
-
const global_1 = __webpack_require__(4128);
|
|
2390
|
-
|
|
2391
2496
|
const alias_1 = __webpack_require__(5406);
|
|
2392
2497
|
|
|
2393
2498
|
const ObjectPrototype = Object.prototype;
|
|
@@ -2402,7 +2507,7 @@ function type(value) {
|
|
|
2402
2507
|
|
|
2403
2508
|
case 'object':
|
|
2404
2509
|
if (value === null) return 'null';
|
|
2405
|
-
const tag = value[
|
|
2510
|
+
const tag = value[Symbol.toStringTag];
|
|
2406
2511
|
if (tag) return tag;
|
|
2407
2512
|
|
|
2408
2513
|
switch ((0, alias_1.ObjectGetPrototypeOf)(value)) {
|
|
@@ -2469,8 +2574,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2469
2574
|
}));
|
|
2470
2575
|
exports.URL = exports.ReadonlyURL = exports.standardize = void 0;
|
|
2471
2576
|
|
|
2472
|
-
const global_1 = __webpack_require__(4128);
|
|
2473
|
-
|
|
2474
2577
|
const format_1 = __webpack_require__(137);
|
|
2475
2578
|
|
|
2476
2579
|
var format_2 = __webpack_require__(137);
|
|
@@ -2563,7 +2666,7 @@ class URL {
|
|
|
2563
2666
|
}
|
|
2564
2667
|
|
|
2565
2668
|
get searchParams() {
|
|
2566
|
-
return this.params ??= new
|
|
2669
|
+
return this.params ??= new URLSearchParams(this.search);
|
|
2567
2670
|
}
|
|
2568
2671
|
|
|
2569
2672
|
toString() {
|
|
@@ -2591,7 +2694,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2591
2694
|
}));
|
|
2592
2695
|
exports.ReadonlyURL = exports._encode = exports.standardize = void 0;
|
|
2593
2696
|
|
|
2594
|
-
|
|
2697
|
+
__webpack_require__(4128);
|
|
2595
2698
|
|
|
2596
2699
|
const memoize_1 = __webpack_require__(1808);
|
|
2597
2700
|
|
|
@@ -2607,7 +2710,7 @@ exports.standardize = standardize;
|
|
|
2607
2710
|
|
|
2608
2711
|
function encode(url) {
|
|
2609
2712
|
return url // Percent-encoding
|
|
2610
|
-
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[\uDC00-\uDFFF]/g, str => str.length === 2 ? str : '').replace(/%(?![0-9A-F]{2})|[^%\[\]]+/ig,
|
|
2713
|
+
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[\uDC00-\uDFFF]/g, str => str.length === 2 ? str : '').replace(/%(?![0-9A-F]{2})|[^%\[\]]+/ig, encodeURI).replace(/\?[^#]+/, query => '?' + query.slice(1).replace(/%[0-9A-F]{2}|%|[^=&]+/ig, str => str[0] === '%' && str.length === 3 ? str : encodeURIComponent(str))) // Use uppercase letters within percent-encoding triplets
|
|
2611
2714
|
.replace(/%[0-9A-F]{2}/ig, str => str.toUpperCase()).replace(/#.+/, url.slice(url.indexOf('#')));
|
|
2612
2715
|
}
|
|
2613
2716
|
|
|
@@ -2621,7 +2724,7 @@ class ReadonlyURL {
|
|
|
2621
2724
|
switch (source.slice(0, source.lastIndexOf('://', 9) + 1).toLowerCase()) {
|
|
2622
2725
|
case 'http:':
|
|
2623
2726
|
case 'https:':
|
|
2624
|
-
base =
|
|
2727
|
+
base = undefined;
|
|
2625
2728
|
break;
|
|
2626
2729
|
|
|
2627
2730
|
default:
|
|
@@ -2708,7 +2811,7 @@ class ReadonlyURL {
|
|
|
2708
2811
|
}
|
|
2709
2812
|
|
|
2710
2813
|
get searchParams() {
|
|
2711
|
-
return this.params ??= new
|
|
2814
|
+
return this.params ??= new URLSearchParams(this.search);
|
|
2712
2815
|
}
|
|
2713
2816
|
|
|
2714
2817
|
toString() {
|
|
@@ -2727,7 +2830,7 @@ exports.ReadonlyURL = ReadonlyURL; // Can't freeze URL object in the Firefox ext
|
|
|
2727
2830
|
// @ts-ignore
|
|
2728
2831
|
|
|
2729
2832
|
ReadonlyURL.get = (0, memoize_1.memoize)((url, base) => ({
|
|
2730
|
-
url: new
|
|
2833
|
+
url: new __webpack_require__.g.URL(url, base)
|
|
2731
2834
|
}), (url, base = '') => `${base.indexOf('\n') > -1 ? base.replace(/\n+/g, '') : base}\n${url}`, new cache_1.Cache(10000));
|
|
2732
2835
|
|
|
2733
2836
|
/***/ }),
|
|
@@ -2826,8 +2929,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2826
2929
|
}));
|
|
2827
2930
|
exports.block = void 0;
|
|
2828
2931
|
|
|
2829
|
-
const global_1 = __webpack_require__(4128);
|
|
2830
|
-
|
|
2831
2932
|
const parser_1 = __webpack_require__(6728);
|
|
2832
2933
|
|
|
2833
2934
|
const memo_1 = __webpack_require__(1090);
|
|
@@ -2845,10 +2946,10 @@ function block(parser, separation = true) {
|
|
|
2845
2946
|
source,
|
|
2846
2947
|
context
|
|
2847
2948
|
});
|
|
2848
|
-
if (
|
|
2949
|
+
if (result === undefined) return;
|
|
2849
2950
|
const rest = (0, parser_1.exec)(result);
|
|
2850
2951
|
if (separation && !(0, line_1.isEmpty)((0, line_1.firstline)(rest))) return;
|
|
2851
|
-
return rest === '' || source[source.length - rest.length - 1] === '\n' ? result :
|
|
2952
|
+
return rest === '' || source[source.length - rest.length - 1] === '\n' ? result : undefined;
|
|
2852
2953
|
};
|
|
2853
2954
|
}
|
|
2854
2955
|
|
|
@@ -2867,7 +2968,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2867
2968
|
}));
|
|
2868
2969
|
exports.verify = exports.validate = void 0;
|
|
2869
2970
|
|
|
2870
|
-
|
|
2971
|
+
__webpack_require__(4128);
|
|
2871
2972
|
|
|
2872
2973
|
const alias_1 = __webpack_require__(5406);
|
|
2873
2974
|
|
|
@@ -2876,7 +2977,7 @@ const parser_1 = __webpack_require__(6728);
|
|
|
2876
2977
|
function validate(patterns, has, parser) {
|
|
2877
2978
|
if (typeof has === 'function') return validate(patterns, '', has);
|
|
2878
2979
|
if (!(0, alias_1.isArray)(patterns)) return validate([patterns], has, parser);
|
|
2879
|
-
const match =
|
|
2980
|
+
const match = __webpack_require__.g.eval(['source =>', patterns.map(pattern => typeof pattern === 'string' ? `|| source.slice(0, ${pattern.length}) === '${pattern}'` : `|| /${pattern.source}/${pattern.flags}.test(source)`).join('').slice(2)].join(''));
|
|
2880
2981
|
return ({
|
|
2881
2982
|
source,
|
|
2882
2983
|
context
|
|
@@ -2887,8 +2988,8 @@ function validate(patterns, has, parser) {
|
|
|
2887
2988
|
source,
|
|
2888
2989
|
context
|
|
2889
2990
|
});
|
|
2890
|
-
if (
|
|
2891
|
-
return (0, parser_1.exec)(result).length < source.length ? result :
|
|
2991
|
+
if (result === undefined) return;
|
|
2992
|
+
return (0, parser_1.exec)(result).length < source.length ? result : undefined;
|
|
2892
2993
|
};
|
|
2893
2994
|
}
|
|
2894
2995
|
|
|
@@ -2904,9 +3005,9 @@ function verify(parser, cond) {
|
|
|
2904
3005
|
source,
|
|
2905
3006
|
context
|
|
2906
3007
|
});
|
|
2907
|
-
if (
|
|
3008
|
+
if (result === undefined) return;
|
|
2908
3009
|
if (!cond((0, parser_1.eval)(result), (0, parser_1.exec)(result), context)) return;
|
|
2909
|
-
return (0, parser_1.exec)(result).length < source.length ? result :
|
|
3010
|
+
return (0, parser_1.exec)(result).length < source.length ? result : undefined;
|
|
2910
3011
|
};
|
|
2911
3012
|
}
|
|
2912
3013
|
|
|
@@ -2925,8 +3026,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2925
3026
|
}));
|
|
2926
3027
|
exports.isEmpty = exports.firstline = exports.line = void 0;
|
|
2927
3028
|
|
|
2928
|
-
const global_1 = __webpack_require__(4128);
|
|
2929
|
-
|
|
2930
3029
|
const parser_1 = __webpack_require__(6728);
|
|
2931
3030
|
|
|
2932
3031
|
const memo_1 = __webpack_require__(1090);
|
|
@@ -2946,8 +3045,8 @@ function line(parser) {
|
|
|
2946
3045
|
context
|
|
2947
3046
|
});
|
|
2948
3047
|
context.offset -= source.length - line.length;
|
|
2949
|
-
if (
|
|
2950
|
-
return isEmpty((0, parser_1.exec)(result)) ? [(0, parser_1.eval)(result), source.slice(line.length)] :
|
|
3048
|
+
if (result === undefined) return;
|
|
3049
|
+
return isEmpty((0, parser_1.exec)(result)) ? [(0, parser_1.eval)(result), source.slice(line.length)] : undefined;
|
|
2951
3050
|
};
|
|
2952
3051
|
}
|
|
2953
3052
|
|
|
@@ -3138,8 +3237,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3138
3237
|
}));
|
|
3139
3238
|
exports.indent = void 0;
|
|
3140
3239
|
|
|
3141
|
-
const global_1 = __webpack_require__(4128);
|
|
3142
|
-
|
|
3143
3240
|
const parser_1 = __webpack_require__(6728);
|
|
3144
3241
|
|
|
3145
3242
|
const some_1 = __webpack_require__(5418);
|
|
@@ -3168,7 +3265,7 @@ function indent(opener, parser, separation = false) {
|
|
|
3168
3265
|
context
|
|
3169
3266
|
});
|
|
3170
3267
|
context.offset -= rest.length;
|
|
3171
|
-
return result && (0, parser_1.exec)(result) === '' ? [(0, parser_1.eval)(result), rest] :
|
|
3268
|
+
return result && (0, parser_1.exec)(result) === '' ? [(0, parser_1.eval)(result), rest] : undefined;
|
|
3172
3269
|
});
|
|
3173
3270
|
}
|
|
3174
3271
|
|
|
@@ -3211,8 +3308,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3211
3308
|
}));
|
|
3212
3309
|
exports.match = void 0;
|
|
3213
3310
|
|
|
3214
|
-
const global_1 = __webpack_require__(4128);
|
|
3215
|
-
|
|
3216
3311
|
const parser_1 = __webpack_require__(6728);
|
|
3217
3312
|
|
|
3218
3313
|
function match(pattern, f) {
|
|
@@ -3227,8 +3322,8 @@ function match(pattern, f) {
|
|
|
3227
3322
|
source,
|
|
3228
3323
|
context
|
|
3229
3324
|
});
|
|
3230
|
-
if (
|
|
3231
|
-
return (0, parser_1.exec)(result).length < source.length && (0, parser_1.exec)(result).length <= source.length ? result :
|
|
3325
|
+
if (result === undefined) return;
|
|
3326
|
+
return (0, parser_1.exec)(result).length < source.length && (0, parser_1.exec)(result).length <= source.length ? result : undefined;
|
|
3232
3327
|
};
|
|
3233
3328
|
}
|
|
3234
3329
|
|
|
@@ -3293,8 +3388,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3293
3388
|
}));
|
|
3294
3389
|
exports.rewrite = exports.focus = void 0;
|
|
3295
3390
|
|
|
3296
|
-
const global_1 = __webpack_require__(4128);
|
|
3297
|
-
|
|
3298
3391
|
const parser_1 = __webpack_require__(6728);
|
|
3299
3392
|
|
|
3300
3393
|
function focus(scope, parser) {
|
|
@@ -3313,8 +3406,8 @@ function focus(scope, parser) {
|
|
|
3313
3406
|
context
|
|
3314
3407
|
});
|
|
3315
3408
|
context.offset -= source.length - src.length;
|
|
3316
|
-
if (
|
|
3317
|
-
return (0, parser_1.exec)(result).length < src.length ? [(0, parser_1.eval)(result), (0, parser_1.exec)(result) + source.slice(src.length)] :
|
|
3409
|
+
if (result === undefined) return;
|
|
3410
|
+
return (0, parser_1.exec)(result).length < src.length ? [(0, parser_1.eval)(result), (0, parser_1.exec)(result) + source.slice(src.length)] : undefined;
|
|
3318
3411
|
};
|
|
3319
3412
|
}
|
|
3320
3413
|
|
|
@@ -3327,13 +3420,13 @@ function rewrite(scope, parser) {
|
|
|
3327
3420
|
}) => {
|
|
3328
3421
|
if (source === '') return;
|
|
3329
3422
|
const memo = context.memo;
|
|
3330
|
-
context.memo =
|
|
3423
|
+
context.memo = undefined;
|
|
3331
3424
|
const res1 = scope({
|
|
3332
3425
|
source,
|
|
3333
3426
|
context
|
|
3334
3427
|
});
|
|
3335
3428
|
context.memo = memo;
|
|
3336
|
-
if (
|
|
3429
|
+
if (res1 === undefined || (0, parser_1.exec)(res1).length >= source.length) return;
|
|
3337
3430
|
const src = source.slice(0, source.length - (0, parser_1.exec)(res1).length);
|
|
3338
3431
|
context.offset ??= 0;
|
|
3339
3432
|
context.offset += source.length - src.length;
|
|
@@ -3342,8 +3435,8 @@ function rewrite(scope, parser) {
|
|
|
3342
3435
|
context
|
|
3343
3436
|
});
|
|
3344
3437
|
context.offset -= source.length - src.length;
|
|
3345
|
-
if (
|
|
3346
|
-
return (0, parser_1.exec)(res2).length < src.length ? [(0, parser_1.eval)(res2), (0, parser_1.exec)(res2) + (0, parser_1.exec)(res1)] :
|
|
3438
|
+
if (res2 === undefined) return;
|
|
3439
|
+
return (0, parser_1.exec)(res2).length < src.length ? [(0, parser_1.eval)(res2), (0, parser_1.exec)(res2) + (0, parser_1.exec)(res1)] : undefined;
|
|
3347
3440
|
};
|
|
3348
3441
|
}
|
|
3349
3442
|
|
|
@@ -3362,8 +3455,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3362
3455
|
}));
|
|
3363
3456
|
exports.clear = exports.close = exports.open = exports.surround = void 0;
|
|
3364
3457
|
|
|
3365
|
-
const global_1 = __webpack_require__(4128);
|
|
3366
|
-
|
|
3367
3458
|
const parser_1 = __webpack_require__(6728);
|
|
3368
3459
|
|
|
3369
3460
|
const fmap_1 = __webpack_require__(502);
|
|
@@ -3393,13 +3484,13 @@ function surround(opener, parser, closer, optional = false, f, g) {
|
|
|
3393
3484
|
source: lmr_,
|
|
3394
3485
|
context
|
|
3395
3486
|
});
|
|
3396
|
-
if (
|
|
3487
|
+
if (res1 === undefined) return;
|
|
3397
3488
|
const rl = (0, parser_1.eval)(res1);
|
|
3398
3489
|
const mr_ = (0, parser_1.exec)(res1);
|
|
3399
3490
|
const res2 = mr_ !== '' ? parser({
|
|
3400
3491
|
source: mr_,
|
|
3401
3492
|
context
|
|
3402
|
-
}) :
|
|
3493
|
+
}) : undefined;
|
|
3403
3494
|
const rm = (0, parser_1.eval)(res2);
|
|
3404
3495
|
const r_ = (0, parser_1.exec)(res2, mr_);
|
|
3405
3496
|
if (!rm && !optional) return;
|
|
@@ -3410,7 +3501,7 @@ function surround(opener, parser, closer, optional = false, f, g) {
|
|
|
3410
3501
|
const rr = (0, parser_1.eval)(res3);
|
|
3411
3502
|
const rest = (0, parser_1.exec)(res3, r_);
|
|
3412
3503
|
if (rest.length === lmr_.length) return;
|
|
3413
|
-
return rr ? f ? f([rl, rm, rr], rest, context) : [(0, array_1.push)((0, array_1.unshift)(rl, rm ?? []), rr), rest] : g ? g([rl, rm, mr_], rest, context) :
|
|
3504
|
+
return rr ? f ? f([rl, rm, rr], rest, context) : [(0, array_1.push)((0, array_1.unshift)(rl, rm ?? []), rr), rest] : g ? g([rl, rm, mr_], rest, context) : undefined;
|
|
3414
3505
|
};
|
|
3415
3506
|
}
|
|
3416
3507
|
|
|
@@ -3421,14 +3512,14 @@ function match(pattern) {
|
|
|
3421
3512
|
case 'string':
|
|
3422
3513
|
return ({
|
|
3423
3514
|
source
|
|
3424
|
-
}) => source.slice(0, pattern.length) === pattern ? [[], source.slice(pattern.length)] :
|
|
3515
|
+
}) => source.slice(0, pattern.length) === pattern ? [[], source.slice(pattern.length)] : undefined;
|
|
3425
3516
|
|
|
3426
3517
|
case 'object':
|
|
3427
3518
|
return ({
|
|
3428
3519
|
source
|
|
3429
3520
|
}) => {
|
|
3430
3521
|
const m = source.match(pattern);
|
|
3431
|
-
return m ? [[], source.slice(m[0].length)] :
|
|
3522
|
+
return m ? [[], source.slice(m[0].length)] : undefined;
|
|
3432
3523
|
};
|
|
3433
3524
|
}
|
|
3434
3525
|
}
|
|
@@ -3497,8 +3588,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3497
3588
|
}));
|
|
3498
3589
|
exports.bind = void 0;
|
|
3499
3590
|
|
|
3500
|
-
const global_1 = __webpack_require__(4128);
|
|
3501
|
-
|
|
3502
3591
|
const parser_1 = __webpack_require__(6728);
|
|
3503
3592
|
|
|
3504
3593
|
function bind(parser, f) {
|
|
@@ -3511,10 +3600,10 @@ function bind(parser, f) {
|
|
|
3511
3600
|
source,
|
|
3512
3601
|
context
|
|
3513
3602
|
});
|
|
3514
|
-
if (
|
|
3603
|
+
if (res1 === undefined) return;
|
|
3515
3604
|
const res2 = f((0, parser_1.eval)(res1), (0, parser_1.exec)(res1), context);
|
|
3516
|
-
if (
|
|
3517
|
-
return (0, parser_1.exec)(res2).length <= (0, parser_1.exec)(res1).length ? res2 :
|
|
3605
|
+
if (res2 === undefined) return;
|
|
3606
|
+
return (0, parser_1.exec)(res2).length <= (0, parser_1.exec)(res1).length ? res2 : undefined;
|
|
3518
3607
|
};
|
|
3519
3608
|
}
|
|
3520
3609
|
|
|
@@ -3585,8 +3674,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3585
3674
|
}));
|
|
3586
3675
|
exports.state = exports.constraint = exports.guard = exports.precedence = exports.creation = exports.syntax = exports.context = exports.reset = void 0;
|
|
3587
3676
|
|
|
3588
|
-
const global_1 = __webpack_require__(4128);
|
|
3589
|
-
|
|
3590
3677
|
const alias_1 = __webpack_require__(5406);
|
|
3591
3678
|
|
|
3592
3679
|
const parser_1 = __webpack_require__(6728);
|
|
@@ -3595,11 +3682,11 @@ const memo_1 = __webpack_require__(1090);
|
|
|
3595
3682
|
|
|
3596
3683
|
function reset(base, parser) {
|
|
3597
3684
|
if (!('memo' in base)) {
|
|
3598
|
-
base.memo =
|
|
3685
|
+
base.memo = undefined;
|
|
3599
3686
|
}
|
|
3600
3687
|
|
|
3601
|
-
const changes =
|
|
3602
|
-
const values =
|
|
3688
|
+
const changes = Object.entries(base);
|
|
3689
|
+
const values = Array(changes.length);
|
|
3603
3690
|
return ({
|
|
3604
3691
|
source,
|
|
3605
3692
|
context
|
|
@@ -3609,8 +3696,8 @@ function reset(base, parser) {
|
|
|
3609
3696
|
exports.reset = reset;
|
|
3610
3697
|
|
|
3611
3698
|
function context(base, parser) {
|
|
3612
|
-
const changes =
|
|
3613
|
-
const values =
|
|
3699
|
+
const changes = Object.entries(base);
|
|
3700
|
+
const values = Array(changes.length);
|
|
3614
3701
|
return ({
|
|
3615
3702
|
source,
|
|
3616
3703
|
context
|
|
@@ -3660,7 +3747,7 @@ function apply(parser, source, context, changes, values, reset = false) {
|
|
|
3660
3747
|
|
|
3661
3748
|
default:
|
|
3662
3749
|
context[prop] = values[i];
|
|
3663
|
-
values[i] =
|
|
3750
|
+
values[i] = undefined;
|
|
3664
3751
|
}
|
|
3665
3752
|
}
|
|
3666
3753
|
return result;
|
|
@@ -3678,7 +3765,7 @@ function syntax(syntax, prec, cost, state, parser) {
|
|
|
3678
3765
|
const stateOuter = context.state ?? 0;
|
|
3679
3766
|
const stateInner = context.state = stateOuter | state;
|
|
3680
3767
|
const cache = syntax && stateInner & memo.targets && memo.get(position, syntax, stateInner);
|
|
3681
|
-
const result = cache ? cache.length === 0 ?
|
|
3768
|
+
const result = cache ? cache.length === 0 ? undefined : [cache[0], source.slice(cache[1])] : parser({
|
|
3682
3769
|
source,
|
|
3683
3770
|
context
|
|
3684
3771
|
});
|
|
@@ -3753,7 +3840,7 @@ function guard(f, parser) {
|
|
|
3753
3840
|
}) => f(context) ? parser({
|
|
3754
3841
|
source,
|
|
3755
3842
|
context
|
|
3756
|
-
}) :
|
|
3843
|
+
}) : undefined;
|
|
3757
3844
|
}
|
|
3758
3845
|
|
|
3759
3846
|
exports.guard = guard;
|
|
@@ -3772,7 +3859,7 @@ function constraint(state, positive, parser) {
|
|
|
3772
3859
|
return s === state ? parser({
|
|
3773
3860
|
source,
|
|
3774
3861
|
context
|
|
3775
|
-
}) :
|
|
3862
|
+
}) : undefined;
|
|
3776
3863
|
};
|
|
3777
3864
|
}
|
|
3778
3865
|
|
|
@@ -3967,8 +4054,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3967
4054
|
}));
|
|
3968
4055
|
exports.inits = void 0;
|
|
3969
4056
|
|
|
3970
|
-
const global_1 = __webpack_require__(4128);
|
|
3971
|
-
|
|
3972
4057
|
const parser_1 = __webpack_require__(6728);
|
|
3973
4058
|
|
|
3974
4059
|
const array_1 = __webpack_require__(8112);
|
|
@@ -3989,13 +4074,13 @@ function inits(parsers, resume) {
|
|
|
3989
4074
|
source: rest,
|
|
3990
4075
|
context
|
|
3991
4076
|
});
|
|
3992
|
-
if (
|
|
4077
|
+
if (result === undefined) break;
|
|
3993
4078
|
nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
3994
4079
|
rest = (0, parser_1.exec)(result);
|
|
3995
4080
|
if (resume?.((0, parser_1.eval)(result), (0, parser_1.exec)(result)) === false) break;
|
|
3996
4081
|
}
|
|
3997
4082
|
|
|
3998
|
-
return nodes && rest.length < source.length ? [nodes, rest] :
|
|
4083
|
+
return nodes && rest.length < source.length ? [nodes, rest] : undefined;
|
|
3999
4084
|
};
|
|
4000
4085
|
}
|
|
4001
4086
|
|
|
@@ -4014,8 +4099,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4014
4099
|
}));
|
|
4015
4100
|
exports.sequence = void 0;
|
|
4016
4101
|
|
|
4017
|
-
const global_1 = __webpack_require__(4128);
|
|
4018
|
-
|
|
4019
4102
|
const parser_1 = __webpack_require__(6728);
|
|
4020
4103
|
|
|
4021
4104
|
const array_1 = __webpack_require__(8112);
|
|
@@ -4036,13 +4119,13 @@ function sequence(parsers, resume) {
|
|
|
4036
4119
|
source: rest,
|
|
4037
4120
|
context
|
|
4038
4121
|
});
|
|
4039
|
-
if (
|
|
4122
|
+
if (result === undefined) return;
|
|
4040
4123
|
nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
4041
4124
|
rest = (0, parser_1.exec)(result);
|
|
4042
4125
|
if (resume?.((0, parser_1.eval)(result), (0, parser_1.exec)(result)) === false) return;
|
|
4043
4126
|
}
|
|
4044
4127
|
|
|
4045
|
-
return nodes && rest.length < source.length ? [nodes, rest] :
|
|
4128
|
+
return nodes && rest.length < source.length ? [nodes, rest] : undefined;
|
|
4046
4129
|
};
|
|
4047
4130
|
}
|
|
4048
4131
|
|
|
@@ -4061,8 +4144,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4061
4144
|
}));
|
|
4062
4145
|
exports.some = void 0;
|
|
4063
4146
|
|
|
4064
|
-
const global_1 = __webpack_require__(4128);
|
|
4065
|
-
|
|
4066
4147
|
const parser_1 = __webpack_require__(6728);
|
|
4067
4148
|
|
|
4068
4149
|
const delimiter_1 = __webpack_require__(1435);
|
|
@@ -4070,7 +4151,7 @@ const delimiter_1 = __webpack_require__(1435);
|
|
|
4070
4151
|
const array_1 = __webpack_require__(8112);
|
|
4071
4152
|
|
|
4072
4153
|
function some(parser, end, delimiters = [], limit = -1) {
|
|
4073
|
-
if (typeof end === 'number') return some(parser,
|
|
4154
|
+
if (typeof end === 'number') return some(parser, undefined, delimiters, end);
|
|
4074
4155
|
const match = delimiter_1.Delimiters.matcher(end);
|
|
4075
4156
|
const delims = delimiters.map(([delimiter, precedence]) => ({
|
|
4076
4157
|
signature: delimiter_1.Delimiters.signature(delimiter),
|
|
@@ -4098,7 +4179,7 @@ function some(parser, end, delimiters = [], limit = -1) {
|
|
|
4098
4179
|
source: rest,
|
|
4099
4180
|
context
|
|
4100
4181
|
});
|
|
4101
|
-
if (
|
|
4182
|
+
if (result === undefined) break;
|
|
4102
4183
|
nodes = nodes ? nodes.length < (0, parser_1.eval)(result).length ? (0, array_1.unshift)(nodes, (0, parser_1.eval)(result)) : (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
4103
4184
|
rest = (0, parser_1.exec)(result);
|
|
4104
4185
|
if (limit >= 0 && source.length - rest.length > limit) break;
|
|
@@ -4108,7 +4189,7 @@ function some(parser, end, delimiters = [], limit = -1) {
|
|
|
4108
4189
|
context.delimiters.pop(delims.length);
|
|
4109
4190
|
}
|
|
4110
4191
|
|
|
4111
|
-
return nodes && rest.length < source.length ? [nodes, rest] :
|
|
4192
|
+
return nodes && rest.length < source.length ? [nodes, rest] : undefined;
|
|
4112
4193
|
};
|
|
4113
4194
|
}
|
|
4114
4195
|
|
|
@@ -4163,7 +4244,7 @@ exports.tails = tails;
|
|
|
4163
4244
|
/***/ }),
|
|
4164
4245
|
|
|
4165
4246
|
/***/ 6366:
|
|
4166
|
-
/***/ ((__unused_webpack_module, exports
|
|
4247
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
4167
4248
|
|
|
4168
4249
|
"use strict";
|
|
4169
4250
|
|
|
@@ -4173,30 +4254,16 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4173
4254
|
}));
|
|
4174
4255
|
exports.union = void 0;
|
|
4175
4256
|
|
|
4176
|
-
const global_1 = __webpack_require__(4128);
|
|
4177
|
-
|
|
4178
4257
|
function union(parsers) {
|
|
4179
4258
|
switch (parsers.length) {
|
|
4180
4259
|
case 0:
|
|
4181
|
-
return () =>
|
|
4260
|
+
return () => undefined;
|
|
4182
4261
|
|
|
4183
4262
|
case 1:
|
|
4184
4263
|
return parsers[0];
|
|
4185
4264
|
|
|
4186
|
-
case 2:
|
|
4187
|
-
return input => parsers[0](input) ?? parsers[1](input);
|
|
4188
|
-
|
|
4189
|
-
case 3:
|
|
4190
|
-
return input => parsers[0](input) ?? parsers[1](input) ?? parsers[2](input);
|
|
4191
|
-
|
|
4192
4265
|
default:
|
|
4193
|
-
return input => {
|
|
4194
|
-
for (let i = 0; i < parsers.length; ++i) {
|
|
4195
|
-
const parser = parsers[i];
|
|
4196
|
-
const result = parser(input);
|
|
4197
|
-
if (result) return result;
|
|
4198
|
-
}
|
|
4199
|
-
};
|
|
4266
|
+
return eval(['input =>', parsers.map((_, i) => `|| parsers[${i}](input)`).join('').slice(2)].join(''));
|
|
4200
4267
|
}
|
|
4201
4268
|
}
|
|
4202
4269
|
|
|
@@ -4325,8 +4392,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4325
4392
|
}));
|
|
4326
4393
|
exports.bind = void 0;
|
|
4327
4394
|
|
|
4328
|
-
const global_1 = __webpack_require__(4128);
|
|
4329
|
-
|
|
4330
4395
|
const parser_1 = __webpack_require__(6728);
|
|
4331
4396
|
|
|
4332
4397
|
const memo_1 = __webpack_require__(1090);
|
|
@@ -4351,7 +4416,7 @@ const array_1 = __webpack_require__(8112);
|
|
|
4351
4416
|
|
|
4352
4417
|
function bind(target, settings) {
|
|
4353
4418
|
let context = { ...settings,
|
|
4354
|
-
host: settings.host ?? new url_1.ReadonlyURL(
|
|
4419
|
+
host: settings.host ?? new url_1.ReadonlyURL(location.pathname, location.origin),
|
|
4355
4420
|
memo: new memo_1.Memo({
|
|
4356
4421
|
targets: 236
|
|
4357
4422
|
/* State.backtrackers */
|
|
@@ -4376,7 +4441,7 @@ function bind(target, settings) {
|
|
|
4376
4441
|
source = (0, normalize_1.normalize)((0, segment_1.validate)(source, segment_1.MAX_INPUT_SIZE) ? source : source.slice(0, segment_1.MAX_INPUT_SIZE + 1)); // Change the object identity.
|
|
4377
4442
|
|
|
4378
4443
|
context = { ...context,
|
|
4379
|
-
url: url ? new url_1.ReadonlyURL(url) :
|
|
4444
|
+
url: url ? new url_1.ReadonlyURL(url) : undefined
|
|
4380
4445
|
};
|
|
4381
4446
|
const rev = revision = Symbol();
|
|
4382
4447
|
const sourceSegments = [];
|
|
@@ -4692,8 +4757,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4692
4757
|
}));
|
|
4693
4758
|
exports.parse = void 0;
|
|
4694
4759
|
|
|
4695
|
-
const global_1 = __webpack_require__(4128);
|
|
4696
|
-
|
|
4697
4760
|
const parser_1 = __webpack_require__(6728);
|
|
4698
4761
|
|
|
4699
4762
|
const memo_1 = __webpack_require__(1090);
|
|
@@ -4721,7 +4784,7 @@ function parse(source, opts = {}, context) {
|
|
|
4721
4784
|
const url = (0, header_2.headers)(source).find(field => field.toLowerCase().startsWith('url:'))?.slice(4).trim() ?? '';
|
|
4722
4785
|
source = !context ? (0, normalize_1.normalize)(source) : source;
|
|
4723
4786
|
context = {
|
|
4724
|
-
host: opts.host ?? context?.host ?? new url_1.ReadonlyURL(
|
|
4787
|
+
host: opts.host ?? context?.host ?? new url_1.ReadonlyURL(location.pathname, location.origin),
|
|
4725
4788
|
url: url ? new url_1.ReadonlyURL(url) : context?.url,
|
|
4726
4789
|
id: opts.id ?? context?.id,
|
|
4727
4790
|
caches: context?.caches,
|
|
@@ -4820,8 +4883,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4820
4883
|
}));
|
|
4821
4884
|
exports.block = void 0;
|
|
4822
4885
|
|
|
4823
|
-
const global_1 = __webpack_require__(4128);
|
|
4824
|
-
|
|
4825
4886
|
const combinator_1 = __webpack_require__(2087);
|
|
4826
4887
|
|
|
4827
4888
|
const source_1 = __webpack_require__(6743);
|
|
@@ -4876,12 +4937,12 @@ function error(parser) {
|
|
|
4876
4937
|
id
|
|
4877
4938
|
}
|
|
4878
4939
|
}, reason) => [[(0, dom_1.html)('h1', {
|
|
4879
|
-
id: id !== '' ? `error:${(0, random_1.rnd0Z)(8)}` :
|
|
4940
|
+
id: id !== '' ? `error:${(0, random_1.rnd0Z)(8)}` : undefined,
|
|
4880
4941
|
class: 'error'
|
|
4881
4942
|
}, reason instanceof Error ? `${reason.name}: ${reason.message}` : `UnknownError: ${reason}`), (0, dom_1.html)('pre', {
|
|
4882
4943
|
class: 'error',
|
|
4883
4944
|
translate: 'no'
|
|
4884
|
-
}, source.replace(/^\x07.*\n/, '').slice(0, 1001).replace(/^(.{997}).{4}$/s, '$1...') ||
|
|
4945
|
+
}, source.replace(/^\x07.*\n/, '').slice(0, 1001).replace(/^(.{997}).{4}$/s, '$1...') || undefined)], '']);
|
|
4885
4946
|
}
|
|
4886
4947
|
|
|
4887
4948
|
/***/ }),
|
|
@@ -4944,8 +5005,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
4944
5005
|
}));
|
|
4945
5006
|
exports.codeblock = exports.segment_ = exports.segment = void 0;
|
|
4946
5007
|
|
|
4947
|
-
const global_1 = __webpack_require__(4128);
|
|
4948
|
-
|
|
4949
5008
|
const parser_1 = __webpack_require__(6728);
|
|
4950
5009
|
|
|
4951
5010
|
const combinator_1 = __webpack_require__(2087);
|
|
@@ -4995,11 +5054,11 @@ exports.codeblock = (0, combinator_1.block)((0, combinator_1.validate)('```', (0
|
|
|
4995
5054
|
}, `${opener}${body}${overflow || closer}`)];
|
|
4996
5055
|
const el = (0, dom_1.html)('pre', {
|
|
4997
5056
|
class: params.lang ? `code language-${params.lang}` : 'text',
|
|
4998
|
-
translate: params.lang ? 'no' :
|
|
4999
|
-
'data-lang': params.lang ||
|
|
5000
|
-
'data-line': params.line ||
|
|
5001
|
-
'data-path': params.path ||
|
|
5002
|
-
}, params.lang ? context.caches?.code?.get(`${params.lang ?? ''}\n${body.slice(0, -1)}`)?.cloneNode(true).childNodes || body.slice(0, -1) ||
|
|
5057
|
+
translate: params.lang ? 'no' : undefined,
|
|
5058
|
+
'data-lang': params.lang || undefined,
|
|
5059
|
+
'data-line': params.line || undefined,
|
|
5060
|
+
'data-path': params.path || undefined
|
|
5061
|
+
}, params.lang ? context.caches?.code?.get(`${params.lang ?? ''}\n${body.slice(0, -1)}`)?.cloneNode(true).childNodes || body.slice(0, -1) || undefined : (0, dom_1.defrag)((0, parser_1.eval)((0, combinator_1.some)(autolink_1.autolink)({
|
|
5003
5062
|
source: body.slice(0, -1),
|
|
5004
5063
|
context
|
|
5005
5064
|
}), [])));
|
|
@@ -5303,8 +5362,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5303
5362
|
}));
|
|
5304
5363
|
exports.figure = exports.segment = void 0;
|
|
5305
5364
|
|
|
5306
|
-
const global_1 = __webpack_require__(4128);
|
|
5307
|
-
|
|
5308
5365
|
const combinator_1 = __webpack_require__(2087);
|
|
5309
5366
|
|
|
5310
5367
|
const source_1 = __webpack_require__(6743);
|
|
@@ -5435,7 +5492,7 @@ function attributes(label, param, content, caption) {
|
|
|
5435
5492
|
} || group === 'example' && type !== group && {
|
|
5436
5493
|
'data-invalid-type': 'label',
|
|
5437
5494
|
'data-invalid-message': '"example" label group must be used to examples'
|
|
5438
|
-
} ||
|
|
5495
|
+
} || undefined;
|
|
5439
5496
|
return {
|
|
5440
5497
|
'data-type': type,
|
|
5441
5498
|
'data-label': label,
|
|
@@ -5581,8 +5638,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5581
5638
|
}));
|
|
5582
5639
|
exports.table = exports.segment_ = exports.segment = void 0;
|
|
5583
5640
|
|
|
5584
|
-
const global_1 = __webpack_require__(4128);
|
|
5585
|
-
|
|
5586
5641
|
const alias_1 = __webpack_require__(5406);
|
|
5587
5642
|
|
|
5588
5643
|
const parser_1 = __webpack_require__(6728);
|
|
@@ -5616,7 +5671,7 @@ exports.table = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, co
|
|
|
5616
5671
|
|
|
5617
5672
|
switch (type) {
|
|
5618
5673
|
case 'grid':
|
|
5619
|
-
case
|
|
5674
|
+
case undefined:
|
|
5620
5675
|
return ((0, parser_1.eval)(parser({
|
|
5621
5676
|
source: body,
|
|
5622
5677
|
context
|
|
@@ -5644,19 +5699,19 @@ const data = (0, combinator_1.creation)(1, false, (0, combinator_1.block)((0, co
|
|
|
5644
5699
|
const dataline = (0, combinator_1.creation)(1, false, (0, combinator_1.line)((0, combinator_1.rewrite)(source_1.contentline, (0, combinator_1.union)([(0, combinator_1.validate)(/^!+\s/, (0, combinator_1.convert)(source => `:${source}`, data)), (0, combinator_1.convert)(source => `: ${source}`, data)]))));
|
|
5645
5700
|
|
|
5646
5701
|
function attributes(source) {
|
|
5647
|
-
let [, rowspan =
|
|
5648
|
-
rowspan === '1' ? rowspan =
|
|
5649
|
-
colspan === '1' ? colspan =
|
|
5702
|
+
let [, rowspan = undefined, colspan = undefined, highlight = undefined] = source.match(/^.(?:(\d+)?:(\d+)?)?(!+)?$/) ?? [];
|
|
5703
|
+
rowspan === '1' ? rowspan = undefined : undefined;
|
|
5704
|
+
colspan === '1' ? colspan = undefined : undefined;
|
|
5650
5705
|
rowspan &&= `${(0, alias_1.max)(0, (0, alias_1.min)(+rowspan, 65534))}`;
|
|
5651
5706
|
colspan &&= `${(0, alias_1.max)(0, (0, alias_1.min)(+colspan, 1000))}`;
|
|
5652
|
-
highlight &&= highlight.length > 0 ? `${highlight.length}` :
|
|
5707
|
+
highlight &&= highlight.length > 0 ? `${highlight.length}` : undefined;
|
|
5653
5708
|
const valid = !highlight || source[0] === '#' && +highlight <= 1 || source[0] === ':' && +highlight <= 6;
|
|
5654
5709
|
return {
|
|
5655
5710
|
class: valid ? highlight && 'highlight' : 'invalid',
|
|
5656
5711
|
rowspan,
|
|
5657
5712
|
colspan,
|
|
5658
5713
|
...(valid ? {
|
|
5659
|
-
'data-highlight-level': +highlight > 1 ? highlight :
|
|
5714
|
+
'data-highlight-level': +highlight > 1 ? highlight : undefined
|
|
5660
5715
|
} : {
|
|
5661
5716
|
'data-invalid-syntax': 'table',
|
|
5662
5717
|
'data-invalid-type': 'syntax',
|
|
@@ -5678,7 +5733,7 @@ function format(rows) {
|
|
|
5678
5733
|
ROW: for (let i = 0; i < rows.length; ++i) {
|
|
5679
5734
|
// Copy to make them retryable.
|
|
5680
5735
|
const [[[...as], [...vs] = []], ...cells] = rows[i];
|
|
5681
|
-
let isBody = target === tfoot ? false :
|
|
5736
|
+
let isBody = target === tfoot ? false : undefined;
|
|
5682
5737
|
as.length === 0 && as.push('-');
|
|
5683
5738
|
|
|
5684
5739
|
ALIGN_H: for (let j = 0, update = false; j < as.length || j < aligns.length; ++j) {
|
|
@@ -5749,12 +5804,12 @@ function format(rows) {
|
|
|
5749
5804
|
let rHeadCellIdx;
|
|
5750
5805
|
|
|
5751
5806
|
for (let j = 0; j < cells.length; ++j) {
|
|
5752
|
-
const jn =
|
|
5807
|
+
const jn = BigInt(j);
|
|
5753
5808
|
const isVirtual = !!ranges[i]?.[j];
|
|
5754
|
-
const cell = isVirtual ? (0, array_1.splice)(cells, j, 0,
|
|
5809
|
+
const cell = isVirtual ? (0, array_1.splice)(cells, j, 0, undefined) && ranges[i][j] : cells[j];
|
|
5755
5810
|
const isHeadCell = cell.tagName === 'TH';
|
|
5756
|
-
heads |=
|
|
5757
|
-
highlights |=
|
|
5811
|
+
heads |= BigInt(isHeadCell) << jn;
|
|
5812
|
+
highlights |= BigInt(cell.className === 'highlight') << jn;
|
|
5758
5813
|
hasDataCell ||= !isHeadCell;
|
|
5759
5814
|
|
|
5760
5815
|
if (isHeadCell && !hasDataCell) {
|
|
@@ -5779,9 +5834,9 @@ function format(rows) {
|
|
|
5779
5834
|
const colSpan = cell.colSpan;
|
|
5780
5835
|
|
|
5781
5836
|
if (colSpan > 1) {
|
|
5782
|
-
(0, array_1.splice)(cells, j + 1, 0, ...
|
|
5783
|
-
heads |= heads & 1n << jn && ~(~0n <<
|
|
5784
|
-
highlights |= highlights & 1n << jn && ~(~0n <<
|
|
5837
|
+
(0, array_1.splice)(cells, j + 1, 0, ...Array(colSpan - 1));
|
|
5838
|
+
heads |= heads & 1n << jn && ~(~0n << BigInt(colSpan)) << jn;
|
|
5839
|
+
highlights |= highlights & 1n << jn && ~(~0n << BigInt(colSpan)) << jn;
|
|
5785
5840
|
j += colSpan - 1;
|
|
5786
5841
|
}
|
|
5787
5842
|
|
|
@@ -5964,8 +6019,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5964
6019
|
}));
|
|
5965
6020
|
exports.mathblock = exports.segment_ = exports.segment = void 0;
|
|
5966
6021
|
|
|
5967
|
-
const global_1 = __webpack_require__(4128);
|
|
5968
|
-
|
|
5969
6022
|
const combinator_1 = __webpack_require__(2087);
|
|
5970
6023
|
|
|
5971
6024
|
const dom_1 = __webpack_require__(3252);
|
|
@@ -5976,7 +6029,7 @@ exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0,
|
|
|
5976
6029
|
exports.mathblock = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), // Bug: Type mismatch between outer and inner.
|
|
5977
6030
|
([body, overflow, closer, opener, delim, param], _, {
|
|
5978
6031
|
caches: {
|
|
5979
|
-
math: cache =
|
|
6032
|
+
math: cache = undefined
|
|
5980
6033
|
} = {}
|
|
5981
6034
|
}) => [delim.length === 2 && closer && !overflow && param.trimStart() === '' ? cache?.get(`${delim}\n${body}${delim}`)?.cloneNode(true) || (0, dom_1.html)('div', {
|
|
5982
6035
|
class: 'math',
|
|
@@ -6002,8 +6055,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
6002
6055
|
}));
|
|
6003
6056
|
exports.invalid = exports.olist_ = exports.olist = void 0;
|
|
6004
6057
|
|
|
6005
|
-
const global_1 = __webpack_require__(4128);
|
|
6006
|
-
|
|
6007
6058
|
const combinator_1 = __webpack_require__(2087);
|
|
6008
6059
|
|
|
6009
6060
|
const ulist_1 = __webpack_require__(5425);
|
|
@@ -6032,7 +6083,7 @@ exports.olist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combina
|
|
|
6032
6083
|
exports.olist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.union)([(0, combinator_1.match)(openers['.'], (0, memoize_1.memoize)(ms => list(type(ms[1]), '.'), ms => type(ms[1]).charCodeAt(0) || 0, [])), (0, combinator_1.match)(openers['('], (0, memoize_1.memoize)(ms => list(type(ms[1]), '('), ms => type(ms[1]).charCodeAt(0) || 0, []))])));
|
|
6033
6084
|
|
|
6034
6085
|
const list = (type, form) => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)(1, false, (0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(heads[form], (0, combinator_1.subsequence)([ulist_1.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, exports.olist_, ilist_1.ilist_]))]), exports.invalid), ns => [(0, dom_1.html)('li', {
|
|
6035
|
-
'data-marker': ns[0] ||
|
|
6086
|
+
'data-marker': ns[0] || undefined
|
|
6036
6087
|
}, (0, dom_1.defrag)((0, ulist_1.fillFirstLine)((0, array_1.shift)(ns)[1])))]), true)]))), es => [format((0, dom_1.html)('ol', es), type, form)]);
|
|
6037
6088
|
|
|
6038
6089
|
const heads = {
|
|
@@ -6117,9 +6168,9 @@ function format(el, type, form) {
|
|
|
6117
6168
|
}
|
|
6118
6169
|
|
|
6119
6170
|
(0, dom_1.define)(el, {
|
|
6120
|
-
type: type ||
|
|
6121
|
-
'data-format': form === '.' ?
|
|
6122
|
-
'data-type': style(type) ||
|
|
6171
|
+
type: type || undefined,
|
|
6172
|
+
'data-format': form === '.' ? undefined : 'paren',
|
|
6173
|
+
'data-type': style(type) || undefined
|
|
6123
6174
|
});
|
|
6124
6175
|
const marker = el.firstElementChild?.getAttribute('data-marker').match(initial(type))?.[0] ?? '';
|
|
6125
6176
|
|
|
@@ -6631,8 +6682,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
6631
6682
|
}));
|
|
6632
6683
|
exports.annotation = void 0;
|
|
6633
6684
|
|
|
6634
|
-
const global_1 = __webpack_require__(4128);
|
|
6635
|
-
|
|
6636
6685
|
const combinator_1 = __webpack_require__(2087);
|
|
6637
6686
|
|
|
6638
6687
|
const inline_1 = __webpack_require__(1160);
|
|
@@ -6650,7 +6699,7 @@ exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('((
|
|
|
6650
6699
|
| 4
|
|
6651
6700
|
/* State.media */
|
|
6652
6701
|
, (0, visibility_1.startLoose)((0, combinator_1.context)({
|
|
6653
|
-
delimiters:
|
|
6702
|
+
delimiters: undefined
|
|
6654
6703
|
}, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])), ')'))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
|
|
6655
6704
|
class: 'annotation'
|
|
6656
6705
|
}, [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest]));
|
|
@@ -6925,8 +6974,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
6925
6974
|
}));
|
|
6926
6975
|
exports.bracket = void 0;
|
|
6927
6976
|
|
|
6928
|
-
const global_1 = __webpack_require__(4128);
|
|
6929
|
-
|
|
6930
6977
|
const combinator_1 = __webpack_require__(2087);
|
|
6931
6978
|
|
|
6932
6979
|
const inline_1 = __webpack_require__(1160);
|
|
@@ -6962,16 +7009,16 @@ exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, comb
|
|
|
6962
7009
|
/* Syntax.bracket */
|
|
6963
7010
|
, 2, 1, 0
|
|
6964
7011
|
/* State.none */
|
|
6965
|
-
, (0, combinator_1.some)(inline_1.inline, ']', [[']', 2]])), (0, source_1.str)(']'), true,
|
|
7012
|
+
, (0, combinator_1.some)(inline_1.inline, ']', [[']', 2]])), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.syntax)(128
|
|
6966
7013
|
/* Syntax.bracket */
|
|
6967
7014
|
, 2, 1, 0
|
|
6968
7015
|
/* State.none */
|
|
6969
|
-
, (0, combinator_1.some)(inline_1.inline, '}', [['}', 2]])), (0, source_1.str)('}'), true,
|
|
7016
|
+
, (0, combinator_1.some)(inline_1.inline, '}', [['}', 2]])), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), // Control media blinking in editing rather than control confusion of pairs of quote marks.
|
|
6970
7017
|
(0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.syntax)(1
|
|
6971
7018
|
/* Syntax.quote */
|
|
6972
7019
|
, 8, 1, 0
|
|
6973
7020
|
/* State.none */
|
|
6974
|
-
, (0, combinator_1.some)(inline_1.inline, '"', [['"', 8]])), (0, source_1.str)('"'), true,
|
|
7021
|
+
, (0, combinator_1.some)(inline_1.inline, '"', [['"', 8]])), (0, source_1.str)('"'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])]));
|
|
6975
7022
|
|
|
6976
7023
|
/***/ }),
|
|
6977
7024
|
|
|
@@ -7133,8 +7180,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7133
7180
|
}));
|
|
7134
7181
|
exports.index = void 0;
|
|
7135
7182
|
|
|
7136
|
-
const global_1 = __webpack_require__(4128);
|
|
7137
|
-
|
|
7138
7183
|
const combinator_1 = __webpack_require__(2087);
|
|
7139
7184
|
|
|
7140
7185
|
const inline_1 = __webpack_require__(1160);
|
|
@@ -7156,9 +7201,9 @@ exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0
|
|
|
7156
7201
|
| 4
|
|
7157
7202
|
/* State.media */
|
|
7158
7203
|
, (0, visibility_1.startTight)((0, combinator_1.open)((0, source_1.stropt)(/^\|?/), (0, visibility_1.trimBlankEnd)((0, combinator_1.some)((0, combinator_1.union)([signature, inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), true)))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, dom_1.defrag)(ns))], rest])), ([el]) => [(0, dom_1.define)(el, {
|
|
7159
|
-
id: el.id ? null :
|
|
7204
|
+
id: el.id ? null : undefined,
|
|
7160
7205
|
class: 'index',
|
|
7161
|
-
href: el.id ? `#${el.id}` :
|
|
7206
|
+
href: el.id ? `#${el.id}` : undefined
|
|
7162
7207
|
}, el.childNodes)])));
|
|
7163
7208
|
const signature = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|#', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
|
|
7164
7209
|
class: 'indexer',
|
|
@@ -7179,8 +7224,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7179
7224
|
}));
|
|
7180
7225
|
exports.text = exports.identity = exports.indexee = void 0;
|
|
7181
7226
|
|
|
7182
|
-
const global_1 = __webpack_require__(4128);
|
|
7183
|
-
|
|
7184
7227
|
const combinator_1 = __webpack_require__(2087);
|
|
7185
7228
|
|
|
7186
7229
|
const dom_1 = __webpack_require__(3252);
|
|
@@ -7189,7 +7232,7 @@ function indexee(parser, optional) {
|
|
|
7189
7232
|
return (0, combinator_1.fmap)(parser, ([el], _, {
|
|
7190
7233
|
id
|
|
7191
7234
|
}) => [(0, dom_1.define)(el, {
|
|
7192
|
-
id: id !== '' && identity(text(el, optional)) ||
|
|
7235
|
+
id: id !== '' && identity(text(el, optional)) || undefined
|
|
7193
7236
|
})]);
|
|
7194
7237
|
}
|
|
7195
7238
|
|
|
@@ -7290,8 +7333,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7290
7333
|
}));
|
|
7291
7334
|
exports.isFixed = exports.number = exports.label = exports.segment = void 0;
|
|
7292
7335
|
|
|
7293
|
-
const global_1 = __webpack_require__(4128);
|
|
7294
|
-
|
|
7295
7336
|
const combinator_1 = __webpack_require__(2087);
|
|
7296
7337
|
|
|
7297
7338
|
const source_1 = __webpack_require__(6743);
|
|
@@ -7322,7 +7363,7 @@ exports.isFixed = isFixed;
|
|
|
7322
7363
|
function increment(number, position) {
|
|
7323
7364
|
if (number === '0' && position > 1) return increment('1', position);
|
|
7324
7365
|
const ns = number.split('.');
|
|
7325
|
-
const ms =
|
|
7366
|
+
const ms = Array(position);
|
|
7326
7367
|
|
|
7327
7368
|
for (let i = 0; i < position; ++i) {
|
|
7328
7369
|
ms[i] = i < ns.length ? i + 1 < position ? +ns[i] : +ns[i] + 1 : i + 1 < position ? 0 : 1;
|
|
@@ -7382,8 +7423,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7382
7423
|
}));
|
|
7383
7424
|
exports.attributes = exports.attribute = exports.html = void 0;
|
|
7384
7425
|
|
|
7385
|
-
const global_1 = __webpack_require__(4128);
|
|
7386
|
-
|
|
7387
7426
|
const combinator_1 = __webpack_require__(2087);
|
|
7388
7427
|
|
|
7389
7428
|
const inline_1 = __webpack_require__(1160);
|
|
@@ -7400,14 +7439,14 @@ const array_1 = __webpack_require__(8112);
|
|
|
7400
7439
|
|
|
7401
7440
|
const dom_1 = __webpack_require__(3252);
|
|
7402
7441
|
|
|
7403
|
-
const tags =
|
|
7442
|
+
const tags = Object.freeze(['bdo', 'bdi']);
|
|
7404
7443
|
const attrspecs = {
|
|
7405
7444
|
bdo: {
|
|
7406
|
-
dir:
|
|
7445
|
+
dir: Object.freeze(['ltr', 'rtl'])
|
|
7407
7446
|
}
|
|
7408
7447
|
};
|
|
7409
|
-
|
|
7410
|
-
|
|
7448
|
+
Object.setPrototypeOf(attrspecs, null);
|
|
7449
|
+
Object.values(attrspecs).forEach(o => Object.setPrototypeOf(o, null));
|
|
7411
7450
|
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/i, (0, combinator_1.syntax)(0
|
|
7412
7451
|
/* Syntax.none */
|
|
7413
7452
|
, 5, 1, 0
|
|
@@ -7417,7 +7456,7 @@ exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0,
|
|
|
7417
7456
|
exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="[^"\n]*")?(?=[^\S\n]|>)/i)]); // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
7418
7457
|
// [...document.querySelectorAll('tbody > tr > td:first-child')].map(el => el.textContent.slice(1, -1))
|
|
7419
7458
|
|
|
7420
|
-
const TAGS =
|
|
7459
|
+
const TAGS = Object.freeze(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4", "h5", "h6", "main", "nav", "section", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "menu", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "summary", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "param", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp"]);
|
|
7421
7460
|
|
|
7422
7461
|
function elem(tag, as, bs, cs) {
|
|
7423
7462
|
if (!tags.includes(tag)) return invalid('tag', `Invalid HTML tag name "${tag}"`, as, bs, cs);
|
|
@@ -7437,7 +7476,7 @@ function invalid(type, message, as, bs, cs) {
|
|
|
7437
7476
|
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)));
|
|
7438
7477
|
}
|
|
7439
7478
|
|
|
7440
|
-
const requiredAttributes = (0, memoize_1.memoize)(spec =>
|
|
7479
|
+
const requiredAttributes = (0, memoize_1.memoize)(spec => Object.entries(spec).flatMap(([k, v]) => v && Object.isFrozen(v) ? [k] : []), new WeakMap());
|
|
7441
7480
|
|
|
7442
7481
|
function attributes(syntax, classes, spec, params) {
|
|
7443
7482
|
let invalid = false;
|
|
@@ -7446,10 +7485,10 @@ function attributes(syntax, classes, spec, params) {
|
|
|
7446
7485
|
for (let i = 0; i < params.length; ++i) {
|
|
7447
7486
|
const param = params[i].trim();
|
|
7448
7487
|
const name = param.split('=', 1)[0];
|
|
7449
|
-
const value = param !== name ? param.slice(name.length + 2, -1).replace(/\\(.?)/g, '$1') :
|
|
7488
|
+
const value = param !== name ? param.slice(name.length + 2, -1).replace(/\\(.?)/g, '$1') : undefined;
|
|
7450
7489
|
invalid ||= !spec || name in attrs;
|
|
7451
7490
|
if (spec && name in spec && !spec[name]) continue;
|
|
7452
|
-
spec?.[name]?.includes(value) || value !==
|
|
7491
|
+
spec?.[name]?.includes(value) || value !== undefined && spec?.[name]?.length === 0 ? attrs[name] = value ?? '' : invalid ||= !!spec;
|
|
7453
7492
|
(0, array_1.splice)(params, i--, 1);
|
|
7454
7493
|
}
|
|
7455
7494
|
|
|
@@ -7480,8 +7519,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7480
7519
|
}));
|
|
7481
7520
|
exports.htmlentity = exports.unsafehtmlentity = void 0;
|
|
7482
7521
|
|
|
7483
|
-
const global_1 = __webpack_require__(4128);
|
|
7484
|
-
|
|
7485
7522
|
const combinator_1 = __webpack_require__(2087);
|
|
7486
7523
|
|
|
7487
7524
|
const dom_1 = __webpack_require__(3252);
|
|
@@ -7501,7 +7538,7 @@ const parse = (0, memoize_1.reduce)((el => entity => {
|
|
|
7501
7538
|
if (entity === '
') return ' ';
|
|
7502
7539
|
el.innerHTML = entity;
|
|
7503
7540
|
const text = el.textContent;
|
|
7504
|
-
return entity === text ?
|
|
7541
|
+
return entity === text ? undefined : text;
|
|
7505
7542
|
})((0, dom_1.html)('b')));
|
|
7506
7543
|
|
|
7507
7544
|
/***/ }),
|
|
@@ -7548,8 +7585,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7548
7585
|
}));
|
|
7549
7586
|
exports.resolve = exports.option = exports.uri = exports.unsafelink = exports.link = void 0;
|
|
7550
7587
|
|
|
7551
|
-
const global_1 = __webpack_require__(4128);
|
|
7552
|
-
|
|
7553
7588
|
const parser_1 = __webpack_require__(6728);
|
|
7554
7589
|
|
|
7555
7590
|
const combinator_1 = __webpack_require__(2087);
|
|
@@ -7619,7 +7654,7 @@ function parse(content, params, rest, context) {
|
|
|
7619
7654
|
}
|
|
7620
7655
|
|
|
7621
7656
|
const INSECURE_URI = params.shift();
|
|
7622
|
-
const uri = new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ??
|
|
7657
|
+
const uri = new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ?? location, context.url ?? context.host ?? location), context.host?.href || location.href);
|
|
7623
7658
|
|
|
7624
7659
|
switch (uri.protocol) {
|
|
7625
7660
|
case 'tel:':
|
|
@@ -7635,7 +7670,7 @@ function parse(content, params, rest, context) {
|
|
|
7635
7670
|
}
|
|
7636
7671
|
}
|
|
7637
7672
|
|
|
7638
|
-
const el = elem(INSECURE_URI, content, uri, context.host?.origin ||
|
|
7673
|
+
const el = elem(INSECURE_URI, content, uri, context.host?.origin || location.origin);
|
|
7639
7674
|
if (el.className === 'invalid') return [[el], rest];
|
|
7640
7675
|
return [[(0, dom_1.define)(el, (0, html_1.attributes)('link', [], optspec, params))], rest];
|
|
7641
7676
|
}
|
|
@@ -7656,7 +7691,7 @@ function elem(INSECURE_URI, content, uri, origin) {
|
|
|
7656
7691
|
return (0, dom_1.html)('a', {
|
|
7657
7692
|
class: content.length === 0 ? 'url' : 'link',
|
|
7658
7693
|
href: uri.source,
|
|
7659
|
-
target:
|
|
7694
|
+
target: false || uri.origin !== origin || typeof content[0] === 'object' && content[0].classList.contains('media') ? '_blank' : undefined
|
|
7660
7695
|
}, content.length === 0 ? decode(INSECURE_URI) : content);
|
|
7661
7696
|
|
|
7662
7697
|
case 'tel:':
|
|
@@ -7698,7 +7733,7 @@ function decode(uri) {
|
|
|
7698
7733
|
const origin = uri.match(/^[a-z](?:[-.](?=\w)|[0-9a-z])*:(?:\/{0,2}[^/?#\s]+|\/\/(?=[/]))/i)?.[0] ?? '';
|
|
7699
7734
|
|
|
7700
7735
|
try {
|
|
7701
|
-
let path =
|
|
7736
|
+
let path = decodeURI(uri.slice(origin.length));
|
|
7702
7737
|
|
|
7703
7738
|
if (!origin && /^[a-z](?:[-.](?=\w)|[0-9a-z])*:(?:\/{0,2}[^/?#\s]+|\/\/(?=[/]))/i.test(path)) {
|
|
7704
7739
|
path = uri.slice(origin.length);
|
|
@@ -7706,7 +7741,7 @@ function decode(uri) {
|
|
|
7706
7741
|
|
|
7707
7742
|
uri = origin + path;
|
|
7708
7743
|
} finally {
|
|
7709
|
-
return uri.replace(/\s+/g,
|
|
7744
|
+
return uri.replace(/\s+/g, encodeURI);
|
|
7710
7745
|
}
|
|
7711
7746
|
}
|
|
7712
7747
|
|
|
@@ -7794,8 +7829,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7794
7829
|
}));
|
|
7795
7830
|
exports.media = void 0;
|
|
7796
7831
|
|
|
7797
|
-
const global_1 = __webpack_require__(4128);
|
|
7798
|
-
|
|
7799
7832
|
const combinator_1 = __webpack_require__(2087);
|
|
7800
7833
|
|
|
7801
7834
|
const link_1 = __webpack_require__(9628);
|
|
@@ -7816,7 +7849,7 @@ const optspec = {
|
|
|
7816
7849
|
'width': [],
|
|
7817
7850
|
'height': [],
|
|
7818
7851
|
'aspect-ratio': [],
|
|
7819
|
-
rel:
|
|
7852
|
+
rel: undefined
|
|
7820
7853
|
};
|
|
7821
7854
|
Object.setPrototypeOf(optspec, null);
|
|
7822
7855
|
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.open)('!', (0, combinator_1.constraint)(4
|
|
@@ -7827,9 +7860,9 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '
|
|
|
7827
7860
|
/* State.link */
|
|
7828
7861
|
, (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']', [[/^\\?\n/, 9]]), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), /^[^\S\n]*}/))]), ([as, bs]) => bs ? [[as.join('').trim() || as.join('')], bs] : [[''], as]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
|
|
7829
7862
|
const INSECURE_URI = params.shift();
|
|
7830
|
-
const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host ??
|
|
7863
|
+
const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host ?? location, context.url ?? context.host ?? location), context.host?.href || location.href);
|
|
7831
7864
|
let cache;
|
|
7832
|
-
const el =
|
|
7865
|
+
const el = false || (cache = context.caches?.media?.get(url.href)?.cloneNode(true)) || (0, dom_1.html)('img', {
|
|
7833
7866
|
class: 'media',
|
|
7834
7867
|
'data-src': url.source,
|
|
7835
7868
|
alt: text
|
|
@@ -7858,7 +7891,7 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '
|
|
|
7858
7891
|
context
|
|
7859
7892
|
});
|
|
7860
7893
|
}))))));
|
|
7861
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true,
|
|
7894
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true)])));
|
|
7862
7895
|
const option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*x[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` width="${opt.slice(1).split('x')[0]}"`, ` height="${opt.slice(1).split('x')[1]}"`]), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*:[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` aspect-ratio="${opt.slice(1).split(':').join('/')}"`]), link_1.option]);
|
|
7863
7896
|
|
|
7864
7897
|
function sanitize(target, uri, alt) {
|
|
@@ -7914,8 +7947,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7914
7947
|
}));
|
|
7915
7948
|
exports.reference = void 0;
|
|
7916
7949
|
|
|
7917
|
-
const global_1 = __webpack_require__(4128);
|
|
7918
|
-
|
|
7919
7950
|
const combinator_1 = __webpack_require__(2087);
|
|
7920
7951
|
|
|
7921
7952
|
const inline_1 = __webpack_require__(1160);
|
|
@@ -7939,7 +7970,7 @@ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('[['
|
|
|
7939
7970
|
| 4
|
|
7940
7971
|
/* State.media */
|
|
7941
7972
|
, (0, visibility_1.startLoose)((0, combinator_1.context)({
|
|
7942
|
-
delimiters:
|
|
7973
|
+
delimiters: undefined
|
|
7943
7974
|
}, (0, combinator_1.subsequence)([abbr, (0, combinator_1.open)((0, source_1.stropt)(/^(?=\^)/), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])])), ']'))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest]));
|
|
7944
7975
|
const abbr = (0, combinator_1.creation)((0, combinator_1.bind)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]*/), ([source], rest) => [[(0, dom_1.html)('abbr', source)], rest.replace(visibility_1.regBlankStart, '')]));
|
|
7945
7976
|
|
|
@@ -7970,8 +8001,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
7970
8001
|
}));
|
|
7971
8002
|
exports.ruby = void 0;
|
|
7972
8003
|
|
|
7973
|
-
const global_1 = __webpack_require__(4128);
|
|
7974
|
-
|
|
7975
8004
|
const parser_1 = __webpack_require__(6728);
|
|
7976
8005
|
|
|
7977
8006
|
const combinator_1 = __webpack_require__(2087);
|
|
@@ -8053,7 +8082,7 @@ const text = (0, combinator_1.creation)(1, false, ({
|
|
|
8053
8082
|
}
|
|
8054
8083
|
}
|
|
8055
8084
|
|
|
8056
|
-
return acc.join('').trimStart() ? [[acc], ''] :
|
|
8085
|
+
return acc.join('').trimStart() ? [[acc], ''] : undefined;
|
|
8057
8086
|
});
|
|
8058
8087
|
|
|
8059
8088
|
function attributes(texts, rubies) {
|
|
@@ -8142,8 +8171,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8142
8171
|
}));
|
|
8143
8172
|
exports.template = void 0;
|
|
8144
8173
|
|
|
8145
|
-
const global_1 = __webpack_require__(4128);
|
|
8146
|
-
|
|
8147
8174
|
const combinator_1 = __webpack_require__(2087);
|
|
8148
8175
|
|
|
8149
8176
|
const source_1 = __webpack_require__(6743);
|
|
@@ -8159,7 +8186,7 @@ exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('{{',
|
|
|
8159
8186
|
, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), '}}', true, ([, ns = []], rest) => [[(0, dom_1.html)('span', {
|
|
8160
8187
|
class: 'template'
|
|
8161
8188
|
}, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest]));
|
|
8162
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true,
|
|
8189
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.escsource, /^"|^\\?\n/)), (0, source_1.str)('"'), true)])));
|
|
8163
8190
|
|
|
8164
8191
|
/***/ }),
|
|
8165
8192
|
|
|
@@ -8272,8 +8299,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8272
8299
|
}));
|
|
8273
8300
|
exports.figure = void 0;
|
|
8274
8301
|
|
|
8275
|
-
const global_1 = __webpack_require__(4128);
|
|
8276
|
-
|
|
8277
8302
|
const label_1 = __webpack_require__(466);
|
|
8278
8303
|
|
|
8279
8304
|
const queue_1 = __webpack_require__(4934);
|
|
@@ -8286,8 +8311,8 @@ const query_1 = __webpack_require__(6120);
|
|
|
8286
8311
|
|
|
8287
8312
|
function* figure(target, footnotes, opts = {}) {
|
|
8288
8313
|
const refs = new queue_1.MultiQueue((0, array_1.push)((0, query_1.querySelectorAll)(target, 'a.label:not(.disabled)[data-label]'), footnotes && (0, query_1.querySelectorAll)(footnotes.references, 'a.label:not(.disabled)') || []).map(el => [el.getAttribute('data-label'), el]));
|
|
8289
|
-
const labels = new
|
|
8290
|
-
const numbers = new
|
|
8314
|
+
const labels = new Set();
|
|
8315
|
+
const numbers = new Map();
|
|
8291
8316
|
let base = '0';
|
|
8292
8317
|
let bases = base.split('.');
|
|
8293
8318
|
let index = bases; // Bug: Firefox
|
|
@@ -8394,7 +8419,7 @@ function* figure(target, footnotes, opts = {}) {
|
|
|
8394
8419
|
labels.add(label);
|
|
8395
8420
|
opts.id !== '' && def.setAttribute('id', `label:${opts.id ? `${opts.id}:` : ''}${label}`);
|
|
8396
8421
|
|
|
8397
|
-
for (let rs = refs.take(label,
|
|
8422
|
+
for (let rs = refs.take(label, Infinity), i = 0; i < rs.length; ++i) {
|
|
8398
8423
|
const ref = rs[i];
|
|
8399
8424
|
|
|
8400
8425
|
if (ref.getAttribute('data-invalid-message') === messages.reference) {
|
|
@@ -8471,8 +8496,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8471
8496
|
}));
|
|
8472
8497
|
exports.reference = exports.annotation = exports.footnote = void 0;
|
|
8473
8498
|
|
|
8474
|
-
const global_1 = __webpack_require__(4128);
|
|
8475
|
-
|
|
8476
8499
|
const indexee_1 = __webpack_require__(1269);
|
|
8477
8500
|
|
|
8478
8501
|
const queue_1 = __webpack_require__(4934);
|
|
@@ -8500,9 +8523,9 @@ function build(syntax, marker, splitter) {
|
|
|
8500
8523
|
// Referenceを含むAnnotationの重複排除は両構文が互いに処理済みであることを必要とするため
|
|
8501
8524
|
// 構文ごとに各1回の処理では不可能
|
|
8502
8525
|
return function* (target, footnote, opts = {}, bottom = null) {
|
|
8503
|
-
const defs = new
|
|
8526
|
+
const defs = new Map();
|
|
8504
8527
|
const buffer = new queue_1.MultiQueue();
|
|
8505
|
-
const titles = new
|
|
8528
|
+
const titles = new Map(); // Bug: Firefox
|
|
8506
8529
|
//const splitters = push([], target.querySelectorAll(`:scope > :is(${splitter ?? '_'})`));
|
|
8507
8530
|
|
|
8508
8531
|
const splitters = [];
|
|
@@ -8520,7 +8543,7 @@ function build(syntax, marker, splitter) {
|
|
|
8520
8543
|
yield;
|
|
8521
8544
|
const ref = refs[i];
|
|
8522
8545
|
|
|
8523
|
-
while (+splitters[0]?.compareDocumentPosition(ref) &
|
|
8546
|
+
while (+splitters[0]?.compareDocumentPosition(ref) & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
8524
8547
|
if (defs.size > 0) {
|
|
8525
8548
|
total += defs.size;
|
|
8526
8549
|
yield* proc(defs, target.insertBefore((0, dom_1.html)('ol', {
|
|
@@ -8532,7 +8555,7 @@ function build(syntax, marker, splitter) {
|
|
|
8532
8555
|
}
|
|
8533
8556
|
|
|
8534
8557
|
const identifier = `${+!ref.querySelector('.label')}:${ref.getAttribute('data-abbr') || '_' + ref.firstElementChild.innerHTML}`;
|
|
8535
|
-
const abbr = ref.getAttribute('data-abbr') ||
|
|
8558
|
+
const abbr = ref.getAttribute('data-abbr') || undefined;
|
|
8536
8559
|
const content = (0, dom_1.frag)(ref.firstElementChild.cloneNode(true).childNodes);
|
|
8537
8560
|
style ??= abbr ? 'abbr' : 'count';
|
|
8538
8561
|
|
|
@@ -8558,20 +8581,20 @@ function build(syntax, marker, splitter) {
|
|
|
8558
8581
|
ref.lastChild?.remove();
|
|
8559
8582
|
}
|
|
8560
8583
|
|
|
8561
|
-
const title =
|
|
8584
|
+
const title = false || titles.get(identifier) || +identifier[0] && ref.title || (0, indexee_1.text)(content).trim() || content.textContent.trim() || undefined;
|
|
8562
8585
|
title ? !titles.has(identifier) && titles.set(identifier, title) : buffer.set(identifier, ref);
|
|
8563
8586
|
const blank = !!abbr && !content.firstChild;
|
|
8564
8587
|
const refIndex = ++count;
|
|
8565
|
-
const refId = opts.id !== '' ? ref.id || `${syntax}:${opts.id ? `${opts.id}:` : ''}ref:${refIndex}` :
|
|
8566
|
-
const def =
|
|
8567
|
-
id: opts.id !== '' ? `${syntax}:${opts.id ? `${opts.id}:` : ''}def:${total + defs.size + 1}` :
|
|
8568
|
-
'data-marker': !footnote ? marker(total + defs.size + 1, abbr) :
|
|
8588
|
+
const refId = opts.id !== '' ? ref.id || `${syntax}:${opts.id ? `${opts.id}:` : ''}ref:${refIndex}` : undefined;
|
|
8589
|
+
const def = false || defs.get(identifier) || defs.set(identifier, (0, dom_1.html)('li', {
|
|
8590
|
+
id: opts.id !== '' ? `${syntax}:${opts.id ? `${opts.id}:` : ''}def:${total + defs.size + 1}` : undefined,
|
|
8591
|
+
'data-marker': !footnote ? marker(total + defs.size + 1, abbr) : undefined
|
|
8569
8592
|
}, [content.cloneNode(true), (0, dom_1.html)('sup')])).get(identifier);
|
|
8570
8593
|
|
|
8571
8594
|
if (title && !blank && def.childNodes.length === 1) {
|
|
8572
8595
|
def.insertBefore(content.cloneNode(true), def.lastChild);
|
|
8573
8596
|
|
|
8574
|
-
for (let refs = buffer.take(identifier,
|
|
8597
|
+
for (let refs = buffer.take(identifier, Infinity), i = 0; i < refs.length; ++i) {
|
|
8575
8598
|
const ref = refs[i];
|
|
8576
8599
|
if (ref.getAttribute('data-invalid-type') !== 'content') continue;
|
|
8577
8600
|
(0, dom_1.define)(ref, {
|
|
@@ -8585,10 +8608,10 @@ function build(syntax, marker, splitter) {
|
|
|
8585
8608
|
}
|
|
8586
8609
|
|
|
8587
8610
|
const defIndex = +def.id.slice(def.id.lastIndexOf(':') + 1) || total + defs.size;
|
|
8588
|
-
const defId = def.id ||
|
|
8611
|
+
const defId = def.id || undefined;
|
|
8589
8612
|
(0, dom_1.define)(ref, {
|
|
8590
8613
|
id: refId,
|
|
8591
|
-
class: opts.id !== '' ?
|
|
8614
|
+
class: opts.id !== '' ? undefined : `${ref.className} disabled`,
|
|
8592
8615
|
...(title ? {
|
|
8593
8616
|
title
|
|
8594
8617
|
} : {
|
|
@@ -8603,7 +8626,7 @@ function build(syntax, marker, splitter) {
|
|
|
8603
8626
|
}, marker(defIndex, abbr)));
|
|
8604
8627
|
def.lastChild.appendChild((0, dom_1.html)('a', {
|
|
8605
8628
|
href: refId && `#${refId}`,
|
|
8606
|
-
title: abbr && !blank ? title :
|
|
8629
|
+
title: abbr && !blank ? title : undefined
|
|
8607
8630
|
}, `^${refIndex}`));
|
|
8608
8631
|
}
|
|
8609
8632
|
|
|
@@ -8667,8 +8690,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8667
8690
|
}));
|
|
8668
8691
|
exports.validate = exports.segment = exports.MAX_INPUT_SIZE = exports.MAX_SEGMENT_SIZE = void 0;
|
|
8669
8692
|
|
|
8670
|
-
const global_1 = __webpack_require__(4128);
|
|
8671
|
-
|
|
8672
8693
|
const parser_1 = __webpack_require__(6728);
|
|
8673
8694
|
|
|
8674
8695
|
const combinator_1 = __webpack_require__(2087);
|
|
@@ -8711,7 +8732,7 @@ function* segment(source) {
|
|
|
8711
8732
|
exports.segment = segment;
|
|
8712
8733
|
|
|
8713
8734
|
function validate(source, size) {
|
|
8714
|
-
return source.length <= size / 4 || source.length <= size && new
|
|
8735
|
+
return source.length <= size / 4 || source.length <= size && new Blob([source]).size <= size;
|
|
8715
8736
|
}
|
|
8716
8737
|
|
|
8717
8738
|
exports.validate = validate;
|
|
@@ -8864,13 +8885,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8864
8885
|
}));
|
|
8865
8886
|
exports.contentline = exports.emptyline = exports.anyline = void 0;
|
|
8866
8887
|
|
|
8867
|
-
const global_1 = __webpack_require__(4128);
|
|
8868
|
-
|
|
8869
8888
|
const combinator_1 = __webpack_require__(2087);
|
|
8870
8889
|
|
|
8871
8890
|
exports.anyline = (0, combinator_1.line)(() => [[], '']);
|
|
8872
|
-
exports.emptyline = (0, combinator_1.line)(i => (0, combinator_1.isEmpty)(i.source) ? [[], ''] :
|
|
8873
|
-
exports.contentline = (0, combinator_1.line)(i => !(0, combinator_1.isEmpty)(i.source) ? [[], ''] :
|
|
8891
|
+
exports.emptyline = (0, combinator_1.line)(i => (0, combinator_1.isEmpty)(i.source) ? [[], ''] : undefined);
|
|
8892
|
+
exports.contentline = (0, combinator_1.line)(i => !(0, combinator_1.isEmpty)(i.source) ? [[], ''] : undefined);
|
|
8874
8893
|
|
|
8875
8894
|
/***/ }),
|
|
8876
8895
|
|
|
@@ -8885,8 +8904,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8885
8904
|
}));
|
|
8886
8905
|
exports.stropt = exports.str = void 0;
|
|
8887
8906
|
|
|
8888
|
-
const global_1 = __webpack_require__(4128);
|
|
8889
|
-
|
|
8890
8907
|
const combinator_1 = __webpack_require__(2087);
|
|
8891
8908
|
|
|
8892
8909
|
function str(pattern, not) {
|
|
@@ -8895,14 +8912,14 @@ function str(pattern, not) {
|
|
|
8895
8912
|
}) => {
|
|
8896
8913
|
if (source === '') return;
|
|
8897
8914
|
if (not && source.slice(pattern.length, pattern.length + not.length) === not) return;
|
|
8898
|
-
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] :
|
|
8915
|
+
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : undefined;
|
|
8899
8916
|
}) : (0, combinator_1.creation)(1, false, ({
|
|
8900
8917
|
source
|
|
8901
8918
|
}) => {
|
|
8902
8919
|
if (source === '') return;
|
|
8903
8920
|
const m = source.match(pattern);
|
|
8904
8921
|
if (m && not && source.slice(m[0].length, m[0].length + not.length) === not) return;
|
|
8905
|
-
return m && m[0].length > 0 ? [[m[0]], source.slice(m[0].length)] :
|
|
8922
|
+
return m && m[0].length > 0 ? [[m[0]], source.slice(m[0].length)] : undefined;
|
|
8906
8923
|
});
|
|
8907
8924
|
}
|
|
8908
8925
|
|
|
@@ -8913,13 +8930,13 @@ function stropt(pattern) {
|
|
|
8913
8930
|
source
|
|
8914
8931
|
}) => {
|
|
8915
8932
|
if (source === '') return;
|
|
8916
|
-
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] :
|
|
8933
|
+
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : undefined;
|
|
8917
8934
|
}) : (0, combinator_1.creation)(1, false, ({
|
|
8918
8935
|
source
|
|
8919
8936
|
}) => {
|
|
8920
8937
|
if (source === '') return;
|
|
8921
8938
|
const m = source.match(pattern);
|
|
8922
|
-
return m ? [[m[0]], source.slice(m[0].length)] :
|
|
8939
|
+
return m ? [[m[0]], source.slice(m[0].length)] : undefined;
|
|
8923
8940
|
});
|
|
8924
8941
|
}
|
|
8925
8942
|
|
|
@@ -8938,8 +8955,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8938
8955
|
}));
|
|
8939
8956
|
exports.isAlphanumeric = exports.linebreak = exports.txt = exports.text = exports.nonAlphanumeric = exports.nonWhitespace = exports.delimiter = void 0;
|
|
8940
8957
|
|
|
8941
|
-
const global_1 = __webpack_require__(4128);
|
|
8942
|
-
|
|
8943
8958
|
const combinator_1 = __webpack_require__(2087);
|
|
8944
8959
|
|
|
8945
8960
|
const str_1 = __webpack_require__(2790);
|
|
@@ -8983,7 +8998,7 @@ exports.text = (0, combinator_1.creation)(1, false, ({
|
|
|
8983
8998
|
case '\x1B':
|
|
8984
8999
|
case '\\':
|
|
8985
9000
|
switch (source[1]) {
|
|
8986
|
-
case
|
|
9001
|
+
case undefined:
|
|
8987
9002
|
return [[], ''];
|
|
8988
9003
|
|
|
8989
9004
|
case '\n':
|
|
@@ -9113,8 +9128,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9113
9128
|
}));
|
|
9114
9129
|
exports.trimNode = exports.trimBlankEnd = exports.trimBlankStart = exports.trimBlank = exports.isStartTightNodes = exports.isStartLooseNodes = exports.startTight = exports.startLoose = exports.blankWith = exports.regBlankStart = exports.visualize = void 0;
|
|
9115
9130
|
|
|
9116
|
-
const global_1 = __webpack_require__(4128);
|
|
9117
|
-
|
|
9118
9131
|
const parser_1 = __webpack_require__(6728);
|
|
9119
9132
|
|
|
9120
9133
|
const combinator_1 = __webpack_require__(2087);
|
|
@@ -9160,14 +9173,14 @@ function hasVisible(nodes, {
|
|
|
9160
9173
|
exports.regBlankStart = new RegExp(/^(?:\\?[^\S\n]|&IHN;|<wbr[^\S\n]*>)+/.source.replace('IHN', `(?:${normalize_1.invisibleHTMLEntityNames.join('|')})`));
|
|
9161
9174
|
|
|
9162
9175
|
function blankWith(starting, delimiter) {
|
|
9163
|
-
if (delimiter ===
|
|
9176
|
+
if (delimiter === undefined) return blankWith('', starting);
|
|
9164
9177
|
return new RegExp(String.raw`^(?:(?=${starting})(?:\\?\s|&(?:${normalize_1.invisibleHTMLEntityNames.join('|')});|<wbr[^\S\n]*>)${starting && '+'})?${typeof delimiter === 'string' ? delimiter.replace(/[*+()\[\]]/g, '\\$&') : delimiter.source}`);
|
|
9165
9178
|
}
|
|
9166
9179
|
|
|
9167
9180
|
exports.blankWith = blankWith;
|
|
9168
9181
|
|
|
9169
9182
|
function startLoose(parser, except) {
|
|
9170
|
-
return input => isStartLoose(input, except) ? parser(input) :
|
|
9183
|
+
return input => isStartLoose(input, except) ? parser(input) : undefined;
|
|
9171
9184
|
}
|
|
9172
9185
|
|
|
9173
9186
|
exports.startLoose = startLoose;
|
|
@@ -9184,7 +9197,7 @@ const isStartLoose = (0, memoize_1.reduce)(({
|
|
|
9184
9197
|
}, except = '') => `${source}\x1E${except}`);
|
|
9185
9198
|
|
|
9186
9199
|
function startTight(parser, except) {
|
|
9187
|
-
return input => isStartTight(input, except) ? parser(input) :
|
|
9200
|
+
return input => isStartTight(input, except) ? parser(input) : undefined;
|
|
9188
9201
|
}
|
|
9189
9202
|
|
|
9190
9203
|
exports.startTight = startTight;
|
|
@@ -9262,7 +9275,7 @@ exports.isStartTightNodes = isStartTightNodes; //export function isEndTightNodes
|
|
|
9262
9275
|
function isVisible(node, strpos) {
|
|
9263
9276
|
switch (typeof node) {
|
|
9264
9277
|
case 'string':
|
|
9265
|
-
const char = node && strpos !==
|
|
9278
|
+
const char = node && strpos !== undefined ? node[strpos >= 0 ? strpos : node.length + strpos] : node;
|
|
9266
9279
|
|
|
9267
9280
|
switch (char) {
|
|
9268
9281
|
case '':
|
|
@@ -9388,8 +9401,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9388
9401
|
}));
|
|
9389
9402
|
exports.render = void 0;
|
|
9390
9403
|
|
|
9391
|
-
const global_1 = __webpack_require__(4128);
|
|
9392
|
-
|
|
9393
9404
|
const code_1 = __webpack_require__(7686);
|
|
9394
9405
|
|
|
9395
9406
|
const math_1 = __webpack_require__(611);
|
|
@@ -9410,7 +9421,7 @@ const extend = (0, memoize_1.reduce)(opts => ({
|
|
|
9410
9421
|
|
|
9411
9422
|
function render(source, opts = {}) {
|
|
9412
9423
|
opts = extend(opts);
|
|
9413
|
-
const base =
|
|
9424
|
+
const base = location.href;
|
|
9414
9425
|
|
|
9415
9426
|
for (let es = (0, query_1.querySelectorAllWith)(source, selector), i = 0; i < es.length; ++i) {
|
|
9416
9427
|
render_(base, es[i], opts);
|
|
@@ -9491,8 +9502,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9491
9502
|
}));
|
|
9492
9503
|
exports.math = void 0;
|
|
9493
9504
|
|
|
9494
|
-
const global_1 = __webpack_require__(4128);
|
|
9495
|
-
|
|
9496
9505
|
const dom_1 = __webpack_require__(3252);
|
|
9497
9506
|
|
|
9498
9507
|
function math(target, cache) {
|
|
@@ -9505,7 +9514,7 @@ function math(target, cache) {
|
|
|
9505
9514
|
|
|
9506
9515
|
exports.math = math;
|
|
9507
9516
|
|
|
9508
|
-
async function queue(target, callback = () =>
|
|
9517
|
+
async function queue(target, callback = () => undefined) {
|
|
9509
9518
|
// @ts-ignore
|
|
9510
9519
|
!MathJax.typesetPromise && (await MathJax.startup.promise); // @ts-ignore
|
|
9511
9520
|
|
|
@@ -9602,18 +9611,16 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9602
9611
|
}));
|
|
9603
9612
|
exports.image = void 0;
|
|
9604
9613
|
|
|
9605
|
-
const global_1 = __webpack_require__(4128);
|
|
9606
|
-
|
|
9607
9614
|
const dom_1 = __webpack_require__(3252);
|
|
9608
9615
|
|
|
9609
9616
|
function image(source, url, cache) {
|
|
9610
|
-
if (cache?.has(url.href)) return (0, dom_1.define)(cache.get(url.href).cloneNode(true),
|
|
9617
|
+
if (cache?.has(url.href)) return (0, dom_1.define)(cache.get(url.href).cloneNode(true), Object.fromEntries([...source.attributes].map(attr => [attr.name, attr.value])));
|
|
9611
9618
|
(0, dom_1.define)(source, {
|
|
9612
9619
|
'data-type': 'image',
|
|
9613
9620
|
src: source.getAttribute('data-src'),
|
|
9614
9621
|
loading: 'lazy'
|
|
9615
9622
|
});
|
|
9616
|
-
cache?.set(url.href, (0, dom_1.define)(source.cloneNode(true),
|
|
9623
|
+
cache?.set(url.href, (0, dom_1.define)(source.cloneNode(true), Object.fromEntries([...source.attributes].filter(attr => !['class', 'data-type', 'data-src', 'src', 'loading'].includes(attr.name)).map(attr => [attr.name, null]))));
|
|
9617
9624
|
return source;
|
|
9618
9625
|
}
|
|
9619
9626
|
|
|
@@ -9673,8 +9680,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9673
9680
|
}));
|
|
9674
9681
|
exports.twitter = void 0;
|
|
9675
9682
|
|
|
9676
|
-
const global_1 = __webpack_require__(4128);
|
|
9677
|
-
|
|
9678
9683
|
const parser_1 = __webpack_require__(3019);
|
|
9679
9684
|
|
|
9680
9685
|
const dom_1 = __webpack_require__(3252);
|
|
@@ -9700,10 +9705,10 @@ function twitter(source, url) {
|
|
|
9700
9705
|
html
|
|
9701
9706
|
}) {
|
|
9702
9707
|
el.innerHTML = dompurify_1.default.sanitize(html);
|
|
9703
|
-
if (
|
|
9708
|
+
if (window.twttr) return void window.twttr.widgets.load(el);
|
|
9704
9709
|
const id = 'twitter-wjs';
|
|
9705
|
-
if (
|
|
9706
|
-
|
|
9710
|
+
if (document.getElementById(id)) return;
|
|
9711
|
+
document.body.appendChild((0, dom_1.html)('script', {
|
|
9707
9712
|
id,
|
|
9708
9713
|
src: 'https://platform.twitter.com/widgets.js'
|
|
9709
9714
|
}));
|
|
@@ -9738,8 +9743,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9738
9743
|
}));
|
|
9739
9744
|
exports.video = void 0;
|
|
9740
9745
|
|
|
9741
|
-
const global_1 = __webpack_require__(4128);
|
|
9742
|
-
|
|
9743
9746
|
const dom_1 = __webpack_require__(3252);
|
|
9744
9747
|
|
|
9745
9748
|
const extensions = ['.webm', '.ogv'];
|
|
@@ -9749,8 +9752,8 @@ function video(source, url) {
|
|
|
9749
9752
|
return (0, dom_1.html)('video', {
|
|
9750
9753
|
src: source.getAttribute('data-src'),
|
|
9751
9754
|
'data-type': 'video',
|
|
9752
|
-
...
|
|
9753
|
-
style: source.hasAttribute('aspect-ratio') ? `aspect-ratio: ${source.getAttribute('aspect-ratio')};` :
|
|
9755
|
+
...Object.fromEntries([...source.attributes].map(attr => [attr.name, attr.value])),
|
|
9756
|
+
style: source.hasAttribute('aspect-ratio') ? `aspect-ratio: ${source.getAttribute('aspect-ratio')};` : undefined,
|
|
9754
9757
|
muted: '',
|
|
9755
9758
|
controls: ''
|
|
9756
9759
|
});
|
|
@@ -9771,8 +9774,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9771
9774
|
}));
|
|
9772
9775
|
exports.youtube = void 0;
|
|
9773
9776
|
|
|
9774
|
-
const global_1 = __webpack_require__(4128);
|
|
9775
|
-
|
|
9776
9777
|
const dom_1 = __webpack_require__(3252);
|
|
9777
9778
|
|
|
9778
9779
|
function youtube(source, url) {
|
|
@@ -9793,10 +9794,10 @@ exports.youtube = youtube;
|
|
|
9793
9794
|
function resolve(url) {
|
|
9794
9795
|
switch (url.origin) {
|
|
9795
9796
|
case 'https://www.youtube.com':
|
|
9796
|
-
return url.pathname.match(/^\/watch\/?$/) ? url.searchParams.get('v')?.concat(url.search.replace(/([?&])v=[^&#]*&?/g, '$1'), url.hash) :
|
|
9797
|
+
return url.pathname.match(/^\/watch\/?$/) ? url.searchParams.get('v')?.concat(url.search.replace(/([?&])v=[^&#]*&?/g, '$1'), url.hash) : undefined;
|
|
9797
9798
|
|
|
9798
9799
|
case 'https://youtu.be':
|
|
9799
|
-
return url.pathname.match(/^\/[\w-]+\/?$/) ? url.href.slice(url.origin.length) :
|
|
9800
|
+
return url.pathname.match(/^\/[\w-]+\/?$/) ? url.href.slice(url.origin.length) : undefined;
|
|
9800
9801
|
|
|
9801
9802
|
default:
|
|
9802
9803
|
return;
|
|
@@ -9909,8 +9910,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9909
9910
|
}));
|
|
9910
9911
|
exports.quote = void 0;
|
|
9911
9912
|
|
|
9912
|
-
const global_1 = __webpack_require__(4128);
|
|
9913
|
-
|
|
9914
9913
|
const parser_1 = __webpack_require__(6728);
|
|
9915
9914
|
|
|
9916
9915
|
const cite_1 = __webpack_require__(6315);
|
|
@@ -9955,7 +9954,7 @@ function quote(anchor, range) {
|
|
|
9955
9954
|
for (let es = node.querySelectorAll('br'), len = es.length, i = 0; i < len; ++i) {
|
|
9956
9955
|
const el = es[i];
|
|
9957
9956
|
|
|
9958
|
-
if (anchor && el.nextSibling instanceof
|
|
9957
|
+
if (anchor && el.nextSibling instanceof Element && el.nextSibling.matches('.cite, .quote')) {
|
|
9959
9958
|
el.replaceWith(`\n>${el.nextSibling.matches('.quote.invalid') ? ' ' : ''}`);
|
|
9960
9959
|
continue;
|
|
9961
9960
|
}
|
|
@@ -9988,7 +9987,7 @@ function fit(range) {
|
|
|
9988
9987
|
return void range.setStart(node.parentElement.previousSibling, 0);
|
|
9989
9988
|
}
|
|
9990
9989
|
|
|
9991
|
-
if (node.nodeName === 'BR' && node.nextSibling instanceof
|
|
9990
|
+
if (node.nodeName === 'BR' && node.nextSibling instanceof Element && node.nextSibling.matches('.cite, .quote')) {
|
|
9992
9991
|
return void range.setStart(node.nextSibling.firstChild, 0);
|
|
9993
9992
|
}
|
|
9994
9993
|
|
|
@@ -10011,7 +10010,7 @@ function trim(node) {
|
|
|
10011
10010
|
/***/ }),
|
|
10012
10011
|
|
|
10013
10012
|
/***/ 5202:
|
|
10014
|
-
/***/ ((__unused_webpack_module, exports
|
|
10013
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10015
10014
|
|
|
10016
10015
|
"use strict";
|
|
10017
10016
|
|
|
@@ -10021,11 +10020,9 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10021
10020
|
}));
|
|
10022
10021
|
exports.scope = void 0;
|
|
10023
10022
|
|
|
10024
|
-
const global_1 = __webpack_require__(4128);
|
|
10025
|
-
|
|
10026
10023
|
function scope(base, filter = '', bound = `${'id' in base && base.id ? `#${base.id}, ` : ''}section, article, aside, blockquote, pre, .quote, .math, .media`) {
|
|
10027
10024
|
bound += filter && `, ${filter}`;
|
|
10028
|
-
const memory = new
|
|
10025
|
+
const memory = new WeakMap();
|
|
10029
10026
|
const context = 'id' in base && base.closest(bound) || null;
|
|
10030
10027
|
return el => {
|
|
10031
10028
|
const {
|
|
@@ -10034,7 +10031,7 @@ function scope(base, filter = '', bound = `${'id' in base && base.id ? `#${base.
|
|
|
10034
10031
|
const node = memory.has(parentNode) ? parentNode : parentNode.parentNode;
|
|
10035
10032
|
let result = memory.get(node);
|
|
10036
10033
|
|
|
10037
|
-
if (result ===
|
|
10034
|
+
if (result === undefined) {
|
|
10038
10035
|
result = el.closest(bound) === context;
|
|
10039
10036
|
memory.set(node, result);
|
|
10040
10037
|
}
|
|
@@ -10058,8 +10055,6 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10058
10055
|
}));
|
|
10059
10056
|
exports.toc = void 0;
|
|
10060
10057
|
|
|
10061
|
-
const global_1 = __webpack_require__(4128);
|
|
10062
|
-
|
|
10063
10058
|
const array_1 = __webpack_require__(8112);
|
|
10064
10059
|
|
|
10065
10060
|
const dom_1 = __webpack_require__(3252); // Bug: Firefox
|
|
@@ -10100,7 +10095,7 @@ function parse(node, index = '') {
|
|
|
10100
10095
|
const idx = isHeading ? index === '' ? `${++i}` : `${index}.${++i}` : index === '' ? `${i}` : `${index}.${i}`;
|
|
10101
10096
|
return (0, dom_1.html)('li', (0, array_1.push)([(0, dom_1.html)('a', {
|
|
10102
10097
|
href: `#${el.id}`,
|
|
10103
|
-
'data-index': isHeading ? idx :
|
|
10098
|
+
'data-index': isHeading ? idx : undefined
|
|
10104
10099
|
}, unlink(el.cloneNode(true)))], cs.length > 0 ? [parse(cs, idx)] : []));
|
|
10105
10100
|
}));
|
|
10106
10101
|
}
|
|
@@ -10130,7 +10125,7 @@ function unlink(h) {
|
|
|
10130
10125
|
/***/ 3252:
|
|
10131
10126
|
/***/ (function(module) {
|
|
10132
10127
|
|
|
10133
|
-
/*! typed-dom v0.0.
|
|
10128
|
+
/*! typed-dom v0.0.312 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */
|
|
10134
10129
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10135
10130
|
if(true)
|
|
10136
10131
|
module.exports = factory();
|
|
@@ -10181,33 +10176,8 @@ exports.equal = equal;
|
|
|
10181
10176
|
|
|
10182
10177
|
/***/ }),
|
|
10183
10178
|
|
|
10184
|
-
/***/ 128:
|
|
10185
|
-
/***/ ((module, __unused_webpack_exports, __nested_webpack_require_2745__) => {
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
__nested_webpack_require_2745__(921);
|
|
10190
|
-
|
|
10191
|
-
const global = void 0 || typeof globalThis !== 'undefined' && globalThis // @ts-ignore
|
|
10192
|
-
|| typeof self !== 'undefined' && self || Function('return this')();
|
|
10193
|
-
global.global = global;
|
|
10194
|
-
module.exports = global;
|
|
10195
|
-
|
|
10196
|
-
/***/ }),
|
|
10197
|
-
|
|
10198
|
-
/***/ 921:
|
|
10199
|
-
/***/ (() => {
|
|
10200
|
-
|
|
10201
|
-
// @ts-ignore
|
|
10202
|
-
|
|
10203
|
-
var globalThis; // @ts-ignore
|
|
10204
|
-
|
|
10205
|
-
var global = (/* unused pure expression or super */ null && (0));
|
|
10206
|
-
|
|
10207
|
-
/***/ }),
|
|
10208
|
-
|
|
10209
10179
|
/***/ 808:
|
|
10210
|
-
/***/ ((__unused_webpack_module, exports,
|
|
10180
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_2745__) => {
|
|
10211
10181
|
|
|
10212
10182
|
|
|
10213
10183
|
|
|
@@ -10216,17 +10186,13 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10216
10186
|
}));
|
|
10217
10187
|
exports.reduce = exports.memoize = void 0;
|
|
10218
10188
|
|
|
10219
|
-
const
|
|
10189
|
+
const alias_1 = __nested_webpack_require_2745__(406);
|
|
10220
10190
|
|
|
10221
|
-
const
|
|
10222
|
-
|
|
10223
|
-
const compare_1 = __nested_webpack_require_3232__(529);
|
|
10224
|
-
|
|
10225
|
-
const undefined = void 0;
|
|
10191
|
+
const compare_1 = __nested_webpack_require_2745__(529);
|
|
10226
10192
|
|
|
10227
10193
|
function memoize(f, identify = (...as) => as[0], memory) {
|
|
10228
10194
|
if (typeof identify === 'object') return memoize(f, undefined, identify);
|
|
10229
|
-
return (0, alias_1.isArray)(memory) ? memoizeArray(f, identify, memory) : memoizeObject(f, identify, memory ?? new
|
|
10195
|
+
return (0, alias_1.isArray)(memory) ? memoizeArray(f, identify, memory) : memoizeObject(f, identify, memory ?? new Map());
|
|
10230
10196
|
}
|
|
10231
10197
|
|
|
10232
10198
|
exports.memoize = memoize;
|
|
@@ -10277,7 +10243,7 @@ exports.reduce = reduce;
|
|
|
10277
10243
|
/***/ }),
|
|
10278
10244
|
|
|
10279
10245
|
/***/ 521:
|
|
10280
|
-
/***/ ((__unused_webpack_module, exports,
|
|
10246
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_4210__) => {
|
|
10281
10247
|
|
|
10282
10248
|
|
|
10283
10249
|
|
|
@@ -10286,25 +10252,23 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10286
10252
|
}));
|
|
10287
10253
|
exports.defrag = exports.prepend = exports.append = exports.isChildren = exports.define = exports.element = exports.text = exports.svg = exports.html = exports.frag = exports.shadow = void 0;
|
|
10288
10254
|
|
|
10289
|
-
const
|
|
10290
|
-
|
|
10291
|
-
const alias_1 = __nested_webpack_require_4777__(406);
|
|
10255
|
+
const alias_1 = __nested_webpack_require_4210__(406);
|
|
10292
10256
|
|
|
10293
|
-
const memoize_1 =
|
|
10257
|
+
const memoize_1 = __nested_webpack_require_4210__(808);
|
|
10294
10258
|
|
|
10295
10259
|
var caches;
|
|
10296
10260
|
|
|
10297
10261
|
(function (caches) {
|
|
10298
10262
|
caches.shadows = new WeakMap();
|
|
10299
10263
|
caches.shadow = (0, memoize_1.memoize)((el, opts) => el.attachShadow(opts), caches.shadows);
|
|
10300
|
-
caches.fragment =
|
|
10264
|
+
caches.fragment = document.createDocumentFragment();
|
|
10301
10265
|
})(caches || (caches = {}));
|
|
10302
10266
|
|
|
10303
10267
|
function shadow(el, opts, children, factory = exports.html) {
|
|
10304
10268
|
if (typeof el === 'string') return shadow(factory(el), opts, children, factory);
|
|
10305
|
-
if (typeof opts === 'function') return shadow(el,
|
|
10306
|
-
if (typeof children === 'function') return shadow(el, opts,
|
|
10307
|
-
if (isChildren(opts)) return shadow(el,
|
|
10269
|
+
if (typeof opts === 'function') return shadow(el, undefined, children, opts);
|
|
10270
|
+
if (typeof children === 'function') return shadow(el, opts, undefined, children);
|
|
10271
|
+
if (isChildren(opts)) return shadow(el, undefined, opts, factory);
|
|
10308
10272
|
return defineChildren(!opts ? el.shadowRoot ?? caches.shadows.get(el) ?? el.attachShadow({
|
|
10309
10273
|
mode: 'open'
|
|
10310
10274
|
}) : opts.mode === 'open' ? el.shadowRoot ?? el.attachShadow(opts) : caches.shadows.get(el) ?? caches.shadow(el, opts), children);
|
|
@@ -10317,15 +10281,15 @@ function frag(children) {
|
|
|
10317
10281
|
}
|
|
10318
10282
|
|
|
10319
10283
|
exports.frag = frag;
|
|
10320
|
-
exports.html = element(
|
|
10284
|
+
exports.html = element(document, "HTML"
|
|
10321
10285
|
/* NS.HTML */
|
|
10322
10286
|
);
|
|
10323
|
-
exports.svg = element(
|
|
10287
|
+
exports.svg = element(document, "SVG"
|
|
10324
10288
|
/* NS.SVG */
|
|
10325
10289
|
);
|
|
10326
10290
|
|
|
10327
10291
|
function text(source) {
|
|
10328
|
-
return
|
|
10292
|
+
return document.createTextNode(source);
|
|
10329
10293
|
}
|
|
10330
10294
|
|
|
10331
10295
|
exports.text = text;
|
|
@@ -10390,7 +10354,7 @@ function defineAttrs(el, attrs) {
|
|
|
10390
10354
|
case 'connect':
|
|
10391
10355
|
case 'disconnect':
|
|
10392
10356
|
const prop = `on${type}`;
|
|
10393
|
-
el[prop] ??
|
|
10357
|
+
el[prop] ?? Object.defineProperty(el, prop, {
|
|
10394
10358
|
configurable: true,
|
|
10395
10359
|
enumerable: false,
|
|
10396
10360
|
writable: true,
|
|
@@ -10417,7 +10381,7 @@ function defineAttrs(el, attrs) {
|
|
|
10417
10381
|
case 'connect':
|
|
10418
10382
|
case 'disconnect':
|
|
10419
10383
|
const prop = `on${type}`;
|
|
10420
|
-
el[prop] ??
|
|
10384
|
+
el[prop] ?? Object.defineProperty(el, prop, {
|
|
10421
10385
|
configurable: true,
|
|
10422
10386
|
enumerable: false,
|
|
10423
10387
|
writable: true,
|
|
@@ -10441,7 +10405,7 @@ function defineAttrs(el, attrs) {
|
|
|
10441
10405
|
}
|
|
10442
10406
|
|
|
10443
10407
|
function defineChildren(node, children) {
|
|
10444
|
-
if (children ===
|
|
10408
|
+
if (children === undefined) return node;
|
|
10445
10409
|
|
|
10446
10410
|
if (typeof children === 'string') {
|
|
10447
10411
|
node.textContent = children;
|
|
@@ -10458,13 +10422,13 @@ function defineChildren(node, children) {
|
|
|
10458
10422
|
}
|
|
10459
10423
|
|
|
10460
10424
|
function isChildren(value) {
|
|
10461
|
-
return !!value?.[
|
|
10425
|
+
return !!value?.[Symbol.iterator];
|
|
10462
10426
|
}
|
|
10463
10427
|
|
|
10464
10428
|
exports.isChildren = isChildren;
|
|
10465
10429
|
|
|
10466
10430
|
function append(node, children) {
|
|
10467
|
-
if (children ===
|
|
10431
|
+
if (children === undefined) return node;
|
|
10468
10432
|
|
|
10469
10433
|
if (typeof children === 'string') {
|
|
10470
10434
|
node.append(children);
|
|
@@ -10480,7 +10444,7 @@ function append(node, children) {
|
|
|
10480
10444
|
exports.append = append;
|
|
10481
10445
|
|
|
10482
10446
|
function prepend(node, children) {
|
|
10483
|
-
if (children ===
|
|
10447
|
+
if (children === undefined) return node;
|
|
10484
10448
|
|
|
10485
10449
|
if (typeof children === 'string') {
|
|
10486
10450
|
node.prepend(children);
|
|
@@ -10525,7 +10489,7 @@ exports.defrag = defrag;
|
|
|
10525
10489
|
/******/ var __webpack_module_cache__ = {};
|
|
10526
10490
|
/******/
|
|
10527
10491
|
/******/ // The require function
|
|
10528
|
-
/******/ function
|
|
10492
|
+
/******/ function __nested_webpack_require_11074__(moduleId) {
|
|
10529
10493
|
/******/ // Check if module is in cache
|
|
10530
10494
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
10531
10495
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -10539,7 +10503,7 @@ exports.defrag = defrag;
|
|
|
10539
10503
|
/******/ };
|
|
10540
10504
|
/******/
|
|
10541
10505
|
/******/ // Execute the module function
|
|
10542
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
10506
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_11074__);
|
|
10543
10507
|
/******/
|
|
10544
10508
|
/******/ // Return the exports of the module
|
|
10545
10509
|
/******/ return module.exports;
|
|
@@ -10550,7 +10514,7 @@ exports.defrag = defrag;
|
|
|
10550
10514
|
/******/ // startup
|
|
10551
10515
|
/******/ // Load entry module and return exports
|
|
10552
10516
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
10553
|
-
/******/ var __webpack_exports__ =
|
|
10517
|
+
/******/ var __webpack_exports__ = __nested_webpack_require_11074__(521);
|
|
10554
10518
|
/******/
|
|
10555
10519
|
/******/ return __webpack_exports__;
|
|
10556
10520
|
/******/ })()
|
|
@@ -10562,7 +10526,7 @@ exports.defrag = defrag;
|
|
|
10562
10526
|
/***/ 6120:
|
|
10563
10527
|
/***/ (function(module) {
|
|
10564
10528
|
|
|
10565
|
-
/*! typed-dom v0.0.
|
|
10529
|
+
/*! typed-dom v0.0.312 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */
|
|
10566
10530
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10567
10531
|
if(true)
|
|
10568
10532
|
module.exports = factory();
|
|
@@ -10666,6 +10630,19 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9450__;
|
|
|
10666
10630
|
/******/ }
|
|
10667
10631
|
/******/
|
|
10668
10632
|
/************************************************************************/
|
|
10633
|
+
/******/ /* webpack/runtime/global */
|
|
10634
|
+
/******/ (() => {
|
|
10635
|
+
/******/ __webpack_require__.g = (function() {
|
|
10636
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
10637
|
+
/******/ try {
|
|
10638
|
+
/******/ return this || new Function('return this')();
|
|
10639
|
+
/******/ } catch (e) {
|
|
10640
|
+
/******/ if (typeof window === 'object') return window;
|
|
10641
|
+
/******/ }
|
|
10642
|
+
/******/ })();
|
|
10643
|
+
/******/ })();
|
|
10644
|
+
/******/
|
|
10645
|
+
/************************************************************************/
|
|
10669
10646
|
/******/
|
|
10670
10647
|
/******/ // startup
|
|
10671
10648
|
/******/ // Load entry module and return exports
|