@readme/markdown 6.58.1 → 6.59.0
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/README.md +2 -3
- package/components/Heading/index.jsx +4 -6
- package/dist/main.js +1939 -324
- package/dist/main.node.js +12380 -10765
- package/package.json +3 -2
package/dist/main.js
CHANGED
|
@@ -8633,12 +8633,11 @@ function Heading(_ref) {
|
|
|
8633
8633
|
}
|
|
8634
8634
|
return React.createElement(tag, attrs, children);
|
|
8635
8635
|
}
|
|
8636
|
-
function CreateHeading(level,
|
|
8636
|
+
function CreateHeading(level, _ref2) {
|
|
8637
8637
|
var showAnchorIcons = _ref2.showAnchorIcons;
|
|
8638
8638
|
// eslint-disable-next-line react/display-name
|
|
8639
8639
|
return function (props) {
|
|
8640
8640
|
return /*#__PURE__*/React.createElement(Heading, _extends({}, props, {
|
|
8641
|
-
anchors: anchors,
|
|
8642
8641
|
level: level,
|
|
8643
8642
|
showAnchorIcons: showAnchorIcons,
|
|
8644
8643
|
tag: "h".concat(level)
|
|
@@ -8647,7 +8646,6 @@ function CreateHeading(level, anchors, _ref2) {
|
|
|
8647
8646
|
}
|
|
8648
8647
|
Heading.propTypes = {
|
|
8649
8648
|
align: PropTypes.oneOf(['left', 'center', 'right', '']),
|
|
8650
|
-
anchors: PropTypes.object,
|
|
8651
8649
|
children: PropTypes.array.isRequired,
|
|
8652
8650
|
id: PropTypes.string.isRequired,
|
|
8653
8651
|
level: PropTypes.number,
|
|
@@ -8660,9 +8658,7 @@ Heading.defaultProps = {
|
|
|
8660
8658
|
level: 2,
|
|
8661
8659
|
showAnchorIcons: true
|
|
8662
8660
|
};
|
|
8663
|
-
module.exports =
|
|
8664
|
-
return CreateHeading(level, anchors, opts);
|
|
8665
|
-
};
|
|
8661
|
+
module.exports = CreateHeading;
|
|
8666
8662
|
|
|
8667
8663
|
/***/ }),
|
|
8668
8664
|
|
|
@@ -26257,6 +26253,532 @@ module.exports = function () {
|
|
|
26257
26253
|
};
|
|
26258
26254
|
module.exports.tableFlattening = transformer;
|
|
26259
26255
|
|
|
26256
|
+
/***/ }),
|
|
26257
|
+
|
|
26258
|
+
/***/ 8192:
|
|
26259
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26260
|
+
|
|
26261
|
+
"use strict";
|
|
26262
|
+
// ESM COMPAT FLAG
|
|
26263
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26264
|
+
|
|
26265
|
+
// EXPORTS
|
|
26266
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
26267
|
+
"singleCodeTabs": () => (/* reexport */ single_code_tabs)
|
|
26268
|
+
});
|
|
26269
|
+
|
|
26270
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-is/index.js
|
|
26271
|
+
/**
|
|
26272
|
+
* @typedef {import('unist').Node} Node
|
|
26273
|
+
* @typedef {import('unist').Parent} Parent
|
|
26274
|
+
*
|
|
26275
|
+
* @typedef {string} Type
|
|
26276
|
+
* @typedef {Object<string, unknown>} Props
|
|
26277
|
+
*
|
|
26278
|
+
* @typedef {null|undefined|Type|Props|TestFunctionAnything|Array.<Type|Props|TestFunctionAnything>} Test
|
|
26279
|
+
*/
|
|
26280
|
+
|
|
26281
|
+
/**
|
|
26282
|
+
* Check if a node passes a test
|
|
26283
|
+
*
|
|
26284
|
+
* @callback TestFunctionAnything
|
|
26285
|
+
* @param {Node} node
|
|
26286
|
+
* @param {number|null|undefined} [index]
|
|
26287
|
+
* @param {Parent|null|undefined} [parent]
|
|
26288
|
+
* @returns {boolean|void}
|
|
26289
|
+
*/
|
|
26290
|
+
|
|
26291
|
+
/**
|
|
26292
|
+
* Check if a node passes a certain node test
|
|
26293
|
+
*
|
|
26294
|
+
* @template {Node} X
|
|
26295
|
+
* @callback TestFunctionPredicate
|
|
26296
|
+
* @param {Node} node
|
|
26297
|
+
* @param {number|null|undefined} [index]
|
|
26298
|
+
* @param {Parent|null|undefined} [parent]
|
|
26299
|
+
* @returns {node is X}
|
|
26300
|
+
*/
|
|
26301
|
+
|
|
26302
|
+
/**
|
|
26303
|
+
* @callback AssertAnything
|
|
26304
|
+
* @param {unknown} [node]
|
|
26305
|
+
* @param {number|null|undefined} [index]
|
|
26306
|
+
* @param {Parent|null|undefined} [parent]
|
|
26307
|
+
* @returns {boolean}
|
|
26308
|
+
*/
|
|
26309
|
+
|
|
26310
|
+
/**
|
|
26311
|
+
* Check if a node passes a certain node test
|
|
26312
|
+
*
|
|
26313
|
+
* @template {Node} Y
|
|
26314
|
+
* @callback AssertPredicate
|
|
26315
|
+
* @param {unknown} [node]
|
|
26316
|
+
* @param {number|null|undefined} [index]
|
|
26317
|
+
* @param {Parent|null|undefined} [parent]
|
|
26318
|
+
* @returns {node is Y}
|
|
26319
|
+
*/
|
|
26320
|
+
|
|
26321
|
+
const is =
|
|
26322
|
+
/**
|
|
26323
|
+
* Check if a node passes a test.
|
|
26324
|
+
* When a `parent` node is known the `index` of node should also be given.
|
|
26325
|
+
*
|
|
26326
|
+
* @type {(
|
|
26327
|
+
* (<T extends Node>(node: unknown, test: T['type']|Partial<T>|TestFunctionPredicate<T>|Array.<T['type']|Partial<T>|TestFunctionPredicate<T>>, index?: number|null|undefined, parent?: Parent|null|undefined, context?: unknown) => node is T) &
|
|
26328
|
+
* ((node?: unknown, test?: Test, index?: number|null|undefined, parent?: Parent|null|undefined, context?: unknown) => boolean)
|
|
26329
|
+
* )}
|
|
26330
|
+
*/
|
|
26331
|
+
(
|
|
26332
|
+
/**
|
|
26333
|
+
* Check if a node passes a test.
|
|
26334
|
+
* When a `parent` node is known the `index` of node should also be given.
|
|
26335
|
+
*
|
|
26336
|
+
* @param {unknown} [node] Node to check
|
|
26337
|
+
* @param {Test} [test]
|
|
26338
|
+
* When nullish, checks if `node` is a `Node`.
|
|
26339
|
+
* When `string`, works like passing `function (node) {return node.type === test}`.
|
|
26340
|
+
* When `function` checks if function passed the node is true.
|
|
26341
|
+
* When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
|
|
26342
|
+
* When `array`, checks any one of the subtests pass.
|
|
26343
|
+
* @param {number|null|undefined} [index] Position of `node` in `parent`
|
|
26344
|
+
* @param {Parent|null|undefined} [parent] Parent of `node`
|
|
26345
|
+
* @param {unknown} [context] Context object to invoke `test` with
|
|
26346
|
+
* @returns {boolean} Whether test passed and `node` is a `Node` (object with `type` set to non-empty `string`).
|
|
26347
|
+
*/
|
|
26348
|
+
// eslint-disable-next-line max-params
|
|
26349
|
+
function is(node, test, index, parent, context) {
|
|
26350
|
+
const check = convert(test)
|
|
26351
|
+
|
|
26352
|
+
if (
|
|
26353
|
+
index !== undefined &&
|
|
26354
|
+
index !== null &&
|
|
26355
|
+
(typeof index !== 'number' ||
|
|
26356
|
+
index < 0 ||
|
|
26357
|
+
index === Number.POSITIVE_INFINITY)
|
|
26358
|
+
) {
|
|
26359
|
+
throw new Error('Expected positive finite index')
|
|
26360
|
+
}
|
|
26361
|
+
|
|
26362
|
+
if (
|
|
26363
|
+
parent !== undefined &&
|
|
26364
|
+
parent !== null &&
|
|
26365
|
+
(!is(parent) || !parent.children)
|
|
26366
|
+
) {
|
|
26367
|
+
throw new Error('Expected parent node')
|
|
26368
|
+
}
|
|
26369
|
+
|
|
26370
|
+
if (
|
|
26371
|
+
(parent === undefined || parent === null) !==
|
|
26372
|
+
(index === undefined || index === null)
|
|
26373
|
+
) {
|
|
26374
|
+
throw new Error('Expected both parent and index')
|
|
26375
|
+
}
|
|
26376
|
+
|
|
26377
|
+
// @ts-expect-error Looks like a node.
|
|
26378
|
+
return node && node.type && typeof node.type === 'string'
|
|
26379
|
+
? Boolean(check.call(context, node, index, parent))
|
|
26380
|
+
: false
|
|
26381
|
+
}
|
|
26382
|
+
)
|
|
26383
|
+
|
|
26384
|
+
const convert =
|
|
26385
|
+
/**
|
|
26386
|
+
* @type {(
|
|
26387
|
+
* (<T extends Node>(test: T['type']|Partial<T>|TestFunctionPredicate<T>) => AssertPredicate<T>) &
|
|
26388
|
+
* ((test?: Test) => AssertAnything)
|
|
26389
|
+
* )}
|
|
26390
|
+
*/
|
|
26391
|
+
(
|
|
26392
|
+
/**
|
|
26393
|
+
* Generate an assertion from a check.
|
|
26394
|
+
* @param {Test} [test]
|
|
26395
|
+
* When nullish, checks if `node` is a `Node`.
|
|
26396
|
+
* When `string`, works like passing `function (node) {return node.type === test}`.
|
|
26397
|
+
* When `function` checks if function passed the node is true.
|
|
26398
|
+
* When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
|
|
26399
|
+
* When `array`, checks any one of the subtests pass.
|
|
26400
|
+
* @returns {AssertAnything}
|
|
26401
|
+
*/
|
|
26402
|
+
function (test) {
|
|
26403
|
+
if (test === undefined || test === null) {
|
|
26404
|
+
return ok
|
|
26405
|
+
}
|
|
26406
|
+
|
|
26407
|
+
if (typeof test === 'string') {
|
|
26408
|
+
return typeFactory(test)
|
|
26409
|
+
}
|
|
26410
|
+
|
|
26411
|
+
if (typeof test === 'object') {
|
|
26412
|
+
return Array.isArray(test) ? anyFactory(test) : propsFactory(test)
|
|
26413
|
+
}
|
|
26414
|
+
|
|
26415
|
+
if (typeof test === 'function') {
|
|
26416
|
+
return castFactory(test)
|
|
26417
|
+
}
|
|
26418
|
+
|
|
26419
|
+
throw new Error('Expected function, string, or object as test')
|
|
26420
|
+
}
|
|
26421
|
+
)
|
|
26422
|
+
/**
|
|
26423
|
+
* @param {Array.<Type|Props|TestFunctionAnything>} tests
|
|
26424
|
+
* @returns {AssertAnything}
|
|
26425
|
+
*/
|
|
26426
|
+
function anyFactory(tests) {
|
|
26427
|
+
/** @type {Array.<AssertAnything>} */
|
|
26428
|
+
const checks = []
|
|
26429
|
+
let index = -1
|
|
26430
|
+
|
|
26431
|
+
while (++index < tests.length) {
|
|
26432
|
+
checks[index] = convert(tests[index])
|
|
26433
|
+
}
|
|
26434
|
+
|
|
26435
|
+
return castFactory(any)
|
|
26436
|
+
|
|
26437
|
+
/**
|
|
26438
|
+
* @this {unknown}
|
|
26439
|
+
* @param {unknown[]} parameters
|
|
26440
|
+
* @returns {boolean}
|
|
26441
|
+
*/
|
|
26442
|
+
function any(...parameters) {
|
|
26443
|
+
let index = -1
|
|
26444
|
+
|
|
26445
|
+
while (++index < checks.length) {
|
|
26446
|
+
if (checks[index].call(this, ...parameters)) return true
|
|
26447
|
+
}
|
|
26448
|
+
|
|
26449
|
+
return false
|
|
26450
|
+
}
|
|
26451
|
+
}
|
|
26452
|
+
|
|
26453
|
+
/**
|
|
26454
|
+
* Utility to assert each property in `test` is represented in `node`, and each
|
|
26455
|
+
* values are strictly equal.
|
|
26456
|
+
*
|
|
26457
|
+
* @param {Props} check
|
|
26458
|
+
* @returns {AssertAnything}
|
|
26459
|
+
*/
|
|
26460
|
+
function propsFactory(check) {
|
|
26461
|
+
return castFactory(all)
|
|
26462
|
+
|
|
26463
|
+
/**
|
|
26464
|
+
* @param {Node} node
|
|
26465
|
+
* @returns {boolean}
|
|
26466
|
+
*/
|
|
26467
|
+
function all(node) {
|
|
26468
|
+
/** @type {string} */
|
|
26469
|
+
let key
|
|
26470
|
+
|
|
26471
|
+
for (key in check) {
|
|
26472
|
+
// @ts-expect-error: hush, it sure works as an index.
|
|
26473
|
+
if (node[key] !== check[key]) return false
|
|
26474
|
+
}
|
|
26475
|
+
|
|
26476
|
+
return true
|
|
26477
|
+
}
|
|
26478
|
+
}
|
|
26479
|
+
|
|
26480
|
+
/**
|
|
26481
|
+
* Utility to convert a string into a function which checks a given node’s type
|
|
26482
|
+
* for said string.
|
|
26483
|
+
*
|
|
26484
|
+
* @param {Type} check
|
|
26485
|
+
* @returns {AssertAnything}
|
|
26486
|
+
*/
|
|
26487
|
+
function typeFactory(check) {
|
|
26488
|
+
return castFactory(type)
|
|
26489
|
+
|
|
26490
|
+
/**
|
|
26491
|
+
* @param {Node} node
|
|
26492
|
+
*/
|
|
26493
|
+
function type(node) {
|
|
26494
|
+
return node && node.type === check
|
|
26495
|
+
}
|
|
26496
|
+
}
|
|
26497
|
+
|
|
26498
|
+
/**
|
|
26499
|
+
* Utility to convert a string into a function which checks a given node’s type
|
|
26500
|
+
* for said string.
|
|
26501
|
+
* @param {TestFunctionAnything} check
|
|
26502
|
+
* @returns {AssertAnything}
|
|
26503
|
+
*/
|
|
26504
|
+
function castFactory(check) {
|
|
26505
|
+
return assertion
|
|
26506
|
+
|
|
26507
|
+
/**
|
|
26508
|
+
* @this {unknown}
|
|
26509
|
+
* @param {Array.<unknown>} parameters
|
|
26510
|
+
* @returns {boolean}
|
|
26511
|
+
*/
|
|
26512
|
+
function assertion(...parameters) {
|
|
26513
|
+
// @ts-expect-error: spreading is fine.
|
|
26514
|
+
return Boolean(check.call(this, ...parameters))
|
|
26515
|
+
}
|
|
26516
|
+
}
|
|
26517
|
+
|
|
26518
|
+
// Utility to return true.
|
|
26519
|
+
function ok() {
|
|
26520
|
+
return true
|
|
26521
|
+
}
|
|
26522
|
+
|
|
26523
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/color.browser.js
|
|
26524
|
+
/**
|
|
26525
|
+
* @param {string} d
|
|
26526
|
+
* @returns {string}
|
|
26527
|
+
*/
|
|
26528
|
+
function color(d) {
|
|
26529
|
+
return d
|
|
26530
|
+
}
|
|
26531
|
+
|
|
26532
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/index.js
|
|
26533
|
+
/**
|
|
26534
|
+
* @typedef {import('unist').Node} Node
|
|
26535
|
+
* @typedef {import('unist').Parent} Parent
|
|
26536
|
+
* @typedef {import('unist-util-is').Test} Test
|
|
26537
|
+
* @typedef {import('./complex-types.js').Action} Action
|
|
26538
|
+
* @typedef {import('./complex-types.js').Index} Index
|
|
26539
|
+
* @typedef {import('./complex-types.js').ActionTuple} ActionTuple
|
|
26540
|
+
* @typedef {import('./complex-types.js').VisitorResult} VisitorResult
|
|
26541
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
26542
|
+
*/
|
|
26543
|
+
|
|
26544
|
+
|
|
26545
|
+
|
|
26546
|
+
|
|
26547
|
+
/**
|
|
26548
|
+
* Continue traversing as normal
|
|
26549
|
+
*/
|
|
26550
|
+
const CONTINUE = true
|
|
26551
|
+
/**
|
|
26552
|
+
* Do not traverse this node’s children
|
|
26553
|
+
*/
|
|
26554
|
+
const SKIP = 'skip'
|
|
26555
|
+
/**
|
|
26556
|
+
* Stop traversing immediately
|
|
26557
|
+
*/
|
|
26558
|
+
const EXIT = false
|
|
26559
|
+
|
|
26560
|
+
/**
|
|
26561
|
+
* Visit children of tree which pass test.
|
|
26562
|
+
*
|
|
26563
|
+
* @param tree
|
|
26564
|
+
* Tree to walk
|
|
26565
|
+
* @param [test]
|
|
26566
|
+
* `unist-util-is`-compatible test
|
|
26567
|
+
* @param visitor
|
|
26568
|
+
* Function called for nodes that pass `test`.
|
|
26569
|
+
* @param [reverse=false]
|
|
26570
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
26571
|
+
*/
|
|
26572
|
+
const visitParents =
|
|
26573
|
+
/**
|
|
26574
|
+
* @type {(
|
|
26575
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
26576
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
26577
|
+
* )}
|
|
26578
|
+
*/
|
|
26579
|
+
(
|
|
26580
|
+
/**
|
|
26581
|
+
* @param {Node} tree
|
|
26582
|
+
* @param {Test} test
|
|
26583
|
+
* @param {import('./complex-types.js').Visitor<Node>} visitor
|
|
26584
|
+
* @param {boolean} [reverse=false]
|
|
26585
|
+
*/
|
|
26586
|
+
function (tree, test, visitor, reverse) {
|
|
26587
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
26588
|
+
reverse = visitor
|
|
26589
|
+
// @ts-expect-error no visitor given, so `visitor` is test.
|
|
26590
|
+
visitor = test
|
|
26591
|
+
test = null
|
|
26592
|
+
}
|
|
26593
|
+
|
|
26594
|
+
const is = convert(test)
|
|
26595
|
+
const step = reverse ? -1 : 1
|
|
26596
|
+
|
|
26597
|
+
factory(tree, null, [])()
|
|
26598
|
+
|
|
26599
|
+
/**
|
|
26600
|
+
* @param {Node} node
|
|
26601
|
+
* @param {number?} index
|
|
26602
|
+
* @param {Array<Parent>} parents
|
|
26603
|
+
*/
|
|
26604
|
+
function factory(node, index, parents) {
|
|
26605
|
+
/** @type {Record<string, unknown>} */
|
|
26606
|
+
// @ts-expect-error: hush
|
|
26607
|
+
const value = typeof node === 'object' && node !== null ? node : {}
|
|
26608
|
+
/** @type {string|undefined} */
|
|
26609
|
+
let name
|
|
26610
|
+
|
|
26611
|
+
if (typeof value.type === 'string') {
|
|
26612
|
+
name =
|
|
26613
|
+
typeof value.tagName === 'string'
|
|
26614
|
+
? value.tagName
|
|
26615
|
+
: typeof value.name === 'string'
|
|
26616
|
+
? value.name
|
|
26617
|
+
: undefined
|
|
26618
|
+
|
|
26619
|
+
Object.defineProperty(visit, 'name', {
|
|
26620
|
+
value:
|
|
26621
|
+
'node (' +
|
|
26622
|
+
color(value.type + (name ? '<' + name + '>' : '')) +
|
|
26623
|
+
')'
|
|
26624
|
+
})
|
|
26625
|
+
}
|
|
26626
|
+
|
|
26627
|
+
return visit
|
|
26628
|
+
|
|
26629
|
+
function visit() {
|
|
26630
|
+
/** @type {ActionTuple} */
|
|
26631
|
+
let result = []
|
|
26632
|
+
/** @type {ActionTuple} */
|
|
26633
|
+
let subresult
|
|
26634
|
+
/** @type {number} */
|
|
26635
|
+
let offset
|
|
26636
|
+
/** @type {Array<Parent>} */
|
|
26637
|
+
let grandparents
|
|
26638
|
+
|
|
26639
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
26640
|
+
result = toResult(visitor(node, parents))
|
|
26641
|
+
|
|
26642
|
+
if (result[0] === EXIT) {
|
|
26643
|
+
return result
|
|
26644
|
+
}
|
|
26645
|
+
}
|
|
26646
|
+
|
|
26647
|
+
// @ts-expect-error looks like a parent.
|
|
26648
|
+
if (node.children && result[0] !== SKIP) {
|
|
26649
|
+
// @ts-expect-error looks like a parent.
|
|
26650
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
26651
|
+
// @ts-expect-error looks like a parent.
|
|
26652
|
+
grandparents = parents.concat(node)
|
|
26653
|
+
|
|
26654
|
+
// @ts-expect-error looks like a parent.
|
|
26655
|
+
while (offset > -1 && offset < node.children.length) {
|
|
26656
|
+
// @ts-expect-error looks like a parent.
|
|
26657
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
26658
|
+
|
|
26659
|
+
if (subresult[0] === EXIT) {
|
|
26660
|
+
return subresult
|
|
26661
|
+
}
|
|
26662
|
+
|
|
26663
|
+
offset =
|
|
26664
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
26665
|
+
}
|
|
26666
|
+
}
|
|
26667
|
+
|
|
26668
|
+
return result
|
|
26669
|
+
}
|
|
26670
|
+
}
|
|
26671
|
+
}
|
|
26672
|
+
)
|
|
26673
|
+
|
|
26674
|
+
/**
|
|
26675
|
+
* @param {VisitorResult} value
|
|
26676
|
+
* @returns {ActionTuple}
|
|
26677
|
+
*/
|
|
26678
|
+
function toResult(value) {
|
|
26679
|
+
if (Array.isArray(value)) {
|
|
26680
|
+
return value
|
|
26681
|
+
}
|
|
26682
|
+
|
|
26683
|
+
if (typeof value === 'number') {
|
|
26684
|
+
return [CONTINUE, value]
|
|
26685
|
+
}
|
|
26686
|
+
|
|
26687
|
+
return [value]
|
|
26688
|
+
}
|
|
26689
|
+
|
|
26690
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/index.js
|
|
26691
|
+
/**
|
|
26692
|
+
* @typedef {import('unist').Node} Node
|
|
26693
|
+
* @typedef {import('unist').Parent} Parent
|
|
26694
|
+
* @typedef {import('unist-util-is').Test} Test
|
|
26695
|
+
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
|
|
26696
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
26697
|
+
*/
|
|
26698
|
+
|
|
26699
|
+
|
|
26700
|
+
|
|
26701
|
+
/**
|
|
26702
|
+
* Visit children of tree which pass test.
|
|
26703
|
+
*
|
|
26704
|
+
* @param tree
|
|
26705
|
+
* Tree to walk
|
|
26706
|
+
* @param [test]
|
|
26707
|
+
* `unist-util-is`-compatible test
|
|
26708
|
+
* @param visitor
|
|
26709
|
+
* Function called for nodes that pass `test`.
|
|
26710
|
+
* @param reverse
|
|
26711
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
26712
|
+
*/
|
|
26713
|
+
const visit =
|
|
26714
|
+
/**
|
|
26715
|
+
* @type {(
|
|
26716
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
26717
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
26718
|
+
* )}
|
|
26719
|
+
*/
|
|
26720
|
+
(
|
|
26721
|
+
/**
|
|
26722
|
+
* @param {Node} tree
|
|
26723
|
+
* @param {Test} test
|
|
26724
|
+
* @param {import('./complex-types.js').Visitor} visitor
|
|
26725
|
+
* @param {boolean} [reverse]
|
|
26726
|
+
*/
|
|
26727
|
+
function (tree, test, visitor, reverse) {
|
|
26728
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
26729
|
+
reverse = visitor
|
|
26730
|
+
visitor = test
|
|
26731
|
+
test = null
|
|
26732
|
+
}
|
|
26733
|
+
|
|
26734
|
+
visitParents(tree, test, overload, reverse)
|
|
26735
|
+
|
|
26736
|
+
/**
|
|
26737
|
+
* @param {Node} node
|
|
26738
|
+
* @param {Array<Parent>} parents
|
|
26739
|
+
*/
|
|
26740
|
+
function overload(node, parents) {
|
|
26741
|
+
const parent = parents[parents.length - 1]
|
|
26742
|
+
return visitor(
|
|
26743
|
+
node,
|
|
26744
|
+
parent ? parent.children.indexOf(node) : null,
|
|
26745
|
+
parent
|
|
26746
|
+
)
|
|
26747
|
+
}
|
|
26748
|
+
}
|
|
26749
|
+
)
|
|
26750
|
+
|
|
26751
|
+
|
|
26752
|
+
|
|
26753
|
+
;// CONCATENATED MODULE: ./processor/transform/single-code-tabs.js
|
|
26754
|
+
|
|
26755
|
+
var singleCodeTabs = function singleCodeTabs() {
|
|
26756
|
+
return function (tree) {
|
|
26757
|
+
return visit(tree, function (node, index, parent) {
|
|
26758
|
+
if (node.type === 'code' && (node.lang || node.meta) && parent.type !== 'code-tabs') {
|
|
26759
|
+
node.data = {
|
|
26760
|
+
hName: 'code',
|
|
26761
|
+
hProperties: {
|
|
26762
|
+
meta: node.meta,
|
|
26763
|
+
lang: node.lang
|
|
26764
|
+
}
|
|
26765
|
+
};
|
|
26766
|
+
parent.children[index] = {
|
|
26767
|
+
type: 'code-tabs',
|
|
26768
|
+
className: 'tabs',
|
|
26769
|
+
data: {
|
|
26770
|
+
hName: 'code-tabs'
|
|
26771
|
+
},
|
|
26772
|
+
children: [node]
|
|
26773
|
+
};
|
|
26774
|
+
}
|
|
26775
|
+
});
|
|
26776
|
+
};
|
|
26777
|
+
};
|
|
26778
|
+
/* harmony default export */ const single_code_tabs = (singleCodeTabs);
|
|
26779
|
+
;// CONCATENATED MODULE: ./processor/transform/index.js
|
|
26780
|
+
|
|
26781
|
+
|
|
26260
26782
|
/***/ }),
|
|
26261
26783
|
|
|
26262
26784
|
/***/ 8229:
|
|
@@ -28343,7 +28865,7 @@ function parse(selector, defaultTagName) {
|
|
|
28343
28865
|
|
|
28344
28866
|
var Parser = __webpack_require__(6425)
|
|
28345
28867
|
var pos = __webpack_require__(7361)
|
|
28346
|
-
var visit = __webpack_require__(
|
|
28868
|
+
var visit = __webpack_require__(2409)
|
|
28347
28869
|
var fromParse5 = __webpack_require__(7721)
|
|
28348
28870
|
var toParse5 = __webpack_require__(8335)
|
|
28349
28871
|
var voids = __webpack_require__(9878)
|
|
@@ -28678,6 +29200,240 @@ function createParse5Location(node) {
|
|
|
28678
29200
|
}
|
|
28679
29201
|
|
|
28680
29202
|
|
|
29203
|
+
/***/ }),
|
|
29204
|
+
|
|
29205
|
+
/***/ 8442:
|
|
29206
|
+
/***/ ((module) => {
|
|
29207
|
+
|
|
29208
|
+
"use strict";
|
|
29209
|
+
|
|
29210
|
+
|
|
29211
|
+
module.exports = convert
|
|
29212
|
+
|
|
29213
|
+
function convert(test) {
|
|
29214
|
+
if (test == null) {
|
|
29215
|
+
return ok
|
|
29216
|
+
}
|
|
29217
|
+
|
|
29218
|
+
if (typeof test === 'string') {
|
|
29219
|
+
return typeFactory(test)
|
|
29220
|
+
}
|
|
29221
|
+
|
|
29222
|
+
if (typeof test === 'object') {
|
|
29223
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
29224
|
+
}
|
|
29225
|
+
|
|
29226
|
+
if (typeof test === 'function') {
|
|
29227
|
+
return test
|
|
29228
|
+
}
|
|
29229
|
+
|
|
29230
|
+
throw new Error('Expected function, string, or object as test')
|
|
29231
|
+
}
|
|
29232
|
+
|
|
29233
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
29234
|
+
// values are strictly equal.
|
|
29235
|
+
function allFactory(test) {
|
|
29236
|
+
return all
|
|
29237
|
+
|
|
29238
|
+
function all(node) {
|
|
29239
|
+
var key
|
|
29240
|
+
|
|
29241
|
+
for (key in test) {
|
|
29242
|
+
if (node[key] !== test[key]) return false
|
|
29243
|
+
}
|
|
29244
|
+
|
|
29245
|
+
return true
|
|
29246
|
+
}
|
|
29247
|
+
}
|
|
29248
|
+
|
|
29249
|
+
function anyFactory(tests) {
|
|
29250
|
+
var checks = []
|
|
29251
|
+
var index = -1
|
|
29252
|
+
|
|
29253
|
+
while (++index < tests.length) {
|
|
29254
|
+
checks[index] = convert(tests[index])
|
|
29255
|
+
}
|
|
29256
|
+
|
|
29257
|
+
return any
|
|
29258
|
+
|
|
29259
|
+
function any() {
|
|
29260
|
+
var index = -1
|
|
29261
|
+
|
|
29262
|
+
while (++index < checks.length) {
|
|
29263
|
+
if (checks[index].apply(this, arguments)) {
|
|
29264
|
+
return true
|
|
29265
|
+
}
|
|
29266
|
+
}
|
|
29267
|
+
|
|
29268
|
+
return false
|
|
29269
|
+
}
|
|
29270
|
+
}
|
|
29271
|
+
|
|
29272
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
29273
|
+
// for said string.
|
|
29274
|
+
function typeFactory(test) {
|
|
29275
|
+
return type
|
|
29276
|
+
|
|
29277
|
+
function type(node) {
|
|
29278
|
+
return Boolean(node && node.type === test)
|
|
29279
|
+
}
|
|
29280
|
+
}
|
|
29281
|
+
|
|
29282
|
+
// Utility to return true.
|
|
29283
|
+
function ok() {
|
|
29284
|
+
return true
|
|
29285
|
+
}
|
|
29286
|
+
|
|
29287
|
+
|
|
29288
|
+
/***/ }),
|
|
29289
|
+
|
|
29290
|
+
/***/ 5962:
|
|
29291
|
+
/***/ ((module) => {
|
|
29292
|
+
|
|
29293
|
+
module.exports = identity
|
|
29294
|
+
function identity(d) {
|
|
29295
|
+
return d
|
|
29296
|
+
}
|
|
29297
|
+
|
|
29298
|
+
|
|
29299
|
+
/***/ }),
|
|
29300
|
+
|
|
29301
|
+
/***/ 1106:
|
|
29302
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
29303
|
+
|
|
29304
|
+
"use strict";
|
|
29305
|
+
|
|
29306
|
+
|
|
29307
|
+
module.exports = visitParents
|
|
29308
|
+
|
|
29309
|
+
var convert = __webpack_require__(8442)
|
|
29310
|
+
var color = __webpack_require__(5962)
|
|
29311
|
+
|
|
29312
|
+
var CONTINUE = true
|
|
29313
|
+
var SKIP = 'skip'
|
|
29314
|
+
var EXIT = false
|
|
29315
|
+
|
|
29316
|
+
visitParents.CONTINUE = CONTINUE
|
|
29317
|
+
visitParents.SKIP = SKIP
|
|
29318
|
+
visitParents.EXIT = EXIT
|
|
29319
|
+
|
|
29320
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
29321
|
+
var step
|
|
29322
|
+
var is
|
|
29323
|
+
|
|
29324
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
29325
|
+
reverse = visitor
|
|
29326
|
+
visitor = test
|
|
29327
|
+
test = null
|
|
29328
|
+
}
|
|
29329
|
+
|
|
29330
|
+
is = convert(test)
|
|
29331
|
+
step = reverse ? -1 : 1
|
|
29332
|
+
|
|
29333
|
+
factory(tree, null, [])()
|
|
29334
|
+
|
|
29335
|
+
function factory(node, index, parents) {
|
|
29336
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
29337
|
+
var name
|
|
29338
|
+
|
|
29339
|
+
if (typeof value.type === 'string') {
|
|
29340
|
+
name =
|
|
29341
|
+
typeof value.tagName === 'string'
|
|
29342
|
+
? value.tagName
|
|
29343
|
+
: typeof value.name === 'string'
|
|
29344
|
+
? value.name
|
|
29345
|
+
: undefined
|
|
29346
|
+
|
|
29347
|
+
visit.displayName =
|
|
29348
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
29349
|
+
}
|
|
29350
|
+
|
|
29351
|
+
return visit
|
|
29352
|
+
|
|
29353
|
+
function visit() {
|
|
29354
|
+
var grandparents = parents.concat(node)
|
|
29355
|
+
var result = []
|
|
29356
|
+
var subresult
|
|
29357
|
+
var offset
|
|
29358
|
+
|
|
29359
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
29360
|
+
result = toResult(visitor(node, parents))
|
|
29361
|
+
|
|
29362
|
+
if (result[0] === EXIT) {
|
|
29363
|
+
return result
|
|
29364
|
+
}
|
|
29365
|
+
}
|
|
29366
|
+
|
|
29367
|
+
if (node.children && result[0] !== SKIP) {
|
|
29368
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
29369
|
+
|
|
29370
|
+
while (offset > -1 && offset < node.children.length) {
|
|
29371
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
29372
|
+
|
|
29373
|
+
if (subresult[0] === EXIT) {
|
|
29374
|
+
return subresult
|
|
29375
|
+
}
|
|
29376
|
+
|
|
29377
|
+
offset =
|
|
29378
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
29379
|
+
}
|
|
29380
|
+
}
|
|
29381
|
+
|
|
29382
|
+
return result
|
|
29383
|
+
}
|
|
29384
|
+
}
|
|
29385
|
+
}
|
|
29386
|
+
|
|
29387
|
+
function toResult(value) {
|
|
29388
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
29389
|
+
return value
|
|
29390
|
+
}
|
|
29391
|
+
|
|
29392
|
+
if (typeof value === 'number') {
|
|
29393
|
+
return [CONTINUE, value]
|
|
29394
|
+
}
|
|
29395
|
+
|
|
29396
|
+
return [value]
|
|
29397
|
+
}
|
|
29398
|
+
|
|
29399
|
+
|
|
29400
|
+
/***/ }),
|
|
29401
|
+
|
|
29402
|
+
/***/ 2409:
|
|
29403
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
29404
|
+
|
|
29405
|
+
"use strict";
|
|
29406
|
+
|
|
29407
|
+
|
|
29408
|
+
module.exports = visit
|
|
29409
|
+
|
|
29410
|
+
var visitParents = __webpack_require__(1106)
|
|
29411
|
+
|
|
29412
|
+
var CONTINUE = visitParents.CONTINUE
|
|
29413
|
+
var SKIP = visitParents.SKIP
|
|
29414
|
+
var EXIT = visitParents.EXIT
|
|
29415
|
+
|
|
29416
|
+
visit.CONTINUE = CONTINUE
|
|
29417
|
+
visit.SKIP = SKIP
|
|
29418
|
+
visit.EXIT = EXIT
|
|
29419
|
+
|
|
29420
|
+
function visit(tree, test, visitor, reverse) {
|
|
29421
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
29422
|
+
reverse = visitor
|
|
29423
|
+
visitor = test
|
|
29424
|
+
test = null
|
|
29425
|
+
}
|
|
29426
|
+
|
|
29427
|
+
visitParents(tree, test, overload, reverse)
|
|
29428
|
+
|
|
29429
|
+
function overload(node, parents) {
|
|
29430
|
+
var parent = parents[parents.length - 1]
|
|
29431
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
29432
|
+
return visitor(node, index, parent)
|
|
29433
|
+
}
|
|
29434
|
+
}
|
|
29435
|
+
|
|
29436
|
+
|
|
28681
29437
|
/***/ }),
|
|
28682
29438
|
|
|
28683
29439
|
/***/ 773:
|
|
@@ -31482,7 +32238,7 @@ function toAlignment(value) {
|
|
|
31482
32238
|
"use strict";
|
|
31483
32239
|
|
|
31484
32240
|
|
|
31485
|
-
var visit = __webpack_require__(
|
|
32241
|
+
var visit = __webpack_require__(8212)
|
|
31486
32242
|
|
|
31487
32243
|
module.exports = compact
|
|
31488
32244
|
|
|
@@ -31543,6 +32299,240 @@ function mergeable(node, commonmark) {
|
|
|
31543
32299
|
}
|
|
31544
32300
|
|
|
31545
32301
|
|
|
32302
|
+
/***/ }),
|
|
32303
|
+
|
|
32304
|
+
/***/ 8081:
|
|
32305
|
+
/***/ ((module) => {
|
|
32306
|
+
|
|
32307
|
+
"use strict";
|
|
32308
|
+
|
|
32309
|
+
|
|
32310
|
+
module.exports = convert
|
|
32311
|
+
|
|
32312
|
+
function convert(test) {
|
|
32313
|
+
if (test == null) {
|
|
32314
|
+
return ok
|
|
32315
|
+
}
|
|
32316
|
+
|
|
32317
|
+
if (typeof test === 'string') {
|
|
32318
|
+
return typeFactory(test)
|
|
32319
|
+
}
|
|
32320
|
+
|
|
32321
|
+
if (typeof test === 'object') {
|
|
32322
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
32323
|
+
}
|
|
32324
|
+
|
|
32325
|
+
if (typeof test === 'function') {
|
|
32326
|
+
return test
|
|
32327
|
+
}
|
|
32328
|
+
|
|
32329
|
+
throw new Error('Expected function, string, or object as test')
|
|
32330
|
+
}
|
|
32331
|
+
|
|
32332
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
32333
|
+
// values are strictly equal.
|
|
32334
|
+
function allFactory(test) {
|
|
32335
|
+
return all
|
|
32336
|
+
|
|
32337
|
+
function all(node) {
|
|
32338
|
+
var key
|
|
32339
|
+
|
|
32340
|
+
for (key in test) {
|
|
32341
|
+
if (node[key] !== test[key]) return false
|
|
32342
|
+
}
|
|
32343
|
+
|
|
32344
|
+
return true
|
|
32345
|
+
}
|
|
32346
|
+
}
|
|
32347
|
+
|
|
32348
|
+
function anyFactory(tests) {
|
|
32349
|
+
var checks = []
|
|
32350
|
+
var index = -1
|
|
32351
|
+
|
|
32352
|
+
while (++index < tests.length) {
|
|
32353
|
+
checks[index] = convert(tests[index])
|
|
32354
|
+
}
|
|
32355
|
+
|
|
32356
|
+
return any
|
|
32357
|
+
|
|
32358
|
+
function any() {
|
|
32359
|
+
var index = -1
|
|
32360
|
+
|
|
32361
|
+
while (++index < checks.length) {
|
|
32362
|
+
if (checks[index].apply(this, arguments)) {
|
|
32363
|
+
return true
|
|
32364
|
+
}
|
|
32365
|
+
}
|
|
32366
|
+
|
|
32367
|
+
return false
|
|
32368
|
+
}
|
|
32369
|
+
}
|
|
32370
|
+
|
|
32371
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
32372
|
+
// for said string.
|
|
32373
|
+
function typeFactory(test) {
|
|
32374
|
+
return type
|
|
32375
|
+
|
|
32376
|
+
function type(node) {
|
|
32377
|
+
return Boolean(node && node.type === test)
|
|
32378
|
+
}
|
|
32379
|
+
}
|
|
32380
|
+
|
|
32381
|
+
// Utility to return true.
|
|
32382
|
+
function ok() {
|
|
32383
|
+
return true
|
|
32384
|
+
}
|
|
32385
|
+
|
|
32386
|
+
|
|
32387
|
+
/***/ }),
|
|
32388
|
+
|
|
32389
|
+
/***/ 7260:
|
|
32390
|
+
/***/ ((module) => {
|
|
32391
|
+
|
|
32392
|
+
module.exports = identity
|
|
32393
|
+
function identity(d) {
|
|
32394
|
+
return d
|
|
32395
|
+
}
|
|
32396
|
+
|
|
32397
|
+
|
|
32398
|
+
/***/ }),
|
|
32399
|
+
|
|
32400
|
+
/***/ 8261:
|
|
32401
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
32402
|
+
|
|
32403
|
+
"use strict";
|
|
32404
|
+
|
|
32405
|
+
|
|
32406
|
+
module.exports = visitParents
|
|
32407
|
+
|
|
32408
|
+
var convert = __webpack_require__(8081)
|
|
32409
|
+
var color = __webpack_require__(7260)
|
|
32410
|
+
|
|
32411
|
+
var CONTINUE = true
|
|
32412
|
+
var SKIP = 'skip'
|
|
32413
|
+
var EXIT = false
|
|
32414
|
+
|
|
32415
|
+
visitParents.CONTINUE = CONTINUE
|
|
32416
|
+
visitParents.SKIP = SKIP
|
|
32417
|
+
visitParents.EXIT = EXIT
|
|
32418
|
+
|
|
32419
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
32420
|
+
var step
|
|
32421
|
+
var is
|
|
32422
|
+
|
|
32423
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
32424
|
+
reverse = visitor
|
|
32425
|
+
visitor = test
|
|
32426
|
+
test = null
|
|
32427
|
+
}
|
|
32428
|
+
|
|
32429
|
+
is = convert(test)
|
|
32430
|
+
step = reverse ? -1 : 1
|
|
32431
|
+
|
|
32432
|
+
factory(tree, null, [])()
|
|
32433
|
+
|
|
32434
|
+
function factory(node, index, parents) {
|
|
32435
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
32436
|
+
var name
|
|
32437
|
+
|
|
32438
|
+
if (typeof value.type === 'string') {
|
|
32439
|
+
name =
|
|
32440
|
+
typeof value.tagName === 'string'
|
|
32441
|
+
? value.tagName
|
|
32442
|
+
: typeof value.name === 'string'
|
|
32443
|
+
? value.name
|
|
32444
|
+
: undefined
|
|
32445
|
+
|
|
32446
|
+
visit.displayName =
|
|
32447
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
32448
|
+
}
|
|
32449
|
+
|
|
32450
|
+
return visit
|
|
32451
|
+
|
|
32452
|
+
function visit() {
|
|
32453
|
+
var grandparents = parents.concat(node)
|
|
32454
|
+
var result = []
|
|
32455
|
+
var subresult
|
|
32456
|
+
var offset
|
|
32457
|
+
|
|
32458
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
32459
|
+
result = toResult(visitor(node, parents))
|
|
32460
|
+
|
|
32461
|
+
if (result[0] === EXIT) {
|
|
32462
|
+
return result
|
|
32463
|
+
}
|
|
32464
|
+
}
|
|
32465
|
+
|
|
32466
|
+
if (node.children && result[0] !== SKIP) {
|
|
32467
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
32468
|
+
|
|
32469
|
+
while (offset > -1 && offset < node.children.length) {
|
|
32470
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
32471
|
+
|
|
32472
|
+
if (subresult[0] === EXIT) {
|
|
32473
|
+
return subresult
|
|
32474
|
+
}
|
|
32475
|
+
|
|
32476
|
+
offset =
|
|
32477
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
32478
|
+
}
|
|
32479
|
+
}
|
|
32480
|
+
|
|
32481
|
+
return result
|
|
32482
|
+
}
|
|
32483
|
+
}
|
|
32484
|
+
}
|
|
32485
|
+
|
|
32486
|
+
function toResult(value) {
|
|
32487
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
32488
|
+
return value
|
|
32489
|
+
}
|
|
32490
|
+
|
|
32491
|
+
if (typeof value === 'number') {
|
|
32492
|
+
return [CONTINUE, value]
|
|
32493
|
+
}
|
|
32494
|
+
|
|
32495
|
+
return [value]
|
|
32496
|
+
}
|
|
32497
|
+
|
|
32498
|
+
|
|
32499
|
+
/***/ }),
|
|
32500
|
+
|
|
32501
|
+
/***/ 8212:
|
|
32502
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
32503
|
+
|
|
32504
|
+
"use strict";
|
|
32505
|
+
|
|
32506
|
+
|
|
32507
|
+
module.exports = visit
|
|
32508
|
+
|
|
32509
|
+
var visitParents = __webpack_require__(8261)
|
|
32510
|
+
|
|
32511
|
+
var CONTINUE = visitParents.CONTINUE
|
|
32512
|
+
var SKIP = visitParents.SKIP
|
|
32513
|
+
var EXIT = visitParents.EXIT
|
|
32514
|
+
|
|
32515
|
+
visit.CONTINUE = CONTINUE
|
|
32516
|
+
visit.SKIP = SKIP
|
|
32517
|
+
visit.EXIT = EXIT
|
|
32518
|
+
|
|
32519
|
+
function visit(tree, test, visitor, reverse) {
|
|
32520
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
32521
|
+
reverse = visitor
|
|
32522
|
+
visitor = test
|
|
32523
|
+
test = null
|
|
32524
|
+
}
|
|
32525
|
+
|
|
32526
|
+
visitParents(tree, test, overload, reverse)
|
|
32527
|
+
|
|
32528
|
+
function overload(node, parents) {
|
|
32529
|
+
var parent = parents[parents.length - 1]
|
|
32530
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
32531
|
+
return visitor(node, index, parent)
|
|
32532
|
+
}
|
|
32533
|
+
}
|
|
32534
|
+
|
|
32535
|
+
|
|
31546
32536
|
/***/ }),
|
|
31547
32537
|
|
|
31548
32538
|
/***/ 6630:
|
|
@@ -31551,7 +32541,7 @@ function mergeable(node, commonmark) {
|
|
|
31551
32541
|
"use strict";
|
|
31552
32542
|
|
|
31553
32543
|
|
|
31554
|
-
var visit = __webpack_require__(
|
|
32544
|
+
var visit = __webpack_require__(959)
|
|
31555
32545
|
|
|
31556
32546
|
module.exports = getDefinitionFactory
|
|
31557
32547
|
|
|
@@ -31602,6 +32592,240 @@ function normalise(identifier) {
|
|
|
31602
32592
|
}
|
|
31603
32593
|
|
|
31604
32594
|
|
|
32595
|
+
/***/ }),
|
|
32596
|
+
|
|
32597
|
+
/***/ 9626:
|
|
32598
|
+
/***/ ((module) => {
|
|
32599
|
+
|
|
32600
|
+
"use strict";
|
|
32601
|
+
|
|
32602
|
+
|
|
32603
|
+
module.exports = convert
|
|
32604
|
+
|
|
32605
|
+
function convert(test) {
|
|
32606
|
+
if (test == null) {
|
|
32607
|
+
return ok
|
|
32608
|
+
}
|
|
32609
|
+
|
|
32610
|
+
if (typeof test === 'string') {
|
|
32611
|
+
return typeFactory(test)
|
|
32612
|
+
}
|
|
32613
|
+
|
|
32614
|
+
if (typeof test === 'object') {
|
|
32615
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
32616
|
+
}
|
|
32617
|
+
|
|
32618
|
+
if (typeof test === 'function') {
|
|
32619
|
+
return test
|
|
32620
|
+
}
|
|
32621
|
+
|
|
32622
|
+
throw new Error('Expected function, string, or object as test')
|
|
32623
|
+
}
|
|
32624
|
+
|
|
32625
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
32626
|
+
// values are strictly equal.
|
|
32627
|
+
function allFactory(test) {
|
|
32628
|
+
return all
|
|
32629
|
+
|
|
32630
|
+
function all(node) {
|
|
32631
|
+
var key
|
|
32632
|
+
|
|
32633
|
+
for (key in test) {
|
|
32634
|
+
if (node[key] !== test[key]) return false
|
|
32635
|
+
}
|
|
32636
|
+
|
|
32637
|
+
return true
|
|
32638
|
+
}
|
|
32639
|
+
}
|
|
32640
|
+
|
|
32641
|
+
function anyFactory(tests) {
|
|
32642
|
+
var checks = []
|
|
32643
|
+
var index = -1
|
|
32644
|
+
|
|
32645
|
+
while (++index < tests.length) {
|
|
32646
|
+
checks[index] = convert(tests[index])
|
|
32647
|
+
}
|
|
32648
|
+
|
|
32649
|
+
return any
|
|
32650
|
+
|
|
32651
|
+
function any() {
|
|
32652
|
+
var index = -1
|
|
32653
|
+
|
|
32654
|
+
while (++index < checks.length) {
|
|
32655
|
+
if (checks[index].apply(this, arguments)) {
|
|
32656
|
+
return true
|
|
32657
|
+
}
|
|
32658
|
+
}
|
|
32659
|
+
|
|
32660
|
+
return false
|
|
32661
|
+
}
|
|
32662
|
+
}
|
|
32663
|
+
|
|
32664
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
32665
|
+
// for said string.
|
|
32666
|
+
function typeFactory(test) {
|
|
32667
|
+
return type
|
|
32668
|
+
|
|
32669
|
+
function type(node) {
|
|
32670
|
+
return Boolean(node && node.type === test)
|
|
32671
|
+
}
|
|
32672
|
+
}
|
|
32673
|
+
|
|
32674
|
+
// Utility to return true.
|
|
32675
|
+
function ok() {
|
|
32676
|
+
return true
|
|
32677
|
+
}
|
|
32678
|
+
|
|
32679
|
+
|
|
32680
|
+
/***/ }),
|
|
32681
|
+
|
|
32682
|
+
/***/ 6702:
|
|
32683
|
+
/***/ ((module) => {
|
|
32684
|
+
|
|
32685
|
+
module.exports = identity
|
|
32686
|
+
function identity(d) {
|
|
32687
|
+
return d
|
|
32688
|
+
}
|
|
32689
|
+
|
|
32690
|
+
|
|
32691
|
+
/***/ }),
|
|
32692
|
+
|
|
32693
|
+
/***/ 9692:
|
|
32694
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
32695
|
+
|
|
32696
|
+
"use strict";
|
|
32697
|
+
|
|
32698
|
+
|
|
32699
|
+
module.exports = visitParents
|
|
32700
|
+
|
|
32701
|
+
var convert = __webpack_require__(9626)
|
|
32702
|
+
var color = __webpack_require__(6702)
|
|
32703
|
+
|
|
32704
|
+
var CONTINUE = true
|
|
32705
|
+
var SKIP = 'skip'
|
|
32706
|
+
var EXIT = false
|
|
32707
|
+
|
|
32708
|
+
visitParents.CONTINUE = CONTINUE
|
|
32709
|
+
visitParents.SKIP = SKIP
|
|
32710
|
+
visitParents.EXIT = EXIT
|
|
32711
|
+
|
|
32712
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
32713
|
+
var step
|
|
32714
|
+
var is
|
|
32715
|
+
|
|
32716
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
32717
|
+
reverse = visitor
|
|
32718
|
+
visitor = test
|
|
32719
|
+
test = null
|
|
32720
|
+
}
|
|
32721
|
+
|
|
32722
|
+
is = convert(test)
|
|
32723
|
+
step = reverse ? -1 : 1
|
|
32724
|
+
|
|
32725
|
+
factory(tree, null, [])()
|
|
32726
|
+
|
|
32727
|
+
function factory(node, index, parents) {
|
|
32728
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
32729
|
+
var name
|
|
32730
|
+
|
|
32731
|
+
if (typeof value.type === 'string') {
|
|
32732
|
+
name =
|
|
32733
|
+
typeof value.tagName === 'string'
|
|
32734
|
+
? value.tagName
|
|
32735
|
+
: typeof value.name === 'string'
|
|
32736
|
+
? value.name
|
|
32737
|
+
: undefined
|
|
32738
|
+
|
|
32739
|
+
visit.displayName =
|
|
32740
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
32741
|
+
}
|
|
32742
|
+
|
|
32743
|
+
return visit
|
|
32744
|
+
|
|
32745
|
+
function visit() {
|
|
32746
|
+
var grandparents = parents.concat(node)
|
|
32747
|
+
var result = []
|
|
32748
|
+
var subresult
|
|
32749
|
+
var offset
|
|
32750
|
+
|
|
32751
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
32752
|
+
result = toResult(visitor(node, parents))
|
|
32753
|
+
|
|
32754
|
+
if (result[0] === EXIT) {
|
|
32755
|
+
return result
|
|
32756
|
+
}
|
|
32757
|
+
}
|
|
32758
|
+
|
|
32759
|
+
if (node.children && result[0] !== SKIP) {
|
|
32760
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
32761
|
+
|
|
32762
|
+
while (offset > -1 && offset < node.children.length) {
|
|
32763
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
32764
|
+
|
|
32765
|
+
if (subresult[0] === EXIT) {
|
|
32766
|
+
return subresult
|
|
32767
|
+
}
|
|
32768
|
+
|
|
32769
|
+
offset =
|
|
32770
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
32771
|
+
}
|
|
32772
|
+
}
|
|
32773
|
+
|
|
32774
|
+
return result
|
|
32775
|
+
}
|
|
32776
|
+
}
|
|
32777
|
+
}
|
|
32778
|
+
|
|
32779
|
+
function toResult(value) {
|
|
32780
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
32781
|
+
return value
|
|
32782
|
+
}
|
|
32783
|
+
|
|
32784
|
+
if (typeof value === 'number') {
|
|
32785
|
+
return [CONTINUE, value]
|
|
32786
|
+
}
|
|
32787
|
+
|
|
32788
|
+
return [value]
|
|
32789
|
+
}
|
|
32790
|
+
|
|
32791
|
+
|
|
32792
|
+
/***/ }),
|
|
32793
|
+
|
|
32794
|
+
/***/ 959:
|
|
32795
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
32796
|
+
|
|
32797
|
+
"use strict";
|
|
32798
|
+
|
|
32799
|
+
|
|
32800
|
+
module.exports = visit
|
|
32801
|
+
|
|
32802
|
+
var visitParents = __webpack_require__(9692)
|
|
32803
|
+
|
|
32804
|
+
var CONTINUE = visitParents.CONTINUE
|
|
32805
|
+
var SKIP = visitParents.SKIP
|
|
32806
|
+
var EXIT = visitParents.EXIT
|
|
32807
|
+
|
|
32808
|
+
visit.CONTINUE = CONTINUE
|
|
32809
|
+
visit.SKIP = SKIP
|
|
32810
|
+
visit.EXIT = EXIT
|
|
32811
|
+
|
|
32812
|
+
function visit(tree, test, visitor, reverse) {
|
|
32813
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
32814
|
+
reverse = visitor
|
|
32815
|
+
visitor = test
|
|
32816
|
+
test = null
|
|
32817
|
+
}
|
|
32818
|
+
|
|
32819
|
+
visitParents(tree, test, overload, reverse)
|
|
32820
|
+
|
|
32821
|
+
function overload(node, parents) {
|
|
32822
|
+
var parent = parents[parents.length - 1]
|
|
32823
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
32824
|
+
return visitor(node, index, parent)
|
|
32825
|
+
}
|
|
32826
|
+
}
|
|
32827
|
+
|
|
32828
|
+
|
|
31605
32829
|
/***/ }),
|
|
31606
32830
|
|
|
31607
32831
|
/***/ 5288:
|
|
@@ -32400,7 +33624,7 @@ function thematicBreak(h, node) {
|
|
|
32400
33624
|
module.exports = toHast
|
|
32401
33625
|
|
|
32402
33626
|
var u = __webpack_require__(914)
|
|
32403
|
-
var visit = __webpack_require__(
|
|
33627
|
+
var visit = __webpack_require__(8681)
|
|
32404
33628
|
var position = __webpack_require__(7361)
|
|
32405
33629
|
var generated = __webpack_require__(1744)
|
|
32406
33630
|
var definitions = __webpack_require__(6630)
|
|
@@ -32661,6 +33885,240 @@ function wrap(nodes, loose) {
|
|
|
32661
33885
|
}
|
|
32662
33886
|
|
|
32663
33887
|
|
|
33888
|
+
/***/ }),
|
|
33889
|
+
|
|
33890
|
+
/***/ 8189:
|
|
33891
|
+
/***/ ((module) => {
|
|
33892
|
+
|
|
33893
|
+
"use strict";
|
|
33894
|
+
|
|
33895
|
+
|
|
33896
|
+
module.exports = convert
|
|
33897
|
+
|
|
33898
|
+
function convert(test) {
|
|
33899
|
+
if (test == null) {
|
|
33900
|
+
return ok
|
|
33901
|
+
}
|
|
33902
|
+
|
|
33903
|
+
if (typeof test === 'string') {
|
|
33904
|
+
return typeFactory(test)
|
|
33905
|
+
}
|
|
33906
|
+
|
|
33907
|
+
if (typeof test === 'object') {
|
|
33908
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
33909
|
+
}
|
|
33910
|
+
|
|
33911
|
+
if (typeof test === 'function') {
|
|
33912
|
+
return test
|
|
33913
|
+
}
|
|
33914
|
+
|
|
33915
|
+
throw new Error('Expected function, string, or object as test')
|
|
33916
|
+
}
|
|
33917
|
+
|
|
33918
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
33919
|
+
// values are strictly equal.
|
|
33920
|
+
function allFactory(test) {
|
|
33921
|
+
return all
|
|
33922
|
+
|
|
33923
|
+
function all(node) {
|
|
33924
|
+
var key
|
|
33925
|
+
|
|
33926
|
+
for (key in test) {
|
|
33927
|
+
if (node[key] !== test[key]) return false
|
|
33928
|
+
}
|
|
33929
|
+
|
|
33930
|
+
return true
|
|
33931
|
+
}
|
|
33932
|
+
}
|
|
33933
|
+
|
|
33934
|
+
function anyFactory(tests) {
|
|
33935
|
+
var checks = []
|
|
33936
|
+
var index = -1
|
|
33937
|
+
|
|
33938
|
+
while (++index < tests.length) {
|
|
33939
|
+
checks[index] = convert(tests[index])
|
|
33940
|
+
}
|
|
33941
|
+
|
|
33942
|
+
return any
|
|
33943
|
+
|
|
33944
|
+
function any() {
|
|
33945
|
+
var index = -1
|
|
33946
|
+
|
|
33947
|
+
while (++index < checks.length) {
|
|
33948
|
+
if (checks[index].apply(this, arguments)) {
|
|
33949
|
+
return true
|
|
33950
|
+
}
|
|
33951
|
+
}
|
|
33952
|
+
|
|
33953
|
+
return false
|
|
33954
|
+
}
|
|
33955
|
+
}
|
|
33956
|
+
|
|
33957
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
33958
|
+
// for said string.
|
|
33959
|
+
function typeFactory(test) {
|
|
33960
|
+
return type
|
|
33961
|
+
|
|
33962
|
+
function type(node) {
|
|
33963
|
+
return Boolean(node && node.type === test)
|
|
33964
|
+
}
|
|
33965
|
+
}
|
|
33966
|
+
|
|
33967
|
+
// Utility to return true.
|
|
33968
|
+
function ok() {
|
|
33969
|
+
return true
|
|
33970
|
+
}
|
|
33971
|
+
|
|
33972
|
+
|
|
33973
|
+
/***/ }),
|
|
33974
|
+
|
|
33975
|
+
/***/ 9007:
|
|
33976
|
+
/***/ ((module) => {
|
|
33977
|
+
|
|
33978
|
+
module.exports = identity
|
|
33979
|
+
function identity(d) {
|
|
33980
|
+
return d
|
|
33981
|
+
}
|
|
33982
|
+
|
|
33983
|
+
|
|
33984
|
+
/***/ }),
|
|
33985
|
+
|
|
33986
|
+
/***/ 9255:
|
|
33987
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
33988
|
+
|
|
33989
|
+
"use strict";
|
|
33990
|
+
|
|
33991
|
+
|
|
33992
|
+
module.exports = visitParents
|
|
33993
|
+
|
|
33994
|
+
var convert = __webpack_require__(8189)
|
|
33995
|
+
var color = __webpack_require__(9007)
|
|
33996
|
+
|
|
33997
|
+
var CONTINUE = true
|
|
33998
|
+
var SKIP = 'skip'
|
|
33999
|
+
var EXIT = false
|
|
34000
|
+
|
|
34001
|
+
visitParents.CONTINUE = CONTINUE
|
|
34002
|
+
visitParents.SKIP = SKIP
|
|
34003
|
+
visitParents.EXIT = EXIT
|
|
34004
|
+
|
|
34005
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
34006
|
+
var step
|
|
34007
|
+
var is
|
|
34008
|
+
|
|
34009
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
34010
|
+
reverse = visitor
|
|
34011
|
+
visitor = test
|
|
34012
|
+
test = null
|
|
34013
|
+
}
|
|
34014
|
+
|
|
34015
|
+
is = convert(test)
|
|
34016
|
+
step = reverse ? -1 : 1
|
|
34017
|
+
|
|
34018
|
+
factory(tree, null, [])()
|
|
34019
|
+
|
|
34020
|
+
function factory(node, index, parents) {
|
|
34021
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
34022
|
+
var name
|
|
34023
|
+
|
|
34024
|
+
if (typeof value.type === 'string') {
|
|
34025
|
+
name =
|
|
34026
|
+
typeof value.tagName === 'string'
|
|
34027
|
+
? value.tagName
|
|
34028
|
+
: typeof value.name === 'string'
|
|
34029
|
+
? value.name
|
|
34030
|
+
: undefined
|
|
34031
|
+
|
|
34032
|
+
visit.displayName =
|
|
34033
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
34034
|
+
}
|
|
34035
|
+
|
|
34036
|
+
return visit
|
|
34037
|
+
|
|
34038
|
+
function visit() {
|
|
34039
|
+
var grandparents = parents.concat(node)
|
|
34040
|
+
var result = []
|
|
34041
|
+
var subresult
|
|
34042
|
+
var offset
|
|
34043
|
+
|
|
34044
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
34045
|
+
result = toResult(visitor(node, parents))
|
|
34046
|
+
|
|
34047
|
+
if (result[0] === EXIT) {
|
|
34048
|
+
return result
|
|
34049
|
+
}
|
|
34050
|
+
}
|
|
34051
|
+
|
|
34052
|
+
if (node.children && result[0] !== SKIP) {
|
|
34053
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
34054
|
+
|
|
34055
|
+
while (offset > -1 && offset < node.children.length) {
|
|
34056
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
34057
|
+
|
|
34058
|
+
if (subresult[0] === EXIT) {
|
|
34059
|
+
return subresult
|
|
34060
|
+
}
|
|
34061
|
+
|
|
34062
|
+
offset =
|
|
34063
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
34064
|
+
}
|
|
34065
|
+
}
|
|
34066
|
+
|
|
34067
|
+
return result
|
|
34068
|
+
}
|
|
34069
|
+
}
|
|
34070
|
+
}
|
|
34071
|
+
|
|
34072
|
+
function toResult(value) {
|
|
34073
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
34074
|
+
return value
|
|
34075
|
+
}
|
|
34076
|
+
|
|
34077
|
+
if (typeof value === 'number') {
|
|
34078
|
+
return [CONTINUE, value]
|
|
34079
|
+
}
|
|
34080
|
+
|
|
34081
|
+
return [value]
|
|
34082
|
+
}
|
|
34083
|
+
|
|
34084
|
+
|
|
34085
|
+
/***/ }),
|
|
34086
|
+
|
|
34087
|
+
/***/ 8681:
|
|
34088
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
34089
|
+
|
|
34090
|
+
"use strict";
|
|
34091
|
+
|
|
34092
|
+
|
|
34093
|
+
module.exports = visit
|
|
34094
|
+
|
|
34095
|
+
var visitParents = __webpack_require__(9255)
|
|
34096
|
+
|
|
34097
|
+
var CONTINUE = visitParents.CONTINUE
|
|
34098
|
+
var SKIP = visitParents.SKIP
|
|
34099
|
+
var EXIT = visitParents.EXIT
|
|
34100
|
+
|
|
34101
|
+
visit.CONTINUE = CONTINUE
|
|
34102
|
+
visit.SKIP = SKIP
|
|
34103
|
+
visit.EXIT = EXIT
|
|
34104
|
+
|
|
34105
|
+
function visit(tree, test, visitor, reverse) {
|
|
34106
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
34107
|
+
reverse = visitor
|
|
34108
|
+
visitor = test
|
|
34109
|
+
test = null
|
|
34110
|
+
}
|
|
34111
|
+
|
|
34112
|
+
visitParents(tree, test, overload, reverse)
|
|
34113
|
+
|
|
34114
|
+
function overload(node, parents) {
|
|
34115
|
+
var parent = parents[parents.length - 1]
|
|
34116
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
34117
|
+
return visitor(node, index, parent)
|
|
34118
|
+
}
|
|
34119
|
+
}
|
|
34120
|
+
|
|
34121
|
+
|
|
32664
34122
|
/***/ }),
|
|
32665
34123
|
|
|
32666
34124
|
/***/ 4999:
|
|
@@ -32901,7 +34359,7 @@ function toc(node, options) {
|
|
|
32901
34359
|
module.exports = search
|
|
32902
34360
|
|
|
32903
34361
|
var toString = __webpack_require__(8161)
|
|
32904
|
-
var visit = __webpack_require__(
|
|
34362
|
+
var visit = __webpack_require__(4290)
|
|
32905
34363
|
var convert = __webpack_require__(6351)
|
|
32906
34364
|
var slugs = __webpack_require__(9671)()
|
|
32907
34365
|
var toExpression = __webpack_require__(6039)
|
|
@@ -33101,6 +34559,155 @@ function ok() {
|
|
|
33101
34559
|
}
|
|
33102
34560
|
|
|
33103
34561
|
|
|
34562
|
+
/***/ }),
|
|
34563
|
+
|
|
34564
|
+
/***/ 1674:
|
|
34565
|
+
/***/ ((module) => {
|
|
34566
|
+
|
|
34567
|
+
module.exports = identity
|
|
34568
|
+
function identity(d) {
|
|
34569
|
+
return d
|
|
34570
|
+
}
|
|
34571
|
+
|
|
34572
|
+
|
|
34573
|
+
/***/ }),
|
|
34574
|
+
|
|
34575
|
+
/***/ 3623:
|
|
34576
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
34577
|
+
|
|
34578
|
+
"use strict";
|
|
34579
|
+
|
|
34580
|
+
|
|
34581
|
+
module.exports = visitParents
|
|
34582
|
+
|
|
34583
|
+
var convert = __webpack_require__(6351)
|
|
34584
|
+
var color = __webpack_require__(1674)
|
|
34585
|
+
|
|
34586
|
+
var CONTINUE = true
|
|
34587
|
+
var SKIP = 'skip'
|
|
34588
|
+
var EXIT = false
|
|
34589
|
+
|
|
34590
|
+
visitParents.CONTINUE = CONTINUE
|
|
34591
|
+
visitParents.SKIP = SKIP
|
|
34592
|
+
visitParents.EXIT = EXIT
|
|
34593
|
+
|
|
34594
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
34595
|
+
var step
|
|
34596
|
+
var is
|
|
34597
|
+
|
|
34598
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
34599
|
+
reverse = visitor
|
|
34600
|
+
visitor = test
|
|
34601
|
+
test = null
|
|
34602
|
+
}
|
|
34603
|
+
|
|
34604
|
+
is = convert(test)
|
|
34605
|
+
step = reverse ? -1 : 1
|
|
34606
|
+
|
|
34607
|
+
factory(tree, null, [])()
|
|
34608
|
+
|
|
34609
|
+
function factory(node, index, parents) {
|
|
34610
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
34611
|
+
var name
|
|
34612
|
+
|
|
34613
|
+
if (typeof value.type === 'string') {
|
|
34614
|
+
name =
|
|
34615
|
+
typeof value.tagName === 'string'
|
|
34616
|
+
? value.tagName
|
|
34617
|
+
: typeof value.name === 'string'
|
|
34618
|
+
? value.name
|
|
34619
|
+
: undefined
|
|
34620
|
+
|
|
34621
|
+
visit.displayName =
|
|
34622
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
34623
|
+
}
|
|
34624
|
+
|
|
34625
|
+
return visit
|
|
34626
|
+
|
|
34627
|
+
function visit() {
|
|
34628
|
+
var grandparents = parents.concat(node)
|
|
34629
|
+
var result = []
|
|
34630
|
+
var subresult
|
|
34631
|
+
var offset
|
|
34632
|
+
|
|
34633
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
34634
|
+
result = toResult(visitor(node, parents))
|
|
34635
|
+
|
|
34636
|
+
if (result[0] === EXIT) {
|
|
34637
|
+
return result
|
|
34638
|
+
}
|
|
34639
|
+
}
|
|
34640
|
+
|
|
34641
|
+
if (node.children && result[0] !== SKIP) {
|
|
34642
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
34643
|
+
|
|
34644
|
+
while (offset > -1 && offset < node.children.length) {
|
|
34645
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
34646
|
+
|
|
34647
|
+
if (subresult[0] === EXIT) {
|
|
34648
|
+
return subresult
|
|
34649
|
+
}
|
|
34650
|
+
|
|
34651
|
+
offset =
|
|
34652
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
34653
|
+
}
|
|
34654
|
+
}
|
|
34655
|
+
|
|
34656
|
+
return result
|
|
34657
|
+
}
|
|
34658
|
+
}
|
|
34659
|
+
}
|
|
34660
|
+
|
|
34661
|
+
function toResult(value) {
|
|
34662
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
34663
|
+
return value
|
|
34664
|
+
}
|
|
34665
|
+
|
|
34666
|
+
if (typeof value === 'number') {
|
|
34667
|
+
return [CONTINUE, value]
|
|
34668
|
+
}
|
|
34669
|
+
|
|
34670
|
+
return [value]
|
|
34671
|
+
}
|
|
34672
|
+
|
|
34673
|
+
|
|
34674
|
+
/***/ }),
|
|
34675
|
+
|
|
34676
|
+
/***/ 4290:
|
|
34677
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
34678
|
+
|
|
34679
|
+
"use strict";
|
|
34680
|
+
|
|
34681
|
+
|
|
34682
|
+
module.exports = visit
|
|
34683
|
+
|
|
34684
|
+
var visitParents = __webpack_require__(3623)
|
|
34685
|
+
|
|
34686
|
+
var CONTINUE = visitParents.CONTINUE
|
|
34687
|
+
var SKIP = visitParents.SKIP
|
|
34688
|
+
var EXIT = visitParents.EXIT
|
|
34689
|
+
|
|
34690
|
+
visit.CONTINUE = CONTINUE
|
|
34691
|
+
visit.SKIP = SKIP
|
|
34692
|
+
visit.EXIT = EXIT
|
|
34693
|
+
|
|
34694
|
+
function visit(tree, test, visitor, reverse) {
|
|
34695
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
34696
|
+
reverse = visitor
|
|
34697
|
+
visitor = test
|
|
34698
|
+
test = null
|
|
34699
|
+
}
|
|
34700
|
+
|
|
34701
|
+
visitParents(tree, test, overload, reverse)
|
|
34702
|
+
|
|
34703
|
+
function overload(node, parents) {
|
|
34704
|
+
var parent = parents[parents.length - 1]
|
|
34705
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
34706
|
+
return visitor(node, index, parent)
|
|
34707
|
+
}
|
|
34708
|
+
}
|
|
34709
|
+
|
|
34710
|
+
|
|
33104
34711
|
/***/ }),
|
|
33105
34712
|
|
|
33106
34713
|
/***/ 729:
|
|
@@ -41419,7 +43026,7 @@ function mutate(options) {
|
|
|
41419
43026
|
|
|
41420
43027
|
|
|
41421
43028
|
var toString = __webpack_require__(4999)
|
|
41422
|
-
var visit = __webpack_require__(
|
|
43029
|
+
var visit = __webpack_require__(4195)
|
|
41423
43030
|
var slugs = __webpack_require__(9671)()
|
|
41424
43031
|
|
|
41425
43032
|
module.exports = slug
|
|
@@ -41447,6 +43054,240 @@ function transformer(ast) {
|
|
|
41447
43054
|
}
|
|
41448
43055
|
|
|
41449
43056
|
|
|
43057
|
+
/***/ }),
|
|
43058
|
+
|
|
43059
|
+
/***/ 5721:
|
|
43060
|
+
/***/ ((module) => {
|
|
43061
|
+
|
|
43062
|
+
"use strict";
|
|
43063
|
+
|
|
43064
|
+
|
|
43065
|
+
module.exports = convert
|
|
43066
|
+
|
|
43067
|
+
function convert(test) {
|
|
43068
|
+
if (test == null) {
|
|
43069
|
+
return ok
|
|
43070
|
+
}
|
|
43071
|
+
|
|
43072
|
+
if (typeof test === 'string') {
|
|
43073
|
+
return typeFactory(test)
|
|
43074
|
+
}
|
|
43075
|
+
|
|
43076
|
+
if (typeof test === 'object') {
|
|
43077
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
43078
|
+
}
|
|
43079
|
+
|
|
43080
|
+
if (typeof test === 'function') {
|
|
43081
|
+
return test
|
|
43082
|
+
}
|
|
43083
|
+
|
|
43084
|
+
throw new Error('Expected function, string, or object as test')
|
|
43085
|
+
}
|
|
43086
|
+
|
|
43087
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
43088
|
+
// values are strictly equal.
|
|
43089
|
+
function allFactory(test) {
|
|
43090
|
+
return all
|
|
43091
|
+
|
|
43092
|
+
function all(node) {
|
|
43093
|
+
var key
|
|
43094
|
+
|
|
43095
|
+
for (key in test) {
|
|
43096
|
+
if (node[key] !== test[key]) return false
|
|
43097
|
+
}
|
|
43098
|
+
|
|
43099
|
+
return true
|
|
43100
|
+
}
|
|
43101
|
+
}
|
|
43102
|
+
|
|
43103
|
+
function anyFactory(tests) {
|
|
43104
|
+
var checks = []
|
|
43105
|
+
var index = -1
|
|
43106
|
+
|
|
43107
|
+
while (++index < tests.length) {
|
|
43108
|
+
checks[index] = convert(tests[index])
|
|
43109
|
+
}
|
|
43110
|
+
|
|
43111
|
+
return any
|
|
43112
|
+
|
|
43113
|
+
function any() {
|
|
43114
|
+
var index = -1
|
|
43115
|
+
|
|
43116
|
+
while (++index < checks.length) {
|
|
43117
|
+
if (checks[index].apply(this, arguments)) {
|
|
43118
|
+
return true
|
|
43119
|
+
}
|
|
43120
|
+
}
|
|
43121
|
+
|
|
43122
|
+
return false
|
|
43123
|
+
}
|
|
43124
|
+
}
|
|
43125
|
+
|
|
43126
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
43127
|
+
// for said string.
|
|
43128
|
+
function typeFactory(test) {
|
|
43129
|
+
return type
|
|
43130
|
+
|
|
43131
|
+
function type(node) {
|
|
43132
|
+
return Boolean(node && node.type === test)
|
|
43133
|
+
}
|
|
43134
|
+
}
|
|
43135
|
+
|
|
43136
|
+
// Utility to return true.
|
|
43137
|
+
function ok() {
|
|
43138
|
+
return true
|
|
43139
|
+
}
|
|
43140
|
+
|
|
43141
|
+
|
|
43142
|
+
/***/ }),
|
|
43143
|
+
|
|
43144
|
+
/***/ 2583:
|
|
43145
|
+
/***/ ((module) => {
|
|
43146
|
+
|
|
43147
|
+
module.exports = identity
|
|
43148
|
+
function identity(d) {
|
|
43149
|
+
return d
|
|
43150
|
+
}
|
|
43151
|
+
|
|
43152
|
+
|
|
43153
|
+
/***/ }),
|
|
43154
|
+
|
|
43155
|
+
/***/ 6751:
|
|
43156
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
43157
|
+
|
|
43158
|
+
"use strict";
|
|
43159
|
+
|
|
43160
|
+
|
|
43161
|
+
module.exports = visitParents
|
|
43162
|
+
|
|
43163
|
+
var convert = __webpack_require__(5721)
|
|
43164
|
+
var color = __webpack_require__(2583)
|
|
43165
|
+
|
|
43166
|
+
var CONTINUE = true
|
|
43167
|
+
var SKIP = 'skip'
|
|
43168
|
+
var EXIT = false
|
|
43169
|
+
|
|
43170
|
+
visitParents.CONTINUE = CONTINUE
|
|
43171
|
+
visitParents.SKIP = SKIP
|
|
43172
|
+
visitParents.EXIT = EXIT
|
|
43173
|
+
|
|
43174
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
43175
|
+
var step
|
|
43176
|
+
var is
|
|
43177
|
+
|
|
43178
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
43179
|
+
reverse = visitor
|
|
43180
|
+
visitor = test
|
|
43181
|
+
test = null
|
|
43182
|
+
}
|
|
43183
|
+
|
|
43184
|
+
is = convert(test)
|
|
43185
|
+
step = reverse ? -1 : 1
|
|
43186
|
+
|
|
43187
|
+
factory(tree, null, [])()
|
|
43188
|
+
|
|
43189
|
+
function factory(node, index, parents) {
|
|
43190
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
43191
|
+
var name
|
|
43192
|
+
|
|
43193
|
+
if (typeof value.type === 'string') {
|
|
43194
|
+
name =
|
|
43195
|
+
typeof value.tagName === 'string'
|
|
43196
|
+
? value.tagName
|
|
43197
|
+
: typeof value.name === 'string'
|
|
43198
|
+
? value.name
|
|
43199
|
+
: undefined
|
|
43200
|
+
|
|
43201
|
+
visit.displayName =
|
|
43202
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
43203
|
+
}
|
|
43204
|
+
|
|
43205
|
+
return visit
|
|
43206
|
+
|
|
43207
|
+
function visit() {
|
|
43208
|
+
var grandparents = parents.concat(node)
|
|
43209
|
+
var result = []
|
|
43210
|
+
var subresult
|
|
43211
|
+
var offset
|
|
43212
|
+
|
|
43213
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
43214
|
+
result = toResult(visitor(node, parents))
|
|
43215
|
+
|
|
43216
|
+
if (result[0] === EXIT) {
|
|
43217
|
+
return result
|
|
43218
|
+
}
|
|
43219
|
+
}
|
|
43220
|
+
|
|
43221
|
+
if (node.children && result[0] !== SKIP) {
|
|
43222
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
43223
|
+
|
|
43224
|
+
while (offset > -1 && offset < node.children.length) {
|
|
43225
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
43226
|
+
|
|
43227
|
+
if (subresult[0] === EXIT) {
|
|
43228
|
+
return subresult
|
|
43229
|
+
}
|
|
43230
|
+
|
|
43231
|
+
offset =
|
|
43232
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
43233
|
+
}
|
|
43234
|
+
}
|
|
43235
|
+
|
|
43236
|
+
return result
|
|
43237
|
+
}
|
|
43238
|
+
}
|
|
43239
|
+
}
|
|
43240
|
+
|
|
43241
|
+
function toResult(value) {
|
|
43242
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
43243
|
+
return value
|
|
43244
|
+
}
|
|
43245
|
+
|
|
43246
|
+
if (typeof value === 'number') {
|
|
43247
|
+
return [CONTINUE, value]
|
|
43248
|
+
}
|
|
43249
|
+
|
|
43250
|
+
return [value]
|
|
43251
|
+
}
|
|
43252
|
+
|
|
43253
|
+
|
|
43254
|
+
/***/ }),
|
|
43255
|
+
|
|
43256
|
+
/***/ 4195:
|
|
43257
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
43258
|
+
|
|
43259
|
+
"use strict";
|
|
43260
|
+
|
|
43261
|
+
|
|
43262
|
+
module.exports = visit
|
|
43263
|
+
|
|
43264
|
+
var visitParents = __webpack_require__(6751)
|
|
43265
|
+
|
|
43266
|
+
var CONTINUE = visitParents.CONTINUE
|
|
43267
|
+
var SKIP = visitParents.SKIP
|
|
43268
|
+
var EXIT = visitParents.EXIT
|
|
43269
|
+
|
|
43270
|
+
visit.CONTINUE = CONTINUE
|
|
43271
|
+
visit.SKIP = SKIP
|
|
43272
|
+
visit.EXIT = EXIT
|
|
43273
|
+
|
|
43274
|
+
function visit(tree, test, visitor, reverse) {
|
|
43275
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
43276
|
+
reverse = visitor
|
|
43277
|
+
visitor = test
|
|
43278
|
+
test = null
|
|
43279
|
+
}
|
|
43280
|
+
|
|
43281
|
+
visitParents(tree, test, overload, reverse)
|
|
43282
|
+
|
|
43283
|
+
function overload(node, parents) {
|
|
43284
|
+
var parent = parents[parents.length - 1]
|
|
43285
|
+
var index = parent ? parent.children.indexOf(node) : null
|
|
43286
|
+
return visitor(node, index, parent)
|
|
43287
|
+
}
|
|
43288
|
+
}
|
|
43289
|
+
|
|
43290
|
+
|
|
41450
43291
|
/***/ }),
|
|
41451
43292
|
|
|
41452
43293
|
/***/ 3734:
|
|
@@ -45703,267 +47544,6 @@ function toResult(value) {
|
|
|
45703
47544
|
}
|
|
45704
47545
|
|
|
45705
47546
|
|
|
45706
|
-
/***/ }),
|
|
45707
|
-
|
|
45708
|
-
/***/ 2854:
|
|
45709
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
45710
|
-
|
|
45711
|
-
"use strict";
|
|
45712
|
-
|
|
45713
|
-
|
|
45714
|
-
module.exports = visit
|
|
45715
|
-
|
|
45716
|
-
var visitParents = __webpack_require__(9858)
|
|
45717
|
-
|
|
45718
|
-
var CONTINUE = visitParents.CONTINUE
|
|
45719
|
-
var SKIP = visitParents.SKIP
|
|
45720
|
-
var EXIT = visitParents.EXIT
|
|
45721
|
-
|
|
45722
|
-
visit.CONTINUE = CONTINUE
|
|
45723
|
-
visit.SKIP = SKIP
|
|
45724
|
-
visit.EXIT = EXIT
|
|
45725
|
-
|
|
45726
|
-
function visit(tree, test, visitor, reverse) {
|
|
45727
|
-
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
45728
|
-
reverse = visitor
|
|
45729
|
-
visitor = test
|
|
45730
|
-
test = null
|
|
45731
|
-
}
|
|
45732
|
-
|
|
45733
|
-
visitParents(tree, test, overload, reverse)
|
|
45734
|
-
|
|
45735
|
-
function overload(node, parents) {
|
|
45736
|
-
var parent = parents[parents.length - 1]
|
|
45737
|
-
var index = parent ? parent.children.indexOf(node) : null
|
|
45738
|
-
return visitor(node, index, parent)
|
|
45739
|
-
}
|
|
45740
|
-
}
|
|
45741
|
-
|
|
45742
|
-
|
|
45743
|
-
/***/ }),
|
|
45744
|
-
|
|
45745
|
-
/***/ 350:
|
|
45746
|
-
/***/ ((module) => {
|
|
45747
|
-
|
|
45748
|
-
"use strict";
|
|
45749
|
-
|
|
45750
|
-
|
|
45751
|
-
module.exports = convert
|
|
45752
|
-
|
|
45753
|
-
function convert(test) {
|
|
45754
|
-
if (typeof test === 'string') {
|
|
45755
|
-
return typeFactory(test)
|
|
45756
|
-
}
|
|
45757
|
-
|
|
45758
|
-
if (test === null || test === undefined) {
|
|
45759
|
-
return ok
|
|
45760
|
-
}
|
|
45761
|
-
|
|
45762
|
-
if (typeof test === 'object') {
|
|
45763
|
-
return ('length' in test ? anyFactory : matchesFactory)(test)
|
|
45764
|
-
}
|
|
45765
|
-
|
|
45766
|
-
if (typeof test === 'function') {
|
|
45767
|
-
return test
|
|
45768
|
-
}
|
|
45769
|
-
|
|
45770
|
-
throw new Error('Expected function, string, or object as test')
|
|
45771
|
-
}
|
|
45772
|
-
|
|
45773
|
-
function convertAll(tests) {
|
|
45774
|
-
var results = []
|
|
45775
|
-
var length = tests.length
|
|
45776
|
-
var index = -1
|
|
45777
|
-
|
|
45778
|
-
while (++index < length) {
|
|
45779
|
-
results[index] = convert(tests[index])
|
|
45780
|
-
}
|
|
45781
|
-
|
|
45782
|
-
return results
|
|
45783
|
-
}
|
|
45784
|
-
|
|
45785
|
-
// Utility assert each property in `test` is represented in `node`, and each
|
|
45786
|
-
// values are strictly equal.
|
|
45787
|
-
function matchesFactory(test) {
|
|
45788
|
-
return matches
|
|
45789
|
-
|
|
45790
|
-
function matches(node) {
|
|
45791
|
-
var key
|
|
45792
|
-
|
|
45793
|
-
for (key in test) {
|
|
45794
|
-
if (node[key] !== test[key]) {
|
|
45795
|
-
return false
|
|
45796
|
-
}
|
|
45797
|
-
}
|
|
45798
|
-
|
|
45799
|
-
return true
|
|
45800
|
-
}
|
|
45801
|
-
}
|
|
45802
|
-
|
|
45803
|
-
function anyFactory(tests) {
|
|
45804
|
-
var checks = convertAll(tests)
|
|
45805
|
-
var length = checks.length
|
|
45806
|
-
|
|
45807
|
-
return matches
|
|
45808
|
-
|
|
45809
|
-
function matches() {
|
|
45810
|
-
var index = -1
|
|
45811
|
-
|
|
45812
|
-
while (++index < length) {
|
|
45813
|
-
if (checks[index].apply(this, arguments)) {
|
|
45814
|
-
return true
|
|
45815
|
-
}
|
|
45816
|
-
}
|
|
45817
|
-
|
|
45818
|
-
return false
|
|
45819
|
-
}
|
|
45820
|
-
}
|
|
45821
|
-
|
|
45822
|
-
// Utility to convert a string into a function which checks a given node’s type
|
|
45823
|
-
// for said string.
|
|
45824
|
-
function typeFactory(test) {
|
|
45825
|
-
return type
|
|
45826
|
-
|
|
45827
|
-
function type(node) {
|
|
45828
|
-
return Boolean(node && node.type === test)
|
|
45829
|
-
}
|
|
45830
|
-
}
|
|
45831
|
-
|
|
45832
|
-
// Utility to return true.
|
|
45833
|
-
function ok() {
|
|
45834
|
-
return true
|
|
45835
|
-
}
|
|
45836
|
-
|
|
45837
|
-
|
|
45838
|
-
/***/ }),
|
|
45839
|
-
|
|
45840
|
-
/***/ 9824:
|
|
45841
|
-
/***/ ((module) => {
|
|
45842
|
-
|
|
45843
|
-
module.exports = identity
|
|
45844
|
-
function identity(d) {
|
|
45845
|
-
return d
|
|
45846
|
-
}
|
|
45847
|
-
|
|
45848
|
-
|
|
45849
|
-
/***/ }),
|
|
45850
|
-
|
|
45851
|
-
/***/ 9858:
|
|
45852
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
45853
|
-
|
|
45854
|
-
"use strict";
|
|
45855
|
-
|
|
45856
|
-
|
|
45857
|
-
module.exports = visitParents
|
|
45858
|
-
|
|
45859
|
-
var convert = __webpack_require__(350)
|
|
45860
|
-
var color = __webpack_require__(9824)
|
|
45861
|
-
|
|
45862
|
-
var CONTINUE = true
|
|
45863
|
-
var SKIP = 'skip'
|
|
45864
|
-
var EXIT = false
|
|
45865
|
-
|
|
45866
|
-
visitParents.CONTINUE = CONTINUE
|
|
45867
|
-
visitParents.SKIP = SKIP
|
|
45868
|
-
visitParents.EXIT = EXIT
|
|
45869
|
-
|
|
45870
|
-
function visitParents(tree, test, visitor, reverse) {
|
|
45871
|
-
var is
|
|
45872
|
-
|
|
45873
|
-
if (func(test) && !func(visitor)) {
|
|
45874
|
-
reverse = visitor
|
|
45875
|
-
visitor = test
|
|
45876
|
-
test = null
|
|
45877
|
-
}
|
|
45878
|
-
|
|
45879
|
-
is = convert(test)
|
|
45880
|
-
|
|
45881
|
-
one(tree, null, [])()
|
|
45882
|
-
|
|
45883
|
-
function one(child, index, parents) {
|
|
45884
|
-
var value = object(child) ? child : {}
|
|
45885
|
-
var name
|
|
45886
|
-
|
|
45887
|
-
if (string(value.type)) {
|
|
45888
|
-
name = string(value.tagName)
|
|
45889
|
-
? value.tagName
|
|
45890
|
-
: string(value.name)
|
|
45891
|
-
? value.name
|
|
45892
|
-
: undefined
|
|
45893
|
-
|
|
45894
|
-
node.displayName =
|
|
45895
|
-
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
45896
|
-
}
|
|
45897
|
-
|
|
45898
|
-
return node
|
|
45899
|
-
|
|
45900
|
-
function node() {
|
|
45901
|
-
var result = []
|
|
45902
|
-
var subresult
|
|
45903
|
-
|
|
45904
|
-
if (!test || is(child, index, parents[parents.length - 1] || null)) {
|
|
45905
|
-
result = toResult(visitor(child, parents))
|
|
45906
|
-
|
|
45907
|
-
if (result[0] === EXIT) {
|
|
45908
|
-
return result
|
|
45909
|
-
}
|
|
45910
|
-
}
|
|
45911
|
-
|
|
45912
|
-
if (!child.children || result[0] === SKIP) {
|
|
45913
|
-
return result
|
|
45914
|
-
}
|
|
45915
|
-
|
|
45916
|
-
subresult = toResult(children(child.children, parents.concat(child)))
|
|
45917
|
-
return subresult[0] === EXIT ? subresult : result
|
|
45918
|
-
}
|
|
45919
|
-
}
|
|
45920
|
-
|
|
45921
|
-
// Visit children in `parent`.
|
|
45922
|
-
function children(children, parents) {
|
|
45923
|
-
var min = -1
|
|
45924
|
-
var step = reverse ? -1 : 1
|
|
45925
|
-
var index = (reverse ? children.length : min) + step
|
|
45926
|
-
var child
|
|
45927
|
-
var result
|
|
45928
|
-
|
|
45929
|
-
while (index > min && index < children.length) {
|
|
45930
|
-
child = children[index]
|
|
45931
|
-
result = one(child, index, parents)()
|
|
45932
|
-
|
|
45933
|
-
if (result[0] === EXIT) {
|
|
45934
|
-
return result
|
|
45935
|
-
}
|
|
45936
|
-
|
|
45937
|
-
index = typeof result[1] === 'number' ? result[1] : index + step
|
|
45938
|
-
}
|
|
45939
|
-
}
|
|
45940
|
-
}
|
|
45941
|
-
|
|
45942
|
-
function toResult(value) {
|
|
45943
|
-
if (object(value) && 'length' in value) {
|
|
45944
|
-
return value
|
|
45945
|
-
}
|
|
45946
|
-
|
|
45947
|
-
if (typeof value === 'number') {
|
|
45948
|
-
return [CONTINUE, value]
|
|
45949
|
-
}
|
|
45950
|
-
|
|
45951
|
-
return [value]
|
|
45952
|
-
}
|
|
45953
|
-
|
|
45954
|
-
function func(d) {
|
|
45955
|
-
return typeof d === 'function'
|
|
45956
|
-
}
|
|
45957
|
-
|
|
45958
|
-
function string(d) {
|
|
45959
|
-
return typeof d === 'string'
|
|
45960
|
-
}
|
|
45961
|
-
|
|
45962
|
-
function object(d) {
|
|
45963
|
-
return typeof d === 'object' && d !== null
|
|
45964
|
-
}
|
|
45965
|
-
|
|
45966
|
-
|
|
45967
47547
|
/***/ }),
|
|
45968
47548
|
|
|
45969
47549
|
/***/ 4787:
|
|
@@ -48892,6 +50472,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48892
50472
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
48893
50473
|
/* harmony export */ "hast": () => (/* binding */ hast),
|
|
48894
50474
|
/* harmony export */ "html": () => (/* binding */ html),
|
|
50475
|
+
/* harmony export */ "htmlProcessor": () => (/* binding */ htmlProcessor),
|
|
48895
50476
|
/* harmony export */ "md": () => (/* binding */ md),
|
|
48896
50477
|
/* harmony export */ "mdast": () => (/* binding */ mdast),
|
|
48897
50478
|
/* harmony export */ "plain": () => (/* binding */ plain),
|
|
@@ -48944,6 +50525,7 @@ var _require5 = __webpack_require__(6284),
|
|
|
48944
50525
|
var toPlainText = __webpack_require__(4792);
|
|
48945
50526
|
var sectionAnchorId = __webpack_require__(9620);
|
|
48946
50527
|
var tableFlattening = __webpack_require__(4625);
|
|
50528
|
+
var transformers = Object.values(__webpack_require__(8192));
|
|
48947
50529
|
var createSchema = __webpack_require__(8229);
|
|
48948
50530
|
var GlossaryItem = Components.GlossaryItem,
|
|
48949
50531
|
Code = Components.Code,
|
|
@@ -48992,7 +50574,7 @@ var utils = {
|
|
|
48992
50574
|
};
|
|
48993
50575
|
|
|
48994
50576
|
/**
|
|
48995
|
-
* Core markdown
|
|
50577
|
+
* Core markdown to mdast processor
|
|
48996
50578
|
*/
|
|
48997
50579
|
function processor() {
|
|
48998
50580
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -49004,7 +50586,39 @@ function processor() {
|
|
|
49004
50586
|
return unified().use(remarkParse, opts.markdownOptions).use(remarkFrontmatter, ['yaml', 'toml']).data('settings', opts.settings).data('compatibilityMode', opts.compatibilityMode).data('alwaysThrow', opts.alwaysThrow).use(!opts.correctnewlines ? remarkBreaks : function () {}).use(CustomParsers.map(function (parser) {
|
|
49005
50587
|
var _parser$sanitize;
|
|
49006
50588
|
return ((_parser$sanitize = parser.sanitize) === null || _parser$sanitize === void 0 ? void 0 : _parser$sanitize.call(parser, sanitize)) || parser;
|
|
49007
|
-
})).use(remarkSlug).use(remarkDisableTokenizers, opts.disableTokenizers)
|
|
50589
|
+
})).use(transformers).use(remarkSlug).use(remarkDisableTokenizers, opts.disableTokenizers);
|
|
50590
|
+
}
|
|
50591
|
+
|
|
50592
|
+
/**
|
|
50593
|
+
* Full markdown to html processor
|
|
50594
|
+
*/
|
|
50595
|
+
function htmlProcessor() {
|
|
50596
|
+
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50597
|
+
var _setup3 = setup('', opts);
|
|
50598
|
+
var _setup4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup3, 2);
|
|
50599
|
+
opts = _setup4[1];
|
|
50600
|
+
var _opts2 = opts,
|
|
50601
|
+
sanitize = _opts2.sanitize;
|
|
50602
|
+
|
|
50603
|
+
/*
|
|
50604
|
+
* This is kinda complicated: "markdown" within ReadMe is
|
|
50605
|
+
* often more than just markdown. It can also include HTML,
|
|
50606
|
+
* as well as custom syntax constructs such as <<variables>>,
|
|
50607
|
+
* and other special features.
|
|
50608
|
+
*
|
|
50609
|
+
* We use the Unified text processor to parse and transform
|
|
50610
|
+
* Markdown to various output formats, such as a React component
|
|
50611
|
+
* tree. (See https://github.com/unifiedjs/unified for more.)
|
|
50612
|
+
*
|
|
50613
|
+
* The order for processing ReadMe-flavored markdown is as follows:
|
|
50614
|
+
* - parse markdown
|
|
50615
|
+
* - parse custom syntaxes add-ons using custom compilers
|
|
50616
|
+
* - convert from a remark mdast (markdown ast) to a rehype hast (hypertext ast)
|
|
50617
|
+
* - extract any raw HTML elements
|
|
50618
|
+
* - sanitize and remove any disallowed attributes
|
|
50619
|
+
* - output the hast to a React vdom with our custom components
|
|
50620
|
+
*/
|
|
50621
|
+
return processor(opts).use(remarkRehype, {
|
|
49008
50622
|
allowDangerousHtml: true
|
|
49009
50623
|
}).use(rehypeRaw).use(rehypeSanitize, sanitize);
|
|
49010
50624
|
}
|
|
@@ -49012,11 +50626,11 @@ function plain(text) {
|
|
|
49012
50626
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49013
50627
|
var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49014
50628
|
if (!text) return null;
|
|
49015
|
-
var
|
|
49016
|
-
var
|
|
49017
|
-
text =
|
|
49018
|
-
opts =
|
|
49019
|
-
return
|
|
50629
|
+
var _setup5 = setup(text, opts);
|
|
50630
|
+
var _setup6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup5, 2);
|
|
50631
|
+
text = _setup6[0];
|
|
50632
|
+
opts = _setup6[1];
|
|
50633
|
+
return htmlProcessor(opts).use(rehypeReact, {
|
|
49020
50634
|
createElement: React.createElement,
|
|
49021
50635
|
Fragment: React.Fragment,
|
|
49022
50636
|
components: components
|
|
@@ -49033,16 +50647,16 @@ var PinWrap = function PinWrap(_ref) {
|
|
|
49033
50647
|
className: "pin"
|
|
49034
50648
|
}, children);
|
|
49035
50649
|
}; // @todo: move this to it's own component
|
|
49036
|
-
|
|
50650
|
+
|
|
49037
50651
|
function reactProcessor() {
|
|
49038
50652
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
49039
50653
|
var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49040
|
-
var
|
|
49041
|
-
var
|
|
49042
|
-
opts =
|
|
49043
|
-
var
|
|
49044
|
-
sanitize =
|
|
49045
|
-
return
|
|
50654
|
+
var _setup7 = setup('', opts);
|
|
50655
|
+
var _setup8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup7, 2);
|
|
50656
|
+
opts = _setup8[1];
|
|
50657
|
+
var _opts3 = opts,
|
|
50658
|
+
sanitize = _opts3.sanitize;
|
|
50659
|
+
return htmlProcessor(_objectSpread({
|
|
49046
50660
|
sanitize: sanitize
|
|
49047
50661
|
}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
49048
50662
|
createElement: React.createElement,
|
|
@@ -49057,12 +50671,12 @@ function reactProcessor() {
|
|
|
49057
50671
|
'rdme-pin': PinWrap,
|
|
49058
50672
|
table: Table,
|
|
49059
50673
|
a: Anchor,
|
|
49060
|
-
h1: Heading(1,
|
|
49061
|
-
h2: Heading(2,
|
|
49062
|
-
h3: Heading(3,
|
|
49063
|
-
h4: Heading(4,
|
|
49064
|
-
h5: Heading(5,
|
|
49065
|
-
h6: Heading(6,
|
|
50674
|
+
h1: Heading(1, opts),
|
|
50675
|
+
h2: Heading(2, opts),
|
|
50676
|
+
h3: Heading(3, opts),
|
|
50677
|
+
h4: Heading(4, opts),
|
|
50678
|
+
h5: Heading(5, opts),
|
|
50679
|
+
h6: Heading(6, opts),
|
|
49066
50680
|
code: Code(opts),
|
|
49067
50681
|
img: Image(opts),
|
|
49068
50682
|
style: Style(opts)
|
|
@@ -49073,14 +50687,14 @@ function react(content) {
|
|
|
49073
50687
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49074
50688
|
var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49075
50689
|
if (!content) return null;else if (typeof content === 'string') {
|
|
49076
|
-
var
|
|
49077
|
-
var _setup8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup7, 2);
|
|
49078
|
-
content = _setup8[0];
|
|
49079
|
-
opts = _setup8[1];
|
|
49080
|
-
} else {
|
|
49081
|
-
var _setup9 = setup('', opts);
|
|
50690
|
+
var _setup9 = setup(content, opts);
|
|
49082
50691
|
var _setup10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup9, 2);
|
|
50692
|
+
content = _setup10[0];
|
|
49083
50693
|
opts = _setup10[1];
|
|
50694
|
+
} else {
|
|
50695
|
+
var _setup11 = setup('', opts);
|
|
50696
|
+
var _setup12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup11, 2);
|
|
50697
|
+
opts = _setup12[1];
|
|
49084
50698
|
}
|
|
49085
50699
|
var proc = reactProcessor(opts, components);
|
|
49086
50700
|
if (typeof content === 'string') content = proc.parse(content);
|
|
@@ -49089,10 +50703,10 @@ function react(content) {
|
|
|
49089
50703
|
function reactTOC(tree) {
|
|
49090
50704
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49091
50705
|
if (!tree) return null;
|
|
49092
|
-
var
|
|
49093
|
-
var
|
|
49094
|
-
opts =
|
|
49095
|
-
var proc =
|
|
50706
|
+
var _setup13 = setup('', opts);
|
|
50707
|
+
var _setup14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup13, 2);
|
|
50708
|
+
opts = _setup14[1];
|
|
50709
|
+
var proc = htmlProcessor(opts).use(rehypeReact, {
|
|
49096
50710
|
createElement: React.createElement,
|
|
49097
50711
|
components: {
|
|
49098
50712
|
p: React.Fragment,
|
|
@@ -49123,11 +50737,11 @@ function reactTOC(tree) {
|
|
|
49123
50737
|
function html(text) {
|
|
49124
50738
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49125
50739
|
if (!text) return null;
|
|
49126
|
-
var
|
|
49127
|
-
var
|
|
49128
|
-
text =
|
|
49129
|
-
opts =
|
|
49130
|
-
return
|
|
50740
|
+
var _setup15 = setup(text, opts);
|
|
50741
|
+
var _setup16 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup15, 2);
|
|
50742
|
+
text = _setup16[0];
|
|
50743
|
+
opts = _setup16[1];
|
|
50744
|
+
return htmlProcessor(opts).use(rehypeStringify).processSync(text).contents;
|
|
49131
50745
|
}
|
|
49132
50746
|
|
|
49133
50747
|
/**
|
|
@@ -49136,11 +50750,11 @@ function html(text) {
|
|
|
49136
50750
|
function hast(text) {
|
|
49137
50751
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49138
50752
|
if (!text) return null;
|
|
49139
|
-
var
|
|
49140
|
-
var
|
|
49141
|
-
text =
|
|
49142
|
-
opts =
|
|
49143
|
-
var rdmd =
|
|
50753
|
+
var _setup17 = setup(text, opts);
|
|
50754
|
+
var _setup18 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup17, 2);
|
|
50755
|
+
text = _setup18[0];
|
|
50756
|
+
opts = _setup18[1];
|
|
50757
|
+
var rdmd = htmlProcessor(opts).use(tableFlattening);
|
|
49144
50758
|
var node = rdmd.parse(text);
|
|
49145
50759
|
return rdmd.runSync(node);
|
|
49146
50760
|
}
|
|
@@ -49151,11 +50765,12 @@ function hast(text) {
|
|
|
49151
50765
|
function mdast(text) {
|
|
49152
50766
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49153
50767
|
if (!text) return null;
|
|
49154
|
-
var
|
|
49155
|
-
var
|
|
49156
|
-
text =
|
|
49157
|
-
opts =
|
|
49158
|
-
|
|
50768
|
+
var _setup19 = setup(text, opts);
|
|
50769
|
+
var _setup20 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup19, 2);
|
|
50770
|
+
text = _setup20[0];
|
|
50771
|
+
opts = _setup20[1];
|
|
50772
|
+
var rdmd = processor(opts);
|
|
50773
|
+
return rdmd.runSync(rdmd.parse(text));
|
|
49159
50774
|
}
|
|
49160
50775
|
|
|
49161
50776
|
/**
|
|
@@ -49164,9 +50779,9 @@ function mdast(text) {
|
|
|
49164
50779
|
function astToPlainText(node) {
|
|
49165
50780
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49166
50781
|
if (!node) return '';
|
|
49167
|
-
var
|
|
49168
|
-
var
|
|
49169
|
-
opts =
|
|
50782
|
+
var _setup21 = setup('', opts);
|
|
50783
|
+
var _setup22 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup21, 2);
|
|
50784
|
+
opts = _setup22[1];
|
|
49170
50785
|
return processor(opts).use(toPlainText).stringify(node);
|
|
49171
50786
|
}
|
|
49172
50787
|
|
|
@@ -49176,9 +50791,9 @@ function astToPlainText(node) {
|
|
|
49176
50791
|
function md(tree) {
|
|
49177
50792
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49178
50793
|
if (!tree) return null;
|
|
49179
|
-
var
|
|
49180
|
-
var
|
|
49181
|
-
opts =
|
|
50794
|
+
var _setup23 = setup('', opts);
|
|
50795
|
+
var _setup24 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup23, 2);
|
|
50796
|
+
opts = _setup24[1];
|
|
49182
50797
|
return processor(opts).use(remarkStringify, opts.markdownOptions).use(customCompilers).stringify(tree);
|
|
49183
50798
|
}
|
|
49184
50799
|
var ReadMeMarkdown = function ReadMeMarkdown(text) {
|