playwright 1.54.1 → 1.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +3 -3
  2. package/ThirdPartyNotices.txt +2727 -434
  3. package/lib/agents/generateAgents.js +263 -0
  4. package/lib/agents/generator.md +102 -0
  5. package/lib/agents/healer.md +78 -0
  6. package/lib/agents/planner.md +135 -0
  7. package/lib/common/config.js +3 -1
  8. package/lib/common/configLoader.js +2 -1
  9. package/lib/common/expectBundle.js +3 -0
  10. package/lib/common/expectBundleImpl.js +51 -51
  11. package/lib/common/fixtures.js +1 -1
  12. package/lib/common/suiteUtils.js +0 -9
  13. package/lib/index.js +127 -115
  14. package/lib/isomorphic/testTree.js +35 -8
  15. package/lib/matchers/expect.js +6 -7
  16. package/lib/matchers/matcherHint.js +43 -15
  17. package/lib/matchers/matchers.js +10 -4
  18. package/lib/matchers/toBeTruthy.js +16 -14
  19. package/lib/matchers/toEqual.js +18 -13
  20. package/lib/matchers/toHaveURL.js +12 -27
  21. package/lib/matchers/toMatchAriaSnapshot.js +26 -31
  22. package/lib/matchers/toMatchSnapshot.js +15 -12
  23. package/lib/matchers/toMatchText.js +29 -35
  24. package/lib/mcp/browser/actions.d.js +16 -0
  25. package/lib/mcp/browser/browserContextFactory.js +296 -0
  26. package/lib/mcp/browser/browserServerBackend.js +76 -0
  27. package/lib/mcp/browser/codegen.js +66 -0
  28. package/lib/mcp/browser/config.js +383 -0
  29. package/lib/mcp/browser/context.js +284 -0
  30. package/lib/mcp/browser/response.js +228 -0
  31. package/lib/mcp/browser/sessionLog.js +160 -0
  32. package/lib/mcp/browser/tab.js +277 -0
  33. package/lib/mcp/browser/tools/common.js +63 -0
  34. package/lib/mcp/browser/tools/console.js +44 -0
  35. package/lib/mcp/browser/tools/dialogs.js +60 -0
  36. package/lib/mcp/browser/tools/evaluate.js +70 -0
  37. package/lib/mcp/browser/tools/files.js +58 -0
  38. package/lib/mcp/browser/tools/form.js +74 -0
  39. package/lib/mcp/browser/tools/install.js +69 -0
  40. package/lib/mcp/browser/tools/keyboard.js +85 -0
  41. package/lib/mcp/browser/tools/mouse.js +107 -0
  42. package/lib/mcp/browser/tools/navigate.js +62 -0
  43. package/lib/mcp/browser/tools/network.js +54 -0
  44. package/lib/mcp/browser/tools/pdf.js +59 -0
  45. package/lib/mcp/browser/tools/screenshot.js +88 -0
  46. package/lib/mcp/browser/tools/snapshot.js +182 -0
  47. package/lib/mcp/browser/tools/tabs.js +67 -0
  48. package/lib/mcp/browser/tools/tool.js +49 -0
  49. package/lib/mcp/browser/tools/tracing.js +74 -0
  50. package/lib/mcp/browser/tools/utils.js +100 -0
  51. package/lib/mcp/browser/tools/verify.js +154 -0
  52. package/lib/mcp/browser/tools/wait.js +63 -0
  53. package/lib/mcp/browser/tools.js +80 -0
  54. package/lib/mcp/browser/watchdog.js +44 -0
  55. package/lib/mcp/config.d.js +16 -0
  56. package/lib/mcp/extension/cdpRelay.js +351 -0
  57. package/lib/mcp/extension/extensionContextFactory.js +75 -0
  58. package/lib/mcp/extension/protocol.js +28 -0
  59. package/lib/mcp/index.js +61 -0
  60. package/lib/mcp/log.js +35 -0
  61. package/lib/mcp/program.js +96 -0
  62. package/lib/mcp/sdk/bundle.js +81 -0
  63. package/lib/mcp/sdk/exports.js +32 -0
  64. package/lib/mcp/sdk/http.js +180 -0
  65. package/lib/mcp/sdk/inProcessTransport.js +71 -0
  66. package/lib/mcp/sdk/mdb.js +208 -0
  67. package/lib/mcp/sdk/proxyBackend.js +128 -0
  68. package/lib/mcp/sdk/server.js +190 -0
  69. package/lib/mcp/sdk/tool.js +51 -0
  70. package/lib/mcp/test/browserBackend.js +98 -0
  71. package/lib/mcp/test/generatorTools.js +122 -0
  72. package/lib/mcp/test/plannerTools.js +46 -0
  73. package/lib/mcp/test/seed.js +72 -0
  74. package/lib/mcp/test/streams.js +39 -0
  75. package/lib/mcp/test/testBackend.js +97 -0
  76. package/lib/mcp/test/testContext.js +176 -0
  77. package/lib/mcp/test/testTool.js +30 -0
  78. package/lib/mcp/test/testTools.js +115 -0
  79. package/lib/mcpBundleImpl.js +41 -0
  80. package/lib/plugins/webServerPlugin.js +2 -0
  81. package/lib/program.js +77 -57
  82. package/lib/reporters/base.js +34 -29
  83. package/lib/reporters/dot.js +11 -11
  84. package/lib/reporters/github.js +2 -1
  85. package/lib/reporters/html.js +58 -41
  86. package/lib/reporters/internalReporter.js +2 -1
  87. package/lib/reporters/line.js +15 -15
  88. package/lib/reporters/list.js +24 -19
  89. package/lib/reporters/listModeReporter.js +69 -0
  90. package/lib/reporters/markdown.js +3 -3
  91. package/lib/reporters/merge.js +3 -1
  92. package/lib/reporters/teleEmitter.js +3 -1
  93. package/lib/runner/dispatcher.js +9 -2
  94. package/lib/runner/failureTracker.js +12 -2
  95. package/lib/runner/lastRun.js +7 -4
  96. package/lib/runner/loadUtils.js +46 -12
  97. package/lib/runner/projectUtils.js +8 -2
  98. package/lib/runner/reporters.js +7 -32
  99. package/lib/runner/tasks.js +20 -10
  100. package/lib/runner/testRunner.js +390 -0
  101. package/lib/runner/testServer.js +57 -276
  102. package/lib/runner/watchMode.js +5 -1
  103. package/lib/runner/workerHost.js +8 -6
  104. package/lib/transform/babelBundleImpl.js +179 -195
  105. package/lib/transform/compilationCache.js +22 -5
  106. package/lib/transform/transform.js +1 -1
  107. package/lib/util.js +12 -35
  108. package/lib/utilsBundleImpl.js +1 -1
  109. package/lib/worker/fixtureRunner.js +7 -2
  110. package/lib/worker/testInfo.js +76 -45
  111. package/lib/worker/testTracing.js +8 -7
  112. package/lib/worker/workerMain.js +12 -3
  113. package/package.json +10 -2
  114. package/types/test.d.ts +63 -44
  115. package/types/testReporter.d.ts +1 -1
  116. package/lib/runner/runner.js +0 -110
@@ -49,6 +49,7 @@ module.exports = __toCommonJS(compilationCache_exports);
49
49
  var import_fs = __toESM(require("fs"));
50
50
  var import_os = __toESM(require("os"));
51
51
  var import_path = __toESM(require("path"));
52
+ var import_utils = require("playwright-core/lib/utils");
52
53
  var import_globals = require("../common/globals");
53
54
  var import_utilsBundle = require("../utilsBundle");
54
55
  const cacheDir = process.env.PWTEST_CACHE_DIR || (() => {
@@ -90,7 +91,7 @@ function _innerAddToCompilationCacheAndSerialize(filename, entry) {
90
91
  externalDependencies: []
91
92
  };
92
93
  }
93
- function getFromCompilationCache(filename, hash, moduleUrl) {
94
+ function getFromCompilationCache(filename, contentHash, moduleUrl) {
94
95
  const cache = memoryCache.get(filename);
95
96
  if (cache?.codePath) {
96
97
  try {
@@ -98,7 +99,10 @@ function getFromCompilationCache(filename, hash, moduleUrl) {
98
99
  } catch {
99
100
  }
100
101
  }
101
- const cachePath = calculateCachePath(filename, hash);
102
+ const filePathHash = calculateFilePathHash(filename);
103
+ const hashPrefix = filePathHash + "_" + contentHash.substring(0, 7);
104
+ const cacheFolderName = filePathHash.substring(0, 2);
105
+ const cachePath = calculateCachePath(filename, cacheFolderName, hashPrefix);
102
106
  const codePath = cachePath + ".js";
103
107
  const sourceMapPath = cachePath + ".map";
104
108
  const dataPath = cachePath + ".data";
@@ -112,6 +116,7 @@ function getFromCompilationCache(filename, hash, moduleUrl) {
112
116
  addToCache: (code, map, data) => {
113
117
  if ((0, import_globals.isWorkerProcess)())
114
118
  return {};
119
+ clearOldCacheEntries(cacheFolderName, filePathHash);
115
120
  import_fs.default.mkdirSync(import_path.default.dirname(cachePath), { recursive: true });
116
121
  if (map)
117
122
  import_fs.default.writeFileSync(sourceMapPath, JSON.stringify(map), "utf8");
@@ -145,9 +150,21 @@ function addToCompilationCache(payload) {
145
150
  externalDependencies.set(entry[0], /* @__PURE__ */ new Set([...entry[1], ...existing]));
146
151
  }
147
152
  }
148
- function calculateCachePath(filePath, hash) {
149
- const fileName = import_path.default.basename(filePath, import_path.default.extname(filePath)).replace(/\W/g, "") + "_" + hash;
150
- return import_path.default.join(cacheDir, hash[0] + hash[1], fileName);
153
+ function calculateFilePathHash(filePath) {
154
+ return (0, import_utils.calculateSha1)(filePath).substring(0, 10);
155
+ }
156
+ function calculateCachePath(filePath, cacheFolderName, hashPrefix) {
157
+ const fileName = hashPrefix + "_" + import_path.default.basename(filePath, import_path.default.extname(filePath)).replace(/\W/g, "");
158
+ return import_path.default.join(cacheDir, cacheFolderName, fileName);
159
+ }
160
+ function clearOldCacheEntries(cacheFolderName, filePathHash) {
161
+ const cachePath = import_path.default.join(cacheDir, cacheFolderName);
162
+ try {
163
+ const cachedRelevantFiles = import_fs.default.readdirSync(cachePath).filter((file) => file.startsWith(filePathHash));
164
+ for (const file of cachedRelevantFiles)
165
+ import_fs.default.rmSync(import_path.default.join(cachePath, file), { force: true });
166
+ } catch {
167
+ }
151
168
  }
152
169
  let depsCollector;
153
170
  function startCollectingFileDeps() {
@@ -40,11 +40,11 @@ __export(transform_exports, {
40
40
  wrapFunctionWithLocation: () => wrapFunctionWithLocation
41
41
  });
42
42
  module.exports = __toCommonJS(transform_exports);
43
- var import_crypto = __toESM(require("crypto"));
44
43
  var import_fs = __toESM(require("fs"));
45
44
  var import_module = __toESM(require("module"));
46
45
  var import_path = __toESM(require("path"));
47
46
  var import_url = __toESM(require("url"));
47
+ var import_crypto = __toESM(require("crypto"));
48
48
  var import_tsconfig_loader = require("../third_party/tsconfig-loader");
49
49
  var import_util = require("../util");
50
50
  var import_utilsBundle = require("../utilsBundle");
package/lib/util.js CHANGED
@@ -30,7 +30,6 @@ var util_exports = {};
30
30
  __export(util_exports, {
31
31
  addSuffixToFilePath: () => addSuffixToFilePath,
32
32
  ansiRegex: () => ansiRegex,
33
- callLogText: () => callLogText,
34
33
  createFileFiltersFromArguments: () => createFileFiltersFromArguments,
35
34
  createFileMatcher: () => createFileMatcher,
36
35
  createFileMatcherFromArguments: () => createFileMatcherFromArguments,
@@ -49,13 +48,13 @@ __export(util_exports, {
49
48
  getPackageJsonPath: () => getPackageJsonPath,
50
49
  mergeObjects: () => mergeObjects,
51
50
  normalizeAndSaveAttachment: () => normalizeAndSaveAttachment,
51
+ parseLocationArg: () => parseLocationArg,
52
52
  relativeFilePath: () => relativeFilePath,
53
53
  removeDirAndLogToConsole: () => removeDirAndLogToConsole,
54
54
  resolveImportSpecifierAfterMapping: () => resolveImportSpecifierAfterMapping,
55
55
  resolveReporterOutputPath: () => resolveReporterOutputPath,
56
56
  sanitizeFilePathBeforeExtension: () => sanitizeFilePathBeforeExtension,
57
57
  serializeError: () => serializeError,
58
- stepTitle: () => stepTitle,
59
58
  stripAnsiEscapes: () => stripAnsiEscapes,
60
59
  trimLongString: () => trimLongString,
61
60
  windowsFilesystemFriendlyLength: () => windowsFilesystemFriendlyLength
@@ -107,14 +106,18 @@ function serializeError(error) {
107
106
  value: import_util.default.inspect(error)
108
107
  };
109
108
  }
109
+ function parseLocationArg(arg) {
110
+ const match = /^(.*?):(\d+):?(\d+)?$/.exec(arg);
111
+ return {
112
+ file: match ? match[1] : arg,
113
+ line: match ? parseInt(match[2], 10) : null,
114
+ column: match?.[3] ? parseInt(match[3], 10) : null
115
+ };
116
+ }
110
117
  function createFileFiltersFromArguments(args) {
111
118
  return args.map((arg) => {
112
- const match = /^(.*?):(\d+):?(\d+)?$/.exec(arg);
113
- return {
114
- re: forceRegExp(match ? match[1] : arg),
115
- line: match ? parseInt(match[2], 10) : null,
116
- column: match?.[3] ? parseInt(match[3], 10) : null
117
- };
119
+ const parsed = parseLocationArg(arg);
120
+ return { re: forceRegExp(parsed.file), line: parsed.line, column: parsed.column };
118
121
  });
119
122
  }
120
123
  function createFileMatcherFromArguments(args) {
@@ -228,14 +231,6 @@ function getContainedPath(parentPath, subPath = "") {
228
231
  return null;
229
232
  }
230
233
  const debugTest = (0, import_utilsBundle.debug)("pw:test");
231
- const callLogText = (log) => {
232
- if (!log || !log.some((l) => !!l))
233
- return "";
234
- return `
235
- Call log:
236
- ${import_utilsBundle.colors.dim(log.join("\n"))}
237
- `;
238
- };
239
234
  const folderToPackageJsonPath = /* @__PURE__ */ new Map();
240
235
  function getPackageJsonPath(folderPath) {
241
236
  const cached = folderToPackageJsonPath.get(folderPath);
@@ -373,28 +368,10 @@ const ansiRegex = new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*
373
368
  function stripAnsiEscapes(str) {
374
369
  return str.replace(ansiRegex, "");
375
370
  }
376
- function stepTitle(category, title) {
377
- switch (category) {
378
- case "fixture":
379
- return `Fixture ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
380
- case "expect":
381
- return `Expect ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
382
- case "test.step":
383
- return title;
384
- case "test.attach":
385
- return `Attach ${(0, import_utils.escapeWithQuotes)(title, '"')}`;
386
- case "hook":
387
- case "pw:api":
388
- return title;
389
- default:
390
- return `[${category}] ${title}`;
391
- }
392
- }
393
371
  // Annotate the CommonJS export names for ESM import in node:
394
372
  0 && (module.exports = {
395
373
  addSuffixToFilePath,
396
374
  ansiRegex,
397
- callLogText,
398
375
  createFileFiltersFromArguments,
399
376
  createFileMatcher,
400
377
  createFileMatcherFromArguments,
@@ -413,13 +390,13 @@ function stepTitle(category, title) {
413
390
  getPackageJsonPath,
414
391
  mergeObjects,
415
392
  normalizeAndSaveAttachment,
393
+ parseLocationArg,
416
394
  relativeFilePath,
417
395
  removeDirAndLogToConsole,
418
396
  resolveImportSpecifierAfterMapping,
419
397
  resolveReporterOutputPath,
420
398
  sanitizeFilePathBeforeExtension,
421
399
  serializeError,
422
- stepTitle,
423
400
  stripAnsiEscapes,
424
401
  trimLongString,
425
402
  windowsFilesystemFriendlyLength
@@ -11,7 +11,7 @@
11
11
  `+v+"}"}}return s.pop(),n=v,F}function p(d){if(d.length===0)return h(d,!0);let v=String.fromCodePoint(d.codePointAt(0));if(!kr.isIdStartChar(v))return h(d,!0);for(let g=v.length;g<d.length;g++)if(!kr.isIdContinueChar(String.fromCodePoint(d.codePointAt(g))))return h(d,!0);return d}function D(d){if(s.indexOf(d)>=0)throw TypeError("Converting circular structure to JSON5");s.push(d);let v=n;n=n+a;let g=[];for(let F=0;F<d.length;F++){let B=c(String(F),d);g.push(B!==void 0?B:"null")}let w;if(g.length===0)w="[]";else if(a==="")w="["+g.join(",")+"]";else{let F=`,
12
12
  `+n,B=g.join(F);w=`[
13
13
  `+n+B+`,
14
- `+v+"]"}return s.pop(),n=v,w}}});var ln=y((wp,an)=>{var zl=nn(),Vl=on(),Kl={parse:zl,stringify:Vl};an.exports=Kl});var hn=y(Mr=>{var cn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Mr.encode=function(t){if(0<=t&&t<cn.length)return cn[t];throw new TypeError("Must be between 0 and 63: "+t)};Mr.decode=function(t){var e=65,r=90,i=97,s=122,n=48,u=57,o=43,a=47,l=26,c=52;return e<=t&&t<=r?t-e:i<=t&&t<=s?t-i+l:n<=t&&t<=u?t-n+c:t==o?62:t==a?63:-1}});var qr=y(Hr=>{var fn=hn(),$r=5,dn=1<<$r,pn=dn-1,Dn=dn;function Yl(t){return t<0?(-t<<1)+1:(t<<1)+0}function Ql(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Hr.encode=function(e){var r="",i,s=Yl(e);do i=s&pn,s>>>=$r,s>0&&(i|=Dn),r+=fn.encode(i);while(s>0);return r};Hr.decode=function(e,r,i){var s=e.length,n=0,u=0,o,a;do{if(r>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(a=fn.decode(e.charCodeAt(r++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(a&Dn),a&=pn,n=n+(a<<u),u+=$r}while(o);i.value=Ql(n),i.rest=r}});var ot=y(ae=>{function Xl(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}ae.getArg=Xl;var gn=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Zl=/^data:.+\,.+$/;function yt(t){var e=t.match(gn);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}ae.urlParse=yt;function nt(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}ae.urlGenerate=nt;function jr(t){var e=t,r=yt(t);if(r){if(!r.path)return t;e=r.path}for(var i=ae.isAbsolute(e),s=e.split(/\/+/),n,u=0,o=s.length-1;o>=0;o--)n=s[o],n==="."?s.splice(o,1):n===".."?u++:u>0&&(n===""?(s.splice(o+1,u),u=0):(s.splice(o,2),u--));return e=s.join("/"),e===""&&(e=i?"/":"."),r?(r.path=e,nt(r)):e}ae.normalize=jr;function mn(t,e){t===""&&(t="."),e===""&&(e=".");var r=yt(e),i=yt(t);if(i&&(t=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),nt(r);if(r||e.match(Zl))return e;if(i&&!i.host&&!i.path)return i.host=e,nt(i);var s=e.charAt(0)==="/"?e:jr(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=s,nt(i)):s}ae.join=mn;ae.isAbsolute=function(t){return t.charAt(0)==="/"||gn.test(t)};function Jl(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}ae.relative=Jl;var En=function(){var t=Object.create(null);return!("__proto__"in t)}();function Cn(t){return t}function ec(t){return An(t)?"$"+t:t}ae.toSetString=En?Cn:ec;function tc(t){return An(t)?t.slice(1):t}ae.fromSetString=En?Cn:tc;function An(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function rc(t,e,r){var i=ut(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:ut(t.name,e.name)}ae.compareByOriginalPositions=rc;function ic(t,e,r){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||r)||(i=ut(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:ut(t.name,e.name)}ae.compareByGeneratedPositionsDeflated=ic;function ut(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function sc(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=ut(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:ut(t.name,e.name)}ae.compareByGeneratedPositionsInflated=sc;function nc(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}ae.parseSourceMapInput=nc;function uc(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var i=yt(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var s=i.path.lastIndexOf("/");s>=0&&(i.path=i.path.substring(0,s+1))}e=mn(nt(i),e)}return jr(e)}ae.computeSourceURL=uc});var Ur=y(yn=>{var Gr=ot(),Wr=Object.prototype.hasOwnProperty,Ye=typeof Map!="undefined";function Pe(){this._array=[],this._set=Ye?new Map:Object.create(null)}Pe.fromArray=function(e,r){for(var i=new Pe,s=0,n=e.length;s<n;s++)i.add(e[s],r);return i};Pe.prototype.size=function(){return Ye?this._set.size:Object.getOwnPropertyNames(this._set).length};Pe.prototype.add=function(e,r){var i=Ye?e:Gr.toSetString(e),s=Ye?this.has(e):Wr.call(this._set,i),n=this._array.length;(!s||r)&&this._array.push(e),s||(Ye?this._set.set(e,n):this._set[i]=n)};Pe.prototype.has=function(e){if(Ye)return this._set.has(e);var r=Gr.toSetString(e);return Wr.call(this._set,r)};Pe.prototype.indexOf=function(e){if(Ye){var r=this._set.get(e);if(r>=0)return r}else{var i=Gr.toSetString(e);if(Wr.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};Pe.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Pe.prototype.toArray=function(){return this._array.slice()};yn.ArraySet=Pe});var _n=y(wn=>{var Fn=ot();function oc(t,e){var r=t.generatedLine,i=e.generatedLine,s=t.generatedColumn,n=e.generatedColumn;return i>r||i==r&&n>=s||Fn.compareByGeneratedPositionsInflated(t,e)<=0}function Yt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Yt.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Yt.prototype.add=function(e){oc(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Yt.prototype.toArray=function(){return this._sorted||(this._array.sort(Fn.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};wn.MappingList=Yt});var zr=y(bn=>{var Ft=qr(),Z=ot(),Qt=Ur().ArraySet,ac=_n().MappingList;function Ce(t){t||(t={}),this._file=Z.getArg(t,"file",null),this._sourceRoot=Z.getArg(t,"sourceRoot",null),this._skipValidation=Z.getArg(t,"skipValidation",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new ac,this._sourcesContents=null}Ce.prototype._version=3;Ce.fromSourceMap=function(e){var r=e.sourceRoot,i=new Ce({file:e.file,sourceRoot:r});return e.eachMapping(function(s){var n={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(n.source=s.source,r!=null&&(n.source=Z.relative(r,n.source)),n.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(n.name=s.name)),i.addMapping(n)}),e.sources.forEach(function(s){var n=s;r!==null&&(n=Z.relative(r,s)),i._sources.has(n)||i._sources.add(n);var u=e.sourceContentFor(s);u!=null&&i.setSourceContent(s,u)}),i};Ce.prototype.addMapping=function(e){var r=Z.getArg(e,"generated"),i=Z.getArg(e,"original",null),s=Z.getArg(e,"source",null),n=Z.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,i,s,n),s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),n!=null&&(n=String(n),this._names.has(n)||this._names.add(n)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:s,name:n})};Ce.prototype.setSourceContent=function(e,r){var i=e;this._sourceRoot!=null&&(i=Z.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Z.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Z.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ce.prototype.applySourceMap=function(e,r,i){var s=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var n=this._sourceRoot;n!=null&&(s=Z.relative(n,s));var u=new Qt,o=new Qt;this._mappings.unsortedForEach(function(a){if(a.source===s&&a.originalLine!=null){var l=e.originalPositionFor({line:a.originalLine,column:a.originalColumn});l.source!=null&&(a.source=l.source,i!=null&&(a.source=Z.join(i,a.source)),n!=null&&(a.source=Z.relative(n,a.source)),a.originalLine=l.line,a.originalColumn=l.column,l.name!=null&&(a.name=l.name))}var c=a.source;c!=null&&!u.has(c)&&u.add(c);var h=a.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=u,this._names=o,e.sources.forEach(function(a){var l=e.sourceContentFor(a);l!=null&&(i!=null&&(a=Z.join(i,a)),n!=null&&(a=Z.relative(n,a)),this.setSourceContent(a,l))},this)};Ce.prototype._validateMapping=function(e,r,i,s){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!s)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:s}))}};Ce.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,s=0,n=0,u=0,o="",a,l,c,h,f=this._mappings.toArray(),p=0,D=f.length;p<D;p++){if(l=f[p],a="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)a+=";",r++;else if(p>0){if(!Z.compareByGeneratedPositionsInflated(l,f[p-1]))continue;a+=","}a+=Ft.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),a+=Ft.encode(h-u),u=h,a+=Ft.encode(l.originalLine-1-s),s=l.originalLine-1,a+=Ft.encode(l.originalColumn-i),i=l.originalColumn,l.name!=null&&(c=this._names.indexOf(l.name),a+=Ft.encode(c-n),n=c)),o+=a}return o};Ce.prototype._generateSourcesContent=function(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=Z.relative(r,i));var s=Z.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};Ce.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Ce.prototype.toString=function(){return JSON.stringify(this.toJSON())};bn.SourceMapGenerator=Ce});var vn=y(Qe=>{Qe.GREATEST_LOWER_BOUND=1;Qe.LEAST_UPPER_BOUND=2;function Vr(t,e,r,i,s,n){var u=Math.floor((e-t)/2)+t,o=s(r,i[u],!0);return o===0?u:o>0?e-u>1?Vr(u,e,r,i,s,n):n==Qe.LEAST_UPPER_BOUND?e<i.length?e:-1:u:u-t>1?Vr(t,u,r,i,s,n):n==Qe.LEAST_UPPER_BOUND?u:t<0?-1:t}Qe.search=function(e,r,i,s){if(r.length===0)return-1;var n=Vr(-1,r.length,e,r,i,s||Qe.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&i(r[n],r[n-1],!0)===0;)--n;return n}});var Sn=y(xn=>{function Kr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function lc(t,e){return Math.round(t+Math.random()*(e-t))}function Yr(t,e,r,i){if(r<i){var s=lc(r,i),n=r-1;Kr(t,s,i);for(var u=t[i],o=r;o<i;o++)e(t[o],u)<=0&&(n+=1,Kr(t,n,o));Kr(t,n+1,o);var a=n+1;Yr(t,e,r,a-1),Yr(t,e,a+1,i)}}xn.quickSort=function(t,e){Yr(t,e,0,t.length-1)}});var Rn=y(Xt=>{var x=ot(),Qr=vn(),at=Ur().ArraySet,cc=qr(),wt=Sn().quickSort;function V(t,e){var r=t;return typeof t=="string"&&(r=x.parseSourceMapInput(t)),r.sections!=null?new we(r,e):new ue(r,e)}V.fromSourceMap=function(t,e){return ue.fromSourceMap(t,e)};V.prototype._version=3;V.prototype.__generatedMappings=null;Object.defineProperty(V.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});V.prototype.__originalMappings=null;Object.defineProperty(V.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});V.prototype._charIsMappingSeparator=function(e,r){var i=e.charAt(r);return i===";"||i===","};V.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};V.GENERATED_ORDER=1;V.ORIGINAL_ORDER=2;V.GREATEST_LOWER_BOUND=1;V.LEAST_UPPER_BOUND=2;V.prototype.eachMapping=function(e,r,i){var s=r||null,n=i||V.GENERATED_ORDER,u;switch(n){case V.GENERATED_ORDER:u=this._generatedMappings;break;case V.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;u.map(function(a){var l=a.source===null?null:this._sources.at(a.source);return l=x.computeSourceURL(o,l,this._sourceMapURL),{source:l,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,originalLine:a.originalLine,originalColumn:a.originalColumn,name:a.name===null?null:this._names.at(a.name)}},this).forEach(e,s)};V.prototype.allGeneratedPositionsFor=function(e){var r=x.getArg(e,"line"),i={source:x.getArg(e,"source"),originalLine:r,originalColumn:x.getArg(e,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var s=[],n=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,Qr.LEAST_UPPER_BOUND);if(n>=0){var u=this._originalMappings[n];if(e.column===void 0)for(var o=u.originalLine;u&&u.originalLine===o;)s.push({line:x.getArg(u,"generatedLine",null),column:x.getArg(u,"generatedColumn",null),lastColumn:x.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++n];else for(var a=u.originalColumn;u&&u.originalLine===r&&u.originalColumn==a;)s.push({line:x.getArg(u,"generatedLine",null),column:x.getArg(u,"generatedColumn",null),lastColumn:x.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++n]}return s};Xt.SourceMapConsumer=V;function ue(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var i=x.getArg(r,"version"),s=x.getArg(r,"sources"),n=x.getArg(r,"names",[]),u=x.getArg(r,"sourceRoot",null),o=x.getArg(r,"sourcesContent",null),a=x.getArg(r,"mappings"),l=x.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=x.normalize(u)),s=s.map(String).map(x.normalize).map(function(c){return u&&x.isAbsolute(u)&&x.isAbsolute(c)?x.relative(u,c):c}),this._names=at.fromArray(n.map(String),!0),this._sources=at.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(c){return x.computeSourceURL(u,c,e)}),this.sourceRoot=u,this.sourcesContent=o,this._mappings=a,this._sourceMapURL=e,this.file=l}ue.prototype=Object.create(V.prototype);ue.prototype.consumer=V;ue.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=x.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};ue.fromSourceMap=function(e,r){var i=Object.create(ue.prototype),s=i._names=at.fromArray(e._names.toArray(),!0),n=i._sources=at.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=r,i._absoluteSources=i._sources.toArray().map(function(p){return x.computeSourceURL(i.sourceRoot,p,r)});for(var u=e._mappings.toArray().slice(),o=i.__generatedMappings=[],a=i.__originalMappings=[],l=0,c=u.length;l<c;l++){var h=u[l],f=new Bn;f.generatedLine=h.generatedLine,f.generatedColumn=h.generatedColumn,h.source&&(f.source=n.indexOf(h.source),f.originalLine=h.originalLine,f.originalColumn=h.originalColumn,h.name&&(f.name=s.indexOf(h.name)),a.push(f)),o.push(f)}return wt(i.__originalMappings,x.compareByOriginalPositions),i};ue.prototype._version=3;Object.defineProperty(ue.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Bn(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ue.prototype._parseMappings=function(e,r){for(var i=1,s=0,n=0,u=0,o=0,a=0,l=e.length,c=0,h={},f={},p=[],D=[],d,v,g,w,F;c<l;)if(e.charAt(c)===";")i++,c++,s=0;else if(e.charAt(c)===",")c++;else{for(d=new Bn,d.generatedLine=i,w=c;w<l&&!this._charIsMappingSeparator(e,w);w++);if(v=e.slice(c,w),g=h[v],g)c+=v.length;else{for(g=[];c<w;)cc.decode(e,c,f),F=f.value,c=f.rest,g.push(F);if(g.length===2)throw new Error("Found a source, but no line and column");if(g.length===3)throw new Error("Found a source and line, but no column");h[v]=g}d.generatedColumn=s+g[0],s=d.generatedColumn,g.length>1&&(d.source=o+g[1],o+=g[1],d.originalLine=n+g[2],n=d.originalLine,d.originalLine+=1,d.originalColumn=u+g[3],u=d.originalColumn,g.length>4&&(d.name=a+g[4],a+=g[4])),D.push(d),typeof d.originalLine=="number"&&p.push(d)}wt(D,x.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,wt(p,x.compareByOriginalPositions),this.__originalMappings=p};ue.prototype._findMapping=function(e,r,i,s,n,u){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[s]);return Qr.search(e,r,n,u)};ue.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(r.generatedLine===i.generatedLine){r.lastGeneratedColumn=i.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};ue.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},i=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",x.compareByGeneratedPositionsDeflated,x.getArg(e,"bias",V.GREATEST_LOWER_BOUND));if(i>=0){var s=this._generatedMappings[i];if(s.generatedLine===r.generatedLine){var n=x.getArg(s,"source",null);n!==null&&(n=this._sources.at(n),n=x.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var u=x.getArg(s,"name",null);return u!==null&&(u=this._names.at(u)),{source:n,line:x.getArg(s,"originalLine",null),column:x.getArg(s,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};ue.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ue.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];var s=e;this.sourceRoot!=null&&(s=x.relative(this.sourceRoot,s));var n;if(this.sourceRoot!=null&&(n=x.urlParse(this.sourceRoot))){var u=s.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];if((!n.path||n.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(r)return null;throw new Error('"'+s+'" is not in the SourceMap.')};ue.prototype.generatedPositionFor=function(e){var r=x.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var i={source:r,originalLine:x.getArg(e,"line"),originalColumn:x.getArg(e,"column")},s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,x.getArg(e,"bias",V.GREATEST_LOWER_BOUND));if(s>=0){var n=this._originalMappings[s];if(n.source===i.source)return{line:x.getArg(n,"generatedLine",null),column:x.getArg(n,"generatedColumn",null),lastColumn:x.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Xt.BasicSourceMapConsumer=ue;function we(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var i=x.getArg(r,"version"),s=x.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new at,this._names=new at;var n={line:-1,column:0};this._sections=s.map(function(u){if(u.url)throw new Error("Support for url field in sections not implemented.");var o=x.getArg(u,"offset"),a=x.getArg(o,"line"),l=x.getArg(o,"column");if(a<n.line||a===n.line&&l<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=o,{generatedOffset:{generatedLine:a+1,generatedColumn:l+1},consumer:new V(x.getArg(u,"map"),e)}})}we.prototype=Object.create(V.prototype);we.prototype.constructor=V;we.prototype._version=3;Object.defineProperty(we.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});we.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},i=Qr.search(r,this._sections,function(n,u){var o=n.generatedLine-u.generatedOffset.generatedLine;return o||n.generatedColumn-u.generatedOffset.generatedColumn}),s=this._sections[i];return s?s.consumer.originalPositionFor({line:r.generatedLine-(s.generatedOffset.generatedLine-1),column:r.generatedColumn-(s.generatedOffset.generatedLine===r.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};we.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};we.prototype.sourceContentFor=function(e,r){for(var i=0;i<this._sections.length;i++){var s=this._sections[i],n=s.consumer.sourceContentFor(e,!0);if(n)return n}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};we.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var i=this._sections[r];if(i.consumer._findSourceIndex(x.getArg(e,"source"))!==-1){var s=i.consumer.generatedPositionFor(e);if(s){var n={line:s.line+(i.generatedOffset.generatedLine-1),column:s.column+(i.generatedOffset.generatedLine===s.line?i.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}};we.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var s=this._sections[i],n=s.consumer._generatedMappings,u=0;u<n.length;u++){var o=n[u],a=s.consumer._sources.at(o.source);a=x.computeSourceURL(s.consumer.sourceRoot,a,this._sourceMapURL),this._sources.add(a),a=this._sources.indexOf(a);var l=null;o.name&&(l=s.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var c={source:a,generatedLine:o.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(s.generatedOffset.generatedLine===o.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(c),typeof c.originalLine=="number"&&this.__originalMappings.push(c)}wt(this.__generatedMappings,x.compareByGeneratedPositionsDeflated),wt(this.__originalMappings,x.compareByOriginalPositions)};Xt.IndexedSourceMapConsumer=we});var Ln=y(On=>{var hc=zr().SourceMapGenerator,Zt=ot(),fc=/(\r?\n)/,dc=10,lt="$$$isSourceNode$$$";function ge(t,e,r,i,s){this.children=[],this.sourceContents={},this.line=t==null?null:t,this.column=e==null?null:e,this.source=r==null?null:r,this.name=s==null?null:s,this[lt]=!0,i!=null&&this.add(i)}ge.fromStringWithSourceMap=function(e,r,i){var s=new ge,n=e.split(fc),u=0,o=function(){var f=D(),p=D()||"";return f+p;function D(){return u<n.length?n[u++]:void 0}},a=1,l=0,c=null;return r.eachMapping(function(f){if(c!==null)if(a<f.generatedLine)h(c,o()),a++,l=0;else{var p=n[u]||"",D=p.substr(0,f.generatedColumn-l);n[u]=p.substr(f.generatedColumn-l),l=f.generatedColumn,h(c,D),c=f;return}for(;a<f.generatedLine;)s.add(o()),a++;if(l<f.generatedColumn){var p=n[u]||"";s.add(p.substr(0,f.generatedColumn)),n[u]=p.substr(f.generatedColumn),l=f.generatedColumn}c=f},this),u<n.length&&(c&&h(c,o()),s.add(n.splice(u).join(""))),r.sources.forEach(function(f){var p=r.sourceContentFor(f);p!=null&&(i!=null&&(f=Zt.join(i,f)),s.setSourceContent(f,p))}),s;function h(f,p){if(f===null||f.source===void 0)s.add(p);else{var D=i?Zt.join(i,f.source):f.source;s.add(new ge(f.originalLine,f.originalColumn,D,p,f.name))}}};ge.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[lt]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[lt]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.walk=function(e){for(var r,i=0,s=this.children.length;i<s;i++)r=this.children[i],r[lt]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};ge.prototype.join=function(e){var r,i,s=this.children.length;if(s>0){for(r=[],i=0;i<s-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this};ge.prototype.replaceRight=function(e,r){var i=this.children[this.children.length-1];return i[lt]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this};ge.prototype.setSourceContent=function(e,r){this.sourceContents[Zt.toSetString(e)]=r};ge.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][lt]&&this.children[r].walkSourceContents(e);for(var s=Object.keys(this.sourceContents),r=0,i=s.length;r<i;r++)e(Zt.fromSetString(s[r]),this.sourceContents[s[r]])};ge.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};ge.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},i=new hc(e),s=!1,n=null,u=null,o=null,a=null;return this.walk(function(l,c){r.code+=l,c.source!==null&&c.line!==null&&c.column!==null?((n!==c.source||u!==c.line||o!==c.column||a!==c.name)&&i.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:r.line,column:r.column},name:c.name}),n=c.source,u=c.line,o=c.column,a=c.name,s=!0):s&&(i.addMapping({generated:{line:r.line,column:r.column}}),n=null,s=!1);for(var h=0,f=l.length;h<f;h++)l.charCodeAt(h)===dc?(r.line++,r.column=0,h+1===f?(n=null,s=!1):s&&i.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:r.line,column:r.column},name:c.name})):r.column++}),this.walkSourceContents(function(l,c){i.setSourceContent(l,c)}),{code:r.code,map:i}};On.SourceNode=ge});var Tn=y(Jt=>{Jt.SourceMapGenerator=zr().SourceMapGenerator;Jt.SourceMapConsumer=Rn().SourceMapConsumer;Jt.SourceNode=Ln().SourceNode});var Pn=y((Pp,Nn)=>{var pc=Object.prototype.toString,Xr=typeof Buffer!="undefined"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function Dc(t){return pc.call(t).slice(8,-1)==="ArrayBuffer"}function gc(t,e,r){e>>>=0;var i=t.byteLength-e;if(i<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=i;else if(r>>>=0,r>i)throw new RangeError("'length' is out of bounds");return Xr?Buffer.from(t.slice(e,e+r)):new Buffer(new Uint8Array(t.slice(e,e+r)))}function mc(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Buffer.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');return Xr?Buffer.from(t,e):new Buffer(t,e)}function Ec(t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return Dc(t)?gc(t,e,r):typeof t=="string"?mc(t,e):Xr?Buffer.from(t):new Buffer(t)}Nn.exports=Ec});var Gn=y((Ze,ti)=>{var Cc=Tn().SourceMapConsumer,Zr=require("path"),Re;try{Re=require("fs"),(!Re.existsSync||!Re.readFileSync)&&(Re=null)}catch{}var Ac=Pn();function In(t,e){return t.require(e)}var kn=!1,Mn=!1,Jr=!1,_t="auto",Xe={},bt={},yc=/^data:application\/json[^,]+base64,/,qe=[],je=[];function ri(){return _t==="browser"?!0:_t==="node"?!1:typeof window!="undefined"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function Fc(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function wc(){return typeof process=="object"&&process!==null?process.version:""}function _c(){if(typeof process=="object"&&process!==null)return process.stderr}function bc(t){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(t)}function er(t){return function(e){for(var r=0;r<t.length;r++){var i=t[r](e);if(i)return i}return null}}var ii=er(qe);qe.push(function(t){if(t=t.trim(),/^file:/.test(t)&&(t=t.replace(/file:\/\/\/(\w:)?/,function(i,s){return s?"":"/"})),t in Xe)return Xe[t];var e="";try{if(Re)Re.existsSync(t)&&(e=Re.readFileSync(t,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",t,!1),r.send(null),r.readyState===4&&r.status===200&&(e=r.responseText)}}catch{}return Xe[t]=e});function ei(t,e){if(!t)return e;var r=Zr.dirname(t),i=/^\w+:\/\/[^\/]*/.exec(r),s=i?i[0]:"",n=r.slice(s.length);return s&&/^\/\w\:/.test(n)?(s+="/",s+Zr.resolve(r.slice(s.length),e).replace(/\\/g,"/")):s+Zr.resolve(r.slice(s.length),e)}function vc(t){var e;if(ri())try{var r=new XMLHttpRequest;r.open("GET",t,!1),r.send(null),e=r.readyState===4?r.responseText:null;var i=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(i)return i}catch{}e=ii(t);for(var s=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,n,u;u=s.exec(e);)n=u;return n?n[1]:null}var si=er(je);je.push(function(t){var e=vc(t);if(!e)return null;var r;if(yc.test(e)){var i=e.slice(e.indexOf(",")+1);r=Ac(i,"base64").toString(),e=t}else e=ei(t,e),r=ii(e);return r?{url:e,map:r}:null});function ni(t){var e=bt[t.source];if(!e){var r=si(t.source);r?(e=bt[t.source]={url:r.url,map:new Cc(r.map)},e.map.sourcesContent&&e.map.sources.forEach(function(s,n){var u=e.map.sourcesContent[n];if(u){var o=ei(e.url,s);Xe[o]=u}})):e=bt[t.source]={url:null,map:null}}if(e&&e.map&&typeof e.map.originalPositionFor=="function"){var i=e.map.originalPositionFor(t);if(i.source!==null)return i.source=ei(e.url,i.source),i}return t}function Hn(t){var e=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(t);if(e){var r=ni({source:e[2],line:+e[3],column:e[4]-1});return"eval at "+e[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return e=/^eval at ([^(]+) \((.+)\)$/.exec(t),e?"eval at "+e[1]+" ("+Hn(e[2])+")":t}function xc(){var t,e="";if(this.isNative())e="native";else{t=this.getScriptNameOrSourceURL(),!t&&this.isEval()&&(e=this.getEvalOrigin(),e+=", "),t?e+=t:e+="<anonymous>";var r=this.getLineNumber();if(r!=null){e+=":"+r;var i=this.getColumnNumber();i&&(e+=":"+i)}}var s="",n=this.getFunctionName(),u=!0,o=this.isConstructor(),a=!(this.isToplevel()||o);if(a){var l=this.getTypeName();l==="[object Object]"&&(l="null");var c=this.getMethodName();n?(l&&n.indexOf(l)!=0&&(s+=l+"."),s+=n,c&&n.indexOf("."+c)!=n.length-c.length-1&&(s+=" [as "+c+"]")):s+=l+"."+(c||"<anonymous>")}else o?s+="new "+(n||"<anonymous>"):n?s+=n:(s+=e,u=!1);return u&&(s+=" ("+e+")"),s}function $n(t){var e={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(function(r){e[r]=/^(?:is|get)/.test(r)?function(){return t[r].call(t)}:t[r]}),e.toString=xc,e}function qn(t,e){if(e===void 0&&(e={nextPosition:null,curPosition:null}),t.isNative())return e.curPosition=null,t;var r=t.getFileName()||t.getScriptNameOrSourceURL();if(r){var i=t.getLineNumber(),s=t.getColumnNumber()-1,n=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,u=n.test(wc())?0:62;i===1&&s>u&&!ri()&&!t.isEval()&&(s-=u);var o=ni({source:r,line:i,column:s});e.curPosition=o,t=$n(t);var a=t.getFunctionName;return t.getFunctionName=function(){return e.nextPosition==null?a():e.nextPosition.name||a()},t.getFileName=function(){return o.source},t.getLineNumber=function(){return o.line},t.getColumnNumber=function(){return o.column+1},t.getScriptNameOrSourceURL=function(){return o.source},t}var l=t.isEval()&&t.getEvalOrigin();return l&&(l=Hn(l),t=$n(t),t.getEvalOrigin=function(){return l}),t}function Sc(t,e){Jr&&(Xe={},bt={});for(var r=t.name||"Error",i=t.message||"",s=r+": "+i,n={nextPosition:null,curPosition:null},u=[],o=e.length-1;o>=0;o--)u.push(`
14
+ `+v+"]"}return s.pop(),n=v,w}}});var ln=y((wp,an)=>{var zl=nn(),Vl=on(),Kl={parse:zl,stringify:Vl};an.exports=Kl});var hn=y(Mr=>{var cn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Mr.encode=function(t){if(0<=t&&t<cn.length)return cn[t];throw new TypeError("Must be between 0 and 63: "+t)};Mr.decode=function(t){var e=65,r=90,i=97,s=122,n=48,u=57,o=43,a=47,l=26,c=52;return e<=t&&t<=r?t-e:i<=t&&t<=s?t-i+l:n<=t&&t<=u?t-n+c:t==o?62:t==a?63:-1}});var qr=y(Hr=>{var fn=hn(),$r=5,dn=1<<$r,pn=dn-1,Dn=dn;function Yl(t){return t<0?(-t<<1)+1:(t<<1)+0}function Ql(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Hr.encode=function(e){var r="",i,s=Yl(e);do i=s&pn,s>>>=$r,s>0&&(i|=Dn),r+=fn.encode(i);while(s>0);return r};Hr.decode=function(e,r,i){var s=e.length,n=0,u=0,o,a;do{if(r>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(a=fn.decode(e.charCodeAt(r++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(a&Dn),a&=pn,n=n+(a<<u),u+=$r}while(o);i.value=Ql(n),i.rest=r}});var ot=y(ae=>{function Xl(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}ae.getArg=Xl;var gn=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Zl=/^data:.+\,.+$/;function yt(t){var e=t.match(gn);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}ae.urlParse=yt;function nt(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}ae.urlGenerate=nt;function jr(t){var e=t,r=yt(t);if(r){if(!r.path)return t;e=r.path}for(var i=ae.isAbsolute(e),s=e.split(/\/+/),n,u=0,o=s.length-1;o>=0;o--)n=s[o],n==="."?s.splice(o,1):n===".."?u++:u>0&&(n===""?(s.splice(o+1,u),u=0):(s.splice(o,2),u--));return e=s.join("/"),e===""&&(e=i?"/":"."),r?(r.path=e,nt(r)):e}ae.normalize=jr;function mn(t,e){t===""&&(t="."),e===""&&(e=".");var r=yt(e),i=yt(t);if(i&&(t=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),nt(r);if(r||e.match(Zl))return e;if(i&&!i.host&&!i.path)return i.host=e,nt(i);var s=e.charAt(0)==="/"?e:jr(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=s,nt(i)):s}ae.join=mn;ae.isAbsolute=function(t){return t.charAt(0)==="/"||gn.test(t)};function Jl(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}ae.relative=Jl;var En=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Cn(t){return t}function ec(t){return An(t)?"$"+t:t}ae.toSetString=En?Cn:ec;function tc(t){return An(t)?t.slice(1):t}ae.fromSetString=En?Cn:tc;function An(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function rc(t,e,r){var i=ut(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:ut(t.name,e.name)}ae.compareByOriginalPositions=rc;function ic(t,e,r){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||r)||(i=ut(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:ut(t.name,e.name)}ae.compareByGeneratedPositionsDeflated=ic;function ut(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function sc(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=ut(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:ut(t.name,e.name)}ae.compareByGeneratedPositionsInflated=sc;function nc(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}ae.parseSourceMapInput=nc;function uc(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var i=yt(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var s=i.path.lastIndexOf("/");s>=0&&(i.path=i.path.substring(0,s+1))}e=mn(nt(i),e)}return jr(e)}ae.computeSourceURL=uc});var Ur=y(yn=>{var Gr=ot(),Wr=Object.prototype.hasOwnProperty,Ye=typeof Map!="undefined";function Pe(){this._array=[],this._set=Ye?new Map:Object.create(null)}Pe.fromArray=function(e,r){for(var i=new Pe,s=0,n=e.length;s<n;s++)i.add(e[s],r);return i};Pe.prototype.size=function(){return Ye?this._set.size:Object.getOwnPropertyNames(this._set).length};Pe.prototype.add=function(e,r){var i=Ye?e:Gr.toSetString(e),s=Ye?this.has(e):Wr.call(this._set,i),n=this._array.length;(!s||r)&&this._array.push(e),s||(Ye?this._set.set(e,n):this._set[i]=n)};Pe.prototype.has=function(e){if(Ye)return this._set.has(e);var r=Gr.toSetString(e);return Wr.call(this._set,r)};Pe.prototype.indexOf=function(e){if(Ye){var r=this._set.get(e);if(r>=0)return r}else{var i=Gr.toSetString(e);if(Wr.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};Pe.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Pe.prototype.toArray=function(){return this._array.slice()};yn.ArraySet=Pe});var _n=y(wn=>{var Fn=ot();function oc(t,e){var r=t.generatedLine,i=e.generatedLine,s=t.generatedColumn,n=e.generatedColumn;return i>r||i==r&&n>=s||Fn.compareByGeneratedPositionsInflated(t,e)<=0}function Yt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Yt.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Yt.prototype.add=function(e){oc(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Yt.prototype.toArray=function(){return this._sorted||(this._array.sort(Fn.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};wn.MappingList=Yt});var zr=y(bn=>{var Ft=qr(),Z=ot(),Qt=Ur().ArraySet,ac=_n().MappingList;function Ce(t){t||(t={}),this._file=Z.getArg(t,"file",null),this._sourceRoot=Z.getArg(t,"sourceRoot",null),this._skipValidation=Z.getArg(t,"skipValidation",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new ac,this._sourcesContents=null}Ce.prototype._version=3;Ce.fromSourceMap=function(e){var r=e.sourceRoot,i=new Ce({file:e.file,sourceRoot:r});return e.eachMapping(function(s){var n={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(n.source=s.source,r!=null&&(n.source=Z.relative(r,n.source)),n.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(n.name=s.name)),i.addMapping(n)}),e.sources.forEach(function(s){var n=s;r!==null&&(n=Z.relative(r,s)),i._sources.has(n)||i._sources.add(n);var u=e.sourceContentFor(s);u!=null&&i.setSourceContent(s,u)}),i};Ce.prototype.addMapping=function(e){var r=Z.getArg(e,"generated"),i=Z.getArg(e,"original",null),s=Z.getArg(e,"source",null),n=Z.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,i,s,n),s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),n!=null&&(n=String(n),this._names.has(n)||this._names.add(n)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:s,name:n})};Ce.prototype.setSourceContent=function(e,r){var i=e;this._sourceRoot!=null&&(i=Z.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Z.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Z.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ce.prototype.applySourceMap=function(e,r,i){var s=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var n=this._sourceRoot;n!=null&&(s=Z.relative(n,s));var u=new Qt,o=new Qt;this._mappings.unsortedForEach(function(a){if(a.source===s&&a.originalLine!=null){var l=e.originalPositionFor({line:a.originalLine,column:a.originalColumn});l.source!=null&&(a.source=l.source,i!=null&&(a.source=Z.join(i,a.source)),n!=null&&(a.source=Z.relative(n,a.source)),a.originalLine=l.line,a.originalColumn=l.column,l.name!=null&&(a.name=l.name))}var c=a.source;c!=null&&!u.has(c)&&u.add(c);var h=a.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=u,this._names=o,e.sources.forEach(function(a){var l=e.sourceContentFor(a);l!=null&&(i!=null&&(a=Z.join(i,a)),n!=null&&(a=Z.relative(n,a)),this.setSourceContent(a,l))},this)};Ce.prototype._validateMapping=function(e,r,i,s){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!s)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:s}))}};Ce.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,s=0,n=0,u=0,o="",a,l,c,h,f=this._mappings.toArray(),p=0,D=f.length;p<D;p++){if(l=f[p],a="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)a+=";",r++;else if(p>0){if(!Z.compareByGeneratedPositionsInflated(l,f[p-1]))continue;a+=","}a+=Ft.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),a+=Ft.encode(h-u),u=h,a+=Ft.encode(l.originalLine-1-s),s=l.originalLine-1,a+=Ft.encode(l.originalColumn-i),i=l.originalColumn,l.name!=null&&(c=this._names.indexOf(l.name),a+=Ft.encode(c-n),n=c)),o+=a}return o};Ce.prototype._generateSourcesContent=function(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=Z.relative(r,i));var s=Z.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};Ce.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Ce.prototype.toString=function(){return JSON.stringify(this.toJSON())};bn.SourceMapGenerator=Ce});var vn=y(Qe=>{Qe.GREATEST_LOWER_BOUND=1;Qe.LEAST_UPPER_BOUND=2;function Vr(t,e,r,i,s,n){var u=Math.floor((e-t)/2)+t,o=s(r,i[u],!0);return o===0?u:o>0?e-u>1?Vr(u,e,r,i,s,n):n==Qe.LEAST_UPPER_BOUND?e<i.length?e:-1:u:u-t>1?Vr(t,u,r,i,s,n):n==Qe.LEAST_UPPER_BOUND?u:t<0?-1:t}Qe.search=function(e,r,i,s){if(r.length===0)return-1;var n=Vr(-1,r.length,e,r,i,s||Qe.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&i(r[n],r[n-1],!0)===0;)--n;return n}});var Sn=y(xn=>{function Kr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function lc(t,e){return Math.round(t+Math.random()*(e-t))}function Yr(t,e,r,i){if(r<i){var s=lc(r,i),n=r-1;Kr(t,s,i);for(var u=t[i],o=r;o<i;o++)e(t[o],u)<=0&&(n+=1,Kr(t,n,o));Kr(t,n+1,o);var a=n+1;Yr(t,e,r,a-1),Yr(t,e,a+1,i)}}xn.quickSort=function(t,e){Yr(t,e,0,t.length-1)}});var Rn=y(Xt=>{var x=ot(),Qr=vn(),at=Ur().ArraySet,cc=qr(),wt=Sn().quickSort;function V(t,e){var r=t;return typeof t=="string"&&(r=x.parseSourceMapInput(t)),r.sections!=null?new we(r,e):new ue(r,e)}V.fromSourceMap=function(t,e){return ue.fromSourceMap(t,e)};V.prototype._version=3;V.prototype.__generatedMappings=null;Object.defineProperty(V.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});V.prototype.__originalMappings=null;Object.defineProperty(V.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});V.prototype._charIsMappingSeparator=function(e,r){var i=e.charAt(r);return i===";"||i===","};V.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};V.GENERATED_ORDER=1;V.ORIGINAL_ORDER=2;V.GREATEST_LOWER_BOUND=1;V.LEAST_UPPER_BOUND=2;V.prototype.eachMapping=function(e,r,i){var s=r||null,n=i||V.GENERATED_ORDER,u;switch(n){case V.GENERATED_ORDER:u=this._generatedMappings;break;case V.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;u.map(function(a){var l=a.source===null?null:this._sources.at(a.source);return l=x.computeSourceURL(o,l,this._sourceMapURL),{source:l,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,originalLine:a.originalLine,originalColumn:a.originalColumn,name:a.name===null?null:this._names.at(a.name)}},this).forEach(e,s)};V.prototype.allGeneratedPositionsFor=function(e){var r=x.getArg(e,"line"),i={source:x.getArg(e,"source"),originalLine:r,originalColumn:x.getArg(e,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var s=[],n=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,Qr.LEAST_UPPER_BOUND);if(n>=0){var u=this._originalMappings[n];if(e.column===void 0)for(var o=u.originalLine;u&&u.originalLine===o;)s.push({line:x.getArg(u,"generatedLine",null),column:x.getArg(u,"generatedColumn",null),lastColumn:x.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++n];else for(var a=u.originalColumn;u&&u.originalLine===r&&u.originalColumn==a;)s.push({line:x.getArg(u,"generatedLine",null),column:x.getArg(u,"generatedColumn",null),lastColumn:x.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++n]}return s};Xt.SourceMapConsumer=V;function ue(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var i=x.getArg(r,"version"),s=x.getArg(r,"sources"),n=x.getArg(r,"names",[]),u=x.getArg(r,"sourceRoot",null),o=x.getArg(r,"sourcesContent",null),a=x.getArg(r,"mappings"),l=x.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=x.normalize(u)),s=s.map(String).map(x.normalize).map(function(c){return u&&x.isAbsolute(u)&&x.isAbsolute(c)?x.relative(u,c):c}),this._names=at.fromArray(n.map(String),!0),this._sources=at.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(c){return x.computeSourceURL(u,c,e)}),this.sourceRoot=u,this.sourcesContent=o,this._mappings=a,this._sourceMapURL=e,this.file=l}ue.prototype=Object.create(V.prototype);ue.prototype.consumer=V;ue.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=x.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};ue.fromSourceMap=function(e,r){var i=Object.create(ue.prototype),s=i._names=at.fromArray(e._names.toArray(),!0),n=i._sources=at.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=r,i._absoluteSources=i._sources.toArray().map(function(p){return x.computeSourceURL(i.sourceRoot,p,r)});for(var u=e._mappings.toArray().slice(),o=i.__generatedMappings=[],a=i.__originalMappings=[],l=0,c=u.length;l<c;l++){var h=u[l],f=new Bn;f.generatedLine=h.generatedLine,f.generatedColumn=h.generatedColumn,h.source&&(f.source=n.indexOf(h.source),f.originalLine=h.originalLine,f.originalColumn=h.originalColumn,h.name&&(f.name=s.indexOf(h.name)),a.push(f)),o.push(f)}return wt(i.__originalMappings,x.compareByOriginalPositions),i};ue.prototype._version=3;Object.defineProperty(ue.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Bn(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ue.prototype._parseMappings=function(e,r){for(var i=1,s=0,n=0,u=0,o=0,a=0,l=e.length,c=0,h={},f={},p=[],D=[],d,v,g,w,F;c<l;)if(e.charAt(c)===";")i++,c++,s=0;else if(e.charAt(c)===",")c++;else{for(d=new Bn,d.generatedLine=i,w=c;w<l&&!this._charIsMappingSeparator(e,w);w++);if(v=e.slice(c,w),g=h[v],g)c+=v.length;else{for(g=[];c<w;)cc.decode(e,c,f),F=f.value,c=f.rest,g.push(F);if(g.length===2)throw new Error("Found a source, but no line and column");if(g.length===3)throw new Error("Found a source and line, but no column");h[v]=g}d.generatedColumn=s+g[0],s=d.generatedColumn,g.length>1&&(d.source=o+g[1],o+=g[1],d.originalLine=n+g[2],n=d.originalLine,d.originalLine+=1,d.originalColumn=u+g[3],u=d.originalColumn,g.length>4&&(d.name=a+g[4],a+=g[4])),D.push(d),typeof d.originalLine=="number"&&p.push(d)}wt(D,x.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,wt(p,x.compareByOriginalPositions),this.__originalMappings=p};ue.prototype._findMapping=function(e,r,i,s,n,u){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[s]);return Qr.search(e,r,n,u)};ue.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(r.generatedLine===i.generatedLine){r.lastGeneratedColumn=i.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};ue.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},i=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",x.compareByGeneratedPositionsDeflated,x.getArg(e,"bias",V.GREATEST_LOWER_BOUND));if(i>=0){var s=this._generatedMappings[i];if(s.generatedLine===r.generatedLine){var n=x.getArg(s,"source",null);n!==null&&(n=this._sources.at(n),n=x.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var u=x.getArg(s,"name",null);return u!==null&&(u=this._names.at(u)),{source:n,line:x.getArg(s,"originalLine",null),column:x.getArg(s,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};ue.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ue.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];var s=e;this.sourceRoot!=null&&(s=x.relative(this.sourceRoot,s));var n;if(this.sourceRoot!=null&&(n=x.urlParse(this.sourceRoot))){var u=s.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];if((!n.path||n.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(r)return null;throw new Error('"'+s+'" is not in the SourceMap.')};ue.prototype.generatedPositionFor=function(e){var r=x.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var i={source:r,originalLine:x.getArg(e,"line"),originalColumn:x.getArg(e,"column")},s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,x.getArg(e,"bias",V.GREATEST_LOWER_BOUND));if(s>=0){var n=this._originalMappings[s];if(n.source===i.source)return{line:x.getArg(n,"generatedLine",null),column:x.getArg(n,"generatedColumn",null),lastColumn:x.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Xt.BasicSourceMapConsumer=ue;function we(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var i=x.getArg(r,"version"),s=x.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new at,this._names=new at;var n={line:-1,column:0};this._sections=s.map(function(u){if(u.url)throw new Error("Support for url field in sections not implemented.");var o=x.getArg(u,"offset"),a=x.getArg(o,"line"),l=x.getArg(o,"column");if(a<n.line||a===n.line&&l<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=o,{generatedOffset:{generatedLine:a+1,generatedColumn:l+1},consumer:new V(x.getArg(u,"map"),e)}})}we.prototype=Object.create(V.prototype);we.prototype.constructor=V;we.prototype._version=3;Object.defineProperty(we.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});we.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},i=Qr.search(r,this._sections,function(n,u){var o=n.generatedLine-u.generatedOffset.generatedLine;return o||n.generatedColumn-u.generatedOffset.generatedColumn}),s=this._sections[i];return s?s.consumer.originalPositionFor({line:r.generatedLine-(s.generatedOffset.generatedLine-1),column:r.generatedColumn-(s.generatedOffset.generatedLine===r.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};we.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};we.prototype.sourceContentFor=function(e,r){for(var i=0;i<this._sections.length;i++){var s=this._sections[i],n=s.consumer.sourceContentFor(e,!0);if(n)return n}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};we.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var i=this._sections[r];if(i.consumer._findSourceIndex(x.getArg(e,"source"))!==-1){var s=i.consumer.generatedPositionFor(e);if(s){var n={line:s.line+(i.generatedOffset.generatedLine-1),column:s.column+(i.generatedOffset.generatedLine===s.line?i.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}};we.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var s=this._sections[i],n=s.consumer._generatedMappings,u=0;u<n.length;u++){var o=n[u],a=s.consumer._sources.at(o.source);a=x.computeSourceURL(s.consumer.sourceRoot,a,this._sourceMapURL),this._sources.add(a),a=this._sources.indexOf(a);var l=null;o.name&&(l=s.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var c={source:a,generatedLine:o.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(s.generatedOffset.generatedLine===o.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(c),typeof c.originalLine=="number"&&this.__originalMappings.push(c)}wt(this.__generatedMappings,x.compareByGeneratedPositionsDeflated),wt(this.__originalMappings,x.compareByOriginalPositions)};Xt.IndexedSourceMapConsumer=we});var Ln=y(On=>{var hc=zr().SourceMapGenerator,Zt=ot(),fc=/(\r?\n)/,dc=10,lt="$$$isSourceNode$$$";function ge(t,e,r,i,s){this.children=[],this.sourceContents={},this.line=t==null?null:t,this.column=e==null?null:e,this.source=r==null?null:r,this.name=s==null?null:s,this[lt]=!0,i!=null&&this.add(i)}ge.fromStringWithSourceMap=function(e,r,i){var s=new ge,n=e.split(fc),u=0,o=function(){var f=D(),p=D()||"";return f+p;function D(){return u<n.length?n[u++]:void 0}},a=1,l=0,c=null;return r.eachMapping(function(f){if(c!==null)if(a<f.generatedLine)h(c,o()),a++,l=0;else{var p=n[u]||"",D=p.substr(0,f.generatedColumn-l);n[u]=p.substr(f.generatedColumn-l),l=f.generatedColumn,h(c,D),c=f;return}for(;a<f.generatedLine;)s.add(o()),a++;if(l<f.generatedColumn){var p=n[u]||"";s.add(p.substr(0,f.generatedColumn)),n[u]=p.substr(f.generatedColumn),l=f.generatedColumn}c=f},this),u<n.length&&(c&&h(c,o()),s.add(n.splice(u).join(""))),r.sources.forEach(function(f){var p=r.sourceContentFor(f);p!=null&&(i!=null&&(f=Zt.join(i,f)),s.setSourceContent(f,p))}),s;function h(f,p){if(f===null||f.source===void 0)s.add(p);else{var D=i?Zt.join(i,f.source):f.source;s.add(new ge(f.originalLine,f.originalColumn,D,p,f.name))}}};ge.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[lt]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[lt]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.walk=function(e){for(var r,i=0,s=this.children.length;i<s;i++)r=this.children[i],r[lt]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};ge.prototype.join=function(e){var r,i,s=this.children.length;if(s>0){for(r=[],i=0;i<s-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this};ge.prototype.replaceRight=function(e,r){var i=this.children[this.children.length-1];return i[lt]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this};ge.prototype.setSourceContent=function(e,r){this.sourceContents[Zt.toSetString(e)]=r};ge.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][lt]&&this.children[r].walkSourceContents(e);for(var s=Object.keys(this.sourceContents),r=0,i=s.length;r<i;r++)e(Zt.fromSetString(s[r]),this.sourceContents[s[r]])};ge.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};ge.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},i=new hc(e),s=!1,n=null,u=null,o=null,a=null;return this.walk(function(l,c){r.code+=l,c.source!==null&&c.line!==null&&c.column!==null?((n!==c.source||u!==c.line||o!==c.column||a!==c.name)&&i.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:r.line,column:r.column},name:c.name}),n=c.source,u=c.line,o=c.column,a=c.name,s=!0):s&&(i.addMapping({generated:{line:r.line,column:r.column}}),n=null,s=!1);for(var h=0,f=l.length;h<f;h++)l.charCodeAt(h)===dc?(r.line++,r.column=0,h+1===f?(n=null,s=!1):s&&i.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:r.line,column:r.column},name:c.name})):r.column++}),this.walkSourceContents(function(l,c){i.setSourceContent(l,c)}),{code:r.code,map:i}};On.SourceNode=ge});var Tn=y(Jt=>{Jt.SourceMapGenerator=zr().SourceMapGenerator;Jt.SourceMapConsumer=Rn().SourceMapConsumer;Jt.SourceNode=Ln().SourceNode});var Pn=y((Pp,Nn)=>{var pc=Object.prototype.toString,Xr=typeof Buffer!="undefined"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function Dc(t){return pc.call(t).slice(8,-1)==="ArrayBuffer"}function gc(t,e,r){e>>>=0;var i=t.byteLength-e;if(i<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=i;else if(r>>>=0,r>i)throw new RangeError("'length' is out of bounds");return Xr?Buffer.from(t.slice(e,e+r)):new Buffer(new Uint8Array(t.slice(e,e+r)))}function mc(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Buffer.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');return Xr?Buffer.from(t,e):new Buffer(t,e)}function Ec(t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return Dc(t)?gc(t,e,r):typeof t=="string"?mc(t,e):Xr?Buffer.from(t):new Buffer(t)}Nn.exports=Ec});var Gn=y((Ze,ti)=>{var Cc=Tn().SourceMapConsumer,Zr=require("path"),Re;try{Re=require("fs"),(!Re.existsSync||!Re.readFileSync)&&(Re=null)}catch{}var Ac=Pn();function In(t,e){return t.require(e)}var kn=!1,Mn=!1,Jr=!1,_t="auto",Xe={},bt={},yc=/^data:application\/json[^,]+base64,/,qe=[],je=[];function ri(){return _t==="browser"?!0:_t==="node"?!1:typeof window!="undefined"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function Fc(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function wc(){return typeof process=="object"&&process!==null?process.version:""}function _c(){if(typeof process=="object"&&process!==null)return process.stderr}function bc(t){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(t)}function er(t){return function(e){for(var r=0;r<t.length;r++){var i=t[r](e);if(i)return i}return null}}var ii=er(qe);qe.push(function(t){if(t=t.trim(),/^file:/.test(t)&&(t=t.replace(/file:\/\/\/(\w:)?/,function(i,s){return s?"":"/"})),t in Xe)return Xe[t];var e="";try{if(Re)Re.existsSync(t)&&(e=Re.readFileSync(t,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",t,!1),r.send(null),r.readyState===4&&r.status===200&&(e=r.responseText)}}catch{}return Xe[t]=e});function ei(t,e){if(!t)return e;var r=Zr.dirname(t),i=/^\w+:\/\/[^\/]*/.exec(r),s=i?i[0]:"",n=r.slice(s.length);return s&&/^\/\w\:/.test(n)?(s+="/",s+Zr.resolve(r.slice(s.length),e).replace(/\\/g,"/")):s+Zr.resolve(r.slice(s.length),e)}function vc(t){var e;if(ri())try{var r=new XMLHttpRequest;r.open("GET",t,!1),r.send(null),e=r.readyState===4?r.responseText:null;var i=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(i)return i}catch{}e=ii(t);for(var s=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,n,u;u=s.exec(e);)n=u;return n?n[1]:null}var si=er(je);je.push(function(t){var e=vc(t);if(!e)return null;var r;if(yc.test(e)){var i=e.slice(e.indexOf(",")+1);r=Ac(i,"base64").toString(),e=t}else e=ei(t,e),r=ii(e);return r?{url:e,map:r}:null});function ni(t){var e=bt[t.source];if(!e){var r=si(t.source);r?(e=bt[t.source]={url:r.url,map:new Cc(r.map)},e.map.sourcesContent&&e.map.sources.forEach(function(s,n){var u=e.map.sourcesContent[n];if(u){var o=ei(e.url,s);Xe[o]=u}})):e=bt[t.source]={url:null,map:null}}if(e&&e.map&&typeof e.map.originalPositionFor=="function"){var i=e.map.originalPositionFor(t);if(i.source!==null)return i.source=ei(e.url,i.source),i}return t}function Hn(t){var e=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(t);if(e){var r=ni({source:e[2],line:+e[3],column:e[4]-1});return"eval at "+e[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return e=/^eval at ([^(]+) \((.+)\)$/.exec(t),e?"eval at "+e[1]+" ("+Hn(e[2])+")":t}function xc(){var t,e="";if(this.isNative())e="native";else{t=this.getScriptNameOrSourceURL(),!t&&this.isEval()&&(e=this.getEvalOrigin(),e+=", "),t?e+=t:e+="<anonymous>";var r=this.getLineNumber();if(r!=null){e+=":"+r;var i=this.getColumnNumber();i&&(e+=":"+i)}}var s="",n=this.getFunctionName(),u=!0,o=this.isConstructor(),a=!(this.isToplevel()||o);if(a){var l=this.getTypeName();l==="[object Object]"&&(l="null");var c=this.getMethodName();n?(l&&n.indexOf(l)!=0&&(s+=l+"."),s+=n,c&&n.indexOf("."+c)!=n.length-c.length-1&&(s+=" [as "+c+"]")):s+=l+"."+(c||"<anonymous>")}else o?s+="new "+(n||"<anonymous>"):n?s+=n:(s+=e,u=!1);return u&&(s+=" ("+e+")"),s}function $n(t){var e={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(function(r){e[r]=/^(?:is|get)/.test(r)?function(){return t[r].call(t)}:t[r]}),e.toString=xc,e}function qn(t,e){if(e===void 0&&(e={nextPosition:null,curPosition:null}),t.isNative())return e.curPosition=null,t;var r=t.getFileName()||t.getScriptNameOrSourceURL();if(r){var i=t.getLineNumber(),s=t.getColumnNumber()-1,n=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,u=n.test(wc())?0:62;i===1&&s>u&&!ri()&&!t.isEval()&&(s-=u);var o=ni({source:r,line:i,column:s});e.curPosition=o,t=$n(t);var a=t.getFunctionName;return t.getFunctionName=function(){return e.nextPosition==null?a():e.nextPosition.name||a()},t.getFileName=function(){return o.source},t.getLineNumber=function(){return o.line},t.getColumnNumber=function(){return o.column+1},t.getScriptNameOrSourceURL=function(){return o.source},t}var l=t.isEval()&&t.getEvalOrigin();return l&&(l=Hn(l),t=$n(t),t.getEvalOrigin=function(){return l}),t}function Sc(t,e){Jr&&(Xe={},bt={});for(var r=t.name||"Error",i=t.message||"",s=r+": "+i,n={nextPosition:null,curPosition:null},u=[],o=e.length-1;o>=0;o--)u.push(`
15
15
  at `+qn(e[o],n)),n.nextPosition=n.curPosition;return n.curPosition=n.nextPosition=null,s+u.reverse().join("")}function jn(t){var e=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(t.stack);if(e){var r=e[1],i=+e[2],s=+e[3],n=Xe[r];if(!n&&Re&&Re.existsSync(r))try{n=Re.readFileSync(r,"utf8")}catch{n=""}if(n){var u=n.split(/(?:\r\n|\r|\n)/)[i-1];if(u)return r+":"+i+`
16
16
  `+u+`
17
17
  `+new Array(s).join(" ")+"^"}}return null}function Bc(t){var e=jn(t),r=_c();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),e&&(console.error(),console.error(e)),console.error(t.stack),bc(1)}function Rc(){var t=process.emit;process.emit=function(e){if(e==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,i=this.listeners(e).length>0;if(r&&!i)return Bc(arguments[1])}return t.apply(this,arguments)}}var Oc=qe.slice(0),Lc=je.slice(0);Ze.wrapCallSite=qn;Ze.getErrorSource=jn;Ze.mapSourcePosition=ni;Ze.retrieveSourceMap=si;Ze.install=function(t){if(t=t||{},t.environment&&(_t=t.environment,["node","browser","auto"].indexOf(_t)===-1))throw new Error("environment "+_t+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(qe.length=0),qe.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(je.length=0),je.unshift(t.retrieveSourceMap)),t.hookRequire&&!ri()){var e=In(ti,"module"),r=e.prototype._compile;r.__sourceMapSupport||(e.prototype._compile=function(n,u){return Xe[u]=n,bt[u]=void 0,r.call(this,n,u)},e.prototype._compile.__sourceMapSupport=!0)}if(Jr||(Jr="emptyCacheBetweenOperations"in t?t.emptyCacheBetweenOperations:!1),kn||(kn=!0,Error.prepareStackTrace=Sc),!Mn){var i="handleUncaughtExceptions"in t?t.handleUncaughtExceptions:!0;try{var s=In(ti,"worker_threads");s.isMainThread===!1&&(i=!1)}catch{}i&&Fc()&&(Mn=!0,Rc())}};Ze.resetRetrieveHandlers=function(){qe.length=0,je.length=0,qe=Oc.slice(0),je=Lc.slice(0),si=er(je),ii=er(qe)}});var Un=y((Ip,Wn)=>{"use strict";var Tc=require("https");Wn.exports=(t,e)=>{e=typeof e=="undefined"?1/0:e;let r=new Map,i=!1,s=!0;return t instanceof Tc.Server?t.on("secureConnection",n):t.on("connection",n),t.on("request",u),t.stop=o,t._pendingSockets=r,t;function n(c){r.set(c,0),c.once("close",()=>r.delete(c))}function u(c,h){r.set(c.socket,r.get(c.socket)+1),h.once("finish",()=>{let f=r.get(c.socket)-1;r.set(c.socket,f),i&&f===0&&c.socket.end()})}function o(c){setImmediate(()=>{i=!0,e<1/0&&setTimeout(l,e).unref(),t.close(h=>{c&&c(h,s)}),r.forEach(a)})}function a(c,h){c===0&&h.end()}function l(){s=!1,r.forEach((c,h)=>h.end()),setImmediate(()=>{r.forEach((c,h)=>h.destroy())})}}});var Yn=y((kp,vt)=>{"use strict";var Nc=typeof process!="undefined"&&process.env.TERM_PROGRAM==="Hyper",Pc=typeof process!="undefined"&&process.platform==="win32",zn=typeof process!="undefined"&&process.platform==="linux",ui={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",question:"?",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Vn=Object.assign({},ui,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),Kn=Object.assign({},ui,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:zn?"\u25B8":"\u276F",pointerSmall:zn?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});vt.exports=Pc&&!Nc?Vn:Kn;Reflect.defineProperty(vt.exports,"common",{enumerable:!1,value:ui});Reflect.defineProperty(vt.exports,"windows",{enumerable:!1,value:Vn});Reflect.defineProperty(vt.exports,"other",{enumerable:!1,value:Kn})});var _e=y((Mp,oi)=>{"use strict";var Ic=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),kc=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Mc=()=>typeof process!="undefined"?process.env.FORCE_COLOR!=="0":!1,Qn=()=>{let t={enabled:Mc(),visible:!0,styles:{},keys:{}},e=n=>{let u=n.open=`\x1B[${n.codes[0]}m`,o=n.close=`\x1B[${n.codes[1]}m`,a=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(l,c)=>{l.includes(o)&&(l=l.replace(a,o+u));let h=u+l+o;return c?h.replace(/\r*\n/g,`${o}$&${u}`):h},n},r=(n,u,o)=>typeof n=="function"?n(u):n.wrap(u,o),i=(n,u)=>{if(n===""||n==null)return"";if(t.enabled===!1)return n;if(t.visible===!1)return"";let o=""+n,a=o.includes(`
@@ -32,11 +32,14 @@ class Fixture {
32
32
  this.runner = runner;
33
33
  this.registration = registration;
34
34
  this.value = null;
35
- const shouldGenerateStep = !this.registration.box && !this.registration.option;
36
35
  const isUserFixture = this.registration.location && (0, import_util.filterStackFile)(this.registration.location.file);
37
36
  const title = this.registration.customTitle || this.registration.name;
38
37
  const location = isUserFixture ? this.registration.location : void 0;
39
- this._stepInfo = shouldGenerateStep ? { title, category: "fixture", location } : void 0;
38
+ this._stepInfo = { title: `Fixture ${(0, import_utils.escapeWithQuotes)(title, '"')}`, category: "fixture", location };
39
+ if (this.registration.box === "self")
40
+ this._stepInfo = void 0;
41
+ else if (this.registration.box)
42
+ this._stepInfo.group = isUserFixture ? "configuration" : "internal";
40
43
  this._setupDescription = {
41
44
  title,
42
45
  phase: "setup",
@@ -93,6 +96,8 @@ class Fixture {
93
96
  this._selfTeardownComplete = (async () => {
94
97
  try {
95
98
  await this.registration.fn(params, useFunc, info);
99
+ if (!useFuncStarted.isDone())
100
+ throw new Error(`use() was not called in fixture "${this.registration.name}"`);
96
101
  } catch (error) {
97
102
  this.failed = true;
98
103
  if (!useFuncStarted.isDone())
@@ -50,6 +50,7 @@ class TestInfoImpl {
50
50
  this._lastStepId = 0;
51
51
  this._steps = [];
52
52
  this._stepMap = /* @__PURE__ */ new Map();
53
+ this._onDidFinishTestFunctions = [];
53
54
  this._hasNonRetriableError = false;
54
55
  this._hasUnhandledError = false;
55
56
  this._allowSkips = false;
@@ -67,6 +68,7 @@ class TestInfoImpl {
67
68
  this._startWallTime = Date.now();
68
69
  this._requireFile = test?._requireFile ?? "";
69
70
  this._uniqueSymbol = Symbol("testInfoUniqueSymbol");
71
+ this._workerParams = workerParams;
70
72
  this.repeatEachIndex = workerParams.repeatEachIndex;
71
73
  this.retry = retry;
72
74
  this.workerIndex = workerParams.workerIndex;
@@ -185,19 +187,22 @@ class TestInfoImpl {
185
187
  parentStep = this._parentStep();
186
188
  }
187
189
  const filteredStack = (0, import_util.filteredStackTrace)((0, import_utils.captureRawStack)());
188
- data.boxedStack = parentStep?.boxedStack;
189
- if (!data.boxedStack && data.box) {
190
- data.boxedStack = filteredStack.slice(1);
191
- data.location = data.location || data.boxedStack[0];
190
+ let boxedStack = parentStep?.boxedStack;
191
+ let location = data.location;
192
+ if (!boxedStack && data.box) {
193
+ boxedStack = filteredStack.slice(1);
194
+ location = location || boxedStack[0];
192
195
  }
193
- data.location = data.location || filteredStack[0];
194
- const attachmentIndices = [];
196
+ location = location || filteredStack[0];
195
197
  const step = {
196
- stepId,
197
198
  ...data,
199
+ stepId,
200
+ group: parentStep?.group ?? data.group,
201
+ boxedStack,
202
+ location,
198
203
  steps: [],
199
- attachmentIndices,
200
- info: new TestStepInfoImpl(this, stepId),
204
+ attachmentIndices: [],
205
+ info: new TestStepInfoImpl(this, stepId, data.title, parentStep?.info),
201
206
  complete: (result) => {
202
207
  if (step.endWallTime)
203
208
  return;
@@ -206,9 +211,9 @@ class TestInfoImpl {
206
211
  if (typeof result.error === "object" && !result.error?.[stepSymbol])
207
212
  result.error[stepSymbol] = step;
208
213
  const error = (0, import_util2.testInfoError)(result.error);
209
- if (data.boxedStack)
214
+ if (step.boxedStack)
210
215
  error.stack = `${error.message}
211
- ${(0, import_utils.stringifyStackFrames)(data.boxedStack).join("\n")}`;
216
+ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
212
217
  step.error = error;
213
218
  }
214
219
  if (!step.error) {
@@ -220,39 +225,50 @@ ${(0, import_utils.stringifyStackFrames)(data.boxedStack).join("\n")}`;
220
225
  }
221
226
  }
222
227
  }
223
- const payload2 = {
224
- testId: this.testId,
225
- stepId,
226
- wallTime: step.endWallTime,
227
- error: step.error,
228
- suggestedRebaseline: result.suggestedRebaseline,
229
- annotations: step.info.annotations
230
- };
231
- this._onStepEnd(payload2);
232
- const errorForTrace = step.error ? { name: "", message: step.error.message || "", stack: step.error.stack } : void 0;
233
- const attachments = attachmentIndices.map((i) => this.attachments[i]);
234
- this._tracing.appendAfterActionForStep(stepId, errorForTrace, attachments, step.info.annotations);
228
+ if (!step.group) {
229
+ const payload = {
230
+ testId: this.testId,
231
+ stepId,
232
+ wallTime: step.endWallTime,
233
+ error: step.error,
234
+ suggestedRebaseline: result.suggestedRebaseline,
235
+ annotations: step.info.annotations
236
+ };
237
+ this._onStepEnd(payload);
238
+ }
239
+ if (step.group !== "internal") {
240
+ const errorForTrace = step.error ? { name: "", message: step.error.message || "", stack: step.error.stack } : void 0;
241
+ const attachments = step.attachmentIndices.map((i) => this.attachments[i]);
242
+ this._tracing.appendAfterActionForStep(stepId, errorForTrace, attachments, step.info.annotations);
243
+ }
235
244
  }
236
245
  };
237
246
  const parentStepList = parentStep ? parentStep.steps : this._steps;
238
247
  parentStepList.push(step);
239
248
  this._stepMap.set(stepId, step);
240
- const payload = {
241
- testId: this.testId,
242
- stepId,
243
- parentStepId: parentStep ? parentStep.stepId : void 0,
244
- title: data.title,
245
- category: data.category,
246
- wallTime: Date.now(),
247
- location: data.location
248
- };
249
- this._onStepBegin(payload);
250
- this._tracing.appendBeforeActionForStep(stepId, parentStep?.stepId, {
251
- title: data.title,
252
- category: data.category,
253
- params: data.params,
254
- stack: data.location ? [data.location] : []
255
- });
249
+ if (!step.group) {
250
+ const payload = {
251
+ testId: this.testId,
252
+ stepId,
253
+ parentStepId: parentStep ? parentStep.stepId : void 0,
254
+ title: step.title,
255
+ category: step.category,
256
+ wallTime: Date.now(),
257
+ location: step.location
258
+ };
259
+ this._onStepBegin(payload);
260
+ }
261
+ if (step.group !== "internal") {
262
+ this._tracing.appendBeforeActionForStep({
263
+ stepId,
264
+ parentId: parentStep?.stepId,
265
+ title: step.title,
266
+ category: step.category,
267
+ params: step.params,
268
+ stack: step.location ? [step.location] : [],
269
+ group: step.group
270
+ });
271
+ }
256
272
  return step;
257
273
  }
258
274
  _interrupt() {
@@ -316,10 +332,13 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
316
332
  // ------------ TestInfo methods ------------
317
333
  async attach(name, options = {}) {
318
334
  const step = this._addStep({
319
- title: name,
335
+ title: `Attach ${(0, import_utils.escapeWithQuotes)(name, '"')}`,
320
336
  category: "test.attach"
321
337
  });
322
- this._attach(await (0, import_util.normalizeAndSaveAttachment)(this.outputPath(), name, options), step.stepId);
338
+ this._attach(
339
+ await (0, import_util.normalizeAndSaveAttachment)(this.outputPath(), name, options),
340
+ step.group ? void 0 : step.stepId
341
+ );
323
342
  step.complete({});
324
343
  }
325
344
  _attach(attachment, stepId) {
@@ -327,9 +346,9 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
327
346
  if (stepId) {
328
347
  this._stepMap.get(stepId).attachmentIndices.push(index);
329
348
  } else {
330
- const callId = `attach@${(0, import_utils.createGuid)()}`;
331
- this._tracing.appendBeforeActionForStep(callId, void 0, { title: attachment.name, category: "test.attach", stack: [] });
332
- this._tracing.appendAfterActionForStep(callId, void 0, [attachment]);
349
+ const stepId2 = `attach@${(0, import_utils.createGuid)()}`;
350
+ this._tracing.appendBeforeActionForStep({ stepId: stepId2, title: `Attach ${(0, import_utils.escapeWithQuotes)(attachment.name, '"')}`, category: "test.attach", stack: [] });
351
+ this._tracing.appendAfterActionForStep(stepId2, void 0, [attachment]);
333
352
  }
334
353
  this._onAttach({
335
354
  testId: this.testId,
@@ -426,12 +445,20 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
426
445
  setTimeout(timeout) {
427
446
  this._timeoutManager.setTimeout(timeout);
428
447
  }
448
+ _pauseOnError() {
449
+ return this._workerParams.pauseOnError;
450
+ }
451
+ _pauseAtEnd() {
452
+ return this._workerParams.pauseAtEnd;
453
+ }
429
454
  }
430
455
  class TestStepInfoImpl {
431
- constructor(testInfo, stepId) {
456
+ constructor(testInfo, stepId, title, parentStep) {
432
457
  this.annotations = [];
433
458
  this._testInfo = testInfo;
434
459
  this._stepId = stepId;
460
+ this._title = title;
461
+ this._parentStep = parentStep;
435
462
  this.skip = (0, import_transform.wrapFunctionWithLocation)((location, ...args) => {
436
463
  if (args.length > 0 && !args[0])
437
464
  return;
@@ -459,6 +486,10 @@ class TestStepInfoImpl {
459
486
  async attach(name, options) {
460
487
  this._attachToStep(await (0, import_util.normalizeAndSaveAttachment)(this._testInfo.outputPath(), name, options));
461
488
  }
489
+ get titlePath() {
490
+ const parent = this._parentStep ?? this._testInfo;
491
+ return [...parent.titlePath, this._title];
492
+ }
462
493
  }
463
494
  class TestSkipError extends Error {
464
495
  }
@@ -221,18 +221,19 @@ class TestTracing {
221
221
  base64: typeof chunk === "string" ? void 0 : chunk.toString("base64")
222
222
  });
223
223
  }
224
- appendBeforeActionForStep(callId, parentId, options) {
224
+ appendBeforeActionForStep(options) {
225
225
  this._appendTraceEvent({
226
226
  type: "before",
227
- callId,
228
- stepId: callId,
229
- parentId,
227
+ callId: options.stepId,
228
+ stepId: options.stepId,
229
+ parentId: options.parentId,
230
230
  startTime: (0, import_utils.monotonicTime)(),
231
231
  class: "Test",
232
- method: "step",
233
- title: (0, import_util.stepTitle)(options.category, options.title),
232
+ method: options.category,
233
+ title: options.title,
234
234
  params: Object.fromEntries(Object.entries(options.params || {}).map(([name, value]) => [name, generatePreview(value)])),
235
- stack: options.stack
235
+ stack: options.stack,
236
+ group: options.group
236
237
  });
237
238
  }
238
239
  appendAfterActionForStep(callId, error, attachments = [], annotations) {