@readme/markdown 6.58.1 → 6.59.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/dist/main.js CHANGED
@@ -8229,8 +8229,7 @@ var _require = __webpack_require__(3752),
8229
8229
  var PropTypes = __webpack_require__(5697);
8230
8230
  var React = __webpack_require__(4466);
8231
8231
  var CodeTabs = function CodeTabs(props) {
8232
- var attributes = props.attributes,
8233
- children = props.children,
8232
+ var children = props.children,
8234
8233
  theme = props.theme;
8235
8234
  function handleClick(_ref, index) {
8236
8235
  var target = _ref.target;
@@ -8244,39 +8243,31 @@ var CodeTabs = function CodeTabs(props) {
8244
8243
  codeblocks[index].classList.add('CodeTabs_active');
8245
8244
  target.classList.add('CodeTabs_active');
8246
8245
  }
8247
- return (
8248
- /*#__PURE__*/
8249
- // eslint-disable-next-line react/jsx-props-no-spreading
8250
- React.createElement("div", _extends({}, attributes, {
8251
- className: "CodeTabs CodeTabs_initial theme-".concat(theme)
8252
- }), /*#__PURE__*/React.createElement("div", {
8253
- className: "CodeTabs-toolbar"
8254
- }, children.map(function (_ref2, i) {
8255
- var pre = _ref2.props;
8256
- var _pre$children$0$props = pre.children[0].props,
8257
- meta = _pre$children$0$props.meta,
8258
- lang = _pre$children$0$props.lang;
8259
- /* istanbul ignore next */
8260
- return /*#__PURE__*/React.createElement("button", {
8261
- key: i,
8262
- onClick: function onClick(e) {
8263
- return handleClick(e, i);
8264
- },
8265
- type: "button"
8266
- }, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
8267
- })), /*#__PURE__*/React.createElement("div", {
8268
- className: "CodeTabs-inner"
8269
- }, children))
8270
- );
8246
+ return /*#__PURE__*/React.createElement("div", {
8247
+ className: "CodeTabs CodeTabs_initial theme-".concat(theme)
8248
+ }, /*#__PURE__*/React.createElement("div", {
8249
+ className: "CodeTabs-toolbar"
8250
+ }, children.map(function (_ref2, i) {
8251
+ var pre = _ref2.props;
8252
+ var _pre$children$0$props = pre.children[0].props,
8253
+ meta = _pre$children$0$props.meta,
8254
+ lang = _pre$children$0$props.lang;
8255
+ /* istanbul ignore next */
8256
+ return /*#__PURE__*/React.createElement("button", {
8257
+ key: i,
8258
+ onClick: function onClick(e) {
8259
+ return handleClick(e, i);
8260
+ },
8261
+ type: "button"
8262
+ }, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
8263
+ })), /*#__PURE__*/React.createElement("div", {
8264
+ className: "CodeTabs-inner"
8265
+ }, children));
8271
8266
  };
8272
8267
  CodeTabs.propTypes = {
8273
- attributes: PropTypes.shape({}),
8274
8268
  children: PropTypes.arrayOf(PropTypes.any).isRequired,
8275
8269
  theme: PropTypes.string
8276
8270
  };
8277
- CodeTabs.defaultProps = {
8278
- attributes: null
8279
- };
8280
8271
  function CreateCodeTabs(_ref3) {
8281
8272
  var theme = _ref3.theme;
8282
8273
  // eslint-disable-next-line react/display-name
@@ -8287,6 +8278,7 @@ function CreateCodeTabs(_ref3) {
8287
8278
  };
8288
8279
  }
8289
8280
  module.exports = CreateCodeTabs;
8281
+ module.exports.CodeTabs = CodeTabs;
8290
8282
 
8291
8283
  /***/ }),
8292
8284
 
@@ -8633,12 +8625,11 @@ function Heading(_ref) {
8633
8625
  }
8634
8626
  return React.createElement(tag, attrs, children);
8635
8627
  }
8636
- function CreateHeading(level, anchors, _ref2) {
8628
+ function CreateHeading(level, _ref2) {
8637
8629
  var showAnchorIcons = _ref2.showAnchorIcons;
8638
8630
  // eslint-disable-next-line react/display-name
8639
8631
  return function (props) {
8640
8632
  return /*#__PURE__*/React.createElement(Heading, _extends({}, props, {
8641
- anchors: anchors,
8642
8633
  level: level,
8643
8634
  showAnchorIcons: showAnchorIcons,
8644
8635
  tag: "h".concat(level)
@@ -8647,7 +8638,6 @@ function CreateHeading(level, anchors, _ref2) {
8647
8638
  }
8648
8639
  Heading.propTypes = {
8649
8640
  align: PropTypes.oneOf(['left', 'center', 'right', '']),
8650
- anchors: PropTypes.object,
8651
8641
  children: PropTypes.array.isRequired,
8652
8642
  id: PropTypes.string.isRequired,
8653
8643
  level: PropTypes.number,
@@ -8660,9 +8650,7 @@ Heading.defaultProps = {
8660
8650
  level: 2,
8661
8651
  showAnchorIcons: true
8662
8652
  };
8663
- module.exports = function (level, anchors, opts) {
8664
- return CreateHeading(level, anchors, opts);
8665
- };
8653
+ module.exports = CreateHeading;
8666
8654
 
8667
8655
  /***/ }),
8668
8656
 
@@ -9027,6 +9015,23 @@ module.exports = React.createContext([]);
9027
9015
 
9028
9016
  /***/ }),
9029
9017
 
9018
+ /***/ 5894:
9019
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9020
+
9021
+ var React = __webpack_require__(4466);
9022
+ var _require = __webpack_require__(6553),
9023
+ CodeTabs = _require.CodeTabs;
9024
+ var createElement = function createElement(type, props) {
9025
+ var rdmdType = type === 'div' && (props === null || props === void 0 ? void 0 : props.className) === 'code-tabs' ? CodeTabs : type;
9026
+ for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
9027
+ children[_key - 2] = arguments[_key];
9028
+ }
9029
+ return React.createElement.apply(React, [rdmdType, props].concat(children));
9030
+ };
9031
+ module.exports = createElement;
9032
+
9033
+ /***/ }),
9034
+
9030
9035
  /***/ 1264:
9031
9036
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9032
9037
 
@@ -25450,7 +25455,10 @@ function tokenizer(eat, value) {
25450
25455
  type: 'code-tabs',
25451
25456
  className: 'tabs',
25452
25457
  data: {
25453
- hName: 'code-tabs'
25458
+ hName: 'div',
25459
+ hProperties: {
25460
+ className: ['code-tabs']
25461
+ }
25454
25462
  },
25455
25463
  children: kids
25456
25464
  });
@@ -26257,6 +26265,539 @@ module.exports = function () {
26257
26265
  };
26258
26266
  module.exports.tableFlattening = transformer;
26259
26267
 
26268
+ /***/ }),
26269
+
26270
+ /***/ 8192:
26271
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26272
+
26273
+ "use strict";
26274
+ // ESM COMPAT FLAG
26275
+ __webpack_require__.r(__webpack_exports__);
26276
+
26277
+ // EXPORTS
26278
+ __webpack_require__.d(__webpack_exports__, {
26279
+ "singleCodeTabs": () => (/* reexport */ single_code_tabs)
26280
+ });
26281
+
26282
+ ;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-is/index.js
26283
+ /**
26284
+ * @typedef {import('unist').Node} Node
26285
+ * @typedef {import('unist').Parent} Parent
26286
+ *
26287
+ * @typedef {string} Type
26288
+ * @typedef {Object<string, unknown>} Props
26289
+ *
26290
+ * @typedef {null|undefined|Type|Props|TestFunctionAnything|Array.<Type|Props|TestFunctionAnything>} Test
26291
+ */
26292
+
26293
+ /**
26294
+ * Check if a node passes a test
26295
+ *
26296
+ * @callback TestFunctionAnything
26297
+ * @param {Node} node
26298
+ * @param {number|null|undefined} [index]
26299
+ * @param {Parent|null|undefined} [parent]
26300
+ * @returns {boolean|void}
26301
+ */
26302
+
26303
+ /**
26304
+ * Check if a node passes a certain node test
26305
+ *
26306
+ * @template {Node} X
26307
+ * @callback TestFunctionPredicate
26308
+ * @param {Node} node
26309
+ * @param {number|null|undefined} [index]
26310
+ * @param {Parent|null|undefined} [parent]
26311
+ * @returns {node is X}
26312
+ */
26313
+
26314
+ /**
26315
+ * @callback AssertAnything
26316
+ * @param {unknown} [node]
26317
+ * @param {number|null|undefined} [index]
26318
+ * @param {Parent|null|undefined} [parent]
26319
+ * @returns {boolean}
26320
+ */
26321
+
26322
+ /**
26323
+ * Check if a node passes a certain node test
26324
+ *
26325
+ * @template {Node} Y
26326
+ * @callback AssertPredicate
26327
+ * @param {unknown} [node]
26328
+ * @param {number|null|undefined} [index]
26329
+ * @param {Parent|null|undefined} [parent]
26330
+ * @returns {node is Y}
26331
+ */
26332
+
26333
+ const is =
26334
+ /**
26335
+ * Check if a node passes a test.
26336
+ * When a `parent` node is known the `index` of node should also be given.
26337
+ *
26338
+ * @type {(
26339
+ * (<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) &
26340
+ * ((node?: unknown, test?: Test, index?: number|null|undefined, parent?: Parent|null|undefined, context?: unknown) => boolean)
26341
+ * )}
26342
+ */
26343
+ (
26344
+ /**
26345
+ * Check if a node passes a test.
26346
+ * When a `parent` node is known the `index` of node should also be given.
26347
+ *
26348
+ * @param {unknown} [node] Node to check
26349
+ * @param {Test} [test]
26350
+ * When nullish, checks if `node` is a `Node`.
26351
+ * When `string`, works like passing `function (node) {return node.type === test}`.
26352
+ * When `function` checks if function passed the node is true.
26353
+ * When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
26354
+ * When `array`, checks any one of the subtests pass.
26355
+ * @param {number|null|undefined} [index] Position of `node` in `parent`
26356
+ * @param {Parent|null|undefined} [parent] Parent of `node`
26357
+ * @param {unknown} [context] Context object to invoke `test` with
26358
+ * @returns {boolean} Whether test passed and `node` is a `Node` (object with `type` set to non-empty `string`).
26359
+ */
26360
+ // eslint-disable-next-line max-params
26361
+ function is(node, test, index, parent, context) {
26362
+ const check = convert(test)
26363
+
26364
+ if (
26365
+ index !== undefined &&
26366
+ index !== null &&
26367
+ (typeof index !== 'number' ||
26368
+ index < 0 ||
26369
+ index === Number.POSITIVE_INFINITY)
26370
+ ) {
26371
+ throw new Error('Expected positive finite index')
26372
+ }
26373
+
26374
+ if (
26375
+ parent !== undefined &&
26376
+ parent !== null &&
26377
+ (!is(parent) || !parent.children)
26378
+ ) {
26379
+ throw new Error('Expected parent node')
26380
+ }
26381
+
26382
+ if (
26383
+ (parent === undefined || parent === null) !==
26384
+ (index === undefined || index === null)
26385
+ ) {
26386
+ throw new Error('Expected both parent and index')
26387
+ }
26388
+
26389
+ // @ts-expect-error Looks like a node.
26390
+ return node && node.type && typeof node.type === 'string'
26391
+ ? Boolean(check.call(context, node, index, parent))
26392
+ : false
26393
+ }
26394
+ )
26395
+
26396
+ const convert =
26397
+ /**
26398
+ * @type {(
26399
+ * (<T extends Node>(test: T['type']|Partial<T>|TestFunctionPredicate<T>) => AssertPredicate<T>) &
26400
+ * ((test?: Test) => AssertAnything)
26401
+ * )}
26402
+ */
26403
+ (
26404
+ /**
26405
+ * Generate an assertion from a check.
26406
+ * @param {Test} [test]
26407
+ * When nullish, checks if `node` is a `Node`.
26408
+ * When `string`, works like passing `function (node) {return node.type === test}`.
26409
+ * When `function` checks if function passed the node is true.
26410
+ * When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
26411
+ * When `array`, checks any one of the subtests pass.
26412
+ * @returns {AssertAnything}
26413
+ */
26414
+ function (test) {
26415
+ if (test === undefined || test === null) {
26416
+ return ok
26417
+ }
26418
+
26419
+ if (typeof test === 'string') {
26420
+ return typeFactory(test)
26421
+ }
26422
+
26423
+ if (typeof test === 'object') {
26424
+ return Array.isArray(test) ? anyFactory(test) : propsFactory(test)
26425
+ }
26426
+
26427
+ if (typeof test === 'function') {
26428
+ return castFactory(test)
26429
+ }
26430
+
26431
+ throw new Error('Expected function, string, or object as test')
26432
+ }
26433
+ )
26434
+ /**
26435
+ * @param {Array.<Type|Props|TestFunctionAnything>} tests
26436
+ * @returns {AssertAnything}
26437
+ */
26438
+ function anyFactory(tests) {
26439
+ /** @type {Array.<AssertAnything>} */
26440
+ const checks = []
26441
+ let index = -1
26442
+
26443
+ while (++index < tests.length) {
26444
+ checks[index] = convert(tests[index])
26445
+ }
26446
+
26447
+ return castFactory(any)
26448
+
26449
+ /**
26450
+ * @this {unknown}
26451
+ * @param {unknown[]} parameters
26452
+ * @returns {boolean}
26453
+ */
26454
+ function any(...parameters) {
26455
+ let index = -1
26456
+
26457
+ while (++index < checks.length) {
26458
+ if (checks[index].call(this, ...parameters)) return true
26459
+ }
26460
+
26461
+ return false
26462
+ }
26463
+ }
26464
+
26465
+ /**
26466
+ * Utility to assert each property in `test` is represented in `node`, and each
26467
+ * values are strictly equal.
26468
+ *
26469
+ * @param {Props} check
26470
+ * @returns {AssertAnything}
26471
+ */
26472
+ function propsFactory(check) {
26473
+ return castFactory(all)
26474
+
26475
+ /**
26476
+ * @param {Node} node
26477
+ * @returns {boolean}
26478
+ */
26479
+ function all(node) {
26480
+ /** @type {string} */
26481
+ let key
26482
+
26483
+ for (key in check) {
26484
+ // @ts-expect-error: hush, it sure works as an index.
26485
+ if (node[key] !== check[key]) return false
26486
+ }
26487
+
26488
+ return true
26489
+ }
26490
+ }
26491
+
26492
+ /**
26493
+ * Utility to convert a string into a function which checks a given node’s type
26494
+ * for said string.
26495
+ *
26496
+ * @param {Type} check
26497
+ * @returns {AssertAnything}
26498
+ */
26499
+ function typeFactory(check) {
26500
+ return castFactory(type)
26501
+
26502
+ /**
26503
+ * @param {Node} node
26504
+ */
26505
+ function type(node) {
26506
+ return node && node.type === check
26507
+ }
26508
+ }
26509
+
26510
+ /**
26511
+ * Utility to convert a string into a function which checks a given node’s type
26512
+ * for said string.
26513
+ * @param {TestFunctionAnything} check
26514
+ * @returns {AssertAnything}
26515
+ */
26516
+ function castFactory(check) {
26517
+ return assertion
26518
+
26519
+ /**
26520
+ * @this {unknown}
26521
+ * @param {Array.<unknown>} parameters
26522
+ * @returns {boolean}
26523
+ */
26524
+ function assertion(...parameters) {
26525
+ // @ts-expect-error: spreading is fine.
26526
+ return Boolean(check.call(this, ...parameters))
26527
+ }
26528
+ }
26529
+
26530
+ // Utility to return true.
26531
+ function ok() {
26532
+ return true
26533
+ }
26534
+
26535
+ ;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/color.browser.js
26536
+ /**
26537
+ * @param {string} d
26538
+ * @returns {string}
26539
+ */
26540
+ function color(d) {
26541
+ return d
26542
+ }
26543
+
26544
+ ;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/index.js
26545
+ /**
26546
+ * @typedef {import('unist').Node} Node
26547
+ * @typedef {import('unist').Parent} Parent
26548
+ * @typedef {import('unist-util-is').Test} Test
26549
+ * @typedef {import('./complex-types.js').Action} Action
26550
+ * @typedef {import('./complex-types.js').Index} Index
26551
+ * @typedef {import('./complex-types.js').ActionTuple} ActionTuple
26552
+ * @typedef {import('./complex-types.js').VisitorResult} VisitorResult
26553
+ * @typedef {import('./complex-types.js').Visitor} Visitor
26554
+ */
26555
+
26556
+
26557
+
26558
+
26559
+ /**
26560
+ * Continue traversing as normal
26561
+ */
26562
+ const CONTINUE = true
26563
+ /**
26564
+ * Do not traverse this node’s children
26565
+ */
26566
+ const SKIP = 'skip'
26567
+ /**
26568
+ * Stop traversing immediately
26569
+ */
26570
+ const EXIT = false
26571
+
26572
+ /**
26573
+ * Visit children of tree which pass test.
26574
+ *
26575
+ * @param tree
26576
+ * Tree to walk
26577
+ * @param [test]
26578
+ * `unist-util-is`-compatible test
26579
+ * @param visitor
26580
+ * Function called for nodes that pass `test`.
26581
+ * @param [reverse=false]
26582
+ * Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
26583
+ */
26584
+ const visitParents =
26585
+ /**
26586
+ * @type {(
26587
+ * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
26588
+ * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
26589
+ * )}
26590
+ */
26591
+ (
26592
+ /**
26593
+ * @param {Node} tree
26594
+ * @param {Test} test
26595
+ * @param {import('./complex-types.js').Visitor<Node>} visitor
26596
+ * @param {boolean} [reverse=false]
26597
+ */
26598
+ function (tree, test, visitor, reverse) {
26599
+ if (typeof test === 'function' && typeof visitor !== 'function') {
26600
+ reverse = visitor
26601
+ // @ts-expect-error no visitor given, so `visitor` is test.
26602
+ visitor = test
26603
+ test = null
26604
+ }
26605
+
26606
+ const is = convert(test)
26607
+ const step = reverse ? -1 : 1
26608
+
26609
+ factory(tree, null, [])()
26610
+
26611
+ /**
26612
+ * @param {Node} node
26613
+ * @param {number?} index
26614
+ * @param {Array<Parent>} parents
26615
+ */
26616
+ function factory(node, index, parents) {
26617
+ /** @type {Record<string, unknown>} */
26618
+ // @ts-expect-error: hush
26619
+ const value = typeof node === 'object' && node !== null ? node : {}
26620
+ /** @type {string|undefined} */
26621
+ let name
26622
+
26623
+ if (typeof value.type === 'string') {
26624
+ name =
26625
+ typeof value.tagName === 'string'
26626
+ ? value.tagName
26627
+ : typeof value.name === 'string'
26628
+ ? value.name
26629
+ : undefined
26630
+
26631
+ Object.defineProperty(visit, 'name', {
26632
+ value:
26633
+ 'node (' +
26634
+ color(value.type + (name ? '<' + name + '>' : '')) +
26635
+ ')'
26636
+ })
26637
+ }
26638
+
26639
+ return visit
26640
+
26641
+ function visit() {
26642
+ /** @type {ActionTuple} */
26643
+ let result = []
26644
+ /** @type {ActionTuple} */
26645
+ let subresult
26646
+ /** @type {number} */
26647
+ let offset
26648
+ /** @type {Array<Parent>} */
26649
+ let grandparents
26650
+
26651
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
26652
+ result = toResult(visitor(node, parents))
26653
+
26654
+ if (result[0] === EXIT) {
26655
+ return result
26656
+ }
26657
+ }
26658
+
26659
+ // @ts-expect-error looks like a parent.
26660
+ if (node.children && result[0] !== SKIP) {
26661
+ // @ts-expect-error looks like a parent.
26662
+ offset = (reverse ? node.children.length : -1) + step
26663
+ // @ts-expect-error looks like a parent.
26664
+ grandparents = parents.concat(node)
26665
+
26666
+ // @ts-expect-error looks like a parent.
26667
+ while (offset > -1 && offset < node.children.length) {
26668
+ // @ts-expect-error looks like a parent.
26669
+ subresult = factory(node.children[offset], offset, grandparents)()
26670
+
26671
+ if (subresult[0] === EXIT) {
26672
+ return subresult
26673
+ }
26674
+
26675
+ offset =
26676
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
26677
+ }
26678
+ }
26679
+
26680
+ return result
26681
+ }
26682
+ }
26683
+ }
26684
+ )
26685
+
26686
+ /**
26687
+ * @param {VisitorResult} value
26688
+ * @returns {ActionTuple}
26689
+ */
26690
+ function toResult(value) {
26691
+ if (Array.isArray(value)) {
26692
+ return value
26693
+ }
26694
+
26695
+ if (typeof value === 'number') {
26696
+ return [CONTINUE, value]
26697
+ }
26698
+
26699
+ return [value]
26700
+ }
26701
+
26702
+ ;// CONCATENATED MODULE: ./node_modules/unist-util-visit/index.js
26703
+ /**
26704
+ * @typedef {import('unist').Node} Node
26705
+ * @typedef {import('unist').Parent} Parent
26706
+ * @typedef {import('unist-util-is').Test} Test
26707
+ * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
26708
+ * @typedef {import('./complex-types.js').Visitor} Visitor
26709
+ */
26710
+
26711
+
26712
+
26713
+ /**
26714
+ * Visit children of tree which pass test.
26715
+ *
26716
+ * @param tree
26717
+ * Tree to walk
26718
+ * @param [test]
26719
+ * `unist-util-is`-compatible test
26720
+ * @param visitor
26721
+ * Function called for nodes that pass `test`.
26722
+ * @param reverse
26723
+ * Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
26724
+ */
26725
+ const visit =
26726
+ /**
26727
+ * @type {(
26728
+ * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
26729
+ * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
26730
+ * )}
26731
+ */
26732
+ (
26733
+ /**
26734
+ * @param {Node} tree
26735
+ * @param {Test} test
26736
+ * @param {import('./complex-types.js').Visitor} visitor
26737
+ * @param {boolean} [reverse]
26738
+ */
26739
+ function (tree, test, visitor, reverse) {
26740
+ if (typeof test === 'function' && typeof visitor !== 'function') {
26741
+ reverse = visitor
26742
+ visitor = test
26743
+ test = null
26744
+ }
26745
+
26746
+ visitParents(tree, test, overload, reverse)
26747
+
26748
+ /**
26749
+ * @param {Node} node
26750
+ * @param {Array<Parent>} parents
26751
+ */
26752
+ function overload(node, parents) {
26753
+ const parent = parents[parents.length - 1]
26754
+ return visitor(
26755
+ node,
26756
+ parent ? parent.children.indexOf(node) : null,
26757
+ parent
26758
+ )
26759
+ }
26760
+ }
26761
+ )
26762
+
26763
+
26764
+
26765
+ ;// CONCATENATED MODULE: ./processor/transform/single-code-tabs.js
26766
+
26767
+ var singleCodeTabs = function singleCodeTabs() {
26768
+ return function (tree) {
26769
+ visit(tree, function (node, index, parent) {
26770
+ if (node.type === 'code' && (node.lang || node.meta) && parent.type !== 'code-tabs') {
26771
+ Object.assign(node, {
26772
+ className: 'tab-panel',
26773
+ data: {
26774
+ hName: 'code',
26775
+ hProperties: {
26776
+ meta: node.meta,
26777
+ lang: node.lang
26778
+ }
26779
+ }
26780
+ });
26781
+ parent.children[index] = {
26782
+ type: 'code-tabs',
26783
+ className: 'tabs',
26784
+ data: {
26785
+ hName: 'div',
26786
+ hProperties: {
26787
+ className: ['code-tabs']
26788
+ }
26789
+ },
26790
+ children: [node]
26791
+ };
26792
+ }
26793
+ });
26794
+ return tree;
26795
+ };
26796
+ };
26797
+ /* harmony default export */ const single_code_tabs = (singleCodeTabs);
26798
+ ;// CONCATENATED MODULE: ./processor/transform/index.js
26799
+
26800
+
26260
26801
  /***/ }),
26261
26802
 
26262
26803
  /***/ 8229:
@@ -28343,7 +28884,7 @@ function parse(selector, defaultTagName) {
28343
28884
 
28344
28885
  var Parser = __webpack_require__(6425)
28345
28886
  var pos = __webpack_require__(7361)
28346
- var visit = __webpack_require__(2854)
28887
+ var visit = __webpack_require__(2409)
28347
28888
  var fromParse5 = __webpack_require__(7721)
28348
28889
  var toParse5 = __webpack_require__(8335)
28349
28890
  var voids = __webpack_require__(9878)
@@ -28678,6 +29219,240 @@ function createParse5Location(node) {
28678
29219
  }
28679
29220
 
28680
29221
 
29222
+ /***/ }),
29223
+
29224
+ /***/ 8442:
29225
+ /***/ ((module) => {
29226
+
29227
+ "use strict";
29228
+
29229
+
29230
+ module.exports = convert
29231
+
29232
+ function convert(test) {
29233
+ if (test == null) {
29234
+ return ok
29235
+ }
29236
+
29237
+ if (typeof test === 'string') {
29238
+ return typeFactory(test)
29239
+ }
29240
+
29241
+ if (typeof test === 'object') {
29242
+ return 'length' in test ? anyFactory(test) : allFactory(test)
29243
+ }
29244
+
29245
+ if (typeof test === 'function') {
29246
+ return test
29247
+ }
29248
+
29249
+ throw new Error('Expected function, string, or object as test')
29250
+ }
29251
+
29252
+ // Utility assert each property in `test` is represented in `node`, and each
29253
+ // values are strictly equal.
29254
+ function allFactory(test) {
29255
+ return all
29256
+
29257
+ function all(node) {
29258
+ var key
29259
+
29260
+ for (key in test) {
29261
+ if (node[key] !== test[key]) return false
29262
+ }
29263
+
29264
+ return true
29265
+ }
29266
+ }
29267
+
29268
+ function anyFactory(tests) {
29269
+ var checks = []
29270
+ var index = -1
29271
+
29272
+ while (++index < tests.length) {
29273
+ checks[index] = convert(tests[index])
29274
+ }
29275
+
29276
+ return any
29277
+
29278
+ function any() {
29279
+ var index = -1
29280
+
29281
+ while (++index < checks.length) {
29282
+ if (checks[index].apply(this, arguments)) {
29283
+ return true
29284
+ }
29285
+ }
29286
+
29287
+ return false
29288
+ }
29289
+ }
29290
+
29291
+ // Utility to convert a string into a function which checks a given node’s type
29292
+ // for said string.
29293
+ function typeFactory(test) {
29294
+ return type
29295
+
29296
+ function type(node) {
29297
+ return Boolean(node && node.type === test)
29298
+ }
29299
+ }
29300
+
29301
+ // Utility to return true.
29302
+ function ok() {
29303
+ return true
29304
+ }
29305
+
29306
+
29307
+ /***/ }),
29308
+
29309
+ /***/ 5962:
29310
+ /***/ ((module) => {
29311
+
29312
+ module.exports = identity
29313
+ function identity(d) {
29314
+ return d
29315
+ }
29316
+
29317
+
29318
+ /***/ }),
29319
+
29320
+ /***/ 1106:
29321
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
29322
+
29323
+ "use strict";
29324
+
29325
+
29326
+ module.exports = visitParents
29327
+
29328
+ var convert = __webpack_require__(8442)
29329
+ var color = __webpack_require__(5962)
29330
+
29331
+ var CONTINUE = true
29332
+ var SKIP = 'skip'
29333
+ var EXIT = false
29334
+
29335
+ visitParents.CONTINUE = CONTINUE
29336
+ visitParents.SKIP = SKIP
29337
+ visitParents.EXIT = EXIT
29338
+
29339
+ function visitParents(tree, test, visitor, reverse) {
29340
+ var step
29341
+ var is
29342
+
29343
+ if (typeof test === 'function' && typeof visitor !== 'function') {
29344
+ reverse = visitor
29345
+ visitor = test
29346
+ test = null
29347
+ }
29348
+
29349
+ is = convert(test)
29350
+ step = reverse ? -1 : 1
29351
+
29352
+ factory(tree, null, [])()
29353
+
29354
+ function factory(node, index, parents) {
29355
+ var value = typeof node === 'object' && node !== null ? node : {}
29356
+ var name
29357
+
29358
+ if (typeof value.type === 'string') {
29359
+ name =
29360
+ typeof value.tagName === 'string'
29361
+ ? value.tagName
29362
+ : typeof value.name === 'string'
29363
+ ? value.name
29364
+ : undefined
29365
+
29366
+ visit.displayName =
29367
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
29368
+ }
29369
+
29370
+ return visit
29371
+
29372
+ function visit() {
29373
+ var grandparents = parents.concat(node)
29374
+ var result = []
29375
+ var subresult
29376
+ var offset
29377
+
29378
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
29379
+ result = toResult(visitor(node, parents))
29380
+
29381
+ if (result[0] === EXIT) {
29382
+ return result
29383
+ }
29384
+ }
29385
+
29386
+ if (node.children && result[0] !== SKIP) {
29387
+ offset = (reverse ? node.children.length : -1) + step
29388
+
29389
+ while (offset > -1 && offset < node.children.length) {
29390
+ subresult = factory(node.children[offset], offset, grandparents)()
29391
+
29392
+ if (subresult[0] === EXIT) {
29393
+ return subresult
29394
+ }
29395
+
29396
+ offset =
29397
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
29398
+ }
29399
+ }
29400
+
29401
+ return result
29402
+ }
29403
+ }
29404
+ }
29405
+
29406
+ function toResult(value) {
29407
+ if (value !== null && typeof value === 'object' && 'length' in value) {
29408
+ return value
29409
+ }
29410
+
29411
+ if (typeof value === 'number') {
29412
+ return [CONTINUE, value]
29413
+ }
29414
+
29415
+ return [value]
29416
+ }
29417
+
29418
+
29419
+ /***/ }),
29420
+
29421
+ /***/ 2409:
29422
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
29423
+
29424
+ "use strict";
29425
+
29426
+
29427
+ module.exports = visit
29428
+
29429
+ var visitParents = __webpack_require__(1106)
29430
+
29431
+ var CONTINUE = visitParents.CONTINUE
29432
+ var SKIP = visitParents.SKIP
29433
+ var EXIT = visitParents.EXIT
29434
+
29435
+ visit.CONTINUE = CONTINUE
29436
+ visit.SKIP = SKIP
29437
+ visit.EXIT = EXIT
29438
+
29439
+ function visit(tree, test, visitor, reverse) {
29440
+ if (typeof test === 'function' && typeof visitor !== 'function') {
29441
+ reverse = visitor
29442
+ visitor = test
29443
+ test = null
29444
+ }
29445
+
29446
+ visitParents(tree, test, overload, reverse)
29447
+
29448
+ function overload(node, parents) {
29449
+ var parent = parents[parents.length - 1]
29450
+ var index = parent ? parent.children.indexOf(node) : null
29451
+ return visitor(node, index, parent)
29452
+ }
29453
+ }
29454
+
29455
+
28681
29456
  /***/ }),
28682
29457
 
28683
29458
  /***/ 773:
@@ -31482,7 +32257,7 @@ function toAlignment(value) {
31482
32257
  "use strict";
31483
32258
 
31484
32259
 
31485
- var visit = __webpack_require__(2854)
32260
+ var visit = __webpack_require__(8212)
31486
32261
 
31487
32262
  module.exports = compact
31488
32263
 
@@ -31543,6 +32318,240 @@ function mergeable(node, commonmark) {
31543
32318
  }
31544
32319
 
31545
32320
 
32321
+ /***/ }),
32322
+
32323
+ /***/ 8081:
32324
+ /***/ ((module) => {
32325
+
32326
+ "use strict";
32327
+
32328
+
32329
+ module.exports = convert
32330
+
32331
+ function convert(test) {
32332
+ if (test == null) {
32333
+ return ok
32334
+ }
32335
+
32336
+ if (typeof test === 'string') {
32337
+ return typeFactory(test)
32338
+ }
32339
+
32340
+ if (typeof test === 'object') {
32341
+ return 'length' in test ? anyFactory(test) : allFactory(test)
32342
+ }
32343
+
32344
+ if (typeof test === 'function') {
32345
+ return test
32346
+ }
32347
+
32348
+ throw new Error('Expected function, string, or object as test')
32349
+ }
32350
+
32351
+ // Utility assert each property in `test` is represented in `node`, and each
32352
+ // values are strictly equal.
32353
+ function allFactory(test) {
32354
+ return all
32355
+
32356
+ function all(node) {
32357
+ var key
32358
+
32359
+ for (key in test) {
32360
+ if (node[key] !== test[key]) return false
32361
+ }
32362
+
32363
+ return true
32364
+ }
32365
+ }
32366
+
32367
+ function anyFactory(tests) {
32368
+ var checks = []
32369
+ var index = -1
32370
+
32371
+ while (++index < tests.length) {
32372
+ checks[index] = convert(tests[index])
32373
+ }
32374
+
32375
+ return any
32376
+
32377
+ function any() {
32378
+ var index = -1
32379
+
32380
+ while (++index < checks.length) {
32381
+ if (checks[index].apply(this, arguments)) {
32382
+ return true
32383
+ }
32384
+ }
32385
+
32386
+ return false
32387
+ }
32388
+ }
32389
+
32390
+ // Utility to convert a string into a function which checks a given node’s type
32391
+ // for said string.
32392
+ function typeFactory(test) {
32393
+ return type
32394
+
32395
+ function type(node) {
32396
+ return Boolean(node && node.type === test)
32397
+ }
32398
+ }
32399
+
32400
+ // Utility to return true.
32401
+ function ok() {
32402
+ return true
32403
+ }
32404
+
32405
+
32406
+ /***/ }),
32407
+
32408
+ /***/ 7260:
32409
+ /***/ ((module) => {
32410
+
32411
+ module.exports = identity
32412
+ function identity(d) {
32413
+ return d
32414
+ }
32415
+
32416
+
32417
+ /***/ }),
32418
+
32419
+ /***/ 8261:
32420
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
32421
+
32422
+ "use strict";
32423
+
32424
+
32425
+ module.exports = visitParents
32426
+
32427
+ var convert = __webpack_require__(8081)
32428
+ var color = __webpack_require__(7260)
32429
+
32430
+ var CONTINUE = true
32431
+ var SKIP = 'skip'
32432
+ var EXIT = false
32433
+
32434
+ visitParents.CONTINUE = CONTINUE
32435
+ visitParents.SKIP = SKIP
32436
+ visitParents.EXIT = EXIT
32437
+
32438
+ function visitParents(tree, test, visitor, reverse) {
32439
+ var step
32440
+ var is
32441
+
32442
+ if (typeof test === 'function' && typeof visitor !== 'function') {
32443
+ reverse = visitor
32444
+ visitor = test
32445
+ test = null
32446
+ }
32447
+
32448
+ is = convert(test)
32449
+ step = reverse ? -1 : 1
32450
+
32451
+ factory(tree, null, [])()
32452
+
32453
+ function factory(node, index, parents) {
32454
+ var value = typeof node === 'object' && node !== null ? node : {}
32455
+ var name
32456
+
32457
+ if (typeof value.type === 'string') {
32458
+ name =
32459
+ typeof value.tagName === 'string'
32460
+ ? value.tagName
32461
+ : typeof value.name === 'string'
32462
+ ? value.name
32463
+ : undefined
32464
+
32465
+ visit.displayName =
32466
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
32467
+ }
32468
+
32469
+ return visit
32470
+
32471
+ function visit() {
32472
+ var grandparents = parents.concat(node)
32473
+ var result = []
32474
+ var subresult
32475
+ var offset
32476
+
32477
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
32478
+ result = toResult(visitor(node, parents))
32479
+
32480
+ if (result[0] === EXIT) {
32481
+ return result
32482
+ }
32483
+ }
32484
+
32485
+ if (node.children && result[0] !== SKIP) {
32486
+ offset = (reverse ? node.children.length : -1) + step
32487
+
32488
+ while (offset > -1 && offset < node.children.length) {
32489
+ subresult = factory(node.children[offset], offset, grandparents)()
32490
+
32491
+ if (subresult[0] === EXIT) {
32492
+ return subresult
32493
+ }
32494
+
32495
+ offset =
32496
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
32497
+ }
32498
+ }
32499
+
32500
+ return result
32501
+ }
32502
+ }
32503
+ }
32504
+
32505
+ function toResult(value) {
32506
+ if (value !== null && typeof value === 'object' && 'length' in value) {
32507
+ return value
32508
+ }
32509
+
32510
+ if (typeof value === 'number') {
32511
+ return [CONTINUE, value]
32512
+ }
32513
+
32514
+ return [value]
32515
+ }
32516
+
32517
+
32518
+ /***/ }),
32519
+
32520
+ /***/ 8212:
32521
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
32522
+
32523
+ "use strict";
32524
+
32525
+
32526
+ module.exports = visit
32527
+
32528
+ var visitParents = __webpack_require__(8261)
32529
+
32530
+ var CONTINUE = visitParents.CONTINUE
32531
+ var SKIP = visitParents.SKIP
32532
+ var EXIT = visitParents.EXIT
32533
+
32534
+ visit.CONTINUE = CONTINUE
32535
+ visit.SKIP = SKIP
32536
+ visit.EXIT = EXIT
32537
+
32538
+ function visit(tree, test, visitor, reverse) {
32539
+ if (typeof test === 'function' && typeof visitor !== 'function') {
32540
+ reverse = visitor
32541
+ visitor = test
32542
+ test = null
32543
+ }
32544
+
32545
+ visitParents(tree, test, overload, reverse)
32546
+
32547
+ function overload(node, parents) {
32548
+ var parent = parents[parents.length - 1]
32549
+ var index = parent ? parent.children.indexOf(node) : null
32550
+ return visitor(node, index, parent)
32551
+ }
32552
+ }
32553
+
32554
+
31546
32555
  /***/ }),
31547
32556
 
31548
32557
  /***/ 6630:
@@ -31551,7 +32560,7 @@ function mergeable(node, commonmark) {
31551
32560
  "use strict";
31552
32561
 
31553
32562
 
31554
- var visit = __webpack_require__(2854)
32563
+ var visit = __webpack_require__(959)
31555
32564
 
31556
32565
  module.exports = getDefinitionFactory
31557
32566
 
@@ -31602,6 +32611,240 @@ function normalise(identifier) {
31602
32611
  }
31603
32612
 
31604
32613
 
32614
+ /***/ }),
32615
+
32616
+ /***/ 9626:
32617
+ /***/ ((module) => {
32618
+
32619
+ "use strict";
32620
+
32621
+
32622
+ module.exports = convert
32623
+
32624
+ function convert(test) {
32625
+ if (test == null) {
32626
+ return ok
32627
+ }
32628
+
32629
+ if (typeof test === 'string') {
32630
+ return typeFactory(test)
32631
+ }
32632
+
32633
+ if (typeof test === 'object') {
32634
+ return 'length' in test ? anyFactory(test) : allFactory(test)
32635
+ }
32636
+
32637
+ if (typeof test === 'function') {
32638
+ return test
32639
+ }
32640
+
32641
+ throw new Error('Expected function, string, or object as test')
32642
+ }
32643
+
32644
+ // Utility assert each property in `test` is represented in `node`, and each
32645
+ // values are strictly equal.
32646
+ function allFactory(test) {
32647
+ return all
32648
+
32649
+ function all(node) {
32650
+ var key
32651
+
32652
+ for (key in test) {
32653
+ if (node[key] !== test[key]) return false
32654
+ }
32655
+
32656
+ return true
32657
+ }
32658
+ }
32659
+
32660
+ function anyFactory(tests) {
32661
+ var checks = []
32662
+ var index = -1
32663
+
32664
+ while (++index < tests.length) {
32665
+ checks[index] = convert(tests[index])
32666
+ }
32667
+
32668
+ return any
32669
+
32670
+ function any() {
32671
+ var index = -1
32672
+
32673
+ while (++index < checks.length) {
32674
+ if (checks[index].apply(this, arguments)) {
32675
+ return true
32676
+ }
32677
+ }
32678
+
32679
+ return false
32680
+ }
32681
+ }
32682
+
32683
+ // Utility to convert a string into a function which checks a given node’s type
32684
+ // for said string.
32685
+ function typeFactory(test) {
32686
+ return type
32687
+
32688
+ function type(node) {
32689
+ return Boolean(node && node.type === test)
32690
+ }
32691
+ }
32692
+
32693
+ // Utility to return true.
32694
+ function ok() {
32695
+ return true
32696
+ }
32697
+
32698
+
32699
+ /***/ }),
32700
+
32701
+ /***/ 6702:
32702
+ /***/ ((module) => {
32703
+
32704
+ module.exports = identity
32705
+ function identity(d) {
32706
+ return d
32707
+ }
32708
+
32709
+
32710
+ /***/ }),
32711
+
32712
+ /***/ 9692:
32713
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
32714
+
32715
+ "use strict";
32716
+
32717
+
32718
+ module.exports = visitParents
32719
+
32720
+ var convert = __webpack_require__(9626)
32721
+ var color = __webpack_require__(6702)
32722
+
32723
+ var CONTINUE = true
32724
+ var SKIP = 'skip'
32725
+ var EXIT = false
32726
+
32727
+ visitParents.CONTINUE = CONTINUE
32728
+ visitParents.SKIP = SKIP
32729
+ visitParents.EXIT = EXIT
32730
+
32731
+ function visitParents(tree, test, visitor, reverse) {
32732
+ var step
32733
+ var is
32734
+
32735
+ if (typeof test === 'function' && typeof visitor !== 'function') {
32736
+ reverse = visitor
32737
+ visitor = test
32738
+ test = null
32739
+ }
32740
+
32741
+ is = convert(test)
32742
+ step = reverse ? -1 : 1
32743
+
32744
+ factory(tree, null, [])()
32745
+
32746
+ function factory(node, index, parents) {
32747
+ var value = typeof node === 'object' && node !== null ? node : {}
32748
+ var name
32749
+
32750
+ if (typeof value.type === 'string') {
32751
+ name =
32752
+ typeof value.tagName === 'string'
32753
+ ? value.tagName
32754
+ : typeof value.name === 'string'
32755
+ ? value.name
32756
+ : undefined
32757
+
32758
+ visit.displayName =
32759
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
32760
+ }
32761
+
32762
+ return visit
32763
+
32764
+ function visit() {
32765
+ var grandparents = parents.concat(node)
32766
+ var result = []
32767
+ var subresult
32768
+ var offset
32769
+
32770
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
32771
+ result = toResult(visitor(node, parents))
32772
+
32773
+ if (result[0] === EXIT) {
32774
+ return result
32775
+ }
32776
+ }
32777
+
32778
+ if (node.children && result[0] !== SKIP) {
32779
+ offset = (reverse ? node.children.length : -1) + step
32780
+
32781
+ while (offset > -1 && offset < node.children.length) {
32782
+ subresult = factory(node.children[offset], offset, grandparents)()
32783
+
32784
+ if (subresult[0] === EXIT) {
32785
+ return subresult
32786
+ }
32787
+
32788
+ offset =
32789
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
32790
+ }
32791
+ }
32792
+
32793
+ return result
32794
+ }
32795
+ }
32796
+ }
32797
+
32798
+ function toResult(value) {
32799
+ if (value !== null && typeof value === 'object' && 'length' in value) {
32800
+ return value
32801
+ }
32802
+
32803
+ if (typeof value === 'number') {
32804
+ return [CONTINUE, value]
32805
+ }
32806
+
32807
+ return [value]
32808
+ }
32809
+
32810
+
32811
+ /***/ }),
32812
+
32813
+ /***/ 959:
32814
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
32815
+
32816
+ "use strict";
32817
+
32818
+
32819
+ module.exports = visit
32820
+
32821
+ var visitParents = __webpack_require__(9692)
32822
+
32823
+ var CONTINUE = visitParents.CONTINUE
32824
+ var SKIP = visitParents.SKIP
32825
+ var EXIT = visitParents.EXIT
32826
+
32827
+ visit.CONTINUE = CONTINUE
32828
+ visit.SKIP = SKIP
32829
+ visit.EXIT = EXIT
32830
+
32831
+ function visit(tree, test, visitor, reverse) {
32832
+ if (typeof test === 'function' && typeof visitor !== 'function') {
32833
+ reverse = visitor
32834
+ visitor = test
32835
+ test = null
32836
+ }
32837
+
32838
+ visitParents(tree, test, overload, reverse)
32839
+
32840
+ function overload(node, parents) {
32841
+ var parent = parents[parents.length - 1]
32842
+ var index = parent ? parent.children.indexOf(node) : null
32843
+ return visitor(node, index, parent)
32844
+ }
32845
+ }
32846
+
32847
+
31605
32848
  /***/ }),
31606
32849
 
31607
32850
  /***/ 5288:
@@ -32400,7 +33643,7 @@ function thematicBreak(h, node) {
32400
33643
  module.exports = toHast
32401
33644
 
32402
33645
  var u = __webpack_require__(914)
32403
- var visit = __webpack_require__(2854)
33646
+ var visit = __webpack_require__(8681)
32404
33647
  var position = __webpack_require__(7361)
32405
33648
  var generated = __webpack_require__(1744)
32406
33649
  var definitions = __webpack_require__(6630)
@@ -32661,6 +33904,240 @@ function wrap(nodes, loose) {
32661
33904
  }
32662
33905
 
32663
33906
 
33907
+ /***/ }),
33908
+
33909
+ /***/ 8189:
33910
+ /***/ ((module) => {
33911
+
33912
+ "use strict";
33913
+
33914
+
33915
+ module.exports = convert
33916
+
33917
+ function convert(test) {
33918
+ if (test == null) {
33919
+ return ok
33920
+ }
33921
+
33922
+ if (typeof test === 'string') {
33923
+ return typeFactory(test)
33924
+ }
33925
+
33926
+ if (typeof test === 'object') {
33927
+ return 'length' in test ? anyFactory(test) : allFactory(test)
33928
+ }
33929
+
33930
+ if (typeof test === 'function') {
33931
+ return test
33932
+ }
33933
+
33934
+ throw new Error('Expected function, string, or object as test')
33935
+ }
33936
+
33937
+ // Utility assert each property in `test` is represented in `node`, and each
33938
+ // values are strictly equal.
33939
+ function allFactory(test) {
33940
+ return all
33941
+
33942
+ function all(node) {
33943
+ var key
33944
+
33945
+ for (key in test) {
33946
+ if (node[key] !== test[key]) return false
33947
+ }
33948
+
33949
+ return true
33950
+ }
33951
+ }
33952
+
33953
+ function anyFactory(tests) {
33954
+ var checks = []
33955
+ var index = -1
33956
+
33957
+ while (++index < tests.length) {
33958
+ checks[index] = convert(tests[index])
33959
+ }
33960
+
33961
+ return any
33962
+
33963
+ function any() {
33964
+ var index = -1
33965
+
33966
+ while (++index < checks.length) {
33967
+ if (checks[index].apply(this, arguments)) {
33968
+ return true
33969
+ }
33970
+ }
33971
+
33972
+ return false
33973
+ }
33974
+ }
33975
+
33976
+ // Utility to convert a string into a function which checks a given node’s type
33977
+ // for said string.
33978
+ function typeFactory(test) {
33979
+ return type
33980
+
33981
+ function type(node) {
33982
+ return Boolean(node && node.type === test)
33983
+ }
33984
+ }
33985
+
33986
+ // Utility to return true.
33987
+ function ok() {
33988
+ return true
33989
+ }
33990
+
33991
+
33992
+ /***/ }),
33993
+
33994
+ /***/ 9007:
33995
+ /***/ ((module) => {
33996
+
33997
+ module.exports = identity
33998
+ function identity(d) {
33999
+ return d
34000
+ }
34001
+
34002
+
34003
+ /***/ }),
34004
+
34005
+ /***/ 9255:
34006
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
34007
+
34008
+ "use strict";
34009
+
34010
+
34011
+ module.exports = visitParents
34012
+
34013
+ var convert = __webpack_require__(8189)
34014
+ var color = __webpack_require__(9007)
34015
+
34016
+ var CONTINUE = true
34017
+ var SKIP = 'skip'
34018
+ var EXIT = false
34019
+
34020
+ visitParents.CONTINUE = CONTINUE
34021
+ visitParents.SKIP = SKIP
34022
+ visitParents.EXIT = EXIT
34023
+
34024
+ function visitParents(tree, test, visitor, reverse) {
34025
+ var step
34026
+ var is
34027
+
34028
+ if (typeof test === 'function' && typeof visitor !== 'function') {
34029
+ reverse = visitor
34030
+ visitor = test
34031
+ test = null
34032
+ }
34033
+
34034
+ is = convert(test)
34035
+ step = reverse ? -1 : 1
34036
+
34037
+ factory(tree, null, [])()
34038
+
34039
+ function factory(node, index, parents) {
34040
+ var value = typeof node === 'object' && node !== null ? node : {}
34041
+ var name
34042
+
34043
+ if (typeof value.type === 'string') {
34044
+ name =
34045
+ typeof value.tagName === 'string'
34046
+ ? value.tagName
34047
+ : typeof value.name === 'string'
34048
+ ? value.name
34049
+ : undefined
34050
+
34051
+ visit.displayName =
34052
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
34053
+ }
34054
+
34055
+ return visit
34056
+
34057
+ function visit() {
34058
+ var grandparents = parents.concat(node)
34059
+ var result = []
34060
+ var subresult
34061
+ var offset
34062
+
34063
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
34064
+ result = toResult(visitor(node, parents))
34065
+
34066
+ if (result[0] === EXIT) {
34067
+ return result
34068
+ }
34069
+ }
34070
+
34071
+ if (node.children && result[0] !== SKIP) {
34072
+ offset = (reverse ? node.children.length : -1) + step
34073
+
34074
+ while (offset > -1 && offset < node.children.length) {
34075
+ subresult = factory(node.children[offset], offset, grandparents)()
34076
+
34077
+ if (subresult[0] === EXIT) {
34078
+ return subresult
34079
+ }
34080
+
34081
+ offset =
34082
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
34083
+ }
34084
+ }
34085
+
34086
+ return result
34087
+ }
34088
+ }
34089
+ }
34090
+
34091
+ function toResult(value) {
34092
+ if (value !== null && typeof value === 'object' && 'length' in value) {
34093
+ return value
34094
+ }
34095
+
34096
+ if (typeof value === 'number') {
34097
+ return [CONTINUE, value]
34098
+ }
34099
+
34100
+ return [value]
34101
+ }
34102
+
34103
+
34104
+ /***/ }),
34105
+
34106
+ /***/ 8681:
34107
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
34108
+
34109
+ "use strict";
34110
+
34111
+
34112
+ module.exports = visit
34113
+
34114
+ var visitParents = __webpack_require__(9255)
34115
+
34116
+ var CONTINUE = visitParents.CONTINUE
34117
+ var SKIP = visitParents.SKIP
34118
+ var EXIT = visitParents.EXIT
34119
+
34120
+ visit.CONTINUE = CONTINUE
34121
+ visit.SKIP = SKIP
34122
+ visit.EXIT = EXIT
34123
+
34124
+ function visit(tree, test, visitor, reverse) {
34125
+ if (typeof test === 'function' && typeof visitor !== 'function') {
34126
+ reverse = visitor
34127
+ visitor = test
34128
+ test = null
34129
+ }
34130
+
34131
+ visitParents(tree, test, overload, reverse)
34132
+
34133
+ function overload(node, parents) {
34134
+ var parent = parents[parents.length - 1]
34135
+ var index = parent ? parent.children.indexOf(node) : null
34136
+ return visitor(node, index, parent)
34137
+ }
34138
+ }
34139
+
34140
+
32664
34141
  /***/ }),
32665
34142
 
32666
34143
  /***/ 4999:
@@ -32901,7 +34378,7 @@ function toc(node, options) {
32901
34378
  module.exports = search
32902
34379
 
32903
34380
  var toString = __webpack_require__(8161)
32904
- var visit = __webpack_require__(2854)
34381
+ var visit = __webpack_require__(4290)
32905
34382
  var convert = __webpack_require__(6351)
32906
34383
  var slugs = __webpack_require__(9671)()
32907
34384
  var toExpression = __webpack_require__(6039)
@@ -33101,6 +34578,155 @@ function ok() {
33101
34578
  }
33102
34579
 
33103
34580
 
34581
+ /***/ }),
34582
+
34583
+ /***/ 1674:
34584
+ /***/ ((module) => {
34585
+
34586
+ module.exports = identity
34587
+ function identity(d) {
34588
+ return d
34589
+ }
34590
+
34591
+
34592
+ /***/ }),
34593
+
34594
+ /***/ 3623:
34595
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
34596
+
34597
+ "use strict";
34598
+
34599
+
34600
+ module.exports = visitParents
34601
+
34602
+ var convert = __webpack_require__(6351)
34603
+ var color = __webpack_require__(1674)
34604
+
34605
+ var CONTINUE = true
34606
+ var SKIP = 'skip'
34607
+ var EXIT = false
34608
+
34609
+ visitParents.CONTINUE = CONTINUE
34610
+ visitParents.SKIP = SKIP
34611
+ visitParents.EXIT = EXIT
34612
+
34613
+ function visitParents(tree, test, visitor, reverse) {
34614
+ var step
34615
+ var is
34616
+
34617
+ if (typeof test === 'function' && typeof visitor !== 'function') {
34618
+ reverse = visitor
34619
+ visitor = test
34620
+ test = null
34621
+ }
34622
+
34623
+ is = convert(test)
34624
+ step = reverse ? -1 : 1
34625
+
34626
+ factory(tree, null, [])()
34627
+
34628
+ function factory(node, index, parents) {
34629
+ var value = typeof node === 'object' && node !== null ? node : {}
34630
+ var name
34631
+
34632
+ if (typeof value.type === 'string') {
34633
+ name =
34634
+ typeof value.tagName === 'string'
34635
+ ? value.tagName
34636
+ : typeof value.name === 'string'
34637
+ ? value.name
34638
+ : undefined
34639
+
34640
+ visit.displayName =
34641
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
34642
+ }
34643
+
34644
+ return visit
34645
+
34646
+ function visit() {
34647
+ var grandparents = parents.concat(node)
34648
+ var result = []
34649
+ var subresult
34650
+ var offset
34651
+
34652
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
34653
+ result = toResult(visitor(node, parents))
34654
+
34655
+ if (result[0] === EXIT) {
34656
+ return result
34657
+ }
34658
+ }
34659
+
34660
+ if (node.children && result[0] !== SKIP) {
34661
+ offset = (reverse ? node.children.length : -1) + step
34662
+
34663
+ while (offset > -1 && offset < node.children.length) {
34664
+ subresult = factory(node.children[offset], offset, grandparents)()
34665
+
34666
+ if (subresult[0] === EXIT) {
34667
+ return subresult
34668
+ }
34669
+
34670
+ offset =
34671
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
34672
+ }
34673
+ }
34674
+
34675
+ return result
34676
+ }
34677
+ }
34678
+ }
34679
+
34680
+ function toResult(value) {
34681
+ if (value !== null && typeof value === 'object' && 'length' in value) {
34682
+ return value
34683
+ }
34684
+
34685
+ if (typeof value === 'number') {
34686
+ return [CONTINUE, value]
34687
+ }
34688
+
34689
+ return [value]
34690
+ }
34691
+
34692
+
34693
+ /***/ }),
34694
+
34695
+ /***/ 4290:
34696
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
34697
+
34698
+ "use strict";
34699
+
34700
+
34701
+ module.exports = visit
34702
+
34703
+ var visitParents = __webpack_require__(3623)
34704
+
34705
+ var CONTINUE = visitParents.CONTINUE
34706
+ var SKIP = visitParents.SKIP
34707
+ var EXIT = visitParents.EXIT
34708
+
34709
+ visit.CONTINUE = CONTINUE
34710
+ visit.SKIP = SKIP
34711
+ visit.EXIT = EXIT
34712
+
34713
+ function visit(tree, test, visitor, reverse) {
34714
+ if (typeof test === 'function' && typeof visitor !== 'function') {
34715
+ reverse = visitor
34716
+ visitor = test
34717
+ test = null
34718
+ }
34719
+
34720
+ visitParents(tree, test, overload, reverse)
34721
+
34722
+ function overload(node, parents) {
34723
+ var parent = parents[parents.length - 1]
34724
+ var index = parent ? parent.children.indexOf(node) : null
34725
+ return visitor(node, index, parent)
34726
+ }
34727
+ }
34728
+
34729
+
33104
34730
  /***/ }),
33105
34731
 
33106
34732
  /***/ 729:
@@ -41419,7 +43045,7 @@ function mutate(options) {
41419
43045
 
41420
43046
 
41421
43047
  var toString = __webpack_require__(4999)
41422
- var visit = __webpack_require__(2854)
43048
+ var visit = __webpack_require__(4195)
41423
43049
  var slugs = __webpack_require__(9671)()
41424
43050
 
41425
43051
  module.exports = slug
@@ -41447,6 +43073,240 @@ function transformer(ast) {
41447
43073
  }
41448
43074
 
41449
43075
 
43076
+ /***/ }),
43077
+
43078
+ /***/ 5721:
43079
+ /***/ ((module) => {
43080
+
43081
+ "use strict";
43082
+
43083
+
43084
+ module.exports = convert
43085
+
43086
+ function convert(test) {
43087
+ if (test == null) {
43088
+ return ok
43089
+ }
43090
+
43091
+ if (typeof test === 'string') {
43092
+ return typeFactory(test)
43093
+ }
43094
+
43095
+ if (typeof test === 'object') {
43096
+ return 'length' in test ? anyFactory(test) : allFactory(test)
43097
+ }
43098
+
43099
+ if (typeof test === 'function') {
43100
+ return test
43101
+ }
43102
+
43103
+ throw new Error('Expected function, string, or object as test')
43104
+ }
43105
+
43106
+ // Utility assert each property in `test` is represented in `node`, and each
43107
+ // values are strictly equal.
43108
+ function allFactory(test) {
43109
+ return all
43110
+
43111
+ function all(node) {
43112
+ var key
43113
+
43114
+ for (key in test) {
43115
+ if (node[key] !== test[key]) return false
43116
+ }
43117
+
43118
+ return true
43119
+ }
43120
+ }
43121
+
43122
+ function anyFactory(tests) {
43123
+ var checks = []
43124
+ var index = -1
43125
+
43126
+ while (++index < tests.length) {
43127
+ checks[index] = convert(tests[index])
43128
+ }
43129
+
43130
+ return any
43131
+
43132
+ function any() {
43133
+ var index = -1
43134
+
43135
+ while (++index < checks.length) {
43136
+ if (checks[index].apply(this, arguments)) {
43137
+ return true
43138
+ }
43139
+ }
43140
+
43141
+ return false
43142
+ }
43143
+ }
43144
+
43145
+ // Utility to convert a string into a function which checks a given node’s type
43146
+ // for said string.
43147
+ function typeFactory(test) {
43148
+ return type
43149
+
43150
+ function type(node) {
43151
+ return Boolean(node && node.type === test)
43152
+ }
43153
+ }
43154
+
43155
+ // Utility to return true.
43156
+ function ok() {
43157
+ return true
43158
+ }
43159
+
43160
+
43161
+ /***/ }),
43162
+
43163
+ /***/ 2583:
43164
+ /***/ ((module) => {
43165
+
43166
+ module.exports = identity
43167
+ function identity(d) {
43168
+ return d
43169
+ }
43170
+
43171
+
43172
+ /***/ }),
43173
+
43174
+ /***/ 6751:
43175
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
43176
+
43177
+ "use strict";
43178
+
43179
+
43180
+ module.exports = visitParents
43181
+
43182
+ var convert = __webpack_require__(5721)
43183
+ var color = __webpack_require__(2583)
43184
+
43185
+ var CONTINUE = true
43186
+ var SKIP = 'skip'
43187
+ var EXIT = false
43188
+
43189
+ visitParents.CONTINUE = CONTINUE
43190
+ visitParents.SKIP = SKIP
43191
+ visitParents.EXIT = EXIT
43192
+
43193
+ function visitParents(tree, test, visitor, reverse) {
43194
+ var step
43195
+ var is
43196
+
43197
+ if (typeof test === 'function' && typeof visitor !== 'function') {
43198
+ reverse = visitor
43199
+ visitor = test
43200
+ test = null
43201
+ }
43202
+
43203
+ is = convert(test)
43204
+ step = reverse ? -1 : 1
43205
+
43206
+ factory(tree, null, [])()
43207
+
43208
+ function factory(node, index, parents) {
43209
+ var value = typeof node === 'object' && node !== null ? node : {}
43210
+ var name
43211
+
43212
+ if (typeof value.type === 'string') {
43213
+ name =
43214
+ typeof value.tagName === 'string'
43215
+ ? value.tagName
43216
+ : typeof value.name === 'string'
43217
+ ? value.name
43218
+ : undefined
43219
+
43220
+ visit.displayName =
43221
+ 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
43222
+ }
43223
+
43224
+ return visit
43225
+
43226
+ function visit() {
43227
+ var grandparents = parents.concat(node)
43228
+ var result = []
43229
+ var subresult
43230
+ var offset
43231
+
43232
+ if (!test || is(node, index, parents[parents.length - 1] || null)) {
43233
+ result = toResult(visitor(node, parents))
43234
+
43235
+ if (result[0] === EXIT) {
43236
+ return result
43237
+ }
43238
+ }
43239
+
43240
+ if (node.children && result[0] !== SKIP) {
43241
+ offset = (reverse ? node.children.length : -1) + step
43242
+
43243
+ while (offset > -1 && offset < node.children.length) {
43244
+ subresult = factory(node.children[offset], offset, grandparents)()
43245
+
43246
+ if (subresult[0] === EXIT) {
43247
+ return subresult
43248
+ }
43249
+
43250
+ offset =
43251
+ typeof subresult[1] === 'number' ? subresult[1] : offset + step
43252
+ }
43253
+ }
43254
+
43255
+ return result
43256
+ }
43257
+ }
43258
+ }
43259
+
43260
+ function toResult(value) {
43261
+ if (value !== null && typeof value === 'object' && 'length' in value) {
43262
+ return value
43263
+ }
43264
+
43265
+ if (typeof value === 'number') {
43266
+ return [CONTINUE, value]
43267
+ }
43268
+
43269
+ return [value]
43270
+ }
43271
+
43272
+
43273
+ /***/ }),
43274
+
43275
+ /***/ 4195:
43276
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
43277
+
43278
+ "use strict";
43279
+
43280
+
43281
+ module.exports = visit
43282
+
43283
+ var visitParents = __webpack_require__(6751)
43284
+
43285
+ var CONTINUE = visitParents.CONTINUE
43286
+ var SKIP = visitParents.SKIP
43287
+ var EXIT = visitParents.EXIT
43288
+
43289
+ visit.CONTINUE = CONTINUE
43290
+ visit.SKIP = SKIP
43291
+ visit.EXIT = EXIT
43292
+
43293
+ function visit(tree, test, visitor, reverse) {
43294
+ if (typeof test === 'function' && typeof visitor !== 'function') {
43295
+ reverse = visitor
43296
+ visitor = test
43297
+ test = null
43298
+ }
43299
+
43300
+ visitParents(tree, test, overload, reverse)
43301
+
43302
+ function overload(node, parents) {
43303
+ var parent = parents[parents.length - 1]
43304
+ var index = parent ? parent.children.indexOf(node) : null
43305
+ return visitor(node, index, parent)
43306
+ }
43307
+ }
43308
+
43309
+
41450
43310
  /***/ }),
41451
43311
 
41452
43312
  /***/ 3734:
@@ -45703,267 +47563,6 @@ function toResult(value) {
45703
47563
  }
45704
47564
 
45705
47565
 
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
47566
  /***/ }),
45968
47567
 
45969
47568
  /***/ 4787:
@@ -48892,6 +50491,7 @@ __webpack_require__.r(__webpack_exports__);
48892
50491
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
48893
50492
  /* harmony export */ "hast": () => (/* binding */ hast),
48894
50493
  /* harmony export */ "html": () => (/* binding */ html),
50494
+ /* harmony export */ "htmlProcessor": () => (/* binding */ htmlProcessor),
48895
50495
  /* harmony export */ "md": () => (/* binding */ md),
48896
50496
  /* harmony export */ "mdast": () => (/* binding */ mdast),
48897
50497
  /* harmony export */ "plain": () => (/* binding */ plain),
@@ -48933,6 +50533,7 @@ var Components = __webpack_require__(3354);
48933
50533
  var _require3 = __webpack_require__(8447),
48934
50534
  getHref = _require3.getHref;
48935
50535
  var BaseUrlContext = __webpack_require__(6785);
50536
+ var createElement = __webpack_require__(5894);
48936
50537
  var CustomParsers = Object.values(__webpack_require__(1593));
48937
50538
  var customCompilers = Object.values(__webpack_require__(9647));
48938
50539
  var registerCustomComponents = __webpack_require__(1264);
@@ -48944,6 +50545,7 @@ var _require5 = __webpack_require__(6284),
48944
50545
  var toPlainText = __webpack_require__(4792);
48945
50546
  var sectionAnchorId = __webpack_require__(9620);
48946
50547
  var tableFlattening = __webpack_require__(4625);
50548
+ var transformers = Object.values(__webpack_require__(8192));
48947
50549
  var createSchema = __webpack_require__(8229);
48948
50550
  var GlossaryItem = Components.GlossaryItem,
48949
50551
  Code = Components.Code,
@@ -48992,7 +50594,7 @@ var utils = {
48992
50594
  };
48993
50595
 
48994
50596
  /**
48995
- * Core markdown text processor
50597
+ * Core markdown to mdast processor
48996
50598
  */
48997
50599
  function processor() {
48998
50600
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -49004,7 +50606,39 @@ function processor() {
49004
50606
  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
50607
  var _parser$sanitize;
49006
50608
  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).use(remarkRehype, {
50609
+ })).use(transformers).use(remarkSlug).use(remarkDisableTokenizers, opts.disableTokenizers);
50610
+ }
50611
+
50612
+ /**
50613
+ * Full markdown to html processor
50614
+ */
50615
+ function htmlProcessor() {
50616
+ var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
50617
+ var _setup3 = setup('', opts);
50618
+ var _setup4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup3, 2);
50619
+ opts = _setup4[1];
50620
+ var _opts2 = opts,
50621
+ sanitize = _opts2.sanitize;
50622
+
50623
+ /*
50624
+ * This is kinda complicated: "markdown" within ReadMe is
50625
+ * often more than just markdown. It can also include HTML,
50626
+ * as well as custom syntax constructs such as <<variables>>,
50627
+ * and other special features.
50628
+ *
50629
+ * We use the Unified text processor to parse and transform
50630
+ * Markdown to various output formats, such as a React component
50631
+ * tree. (See https://github.com/unifiedjs/unified for more.)
50632
+ *
50633
+ * The order for processing ReadMe-flavored markdown is as follows:
50634
+ * - parse markdown
50635
+ * - parse custom syntaxes add-ons using custom compilers
50636
+ * - convert from a remark mdast (markdown ast) to a rehype hast (hypertext ast)
50637
+ * - extract any raw HTML elements
50638
+ * - sanitize and remove any disallowed attributes
50639
+ * - output the hast to a React vdom with our custom components
50640
+ */
50641
+ return processor(opts).use(remarkRehype, {
49008
50642
  allowDangerousHtml: true
49009
50643
  }).use(rehypeRaw).use(rehypeSanitize, sanitize);
49010
50644
  }
@@ -49012,11 +50646,11 @@ function plain(text) {
49012
50646
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49013
50647
  var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
49014
50648
  if (!text) return null;
49015
- var _setup3 = setup(text, opts);
49016
- var _setup4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup3, 2);
49017
- text = _setup4[0];
49018
- opts = _setup4[1];
49019
- return processor(opts).use(rehypeReact, {
50649
+ var _setup5 = setup(text, opts);
50650
+ var _setup6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup5, 2);
50651
+ text = _setup6[0];
50652
+ opts = _setup6[1];
50653
+ return htmlProcessor(opts).use(rehypeReact, {
49020
50654
  createElement: React.createElement,
49021
50655
  Fragment: React.Fragment,
49022
50656
  components: components
@@ -49033,19 +50667,17 @@ var PinWrap = function PinWrap(_ref) {
49033
50667
  className: "pin"
49034
50668
  }, children);
49035
50669
  }; // @todo: move this to it's own component
49036
- var count = {};
50670
+
49037
50671
  function reactProcessor() {
49038
50672
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
49039
50673
  var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49040
- var _setup5 = setup('', opts);
49041
- var _setup6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup5, 2);
49042
- opts = _setup6[1];
49043
- var _opts2 = opts,
49044
- sanitize = _opts2.sanitize;
49045
- return processor(_objectSpread({
49046
- sanitize: sanitize
49047
- }, opts)).use(sectionAnchorId).use(rehypeReact, {
49048
- createElement: React.createElement,
50674
+ var _setup7 = setup('', opts);
50675
+ var _setup8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup7, 2);
50676
+ opts = _setup8[1];
50677
+ var _opts3 = opts,
50678
+ sanitize = _opts3.sanitize;
50679
+ return htmlProcessor(_objectSpread({}, opts)).use(sectionAnchorId).use(rehypeReact, {
50680
+ createElement: createElement,
49049
50681
  Fragment: React.Fragment,
49050
50682
  components: _objectSpread({
49051
50683
  'code-tabs': CodeTabs(opts),
@@ -49057,12 +50689,12 @@ function reactProcessor() {
49057
50689
  'rdme-pin': PinWrap,
49058
50690
  table: Table,
49059
50691
  a: Anchor,
49060
- h1: Heading(1, count, opts),
49061
- h2: Heading(2, count, opts),
49062
- h3: Heading(3, count, opts),
49063
- h4: Heading(4, count, opts),
49064
- h5: Heading(5, count, opts),
49065
- h6: Heading(6, count, opts),
50692
+ h1: Heading(1, opts),
50693
+ h2: Heading(2, opts),
50694
+ h3: Heading(3, opts),
50695
+ h4: Heading(4, opts),
50696
+ h5: Heading(5, opts),
50697
+ h6: Heading(6, opts),
49066
50698
  code: Code(opts),
49067
50699
  img: Image(opts),
49068
50700
  style: Style(opts)
@@ -49073,14 +50705,14 @@ function react(content) {
49073
50705
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49074
50706
  var components = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
49075
50707
  if (!content) return null;else if (typeof content === 'string') {
49076
- var _setup7 = setup(content, opts);
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);
50708
+ var _setup9 = setup(content, opts);
49082
50709
  var _setup10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup9, 2);
50710
+ content = _setup10[0];
49083
50711
  opts = _setup10[1];
50712
+ } else {
50713
+ var _setup11 = setup('', opts);
50714
+ var _setup12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup11, 2);
50715
+ opts = _setup12[1];
49084
50716
  }
49085
50717
  var proc = reactProcessor(opts, components);
49086
50718
  if (typeof content === 'string') content = proc.parse(content);
@@ -49089,10 +50721,10 @@ function react(content) {
49089
50721
  function reactTOC(tree) {
49090
50722
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49091
50723
  if (!tree) return null;
49092
- var _setup11 = setup('', opts);
49093
- var _setup12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup11, 2);
49094
- opts = _setup12[1];
49095
- var proc = processor(opts).use(rehypeReact, {
50724
+ var _setup13 = setup('', opts);
50725
+ var _setup14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup13, 2);
50726
+ opts = _setup14[1];
50727
+ var proc = htmlProcessor(opts).use(rehypeReact, {
49096
50728
  createElement: React.createElement,
49097
50729
  components: {
49098
50730
  p: React.Fragment,
@@ -49123,11 +50755,11 @@ function reactTOC(tree) {
49123
50755
  function html(text) {
49124
50756
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49125
50757
  if (!text) return null;
49126
- var _setup13 = setup(text, opts);
49127
- var _setup14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup13, 2);
49128
- text = _setup14[0];
49129
- opts = _setup14[1];
49130
- return processor(opts).use(rehypeStringify).processSync(text).contents;
50758
+ var _setup15 = setup(text, opts);
50759
+ var _setup16 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup15, 2);
50760
+ text = _setup16[0];
50761
+ opts = _setup16[1];
50762
+ return htmlProcessor(opts).use(rehypeStringify).processSync(text).contents;
49131
50763
  }
49132
50764
 
49133
50765
  /**
@@ -49136,11 +50768,11 @@ function html(text) {
49136
50768
  function hast(text) {
49137
50769
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49138
50770
  if (!text) return null;
49139
- var _setup15 = setup(text, opts);
49140
- var _setup16 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup15, 2);
49141
- text = _setup16[0];
49142
- opts = _setup16[1];
49143
- var rdmd = processor(opts).use(tableFlattening);
50771
+ var _setup17 = setup(text, opts);
50772
+ var _setup18 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup17, 2);
50773
+ text = _setup18[0];
50774
+ opts = _setup18[1];
50775
+ var rdmd = htmlProcessor(opts).use(tableFlattening);
49144
50776
  var node = rdmd.parse(text);
49145
50777
  return rdmd.runSync(node);
49146
50778
  }
@@ -49151,11 +50783,12 @@ function hast(text) {
49151
50783
  function mdast(text) {
49152
50784
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49153
50785
  if (!text) return null;
49154
- var _setup17 = setup(text, opts);
49155
- var _setup18 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup17, 2);
49156
- text = _setup18[0];
49157
- opts = _setup18[1];
49158
- return processor(opts).parse(text);
50786
+ var _setup19 = setup(text, opts);
50787
+ var _setup20 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup19, 2);
50788
+ text = _setup20[0];
50789
+ opts = _setup20[1];
50790
+ var rdmd = processor(opts);
50791
+ return rdmd.runSync(rdmd.parse(text));
49159
50792
  }
49160
50793
 
49161
50794
  /**
@@ -49164,9 +50797,9 @@ function mdast(text) {
49164
50797
  function astToPlainText(node) {
49165
50798
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49166
50799
  if (!node) return '';
49167
- var _setup19 = setup('', opts);
49168
- var _setup20 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup19, 2);
49169
- opts = _setup20[1];
50800
+ var _setup21 = setup('', opts);
50801
+ var _setup22 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup21, 2);
50802
+ opts = _setup22[1];
49170
50803
  return processor(opts).use(toPlainText).stringify(node);
49171
50804
  }
49172
50805
 
@@ -49176,9 +50809,9 @@ function astToPlainText(node) {
49176
50809
  function md(tree) {
49177
50810
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49178
50811
  if (!tree) return null;
49179
- var _setup21 = setup('', opts);
49180
- var _setup22 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup21, 2);
49181
- opts = _setup22[1];
50812
+ var _setup23 = setup('', opts);
50813
+ var _setup24 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup23, 2);
50814
+ opts = _setup24[1];
49182
50815
  return processor(opts).use(remarkStringify, opts.markdownOptions).use(customCompilers).stringify(tree);
49183
50816
  }
49184
50817
  var ReadMeMarkdown = function ReadMeMarkdown(text) {