@jcheesepkg/nanobot 0.8.7 → 0.8.9

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.
Files changed (99) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  2. package/dist/agent/tools/flex.test.d.mts +1 -0
  3. package/dist/agent/tools/flex.test.mjs +258 -0
  4. package/dist/agent/tools/flex.test.mjs.map +1 -0
  5. package/dist/channels/line.d.mts +3 -1
  6. package/dist/channels/line.d.mts.map +1 -1
  7. package/dist/channels/line.mjs +56 -6
  8. package/dist/channels/line.mjs.map +1 -1
  9. package/dist/channels/line.test.d.mts +1 -0
  10. package/dist/channels/line.test.mjs +202 -0
  11. package/dist/channels/line.test.mjs.map +1 -0
  12. package/dist/config/schema.d.mts +18 -18
  13. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
  14. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
  15. package/dist/node_modules/@vitest/expect/dist/index.mjs +1257 -0
  16. package/dist/node_modules/@vitest/expect/dist/index.mjs.map +1 -0
  17. package/dist/node_modules/@vitest/pretty-format/dist/index.mjs +815 -0
  18. package/dist/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -0
  19. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.mjs +43 -0
  20. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.mjs.map +1 -0
  21. package/dist/node_modules/@vitest/runner/dist/index.mjs +563 -0
  22. package/dist/node_modules/@vitest/runner/dist/index.mjs.map +1 -0
  23. package/dist/node_modules/@vitest/runner/dist/utils.mjs +3 -0
  24. package/dist/node_modules/@vitest/snapshot/dist/index.mjs +1736 -0
  25. package/dist/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -0
  26. package/dist/node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs +82 -0
  27. package/dist/node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs.map +1 -0
  28. package/dist/node_modules/@vitest/spy/dist/index.mjs +139 -0
  29. package/dist/node_modules/@vitest/spy/dist/index.mjs.map +1 -0
  30. package/dist/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs +119 -0
  31. package/dist/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs.map +1 -0
  32. package/dist/node_modules/@vitest/utils/dist/diff.mjs +1227 -0
  33. package/dist/node_modules/@vitest/utils/dist/diff.mjs.map +1 -0
  34. package/dist/node_modules/@vitest/utils/dist/error.mjs +92 -0
  35. package/dist/node_modules/@vitest/utils/dist/error.mjs.map +1 -0
  36. package/dist/node_modules/@vitest/utils/dist/helpers.mjs +113 -0
  37. package/dist/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -0
  38. package/dist/node_modules/@vitest/utils/dist/index.mjs +455 -0
  39. package/dist/node_modules/@vitest/utils/dist/index.mjs.map +1 -0
  40. package/dist/node_modules/@vitest/utils/dist/source-map.mjs +164 -0
  41. package/dist/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -0
  42. package/dist/node_modules/chai/index.mjs +3088 -0
  43. package/dist/node_modules/chai/index.mjs.map +1 -0
  44. package/dist/node_modules/loupe/lib/arguments.mjs +12 -0
  45. package/dist/node_modules/loupe/lib/arguments.mjs.map +1 -0
  46. package/dist/node_modules/loupe/lib/array.mjs +17 -0
  47. package/dist/node_modules/loupe/lib/array.mjs.map +1 -0
  48. package/dist/node_modules/loupe/lib/bigint.mjs +12 -0
  49. package/dist/node_modules/loupe/lib/bigint.mjs.map +1 -0
  50. package/dist/node_modules/loupe/lib/class.mjs +16 -0
  51. package/dist/node_modules/loupe/lib/class.mjs.map +1 -0
  52. package/dist/node_modules/loupe/lib/date.mjs +14 -0
  53. package/dist/node_modules/loupe/lib/date.mjs.map +1 -0
  54. package/dist/node_modules/loupe/lib/error.mjs +35 -0
  55. package/dist/node_modules/loupe/lib/error.mjs.map +1 -0
  56. package/dist/node_modules/loupe/lib/function.mjs +13 -0
  57. package/dist/node_modules/loupe/lib/function.mjs.map +1 -0
  58. package/dist/node_modules/loupe/lib/helpers.mjs +123 -0
  59. package/dist/node_modules/loupe/lib/helpers.mjs.map +1 -0
  60. package/dist/node_modules/loupe/lib/html.mjs +40 -0
  61. package/dist/node_modules/loupe/lib/html.mjs.map +1 -0
  62. package/dist/node_modules/loupe/lib/index.mjs +100 -0
  63. package/dist/node_modules/loupe/lib/index.mjs.map +1 -0
  64. package/dist/node_modules/loupe/lib/map.mjs +26 -0
  65. package/dist/node_modules/loupe/lib/map.mjs.map +1 -0
  66. package/dist/node_modules/loupe/lib/number.mjs +15 -0
  67. package/dist/node_modules/loupe/lib/number.mjs.map +1 -0
  68. package/dist/node_modules/loupe/lib/object.mjs +22 -0
  69. package/dist/node_modules/loupe/lib/object.mjs.map +1 -0
  70. package/dist/node_modules/loupe/lib/promise.mjs +6 -0
  71. package/dist/node_modules/loupe/lib/promise.mjs.map +1 -0
  72. package/dist/node_modules/loupe/lib/regexp.mjs +13 -0
  73. package/dist/node_modules/loupe/lib/regexp.mjs.map +1 -0
  74. package/dist/node_modules/loupe/lib/set.mjs +19 -0
  75. package/dist/node_modules/loupe/lib/set.mjs.map +1 -0
  76. package/dist/node_modules/loupe/lib/string.mjs +26 -0
  77. package/dist/node_modules/loupe/lib/string.mjs.map +1 -0
  78. package/dist/node_modules/loupe/lib/symbol.mjs +9 -0
  79. package/dist/node_modules/loupe/lib/symbol.mjs.map +1 -0
  80. package/dist/node_modules/loupe/lib/typedarray.mjs +31 -0
  81. package/dist/node_modules/loupe/lib/typedarray.mjs.map +1 -0
  82. package/dist/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
  83. package/dist/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
  84. package/dist/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.mjs +82 -0
  85. package/dist/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.mjs.map +1 -0
  86. package/dist/node_modules/tinyrainbow/dist/node.mjs +9 -0
  87. package/dist/node_modules/tinyrainbow/dist/node.mjs.map +1 -0
  88. package/dist/node_modules/tinyspy/dist/index.mjs +79 -0
  89. package/dist/node_modules/tinyspy/dist/index.mjs.map +1 -0
  90. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.mjs +9 -0
  91. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.mjs.map +1 -0
  92. package/dist/node_modules/vitest/dist/chunks/date.W2xKR2qe.mjs +51 -0
  93. package/dist/node_modules/vitest/dist/chunks/date.W2xKR2qe.mjs.map +1 -0
  94. package/dist/node_modules/vitest/dist/chunks/utils.C8RiOc4B.mjs +49 -0
  95. package/dist/node_modules/vitest/dist/chunks/utils.C8RiOc4B.mjs.map +1 -0
  96. package/dist/node_modules/vitest/dist/chunks/vi.DgezovHB.mjs +2425 -0
  97. package/dist/node_modules/vitest/dist/chunks/vi.DgezovHB.mjs.map +1 -0
  98. package/package.json +1 -1
  99. package/skills/skill-creator/SKILL.md +29 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/array.js"],"sourcesContent":["import { inspectList, inspectProperty } from './helpers.js';\nexport default function inspectArray(array, options) {\n // Object.keys will always output the Array indices first, so we can slice by\n // `array.length` to get non-index properties\n const nonIndexProperties = Object.keys(array).slice(array.length);\n if (!array.length && !nonIndexProperties.length)\n return '[]';\n options.truncate -= 4;\n const listContents = inspectList(array, options);\n options.truncate -= listContents.length;\n let propertyContents = '';\n if (nonIndexProperties.length) {\n propertyContents = inspectList(nonIndexProperties.map(key => [key, array[key]]), options, inspectProperty);\n }\n return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ''} ]`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,aAAa,OAAO,SAAS;CAGjD,MAAM,qBAAqB,OAAO,KAAK,MAAM,CAAC,MAAM,MAAM,OAAO;AACjE,KAAI,CAAC,MAAM,UAAU,CAAC,mBAAmB,OACrC,QAAO;AACX,SAAQ,YAAY;CACpB,MAAM,eAAe,YAAY,OAAO,QAAQ;AAChD,SAAQ,YAAY,aAAa;CACjC,IAAI,mBAAmB;AACvB,KAAI,mBAAmB,OACnB,oBAAmB,YAAY,mBAAmB,KAAI,QAAO,CAAC,KAAK,MAAM,KAAK,CAAC,EAAE,SAAS,gBAAgB;AAE9G,QAAO,KAAK,eAAe,mBAAmB,KAAK,qBAAqB,GAAG"}
@@ -0,0 +1,12 @@
1
+ import { truncate, truncator } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/bigint.js
4
+ function inspectBigInt(number, options) {
5
+ let nums = truncate(number.toString(), options.truncate - 1);
6
+ if (nums !== truncator) nums += "n";
7
+ return options.stylize(nums, "bigint");
8
+ }
9
+
10
+ //#endregion
11
+ export { inspectBigInt as default };
12
+ //# sourceMappingURL=bigint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bigint.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/bigint.js"],"sourcesContent":["import { truncate, truncator } from './helpers.js';\nexport default function inspectBigInt(number, options) {\n let nums = truncate(number.toString(), options.truncate - 1);\n if (nums !== truncator)\n nums += 'n';\n return options.stylize(nums, 'bigint');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,cAAc,QAAQ,SAAS;CACnD,IAAI,OAAO,SAAS,OAAO,UAAU,EAAE,QAAQ,WAAW,EAAE;AAC5D,KAAI,SAAS,UACT,SAAQ;AACZ,QAAO,QAAQ,QAAQ,MAAM,SAAS"}
@@ -0,0 +1,16 @@
1
+ import inspectObject from "./object.mjs";
2
+
3
+ //#region node_modules/loupe/lib/class.js
4
+ const toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
5
+ function inspectClass(value, options) {
6
+ let name = "";
7
+ if (toStringTag && toStringTag in value) name = value[toStringTag];
8
+ name = name || value.constructor.name;
9
+ if (!name || name === "_class") name = "<Anonymous Class>";
10
+ options.truncate -= name.length;
11
+ return `${name}${inspectObject(value, options)}`;
12
+ }
13
+
14
+ //#endregion
15
+ export { inspectClass as default };
16
+ //# sourceMappingURL=class.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/class.js"],"sourcesContent":["import inspectObject from './object.js';\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;\nexport default function inspectClass(value, options) {\n let name = '';\n if (toStringTag && toStringTag in value) {\n name = value[toStringTag];\n }\n name = name || value.constructor.name;\n // Babel transforms anonymous classes to the name `_class`\n if (!name || name === '_class') {\n name = '<Anonymous Class>';\n }\n options.truncate -= name.length;\n return `${name}${inspectObject(value, options)}`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAM,cAAc,OAAO,WAAW,eAAe,OAAO,cAAc,OAAO,cAAc;AAC/F,SAAwB,aAAa,OAAO,SAAS;CACjD,IAAI,OAAO;AACX,KAAI,eAAe,eAAe,MAC9B,QAAO,MAAM;AAEjB,QAAO,QAAQ,MAAM,YAAY;AAEjC,KAAI,CAAC,QAAQ,SAAS,SAClB,QAAO;AAEX,SAAQ,YAAY,KAAK;AACzB,QAAO,GAAG,OAAO,cAAc,OAAO,QAAQ"}
@@ -0,0 +1,14 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/date.js
4
+ function inspectDate(dateObject, options) {
5
+ const stringRepresentation = dateObject.toJSON();
6
+ if (stringRepresentation === null) return "Invalid Date";
7
+ const split = stringRepresentation.split("T");
8
+ const date = split[0];
9
+ return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
10
+ }
11
+
12
+ //#endregion
13
+ export { inspectDate as default };
14
+ //# sourceMappingURL=date.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/date.js"],"sourcesContent":["import { truncate } from './helpers.js';\nexport default function inspectDate(dateObject, options) {\n const stringRepresentation = dateObject.toJSON();\n if (stringRepresentation === null) {\n return 'Invalid Date';\n }\n const split = stringRepresentation.split('T');\n const date = split[0];\n // If we need to - truncate the time portion, but never the date\n return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, 'date');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,YAAY,YAAY,SAAS;CACrD,MAAM,uBAAuB,WAAW,QAAQ;AAChD,KAAI,yBAAyB,KACzB,QAAO;CAEX,MAAM,QAAQ,qBAAqB,MAAM,IAAI;CAC7C,MAAM,OAAO,MAAM;AAEnB,QAAO,QAAQ,QAAQ,GAAG,KAAK,GAAG,SAAS,MAAM,IAAI,QAAQ,WAAW,KAAK,SAAS,EAAE,IAAI,OAAO"}
@@ -0,0 +1,35 @@
1
+ import { inspectList, inspectProperty, truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/error.js
4
+ const errorKeys = [
5
+ "stack",
6
+ "line",
7
+ "column",
8
+ "name",
9
+ "message",
10
+ "fileName",
11
+ "lineNumber",
12
+ "columnNumber",
13
+ "number",
14
+ "description",
15
+ "cause"
16
+ ];
17
+ function inspectObject(error, options) {
18
+ const properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1);
19
+ const name = error.name;
20
+ options.truncate -= name.length;
21
+ let message = "";
22
+ if (typeof error.message === "string") message = truncate(error.message, options.truncate);
23
+ else properties.unshift("message");
24
+ message = message ? `: ${message}` : "";
25
+ options.truncate -= message.length + 5;
26
+ options.seen = options.seen || [];
27
+ if (options.seen.includes(error)) return "[Circular]";
28
+ options.seen.push(error);
29
+ const propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
30
+ return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
31
+ }
32
+
33
+ //#endregion
34
+ export { inspectObject as default };
35
+ //# sourceMappingURL=error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/error.js"],"sourcesContent":["import { inspectList, inspectProperty, truncate } from './helpers.js';\nconst errorKeys = [\n 'stack',\n 'line',\n 'column',\n 'name',\n 'message',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'number',\n 'description',\n 'cause',\n];\nexport default function inspectObject(error, options) {\n const properties = Object.getOwnPropertyNames(error).filter(key => errorKeys.indexOf(key) === -1);\n const name = error.name;\n options.truncate -= name.length;\n let message = '';\n if (typeof error.message === 'string') {\n message = truncate(error.message, options.truncate);\n }\n else {\n properties.unshift('message');\n }\n message = message ? `: ${message}` : '';\n options.truncate -= message.length + 5;\n options.seen = options.seen || [];\n if (options.seen.includes(error)) {\n return '[Circular]';\n }\n options.seen.push(error);\n const propertyContents = inspectList(properties.map(key => [key, error[key]]), options, inspectProperty);\n return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ''}`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAM,YAAY;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH;AACD,SAAwB,cAAc,OAAO,SAAS;CAClD,MAAM,aAAa,OAAO,oBAAoB,MAAM,CAAC,QAAO,QAAO,UAAU,QAAQ,IAAI,KAAK,GAAG;CACjG,MAAM,OAAO,MAAM;AACnB,SAAQ,YAAY,KAAK;CACzB,IAAI,UAAU;AACd,KAAI,OAAO,MAAM,YAAY,SACzB,WAAU,SAAS,MAAM,SAAS,QAAQ,SAAS;KAGnD,YAAW,QAAQ,UAAU;AAEjC,WAAU,UAAU,KAAK,YAAY;AACrC,SAAQ,YAAY,QAAQ,SAAS;AACrC,SAAQ,OAAO,QAAQ,QAAQ,EAAE;AACjC,KAAI,QAAQ,KAAK,SAAS,MAAM,CAC5B,QAAO;AAEX,SAAQ,KAAK,KAAK,MAAM;CACxB,MAAM,mBAAmB,YAAY,WAAW,KAAI,QAAO,CAAC,KAAK,MAAM,KAAK,CAAC,EAAE,SAAS,gBAAgB;AACxG,QAAO,GAAG,OAAO,UAAU,mBAAmB,MAAM,iBAAiB,MAAM"}
@@ -0,0 +1,13 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/function.js
4
+ function inspectFunction(func, options) {
5
+ const functionType = func[Symbol.toStringTag] || "Function";
6
+ const name = func.name;
7
+ if (!name) return options.stylize(`[${functionType}]`, "special");
8
+ return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special");
9
+ }
10
+
11
+ //#endregion
12
+ export { inspectFunction as default };
13
+ //# sourceMappingURL=function.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/function.js"],"sourcesContent":["import { truncate } from './helpers.js';\nexport default function inspectFunction(func, options) {\n const functionType = func[Symbol.toStringTag] || 'Function';\n const name = func.name;\n if (!name) {\n return options.stylize(`[${functionType}]`, 'special');\n }\n return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, 'special');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,gBAAgB,MAAM,SAAS;CACnD,MAAM,eAAe,KAAK,OAAO,gBAAgB;CACjD,MAAM,OAAO,KAAK;AAClB,KAAI,CAAC,KACD,QAAO,QAAQ,QAAQ,IAAI,aAAa,IAAI,UAAU;AAE1D,QAAO,QAAQ,QAAQ,IAAI,aAAa,GAAG,SAAS,MAAM,QAAQ,WAAW,GAAG,CAAC,IAAI,UAAU"}
@@ -0,0 +1,123 @@
1
+ //#region node_modules/loupe/lib/helpers.js
2
+ const ansiColors = {
3
+ bold: ["1", "22"],
4
+ dim: ["2", "22"],
5
+ italic: ["3", "23"],
6
+ underline: ["4", "24"],
7
+ inverse: ["7", "27"],
8
+ hidden: ["8", "28"],
9
+ strike: ["9", "29"],
10
+ black: ["30", "39"],
11
+ red: ["31", "39"],
12
+ green: ["32", "39"],
13
+ yellow: ["33", "39"],
14
+ blue: ["34", "39"],
15
+ magenta: ["35", "39"],
16
+ cyan: ["36", "39"],
17
+ white: ["37", "39"],
18
+ brightblack: ["30;1", "39"],
19
+ brightred: ["31;1", "39"],
20
+ brightgreen: ["32;1", "39"],
21
+ brightyellow: ["33;1", "39"],
22
+ brightblue: ["34;1", "39"],
23
+ brightmagenta: ["35;1", "39"],
24
+ brightcyan: ["36;1", "39"],
25
+ brightwhite: ["37;1", "39"],
26
+ grey: ["90", "39"]
27
+ };
28
+ const styles = {
29
+ special: "cyan",
30
+ number: "yellow",
31
+ bigint: "yellow",
32
+ boolean: "yellow",
33
+ undefined: "grey",
34
+ null: "bold",
35
+ string: "green",
36
+ symbol: "green",
37
+ date: "magenta",
38
+ regexp: "red"
39
+ };
40
+ const truncator = "…";
41
+ function colorise(value, styleType) {
42
+ const color = ansiColors[styles[styleType]] || ansiColors[styleType] || "";
43
+ if (!color) return String(value);
44
+ return `\u001b[${color[0]}m${String(value)}\u001b[${color[1]}m`;
45
+ }
46
+ function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [], truncate = Infinity, stylize = String } = {}, inspect) {
47
+ const options = {
48
+ showHidden: Boolean(showHidden),
49
+ depth: Number(depth),
50
+ colors: Boolean(colors),
51
+ customInspect: Boolean(customInspect),
52
+ showProxy: Boolean(showProxy),
53
+ maxArrayLength: Number(maxArrayLength),
54
+ breakLength: Number(breakLength),
55
+ truncate: Number(truncate),
56
+ seen,
57
+ inspect,
58
+ stylize
59
+ };
60
+ if (options.colors) options.stylize = colorise;
61
+ return options;
62
+ }
63
+ function isHighSurrogate(char) {
64
+ return char >= "\ud800" && char <= "\udbff";
65
+ }
66
+ function truncate(string, length, tail = truncator) {
67
+ string = String(string);
68
+ const tailLength = tail.length;
69
+ const stringLength = string.length;
70
+ if (tailLength > length && stringLength > tailLength) return tail;
71
+ if (stringLength > length && stringLength > tailLength) {
72
+ let end = length - tailLength;
73
+ if (end > 0 && isHighSurrogate(string[end - 1])) end = end - 1;
74
+ return `${string.slice(0, end)}${tail}`;
75
+ }
76
+ return string;
77
+ }
78
+ function inspectList(list, options, inspectItem, separator = ", ") {
79
+ inspectItem = inspectItem || options.inspect;
80
+ const size = list.length;
81
+ if (size === 0) return "";
82
+ const originalLength = options.truncate;
83
+ let output = "";
84
+ let peek = "";
85
+ let truncated = "";
86
+ for (let i = 0; i < size; i += 1) {
87
+ const last = i + 1 === list.length;
88
+ const secondToLast = i + 2 === list.length;
89
+ truncated = `${truncator}(${list.length - i})`;
90
+ const value = list[i];
91
+ options.truncate = originalLength - output.length - (last ? 0 : separator.length);
92
+ const string = peek || inspectItem(value, options) + (last ? "" : separator);
93
+ const nextLength = output.length + string.length;
94
+ const truncatedLength = nextLength + truncated.length;
95
+ if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) break;
96
+ if (!last && !secondToLast && truncatedLength > originalLength) break;
97
+ peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator);
98
+ if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) break;
99
+ output += string;
100
+ if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
101
+ truncated = `${truncator}(${list.length - i - 1})`;
102
+ break;
103
+ }
104
+ truncated = "";
105
+ }
106
+ return `${output}${truncated}`;
107
+ }
108
+ function quoteComplexKey(key) {
109
+ if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) return key;
110
+ return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, "\"").replace(/(^"|"$)/g, "'");
111
+ }
112
+ function inspectProperty([key, value], options) {
113
+ options.truncate -= 2;
114
+ if (typeof key === "string") key = quoteComplexKey(key);
115
+ else if (typeof key !== "number") key = `[${options.inspect(key, options)}]`;
116
+ options.truncate -= key.length;
117
+ value = options.inspect(value, options);
118
+ return `${key}: ${value}`;
119
+ }
120
+
121
+ //#endregion
122
+ export { inspectList, inspectProperty, normaliseOptions, truncate, truncator };
123
+ //# sourceMappingURL=helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/helpers.js"],"sourcesContent":["const ansiColors = {\n bold: ['1', '22'],\n dim: ['2', '22'],\n italic: ['3', '23'],\n underline: ['4', '24'],\n // 5 & 6 are blinking\n inverse: ['7', '27'],\n hidden: ['8', '28'],\n strike: ['9', '29'],\n // 10-20 are fonts\n // 21-29 are resets for 1-9\n black: ['30', '39'],\n red: ['31', '39'],\n green: ['32', '39'],\n yellow: ['33', '39'],\n blue: ['34', '39'],\n magenta: ['35', '39'],\n cyan: ['36', '39'],\n white: ['37', '39'],\n brightblack: ['30;1', '39'],\n brightred: ['31;1', '39'],\n brightgreen: ['32;1', '39'],\n brightyellow: ['33;1', '39'],\n brightblue: ['34;1', '39'],\n brightmagenta: ['35;1', '39'],\n brightcyan: ['36;1', '39'],\n brightwhite: ['37;1', '39'],\n grey: ['90', '39'],\n};\nconst styles = {\n special: 'cyan',\n number: 'yellow',\n bigint: 'yellow',\n boolean: 'yellow',\n undefined: 'grey',\n null: 'bold',\n string: 'green',\n symbol: 'green',\n date: 'magenta',\n regexp: 'red',\n};\nexport const truncator = '…';\nfunction colorise(value, styleType) {\n const color = ansiColors[styles[styleType]] || ansiColors[styleType] || '';\n if (!color) {\n return String(value);\n }\n return `\\u001b[${color[0]}m${String(value)}\\u001b[${color[1]}m`;\n}\nexport function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [], \n// eslint-disable-next-line no-shadow\ntruncate = Infinity, stylize = String, } = {}, inspect) {\n const options = {\n showHidden: Boolean(showHidden),\n depth: Number(depth),\n colors: Boolean(colors),\n customInspect: Boolean(customInspect),\n showProxy: Boolean(showProxy),\n maxArrayLength: Number(maxArrayLength),\n breakLength: Number(breakLength),\n truncate: Number(truncate),\n seen,\n inspect,\n stylize,\n };\n if (options.colors) {\n options.stylize = colorise;\n }\n return options;\n}\nfunction isHighSurrogate(char) {\n return char >= '\\ud800' && char <= '\\udbff';\n}\nexport function truncate(string, length, tail = truncator) {\n string = String(string);\n const tailLength = tail.length;\n const stringLength = string.length;\n if (tailLength > length && stringLength > tailLength) {\n return tail;\n }\n if (stringLength > length && stringLength > tailLength) {\n let end = length - tailLength;\n if (end > 0 && isHighSurrogate(string[end - 1])) {\n end = end - 1;\n }\n return `${string.slice(0, end)}${tail}`;\n }\n return string;\n}\n// eslint-disable-next-line complexity\nexport function inspectList(list, options, inspectItem, separator = ', ') {\n inspectItem = inspectItem || options.inspect;\n const size = list.length;\n if (size === 0)\n return '';\n const originalLength = options.truncate;\n let output = '';\n let peek = '';\n let truncated = '';\n for (let i = 0; i < size; i += 1) {\n const last = i + 1 === list.length;\n const secondToLast = i + 2 === list.length;\n truncated = `${truncator}(${list.length - i})`;\n const value = list[i];\n // If there is more than one remaining we need to account for a separator of `, `\n options.truncate = originalLength - output.length - (last ? 0 : separator.length);\n const string = peek || inspectItem(value, options) + (last ? '' : separator);\n const nextLength = output.length + string.length;\n const truncatedLength = nextLength + truncated.length;\n // If this is the last element, and adding it would\n // take us over length, but adding the truncator wouldn't - then break now\n if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {\n break;\n }\n // If this isn't the last or second to last element to scan,\n // but the string is already over length then break here\n if (!last && !secondToLast && truncatedLength > originalLength) {\n break;\n }\n // Peek at the next string to determine if we should\n // break early before adding this item to the output\n peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator);\n // If we have one element left, but this element and\n // the next takes over length, the break early\n if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {\n break;\n }\n output += string;\n // If the next element takes us to length -\n // but there are more after that, then we should truncate now\n if (!last && !secondToLast && nextLength + peek.length >= originalLength) {\n truncated = `${truncator}(${list.length - i - 1})`;\n break;\n }\n truncated = '';\n }\n return `${output}${truncated}`;\n}\nfunction quoteComplexKey(key) {\n if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {\n return key;\n }\n return JSON.stringify(key)\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n}\nexport function inspectProperty([key, value], options) {\n options.truncate -= 2;\n if (typeof key === 'string') {\n key = quoteComplexKey(key);\n }\n else if (typeof key !== 'number') {\n key = `[${options.inspect(key, options)}]`;\n }\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return `${key}: ${value}`;\n}\n"],"x_google_ignoreList":[0],"mappings":"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"}
@@ -0,0 +1,40 @@
1
+ import { inspectList, truncator } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/html.js
4
+ function inspectAttribute([key, value], options) {
5
+ options.truncate -= 3;
6
+ if (!value) return `${options.stylize(String(key), "yellow")}`;
7
+ return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
8
+ }
9
+ function inspectNodeCollection(collection, options) {
10
+ return inspectList(collection, options, inspectNode, "\n");
11
+ }
12
+ function inspectNode(node, options) {
13
+ switch (node.nodeType) {
14
+ case 1: return inspectHTML(node, options);
15
+ case 3: return options.inspect(node.data, options);
16
+ default: return options.inspect(node, options);
17
+ }
18
+ }
19
+ function inspectHTML(element, options) {
20
+ const properties = element.getAttributeNames();
21
+ const name = element.tagName.toLowerCase();
22
+ const head = options.stylize(`<${name}`, "special");
23
+ const headClose = options.stylize(`>`, "special");
24
+ const tail = options.stylize(`</${name}>`, "special");
25
+ options.truncate -= name.length * 2 + 5;
26
+ let propertyContents = "";
27
+ if (properties.length > 0) {
28
+ propertyContents += " ";
29
+ propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ");
30
+ }
31
+ options.truncate -= propertyContents.length;
32
+ const truncate = options.truncate;
33
+ let children = inspectNodeCollection(element.children, options);
34
+ if (children && children.length > truncate) children = `${truncator}(${element.children.length})`;
35
+ return `${head}${propertyContents}${headClose}${children}${tail}`;
36
+ }
37
+
38
+ //#endregion
39
+ export { inspectHTML as default, inspectNodeCollection };
40
+ //# sourceMappingURL=html.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/html.js"],"sourcesContent":["import { inspectList, truncator } from './helpers.js';\nexport function inspectAttribute([key, value], options) {\n options.truncate -= 3;\n if (!value) {\n return `${options.stylize(String(key), 'yellow')}`;\n }\n return `${options.stylize(String(key), 'yellow')}=${options.stylize(`\"${value}\"`, 'string')}`;\n}\nexport function inspectNodeCollection(collection, options) {\n return inspectList(collection, options, inspectNode, '\\n');\n}\nexport function inspectNode(node, options) {\n switch (node.nodeType) {\n case 1:\n return inspectHTML(node, options);\n case 3:\n return options.inspect(node.data, options);\n default:\n return options.inspect(node, options);\n }\n}\n// @ts-ignore (Deno doesn't have Element)\nexport default function inspectHTML(element, options) {\n const properties = element.getAttributeNames();\n const name = element.tagName.toLowerCase();\n const head = options.stylize(`<${name}`, 'special');\n const headClose = options.stylize(`>`, 'special');\n const tail = options.stylize(`</${name}>`, 'special');\n options.truncate -= name.length * 2 + 5;\n let propertyContents = '';\n if (properties.length > 0) {\n propertyContents += ' ';\n propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, ' ');\n }\n options.truncate -= propertyContents.length;\n const truncate = options.truncate;\n let children = inspectNodeCollection(element.children, options);\n if (children && children.length > truncate) {\n children = `${truncator}(${element.children.length})`;\n }\n return `${head}${propertyContents}${headClose}${children}${tail}`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAgB,iBAAiB,CAAC,KAAK,QAAQ,SAAS;AACpD,SAAQ,YAAY;AACpB,KAAI,CAAC,MACD,QAAO,GAAG,QAAQ,QAAQ,OAAO,IAAI,EAAE,SAAS;AAEpD,QAAO,GAAG,QAAQ,QAAQ,OAAO,IAAI,EAAE,SAAS,CAAC,GAAG,QAAQ,QAAQ,IAAI,MAAM,IAAI,SAAS;;AAE/F,SAAgB,sBAAsB,YAAY,SAAS;AACvD,QAAO,YAAY,YAAY,SAAS,aAAa,KAAK;;AAE9D,SAAgB,YAAY,MAAM,SAAS;AACvC,SAAQ,KAAK,UAAb;EACI,KAAK,EACD,QAAO,YAAY,MAAM,QAAQ;EACrC,KAAK,EACD,QAAO,QAAQ,QAAQ,KAAK,MAAM,QAAQ;EAC9C,QACI,QAAO,QAAQ,QAAQ,MAAM,QAAQ;;;AAIjD,SAAwB,YAAY,SAAS,SAAS;CAClD,MAAM,aAAa,QAAQ,mBAAmB;CAC9C,MAAM,OAAO,QAAQ,QAAQ,aAAa;CAC1C,MAAM,OAAO,QAAQ,QAAQ,IAAI,QAAQ,UAAU;CACnD,MAAM,YAAY,QAAQ,QAAQ,KAAK,UAAU;CACjD,MAAM,OAAO,QAAQ,QAAQ,KAAK,KAAK,IAAI,UAAU;AACrD,SAAQ,YAAY,KAAK,SAAS,IAAI;CACtC,IAAI,mBAAmB;AACvB,KAAI,WAAW,SAAS,GAAG;AACvB,sBAAoB;AACpB,sBAAoB,YAAY,WAAW,KAAK,QAAQ,CAAC,KAAK,QAAQ,aAAa,IAAI,CAAC,CAAC,EAAE,SAAS,kBAAkB,IAAI;;AAE9H,SAAQ,YAAY,iBAAiB;CACrC,MAAM,WAAW,QAAQ;CACzB,IAAI,WAAW,sBAAsB,QAAQ,UAAU,QAAQ;AAC/D,KAAI,YAAY,SAAS,SAAS,SAC9B,YAAW,GAAG,UAAU,GAAG,QAAQ,SAAS,OAAO;AAEvD,QAAO,GAAG,OAAO,mBAAmB,YAAY,WAAW"}
@@ -0,0 +1,100 @@
1
+ import { normaliseOptions } from "./helpers.mjs";
2
+ import inspectArray from "./array.mjs";
3
+ import inspectTypedArray from "./typedarray.mjs";
4
+ import inspectDate from "./date.mjs";
5
+ import inspectFunction from "./function.mjs";
6
+ import inspectMap from "./map.mjs";
7
+ import inspectNumber from "./number.mjs";
8
+ import inspectBigInt from "./bigint.mjs";
9
+ import inspectRegExp from "./regexp.mjs";
10
+ import inspectSet from "./set.mjs";
11
+ import inspectString from "./string.mjs";
12
+ import inspectSymbol from "./symbol.mjs";
13
+ import getPromiseValue from "./promise.mjs";
14
+ import inspectObject from "./object.mjs";
15
+ import inspectClass from "./class.mjs";
16
+ import inspectArguments from "./arguments.mjs";
17
+ import inspectObject$1 from "./error.mjs";
18
+ import inspectHTML, { inspectNodeCollection } from "./html.mjs";
19
+
20
+ //#region node_modules/loupe/lib/index.js
21
+ const chaiInspect = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("chai/inspect") : "@@chai/inspect";
22
+ const nodeInspect = Symbol.for("nodejs.util.inspect.custom");
23
+ const constructorMap = /* @__PURE__ */ new WeakMap();
24
+ const stringTagMap = {};
25
+ const baseTypesMap = {
26
+ undefined: (value, options) => options.stylize("undefined", "undefined"),
27
+ null: (value, options) => options.stylize("null", "null"),
28
+ boolean: (value, options) => options.stylize(String(value), "boolean"),
29
+ Boolean: (value, options) => options.stylize(String(value), "boolean"),
30
+ number: inspectNumber,
31
+ Number: inspectNumber,
32
+ bigint: inspectBigInt,
33
+ BigInt: inspectBigInt,
34
+ string: inspectString,
35
+ String: inspectString,
36
+ function: inspectFunction,
37
+ Function: inspectFunction,
38
+ symbol: inspectSymbol,
39
+ Symbol: inspectSymbol,
40
+ Array: inspectArray,
41
+ Date: inspectDate,
42
+ Map: inspectMap,
43
+ Set: inspectSet,
44
+ RegExp: inspectRegExp,
45
+ Promise: getPromiseValue,
46
+ WeakSet: (value, options) => options.stylize("WeakSet{…}", "special"),
47
+ WeakMap: (value, options) => options.stylize("WeakMap{…}", "special"),
48
+ Arguments: inspectArguments,
49
+ Int8Array: inspectTypedArray,
50
+ Uint8Array: inspectTypedArray,
51
+ Uint8ClampedArray: inspectTypedArray,
52
+ Int16Array: inspectTypedArray,
53
+ Uint16Array: inspectTypedArray,
54
+ Int32Array: inspectTypedArray,
55
+ Uint32Array: inspectTypedArray,
56
+ Float32Array: inspectTypedArray,
57
+ Float64Array: inspectTypedArray,
58
+ Generator: () => "",
59
+ DataView: () => "",
60
+ ArrayBuffer: () => "",
61
+ Error: inspectObject$1,
62
+ HTMLCollection: inspectNodeCollection,
63
+ NodeList: inspectNodeCollection
64
+ };
65
+ const inspectCustom = (value, options, type, inspectFn) => {
66
+ if (chaiInspect in value && typeof value[chaiInspect] === "function") return value[chaiInspect](options);
67
+ if (nodeInspect in value && typeof value[nodeInspect] === "function") return value[nodeInspect](options.depth, options, inspectFn);
68
+ if ("inspect" in value && typeof value.inspect === "function") return value.inspect(options.depth, options);
69
+ if ("constructor" in value && constructorMap.has(value.constructor)) return constructorMap.get(value.constructor)(value, options);
70
+ if (stringTagMap[type]) return stringTagMap[type](value, options);
71
+ return "";
72
+ };
73
+ const toString = Object.prototype.toString;
74
+ function inspect(value, opts = {}) {
75
+ const options = normaliseOptions(opts, inspect);
76
+ const { customInspect } = options;
77
+ let type = value === null ? "null" : typeof value;
78
+ if (type === "object") type = toString.call(value).slice(8, -1);
79
+ if (type in baseTypesMap) return baseTypesMap[type](value, options);
80
+ if (customInspect && value) {
81
+ const output = inspectCustom(value, options, type, inspect);
82
+ if (output) {
83
+ if (typeof output === "string") return output;
84
+ return inspect(output, options);
85
+ }
86
+ }
87
+ const proto = value ? Object.getPrototypeOf(value) : false;
88
+ if (proto === Object.prototype || proto === null) return inspectObject(value, options);
89
+ if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) return inspectHTML(value, options);
90
+ if ("constructor" in value) {
91
+ if (value.constructor !== Object) return inspectClass(value, options);
92
+ return inspectObject(value, options);
93
+ }
94
+ if (value === Object(value)) return inspectObject(value, options);
95
+ return options.stylize(String(value), type);
96
+ }
97
+
98
+ //#endregion
99
+ export { inspect as default };
100
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["inspectPromise","inspectError","inspectHTMLElement"],"sources":["../../../../node_modules/loupe/lib/index.js"],"sourcesContent":["/* !\n * loupe\n * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nimport inspectArray from './array.js';\nimport inspectTypedArray from './typedarray.js';\nimport inspectDate from './date.js';\nimport inspectFunction from './function.js';\nimport inspectMap from './map.js';\nimport inspectNumber from './number.js';\nimport inspectBigInt from './bigint.js';\nimport inspectRegExp from './regexp.js';\nimport inspectSet from './set.js';\nimport inspectString from './string.js';\nimport inspectSymbol from './symbol.js';\nimport inspectPromise from './promise.js';\nimport inspectClass from './class.js';\nimport inspectObject from './object.js';\nimport inspectArguments from './arguments.js';\nimport inspectError from './error.js';\nimport inspectHTMLElement, { inspectNodeCollection } from './html.js';\nimport { normaliseOptions } from './helpers.js';\nconst symbolsSupported = typeof Symbol === 'function' && typeof Symbol.for === 'function';\nconst chaiInspect = symbolsSupported ? Symbol.for('chai/inspect') : '@@chai/inspect';\nconst nodeInspect = Symbol.for('nodejs.util.inspect.custom');\nconst constructorMap = new WeakMap();\nconst stringTagMap = {};\nconst baseTypesMap = {\n undefined: (value, options) => options.stylize('undefined', 'undefined'),\n null: (value, options) => options.stylize('null', 'null'),\n boolean: (value, options) => options.stylize(String(value), 'boolean'),\n Boolean: (value, options) => options.stylize(String(value), 'boolean'),\n number: inspectNumber,\n Number: inspectNumber,\n bigint: inspectBigInt,\n BigInt: inspectBigInt,\n string: inspectString,\n String: inspectString,\n function: inspectFunction,\n Function: inspectFunction,\n symbol: inspectSymbol,\n // A Symbol polyfill will return `Symbol` not `symbol` from typedetect\n Symbol: inspectSymbol,\n Array: inspectArray,\n Date: inspectDate,\n Map: inspectMap,\n Set: inspectSet,\n RegExp: inspectRegExp,\n Promise: inspectPromise,\n // WeakSet, WeakMap are totally opaque to us\n WeakSet: (value, options) => options.stylize('WeakSet{…}', 'special'),\n WeakMap: (value, options) => options.stylize('WeakMap{…}', 'special'),\n Arguments: inspectArguments,\n Int8Array: inspectTypedArray,\n Uint8Array: inspectTypedArray,\n Uint8ClampedArray: inspectTypedArray,\n Int16Array: inspectTypedArray,\n Uint16Array: inspectTypedArray,\n Int32Array: inspectTypedArray,\n Uint32Array: inspectTypedArray,\n Float32Array: inspectTypedArray,\n Float64Array: inspectTypedArray,\n Generator: () => '',\n DataView: () => '',\n ArrayBuffer: () => '',\n Error: inspectError,\n HTMLCollection: inspectNodeCollection,\n NodeList: inspectNodeCollection,\n};\n// eslint-disable-next-line complexity\nconst inspectCustom = (value, options, type, inspectFn) => {\n if (chaiInspect in value && typeof value[chaiInspect] === 'function') {\n return value[chaiInspect](options);\n }\n if (nodeInspect in value && typeof value[nodeInspect] === 'function') {\n return value[nodeInspect](options.depth, options, inspectFn);\n }\n if ('inspect' in value && typeof value.inspect === 'function') {\n return value.inspect(options.depth, options);\n }\n if ('constructor' in value && constructorMap.has(value.constructor)) {\n return constructorMap.get(value.constructor)(value, options);\n }\n if (stringTagMap[type]) {\n return stringTagMap[type](value, options);\n }\n return '';\n};\nconst toString = Object.prototype.toString;\n// eslint-disable-next-line complexity\nexport function inspect(value, opts = {}) {\n const options = normaliseOptions(opts, inspect);\n const { customInspect } = options;\n let type = value === null ? 'null' : typeof value;\n if (type === 'object') {\n type = toString.call(value).slice(8, -1);\n }\n // If it is a base value that we already support, then use Loupe's inspector\n if (type in baseTypesMap) {\n return baseTypesMap[type](value, options);\n }\n // If `options.customInspect` is set to true then try to use the custom inspector\n if (customInspect && value) {\n const output = inspectCustom(value, options, type, inspect);\n if (output) {\n if (typeof output === 'string')\n return output;\n return inspect(output, options);\n }\n }\n const proto = value ? Object.getPrototypeOf(value) : false;\n // If it's a plain Object then use Loupe's inspector\n if (proto === Object.prototype || proto === null) {\n return inspectObject(value, options);\n }\n // Specifically account for HTMLElements\n // @ts-ignore\n if (value && typeof HTMLElement === 'function' && value instanceof HTMLElement) {\n return inspectHTMLElement(value, options);\n }\n if ('constructor' in value) {\n // If it is a class, inspect it like an object but add the constructor name\n if (value.constructor !== Object) {\n return inspectClass(value, options);\n }\n // If it is an object with an anonymous prototype, display it as an object.\n return inspectObject(value, options);\n }\n // last chance to check if it's an object\n if (value === Object(value)) {\n return inspectObject(value, options);\n }\n // We have run out of options! Just stringify the value\n return options.stylize(String(value), type);\n}\nexport function registerConstructor(constructor, inspector) {\n if (constructorMap.has(constructor)) {\n return false;\n }\n constructorMap.set(constructor, inspector);\n return true;\n}\nexport function registerStringTag(stringTag, inspector) {\n if (stringTag in stringTagMap) {\n return false;\n }\n stringTagMap[stringTag] = inspector;\n return true;\n}\nexport const custom = chaiInspect;\nexport default inspect;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,cADmB,OAAO,WAAW,cAAc,OAAO,OAAO,QAAQ,aACxC,OAAO,IAAI,eAAe,GAAG;AACpE,MAAM,cAAc,OAAO,IAAI,6BAA6B;AAC5D,MAAM,iCAAiB,IAAI,SAAS;AACpC,MAAM,eAAe,EAAE;AACvB,MAAM,eAAe;CACjB,YAAY,OAAO,YAAY,QAAQ,QAAQ,aAAa,YAAY;CACxE,OAAO,OAAO,YAAY,QAAQ,QAAQ,QAAQ,OAAO;CACzD,UAAU,OAAO,YAAY,QAAQ,QAAQ,OAAO,MAAM,EAAE,UAAU;CACtE,UAAU,OAAO,YAAY,QAAQ,QAAQ,OAAO,MAAM,EAAE,UAAU;CACtE,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,UAAU;CACV,QAAQ;CAER,QAAQ;CACR,OAAO;CACP,MAAM;CACN,KAAK;CACL,KAAK;CACL,QAAQ;CACR,SAASA;CAET,UAAU,OAAO,YAAY,QAAQ,QAAQ,cAAc,UAAU;CACrE,UAAU,OAAO,YAAY,QAAQ,QAAQ,cAAc,UAAU;CACrE,WAAW;CACX,WAAW;CACX,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,aAAa;CACb,cAAc;CACd,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,mBAAmB;CACnB,OAAOC;CACP,gBAAgB;CAChB,UAAU;CACb;AAED,MAAM,iBAAiB,OAAO,SAAS,MAAM,cAAc;AACvD,KAAI,eAAe,SAAS,OAAO,MAAM,iBAAiB,WACtD,QAAO,MAAM,aAAa,QAAQ;AAEtC,KAAI,eAAe,SAAS,OAAO,MAAM,iBAAiB,WACtD,QAAO,MAAM,aAAa,QAAQ,OAAO,SAAS,UAAU;AAEhE,KAAI,aAAa,SAAS,OAAO,MAAM,YAAY,WAC/C,QAAO,MAAM,QAAQ,QAAQ,OAAO,QAAQ;AAEhD,KAAI,iBAAiB,SAAS,eAAe,IAAI,MAAM,YAAY,CAC/D,QAAO,eAAe,IAAI,MAAM,YAAY,CAAC,OAAO,QAAQ;AAEhE,KAAI,aAAa,MACb,QAAO,aAAa,MAAM,OAAO,QAAQ;AAE7C,QAAO;;AAEX,MAAM,WAAW,OAAO,UAAU;AAElC,SAAgB,QAAQ,OAAO,OAAO,EAAE,EAAE;CACtC,MAAM,UAAU,iBAAiB,MAAM,QAAQ;CAC/C,MAAM,EAAE,kBAAkB;CAC1B,IAAI,OAAO,UAAU,OAAO,SAAS,OAAO;AAC5C,KAAI,SAAS,SACT,QAAO,SAAS,KAAK,MAAM,CAAC,MAAM,GAAG,GAAG;AAG5C,KAAI,QAAQ,aACR,QAAO,aAAa,MAAM,OAAO,QAAQ;AAG7C,KAAI,iBAAiB,OAAO;EACxB,MAAM,SAAS,cAAc,OAAO,SAAS,MAAM,QAAQ;AAC3D,MAAI,QAAQ;AACR,OAAI,OAAO,WAAW,SAClB,QAAO;AACX,UAAO,QAAQ,QAAQ,QAAQ;;;CAGvC,MAAM,QAAQ,QAAQ,OAAO,eAAe,MAAM,GAAG;AAErD,KAAI,UAAU,OAAO,aAAa,UAAU,KACxC,QAAO,cAAc,OAAO,QAAQ;AAIxC,KAAI,SAAS,OAAO,gBAAgB,cAAc,iBAAiB,YAC/D,QAAOC,YAAmB,OAAO,QAAQ;AAE7C,KAAI,iBAAiB,OAAO;AAExB,MAAI,MAAM,gBAAgB,OACtB,QAAO,aAAa,OAAO,QAAQ;AAGvC,SAAO,cAAc,OAAO,QAAQ;;AAGxC,KAAI,UAAU,OAAO,MAAM,CACvB,QAAO,cAAc,OAAO,QAAQ;AAGxC,QAAO,QAAQ,QAAQ,OAAO,MAAM,EAAE,KAAK"}
@@ -0,0 +1,26 @@
1
+ import { inspectList } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/map.js
4
+ function inspectMapEntry([key, value], options) {
5
+ options.truncate -= 4;
6
+ key = options.inspect(key, options);
7
+ options.truncate -= key.length;
8
+ value = options.inspect(value, options);
9
+ return `${key} => ${value}`;
10
+ }
11
+ function mapToEntries(map) {
12
+ const entries = [];
13
+ map.forEach((value, key) => {
14
+ entries.push([key, value]);
15
+ });
16
+ return entries;
17
+ }
18
+ function inspectMap(map, options) {
19
+ if (map.size === 0) return "Map{}";
20
+ options.truncate -= 7;
21
+ return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
22
+ }
23
+
24
+ //#endregion
25
+ export { inspectMap as default };
26
+ //# sourceMappingURL=map.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/map.js"],"sourcesContent":["import { inspectList } from './helpers.js';\nfunction inspectMapEntry([key, value], options) {\n options.truncate -= 4;\n key = options.inspect(key, options);\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return `${key} => ${value}`;\n}\n// IE11 doesn't support `map.entries()`\nfunction mapToEntries(map) {\n const entries = [];\n map.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n}\nexport default function inspectMap(map, options) {\n if (map.size === 0)\n return 'Map{}';\n options.truncate -= 7;\n return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAS,gBAAgB,CAAC,KAAK,QAAQ,SAAS;AAC5C,SAAQ,YAAY;AACpB,OAAM,QAAQ,QAAQ,KAAK,QAAQ;AACnC,SAAQ,YAAY,IAAI;AACxB,SAAQ,QAAQ,QAAQ,OAAO,QAAQ;AACvC,QAAO,GAAG,IAAI,MAAM;;AAGxB,SAAS,aAAa,KAAK;CACvB,MAAM,UAAU,EAAE;AAClB,KAAI,SAAS,OAAO,QAAQ;AACxB,UAAQ,KAAK,CAAC,KAAK,MAAM,CAAC;GAC5B;AACF,QAAO;;AAEX,SAAwB,WAAW,KAAK,SAAS;AAC7C,KAAI,IAAI,SAAS,EACb,QAAO;AACX,SAAQ,YAAY;AACpB,QAAO,QAAQ,YAAY,aAAa,IAAI,EAAE,SAAS,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/number.js
4
+ const isNaN = Number.isNaN || ((i) => i !== i);
5
+ function inspectNumber(number, options) {
6
+ if (isNaN(number)) return options.stylize("NaN", "number");
7
+ if (number === Infinity) return options.stylize("Infinity", "number");
8
+ if (number === -Infinity) return options.stylize("-Infinity", "number");
9
+ if (number === 0) return options.stylize(1 / number === Infinity ? "+0" : "-0", "number");
10
+ return options.stylize(truncate(String(number), options.truncate), "number");
11
+ }
12
+
13
+ //#endregion
14
+ export { inspectNumber as default };
15
+ //# sourceMappingURL=number.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/number.js"],"sourcesContent":["import { truncate } from './helpers.js';\nconst isNaN = Number.isNaN || (i => i !== i); // eslint-disable-line no-self-compare\nexport default function inspectNumber(number, options) {\n if (isNaN(number)) {\n return options.stylize('NaN', 'number');\n }\n if (number === Infinity) {\n return options.stylize('Infinity', 'number');\n }\n if (number === -Infinity) {\n return options.stylize('-Infinity', 'number');\n }\n if (number === 0) {\n return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number');\n }\n return options.stylize(truncate(String(number), options.truncate), 'number');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAM,QAAQ,OAAO,WAAU,MAAK,MAAM;AAC1C,SAAwB,cAAc,QAAQ,SAAS;AACnD,KAAI,MAAM,OAAO,CACb,QAAO,QAAQ,QAAQ,OAAO,SAAS;AAE3C,KAAI,WAAW,SACX,QAAO,QAAQ,QAAQ,YAAY,SAAS;AAEhD,KAAI,WAAW,UACX,QAAO,QAAQ,QAAQ,aAAa,SAAS;AAEjD,KAAI,WAAW,EACX,QAAO,QAAQ,QAAQ,IAAI,WAAW,WAAW,OAAO,MAAM,SAAS;AAE3E,QAAO,QAAQ,QAAQ,SAAS,OAAO,OAAO,EAAE,QAAQ,SAAS,EAAE,SAAS"}
@@ -0,0 +1,22 @@
1
+ import { inspectList, inspectProperty } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/object.js
4
+ function inspectObject(object, options) {
5
+ const properties = Object.getOwnPropertyNames(object);
6
+ const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
7
+ if (properties.length === 0 && symbols.length === 0) return "{}";
8
+ options.truncate -= 4;
9
+ options.seen = options.seen || [];
10
+ if (options.seen.includes(object)) return "[Circular]";
11
+ options.seen.push(object);
12
+ const propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty);
13
+ const symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
14
+ options.seen.pop();
15
+ let sep = "";
16
+ if (propertyContents && symbolContents) sep = ", ";
17
+ return `{ ${propertyContents}${sep}${symbolContents} }`;
18
+ }
19
+
20
+ //#endregion
21
+ export { inspectObject as default };
22
+ //# sourceMappingURL=object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/object.js"],"sourcesContent":["import { inspectList, inspectProperty } from './helpers.js';\nexport default function inspectObject(object, options) {\n const properties = Object.getOwnPropertyNames(object);\n const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];\n if (properties.length === 0 && symbols.length === 0) {\n return '{}';\n }\n options.truncate -= 4;\n options.seen = options.seen || [];\n if (options.seen.includes(object)) {\n return '[Circular]';\n }\n options.seen.push(object);\n const propertyContents = inspectList(properties.map(key => [key, object[key]]), options, inspectProperty);\n const symbolContents = inspectList(symbols.map(key => [key, object[key]]), options, inspectProperty);\n options.seen.pop();\n let sep = '';\n if (propertyContents && symbolContents) {\n sep = ', ';\n }\n return `{ ${propertyContents}${sep}${symbolContents} }`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,cAAc,QAAQ,SAAS;CACnD,MAAM,aAAa,OAAO,oBAAoB,OAAO;CACrD,MAAM,UAAU,OAAO,wBAAwB,OAAO,sBAAsB,OAAO,GAAG,EAAE;AACxF,KAAI,WAAW,WAAW,KAAK,QAAQ,WAAW,EAC9C,QAAO;AAEX,SAAQ,YAAY;AACpB,SAAQ,OAAO,QAAQ,QAAQ,EAAE;AACjC,KAAI,QAAQ,KAAK,SAAS,OAAO,CAC7B,QAAO;AAEX,SAAQ,KAAK,KAAK,OAAO;CACzB,MAAM,mBAAmB,YAAY,WAAW,KAAI,QAAO,CAAC,KAAK,OAAO,KAAK,CAAC,EAAE,SAAS,gBAAgB;CACzG,MAAM,iBAAiB,YAAY,QAAQ,KAAI,QAAO,CAAC,KAAK,OAAO,KAAK,CAAC,EAAE,SAAS,gBAAgB;AACpG,SAAQ,KAAK,KAAK;CAClB,IAAI,MAAM;AACV,KAAI,oBAAoB,eACpB,OAAM;AAEV,QAAO,KAAK,mBAAmB,MAAM,eAAe"}
@@ -0,0 +1,6 @@
1
+ //#region node_modules/loupe/lib/promise.js
2
+ const getPromiseValue = () => "Promise{…}";
3
+
4
+ //#endregion
5
+ export { getPromiseValue as default };
6
+ //# sourceMappingURL=promise.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/promise.js"],"sourcesContent":["const getPromiseValue = () => 'Promise{…}';\nexport default getPromiseValue;\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,wBAAwB"}
@@ -0,0 +1,13 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/regexp.js
4
+ function inspectRegExp(value, options) {
5
+ const flags = value.toString().split("/")[2];
6
+ const sourceLength = options.truncate - (2 + flags.length);
7
+ const source = value.source;
8
+ return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
9
+ }
10
+
11
+ //#endregion
12
+ export { inspectRegExp as default };
13
+ //# sourceMappingURL=regexp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regexp.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/regexp.js"],"sourcesContent":["import { truncate } from './helpers.js';\nexport default function inspectRegExp(value, options) {\n const flags = value.toString().split('/')[2];\n const sourceLength = options.truncate - (2 + flags.length);\n const source = value.source;\n return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, 'regexp');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,SAAwB,cAAc,OAAO,SAAS;CAClD,MAAM,QAAQ,MAAM,UAAU,CAAC,MAAM,IAAI,CAAC;CAC1C,MAAM,eAAe,QAAQ,YAAY,IAAI,MAAM;CACnD,MAAM,SAAS,MAAM;AACrB,QAAO,QAAQ,QAAQ,IAAI,SAAS,QAAQ,aAAa,CAAC,GAAG,SAAS,SAAS"}
@@ -0,0 +1,19 @@
1
+ import { inspectList } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/set.js
4
+ function arrayFromSet(set) {
5
+ const values = [];
6
+ set.forEach((value) => {
7
+ values.push(value);
8
+ });
9
+ return values;
10
+ }
11
+ function inspectSet(set, options) {
12
+ if (set.size === 0) return "Set{}";
13
+ options.truncate -= 7;
14
+ return `Set{ ${inspectList(arrayFromSet(set), options)} }`;
15
+ }
16
+
17
+ //#endregion
18
+ export { inspectSet as default };
19
+ //# sourceMappingURL=set.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/set.js"],"sourcesContent":["import { inspectList } from './helpers.js';\n// IE11 doesn't support `Array.from(set)`\nfunction arrayFromSet(set) {\n const values = [];\n set.forEach(value => {\n values.push(value);\n });\n return values;\n}\nexport default function inspectSet(set, options) {\n if (set.size === 0)\n return 'Set{}';\n options.truncate -= 7;\n return `Set{ ${inspectList(arrayFromSet(set), options)} }`;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAS,aAAa,KAAK;CACvB,MAAM,SAAS,EAAE;AACjB,KAAI,SAAQ,UAAS;AACjB,SAAO,KAAK,MAAM;GACpB;AACF,QAAO;;AAEX,SAAwB,WAAW,KAAK,SAAS;AAC7C,KAAI,IAAI,SAAS,EACb,QAAO;AACX,SAAQ,YAAY;AACpB,QAAO,QAAQ,YAAY,aAAa,IAAI,EAAE,QAAQ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region node_modules/loupe/lib/string.js
4
+ const stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
5
+ const escapeCharacters = {
6
+ "\b": "\\b",
7
+ " ": "\\t",
8
+ "\n": "\\n",
9
+ "\f": "\\f",
10
+ "\r": "\\r",
11
+ "'": "\\'",
12
+ "\\": "\\\\"
13
+ };
14
+ const hex = 16;
15
+ const unicodeLength = 4;
16
+ function escape(char) {
17
+ return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
18
+ }
19
+ function inspectString(string, options) {
20
+ if (stringEscapeChars.test(string)) string = string.replace(stringEscapeChars, escape);
21
+ return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
22
+ }
23
+
24
+ //#endregion
25
+ export { inspectString as default };
26
+ //# sourceMappingURL=string.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.mjs","names":[],"sources":["../../../../node_modules/loupe/lib/string.js"],"sourcesContent":["import { truncate } from './helpers.js';\nconst stringEscapeChars = new RegExp(\"['\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\" +\n '\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]', 'g');\nconst escapeCharacters = {\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n \"'\": \"\\\\'\",\n '\\\\': '\\\\\\\\',\n};\nconst hex = 16;\nconst unicodeLength = 4;\nfunction escape(char) {\n return (escapeCharacters[char] ||\n `\\\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`);\n}\nexport default function inspectString(string, options) {\n if (stringEscapeChars.test(string)) {\n string = string.replace(stringEscapeChars, escape);\n }\n return options.stylize(`'${truncate(string, options.truncate - 2)}'`, 'string');\n}\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAM,oBAAoB,IAAI,OAAO,mJACuC,IAAI;AAChF,MAAM,mBAAmB;CACrB,MAAM;CACN,KAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,KAAK;CACL,MAAM;CACT;AACD,MAAM,MAAM;AACZ,MAAM,gBAAgB;AACtB,SAAS,OAAO,MAAM;AAClB,QAAQ,iBAAiB,SACrB,MAAM,OAAO,KAAK,WAAW,EAAE,CAAC,SAAS,IAAI,GAAG,MAAM,CAAC,cAAc;;AAE7E,SAAwB,cAAc,QAAQ,SAAS;AACnD,KAAI,kBAAkB,KAAK,OAAO,CAC9B,UAAS,OAAO,QAAQ,mBAAmB,OAAO;AAEtD,QAAO,QAAQ,QAAQ,IAAI,SAAS,QAAQ,QAAQ,WAAW,EAAE,CAAC,IAAI,SAAS"}