@aws/nx-plugin-mcp 1.0.0-rc.32 → 1.0.0-rc.33

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/bin/aws-nx-mcp.js CHANGED
@@ -4275,11 +4275,12 @@ const ZodObject$1 = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
4275
4275
  });
4276
4276
  });
4277
4277
  function object$1(shape, params) {
4278
- return new ZodObject$1({
4278
+ const def = {
4279
4279
  type: "object",
4280
4280
  shape: shape ?? {},
4281
4281
  ...normalizeParams(params)
4282
- });
4282
+ };
4283
+ return new ZodObject$1(def);
4283
4284
  }
4284
4285
  function looseObject(shape, params) {
4285
4286
  return new ZodObject$1({
@@ -4378,9 +4379,10 @@ const ZodEnum$1 = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
4378
4379
  };
4379
4380
  });
4380
4381
  function _enum(values, params) {
4382
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
4381
4383
  return new ZodEnum$1({
4382
4384
  type: "enum",
4383
- entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
4385
+ entries,
4384
4386
  ...normalizeParams(params)
4385
4387
  });
4386
4388
  }
@@ -7062,11 +7064,12 @@ var ZodType = class {
7062
7064
  data,
7063
7065
  parsedType: getParsedType(data)
7064
7066
  };
7065
- return handleResult(ctx, this._parseSync({
7067
+ const result = this._parseSync({
7066
7068
  data,
7067
7069
  path: ctx.path,
7068
7070
  parent: ctx
7069
- }));
7071
+ });
7072
+ return handleResult(ctx, result);
7070
7073
  }
7071
7074
  "~validate"(data) {
7072
7075
  const ctx = {
@@ -7123,7 +7126,8 @@ var ZodType = class {
7123
7126
  path: ctx.path,
7124
7127
  parent: ctx
7125
7128
  });
7126
- return handleResult(ctx, await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)));
7129
+ const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
7130
+ return handleResult(ctx, result);
7127
7131
  }
7128
7132
  refine(check, message) {
7129
7133
  const getIssueProperties = (val) => {
@@ -10140,11 +10144,12 @@ const ZodMiniObject = /*@__PURE__*/ $constructor("ZodMiniObject", (inst, def) =>
10140
10144
  });
10141
10145
  // @__NO_SIDE_EFFECTS__
10142
10146
  function object(shape, params) {
10143
- return new ZodMiniObject({
10147
+ const def = {
10144
10148
  type: "object",
10145
10149
  shape: shape ?? {},
10146
10150
  ...normalizeParams(params)
10147
- });
10151
+ };
10152
+ return new ZodMiniObject(def);
10148
10153
  }
10149
10154
  //#endregion
10150
10155
  //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
@@ -20279,13 +20284,14 @@ const buildInstallCommand = (pm, pkg, dev) => {
20279
20284
  * The package manager is auto-detected by @aws/create-nx-workspace from the
20280
20285
  * invoking command, so --pm is not needed.
20281
20286
  */
20282
- const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag) => {
20287
+ const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag, module) => {
20283
20288
  return [
20284
20289
  PACKAGE_MANAGER_COMMANDS[pm]?.create ?? `${pm} create`,
20285
20290
  tag ? `@aws/nx-workspace@${tag}` : "@aws/nx-workspace",
20286
20291
  ...pm === "npm" ? ["--"] : [],
20287
20292
  workspace,
20288
- ...iac ? [`--iac=${iac}`] : []
20293
+ ...iac ? [`--iac=${iac}`] : [],
20294
+ ...module ? [`--module=${module}`] : []
20289
20295
  ].join(" ");
20290
20296
  };
20291
20297
  //#endregion
@@ -20353,19 +20359,53 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
20353
20359
  /** Used to match Latin Unicode letters (excluding mathematical operators). */
20354
20360
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
20355
20361
  /** Used to compose unicode character classes. */
20356
- var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
20362
+ var rsAstralRange = "\\ud800-\\udfff";
20363
+ var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23";
20364
+ var rsComboSymbolsRange = "\\u20d0-\\u20f0";
20365
+ var rsDingbatRange = "\\u2700-\\u27bf";
20366
+ var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
20367
+ var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
20368
+ var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
20369
+ var rsPunctuationRange = "\\u2000-\\u206f";
20370
+ var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
20371
+ var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
20372
+ var rsVarRange = "\\ufe0e\\ufe0f";
20373
+ var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
20357
20374
  /** Used to compose unicode capture groups. */
20358
- var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
20375
+ var rsApos = "['’]";
20376
+ var rsAstral = "[" + rsAstralRange + "]";
20377
+ var rsBreak = "[" + rsBreakRange + "]";
20378
+ var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]";
20379
+ var rsDigits = "\\d+";
20380
+ var rsDingbat = "[" + rsDingbatRange + "]";
20381
+ var rsLower = "[" + rsLowerRange + "]";
20382
+ var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
20383
+ var rsFitz = "\\ud83c[\\udffb-\\udfff]";
20384
+ var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
20385
+ var rsNonAstral = "[^" + rsAstralRange + "]";
20386
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
20387
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
20388
+ var rsUpper = "[" + rsUpperRange + "]";
20389
+ var rsZWJ = "\\u200d";
20359
20390
  /** Used to compose unicode regexes. */
20360
- var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
20391
+ var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
20392
+ var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
20393
+ var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
20394
+ var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
20395
+ var reOptMod = rsModifier + "?";
20396
+ var rsOptVar = "[" + rsVarRange + "]?";
20397
+ var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
20361
20398
  rsNonAstral,
20362
20399
  rsRegional,
20363
20400
  rsSurrPair
20364
- ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
20401
+ ].join("|") + ")" + rsOptVar + reOptMod + ")*";
20402
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
20403
+ var rsEmoji = "(?:" + [
20365
20404
  rsDingbat,
20366
20405
  rsRegional,
20367
20406
  rsSurrPair
20368
- ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
20407
+ ].join("|") + ")" + rsSeq;
20408
+ var rsSymbol = "(?:" + [
20369
20409
  rsNonAstral + rsCombo + "?",
20370
20410
  rsCombo,
20371
20411
  rsRegional,
@@ -20719,7 +20759,8 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
20719
20759
  /** Built-in value references. */
20720
20760
  var Symbol = root.Symbol;
20721
20761
  /** Used to convert symbols to primitives and strings. */
20722
- var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
20762
+ var symbolProto = Symbol ? Symbol.prototype : void 0;
20763
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
20723
20764
  /**
20724
20765
  * The base implementation of `_.slice` without an iteratee call guard.
20725
20766
  *
@@ -21217,7 +21258,8 @@ var require_lodash_deburr = /* @__PURE__ */ __commonJSMin(((exports, module) =>
21217
21258
  /** Built-in value references. */
21218
21259
  var Symbol = root.Symbol;
21219
21260
  /** Used to convert symbols to primitives and strings. */
21220
- var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
21261
+ var symbolProto = Symbol ? Symbol.prototype : void 0;
21262
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
21221
21263
  /**
21222
21264
  * The base implementation of `_.toString` which doesn't convert nullish
21223
21265
  * values to empty strings.
@@ -21368,7 +21410,8 @@ const renderSchema = (schema) => {
21368
21410
  */
21369
21411
  const renderGeneratorCommand = (generatorId, schema, packageManager) => {
21370
21412
  const required = new Set(schema.required ?? []);
21371
- return `\`\`\`bash\n${buildNxCommand(`g @aws/nx-plugin:${generatorId} --no-interactive ${Object.keys(schema.properties ?? {}).filter((k) => required.has(k)).map((k) => `--${k}=<${k}>`).join(" ")}`, packageManager)}\n\`\`\``;
21413
+ const args = Object.keys(schema.properties ?? {}).filter((k) => required.has(k)).map((k) => `--${k}=<${k}>`).join(" ");
21414
+ return `\`\`\`bash\n${buildNxCommand(`g @aws/nx-plugin:${generatorId} --no-interactive ${args}`, packageManager)}\n\`\`\``;
21372
21415
  };
21373
21416
  //#endregion
21374
21417
  //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/dist/js-yaml.mjs
@@ -25905,1267 +25948,6 @@ var init_mdast_util_to_string = __esmMin((() => {
25905
25948
  init_lib$21();
25906
25949
  }));
25907
25950
  //#endregion
25908
- //#region ../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
25909
- /**
25910
- * Like `Array#splice`, but smarter for giant arrays.
25911
- *
25912
- * `Array#splice` takes all items to be inserted as individual argument which
25913
- * causes a stack overflow in V8 when trying to insert 100k items for instance.
25914
- *
25915
- * Otherwise, this does not return the removed items, and takes `items` as an
25916
- * array instead of rest parameters.
25917
- *
25918
- * @template {unknown} T
25919
- * Item type.
25920
- * @param {Array<T>} list
25921
- * List to operate on.
25922
- * @param {number} start
25923
- * Index to remove/insert at (can be negative).
25924
- * @param {number} remove
25925
- * Number of items to remove.
25926
- * @param {Array<T>} items
25927
- * Items to inject into `list`.
25928
- * @returns {undefined}
25929
- * Nothing.
25930
- */
25931
- function splice(list, start, remove, items) {
25932
- const end = list.length;
25933
- let chunkStart = 0;
25934
- /** @type {Array<unknown>} */
25935
- let parameters;
25936
- if (start < 0) start = -start > end ? 0 : end + start;
25937
- else start = start > end ? end : start;
25938
- remove = remove > 0 ? remove : 0;
25939
- if (items.length < 1e4) {
25940
- parameters = Array.from(items);
25941
- parameters.unshift(start, remove);
25942
- list.splice(...parameters);
25943
- } else {
25944
- if (remove) list.splice(start, remove);
25945
- while (chunkStart < items.length) {
25946
- parameters = items.slice(chunkStart, chunkStart + 1e4);
25947
- parameters.unshift(start, 0);
25948
- list.splice(...parameters);
25949
- chunkStart += 1e4;
25950
- start += 1e4;
25951
- }
25952
- }
25953
- }
25954
- /**
25955
- * Append `items` (an array) at the end of `list` (another array).
25956
- * When `list` was empty, returns `items` instead.
25957
- *
25958
- * This prevents a potentially expensive operation when `list` is empty,
25959
- * and adds items in batches to prevent V8 from hanging.
25960
- *
25961
- * @template {unknown} T
25962
- * Item type.
25963
- * @param {Array<T>} list
25964
- * List to operate on.
25965
- * @param {Array<T>} items
25966
- * Items to add to `list`.
25967
- * @returns {Array<T>}
25968
- * Either `list` or `items`.
25969
- */
25970
- function push(list, items) {
25971
- if (list.length > 0) {
25972
- splice(list, list.length, 0, items);
25973
- return list;
25974
- }
25975
- return items;
25976
- }
25977
- var init_micromark_util_chunked = __esmMin((() => {}));
25978
- //#endregion
25979
- //#region ../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
25980
- /**
25981
- * Combine multiple syntax extensions into one.
25982
- *
25983
- * @param {ReadonlyArray<Extension>} extensions
25984
- * List of syntax extensions.
25985
- * @returns {NormalizedExtension}
25986
- * A single combined extension.
25987
- */
25988
- function combineExtensions(extensions) {
25989
- /** @type {NormalizedExtension} */
25990
- const all = {};
25991
- let index = -1;
25992
- while (++index < extensions.length) syntaxExtension(all, extensions[index]);
25993
- return all;
25994
- }
25995
- /**
25996
- * Merge `extension` into `all`.
25997
- *
25998
- * @param {NormalizedExtension} all
25999
- * Extension to merge into.
26000
- * @param {Extension} extension
26001
- * Extension to merge.
26002
- * @returns {undefined}
26003
- * Nothing.
26004
- */
26005
- function syntaxExtension(all, extension) {
26006
- /** @type {keyof Extension} */
26007
- let hook;
26008
- for (hook in extension) {
26009
- /** @type {Record<string, unknown>} */
26010
- const left = (hasOwnProperty$1.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
26011
- /** @type {Record<string, unknown> | undefined} */
26012
- const right = extension[hook];
26013
- /** @type {string} */
26014
- let code;
26015
- if (right) for (code in right) {
26016
- if (!hasOwnProperty$1.call(left, code)) left[code] = [];
26017
- const value = right[code];
26018
- constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
26019
- }
26020
- }
26021
- }
26022
- /**
26023
- * Merge `list` into `existing` (both lists of constructs).
26024
- * Mutates `existing`.
26025
- *
26026
- * @param {Array<unknown>} existing
26027
- * List of constructs to merge into.
26028
- * @param {Array<unknown>} list
26029
- * List of constructs to merge.
26030
- * @returns {undefined}
26031
- * Nothing.
26032
- */
26033
- function constructs(existing, list) {
26034
- let index = -1;
26035
- /** @type {Array<unknown>} */
26036
- const before = [];
26037
- while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
26038
- splice(existing, 0, 0, before);
26039
- }
26040
- var hasOwnProperty$1;
26041
- var init_micromark_util_combine_extensions = __esmMin((() => {
26042
- init_micromark_util_chunked();
26043
- hasOwnProperty$1 = {}.hasOwnProperty;
26044
- }));
26045
- //#endregion
26046
- //#region ../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
26047
- /**
26048
- * Check whether a character code is an ASCII control character.
26049
- *
26050
- * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
26051
- * to U+001F (US), or U+007F (DEL).
26052
- *
26053
- * @param {Code} code
26054
- * Code.
26055
- * @returns {boolean}
26056
- * Whether it matches.
26057
- */
26058
- function asciiControl(code) {
26059
- return code !== null && (code < 32 || code === 127);
26060
- }
26061
- /**
26062
- * Check whether a character code is a markdown line ending.
26063
- *
26064
- * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
26065
- * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
26066
- *
26067
- * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
26068
- * RETURN (CR) are replaced by these virtual characters depending on whether
26069
- * they occurred together.
26070
- *
26071
- * @param {Code} code
26072
- * Code.
26073
- * @returns {boolean}
26074
- * Whether it matches.
26075
- */
26076
- function markdownLineEnding(code) {
26077
- return code !== null && code < -2;
26078
- }
26079
- /**
26080
- * Check whether a character code is a markdown line ending (see
26081
- * `markdownLineEnding`) or markdown space (see `markdownSpace`).
26082
- *
26083
- * @param {Code} code
26084
- * Code.
26085
- * @returns {boolean}
26086
- * Whether it matches.
26087
- */
26088
- function markdownLineEndingOrSpace(code) {
26089
- return code !== null && (code < 0 || code === 32);
26090
- }
26091
- /**
26092
- * Check whether a character code is a markdown space.
26093
- *
26094
- * A **markdown space** is the concrete character U+0020 SPACE (SP) and the
26095
- * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
26096
- *
26097
- * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
26098
- * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
26099
- * SPACE (VS) characters, depending on the column at which the tab occurred.
26100
- *
26101
- * @param {Code} code
26102
- * Code.
26103
- * @returns {boolean}
26104
- * Whether it matches.
26105
- */
26106
- function markdownSpace(code) {
26107
- return code === -2 || code === -1 || code === 32;
26108
- }
26109
- /**
26110
- * Create a code check from a regex.
26111
- *
26112
- * @param {RegExp} regex
26113
- * Expression.
26114
- * @returns {(code: Code) => boolean}
26115
- * Check.
26116
- */
26117
- function regexCheck(regex) {
26118
- return check;
26119
- /**
26120
- * Check whether a code matches the bound regex.
26121
- *
26122
- * @param {Code} code
26123
- * Character code.
26124
- * @returns {boolean}
26125
- * Whether the character code matches the bound regex.
26126
- */
26127
- function check(code) {
26128
- return code !== null && code > -1 && regex.test(String.fromCharCode(code));
26129
- }
26130
- }
26131
- var asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace;
26132
- var init_micromark_util_character = __esmMin((() => {
26133
- asciiAlpha = regexCheck(/[A-Za-z]/);
26134
- asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
26135
- asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
26136
- asciiDigit = regexCheck(/\d/);
26137
- asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
26138
- asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
26139
- unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
26140
- unicodeWhitespace = regexCheck(/\s/);
26141
- }));
26142
- //#endregion
26143
- //#region ../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
26144
- /**
26145
- * Parse spaces and tabs.
26146
- *
26147
- * There is no `nok` parameter:
26148
- *
26149
- * * spaces in markdown are often optional, in which case this factory can be
26150
- * used and `ok` will be switched to whether spaces were found or not
26151
- * * one line ending or space can be detected with `markdownSpace(code)` right
26152
- * before using `factorySpace`
26153
- *
26154
- * ###### Examples
26155
- *
26156
- * Where `␉` represents a tab (plus how much it expands) and `␠` represents a
26157
- * single space.
26158
- *
26159
- * ```markdown
26160
- * ␉
26161
- * ␠␠␠␠
26162
- * ␉␠
26163
- * ```
26164
- *
26165
- * @param {Effects} effects
26166
- * Context.
26167
- * @param {State} ok
26168
- * State switched to when successful.
26169
- * @param {TokenType} type
26170
- * Type (`' \t'`).
26171
- * @param {number | undefined} [max=Infinity]
26172
- * Max (exclusive).
26173
- * @returns {State}
26174
- * Start state.
26175
- */
26176
- function factorySpace(effects, ok, type, max) {
26177
- const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
26178
- let size = 0;
26179
- return start;
26180
- /** @type {State} */
26181
- function start(code) {
26182
- if (markdownSpace(code)) {
26183
- effects.enter(type);
26184
- return prefix(code);
26185
- }
26186
- return ok(code);
26187
- }
26188
- /** @type {State} */
26189
- function prefix(code) {
26190
- if (markdownSpace(code) && size++ < limit) {
26191
- effects.consume(code);
26192
- return prefix;
26193
- }
26194
- effects.exit(type);
26195
- return ok(code);
26196
- }
26197
- }
26198
- var init_micromark_factory_space = __esmMin((() => {
26199
- init_micromark_util_character();
26200
- }));
26201
- //#endregion
26202
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
26203
- /**
26204
- * @this {TokenizeContext}
26205
- * Context.
26206
- * @type {Initializer}
26207
- * Content.
26208
- */
26209
- function initializeContent(effects) {
26210
- const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
26211
- /** @type {Token} */
26212
- let previous;
26213
- return contentStart;
26214
- /** @type {State} */
26215
- function afterContentStartConstruct(code) {
26216
- if (code === null) {
26217
- effects.consume(code);
26218
- return;
26219
- }
26220
- effects.enter("lineEnding");
26221
- effects.consume(code);
26222
- effects.exit("lineEnding");
26223
- return factorySpace(effects, contentStart, "linePrefix");
26224
- }
26225
- /** @type {State} */
26226
- function paragraphInitial(code) {
26227
- effects.enter("paragraph");
26228
- return lineStart(code);
26229
- }
26230
- /** @type {State} */
26231
- function lineStart(code) {
26232
- const token = effects.enter("chunkText", {
26233
- contentType: "text",
26234
- previous
26235
- });
26236
- if (previous) previous.next = token;
26237
- previous = token;
26238
- return data(code);
26239
- }
26240
- /** @type {State} */
26241
- function data(code) {
26242
- if (code === null) {
26243
- effects.exit("chunkText");
26244
- effects.exit("paragraph");
26245
- effects.consume(code);
26246
- return;
26247
- }
26248
- if (markdownLineEnding(code)) {
26249
- effects.consume(code);
26250
- effects.exit("chunkText");
26251
- return lineStart;
26252
- }
26253
- effects.consume(code);
26254
- return data;
26255
- }
26256
- }
26257
- var content$1;
26258
- var init_content$1 = __esmMin((() => {
26259
- init_micromark_factory_space();
26260
- init_micromark_util_character();
26261
- content$1 = { tokenize: initializeContent };
26262
- }));
26263
- //#endregion
26264
- //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
26265
- /**
26266
- * @this {TokenizeContext}
26267
- * Self.
26268
- * @type {Initializer}
26269
- * Initializer.
26270
- */
26271
- function initializeDocument(effects) {
26272
- const self = this;
26273
- /** @type {Array<StackItem>} */
26274
- const stack = [];
26275
- let continued = 0;
26276
- /** @type {TokenizeContext | undefined} */
26277
- let childFlow;
26278
- /** @type {Token | undefined} */
26279
- let childToken;
26280
- /** @type {number} */
26281
- let lineStartOffset;
26282
- return start;
26283
- /** @type {State} */
26284
- function start(code) {
26285
- if (continued < stack.length) {
26286
- const item = stack[continued];
26287
- self.containerState = item[1];
26288
- return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);
26289
- }
26290
- return checkNewContainers(code);
26291
- }
26292
- /** @type {State} */
26293
- function documentContinue(code) {
26294
- continued++;
26295
- if (self.containerState._closeFlow) {
26296
- self.containerState._closeFlow = void 0;
26297
- if (childFlow) closeFlow();
26298
- const indexBeforeExits = self.events.length;
26299
- let indexBeforeFlow = indexBeforeExits;
26300
- /** @type {Point | undefined} */
26301
- let point;
26302
- while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
26303
- point = self.events[indexBeforeFlow][1].end;
26304
- break;
26305
- }
26306
- exitContainers(continued);
26307
- let index = indexBeforeExits;
26308
- while (index < self.events.length) {
26309
- self.events[index][1].end = { ...point };
26310
- index++;
26311
- }
26312
- splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
26313
- self.events.length = index;
26314
- return checkNewContainers(code);
26315
- }
26316
- return start(code);
26317
- }
26318
- /** @type {State} */
26319
- function checkNewContainers(code) {
26320
- if (continued === stack.length) {
26321
- if (!childFlow) return documentContinued(code);
26322
- if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) return flowStart(code);
26323
- self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);
26324
- }
26325
- self.containerState = {};
26326
- return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);
26327
- }
26328
- /** @type {State} */
26329
- function thereIsANewContainer(code) {
26330
- if (childFlow) closeFlow();
26331
- exitContainers(continued);
26332
- return documentContinued(code);
26333
- }
26334
- /** @type {State} */
26335
- function thereIsNoNewContainer(code) {
26336
- self.parser.lazy[self.now().line] = continued !== stack.length;
26337
- lineStartOffset = self.now().offset;
26338
- return flowStart(code);
26339
- }
26340
- /** @type {State} */
26341
- function documentContinued(code) {
26342
- self.containerState = {};
26343
- return effects.attempt(containerConstruct, containerContinue, flowStart)(code);
26344
- }
26345
- /** @type {State} */
26346
- function containerContinue(code) {
26347
- continued++;
26348
- stack.push([self.currentConstruct, self.containerState]);
26349
- return documentContinued(code);
26350
- }
26351
- /** @type {State} */
26352
- function flowStart(code) {
26353
- if (code === null) {
26354
- if (childFlow) closeFlow();
26355
- exitContainers(0);
26356
- effects.consume(code);
26357
- return;
26358
- }
26359
- childFlow = childFlow || self.parser.flow(self.now());
26360
- effects.enter("chunkFlow", {
26361
- _tokenizer: childFlow,
26362
- contentType: "flow",
26363
- previous: childToken
26364
- });
26365
- return flowContinue(code);
26366
- }
26367
- /** @type {State} */
26368
- function flowContinue(code) {
26369
- if (code === null) {
26370
- writeToChild(effects.exit("chunkFlow"), true);
26371
- exitContainers(0);
26372
- effects.consume(code);
26373
- return;
26374
- }
26375
- if (markdownLineEnding(code)) {
26376
- effects.consume(code);
26377
- writeToChild(effects.exit("chunkFlow"));
26378
- continued = 0;
26379
- self.interrupt = void 0;
26380
- return start;
26381
- }
26382
- effects.consume(code);
26383
- return flowContinue;
26384
- }
26385
- /**
26386
- * @param {Token} token
26387
- * Token.
26388
- * @param {boolean | undefined} [endOfFile]
26389
- * Whether the token is at the end of the file (default: `false`).
26390
- * @returns {undefined}
26391
- * Nothing.
26392
- */
26393
- function writeToChild(token, endOfFile) {
26394
- const stream = self.sliceStream(token);
26395
- if (endOfFile) stream.push(null);
26396
- token.previous = childToken;
26397
- if (childToken) childToken.next = token;
26398
- childToken = token;
26399
- childFlow.defineSkip(token.start);
26400
- childFlow.write(stream);
26401
- if (self.parser.lazy[token.start.line]) {
26402
- let index = childFlow.events.length;
26403
- while (index--) if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) return;
26404
- const indexBeforeExits = self.events.length;
26405
- let indexBeforeFlow = indexBeforeExits;
26406
- /** @type {boolean | undefined} */
26407
- let seen;
26408
- /** @type {Point | undefined} */
26409
- let point;
26410
- while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
26411
- if (seen) {
26412
- point = self.events[indexBeforeFlow][1].end;
26413
- break;
26414
- }
26415
- seen = true;
26416
- }
26417
- exitContainers(continued);
26418
- index = indexBeforeExits;
26419
- while (index < self.events.length) {
26420
- self.events[index][1].end = { ...point };
26421
- index++;
26422
- }
26423
- splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
26424
- self.events.length = index;
26425
- }
26426
- }
26427
- /**
26428
- * @param {number} size
26429
- * Size.
26430
- * @returns {undefined}
26431
- * Nothing.
26432
- */
26433
- function exitContainers(size) {
26434
- let index = stack.length;
26435
- while (index-- > size) {
26436
- const entry = stack[index];
26437
- self.containerState = entry[1];
26438
- entry[0].exit.call(self, effects);
26439
- }
26440
- stack.length = size;
26441
- }
26442
- function closeFlow() {
26443
- childFlow.write([null]);
26444
- childToken = void 0;
26445
- childFlow = void 0;
26446
- self.containerState._closeFlow = void 0;
26447
- }
26448
- }
26449
- /**
26450
- * @this {TokenizeContext}
26451
- * Context.
26452
- * @type {Tokenizer}
26453
- * Tokenizer.
26454
- */
26455
- function tokenizeContainer(effects, ok, nok) {
26456
- return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
26457
- }
26458
- var document$1, containerConstruct;
26459
- var init_document = __esmMin((() => {
26460
- init_micromark_factory_space();
26461
- init_micromark_util_character();
26462
- init_micromark_util_chunked();
26463
- document$1 = { tokenize: initializeDocument };
26464
- containerConstruct = { tokenize: tokenizeContainer };
26465
- }));
26466
- //#endregion
26467
- //#region ../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
26468
- /**
26469
- * Classify whether a code represents whitespace, punctuation, or something
26470
- * else.
26471
- *
26472
- * Used for attention (emphasis, strong), whose sequences can open or close
26473
- * based on the class of surrounding characters.
26474
- *
26475
- * > 👉 **Note**: eof (`null`) is seen as whitespace.
26476
- *
26477
- * @param {Code} code
26478
- * Code.
26479
- * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
26480
- * Group.
26481
- */
26482
- function classifyCharacter(code) {
26483
- if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return 1;
26484
- if (unicodePunctuation(code)) return 2;
26485
- }
26486
- var init_micromark_util_classify_character = __esmMin((() => {
26487
- init_micromark_util_character();
26488
- }));
26489
- //#endregion
26490
- //#region ../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
26491
- /**
26492
- * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
26493
- */
26494
- /**
26495
- * Call all `resolveAll`s.
26496
- *
26497
- * @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
26498
- * List of constructs, optionally with `resolveAll`s.
26499
- * @param {Array<Event>} events
26500
- * List of events.
26501
- * @param {TokenizeContext} context
26502
- * Context used by `tokenize`.
26503
- * @returns {Array<Event>}
26504
- * Changed events.
26505
- */
26506
- function resolveAll(constructs, events, context) {
26507
- /** @type {Array<Resolver>} */
26508
- const called = [];
26509
- let index = -1;
26510
- while (++index < constructs.length) {
26511
- const resolve = constructs[index].resolveAll;
26512
- if (resolve && !called.includes(resolve)) {
26513
- events = resolve(events, context);
26514
- called.push(resolve);
26515
- }
26516
- }
26517
- return events;
26518
- }
26519
- var init_micromark_util_resolve_all = __esmMin((() => {}));
26520
- //#endregion
26521
- //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
26522
- /**
26523
- * Take all events and resolve attention to emphasis or strong.
26524
- *
26525
- * @type {Resolver}
26526
- */
26527
- function resolveAllAttention(events, context) {
26528
- let index = -1;
26529
- /** @type {number} */
26530
- let open;
26531
- /** @type {Token} */
26532
- let group;
26533
- /** @type {Token} */
26534
- let text;
26535
- /** @type {Token} */
26536
- let openingSequence;
26537
- /** @type {Token} */
26538
- let closingSequence;
26539
- /** @type {number} */
26540
- let use;
26541
- /** @type {Array<Event>} */
26542
- let nextEvents;
26543
- /** @type {number} */
26544
- let offset;
26545
- while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
26546
- open = index;
26547
- while (open--) if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
26548
- if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) continue;
26549
- use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
26550
- const start = { ...events[open][1].end };
26551
- const end = { ...events[index][1].start };
26552
- movePoint(start, -use);
26553
- movePoint(end, use);
26554
- openingSequence = {
26555
- type: use > 1 ? "strongSequence" : "emphasisSequence",
26556
- start,
26557
- end: { ...events[open][1].end }
26558
- };
26559
- closingSequence = {
26560
- type: use > 1 ? "strongSequence" : "emphasisSequence",
26561
- start: { ...events[index][1].start },
26562
- end
26563
- };
26564
- text = {
26565
- type: use > 1 ? "strongText" : "emphasisText",
26566
- start: { ...events[open][1].end },
26567
- end: { ...events[index][1].start }
26568
- };
26569
- group = {
26570
- type: use > 1 ? "strong" : "emphasis",
26571
- start: { ...openingSequence.start },
26572
- end: { ...closingSequence.end }
26573
- };
26574
- events[open][1].end = { ...openingSequence.start };
26575
- events[index][1].start = { ...closingSequence.end };
26576
- nextEvents = [];
26577
- if (events[open][1].end.offset - events[open][1].start.offset) nextEvents = push(nextEvents, [[
26578
- "enter",
26579
- events[open][1],
26580
- context
26581
- ], [
26582
- "exit",
26583
- events[open][1],
26584
- context
26585
- ]]);
26586
- nextEvents = push(nextEvents, [
26587
- [
26588
- "enter",
26589
- group,
26590
- context
26591
- ],
26592
- [
26593
- "enter",
26594
- openingSequence,
26595
- context
26596
- ],
26597
- [
26598
- "exit",
26599
- openingSequence,
26600
- context
26601
- ],
26602
- [
26603
- "enter",
26604
- text,
26605
- context
26606
- ]
26607
- ]);
26608
- nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
26609
- nextEvents = push(nextEvents, [
26610
- [
26611
- "exit",
26612
- text,
26613
- context
26614
- ],
26615
- [
26616
- "enter",
26617
- closingSequence,
26618
- context
26619
- ],
26620
- [
26621
- "exit",
26622
- closingSequence,
26623
- context
26624
- ],
26625
- [
26626
- "exit",
26627
- group,
26628
- context
26629
- ]
26630
- ]);
26631
- if (events[index][1].end.offset - events[index][1].start.offset) {
26632
- offset = 2;
26633
- nextEvents = push(nextEvents, [[
26634
- "enter",
26635
- events[index][1],
26636
- context
26637
- ], [
26638
- "exit",
26639
- events[index][1],
26640
- context
26641
- ]]);
26642
- } else offset = 0;
26643
- splice(events, open - 1, index - open + 3, nextEvents);
26644
- index = open + nextEvents.length - offset - 2;
26645
- break;
26646
- }
26647
- }
26648
- index = -1;
26649
- while (++index < events.length) if (events[index][1].type === "attentionSequence") events[index][1].type = "data";
26650
- return events;
26651
- }
26652
- /**
26653
- * @this {TokenizeContext}
26654
- * Context.
26655
- * @type {Tokenizer}
26656
- */
26657
- function tokenizeAttention(effects, ok) {
26658
- const attentionMarkers = this.parser.constructs.attentionMarkers.null;
26659
- const previous = this.previous;
26660
- const before = classifyCharacter(previous);
26661
- /** @type {NonNullable<Code>} */
26662
- let marker;
26663
- return start;
26664
- /**
26665
- * Before a sequence.
26666
- *
26667
- * ```markdown
26668
- * > | **
26669
- * ^
26670
- * ```
26671
- *
26672
- * @type {State}
26673
- */
26674
- function start(code) {
26675
- marker = code;
26676
- effects.enter("attentionSequence");
26677
- return inside(code);
26678
- }
26679
- /**
26680
- * In a sequence.
26681
- *
26682
- * ```markdown
26683
- * > | **
26684
- * ^^
26685
- * ```
26686
- *
26687
- * @type {State}
26688
- */
26689
- function inside(code) {
26690
- if (code === marker) {
26691
- effects.consume(code);
26692
- return inside;
26693
- }
26694
- const token = effects.exit("attentionSequence");
26695
- const after = classifyCharacter(code);
26696
- const open = !after || after === 2 && before || attentionMarkers.includes(code);
26697
- const close = !before || before === 2 && after || attentionMarkers.includes(previous);
26698
- token._open = Boolean(marker === 42 ? open : open && (before || !close));
26699
- token._close = Boolean(marker === 42 ? close : close && (after || !open));
26700
- return ok(code);
26701
- }
26702
- }
26703
- /**
26704
- * Move a point a bit.
26705
- *
26706
- * Note: `move` only works inside lines! It’s not possible to move past other
26707
- * chunks (replacement characters, tabs, or line endings).
26708
- *
26709
- * @param {Point} point
26710
- * Point.
26711
- * @param {number} offset
26712
- * Amount to move.
26713
- * @returns {undefined}
26714
- * Nothing.
26715
- */
26716
- function movePoint(point, offset) {
26717
- point.column += offset;
26718
- point.offset += offset;
26719
- point._bufferIndex += offset;
26720
- }
26721
- var attention;
26722
- var init_attention = __esmMin((() => {
26723
- init_micromark_util_chunked();
26724
- init_micromark_util_classify_character();
26725
- init_micromark_util_resolve_all();
26726
- attention = {
26727
- name: "attention",
26728
- resolveAll: resolveAllAttention,
26729
- tokenize: tokenizeAttention
26730
- };
26731
- }));
26732
- //#endregion
26733
- //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
26734
- /**
26735
- * @this {TokenizeContext}
26736
- * Context.
26737
- * @type {Tokenizer}
26738
- */
26739
- function tokenizeAutolink(effects, ok, nok) {
26740
- let size = 0;
26741
- return start;
26742
- /**
26743
- * Start of an autolink.
26744
- *
26745
- * ```markdown
26746
- * > | a<https://example.com>b
26747
- * ^
26748
- * > | a<user@example.com>b
26749
- * ^
26750
- * ```
26751
- *
26752
- * @type {State}
26753
- */
26754
- function start(code) {
26755
- effects.enter("autolink");
26756
- effects.enter("autolinkMarker");
26757
- effects.consume(code);
26758
- effects.exit("autolinkMarker");
26759
- effects.enter("autolinkProtocol");
26760
- return open;
26761
- }
26762
- /**
26763
- * After `<`, at protocol or atext.
26764
- *
26765
- * ```markdown
26766
- * > | a<https://example.com>b
26767
- * ^
26768
- * > | a<user@example.com>b
26769
- * ^
26770
- * ```
26771
- *
26772
- * @type {State}
26773
- */
26774
- function open(code) {
26775
- if (asciiAlpha(code)) {
26776
- effects.consume(code);
26777
- return schemeOrEmailAtext;
26778
- }
26779
- if (code === 64) return nok(code);
26780
- return emailAtext(code);
26781
- }
26782
- /**
26783
- * At second byte of protocol or atext.
26784
- *
26785
- * ```markdown
26786
- * > | a<https://example.com>b
26787
- * ^
26788
- * > | a<user@example.com>b
26789
- * ^
26790
- * ```
26791
- *
26792
- * @type {State}
26793
- */
26794
- function schemeOrEmailAtext(code) {
26795
- if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
26796
- size = 1;
26797
- return schemeInsideOrEmailAtext(code);
26798
- }
26799
- return emailAtext(code);
26800
- }
26801
- /**
26802
- * In ambiguous protocol or atext.
26803
- *
26804
- * ```markdown
26805
- * > | a<https://example.com>b
26806
- * ^
26807
- * > | a<user@example.com>b
26808
- * ^
26809
- * ```
26810
- *
26811
- * @type {State}
26812
- */
26813
- function schemeInsideOrEmailAtext(code) {
26814
- if (code === 58) {
26815
- effects.consume(code);
26816
- size = 0;
26817
- return urlInside;
26818
- }
26819
- if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
26820
- effects.consume(code);
26821
- return schemeInsideOrEmailAtext;
26822
- }
26823
- size = 0;
26824
- return emailAtext(code);
26825
- }
26826
- /**
26827
- * After protocol, in URL.
26828
- *
26829
- * ```markdown
26830
- * > | a<https://example.com>b
26831
- * ^
26832
- * ```
26833
- *
26834
- * @type {State}
26835
- */
26836
- function urlInside(code) {
26837
- if (code === 62) {
26838
- effects.exit("autolinkProtocol");
26839
- effects.enter("autolinkMarker");
26840
- effects.consume(code);
26841
- effects.exit("autolinkMarker");
26842
- effects.exit("autolink");
26843
- return ok;
26844
- }
26845
- if (code === null || code === 32 || code === 60 || asciiControl(code)) return nok(code);
26846
- effects.consume(code);
26847
- return urlInside;
26848
- }
26849
- /**
26850
- * In email atext.
26851
- *
26852
- * ```markdown
26853
- * > | a<user.name@example.com>b
26854
- * ^
26855
- * ```
26856
- *
26857
- * @type {State}
26858
- */
26859
- function emailAtext(code) {
26860
- if (code === 64) {
26861
- effects.consume(code);
26862
- return emailAtSignOrDot;
26863
- }
26864
- if (asciiAtext(code)) {
26865
- effects.consume(code);
26866
- return emailAtext;
26867
- }
26868
- return nok(code);
26869
- }
26870
- /**
26871
- * In label, after at-sign or dot.
26872
- *
26873
- * ```markdown
26874
- * > | a<user.name@example.com>b
26875
- * ^ ^
26876
- * ```
26877
- *
26878
- * @type {State}
26879
- */
26880
- function emailAtSignOrDot(code) {
26881
- return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
26882
- }
26883
- /**
26884
- * In label, where `.` and `>` are allowed.
26885
- *
26886
- * ```markdown
26887
- * > | a<user.name@example.com>b
26888
- * ^
26889
- * ```
26890
- *
26891
- * @type {State}
26892
- */
26893
- function emailLabel(code) {
26894
- if (code === 46) {
26895
- effects.consume(code);
26896
- size = 0;
26897
- return emailAtSignOrDot;
26898
- }
26899
- if (code === 62) {
26900
- effects.exit("autolinkProtocol").type = "autolinkEmail";
26901
- effects.enter("autolinkMarker");
26902
- effects.consume(code);
26903
- effects.exit("autolinkMarker");
26904
- effects.exit("autolink");
26905
- return ok;
26906
- }
26907
- return emailValue(code);
26908
- }
26909
- /**
26910
- * In label, where `.` and `>` are *not* allowed.
26911
- *
26912
- * Though, this is also used in `emailLabel` to parse other values.
26913
- *
26914
- * ```markdown
26915
- * > | a<user.name@ex-ample.com>b
26916
- * ^
26917
- * ```
26918
- *
26919
- * @type {State}
26920
- */
26921
- function emailValue(code) {
26922
- if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
26923
- const next = code === 45 ? emailValue : emailLabel;
26924
- effects.consume(code);
26925
- return next;
26926
- }
26927
- return nok(code);
26928
- }
26929
- }
26930
- var autolink;
26931
- var init_autolink = __esmMin((() => {
26932
- init_micromark_util_character();
26933
- autolink = {
26934
- name: "autolink",
26935
- tokenize: tokenizeAutolink
26936
- };
26937
- }));
26938
- //#endregion
26939
- //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
26940
- /**
26941
- * @this {TokenizeContext}
26942
- * Context.
26943
- * @type {Tokenizer}
26944
- */
26945
- function tokenizeBlankLine(effects, ok, nok) {
26946
- return start;
26947
- /**
26948
- * Start of blank line.
26949
- *
26950
- * > 👉 **Note**: `␠` represents a space character.
26951
- *
26952
- * ```markdown
26953
- * > | ␠␠␊
26954
- * ^
26955
- * > | ␊
26956
- * ^
26957
- * ```
26958
- *
26959
- * @type {State}
26960
- */
26961
- function start(code) {
26962
- return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
26963
- }
26964
- /**
26965
- * At eof/eol, after optional whitespace.
26966
- *
26967
- * > 👉 **Note**: `␠` represents a space character.
26968
- *
26969
- * ```markdown
26970
- * > | ␠␠␊
26971
- * ^
26972
- * > | ␊
26973
- * ^
26974
- * ```
26975
- *
26976
- * @type {State}
26977
- */
26978
- function after(code) {
26979
- return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
26980
- }
26981
- }
26982
- var blankLine;
26983
- var init_blank_line = __esmMin((() => {
26984
- init_micromark_factory_space();
26985
- init_micromark_util_character();
26986
- blankLine = {
26987
- partial: true,
26988
- tokenize: tokenizeBlankLine
26989
- };
26990
- }));
26991
- //#endregion
26992
- //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
26993
- /**
26994
- * @this {TokenizeContext}
26995
- * Context.
26996
- * @type {Tokenizer}
26997
- */
26998
- function tokenizeBlockQuoteStart(effects, ok, nok) {
26999
- const self = this;
27000
- return start;
27001
- /**
27002
- * Start of block quote.
27003
- *
27004
- * ```markdown
27005
- * > | > a
27006
- * ^
27007
- * ```
27008
- *
27009
- * @type {State}
27010
- */
27011
- function start(code) {
27012
- if (code === 62) {
27013
- const state = self.containerState;
27014
- if (!state.open) {
27015
- effects.enter("blockQuote", { _container: true });
27016
- state.open = true;
27017
- }
27018
- effects.enter("blockQuotePrefix");
27019
- effects.enter("blockQuoteMarker");
27020
- effects.consume(code);
27021
- effects.exit("blockQuoteMarker");
27022
- return after;
27023
- }
27024
- return nok(code);
27025
- }
27026
- /**
27027
- * After `>`, before optional whitespace.
27028
- *
27029
- * ```markdown
27030
- * > | > a
27031
- * ^
27032
- * ```
27033
- *
27034
- * @type {State}
27035
- */
27036
- function after(code) {
27037
- if (markdownSpace(code)) {
27038
- effects.enter("blockQuotePrefixWhitespace");
27039
- effects.consume(code);
27040
- effects.exit("blockQuotePrefixWhitespace");
27041
- effects.exit("blockQuotePrefix");
27042
- return ok;
27043
- }
27044
- effects.exit("blockQuotePrefix");
27045
- return ok(code);
27046
- }
27047
- }
27048
- /**
27049
- * Start of block quote continuation.
27050
- *
27051
- * ```markdown
27052
- * | > a
27053
- * > | > b
27054
- * ^
27055
- * ```
27056
- *
27057
- * @this {TokenizeContext}
27058
- * Context.
27059
- * @type {Tokenizer}
27060
- */
27061
- function tokenizeBlockQuoteContinuation(effects, ok, nok) {
27062
- const self = this;
27063
- return contStart;
27064
- /**
27065
- * Start of block quote continuation.
27066
- *
27067
- * Also used to parse the first block quote opening.
27068
- *
27069
- * ```markdown
27070
- * | > a
27071
- * > | > b
27072
- * ^
27073
- * ```
27074
- *
27075
- * @type {State}
27076
- */
27077
- function contStart(code) {
27078
- if (markdownSpace(code)) return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
27079
- return contBefore(code);
27080
- }
27081
- /**
27082
- * At `>`, after optional whitespace.
27083
- *
27084
- * Also used to parse the first block quote opening.
27085
- *
27086
- * ```markdown
27087
- * | > a
27088
- * > | > b
27089
- * ^
27090
- * ```
27091
- *
27092
- * @type {State}
27093
- */
27094
- function contBefore(code) {
27095
- return effects.attempt(blockQuote, ok, nok)(code);
27096
- }
27097
- }
27098
- /** @type {Exiter} */
27099
- function exit(effects) {
27100
- effects.exit("blockQuote");
27101
- }
27102
- var blockQuote;
27103
- var init_block_quote = __esmMin((() => {
27104
- init_micromark_factory_space();
27105
- init_micromark_util_character();
27106
- blockQuote = {
27107
- continuation: { tokenize: tokenizeBlockQuoteContinuation },
27108
- exit,
27109
- name: "blockQuote",
27110
- tokenize: tokenizeBlockQuoteStart
27111
- };
27112
- }));
27113
- //#endregion
27114
- //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
27115
- /**
27116
- * @this {TokenizeContext}
27117
- * Context.
27118
- * @type {Tokenizer}
27119
- */
27120
- function tokenizeCharacterEscape(effects, ok, nok) {
27121
- return start;
27122
- /**
27123
- * Start of character escape.
27124
- *
27125
- * ```markdown
27126
- * > | a\*b
27127
- * ^
27128
- * ```
27129
- *
27130
- * @type {State}
27131
- */
27132
- function start(code) {
27133
- effects.enter("characterEscape");
27134
- effects.enter("escapeMarker");
27135
- effects.consume(code);
27136
- effects.exit("escapeMarker");
27137
- return inside;
27138
- }
27139
- /**
27140
- * After `\`, at punctuation.
27141
- *
27142
- * ```markdown
27143
- * > | a\*b
27144
- * ^
27145
- * ```
27146
- *
27147
- * @type {State}
27148
- */
27149
- function inside(code) {
27150
- if (asciiPunctuation(code)) {
27151
- effects.enter("characterEscapeValue");
27152
- effects.consume(code);
27153
- effects.exit("characterEscapeValue");
27154
- effects.exit("characterEscape");
27155
- return ok;
27156
- }
27157
- return nok(code);
27158
- }
27159
- }
27160
- var characterEscape;
27161
- var init_character_escape = __esmMin((() => {
27162
- init_micromark_util_character();
27163
- characterEscape = {
27164
- name: "characterEscape",
27165
- tokenize: tokenizeCharacterEscape
27166
- };
27167
- }));
27168
- //#endregion
27169
25951
  //#region ../../node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
27170
25952
  var characterEntities;
27171
25953
  var init_character_entities = __esmMin((() => {
@@ -29298,25 +28080,1333 @@ var init_character_entities = __esmMin((() => {
29298
28080
  };
29299
28081
  }));
29300
28082
  //#endregion
29301
- //#region ../../node_modules/.pnpm/decode-named-character-reference@1.2.0/node_modules/decode-named-character-reference/index.js
28083
+ //#region ../../node_modules/.pnpm/decode-named-character-reference@1.2.0/node_modules/decode-named-character-reference/index.js
28084
+ /**
28085
+ * Decode a single character reference (without the `&` or `;`).
28086
+ * You probably only need this when you’re building parsers yourself that follow
28087
+ * different rules compared to HTML.
28088
+ * This is optimized to be tiny in browsers.
28089
+ *
28090
+ * @param {string} value
28091
+ * `notin` (named), `#123` (deci), `#x123` (hexa).
28092
+ * @returns {string|false}
28093
+ * Decoded reference.
28094
+ */
28095
+ function decodeNamedCharacterReference(value) {
28096
+ return own$5.call(characterEntities, value) ? characterEntities[value] : false;
28097
+ }
28098
+ var own$5;
28099
+ var init_decode_named_character_reference = __esmMin((() => {
28100
+ init_character_entities();
28101
+ own$5 = {}.hasOwnProperty;
28102
+ }));
28103
+ //#endregion
28104
+ //#region ../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
28105
+ /**
28106
+ * Like `Array#splice`, but smarter for giant arrays.
28107
+ *
28108
+ * `Array#splice` takes all items to be inserted as individual argument which
28109
+ * causes a stack overflow in V8 when trying to insert 100k items for instance.
28110
+ *
28111
+ * Otherwise, this does not return the removed items, and takes `items` as an
28112
+ * array instead of rest parameters.
28113
+ *
28114
+ * @template {unknown} T
28115
+ * Item type.
28116
+ * @param {Array<T>} list
28117
+ * List to operate on.
28118
+ * @param {number} start
28119
+ * Index to remove/insert at (can be negative).
28120
+ * @param {number} remove
28121
+ * Number of items to remove.
28122
+ * @param {Array<T>} items
28123
+ * Items to inject into `list`.
28124
+ * @returns {undefined}
28125
+ * Nothing.
28126
+ */
28127
+ function splice(list, start, remove, items) {
28128
+ const end = list.length;
28129
+ let chunkStart = 0;
28130
+ /** @type {Array<unknown>} */
28131
+ let parameters;
28132
+ if (start < 0) start = -start > end ? 0 : end + start;
28133
+ else start = start > end ? end : start;
28134
+ remove = remove > 0 ? remove : 0;
28135
+ if (items.length < 1e4) {
28136
+ parameters = Array.from(items);
28137
+ parameters.unshift(start, remove);
28138
+ list.splice(...parameters);
28139
+ } else {
28140
+ if (remove) list.splice(start, remove);
28141
+ while (chunkStart < items.length) {
28142
+ parameters = items.slice(chunkStart, chunkStart + 1e4);
28143
+ parameters.unshift(start, 0);
28144
+ list.splice(...parameters);
28145
+ chunkStart += 1e4;
28146
+ start += 1e4;
28147
+ }
28148
+ }
28149
+ }
28150
+ /**
28151
+ * Append `items` (an array) at the end of `list` (another array).
28152
+ * When `list` was empty, returns `items` instead.
28153
+ *
28154
+ * This prevents a potentially expensive operation when `list` is empty,
28155
+ * and adds items in batches to prevent V8 from hanging.
28156
+ *
28157
+ * @template {unknown} T
28158
+ * Item type.
28159
+ * @param {Array<T>} list
28160
+ * List to operate on.
28161
+ * @param {Array<T>} items
28162
+ * Items to add to `list`.
28163
+ * @returns {Array<T>}
28164
+ * Either `list` or `items`.
28165
+ */
28166
+ function push(list, items) {
28167
+ if (list.length > 0) {
28168
+ splice(list, list.length, 0, items);
28169
+ return list;
28170
+ }
28171
+ return items;
28172
+ }
28173
+ var init_micromark_util_chunked = __esmMin((() => {}));
28174
+ //#endregion
28175
+ //#region ../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
28176
+ /**
28177
+ * Combine multiple syntax extensions into one.
28178
+ *
28179
+ * @param {ReadonlyArray<Extension>} extensions
28180
+ * List of syntax extensions.
28181
+ * @returns {NormalizedExtension}
28182
+ * A single combined extension.
28183
+ */
28184
+ function combineExtensions(extensions) {
28185
+ /** @type {NormalizedExtension} */
28186
+ const all = {};
28187
+ let index = -1;
28188
+ while (++index < extensions.length) syntaxExtension(all, extensions[index]);
28189
+ return all;
28190
+ }
28191
+ /**
28192
+ * Merge `extension` into `all`.
28193
+ *
28194
+ * @param {NormalizedExtension} all
28195
+ * Extension to merge into.
28196
+ * @param {Extension} extension
28197
+ * Extension to merge.
28198
+ * @returns {undefined}
28199
+ * Nothing.
28200
+ */
28201
+ function syntaxExtension(all, extension) {
28202
+ /** @type {keyof Extension} */
28203
+ let hook;
28204
+ for (hook in extension) {
28205
+ /** @type {Record<string, unknown>} */
28206
+ const left = (hasOwnProperty$1.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
28207
+ /** @type {Record<string, unknown> | undefined} */
28208
+ const right = extension[hook];
28209
+ /** @type {string} */
28210
+ let code;
28211
+ if (right) for (code in right) {
28212
+ if (!hasOwnProperty$1.call(left, code)) left[code] = [];
28213
+ const value = right[code];
28214
+ constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
28215
+ }
28216
+ }
28217
+ }
28218
+ /**
28219
+ * Merge `list` into `existing` (both lists of constructs).
28220
+ * Mutates `existing`.
28221
+ *
28222
+ * @param {Array<unknown>} existing
28223
+ * List of constructs to merge into.
28224
+ * @param {Array<unknown>} list
28225
+ * List of constructs to merge.
28226
+ * @returns {undefined}
28227
+ * Nothing.
28228
+ */
28229
+ function constructs(existing, list) {
28230
+ let index = -1;
28231
+ /** @type {Array<unknown>} */
28232
+ const before = [];
28233
+ while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
28234
+ splice(existing, 0, 0, before);
28235
+ }
28236
+ var hasOwnProperty$1;
28237
+ var init_micromark_util_combine_extensions = __esmMin((() => {
28238
+ init_micromark_util_chunked();
28239
+ hasOwnProperty$1 = {}.hasOwnProperty;
28240
+ }));
28241
+ //#endregion
28242
+ //#region ../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
28243
+ /**
28244
+ * Turn the number (in string form as either hexa- or plain decimal) coming from
28245
+ * a numeric character reference into a character.
28246
+ *
28247
+ * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
28248
+ * non-characters and control characters safe.
28249
+ *
28250
+ * @param {string} value
28251
+ * Value to decode.
28252
+ * @param {number} base
28253
+ * Numeric base.
28254
+ * @returns {string}
28255
+ * Character.
28256
+ */
28257
+ function decodeNumericCharacterReference(value, base) {
28258
+ const code = Number.parseInt(value, base);
28259
+ if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
28260
+ return String.fromCodePoint(code);
28261
+ }
28262
+ var init_micromark_util_decode_numeric_character_reference = __esmMin((() => {}));
28263
+ //#endregion
28264
+ //#region ../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
28265
+ /**
28266
+ * Normalize an identifier (as found in references, definitions).
28267
+ *
28268
+ * Collapses markdown whitespace, trim, and then lower- and uppercase.
28269
+ *
28270
+ * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
28271
+ * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
28272
+ * uppercase character (U+0398 (`Θ`)).
28273
+ * So, to get a canonical form, we perform both lower- and uppercase.
28274
+ *
28275
+ * Using uppercase last makes sure keys will never interact with default
28276
+ * prototypal values (such as `constructor`): nothing in the prototype of
28277
+ * `Object` is uppercase.
28278
+ *
28279
+ * @param {string} value
28280
+ * Identifier to normalize.
28281
+ * @returns {string}
28282
+ * Normalized identifier.
28283
+ */
28284
+ function normalizeIdentifier(value) {
28285
+ return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
28286
+ }
28287
+ var init_micromark_util_normalize_identifier = __esmMin((() => {}));
28288
+ //#endregion
28289
+ //#region ../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
28290
+ /**
28291
+ * Check whether a character code is an ASCII control character.
28292
+ *
28293
+ * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
28294
+ * to U+001F (US), or U+007F (DEL).
28295
+ *
28296
+ * @param {Code} code
28297
+ * Code.
28298
+ * @returns {boolean}
28299
+ * Whether it matches.
28300
+ */
28301
+ function asciiControl(code) {
28302
+ return code !== null && (code < 32 || code === 127);
28303
+ }
28304
+ /**
28305
+ * Check whether a character code is a markdown line ending.
28306
+ *
28307
+ * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
28308
+ * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
28309
+ *
28310
+ * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
28311
+ * RETURN (CR) are replaced by these virtual characters depending on whether
28312
+ * they occurred together.
28313
+ *
28314
+ * @param {Code} code
28315
+ * Code.
28316
+ * @returns {boolean}
28317
+ * Whether it matches.
28318
+ */
28319
+ function markdownLineEnding(code) {
28320
+ return code !== null && code < -2;
28321
+ }
28322
+ /**
28323
+ * Check whether a character code is a markdown line ending (see
28324
+ * `markdownLineEnding`) or markdown space (see `markdownSpace`).
28325
+ *
28326
+ * @param {Code} code
28327
+ * Code.
28328
+ * @returns {boolean}
28329
+ * Whether it matches.
28330
+ */
28331
+ function markdownLineEndingOrSpace(code) {
28332
+ return code !== null && (code < 0 || code === 32);
28333
+ }
28334
+ /**
28335
+ * Check whether a character code is a markdown space.
28336
+ *
28337
+ * A **markdown space** is the concrete character U+0020 SPACE (SP) and the
28338
+ * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
28339
+ *
28340
+ * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
28341
+ * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
28342
+ * SPACE (VS) characters, depending on the column at which the tab occurred.
28343
+ *
28344
+ * @param {Code} code
28345
+ * Code.
28346
+ * @returns {boolean}
28347
+ * Whether it matches.
28348
+ */
28349
+ function markdownSpace(code) {
28350
+ return code === -2 || code === -1 || code === 32;
28351
+ }
28352
+ /**
28353
+ * Create a code check from a regex.
28354
+ *
28355
+ * @param {RegExp} regex
28356
+ * Expression.
28357
+ * @returns {(code: Code) => boolean}
28358
+ * Check.
28359
+ */
28360
+ function regexCheck(regex) {
28361
+ return check;
28362
+ /**
28363
+ * Check whether a code matches the bound regex.
28364
+ *
28365
+ * @param {Code} code
28366
+ * Character code.
28367
+ * @returns {boolean}
28368
+ * Whether the character code matches the bound regex.
28369
+ */
28370
+ function check(code) {
28371
+ return code !== null && code > -1 && regex.test(String.fromCharCode(code));
28372
+ }
28373
+ }
28374
+ var asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace;
28375
+ var init_micromark_util_character = __esmMin((() => {
28376
+ asciiAlpha = regexCheck(/[A-Za-z]/);
28377
+ asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
28378
+ asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
28379
+ asciiDigit = regexCheck(/\d/);
28380
+ asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
28381
+ asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
28382
+ unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
28383
+ unicodeWhitespace = regexCheck(/\s/);
28384
+ }));
28385
+ //#endregion
28386
+ //#region ../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
28387
+ /**
28388
+ * Parse spaces and tabs.
28389
+ *
28390
+ * There is no `nok` parameter:
28391
+ *
28392
+ * * spaces in markdown are often optional, in which case this factory can be
28393
+ * used and `ok` will be switched to whether spaces were found or not
28394
+ * * one line ending or space can be detected with `markdownSpace(code)` right
28395
+ * before using `factorySpace`
28396
+ *
28397
+ * ###### Examples
28398
+ *
28399
+ * Where `␉` represents a tab (plus how much it expands) and `␠` represents a
28400
+ * single space.
28401
+ *
28402
+ * ```markdown
28403
+ * ␉
28404
+ * ␠␠␠␠
28405
+ * ␉␠
28406
+ * ```
28407
+ *
28408
+ * @param {Effects} effects
28409
+ * Context.
28410
+ * @param {State} ok
28411
+ * State switched to when successful.
28412
+ * @param {TokenType} type
28413
+ * Type (`' \t'`).
28414
+ * @param {number | undefined} [max=Infinity]
28415
+ * Max (exclusive).
28416
+ * @returns {State}
28417
+ * Start state.
28418
+ */
28419
+ function factorySpace(effects, ok, type, max) {
28420
+ const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
28421
+ let size = 0;
28422
+ return start;
28423
+ /** @type {State} */
28424
+ function start(code) {
28425
+ if (markdownSpace(code)) {
28426
+ effects.enter(type);
28427
+ return prefix(code);
28428
+ }
28429
+ return ok(code);
28430
+ }
28431
+ /** @type {State} */
28432
+ function prefix(code) {
28433
+ if (markdownSpace(code) && size++ < limit) {
28434
+ effects.consume(code);
28435
+ return prefix;
28436
+ }
28437
+ effects.exit(type);
28438
+ return ok(code);
28439
+ }
28440
+ }
28441
+ var init_micromark_factory_space = __esmMin((() => {
28442
+ init_micromark_util_character();
28443
+ }));
28444
+ //#endregion
28445
+ //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
28446
+ /**
28447
+ * @this {TokenizeContext}
28448
+ * Context.
28449
+ * @type {Initializer}
28450
+ * Content.
28451
+ */
28452
+ function initializeContent(effects) {
28453
+ const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
28454
+ /** @type {Token} */
28455
+ let previous;
28456
+ return contentStart;
28457
+ /** @type {State} */
28458
+ function afterContentStartConstruct(code) {
28459
+ if (code === null) {
28460
+ effects.consume(code);
28461
+ return;
28462
+ }
28463
+ effects.enter("lineEnding");
28464
+ effects.consume(code);
28465
+ effects.exit("lineEnding");
28466
+ return factorySpace(effects, contentStart, "linePrefix");
28467
+ }
28468
+ /** @type {State} */
28469
+ function paragraphInitial(code) {
28470
+ effects.enter("paragraph");
28471
+ return lineStart(code);
28472
+ }
28473
+ /** @type {State} */
28474
+ function lineStart(code) {
28475
+ const token = effects.enter("chunkText", {
28476
+ contentType: "text",
28477
+ previous
28478
+ });
28479
+ if (previous) previous.next = token;
28480
+ previous = token;
28481
+ return data(code);
28482
+ }
28483
+ /** @type {State} */
28484
+ function data(code) {
28485
+ if (code === null) {
28486
+ effects.exit("chunkText");
28487
+ effects.exit("paragraph");
28488
+ effects.consume(code);
28489
+ return;
28490
+ }
28491
+ if (markdownLineEnding(code)) {
28492
+ effects.consume(code);
28493
+ effects.exit("chunkText");
28494
+ return lineStart;
28495
+ }
28496
+ effects.consume(code);
28497
+ return data;
28498
+ }
28499
+ }
28500
+ var content$1;
28501
+ var init_content$1 = __esmMin((() => {
28502
+ init_micromark_factory_space();
28503
+ init_micromark_util_character();
28504
+ content$1 = { tokenize: initializeContent };
28505
+ }));
28506
+ //#endregion
28507
+ //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
28508
+ /**
28509
+ * @this {TokenizeContext}
28510
+ * Self.
28511
+ * @type {Initializer}
28512
+ * Initializer.
28513
+ */
28514
+ function initializeDocument(effects) {
28515
+ const self = this;
28516
+ /** @type {Array<StackItem>} */
28517
+ const stack = [];
28518
+ let continued = 0;
28519
+ /** @type {TokenizeContext | undefined} */
28520
+ let childFlow;
28521
+ /** @type {Token | undefined} */
28522
+ let childToken;
28523
+ /** @type {number} */
28524
+ let lineStartOffset;
28525
+ return start;
28526
+ /** @type {State} */
28527
+ function start(code) {
28528
+ if (continued < stack.length) {
28529
+ const item = stack[continued];
28530
+ self.containerState = item[1];
28531
+ return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);
28532
+ }
28533
+ return checkNewContainers(code);
28534
+ }
28535
+ /** @type {State} */
28536
+ function documentContinue(code) {
28537
+ continued++;
28538
+ if (self.containerState._closeFlow) {
28539
+ self.containerState._closeFlow = void 0;
28540
+ if (childFlow) closeFlow();
28541
+ const indexBeforeExits = self.events.length;
28542
+ let indexBeforeFlow = indexBeforeExits;
28543
+ /** @type {Point | undefined} */
28544
+ let point;
28545
+ while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
28546
+ point = self.events[indexBeforeFlow][1].end;
28547
+ break;
28548
+ }
28549
+ exitContainers(continued);
28550
+ let index = indexBeforeExits;
28551
+ while (index < self.events.length) {
28552
+ self.events[index][1].end = { ...point };
28553
+ index++;
28554
+ }
28555
+ splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
28556
+ self.events.length = index;
28557
+ return checkNewContainers(code);
28558
+ }
28559
+ return start(code);
28560
+ }
28561
+ /** @type {State} */
28562
+ function checkNewContainers(code) {
28563
+ if (continued === stack.length) {
28564
+ if (!childFlow) return documentContinued(code);
28565
+ if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) return flowStart(code);
28566
+ self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);
28567
+ }
28568
+ self.containerState = {};
28569
+ return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);
28570
+ }
28571
+ /** @type {State} */
28572
+ function thereIsANewContainer(code) {
28573
+ if (childFlow) closeFlow();
28574
+ exitContainers(continued);
28575
+ return documentContinued(code);
28576
+ }
28577
+ /** @type {State} */
28578
+ function thereIsNoNewContainer(code) {
28579
+ self.parser.lazy[self.now().line] = continued !== stack.length;
28580
+ lineStartOffset = self.now().offset;
28581
+ return flowStart(code);
28582
+ }
28583
+ /** @type {State} */
28584
+ function documentContinued(code) {
28585
+ self.containerState = {};
28586
+ return effects.attempt(containerConstruct, containerContinue, flowStart)(code);
28587
+ }
28588
+ /** @type {State} */
28589
+ function containerContinue(code) {
28590
+ continued++;
28591
+ stack.push([self.currentConstruct, self.containerState]);
28592
+ return documentContinued(code);
28593
+ }
28594
+ /** @type {State} */
28595
+ function flowStart(code) {
28596
+ if (code === null) {
28597
+ if (childFlow) closeFlow();
28598
+ exitContainers(0);
28599
+ effects.consume(code);
28600
+ return;
28601
+ }
28602
+ childFlow = childFlow || self.parser.flow(self.now());
28603
+ effects.enter("chunkFlow", {
28604
+ _tokenizer: childFlow,
28605
+ contentType: "flow",
28606
+ previous: childToken
28607
+ });
28608
+ return flowContinue(code);
28609
+ }
28610
+ /** @type {State} */
28611
+ function flowContinue(code) {
28612
+ if (code === null) {
28613
+ writeToChild(effects.exit("chunkFlow"), true);
28614
+ exitContainers(0);
28615
+ effects.consume(code);
28616
+ return;
28617
+ }
28618
+ if (markdownLineEnding(code)) {
28619
+ effects.consume(code);
28620
+ writeToChild(effects.exit("chunkFlow"));
28621
+ continued = 0;
28622
+ self.interrupt = void 0;
28623
+ return start;
28624
+ }
28625
+ effects.consume(code);
28626
+ return flowContinue;
28627
+ }
28628
+ /**
28629
+ * @param {Token} token
28630
+ * Token.
28631
+ * @param {boolean | undefined} [endOfFile]
28632
+ * Whether the token is at the end of the file (default: `false`).
28633
+ * @returns {undefined}
28634
+ * Nothing.
28635
+ */
28636
+ function writeToChild(token, endOfFile) {
28637
+ const stream = self.sliceStream(token);
28638
+ if (endOfFile) stream.push(null);
28639
+ token.previous = childToken;
28640
+ if (childToken) childToken.next = token;
28641
+ childToken = token;
28642
+ childFlow.defineSkip(token.start);
28643
+ childFlow.write(stream);
28644
+ if (self.parser.lazy[token.start.line]) {
28645
+ let index = childFlow.events.length;
28646
+ while (index--) if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) return;
28647
+ const indexBeforeExits = self.events.length;
28648
+ let indexBeforeFlow = indexBeforeExits;
28649
+ /** @type {boolean | undefined} */
28650
+ let seen;
28651
+ /** @type {Point | undefined} */
28652
+ let point;
28653
+ while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
28654
+ if (seen) {
28655
+ point = self.events[indexBeforeFlow][1].end;
28656
+ break;
28657
+ }
28658
+ seen = true;
28659
+ }
28660
+ exitContainers(continued);
28661
+ index = indexBeforeExits;
28662
+ while (index < self.events.length) {
28663
+ self.events[index][1].end = { ...point };
28664
+ index++;
28665
+ }
28666
+ splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
28667
+ self.events.length = index;
28668
+ }
28669
+ }
28670
+ /**
28671
+ * @param {number} size
28672
+ * Size.
28673
+ * @returns {undefined}
28674
+ * Nothing.
28675
+ */
28676
+ function exitContainers(size) {
28677
+ let index = stack.length;
28678
+ while (index-- > size) {
28679
+ const entry = stack[index];
28680
+ self.containerState = entry[1];
28681
+ entry[0].exit.call(self, effects);
28682
+ }
28683
+ stack.length = size;
28684
+ }
28685
+ function closeFlow() {
28686
+ childFlow.write([null]);
28687
+ childToken = void 0;
28688
+ childFlow = void 0;
28689
+ self.containerState._closeFlow = void 0;
28690
+ }
28691
+ }
28692
+ /**
28693
+ * @this {TokenizeContext}
28694
+ * Context.
28695
+ * @type {Tokenizer}
28696
+ * Tokenizer.
28697
+ */
28698
+ function tokenizeContainer(effects, ok, nok) {
28699
+ return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
28700
+ }
28701
+ var document$1, containerConstruct;
28702
+ var init_document = __esmMin((() => {
28703
+ init_micromark_factory_space();
28704
+ init_micromark_util_character();
28705
+ init_micromark_util_chunked();
28706
+ document$1 = { tokenize: initializeDocument };
28707
+ containerConstruct = { tokenize: tokenizeContainer };
28708
+ }));
28709
+ //#endregion
28710
+ //#region ../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
28711
+ /**
28712
+ * Classify whether a code represents whitespace, punctuation, or something
28713
+ * else.
28714
+ *
28715
+ * Used for attention (emphasis, strong), whose sequences can open or close
28716
+ * based on the class of surrounding characters.
28717
+ *
28718
+ * > 👉 **Note**: eof (`null`) is seen as whitespace.
28719
+ *
28720
+ * @param {Code} code
28721
+ * Code.
28722
+ * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
28723
+ * Group.
28724
+ */
28725
+ function classifyCharacter(code) {
28726
+ if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return 1;
28727
+ if (unicodePunctuation(code)) return 2;
28728
+ }
28729
+ var init_micromark_util_classify_character = __esmMin((() => {
28730
+ init_micromark_util_character();
28731
+ }));
28732
+ //#endregion
28733
+ //#region ../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
28734
+ /**
28735
+ * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
28736
+ */
28737
+ /**
28738
+ * Call all `resolveAll`s.
28739
+ *
28740
+ * @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
28741
+ * List of constructs, optionally with `resolveAll`s.
28742
+ * @param {Array<Event>} events
28743
+ * List of events.
28744
+ * @param {TokenizeContext} context
28745
+ * Context used by `tokenize`.
28746
+ * @returns {Array<Event>}
28747
+ * Changed events.
28748
+ */
28749
+ function resolveAll(constructs, events, context) {
28750
+ /** @type {Array<Resolver>} */
28751
+ const called = [];
28752
+ let index = -1;
28753
+ while (++index < constructs.length) {
28754
+ const resolve = constructs[index].resolveAll;
28755
+ if (resolve && !called.includes(resolve)) {
28756
+ events = resolve(events, context);
28757
+ called.push(resolve);
28758
+ }
28759
+ }
28760
+ return events;
28761
+ }
28762
+ var init_micromark_util_resolve_all = __esmMin((() => {}));
28763
+ //#endregion
28764
+ //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
28765
+ /**
28766
+ * Take all events and resolve attention to emphasis or strong.
28767
+ *
28768
+ * @type {Resolver}
28769
+ */
28770
+ function resolveAllAttention(events, context) {
28771
+ let index = -1;
28772
+ /** @type {number} */
28773
+ let open;
28774
+ /** @type {Token} */
28775
+ let group;
28776
+ /** @type {Token} */
28777
+ let text;
28778
+ /** @type {Token} */
28779
+ let openingSequence;
28780
+ /** @type {Token} */
28781
+ let closingSequence;
28782
+ /** @type {number} */
28783
+ let use;
28784
+ /** @type {Array<Event>} */
28785
+ let nextEvents;
28786
+ /** @type {number} */
28787
+ let offset;
28788
+ while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
28789
+ open = index;
28790
+ while (open--) if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
28791
+ if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) continue;
28792
+ use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
28793
+ const start = { ...events[open][1].end };
28794
+ const end = { ...events[index][1].start };
28795
+ movePoint(start, -use);
28796
+ movePoint(end, use);
28797
+ openingSequence = {
28798
+ type: use > 1 ? "strongSequence" : "emphasisSequence",
28799
+ start,
28800
+ end: { ...events[open][1].end }
28801
+ };
28802
+ closingSequence = {
28803
+ type: use > 1 ? "strongSequence" : "emphasisSequence",
28804
+ start: { ...events[index][1].start },
28805
+ end
28806
+ };
28807
+ text = {
28808
+ type: use > 1 ? "strongText" : "emphasisText",
28809
+ start: { ...events[open][1].end },
28810
+ end: { ...events[index][1].start }
28811
+ };
28812
+ group = {
28813
+ type: use > 1 ? "strong" : "emphasis",
28814
+ start: { ...openingSequence.start },
28815
+ end: { ...closingSequence.end }
28816
+ };
28817
+ events[open][1].end = { ...openingSequence.start };
28818
+ events[index][1].start = { ...closingSequence.end };
28819
+ nextEvents = [];
28820
+ if (events[open][1].end.offset - events[open][1].start.offset) nextEvents = push(nextEvents, [[
28821
+ "enter",
28822
+ events[open][1],
28823
+ context
28824
+ ], [
28825
+ "exit",
28826
+ events[open][1],
28827
+ context
28828
+ ]]);
28829
+ nextEvents = push(nextEvents, [
28830
+ [
28831
+ "enter",
28832
+ group,
28833
+ context
28834
+ ],
28835
+ [
28836
+ "enter",
28837
+ openingSequence,
28838
+ context
28839
+ ],
28840
+ [
28841
+ "exit",
28842
+ openingSequence,
28843
+ context
28844
+ ],
28845
+ [
28846
+ "enter",
28847
+ text,
28848
+ context
28849
+ ]
28850
+ ]);
28851
+ nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
28852
+ nextEvents = push(nextEvents, [
28853
+ [
28854
+ "exit",
28855
+ text,
28856
+ context
28857
+ ],
28858
+ [
28859
+ "enter",
28860
+ closingSequence,
28861
+ context
28862
+ ],
28863
+ [
28864
+ "exit",
28865
+ closingSequence,
28866
+ context
28867
+ ],
28868
+ [
28869
+ "exit",
28870
+ group,
28871
+ context
28872
+ ]
28873
+ ]);
28874
+ if (events[index][1].end.offset - events[index][1].start.offset) {
28875
+ offset = 2;
28876
+ nextEvents = push(nextEvents, [[
28877
+ "enter",
28878
+ events[index][1],
28879
+ context
28880
+ ], [
28881
+ "exit",
28882
+ events[index][1],
28883
+ context
28884
+ ]]);
28885
+ } else offset = 0;
28886
+ splice(events, open - 1, index - open + 3, nextEvents);
28887
+ index = open + nextEvents.length - offset - 2;
28888
+ break;
28889
+ }
28890
+ }
28891
+ index = -1;
28892
+ while (++index < events.length) if (events[index][1].type === "attentionSequence") events[index][1].type = "data";
28893
+ return events;
28894
+ }
28895
+ /**
28896
+ * @this {TokenizeContext}
28897
+ * Context.
28898
+ * @type {Tokenizer}
28899
+ */
28900
+ function tokenizeAttention(effects, ok) {
28901
+ const attentionMarkers = this.parser.constructs.attentionMarkers.null;
28902
+ const previous = this.previous;
28903
+ const before = classifyCharacter(previous);
28904
+ /** @type {NonNullable<Code>} */
28905
+ let marker;
28906
+ return start;
28907
+ /**
28908
+ * Before a sequence.
28909
+ *
28910
+ * ```markdown
28911
+ * > | **
28912
+ * ^
28913
+ * ```
28914
+ *
28915
+ * @type {State}
28916
+ */
28917
+ function start(code) {
28918
+ marker = code;
28919
+ effects.enter("attentionSequence");
28920
+ return inside(code);
28921
+ }
28922
+ /**
28923
+ * In a sequence.
28924
+ *
28925
+ * ```markdown
28926
+ * > | **
28927
+ * ^^
28928
+ * ```
28929
+ *
28930
+ * @type {State}
28931
+ */
28932
+ function inside(code) {
28933
+ if (code === marker) {
28934
+ effects.consume(code);
28935
+ return inside;
28936
+ }
28937
+ const token = effects.exit("attentionSequence");
28938
+ const after = classifyCharacter(code);
28939
+ const open = !after || after === 2 && before || attentionMarkers.includes(code);
28940
+ const close = !before || before === 2 && after || attentionMarkers.includes(previous);
28941
+ token._open = Boolean(marker === 42 ? open : open && (before || !close));
28942
+ token._close = Boolean(marker === 42 ? close : close && (after || !open));
28943
+ return ok(code);
28944
+ }
28945
+ }
28946
+ /**
28947
+ * Move a point a bit.
28948
+ *
28949
+ * Note: `move` only works inside lines! It’s not possible to move past other
28950
+ * chunks (replacement characters, tabs, or line endings).
28951
+ *
28952
+ * @param {Point} point
28953
+ * Point.
28954
+ * @param {number} offset
28955
+ * Amount to move.
28956
+ * @returns {undefined}
28957
+ * Nothing.
28958
+ */
28959
+ function movePoint(point, offset) {
28960
+ point.column += offset;
28961
+ point.offset += offset;
28962
+ point._bufferIndex += offset;
28963
+ }
28964
+ var attention;
28965
+ var init_attention = __esmMin((() => {
28966
+ init_micromark_util_chunked();
28967
+ init_micromark_util_classify_character();
28968
+ init_micromark_util_resolve_all();
28969
+ attention = {
28970
+ name: "attention",
28971
+ resolveAll: resolveAllAttention,
28972
+ tokenize: tokenizeAttention
28973
+ };
28974
+ }));
28975
+ //#endregion
28976
+ //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
29302
28977
  /**
29303
- * Decode a single character reference (without the `&` or `;`).
29304
- * You probably only need this when you’re building parsers yourself that follow
29305
- * different rules compared to HTML.
29306
- * This is optimized to be tiny in browsers.
28978
+ * @this {TokenizeContext}
28979
+ * Context.
28980
+ * @type {Tokenizer}
28981
+ */
28982
+ function tokenizeAutolink(effects, ok, nok) {
28983
+ let size = 0;
28984
+ return start;
28985
+ /**
28986
+ * Start of an autolink.
28987
+ *
28988
+ * ```markdown
28989
+ * > | a<https://example.com>b
28990
+ * ^
28991
+ * > | a<user@example.com>b
28992
+ * ^
28993
+ * ```
28994
+ *
28995
+ * @type {State}
28996
+ */
28997
+ function start(code) {
28998
+ effects.enter("autolink");
28999
+ effects.enter("autolinkMarker");
29000
+ effects.consume(code);
29001
+ effects.exit("autolinkMarker");
29002
+ effects.enter("autolinkProtocol");
29003
+ return open;
29004
+ }
29005
+ /**
29006
+ * After `<`, at protocol or atext.
29007
+ *
29008
+ * ```markdown
29009
+ * > | a<https://example.com>b
29010
+ * ^
29011
+ * > | a<user@example.com>b
29012
+ * ^
29013
+ * ```
29014
+ *
29015
+ * @type {State}
29016
+ */
29017
+ function open(code) {
29018
+ if (asciiAlpha(code)) {
29019
+ effects.consume(code);
29020
+ return schemeOrEmailAtext;
29021
+ }
29022
+ if (code === 64) return nok(code);
29023
+ return emailAtext(code);
29024
+ }
29025
+ /**
29026
+ * At second byte of protocol or atext.
29027
+ *
29028
+ * ```markdown
29029
+ * > | a<https://example.com>b
29030
+ * ^
29031
+ * > | a<user@example.com>b
29032
+ * ^
29033
+ * ```
29034
+ *
29035
+ * @type {State}
29036
+ */
29037
+ function schemeOrEmailAtext(code) {
29038
+ if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
29039
+ size = 1;
29040
+ return schemeInsideOrEmailAtext(code);
29041
+ }
29042
+ return emailAtext(code);
29043
+ }
29044
+ /**
29045
+ * In ambiguous protocol or atext.
29046
+ *
29047
+ * ```markdown
29048
+ * > | a<https://example.com>b
29049
+ * ^
29050
+ * > | a<user@example.com>b
29051
+ * ^
29052
+ * ```
29053
+ *
29054
+ * @type {State}
29055
+ */
29056
+ function schemeInsideOrEmailAtext(code) {
29057
+ if (code === 58) {
29058
+ effects.consume(code);
29059
+ size = 0;
29060
+ return urlInside;
29061
+ }
29062
+ if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
29063
+ effects.consume(code);
29064
+ return schemeInsideOrEmailAtext;
29065
+ }
29066
+ size = 0;
29067
+ return emailAtext(code);
29068
+ }
29069
+ /**
29070
+ * After protocol, in URL.
29071
+ *
29072
+ * ```markdown
29073
+ * > | a<https://example.com>b
29074
+ * ^
29075
+ * ```
29076
+ *
29077
+ * @type {State}
29078
+ */
29079
+ function urlInside(code) {
29080
+ if (code === 62) {
29081
+ effects.exit("autolinkProtocol");
29082
+ effects.enter("autolinkMarker");
29083
+ effects.consume(code);
29084
+ effects.exit("autolinkMarker");
29085
+ effects.exit("autolink");
29086
+ return ok;
29087
+ }
29088
+ if (code === null || code === 32 || code === 60 || asciiControl(code)) return nok(code);
29089
+ effects.consume(code);
29090
+ return urlInside;
29091
+ }
29092
+ /**
29093
+ * In email atext.
29094
+ *
29095
+ * ```markdown
29096
+ * > | a<user.name@example.com>b
29097
+ * ^
29098
+ * ```
29099
+ *
29100
+ * @type {State}
29101
+ */
29102
+ function emailAtext(code) {
29103
+ if (code === 64) {
29104
+ effects.consume(code);
29105
+ return emailAtSignOrDot;
29106
+ }
29107
+ if (asciiAtext(code)) {
29108
+ effects.consume(code);
29109
+ return emailAtext;
29110
+ }
29111
+ return nok(code);
29112
+ }
29113
+ /**
29114
+ * In label, after at-sign or dot.
29115
+ *
29116
+ * ```markdown
29117
+ * > | a<user.name@example.com>b
29118
+ * ^ ^
29119
+ * ```
29120
+ *
29121
+ * @type {State}
29122
+ */
29123
+ function emailAtSignOrDot(code) {
29124
+ return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
29125
+ }
29126
+ /**
29127
+ * In label, where `.` and `>` are allowed.
29128
+ *
29129
+ * ```markdown
29130
+ * > | a<user.name@example.com>b
29131
+ * ^
29132
+ * ```
29133
+ *
29134
+ * @type {State}
29135
+ */
29136
+ function emailLabel(code) {
29137
+ if (code === 46) {
29138
+ effects.consume(code);
29139
+ size = 0;
29140
+ return emailAtSignOrDot;
29141
+ }
29142
+ if (code === 62) {
29143
+ effects.exit("autolinkProtocol").type = "autolinkEmail";
29144
+ effects.enter("autolinkMarker");
29145
+ effects.consume(code);
29146
+ effects.exit("autolinkMarker");
29147
+ effects.exit("autolink");
29148
+ return ok;
29149
+ }
29150
+ return emailValue(code);
29151
+ }
29152
+ /**
29153
+ * In label, where `.` and `>` are *not* allowed.
29154
+ *
29155
+ * Though, this is also used in `emailLabel` to parse other values.
29156
+ *
29157
+ * ```markdown
29158
+ * > | a<user.name@ex-ample.com>b
29159
+ * ^
29160
+ * ```
29161
+ *
29162
+ * @type {State}
29163
+ */
29164
+ function emailValue(code) {
29165
+ if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
29166
+ const next = code === 45 ? emailValue : emailLabel;
29167
+ effects.consume(code);
29168
+ return next;
29169
+ }
29170
+ return nok(code);
29171
+ }
29172
+ }
29173
+ var autolink;
29174
+ var init_autolink = __esmMin((() => {
29175
+ init_micromark_util_character();
29176
+ autolink = {
29177
+ name: "autolink",
29178
+ tokenize: tokenizeAutolink
29179
+ };
29180
+ }));
29181
+ //#endregion
29182
+ //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
29183
+ /**
29184
+ * @this {TokenizeContext}
29185
+ * Context.
29186
+ * @type {Tokenizer}
29187
+ */
29188
+ function tokenizeBlankLine(effects, ok, nok) {
29189
+ return start;
29190
+ /**
29191
+ * Start of blank line.
29192
+ *
29193
+ * > 👉 **Note**: `␠` represents a space character.
29194
+ *
29195
+ * ```markdown
29196
+ * > | ␠␠␊
29197
+ * ^
29198
+ * > | ␊
29199
+ * ^
29200
+ * ```
29201
+ *
29202
+ * @type {State}
29203
+ */
29204
+ function start(code) {
29205
+ return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
29206
+ }
29207
+ /**
29208
+ * At eof/eol, after optional whitespace.
29209
+ *
29210
+ * > 👉 **Note**: `␠` represents a space character.
29211
+ *
29212
+ * ```markdown
29213
+ * > | ␠␠␊
29214
+ * ^
29215
+ * > | ␊
29216
+ * ^
29217
+ * ```
29218
+ *
29219
+ * @type {State}
29220
+ */
29221
+ function after(code) {
29222
+ return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
29223
+ }
29224
+ }
29225
+ var blankLine;
29226
+ var init_blank_line = __esmMin((() => {
29227
+ init_micromark_factory_space();
29228
+ init_micromark_util_character();
29229
+ blankLine = {
29230
+ partial: true,
29231
+ tokenize: tokenizeBlankLine
29232
+ };
29233
+ }));
29234
+ //#endregion
29235
+ //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
29236
+ /**
29237
+ * @this {TokenizeContext}
29238
+ * Context.
29239
+ * @type {Tokenizer}
29240
+ */
29241
+ function tokenizeBlockQuoteStart(effects, ok, nok) {
29242
+ const self = this;
29243
+ return start;
29244
+ /**
29245
+ * Start of block quote.
29246
+ *
29247
+ * ```markdown
29248
+ * > | > a
29249
+ * ^
29250
+ * ```
29251
+ *
29252
+ * @type {State}
29253
+ */
29254
+ function start(code) {
29255
+ if (code === 62) {
29256
+ const state = self.containerState;
29257
+ if (!state.open) {
29258
+ effects.enter("blockQuote", { _container: true });
29259
+ state.open = true;
29260
+ }
29261
+ effects.enter("blockQuotePrefix");
29262
+ effects.enter("blockQuoteMarker");
29263
+ effects.consume(code);
29264
+ effects.exit("blockQuoteMarker");
29265
+ return after;
29266
+ }
29267
+ return nok(code);
29268
+ }
29269
+ /**
29270
+ * After `>`, before optional whitespace.
29271
+ *
29272
+ * ```markdown
29273
+ * > | > a
29274
+ * ^
29275
+ * ```
29276
+ *
29277
+ * @type {State}
29278
+ */
29279
+ function after(code) {
29280
+ if (markdownSpace(code)) {
29281
+ effects.enter("blockQuotePrefixWhitespace");
29282
+ effects.consume(code);
29283
+ effects.exit("blockQuotePrefixWhitespace");
29284
+ effects.exit("blockQuotePrefix");
29285
+ return ok;
29286
+ }
29287
+ effects.exit("blockQuotePrefix");
29288
+ return ok(code);
29289
+ }
29290
+ }
29291
+ /**
29292
+ * Start of block quote continuation.
29307
29293
  *
29308
- * @param {string} value
29309
- * `notin` (named), `#123` (deci), `#x123` (hexa).
29310
- * @returns {string|false}
29311
- * Decoded reference.
29294
+ * ```markdown
29295
+ * | > a
29296
+ * > | > b
29297
+ * ^
29298
+ * ```
29299
+ *
29300
+ * @this {TokenizeContext}
29301
+ * Context.
29302
+ * @type {Tokenizer}
29312
29303
  */
29313
- function decodeNamedCharacterReference(value) {
29314
- return own$5.call(characterEntities, value) ? characterEntities[value] : false;
29304
+ function tokenizeBlockQuoteContinuation(effects, ok, nok) {
29305
+ const self = this;
29306
+ return contStart;
29307
+ /**
29308
+ * Start of block quote continuation.
29309
+ *
29310
+ * Also used to parse the first block quote opening.
29311
+ *
29312
+ * ```markdown
29313
+ * | > a
29314
+ * > | > b
29315
+ * ^
29316
+ * ```
29317
+ *
29318
+ * @type {State}
29319
+ */
29320
+ function contStart(code) {
29321
+ if (markdownSpace(code)) return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
29322
+ return contBefore(code);
29323
+ }
29324
+ /**
29325
+ * At `>`, after optional whitespace.
29326
+ *
29327
+ * Also used to parse the first block quote opening.
29328
+ *
29329
+ * ```markdown
29330
+ * | > a
29331
+ * > | > b
29332
+ * ^
29333
+ * ```
29334
+ *
29335
+ * @type {State}
29336
+ */
29337
+ function contBefore(code) {
29338
+ return effects.attempt(blockQuote, ok, nok)(code);
29339
+ }
29315
29340
  }
29316
- var own$5;
29317
- var init_decode_named_character_reference = __esmMin((() => {
29318
- init_character_entities();
29319
- own$5 = {}.hasOwnProperty;
29341
+ /** @type {Exiter} */
29342
+ function exit(effects) {
29343
+ effects.exit("blockQuote");
29344
+ }
29345
+ var blockQuote;
29346
+ var init_block_quote = __esmMin((() => {
29347
+ init_micromark_factory_space();
29348
+ init_micromark_util_character();
29349
+ blockQuote = {
29350
+ continuation: { tokenize: tokenizeBlockQuoteContinuation },
29351
+ exit,
29352
+ name: "blockQuote",
29353
+ tokenize: tokenizeBlockQuoteStart
29354
+ };
29355
+ }));
29356
+ //#endregion
29357
+ //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
29358
+ /**
29359
+ * @this {TokenizeContext}
29360
+ * Context.
29361
+ * @type {Tokenizer}
29362
+ */
29363
+ function tokenizeCharacterEscape(effects, ok, nok) {
29364
+ return start;
29365
+ /**
29366
+ * Start of character escape.
29367
+ *
29368
+ * ```markdown
29369
+ * > | a\*b
29370
+ * ^
29371
+ * ```
29372
+ *
29373
+ * @type {State}
29374
+ */
29375
+ function start(code) {
29376
+ effects.enter("characterEscape");
29377
+ effects.enter("escapeMarker");
29378
+ effects.consume(code);
29379
+ effects.exit("escapeMarker");
29380
+ return inside;
29381
+ }
29382
+ /**
29383
+ * After `\`, at punctuation.
29384
+ *
29385
+ * ```markdown
29386
+ * > | a\*b
29387
+ * ^
29388
+ * ```
29389
+ *
29390
+ * @type {State}
29391
+ */
29392
+ function inside(code) {
29393
+ if (asciiPunctuation(code)) {
29394
+ effects.enter("characterEscapeValue");
29395
+ effects.consume(code);
29396
+ effects.exit("characterEscapeValue");
29397
+ effects.exit("characterEscape");
29398
+ return ok;
29399
+ }
29400
+ return nok(code);
29401
+ }
29402
+ }
29403
+ var characterEscape;
29404
+ var init_character_escape = __esmMin((() => {
29405
+ init_micromark_util_character();
29406
+ characterEscape = {
29407
+ name: "characterEscape",
29408
+ tokenize: tokenizeCharacterEscape
29409
+ };
29320
29410
  }));
29321
29411
  //#endregion
29322
29412
  //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js
@@ -31154,31 +31244,6 @@ var init_micromark_factory_whitespace = __esmMin((() => {
31154
31244
  init_micromark_util_character();
31155
31245
  }));
31156
31246
  //#endregion
31157
- //#region ../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
31158
- /**
31159
- * Normalize an identifier (as found in references, definitions).
31160
- *
31161
- * Collapses markdown whitespace, trim, and then lower- and uppercase.
31162
- *
31163
- * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
31164
- * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
31165
- * uppercase character (U+0398 (`Θ`)).
31166
- * So, to get a canonical form, we perform both lower- and uppercase.
31167
- *
31168
- * Using uppercase last makes sure keys will never interact with default
31169
- * prototypal values (such as `constructor`): nothing in the prototype of
31170
- * `Object` is uppercase.
31171
- *
31172
- * @param {string} value
31173
- * Identifier to normalize.
31174
- * @returns {string}
31175
- * Normalized identifier.
31176
- */
31177
- function normalizeIdentifier(value) {
31178
- return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
31179
- }
31180
- var init_micromark_util_normalize_identifier = __esmMin((() => {}));
31181
- //#endregion
31182
31247
  //#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.js
31183
31248
  /**
31184
31249
  * @this {TokenizeContext}
@@ -34998,33 +35063,14 @@ var init_preprocess = __esmMin((() => {
34998
35063
  //#endregion
34999
35064
  //#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/index.js
35000
35065
  var init_micromark = __esmMin((() => {
35066
+ init_decode_named_character_reference();
35067
+ init_micromark_util_combine_extensions();
35068
+ init_micromark_util_character();
35001
35069
  init_parse();
35002
35070
  init_postprocess();
35003
35071
  init_preprocess();
35004
35072
  }));
35005
35073
  //#endregion
35006
- //#region ../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
35007
- /**
35008
- * Turn the number (in string form as either hexa- or plain decimal) coming from
35009
- * a numeric character reference into a character.
35010
- *
35011
- * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
35012
- * non-characters and control characters safe.
35013
- *
35014
- * @param {string} value
35015
- * Value to decode.
35016
- * @param {number} base
35017
- * Numeric base.
35018
- * @returns {string}
35019
- * Character.
35020
- */
35021
- function decodeNumericCharacterReference(value, base) {
35022
- const code = Number.parseInt(value, base);
35023
- if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
35024
- return String.fromCodePoint(code);
35025
- }
35026
- var init_micromark_util_decode_numeric_character_reference = __esmMin((() => {}));
35027
- //#endregion
35028
35074
  //#region ../../node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js
35029
35075
  /**
35030
35076
  * Decode markdown strings (which occur in places such as fenced code info
@@ -38578,7 +38624,8 @@ var init_acorn = __esmMin((() => {
38578
38624
  this.binop = conf.binop || null;
38579
38625
  this.updateContext = null;
38580
38626
  };
38581
- beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true };
38627
+ beforeExpr = { beforeExpr: true };
38628
+ startsExpr = { startsExpr: true };
38582
38629
  keywords = {};
38583
38630
  types$1 = {
38584
38631
  num: new TokenType("num", startsExpr),
@@ -38763,8 +38810,24 @@ var init_acorn = __esmMin((() => {
38763
38810
  preserveParens: false
38764
38811
  };
38765
38812
  warnedAboutEcmaVersion = false;
38766
- SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_SWITCH = 1024, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
38767
- BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5;
38813
+ SCOPE_TOP = 1;
38814
+ SCOPE_FUNCTION = 2;
38815
+ SCOPE_ASYNC = 4;
38816
+ SCOPE_GENERATOR = 8;
38817
+ SCOPE_ARROW = 16;
38818
+ SCOPE_SIMPLE_CATCH = 32;
38819
+ SCOPE_SUPER = 64;
38820
+ SCOPE_DIRECT_SUPER = 128;
38821
+ SCOPE_CLASS_STATIC_BLOCK = 256;
38822
+ SCOPE_CLASS_FIELD_INIT = 512;
38823
+ SCOPE_SWITCH = 1024;
38824
+ SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
38825
+ BIND_NONE = 0;
38826
+ BIND_VAR = 1;
38827
+ BIND_LEXICAL = 2;
38828
+ BIND_FUNCTION = 3;
38829
+ BIND_SIMPLE_CATCH = 4;
38830
+ BIND_OUTSIDE = 5;
38768
38831
  Parser = function Parser(options, input, startPos) {
38769
38832
  this.options = options = getOptions(options);
38770
38833
  this.sourceFile = options.sourceFile;
@@ -38998,7 +39061,8 @@ var init_acorn = __esmMin((() => {
38998
39061
  node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
38999
39062
  return this.finishNode(node, "Program");
39000
39063
  };
39001
- loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
39064
+ loopLabel = { kind: "loop" };
39065
+ switchLabel = { kind: "switch" };
39002
39066
  pp$8.isLet = function(context) {
39003
39067
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
39004
39068
  skipWhiteSpace.lastIndex = this.pos;
@@ -39419,7 +39483,9 @@ var init_acorn = __esmMin((() => {
39419
39483
  decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
39420
39484
  this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
39421
39485
  };
39422
- FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
39486
+ FUNC_STATEMENT = 1;
39487
+ FUNC_HANGING_STATEMENT = 2;
39488
+ FUNC_NULLABLE_ID = 4;
39423
39489
  pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
39424
39490
  this.initFunction(node);
39425
39491
  if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
@@ -52657,6 +52723,7 @@ var init_lib$3 = __esmMin((() => {
52657
52723
  //#region ../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/index.js
52658
52724
  var init_mdast_util_to_markdown = __esmMin((() => {
52659
52725
  init_lib$3();
52726
+ init_handle();
52660
52727
  }));
52661
52728
  //#endregion
52662
52729
  //#region ../../node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js
@@ -53430,7 +53497,8 @@ const parseMdxWithDeps = (source, deps) => deps.unified().use(deps.remarkParse).
53430
53497
  /** Parse MDX (with frontmatter) into mdast. Exposed so callers like
53431
53498
  * `fetchGuideFrontmatters` don't need to re-load remark themselves. */
53432
53499
  const parseMdx = async (source) => {
53433
- return parseMdxWithDeps(source, await loadRemarkDeps());
53500
+ const deps = await loadRemarkDeps();
53501
+ return parseMdxWithDeps(source, deps);
53434
53502
  };
53435
53503
  const stringifyMdx = (tree, deps) => String(deps.unified().use(deps.remarkFrontmatter).use(deps.remarkMdx).use(deps.remarkStringify, {
53436
53504
  bullet: "-",
@@ -53683,7 +53751,8 @@ const renderComponent = (node, opts, pm, deps) => {
53683
53751
  case "CreateNxWorkspaceCommand": {
53684
53752
  const workspace = readStringAttr(node, "workspace");
53685
53753
  if (!workspace) return void 0;
53686
- return [codeBlock(buildCreateNxWorkspaceCommand(pm, workspace, readStringAttr(node, "iac")))];
53754
+ const iac = readStringAttr(node, "iac");
53755
+ return [codeBlock(buildCreateNxWorkspaceCommand(pm, workspace, iac))];
53687
53756
  }
53688
53757
  case "InstallCommand": {
53689
53758
  const pkg = readStringAttr(node, "pkg") ?? readExpressionAttr(node, "pkg");