msw 2.11.2 → 2.11.4

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 (119) hide show
  1. package/lib/browser/index.js +129 -114
  2. package/lib/browser/index.js.map +1 -1
  3. package/lib/browser/index.mjs +129 -114
  4. package/lib/browser/index.mjs.map +1 -1
  5. package/lib/core/{HttpResponse-BbwAqLE_.d.ts → HttpResponse-BpT5A_2L.d.ts} +1 -0
  6. package/lib/core/{HttpResponse-B4YmE-GJ.d.mts → HttpResponse-DGUjNQHG.d.mts} +1 -0
  7. package/lib/core/HttpResponse.d.mts +1 -1
  8. package/lib/core/HttpResponse.d.ts +1 -1
  9. package/lib/core/HttpResponse.js.map +1 -1
  10. package/lib/core/HttpResponse.mjs.map +1 -1
  11. package/lib/core/SetupApi.d.mts +1 -1
  12. package/lib/core/SetupApi.d.ts +1 -1
  13. package/lib/core/getResponse.d.mts +1 -1
  14. package/lib/core/getResponse.d.ts +1 -1
  15. package/lib/core/graphql.d.mts +1 -1
  16. package/lib/core/graphql.d.ts +1 -1
  17. package/lib/core/handlers/GraphQLHandler.d.mts +1 -1
  18. package/lib/core/handlers/GraphQLHandler.d.ts +1 -1
  19. package/lib/core/handlers/HttpHandler.d.mts +1 -1
  20. package/lib/core/handlers/HttpHandler.d.ts +1 -1
  21. package/lib/core/handlers/HttpHandler.js +0 -5
  22. package/lib/core/handlers/HttpHandler.js.map +1 -1
  23. package/lib/core/handlers/HttpHandler.mjs +1 -6
  24. package/lib/core/handlers/HttpHandler.mjs.map +1 -1
  25. package/lib/core/handlers/RequestHandler.d.mts +1 -1
  26. package/lib/core/handlers/RequestHandler.d.ts +1 -1
  27. package/lib/core/http.d.mts +1 -1
  28. package/lib/core/http.d.ts +1 -1
  29. package/lib/core/index.d.mts +1 -1
  30. package/lib/core/index.d.ts +1 -1
  31. package/lib/core/passthrough.d.mts +1 -1
  32. package/lib/core/passthrough.d.ts +1 -1
  33. package/lib/core/utils/HttpResponse/decorators.d.mts +1 -1
  34. package/lib/core/utils/HttpResponse/decorators.d.ts +1 -1
  35. package/lib/core/utils/HttpResponse/decorators.js +1 -1
  36. package/lib/core/utils/HttpResponse/decorators.js.map +1 -1
  37. package/lib/core/utils/HttpResponse/decorators.mjs +1 -1
  38. package/lib/core/utils/HttpResponse/decorators.mjs.map +1 -1
  39. package/lib/core/utils/executeHandlers.d.mts +1 -1
  40. package/lib/core/utils/executeHandlers.d.ts +1 -1
  41. package/lib/core/utils/handleRequest.d.mts +1 -1
  42. package/lib/core/utils/handleRequest.d.ts +1 -1
  43. package/lib/core/utils/handleRequest.js +8 -8
  44. package/lib/core/utils/handleRequest.js.map +1 -1
  45. package/lib/core/utils/handleRequest.mjs +8 -8
  46. package/lib/core/utils/handleRequest.mjs.map +1 -1
  47. package/lib/core/utils/internal/isHandlerKind.d.mts +1 -1
  48. package/lib/core/utils/internal/isHandlerKind.d.ts +1 -1
  49. package/lib/core/utils/internal/parseGraphQLRequest.d.mts +1 -1
  50. package/lib/core/utils/internal/parseGraphQLRequest.d.ts +1 -1
  51. package/lib/core/utils/internal/parseMultipartData.d.mts +1 -1
  52. package/lib/core/utils/internal/parseMultipartData.d.ts +1 -1
  53. package/lib/core/utils/internal/requestHandlerUtils.d.mts +1 -1
  54. package/lib/core/utils/internal/requestHandlerUtils.d.ts +1 -1
  55. package/lib/core/utils/logging/serializeResponse.js +1 -1
  56. package/lib/core/utils/logging/serializeResponse.js.map +1 -1
  57. package/lib/core/utils/logging/serializeResponse.mjs +1 -1
  58. package/lib/core/utils/logging/serializeResponse.mjs.map +1 -1
  59. package/lib/core/utils/request/getRequestCookies.js +3 -13
  60. package/lib/core/utils/request/getRequestCookies.js.map +1 -1
  61. package/lib/core/utils/request/getRequestCookies.mjs +6 -3
  62. package/lib/core/utils/request/getRequestCookies.mjs.map +1 -1
  63. package/lib/core/utils/url/cleanUrl.d.mts +1 -2
  64. package/lib/core/utils/url/cleanUrl.d.ts +1 -2
  65. package/lib/core/utils/url/cleanUrl.js +1 -5
  66. package/lib/core/utils/url/cleanUrl.js.map +1 -1
  67. package/lib/core/utils/url/cleanUrl.mjs +1 -5
  68. package/lib/core/utils/url/cleanUrl.mjs.map +1 -1
  69. package/lib/core/ws/WebSocketIndexedDBClientStore.d.mts +1 -2
  70. package/lib/core/ws/WebSocketIndexedDBClientStore.d.ts +1 -2
  71. package/lib/core/ws/WebSocketIndexedDBClientStore.js.map +1 -1
  72. package/lib/core/ws/WebSocketIndexedDBClientStore.mjs.map +1 -1
  73. package/lib/core/ws/WebSocketMemoryClientStore.d.mts +1 -2
  74. package/lib/core/ws/WebSocketMemoryClientStore.d.ts +1 -2
  75. package/lib/core/ws/WebSocketMemoryClientStore.js.map +1 -1
  76. package/lib/core/ws/WebSocketMemoryClientStore.mjs.map +1 -1
  77. package/lib/core/ws/handleWebSocketEvent.d.mts +2 -3
  78. package/lib/core/ws/handleWebSocketEvent.d.ts +2 -3
  79. package/lib/core/ws/handleWebSocketEvent.js.map +1 -1
  80. package/lib/core/ws/handleWebSocketEvent.mjs.map +1 -1
  81. package/lib/core/ws/utils/getMessageLength.d.mts +1 -1
  82. package/lib/core/ws/utils/getMessageLength.d.ts +1 -1
  83. package/lib/core/ws/utils/getMessageLength.js.map +1 -1
  84. package/lib/core/ws/utils/getMessageLength.mjs.map +1 -1
  85. package/lib/iife/index.js +595 -636
  86. package/lib/iife/index.js.map +1 -1
  87. package/lib/mockServiceWorker.js +2 -1
  88. package/lib/shims/cookie.d.mts +7 -0
  89. package/lib/shims/cookie.d.ts +7 -0
  90. package/lib/shims/cookie.js +204 -0
  91. package/lib/shims/cookie.mjs +196 -0
  92. package/lib/shims/statuses.d.mts +6 -0
  93. package/lib/shims/statuses.d.ts +6 -0
  94. package/lib/shims/statuses.js +195 -0
  95. package/lib/shims/statuses.mjs +187 -0
  96. package/package.json +7 -8
  97. package/src/browser/setupWorker/glossary.ts +1 -5
  98. package/src/browser/setupWorker/setupWorker.ts +4 -9
  99. package/src/browser/setupWorker/start/createRequestListener.ts +4 -1
  100. package/src/browser/setupWorker/start/utils/getWorkerInstance.ts +17 -16
  101. package/src/browser/utils/{supportsReadableStreamTransfer.ts → supports.ts} +13 -0
  102. package/src/browser/utils/workerChannel.ts +13 -0
  103. package/src/core/HttpResponse.ts +1 -0
  104. package/src/core/handlers/HttpHandler.ts +1 -8
  105. package/src/core/utils/HttpResponse/decorators.ts +1 -1
  106. package/src/core/utils/handleRequest.ts +8 -8
  107. package/src/core/utils/logging/serializeResponse.ts +1 -1
  108. package/src/core/utils/request/getRequestCookies.ts +6 -3
  109. package/src/core/utils/url/cleanUrl.ts +0 -4
  110. package/src/core/ws/WebSocketIndexedDBClientStore.ts +1 -1
  111. package/src/core/ws/WebSocketMemoryClientStore.ts +1 -1
  112. package/src/core/ws/handleWebSocketEvent.ts +1 -1
  113. package/src/core/ws/utils/getMessageLength.ts +1 -1
  114. package/src/mockServiceWorker.js +1 -0
  115. package/src/shims/cookie.ts +7 -0
  116. package/src/shims/statuses.ts +6 -0
  117. package/src/tsconfig.src.json +1 -6
  118. package/src/browser/utils/deferNetworkRequestsUntil.test.ts +0 -48
  119. package/src/browser/utils/deferNetworkRequestsUntil.ts +0 -29
package/lib/iife/index.js CHANGED
@@ -1,12 +1,17 @@
1
1
  "use strict";
2
2
  var MockServiceWorker = (() => {
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __esm = (fn, res) => function __init() {
8
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
11
  };
12
+ var __commonJS = (cb, mod) => function __require() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
10
15
  var __export = (target, all) => {
11
16
  for (var name in all)
12
17
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -19,8 +24,317 @@ var MockServiceWorker = (() => {
19
24
  }
20
25
  return to;
21
26
  };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
+ mod
34
+ ));
22
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
36
 
37
+ // node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json
38
+ var require_codes = __commonJS({
39
+ "node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json"(exports, module) {
40
+ module.exports = {
41
+ "100": "Continue",
42
+ "101": "Switching Protocols",
43
+ "102": "Processing",
44
+ "103": "Early Hints",
45
+ "200": "OK",
46
+ "201": "Created",
47
+ "202": "Accepted",
48
+ "203": "Non-Authoritative Information",
49
+ "204": "No Content",
50
+ "205": "Reset Content",
51
+ "206": "Partial Content",
52
+ "207": "Multi-Status",
53
+ "208": "Already Reported",
54
+ "226": "IM Used",
55
+ "300": "Multiple Choices",
56
+ "301": "Moved Permanently",
57
+ "302": "Found",
58
+ "303": "See Other",
59
+ "304": "Not Modified",
60
+ "305": "Use Proxy",
61
+ "307": "Temporary Redirect",
62
+ "308": "Permanent Redirect",
63
+ "400": "Bad Request",
64
+ "401": "Unauthorized",
65
+ "402": "Payment Required",
66
+ "403": "Forbidden",
67
+ "404": "Not Found",
68
+ "405": "Method Not Allowed",
69
+ "406": "Not Acceptable",
70
+ "407": "Proxy Authentication Required",
71
+ "408": "Request Timeout",
72
+ "409": "Conflict",
73
+ "410": "Gone",
74
+ "411": "Length Required",
75
+ "412": "Precondition Failed",
76
+ "413": "Payload Too Large",
77
+ "414": "URI Too Long",
78
+ "415": "Unsupported Media Type",
79
+ "416": "Range Not Satisfiable",
80
+ "417": "Expectation Failed",
81
+ "418": "I'm a Teapot",
82
+ "421": "Misdirected Request",
83
+ "422": "Unprocessable Entity",
84
+ "423": "Locked",
85
+ "424": "Failed Dependency",
86
+ "425": "Too Early",
87
+ "426": "Upgrade Required",
88
+ "428": "Precondition Required",
89
+ "429": "Too Many Requests",
90
+ "431": "Request Header Fields Too Large",
91
+ "451": "Unavailable For Legal Reasons",
92
+ "500": "Internal Server Error",
93
+ "501": "Not Implemented",
94
+ "502": "Bad Gateway",
95
+ "503": "Service Unavailable",
96
+ "504": "Gateway Timeout",
97
+ "505": "HTTP Version Not Supported",
98
+ "506": "Variant Also Negotiates",
99
+ "507": "Insufficient Storage",
100
+ "508": "Loop Detected",
101
+ "509": "Bandwidth Limit Exceeded",
102
+ "510": "Not Extended",
103
+ "511": "Network Authentication Required"
104
+ };
105
+ }
106
+ });
107
+
108
+ // node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js
109
+ var require_statuses = __commonJS({
110
+ "node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js"(exports, module) {
111
+ "use strict";
112
+ var codes = require_codes();
113
+ module.exports = status;
114
+ status.message = codes;
115
+ status.code = createMessageToStatusCodeMap(codes);
116
+ status.codes = createStatusCodeList(codes);
117
+ status.redirect = {
118
+ 300: true,
119
+ 301: true,
120
+ 302: true,
121
+ 303: true,
122
+ 305: true,
123
+ 307: true,
124
+ 308: true
125
+ };
126
+ status.empty = {
127
+ 204: true,
128
+ 205: true,
129
+ 304: true
130
+ };
131
+ status.retry = {
132
+ 502: true,
133
+ 503: true,
134
+ 504: true
135
+ };
136
+ function createMessageToStatusCodeMap(codes2) {
137
+ var map = {};
138
+ Object.keys(codes2).forEach(function forEachCode(code) {
139
+ var message4 = codes2[code];
140
+ var status2 = Number(code);
141
+ map[message4.toLowerCase()] = status2;
142
+ });
143
+ return map;
144
+ }
145
+ function createStatusCodeList(codes2) {
146
+ return Object.keys(codes2).map(function mapCode(code) {
147
+ return Number(code);
148
+ });
149
+ }
150
+ function getStatusCode(message4) {
151
+ var msg = message4.toLowerCase();
152
+ if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
153
+ throw new Error('invalid status message: "' + message4 + '"');
154
+ }
155
+ return status.code[msg];
156
+ }
157
+ function getStatusMessage(code) {
158
+ if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
159
+ throw new Error("invalid status code: " + code);
160
+ }
161
+ return status.message[code];
162
+ }
163
+ function status(code) {
164
+ if (typeof code === "number") {
165
+ return getStatusMessage(code);
166
+ }
167
+ if (typeof code !== "string") {
168
+ throw new TypeError("code must be a number or string");
169
+ }
170
+ var n = parseInt(code, 10);
171
+ if (!isNaN(n)) {
172
+ return getStatusMessage(n);
173
+ }
174
+ return getStatusCode(code);
175
+ }
176
+ }
177
+ });
178
+
179
+ // node_modules/.pnpm/cookie@1.0.2/node_modules/cookie/dist/index.js
180
+ var require_dist = __commonJS({
181
+ "node_modules/.pnpm/cookie@1.0.2/node_modules/cookie/dist/index.js"(exports) {
182
+ "use strict";
183
+ Object.defineProperty(exports, "__esModule", { value: true });
184
+ exports.parse = parse5;
185
+ exports.serialize = serialize2;
186
+ var cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
187
+ var cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
188
+ var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
189
+ var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
190
+ var __toString = Object.prototype.toString;
191
+ var NullObject = /* @__PURE__ */ (() => {
192
+ const C = function() {
193
+ };
194
+ C.prototype = /* @__PURE__ */ Object.create(null);
195
+ return C;
196
+ })();
197
+ function parse5(str, options) {
198
+ const obj = new NullObject();
199
+ const len = str.length;
200
+ if (len < 2)
201
+ return obj;
202
+ const dec = options?.decode || decode;
203
+ let index = 0;
204
+ do {
205
+ const eqIdx = str.indexOf("=", index);
206
+ if (eqIdx === -1)
207
+ break;
208
+ const colonIdx = str.indexOf(";", index);
209
+ const endIdx = colonIdx === -1 ? len : colonIdx;
210
+ if (eqIdx > endIdx) {
211
+ index = str.lastIndexOf(";", eqIdx - 1) + 1;
212
+ continue;
213
+ }
214
+ const keyStartIdx = startIndex(str, index, eqIdx);
215
+ const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
216
+ const key = str.slice(keyStartIdx, keyEndIdx);
217
+ if (obj[key] === void 0) {
218
+ let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
219
+ let valEndIdx = endIndex(str, endIdx, valStartIdx);
220
+ const value = dec(str.slice(valStartIdx, valEndIdx));
221
+ obj[key] = value;
222
+ }
223
+ index = endIdx + 1;
224
+ } while (index < len);
225
+ return obj;
226
+ }
227
+ function startIndex(str, index, max) {
228
+ do {
229
+ const code = str.charCodeAt(index);
230
+ if (code !== 32 && code !== 9)
231
+ return index;
232
+ } while (++index < max);
233
+ return max;
234
+ }
235
+ function endIndex(str, index, min) {
236
+ while (index > min) {
237
+ const code = str.charCodeAt(--index);
238
+ if (code !== 32 && code !== 9)
239
+ return index + 1;
240
+ }
241
+ return min;
242
+ }
243
+ function serialize2(name, val, options) {
244
+ const enc = options?.encode || encodeURIComponent;
245
+ if (!cookieNameRegExp.test(name)) {
246
+ throw new TypeError(`argument name is invalid: ${name}`);
247
+ }
248
+ const value = enc(val);
249
+ if (!cookieValueRegExp.test(value)) {
250
+ throw new TypeError(`argument val is invalid: ${val}`);
251
+ }
252
+ let str = name + "=" + value;
253
+ if (!options)
254
+ return str;
255
+ if (options.maxAge !== void 0) {
256
+ if (!Number.isInteger(options.maxAge)) {
257
+ throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
258
+ }
259
+ str += "; Max-Age=" + options.maxAge;
260
+ }
261
+ if (options.domain) {
262
+ if (!domainValueRegExp.test(options.domain)) {
263
+ throw new TypeError(`option domain is invalid: ${options.domain}`);
264
+ }
265
+ str += "; Domain=" + options.domain;
266
+ }
267
+ if (options.path) {
268
+ if (!pathValueRegExp.test(options.path)) {
269
+ throw new TypeError(`option path is invalid: ${options.path}`);
270
+ }
271
+ str += "; Path=" + options.path;
272
+ }
273
+ if (options.expires) {
274
+ if (!isDate(options.expires) || !Number.isFinite(options.expires.valueOf())) {
275
+ throw new TypeError(`option expires is invalid: ${options.expires}`);
276
+ }
277
+ str += "; Expires=" + options.expires.toUTCString();
278
+ }
279
+ if (options.httpOnly) {
280
+ str += "; HttpOnly";
281
+ }
282
+ if (options.secure) {
283
+ str += "; Secure";
284
+ }
285
+ if (options.partitioned) {
286
+ str += "; Partitioned";
287
+ }
288
+ if (options.priority) {
289
+ const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : void 0;
290
+ switch (priority) {
291
+ case "low":
292
+ str += "; Priority=Low";
293
+ break;
294
+ case "medium":
295
+ str += "; Priority=Medium";
296
+ break;
297
+ case "high":
298
+ str += "; Priority=High";
299
+ break;
300
+ default:
301
+ throw new TypeError(`option priority is invalid: ${options.priority}`);
302
+ }
303
+ }
304
+ if (options.sameSite) {
305
+ const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite;
306
+ switch (sameSite) {
307
+ case true:
308
+ case "strict":
309
+ str += "; SameSite=Strict";
310
+ break;
311
+ case "lax":
312
+ str += "; SameSite=Lax";
313
+ break;
314
+ case "none":
315
+ str += "; SameSite=None";
316
+ break;
317
+ default:
318
+ throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
319
+ }
320
+ }
321
+ return str;
322
+ }
323
+ function decode(str) {
324
+ if (str.indexOf("%") === -1)
325
+ return str;
326
+ try {
327
+ return decodeURIComponent(str);
328
+ } catch (e) {
329
+ return str;
330
+ }
331
+ }
332
+ function isDate(val) {
333
+ return __toString.call(val) === "[object Date]";
334
+ }
335
+ }
336
+ });
337
+
24
338
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/version.mjs
25
339
  var version2, versionInfo;
26
340
  var init_version = __esm({
@@ -37,10 +351,10 @@ var MockServiceWorker = (() => {
37
351
  });
38
352
 
39
353
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/devAssert.mjs
40
- function devAssert(condition, message3) {
354
+ function devAssert(condition, message4) {
41
355
  const booleanCondition = Boolean(condition);
42
356
  if (!booleanCondition) {
43
- throw new Error(message3);
357
+ throw new Error(message4);
44
358
  }
45
359
  }
46
360
  var init_devAssert = __esm({
@@ -70,11 +384,11 @@ var MockServiceWorker = (() => {
70
384
  });
71
385
 
72
386
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/invariant.mjs
73
- function invariant2(condition, message3) {
387
+ function invariant2(condition, message4) {
74
388
  const booleanCondition = Boolean(condition);
75
389
  if (!booleanCondition) {
76
390
  throw new Error(
77
- message3 != null ? message3 : "Unexpected invariant triggered."
391
+ message4 != null ? message4 : "Unexpected invariant triggered."
78
392
  );
79
393
  }
80
394
  }
@@ -233,10 +547,10 @@ var MockServiceWorker = (() => {
233
547
  /**
234
548
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
235
549
  */
236
- constructor(message3, ...rawArgs) {
550
+ constructor(message4, ...rawArgs) {
237
551
  var _this$nodes, _nodeLocations$, _ref;
238
552
  const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs);
239
- super(message3);
553
+ super(message4);
240
554
  this.name = "GraphQLError";
241
555
  this.path = path !== null && path !== void 0 ? path : void 0;
242
556
  this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0;
@@ -1480,7 +1794,7 @@ spurious results.`);
1480
1794
  });
1481
1795
 
1482
1796
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/language/parser.mjs
1483
- function parse3(source, options) {
1797
+ function parse4(source, options) {
1484
1798
  const parser = new Parser(source, options);
1485
1799
  return parser.parseDocument();
1486
1800
  }
@@ -2765,22 +3079,22 @@ spurious results.`);
2765
3079
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/didYouMean.mjs
2766
3080
  function didYouMean(firstArg, secondArg) {
2767
3081
  const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg];
2768
- let message3 = " Did you mean ";
3082
+ let message4 = " Did you mean ";
2769
3083
  if (subMessage) {
2770
- message3 += subMessage + " ";
3084
+ message4 += subMessage + " ";
2771
3085
  }
2772
3086
  const suggestions = suggestionsArg.map((x) => `"${x}"`);
2773
3087
  switch (suggestions.length) {
2774
3088
  case 0:
2775
3089
  return "";
2776
3090
  case 1:
2777
- return message3 + suggestions[0] + "?";
3091
+ return message4 + suggestions[0] + "?";
2778
3092
  case 2:
2779
- return message3 + suggestions[0] + " or " + suggestions[1] + "?";
3093
+ return message4 + suggestions[0] + " or " + suggestions[1] + "?";
2780
3094
  }
2781
3095
  const selected = suggestions.slice(0, MAX_SUGGESTIONS);
2782
3096
  const lastItem = selected.pop();
2783
- return message3 + selected.join(", ") + ", or " + lastItem + "?";
3097
+ return message4 + selected.join(", ") + ", or " + lastItem + "?";
2784
3098
  }
2785
3099
  var MAX_SUGGESTIONS;
2786
3100
  var init_didYouMean = __esm({
@@ -6132,10 +6446,10 @@ spurious results.`);
6132
6446
  this._errors = [];
6133
6447
  this.schema = schema;
6134
6448
  }
6135
- reportError(message3, nodes) {
6449
+ reportError(message4, nodes) {
6136
6450
  const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
6137
6451
  this._errors.push(
6138
- new GraphQLError(message3, {
6452
+ new GraphQLError(message4, {
6139
6453
  nodes: _nodes
6140
6454
  })
6141
6455
  );
@@ -10514,7 +10828,7 @@ spurious results.`);
10514
10828
  }
10515
10829
  let document2;
10516
10830
  try {
10517
- document2 = parse3(source);
10831
+ document2 = parse4(source);
10518
10832
  } catch (syntaxError2) {
10519
10833
  return {
10520
10834
  errors: [syntaxError2]
@@ -11160,7 +11474,7 @@ spurious results.`);
11160
11474
  inputValueDeprecation: true,
11161
11475
  ...options
11162
11476
  };
11163
- const document2 = parse3(getIntrospectionQuery(optionsWithDefaults));
11477
+ const document2 = parse4(getIntrospectionQuery(optionsWithDefaults));
11164
11478
  const result = executeSync({
11165
11479
  schema,
11166
11480
  document: document2
@@ -11959,7 +12273,7 @@ spurious results.`);
11959
12273
  return new GraphQLSchema({ ...config, directives });
11960
12274
  }
11961
12275
  function buildSchema(source, options) {
11962
- const document2 = parse3(source, {
12276
+ const document2 = parse4(source, {
11963
12277
  noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
11964
12278
  allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables
11965
12279
  });
@@ -13059,7 +13373,7 @@ ${operationTypes.join("\n")}
13059
13373
  isWrappingType: () => isWrappingType,
13060
13374
  lexicographicSortSchema: () => lexicographicSortSchema,
13061
13375
  locatedError: () => locatedError,
13062
- parse: () => parse3,
13376
+ parse: () => parse4,
13063
13377
  parseConstValue: () => parseConstValue,
13064
13378
  parseType: () => parseType,
13065
13379
  parseValue: () => parseValue,
@@ -13158,12 +13472,12 @@ ${operationTypes.join("\n")}
13158
13472
  }
13159
13473
  }
13160
13474
  }
13161
- function format(message3, ...positionals) {
13475
+ function format(message4, ...positionals) {
13162
13476
  if (positionals.length === 0) {
13163
- return message3;
13477
+ return message4;
13164
13478
  }
13165
13479
  let positionalIndex = 0;
13166
- let formattedMessage = message3.replace(
13480
+ let formattedMessage = message4.replace(
13167
13481
  POSITIONALS_EXP,
13168
13482
  (match2, isEscaped, _, flag) => {
13169
13483
  const positional = positionals[positionalIndex];
@@ -13191,22 +13505,22 @@ ${operationTypes.join("\n")}
13191
13505
  error3.stack = nextStack.join("\n");
13192
13506
  }
13193
13507
  var InvariantError = class extends Error {
13194
- constructor(message3, ...positionals) {
13195
- super(message3);
13196
- this.message = message3;
13508
+ constructor(message4, ...positionals) {
13509
+ super(message4);
13510
+ this.message = message4;
13197
13511
  this.name = "Invariant Violation";
13198
- this.message = format(message3, ...positionals);
13512
+ this.message = format(message4, ...positionals);
13199
13513
  cleanErrorStack(this);
13200
13514
  }
13201
13515
  };
13202
- var invariant = (predicate, message3, ...positionals) => {
13516
+ var invariant = (predicate, message4, ...positionals) => {
13203
13517
  if (!predicate) {
13204
- throw new InvariantError(message3, ...positionals);
13518
+ throw new InvariantError(message4, ...positionals);
13205
13519
  }
13206
13520
  };
13207
- invariant.as = (ErrorConstructor, predicate, message3, ...positionals) => {
13521
+ invariant.as = (ErrorConstructor, predicate, message4, ...positionals) => {
13208
13522
  if (!predicate) {
13209
- const formatMessage2 = positionals.length === 0 ? message3 : format(message3, ...positionals);
13523
+ const formatMessage2 = positionals.length === 0 ? message4 : format(message4, ...positionals);
13210
13524
  let error3;
13211
13525
  try {
13212
13526
  error3 = Reflect.construct(ErrorConstructor, [
@@ -13221,15 +13535,15 @@ ${operationTypes.join("\n")}
13221
13535
 
13222
13536
  // src/core/utils/internal/devUtils.ts
13223
13537
  var LIBRARY_PREFIX = "[MSW]";
13224
- function formatMessage(message3, ...positionals) {
13225
- const interpolatedMessage = format(message3, ...positionals);
13538
+ function formatMessage(message4, ...positionals) {
13539
+ const interpolatedMessage = format(message4, ...positionals);
13226
13540
  return `${LIBRARY_PREFIX} ${interpolatedMessage}`;
13227
13541
  }
13228
- function warn(message3, ...positionals) {
13229
- console.warn(formatMessage(message3, ...positionals));
13542
+ function warn(message4, ...positionals) {
13543
+ console.warn(formatMessage(message4, ...positionals));
13230
13544
  }
13231
- function error(message3, ...positionals) {
13232
- console.error(formatMessage(message3, ...positionals));
13545
+ function error(message4, ...positionals) {
13546
+ console.error(formatMessage(message4, ...positionals));
13233
13547
  }
13234
13548
  var devUtils = {
13235
13549
  formatMessage,
@@ -13237,8 +13551,8 @@ ${operationTypes.join("\n")}
13237
13551
  error
13238
13552
  };
13239
13553
  var InternalError = class extends Error {
13240
- constructor(message3) {
13241
- super(message3);
13554
+ constructor(message4) {
13555
+ super(message4);
13242
13556
  this.name = "InternalError";
13243
13557
  }
13244
13558
  };
@@ -13744,180 +14058,19 @@ ${operationTypes.join("\n")}
13744
14058
  };
13745
14059
  }
13746
14060
 
13747
- // node_modules/.pnpm/@bundled-es-modules+statuses@1.0.1/node_modules/@bundled-es-modules/statuses/index-esm.js
13748
- var __create = Object.create;
13749
- var __defProp2 = Object.defineProperty;
13750
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
13751
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
13752
- var __getProtoOf = Object.getPrototypeOf;
13753
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
13754
- var __commonJS = (cb, mod) => function __require() {
13755
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13756
- };
13757
- var __copyProps2 = (to, from, except, desc) => {
13758
- if (from && typeof from === "object" || typeof from === "function") {
13759
- for (let key of __getOwnPropNames2(from))
13760
- if (!__hasOwnProp2.call(to, key) && key !== except)
13761
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
13762
- }
13763
- return to;
13764
- };
13765
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps2(
13766
- // If the importer is in node compatibility mode or this is not an ESM
13767
- // file that has been converted to a CommonJS file using a Babel-
13768
- // compatible transform (i.e. "__esModule" has not been set), then set
13769
- // "default" to the CommonJS "module.exports" for node compatibility.
13770
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
13771
- mod
13772
- ));
13773
- var require_codes = __commonJS({
13774
- "node_modules/statuses/codes.json"(exports, module) {
13775
- module.exports = {
13776
- "100": "Continue",
13777
- "101": "Switching Protocols",
13778
- "102": "Processing",
13779
- "103": "Early Hints",
13780
- "200": "OK",
13781
- "201": "Created",
13782
- "202": "Accepted",
13783
- "203": "Non-Authoritative Information",
13784
- "204": "No Content",
13785
- "205": "Reset Content",
13786
- "206": "Partial Content",
13787
- "207": "Multi-Status",
13788
- "208": "Already Reported",
13789
- "226": "IM Used",
13790
- "300": "Multiple Choices",
13791
- "301": "Moved Permanently",
13792
- "302": "Found",
13793
- "303": "See Other",
13794
- "304": "Not Modified",
13795
- "305": "Use Proxy",
13796
- "307": "Temporary Redirect",
13797
- "308": "Permanent Redirect",
13798
- "400": "Bad Request",
13799
- "401": "Unauthorized",
13800
- "402": "Payment Required",
13801
- "403": "Forbidden",
13802
- "404": "Not Found",
13803
- "405": "Method Not Allowed",
13804
- "406": "Not Acceptable",
13805
- "407": "Proxy Authentication Required",
13806
- "408": "Request Timeout",
13807
- "409": "Conflict",
13808
- "410": "Gone",
13809
- "411": "Length Required",
13810
- "412": "Precondition Failed",
13811
- "413": "Payload Too Large",
13812
- "414": "URI Too Long",
13813
- "415": "Unsupported Media Type",
13814
- "416": "Range Not Satisfiable",
13815
- "417": "Expectation Failed",
13816
- "418": "I'm a Teapot",
13817
- "421": "Misdirected Request",
13818
- "422": "Unprocessable Entity",
13819
- "423": "Locked",
13820
- "424": "Failed Dependency",
13821
- "425": "Too Early",
13822
- "426": "Upgrade Required",
13823
- "428": "Precondition Required",
13824
- "429": "Too Many Requests",
13825
- "431": "Request Header Fields Too Large",
13826
- "451": "Unavailable For Legal Reasons",
13827
- "500": "Internal Server Error",
13828
- "501": "Not Implemented",
13829
- "502": "Bad Gateway",
13830
- "503": "Service Unavailable",
13831
- "504": "Gateway Timeout",
13832
- "505": "HTTP Version Not Supported",
13833
- "506": "Variant Also Negotiates",
13834
- "507": "Insufficient Storage",
13835
- "508": "Loop Detected",
13836
- "509": "Bandwidth Limit Exceeded",
13837
- "510": "Not Extended",
13838
- "511": "Network Authentication Required"
13839
- };
13840
- }
13841
- });
13842
- var require_statuses = __commonJS({
13843
- "node_modules/statuses/index.js"(exports, module) {
13844
- "use strict";
13845
- var codes = require_codes();
13846
- module.exports = status2;
13847
- status2.message = codes;
13848
- status2.code = createMessageToStatusCodeMap(codes);
13849
- status2.codes = createStatusCodeList(codes);
13850
- status2.redirect = {
13851
- 300: true,
13852
- 301: true,
13853
- 302: true,
13854
- 303: true,
13855
- 305: true,
13856
- 307: true,
13857
- 308: true
13858
- };
13859
- status2.empty = {
13860
- 204: true,
13861
- 205: true,
13862
- 304: true
13863
- };
13864
- status2.retry = {
13865
- 502: true,
13866
- 503: true,
13867
- 504: true
13868
- };
13869
- function createMessageToStatusCodeMap(codes2) {
13870
- var map = {};
13871
- Object.keys(codes2).forEach(function forEachCode(code) {
13872
- var message3 = codes2[code];
13873
- var status3 = Number(code);
13874
- map[message3.toLowerCase()] = status3;
13875
- });
13876
- return map;
13877
- }
13878
- function createStatusCodeList(codes2) {
13879
- return Object.keys(codes2).map(function mapCode(code) {
13880
- return Number(code);
13881
- });
13882
- }
13883
- function getStatusCode(message3) {
13884
- var msg = message3.toLowerCase();
13885
- if (!Object.prototype.hasOwnProperty.call(status2.code, msg)) {
13886
- throw new Error('invalid status message: "' + message3 + '"');
13887
- }
13888
- return status2.code[msg];
13889
- }
13890
- function getStatusMessage(code) {
13891
- if (!Object.prototype.hasOwnProperty.call(status2.message, code)) {
13892
- throw new Error("invalid status code: " + code);
13893
- }
13894
- return status2.message[code];
13895
- }
13896
- function status2(code) {
13897
- if (typeof code === "number") {
13898
- return getStatusMessage(code);
13899
- }
13900
- if (typeof code !== "string") {
13901
- throw new TypeError("code must be a number or string");
13902
- }
13903
- var n = parseInt(code, 10);
13904
- if (!isNaN(n)) {
13905
- return getStatusMessage(n);
13906
- }
13907
- return getStatusCode(code);
13908
- }
13909
- }
13910
- });
13911
- var import_statuses = __toESM(require_statuses(), 1);
13912
- var source_default = import_statuses.default;
14061
+ // src/shims/statuses.ts
14062
+ var allStatuses = __toESM(require_statuses(), 1);
14063
+ var statuses = allStatuses.default || allStatuses;
14064
+ var message = statuses.message;
14065
+ var statuses_default = statuses;
13913
14066
 
13914
14067
  // src/core/utils/logging/serializeResponse.ts
13915
- var { message } = source_default;
14068
+ var { message: message2 } = statuses_default;
13916
14069
  async function serializeResponse(response) {
13917
14070
  const responseClone = response.clone();
13918
14071
  const responseText = await responseClone.text();
13919
14072
  const responseStatus = responseClone.status || 200;
13920
- const responseStatusText = responseClone.statusText || message[responseStatus] || "OK";
14073
+ const responseStatusText = responseClone.statusText || message2[responseStatus] || "OK";
13921
14074
  return {
13922
14075
  status: responseStatus,
13923
14076
  statusText: responseStatusText,
@@ -14367,10 +14520,10 @@ ${operationTypes.join("\n")}
14367
14520
  }
14368
14521
 
14369
14522
  // node_modules/.pnpm/@open-draft+logger@0.3.0/node_modules/@open-draft/logger/lib/index.mjs
14370
- var __defProp3 = Object.defineProperty;
14523
+ var __defProp2 = Object.defineProperty;
14371
14524
  var __export2 = (target, all) => {
14372
14525
  for (var name in all)
14373
- __defProp3(target, name, { get: all[name], enumerable: true });
14526
+ __defProp2(target, name, { get: all[name], enumerable: true });
14374
14527
  };
14375
14528
  var colors_exports = {};
14376
14529
  __export2(colors_exports, {
@@ -14426,10 +14579,10 @@ ${operationTypes.join("\n")}
14426
14579
  * @example
14427
14580
  * logger.debug('no duplicates found, creating a document...')
14428
14581
  */
14429
- debug(message3, ...positionals) {
14582
+ debug(message4, ...positionals) {
14430
14583
  this.logEntry({
14431
14584
  level: "debug",
14432
- message: gray(message3),
14585
+ message: gray(message4),
14433
14586
  positionals,
14434
14587
  prefix: this.prefix,
14435
14588
  colors: {
@@ -14442,10 +14595,10 @@ ${operationTypes.join("\n")}
14442
14595
  * @example
14443
14596
  * logger.info('start parsing...')
14444
14597
  */
14445
- info(message3, ...positionals) {
14598
+ info(message4, ...positionals) {
14446
14599
  this.logEntry({
14447
14600
  level: "info",
14448
- message: message3,
14601
+ message: message4,
14449
14602
  positionals,
14450
14603
  prefix: this.prefix,
14451
14604
  colors: {
@@ -14471,10 +14624,10 @@ ${operationTypes.join("\n")}
14471
14624
  * @example
14472
14625
  * logger.success('successfully created document')
14473
14626
  */
14474
- success(message3, ...positionals) {
14627
+ success(message4, ...positionals) {
14475
14628
  this.logEntry({
14476
14629
  level: "info",
14477
- message: message3,
14630
+ message: message4,
14478
14631
  positionals,
14479
14632
  prefix: `\u2714 ${this.prefix}`,
14480
14633
  colors: {
@@ -14488,10 +14641,10 @@ ${operationTypes.join("\n")}
14488
14641
  * @example
14489
14642
  * logger.warning('found legacy document format')
14490
14643
  */
14491
- warning(message3, ...positionals) {
14644
+ warning(message4, ...positionals) {
14492
14645
  this.logEntry({
14493
14646
  level: "warning",
14494
- message: message3,
14647
+ message: message4,
14495
14648
  positionals,
14496
14649
  prefix: `\u26A0 ${this.prefix}`,
14497
14650
  colors: {
@@ -14505,10 +14658,10 @@ ${operationTypes.join("\n")}
14505
14658
  * @example
14506
14659
  * logger.error('something went wrong')
14507
14660
  */
14508
- error(message3, ...positionals) {
14661
+ error(message4, ...positionals) {
14509
14662
  this.logEntry({
14510
14663
  level: "error",
14511
- message: message3,
14664
+ message: message4,
14512
14665
  positionals,
14513
14666
  prefix: `\u2716 ${this.prefix}`,
14514
14667
  colors: {
@@ -14529,22 +14682,22 @@ ${operationTypes.join("\n")}
14529
14682
  only(callback) {
14530
14683
  callback();
14531
14684
  }
14532
- createEntry(level, message3) {
14685
+ createEntry(level, message4) {
14533
14686
  return {
14534
14687
  timestamp: /* @__PURE__ */ new Date(),
14535
14688
  level,
14536
- message: message3
14689
+ message: message4
14537
14690
  };
14538
14691
  }
14539
14692
  logEntry(args) {
14540
14693
  const {
14541
14694
  level,
14542
- message: message3,
14695
+ message: message4,
14543
14696
  prefix,
14544
14697
  colors: customColors,
14545
14698
  positionals = []
14546
14699
  } = args;
14547
- const entry = this.createEntry(level, message3);
14700
+ const entry = this.createEntry(level, message4);
14548
14701
  const timestampColor = customColors?.timestamp || "gray";
14549
14702
  const prefixColor = customColors?.prefix || "gray";
14550
14703
  const colorize = {
@@ -14553,7 +14706,7 @@ ${operationTypes.join("\n")}
14553
14706
  };
14554
14707
  const write = this.getWriter(level);
14555
14708
  write(
14556
- [colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message3)).join(" "),
14709
+ [colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message4)).join(" "),
14557
14710
  ...positionals.map(serializeInput)
14558
14711
  );
14559
14712
  }
@@ -14592,26 +14745,26 @@ ${operationTypes.join("\n")}
14592
14745
  }
14593
14746
  };
14594
14747
  var noop = () => void 0;
14595
- function log(message3, ...positionals) {
14748
+ function log(message4, ...positionals) {
14596
14749
  if (IS_NODE) {
14597
- process.stdout.write(format(message3, ...positionals) + "\n");
14750
+ process.stdout.write(format(message4, ...positionals) + "\n");
14598
14751
  return;
14599
14752
  }
14600
- console.log(message3, ...positionals);
14753
+ console.log(message4, ...positionals);
14601
14754
  }
14602
- function warn2(message3, ...positionals) {
14755
+ function warn2(message4, ...positionals) {
14603
14756
  if (IS_NODE) {
14604
- process.stderr.write(format(message3, ...positionals) + "\n");
14757
+ process.stderr.write(format(message4, ...positionals) + "\n");
14605
14758
  return;
14606
14759
  }
14607
- console.warn(message3, ...positionals);
14760
+ console.warn(message4, ...positionals);
14608
14761
  }
14609
- function error2(message3, ...positionals) {
14762
+ function error2(message4, ...positionals) {
14610
14763
  if (IS_NODE) {
14611
- process.stderr.write(format(message3, ...positionals) + "\n");
14764
+ process.stderr.write(format(message4, ...positionals) + "\n");
14612
14765
  return;
14613
14766
  }
14614
- console.error(message3, ...positionals);
14767
+ console.error(message4, ...positionals);
14615
14768
  }
14616
14769
  function getVariable(variableName) {
14617
14770
  if (IS_NODE) {
@@ -14622,20 +14775,20 @@ ${operationTypes.join("\n")}
14622
14775
  function isDefinedAndNotEquals(value, expected) {
14623
14776
  return value !== void 0 && value !== expected;
14624
14777
  }
14625
- function serializeInput(message3) {
14626
- if (typeof message3 === "undefined") {
14778
+ function serializeInput(message4) {
14779
+ if (typeof message4 === "undefined") {
14627
14780
  return "undefined";
14628
14781
  }
14629
- if (message3 === null) {
14782
+ if (message4 === null) {
14630
14783
  return "null";
14631
14784
  }
14632
- if (typeof message3 === "string") {
14633
- return message3;
14785
+ if (typeof message4 === "string") {
14786
+ return message4;
14634
14787
  }
14635
- if (typeof message3 === "object") {
14636
- return JSON.stringify(message3);
14788
+ if (typeof message4 === "object") {
14789
+ return JSON.stringify(message4);
14637
14790
  }
14638
- return message3.toString();
14791
+ return message4.toString();
14639
14792
  }
14640
14793
 
14641
14794
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
@@ -14834,9 +14987,6 @@ ${operationTypes.join("\n")}
14834
14987
 
14835
14988
  // src/core/utils/url/cleanUrl.ts
14836
14989
  var REDUNDANT_CHARACTERS_EXP = /[?|#].*$/g;
14837
- function getSearchParams(path) {
14838
- return new URL(`/${path}`, "http://localhost").searchParams;
14839
- }
14840
14990
  function cleanUrl(path) {
14841
14991
  if (path.endsWith("?")) {
14842
14992
  return path;
@@ -14910,198 +15060,11 @@ ${operationTypes.join("\n")}
14910
15060
  return urlInstance.origin === location.origin ? urlInstance.pathname : urlInstance.origin + urlInstance.pathname;
14911
15061
  }
14912
15062
 
14913
- // node_modules/.pnpm/@bundled-es-modules+cookie@2.0.1/node_modules/@bundled-es-modules/cookie/index-esm.js
14914
- var __create2 = Object.create;
14915
- var __defProp4 = Object.defineProperty;
14916
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
14917
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
14918
- var __getProtoOf2 = Object.getPrototypeOf;
14919
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
14920
- var __commonJS2 = (cb, mod) => function __require() {
14921
- return mod || (0, cb[__getOwnPropNames3(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14922
- };
14923
- var __copyProps3 = (to, from, except, desc) => {
14924
- if (from && typeof from === "object" || typeof from === "function") {
14925
- for (let key of __getOwnPropNames3(from))
14926
- if (!__hasOwnProp3.call(to, key) && key !== except)
14927
- __defProp4(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
14928
- }
14929
- return to;
14930
- };
14931
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps3(
14932
- // If the importer is in node compatibility mode or this is not an ESM
14933
- // file that has been converted to a CommonJS file using a Babel-
14934
- // compatible transform (i.e. "__esModule" has not been set), then set
14935
- // "default" to the CommonJS "module.exports" for node compatibility.
14936
- isNodeMode || !mod || !mod.__esModule ? __defProp4(target, "default", { value: mod, enumerable: true }) : target,
14937
- mod
14938
- ));
14939
- var require_cookie = __commonJS2({
14940
- "node_modules/cookie/index.js"(exports) {
14941
- "use strict";
14942
- exports.parse = parse4;
14943
- exports.serialize = serialize;
14944
- var __toString = Object.prototype.toString;
14945
- var __hasOwnProperty = Object.prototype.hasOwnProperty;
14946
- var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
14947
- var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
14948
- var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
14949
- var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
14950
- function parse4(str, opt) {
14951
- if (typeof str !== "string") {
14952
- throw new TypeError("argument str must be a string");
14953
- }
14954
- var obj = {};
14955
- var len = str.length;
14956
- if (len < 2) return obj;
14957
- var dec = opt && opt.decode || decode;
14958
- var index = 0;
14959
- var eqIdx = 0;
14960
- var endIdx = 0;
14961
- do {
14962
- eqIdx = str.indexOf("=", index);
14963
- if (eqIdx === -1) break;
14964
- endIdx = str.indexOf(";", index);
14965
- if (endIdx === -1) {
14966
- endIdx = len;
14967
- } else if (eqIdx > endIdx) {
14968
- index = str.lastIndexOf(";", eqIdx - 1) + 1;
14969
- continue;
14970
- }
14971
- var keyStartIdx = startIndex(str, index, eqIdx);
14972
- var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
14973
- var key = str.slice(keyStartIdx, keyEndIdx);
14974
- if (!__hasOwnProperty.call(obj, key)) {
14975
- var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
14976
- var valEndIdx = endIndex(str, endIdx, valStartIdx);
14977
- if (str.charCodeAt(valStartIdx) === 34 && str.charCodeAt(valEndIdx - 1) === 34) {
14978
- valStartIdx++;
14979
- valEndIdx--;
14980
- }
14981
- var val = str.slice(valStartIdx, valEndIdx);
14982
- obj[key] = tryDecode(val, dec);
14983
- }
14984
- index = endIdx + 1;
14985
- } while (index < len);
14986
- return obj;
14987
- }
14988
- function startIndex(str, index, max) {
14989
- do {
14990
- var code = str.charCodeAt(index);
14991
- if (code !== 32 && code !== 9) return index;
14992
- } while (++index < max);
14993
- return max;
14994
- }
14995
- function endIndex(str, index, min) {
14996
- while (index > min) {
14997
- var code = str.charCodeAt(--index);
14998
- if (code !== 32 && code !== 9) return index + 1;
14999
- }
15000
- return min;
15001
- }
15002
- function serialize(name, val, opt) {
15003
- var enc = opt && opt.encode || encodeURIComponent;
15004
- if (typeof enc !== "function") {
15005
- throw new TypeError("option encode is invalid");
15006
- }
15007
- if (!cookieNameRegExp.test(name)) {
15008
- throw new TypeError("argument name is invalid");
15009
- }
15010
- var value = enc(val);
15011
- if (!cookieValueRegExp.test(value)) {
15012
- throw new TypeError("argument val is invalid");
15013
- }
15014
- var str = name + "=" + value;
15015
- if (!opt) return str;
15016
- if (null != opt.maxAge) {
15017
- var maxAge = Math.floor(opt.maxAge);
15018
- if (!isFinite(maxAge)) {
15019
- throw new TypeError("option maxAge is invalid");
15020
- }
15021
- str += "; Max-Age=" + maxAge;
15022
- }
15023
- if (opt.domain) {
15024
- if (!domainValueRegExp.test(opt.domain)) {
15025
- throw new TypeError("option domain is invalid");
15026
- }
15027
- str += "; Domain=" + opt.domain;
15028
- }
15029
- if (opt.path) {
15030
- if (!pathValueRegExp.test(opt.path)) {
15031
- throw new TypeError("option path is invalid");
15032
- }
15033
- str += "; Path=" + opt.path;
15034
- }
15035
- if (opt.expires) {
15036
- var expires = opt.expires;
15037
- if (!isDate(expires) || isNaN(expires.valueOf())) {
15038
- throw new TypeError("option expires is invalid");
15039
- }
15040
- str += "; Expires=" + expires.toUTCString();
15041
- }
15042
- if (opt.httpOnly) {
15043
- str += "; HttpOnly";
15044
- }
15045
- if (opt.secure) {
15046
- str += "; Secure";
15047
- }
15048
- if (opt.partitioned) {
15049
- str += "; Partitioned";
15050
- }
15051
- if (opt.priority) {
15052
- var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
15053
- switch (priority) {
15054
- case "low":
15055
- str += "; Priority=Low";
15056
- break;
15057
- case "medium":
15058
- str += "; Priority=Medium";
15059
- break;
15060
- case "high":
15061
- str += "; Priority=High";
15062
- break;
15063
- default:
15064
- throw new TypeError("option priority is invalid");
15065
- }
15066
- }
15067
- if (opt.sameSite) {
15068
- var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
15069
- switch (sameSite) {
15070
- case true:
15071
- str += "; SameSite=Strict";
15072
- break;
15073
- case "lax":
15074
- str += "; SameSite=Lax";
15075
- break;
15076
- case "strict":
15077
- str += "; SameSite=Strict";
15078
- break;
15079
- case "none":
15080
- str += "; SameSite=None";
15081
- break;
15082
- default:
15083
- throw new TypeError("option sameSite is invalid");
15084
- }
15085
- }
15086
- return str;
15087
- }
15088
- function decode(str) {
15089
- return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
15090
- }
15091
- function isDate(val) {
15092
- return __toString.call(val) === "[object Date]";
15093
- }
15094
- function tryDecode(str, decode2) {
15095
- try {
15096
- return decode2(str);
15097
- } catch (e) {
15098
- return str;
15099
- }
15100
- }
15101
- }
15102
- });
15103
- var import_cookie = __toESM2(require_cookie(), 1);
15104
- var source_default2 = import_cookie.default;
15063
+ // src/shims/cookie.ts
15064
+ var allCookie = __toESM(require_dist(), 1);
15065
+ var cookie = allCookie.default || allCookie;
15066
+ var parse2 = cookie.parse;
15067
+ var serialize = cookie.serialize;
15105
15068
 
15106
15069
  // node_modules/.pnpm/tldts-core@7.0.12/node_modules/tldts-core/dist/es6/src/domain.js
15107
15070
  function shareSameDomainSuffix(hostname, vhost) {
@@ -15816,9 +15779,9 @@ ${operationTypes.join("\n")}
15816
15779
  /**
15817
15780
  * @internal No doc because this is an overload that supports the implementation
15818
15781
  */
15819
- putCookie(cookie, callback) {
15782
+ putCookie(cookie2, callback) {
15820
15783
  const promiseCallback = createPromiseCallback(callback);
15821
- const { domain, path, key } = cookie;
15784
+ const { domain, path, key } = cookie2;
15822
15785
  if (domain == null || path == null || key == null) {
15823
15786
  return promiseCallback.resolve(void 0);
15824
15787
  }
@@ -15826,7 +15789,7 @@ ${operationTypes.join("\n")}
15826
15789
  this.idx[domain] = domainEntry;
15827
15790
  const pathEntry = domainEntry[path] ?? /* @__PURE__ */ Object.create(null);
15828
15791
  domainEntry[path] = pathEntry;
15829
- pathEntry[key] = cookie;
15792
+ pathEntry[key] = cookie2;
15830
15793
  return promiseCallback.resolve(void 0);
15831
15794
  }
15832
15795
  /**
@@ -15907,10 +15870,10 @@ ${operationTypes.join("\n")}
15907
15870
  function isObject(data) {
15908
15871
  return objectToString(data) === "[object Object]";
15909
15872
  }
15910
- function validate(bool, cbOrMessage, message3) {
15873
+ function validate(bool, cbOrMessage, message4) {
15911
15874
  if (bool) return;
15912
15875
  const cb = typeof cbOrMessage === "function" ? cbOrMessage : void 0;
15913
- let options = typeof cbOrMessage === "function" ? message3 : cbOrMessage;
15876
+ let options = typeof cbOrMessage === "function" ? message4 : cbOrMessage;
15914
15877
  if (!isObject(options)) options = "[object Object]";
15915
15878
  const err = new ParameterError(safeToString(options));
15916
15879
  if (cb) cb(err);
@@ -16148,7 +16111,7 @@ ${operationTypes.join("\n")}
16148
16111
  c.value = cookieValue;
16149
16112
  return c;
16150
16113
  }
16151
- function parse2(str, options) {
16114
+ function parse3(str, options) {
16152
16115
  if (isEmptyString(str) || !isString(str)) {
16153
16116
  return void 0;
16154
16117
  }
@@ -16687,7 +16650,7 @@ ${operationTypes.join("\n")}
16687
16650
  * @param options - Configures `strict` or `loose` mode for cookie parsing
16688
16651
  */
16689
16652
  static parse(str, options) {
16690
- return parse2(str, options);
16653
+ return parse3(str, options);
16691
16654
  }
16692
16655
  /**
16693
16656
  * Does the reverse of {@link Cookie.toJSON}.
@@ -16894,14 +16857,14 @@ ${operationTypes.join("\n")}
16894
16857
  return void 0;
16895
16858
  }
16896
16859
  }
16897
- function isSecurePrefixConditionMet(cookie) {
16898
- const startsWithSecurePrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Secure-");
16899
- return !startsWithSecurePrefix || cookie.secure;
16860
+ function isSecurePrefixConditionMet(cookie2) {
16861
+ const startsWithSecurePrefix = typeof cookie2.key === "string" && cookie2.key.startsWith("__Secure-");
16862
+ return !startsWithSecurePrefix || cookie2.secure;
16900
16863
  }
16901
- function isHostPrefixConditionMet(cookie) {
16902
- const startsWithHostPrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Host-");
16864
+ function isHostPrefixConditionMet(cookie2) {
16865
+ const startsWithHostPrefix = typeof cookie2.key === "string" && cookie2.key.startsWith("__Host-");
16903
16866
  return !startsWithHostPrefix || Boolean(
16904
- cookie.secure && cookie.hostOnly && cookie.path != null && cookie.path === "/"
16867
+ cookie2.secure && cookie2.hostOnly && cookie2.path != null && cookie2.path === "/"
16905
16868
  );
16906
16869
  }
16907
16870
  function getNormalizedPrefixSecurity(prefixSecurity) {
@@ -16961,7 +16924,7 @@ ${operationTypes.join("\n")}
16961
16924
  /**
16962
16925
  * @internal No doc because this is the overload implementation
16963
16926
  */
16964
- setCookie(cookie, url, options, callback) {
16927
+ setCookie(cookie2, url, options, callback) {
16965
16928
  if (typeof options === "function") {
16966
16929
  callback = options;
16967
16930
  options = void 0;
@@ -16985,7 +16948,7 @@ ${operationTypes.join("\n")}
16985
16948
  options = defaultSetCookieOptions;
16986
16949
  }
16987
16950
  validate(typeof cb === "function", cb);
16988
- if (!isNonEmptyString(cookie) && !isObject(cookie) && cookie instanceof String && cookie.length == 0) {
16951
+ if (!isNonEmptyString(cookie2) && !isObject(cookie2) && cookie2 instanceof String && cookie2.length == 0) {
16989
16952
  return promiseCallback.resolve(void 0);
16990
16953
  }
16991
16954
  } catch (err) {
@@ -17000,28 +16963,28 @@ ${operationTypes.join("\n")}
17000
16963
  return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR));
17001
16964
  }
17002
16965
  }
17003
- if (typeof cookie === "string" || cookie instanceof String) {
17004
- const parsedCookie = Cookie.parse(cookie.toString(), { loose });
16966
+ if (typeof cookie2 === "string" || cookie2 instanceof String) {
16967
+ const parsedCookie = Cookie.parse(cookie2.toString(), { loose });
17005
16968
  if (!parsedCookie) {
17006
16969
  const err = new Error("Cookie failed to parse");
17007
16970
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17008
16971
  }
17009
- cookie = parsedCookie;
17010
- } else if (!(cookie instanceof Cookie)) {
16972
+ cookie2 = parsedCookie;
16973
+ } else if (!(cookie2 instanceof Cookie)) {
17011
16974
  const err = new Error(
17012
16975
  "First argument to setCookie must be a Cookie object or string"
17013
16976
  );
17014
16977
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17015
16978
  }
17016
16979
  const now = options?.now || /* @__PURE__ */ new Date();
17017
- if (this.rejectPublicSuffixes && cookie.domain) {
16980
+ if (this.rejectPublicSuffixes && cookie2.domain) {
17018
16981
  try {
17019
- const cdomain = cookie.cdomain();
16982
+ const cdomain = cookie2.cdomain();
17020
16983
  const suffix = typeof cdomain === "string" ? getPublicSuffix(cdomain, {
17021
16984
  allowSpecialUseDomain: this.allowSpecialUseDomain,
17022
16985
  ignoreError: options?.ignoreError
17023
16986
  }) : null;
17024
- if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie.domain)) {
16987
+ if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie2.domain)) {
17025
16988
  const err = new Error("Cookie has domain set to a public suffix");
17026
16989
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17027
16990
  }
@@ -17032,29 +16995,29 @@ ${operationTypes.join("\n")}
17032
16995
  );
17033
16996
  }
17034
16997
  }
17035
- if (cookie.domain) {
17036
- if (!domainMatch(host ?? void 0, cookie.cdomain() ?? void 0, false)) {
16998
+ if (cookie2.domain) {
16999
+ if (!domainMatch(host ?? void 0, cookie2.cdomain() ?? void 0, false)) {
17037
17000
  const err = new Error(
17038
- `Cookie not in this host's domain. Cookie:${cookie.cdomain() ?? "null"} Request:${host ?? "null"}`
17001
+ `Cookie not in this host's domain. Cookie:${cookie2.cdomain() ?? "null"} Request:${host ?? "null"}`
17039
17002
  );
17040
17003
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17041
17004
  }
17042
- if (cookie.hostOnly == null) {
17043
- cookie.hostOnly = false;
17005
+ if (cookie2.hostOnly == null) {
17006
+ cookie2.hostOnly = false;
17044
17007
  }
17045
17008
  } else {
17046
- cookie.hostOnly = true;
17047
- cookie.domain = host;
17009
+ cookie2.hostOnly = true;
17010
+ cookie2.domain = host;
17048
17011
  }
17049
- if (!cookie.path || cookie.path[0] !== "/") {
17050
- cookie.path = defaultPath(context.pathname);
17051
- cookie.pathIsDefault = true;
17012
+ if (!cookie2.path || cookie2.path[0] !== "/") {
17013
+ cookie2.path = defaultPath(context.pathname);
17014
+ cookie2.pathIsDefault = true;
17052
17015
  }
17053
- if (options?.http === false && cookie.httpOnly) {
17016
+ if (options?.http === false && cookie2.httpOnly) {
17054
17017
  const err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
17055
17018
  return options.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17056
17019
  }
17057
- if (cookie.sameSite !== "none" && cookie.sameSite !== void 0 && sameSiteContext) {
17020
+ if (cookie2.sameSite !== "none" && cookie2.sameSite !== void 0 && sameSiteContext) {
17058
17021
  if (sameSiteContext === "none") {
17059
17022
  const err = new Error(
17060
17023
  "Cookie is SameSite but this is a cross-origin request"
@@ -17067,10 +17030,10 @@ ${operationTypes.join("\n")}
17067
17030
  if (!prefixSecurityDisabled) {
17068
17031
  let errorFound = false;
17069
17032
  let errorMsg;
17070
- if (!isSecurePrefixConditionMet(cookie)) {
17033
+ if (!isSecurePrefixConditionMet(cookie2)) {
17071
17034
  errorFound = true;
17072
17035
  errorMsg = "Cookie has __Secure prefix but Secure attribute is not set";
17073
- } else if (!isHostPrefixConditionMet(cookie)) {
17036
+ } else if (!isHostPrefixConditionMet(cookie2)) {
17074
17037
  errorFound = true;
17075
17038
  errorMsg = "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'";
17076
17039
  }
@@ -17095,10 +17058,10 @@ ${operationTypes.join("\n")}
17095
17058
  const next = function(err2) {
17096
17059
  if (err2) {
17097
17060
  cb(err2);
17098
- } else if (typeof cookie === "string") {
17061
+ } else if (typeof cookie2 === "string") {
17099
17062
  cb(null, void 0);
17100
17063
  } else {
17101
- cb(null, cookie);
17064
+ cb(null, cookie2);
17102
17065
  }
17103
17066
  };
17104
17067
  if (oldCookie) {
@@ -17108,20 +17071,20 @@ ${operationTypes.join("\n")}
17108
17071
  else cb(err);
17109
17072
  return;
17110
17073
  }
17111
- if (cookie instanceof Cookie) {
17112
- cookie.creation = oldCookie.creation;
17113
- cookie.creationIndex = oldCookie.creationIndex;
17114
- cookie.lastAccessed = now;
17115
- store.updateCookie(oldCookie, cookie, next);
17074
+ if (cookie2 instanceof Cookie) {
17075
+ cookie2.creation = oldCookie.creation;
17076
+ cookie2.creationIndex = oldCookie.creationIndex;
17077
+ cookie2.lastAccessed = now;
17078
+ store.updateCookie(oldCookie, cookie2, next);
17116
17079
  }
17117
17080
  } else {
17118
- if (cookie instanceof Cookie) {
17119
- cookie.creation = cookie.lastAccessed = now;
17120
- store.putCookie(cookie, next);
17081
+ if (cookie2 instanceof Cookie) {
17082
+ cookie2.creation = cookie2.lastAccessed = now;
17083
+ store.putCookie(cookie2, next);
17121
17084
  }
17122
17085
  }
17123
17086
  };
17124
- store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie);
17087
+ store.findCookie(cookie2.domain, cookie2.path, cookie2.key, withCookie);
17125
17088
  return promiseCallback.promise;
17126
17089
  }
17127
17090
  /**
@@ -17144,8 +17107,8 @@ ${operationTypes.join("\n")}
17144
17107
  * @param options - Configuration settings to use when storing the cookie.
17145
17108
  * @public
17146
17109
  */
17147
- setCookieSync(cookie, url, options) {
17148
- const setCookieFn = options ? this.setCookie.bind(this, cookie, url, options) : this.setCookie.bind(this, cookie, url);
17110
+ setCookieSync(cookie2, url, options) {
17111
+ const setCookieFn = options ? this.setCookie.bind(this, cookie2, url, options) : this.setCookie.bind(this, cookie2, url);
17149
17112
  return this.callSync(setCookieFn);
17150
17113
  }
17151
17114
  /**
@@ -17255,8 +17218,8 @@ ${operationTypes.join("\n")}
17255
17218
  cookies = cookies.sort(cookieCompare);
17256
17219
  }
17257
17220
  const now2 = /* @__PURE__ */ new Date();
17258
- for (const cookie of cookies) {
17259
- cookie.lastAccessed = now2;
17221
+ for (const cookie2 of cookies) {
17222
+ cookie2.lastAccessed = now2;
17260
17223
  }
17261
17224
  cb(null, cookies);
17262
17225
  }
@@ -17394,8 +17357,8 @@ ${operationTypes.join("\n")}
17394
17357
  promiseCallback.callback(null, serialized);
17395
17358
  return;
17396
17359
  }
17397
- serialized.cookies = cookies.map((cookie) => {
17398
- const serializedCookie = cookie.toJSON();
17360
+ serialized.cookies = cookies.map((cookie2) => {
17361
+ const serializedCookie = cookie2.toJSON();
17399
17362
  delete serializedCookie.creationIndex;
17400
17363
  return serializedCookie;
17401
17364
  });
@@ -17444,18 +17407,18 @@ ${operationTypes.join("\n")}
17444
17407
  callback(err, this);
17445
17408
  return;
17446
17409
  }
17447
- let cookie;
17410
+ let cookie2;
17448
17411
  try {
17449
- cookie = Cookie.fromJSON(cookies.shift());
17412
+ cookie2 = Cookie.fromJSON(cookies.shift());
17450
17413
  } catch (e) {
17451
17414
  callback(e instanceof Error ? e : new Error(), void 0);
17452
17415
  return;
17453
17416
  }
17454
- if (cookie === void 0) {
17417
+ if (cookie2 === void 0) {
17455
17418
  putNext(null);
17456
17419
  return;
17457
17420
  }
17458
- this.store.putCookie(cookie, putNext);
17421
+ this.store.putCookie(cookie2, putNext);
17459
17422
  }
17460
17423
  };
17461
17424
  putNext(null);
@@ -17555,11 +17518,11 @@ ${operationTypes.join("\n")}
17555
17518
  return;
17556
17519
  }
17557
17520
  };
17558
- cookies.forEach((cookie) => {
17521
+ cookies.forEach((cookie2) => {
17559
17522
  store.removeCookie(
17560
- cookie.domain,
17561
- cookie.path,
17562
- cookie.key,
17523
+ cookie2.domain,
17524
+ cookie2.path,
17525
+ cookie2.key,
17563
17526
  removeCookieCb
17564
17527
  );
17565
17528
  });
@@ -17739,11 +17702,11 @@ ${operationTypes.join("\n")}
17739
17702
  }
17740
17703
  const cookies = {};
17741
17704
  for (const rawCookie of rawCookies) {
17742
- const cookie = Cookie.fromJSON(rawCookie);
17743
- if (cookie != null && cookie.domain != null && cookie.path != null) {
17744
- cookies[cookie.domain] ||= {};
17745
- cookies[cookie.domain][cookie.path] ||= {};
17746
- cookies[cookie.domain][cookie.path][cookie.key] = cookie;
17705
+ const cookie2 = Cookie.fromJSON(rawCookie);
17706
+ if (cookie2 != null && cookie2.domain != null && cookie2.path != null) {
17707
+ cookies[cookie2.domain] ||= {};
17708
+ cookies[cookie2.domain][cookie2.path] ||= {};
17709
+ cookies[cookie2.domain][cookie2.path][cookie2.key] = cookie2;
17747
17710
  }
17748
17711
  }
17749
17712
  return cookies;
@@ -17768,7 +17731,7 @@ ${operationTypes.join("\n")}
17768
17731
 
17769
17732
  // src/core/utils/request/getRequestCookies.ts
17770
17733
  function parseCookies(input) {
17771
- const parsedCookies = source_default2.parse(input);
17734
+ const parsedCookies = parse2(input);
17772
17735
  const cookies = {};
17773
17736
  for (const cookieName in parsedCookies) {
17774
17737
  if (typeof parsedCookies[cookieName] !== "undefined") {
@@ -17804,15 +17767,15 @@ ${operationTypes.join("\n")}
17804
17767
  for (const name in cookiesFromDocument) {
17805
17768
  request.headers.append(
17806
17769
  "cookie",
17807
- source_default2.serialize(name, cookiesFromDocument[name])
17770
+ serialize(name, cookiesFromDocument[name])
17808
17771
  );
17809
17772
  }
17810
17773
  const cookiesFromStore = cookieStore.getCookies(request.url);
17811
17774
  const storedCookiesObject = Object.fromEntries(
17812
- cookiesFromStore.map((cookie) => [cookie.key, cookie.value])
17775
+ cookiesFromStore.map((cookie2) => [cookie2.key, cookie2.value])
17813
17776
  );
17814
- for (const cookie of cookiesFromStore) {
17815
- request.headers.append("cookie", cookie.toString());
17777
+ for (const cookie2 of cookiesFromStore) {
17778
+ request.headers.append("cookie", cookie2.toString());
17816
17779
  }
17817
17780
  return {
17818
17781
  ...cookiesFromDocument,
@@ -17855,11 +17818,6 @@ ${operationTypes.join("\n")}
17855
17818
  if (url === path) {
17856
17819
  return;
17857
17820
  }
17858
- const searchParams = getSearchParams(path);
17859
- const queryParams = [];
17860
- searchParams.forEach((_, paramName) => {
17861
- queryParams.push(paramName);
17862
- });
17863
17821
  devUtils.warn(
17864
17822
  `Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requests#querysearch-parameters`
17865
17823
  );
@@ -17938,32 +17896,32 @@ ${operationTypes.join("\n")}
17938
17896
  };
17939
17897
 
17940
17898
  // node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.mjs
17941
- var __create3 = Object.create;
17942
- var __defProp5 = Object.defineProperty;
17943
- var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
17944
- var __getOwnPropNames4 = Object.getOwnPropertyNames;
17945
- var __getProtoOf3 = Object.getPrototypeOf;
17946
- var __hasOwnProp4 = Object.prototype.hasOwnProperty;
17947
- var __commonJS3 = (cb, mod) => function __require() {
17948
- return mod || (0, cb[__getOwnPropNames4(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17899
+ var __create2 = Object.create;
17900
+ var __defProp3 = Object.defineProperty;
17901
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
17902
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
17903
+ var __getProtoOf2 = Object.getPrototypeOf;
17904
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
17905
+ var __commonJS2 = (cb, mod) => function __require() {
17906
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17949
17907
  };
17950
- var __copyProps4 = (to, from, except, desc) => {
17908
+ var __copyProps2 = (to, from, except, desc) => {
17951
17909
  if (from && typeof from === "object" || typeof from === "function") {
17952
- for (let key of __getOwnPropNames4(from))
17953
- if (!__hasOwnProp4.call(to, key) && key !== except)
17954
- __defProp5(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc4(from, key)) || desc.enumerable });
17910
+ for (let key of __getOwnPropNames2(from))
17911
+ if (!__hasOwnProp2.call(to, key) && key !== except)
17912
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
17955
17913
  }
17956
17914
  return to;
17957
17915
  };
17958
- var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps4(
17916
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
17959
17917
  // If the importer is in node compatibility mode or this is not an ESM
17960
17918
  // file that has been converted to a CommonJS file using a Babel-
17961
17919
  // compatible transform (i.e. "__esModule" has not been set), then set
17962
17920
  // "default" to the CommonJS "module.exports" for node compatibility.
17963
- isNodeMode || !mod || !mod.__esModule ? __defProp5(target, "default", { value: mod, enumerable: true }) : target,
17921
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
17964
17922
  mod
17965
17923
  ));
17966
- var require_set_cookie = __commonJS3({
17924
+ var require_set_cookie = __commonJS2({
17967
17925
  "node_modules/set-cookie-parser/lib/set-cookie.js"(exports, module) {
17968
17926
  "use strict";
17969
17927
  var defaultParseOptions = {
@@ -17989,7 +17947,7 @@ ${operationTypes.join("\n")}
17989
17947
  e
17990
17948
  );
17991
17949
  }
17992
- var cookie = {
17950
+ var cookie2 = {
17993
17951
  name,
17994
17952
  value
17995
17953
  };
@@ -17998,20 +17956,20 @@ ${operationTypes.join("\n")}
17998
17956
  var key = sides.shift().trimLeft().toLowerCase();
17999
17957
  var value2 = sides.join("=");
18000
17958
  if (key === "expires") {
18001
- cookie.expires = new Date(value2);
17959
+ cookie2.expires = new Date(value2);
18002
17960
  } else if (key === "max-age") {
18003
- cookie.maxAge = parseInt(value2, 10);
17961
+ cookie2.maxAge = parseInt(value2, 10);
18004
17962
  } else if (key === "secure") {
18005
- cookie.secure = true;
17963
+ cookie2.secure = true;
18006
17964
  } else if (key === "httponly") {
18007
- cookie.httpOnly = true;
17965
+ cookie2.httpOnly = true;
18008
17966
  } else if (key === "samesite") {
18009
- cookie.sameSite = value2;
17967
+ cookie2.sameSite = value2;
18010
17968
  } else {
18011
- cookie[key] = value2;
17969
+ cookie2[key] = value2;
18012
17970
  }
18013
17971
  });
18014
- return cookie;
17972
+ return cookie2;
18015
17973
  }
18016
17974
  function parseNameValuePair(nameValuePairStr) {
18017
17975
  var name = "";
@@ -18025,7 +17983,7 @@ ${operationTypes.join("\n")}
18025
17983
  }
18026
17984
  return { name, value };
18027
17985
  }
18028
- function parse4(input, options) {
17986
+ function parse5(input, options) {
18029
17987
  options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
18030
17988
  if (!input) {
18031
17989
  if (!options.map) {
@@ -18062,8 +18020,8 @@ ${operationTypes.join("\n")}
18062
18020
  } else {
18063
18021
  var cookies = {};
18064
18022
  return input.filter(isNonEmptyString2).reduce(function(cookies2, str) {
18065
- var cookie = parseString(str, options);
18066
- cookies2[cookie.name] = cookie;
18023
+ var cookie2 = parseString(str, options);
18024
+ cookies2[cookie2.name] = cookie2;
18067
18025
  return cookies2;
18068
18026
  }, cookies);
18069
18027
  }
@@ -18123,13 +18081,13 @@ ${operationTypes.join("\n")}
18123
18081
  }
18124
18082
  return cookiesStrings;
18125
18083
  }
18126
- module.exports = parse4;
18127
- module.exports.parse = parse4;
18084
+ module.exports = parse5;
18085
+ module.exports.parse = parse5;
18128
18086
  module.exports.parseString = parseString;
18129
18087
  module.exports.splitCookiesString = splitCookiesString2;
18130
18088
  }
18131
18089
  });
18132
- var import_set_cookie_parser = __toESM3(require_set_cookie());
18090
+ var import_set_cookie_parser = __toESM2(require_set_cookie());
18133
18091
  var HEADERS_INVALID_CHARACTERS = /[^a-z0-9\-#$%&'*+.^_`|~]/i;
18134
18092
  function normalizeHeaderName(name) {
18135
18093
  if (HEADERS_INVALID_CHARACTERS.test(name) || name.trim() === "") {
@@ -18432,9 +18390,9 @@ ${operationTypes.join("\n")}
18432
18390
  };
18433
18391
  }
18434
18392
  async function parseQuery(query) {
18435
- const { parse: parse4 } = (init_graphql2(), __toCommonJS(graphql_exports));
18393
+ const { parse: parse5 } = (init_graphql2(), __toCommonJS(graphql_exports));
18436
18394
  try {
18437
- const ast = parse4(query);
18395
+ const ast = parse5(query);
18438
18396
  return parseDocumentNode(ast);
18439
18397
  } catch (error3) {
18440
18398
  return error3;
@@ -19057,14 +19015,14 @@ Consider naming this operation or using "graphql.operation()" request handler to
19057
19015
  this.store = typeof indexedDB !== "undefined" ? new WebSocketIndexedDBClientStore() : new WebSocketMemoryClientStore();
19058
19016
  this.runtimeClients = /* @__PURE__ */ new Map();
19059
19017
  this.allClients = /* @__PURE__ */ new Set();
19060
- this.channel.addEventListener("message", (message3) => {
19061
- if (message3.data?.type === "db:update") {
19018
+ this.channel.addEventListener("message", (message4) => {
19019
+ if (message4.data?.type === "db:update") {
19062
19020
  this.flushDatabaseToMemory();
19063
19021
  }
19064
19022
  });
19065
19023
  if (typeof window !== "undefined") {
19066
- window.addEventListener("message", async (message3) => {
19067
- if (message3.data?.type === "msw/worker:stop") {
19024
+ window.addEventListener("message", async (message4) => {
19025
+ if (message4.data?.type === "msw/worker:stop") {
19068
19026
  await this.removeRuntimeClients();
19069
19027
  }
19070
19028
  });
@@ -19122,8 +19080,8 @@ Consider naming this operation or using "graphql.operation()" request handler to
19122
19080
  async addConnection(client) {
19123
19081
  this.runtimeClients.set(client.id, client);
19124
19082
  await this.addClient(client);
19125
- const handleExtraneousMessage = (message3) => {
19126
- const { type, payload } = message3.data;
19083
+ const handleExtraneousMessage = (message4) => {
19084
+ const { type, payload } = message4.data;
19127
19085
  if (typeof payload === "object" && "clientId" in payload && payload.clientId !== client.id) {
19128
19086
  return;
19129
19087
  }
@@ -19229,17 +19187,16 @@ Consider naming this operation or using "graphql.operation()" request handler to
19229
19187
  link: createWebSocketLinkHandler
19230
19188
  };
19231
19189
 
19232
- // node_modules/.pnpm/@open-draft+until@2.1.0/node_modules/@open-draft/until/lib/index.mjs
19233
- var until = async (promise) => {
19190
+ // node_modules/.pnpm/until-async@3.0.2/node_modules/until-async/lib/index.js
19191
+ async function until(callback) {
19234
19192
  try {
19235
- const data = await promise().catch((error3) => {
19193
+ return [null, await callback().catch((error3) => {
19236
19194
  throw error3;
19237
- });
19238
- return { error: null, data };
19195
+ })];
19239
19196
  } catch (error3) {
19240
- return { error: error3, data: null };
19197
+ return [error3, null];
19241
19198
  }
19242
- };
19199
+ }
19243
19200
 
19244
19201
  // src/core/utils/executeHandlers.ts
19245
19202
  var executeHandlers = async ({
@@ -19341,11 +19298,11 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19341
19298
  }
19342
19299
 
19343
19300
  // src/core/utils/HttpResponse/decorators.ts
19344
- var { message: message2 } = source_default;
19301
+ var { message: message3 } = statuses_default;
19345
19302
  var kSetCookie = Symbol("kSetCookie");
19346
19303
  function normalizeResponseInit(init = {}) {
19347
19304
  const status = init?.status || 200;
19348
- const statusText = init?.statusText || message2[status] || "";
19305
+ const statusText = init?.statusText || message3[status] || "";
19349
19306
  const headers = new Headers(init?.headers);
19350
19307
  return {
19351
19308
  ...init,
@@ -19397,7 +19354,7 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19397
19354
  handleRequestOptions?.onPassthroughResponse?.(request);
19398
19355
  return;
19399
19356
  }
19400
- const lookupResult = await until(() => {
19357
+ const [lookupError, lookupResult] = await until(() => {
19401
19358
  return executeHandlers({
19402
19359
  request,
19403
19360
  requestId,
@@ -19405,22 +19362,22 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19405
19362
  resolutionContext: handleRequestOptions?.resolutionContext
19406
19363
  });
19407
19364
  });
19408
- if (lookupResult.error) {
19365
+ if (lookupError) {
19409
19366
  emitter.emit("unhandledException", {
19410
- error: lookupResult.error,
19367
+ error: lookupError,
19411
19368
  request,
19412
19369
  requestId
19413
19370
  });
19414
- throw lookupResult.error;
19371
+ throw lookupError;
19415
19372
  }
19416
- if (!lookupResult.data) {
19373
+ if (!lookupResult) {
19417
19374
  await onUnhandledRequest(request, options.onUnhandledRequest);
19418
19375
  emitter.emit("request:unhandled", { request, requestId });
19419
19376
  emitter.emit("request:end", { request, requestId });
19420
19377
  handleRequestOptions?.onPassthroughResponse?.(request);
19421
19378
  return;
19422
19379
  }
19423
- const { response } = lookupResult.data;
19380
+ const { response } = lookupResult;
19424
19381
  if (!response) {
19425
19382
  emitter.emit("request:end", { request, requestId });
19426
19383
  handleRequestOptions?.onPassthroughResponse?.(request);
@@ -19433,7 +19390,7 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19433
19390
  }
19434
19391
  await storeResponseCookies(request, response);
19435
19392
  emitter.emit("request:match", { request, requestId });
19436
- const requiredLookupResult = lookupResult.data;
19393
+ const requiredLookupResult = lookupResult;
19437
19394
  handleRequestOptions?.onMockedResponse?.(response, requiredLookupResult);
19438
19395
  emitter.emit("request:end", { request, requestId });
19439
19396
  return response;
@@ -19719,19 +19676,17 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19719
19676
  existingRegistration
19720
19677
  ];
19721
19678
  }
19722
- const registrationResult = await until(
19723
- async () => {
19724
- const registration = await navigator.serviceWorker.register(url, options);
19725
- return [
19726
- // Compare existing worker registration by its worker URL,
19727
- // to prevent irrelevant workers to resolve here (such as Codesandbox worker).
19728
- getWorkerByRegistration(registration, absoluteWorkerUrl, findWorker),
19729
- registration
19730
- ];
19731
- }
19732
- );
19733
- if (registrationResult.error) {
19734
- const isWorkerMissing = registrationResult.error.message.includes("(404)");
19679
+ const [registrationError, registrationResult] = await until(async () => {
19680
+ const registration = await navigator.serviceWorker.register(url, options);
19681
+ return [
19682
+ // Compare existing worker registration by its worker URL,
19683
+ // to prevent irrelevant workers to resolve here (such as Codesandbox worker).
19684
+ getWorkerByRegistration(registration, absoluteWorkerUrl, findWorker),
19685
+ registration
19686
+ ];
19687
+ });
19688
+ if (registrationError) {
19689
+ const isWorkerMissing = registrationError.message.includes("(404)");
19735
19690
  if (isWorkerMissing) {
19736
19691
  const scopeUrl = new URL(options?.scope || "/", location.href);
19737
19692
  throw new Error(
@@ -19745,11 +19700,11 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19745
19700
  throw new Error(
19746
19701
  devUtils.formatMessage(
19747
19702
  "Failed to register the Service Worker:\n\n%s",
19748
- registrationResult.error.message
19703
+ registrationError.message
19749
19704
  )
19750
19705
  );
19751
19706
  }
19752
- return registrationResult.data;
19707
+ return registrationResult;
19753
19708
  };
19754
19709
 
19755
19710
  // src/browser/setupWorker/start/utils/printStartMessage.ts
@@ -19757,9 +19712,9 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19757
19712
  if (args.quiet) {
19758
19713
  return;
19759
19714
  }
19760
- const message3 = args.message || "Mocking enabled.";
19715
+ const message4 = args.message || "Mocking enabled.";
19761
19716
  console.groupCollapsed(
19762
- `%c${devUtils.formatMessage(message3)}`,
19717
+ `%c${devUtils.formatMessage(message4)}`,
19763
19718
  "color:orangered;font-weight:bold;"
19764
19719
  );
19765
19720
  console.log(
@@ -19814,6 +19769,23 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19814
19769
  });
19815
19770
  }
19816
19771
 
19772
+ // src/browser/utils/supports.ts
19773
+ function supportsServiceWorker() {
19774
+ return typeof navigator !== "undefined" && "serviceWorker" in navigator && typeof location !== "undefined" && location.protocol !== "file:";
19775
+ }
19776
+ function supportsReadableStreamTransfer() {
19777
+ try {
19778
+ const stream = new ReadableStream({
19779
+ start: (controller) => controller.close()
19780
+ });
19781
+ const message4 = new MessageChannel();
19782
+ message4.port1.postMessage(stream, [stream]);
19783
+ return true;
19784
+ } catch {
19785
+ return false;
19786
+ }
19787
+ }
19788
+
19817
19789
  // src/core/utils/toResponseInit.ts
19818
19790
  function toResponseInit(response) {
19819
19791
  return {
@@ -19831,6 +19803,7 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19831
19803
  }
19832
19804
 
19833
19805
  // src/browser/setupWorker/start/createRequestListener.ts
19806
+ var SUPPORTS_READABLE_STREAM_TRANSFER = supportsReadableStreamTransfer();
19834
19807
  var createRequestListener = (context, options) => {
19835
19808
  return async (event) => {
19836
19809
  if (!context.isMockingEnabled && context.workerStoppedAt && event.data.interceptedAt > context.workerStoppedAt) {
@@ -19857,7 +19830,7 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19857
19830
  const responseClone = response.clone();
19858
19831
  const responseCloneForLogs = response.clone();
19859
19832
  const responseInit = toResponseInit(response);
19860
- if (context.supports.readableStreamTransfer) {
19833
+ if (SUPPORTS_READABLE_STREAM_TRANSFER) {
19861
19834
  const responseStreamOrNull = response.body;
19862
19835
  event.postMessage(
19863
19836
  "MOCK_RESPONSE",
@@ -20068,20 +20041,6 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20068
20041
  };
20069
20042
  };
20070
20043
 
20071
- // src/browser/utils/supportsReadableStreamTransfer.ts
20072
- function supportsReadableStreamTransfer() {
20073
- try {
20074
- const stream = new ReadableStream({
20075
- start: (controller) => controller.close()
20076
- });
20077
- const message3 = new MessageChannel();
20078
- message3.port1.postMessage(stream, [stream]);
20079
- return true;
20080
- } catch {
20081
- return false;
20082
- }
20083
- }
20084
-
20085
20044
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
20086
20045
  function hasConfigurableGlobal(propertyName) {
20087
20046
  const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
@@ -20187,7 +20146,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20187
20146
  this.url = new URL(socket.url);
20188
20147
  this[kEmitter2] = new EventTarget();
20189
20148
  this.transport.addEventListener("outgoing", (event) => {
20190
- const message3 = bindEvent(
20149
+ const message4 = bindEvent(
20191
20150
  this.socket,
20192
20151
  new CancelableMessageEvent("message", {
20193
20152
  data: event.data,
@@ -20195,8 +20154,8 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20195
20154
  cancelable: true
20196
20155
  })
20197
20156
  );
20198
- this[kEmitter2].dispatchEvent(message3);
20199
- if (message3.defaultPrevented) {
20157
+ this[kEmitter2].dispatchEvent(message4);
20158
+ if (message4.defaultPrevented) {
20200
20159
  event.preventDefault();
20201
20160
  }
20202
20161
  });
@@ -20832,11 +20791,11 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20832
20791
 
20833
20792
  // src/core/ws/utils/truncateMessage.ts
20834
20793
  var MAX_LENGTH = 24;
20835
- function truncateMessage(message3) {
20836
- if (message3.length <= MAX_LENGTH) {
20837
- return message3;
20794
+ function truncateMessage(message4) {
20795
+ if (message4.length <= MAX_LENGTH) {
20796
+ return message4;
20838
20797
  }
20839
- return `${message3.slice(0, MAX_LENGTH)}\u2026`;
20798
+ return `${message4.slice(0, MAX_LENGTH)}\u2026`;
20840
20799
  }
20841
20800
 
20842
20801
  // src/core/ws/utils/getPublicData.ts
@@ -21256,6 +21215,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21256
21215
  };
21257
21216
 
21258
21217
  // src/browser/utils/workerChannel.ts
21218
+ var SUPPORTS_SERVICE_WORKER = supportsServiceWorker();
21259
21219
  var WorkerEvent = class extends TypedEvent {
21260
21220
  #workerEvent;
21261
21221
  constructor(workerEvent) {
@@ -21285,6 +21245,9 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21285
21245
  constructor(options) {
21286
21246
  super();
21287
21247
  this.options = options;
21248
+ if (!SUPPORTS_SERVICE_WORKER) {
21249
+ return;
21250
+ }
21288
21251
  navigator.serviceWorker.addEventListener("message", async (event) => {
21289
21252
  const worker = await this.options.worker;
21290
21253
  if (event.source != null && event.source !== worker) {
@@ -21300,16 +21263,32 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21300
21263
  * This triggers the `message` event listener on ServiceWorkerGlobalScope.
21301
21264
  */
21302
21265
  postMessage(type) {
21266
+ invariant(
21267
+ SUPPORTS_SERVICE_WORKER,
21268
+ "Failed to post message on a WorkerChannel: the Service Worker API is unavailable in this context. This is likely an issue with MSW. Please report it on GitHub: https://github.com/mswjs/msw/issues"
21269
+ );
21303
21270
  this.options.worker.then((worker) => {
21304
21271
  worker.postMessage(type);
21305
21272
  });
21306
21273
  }
21307
21274
  };
21308
21275
 
21276
+ // node_modules/.pnpm/@open-draft+until@2.1.0/node_modules/@open-draft/until/lib/index.mjs
21277
+ var until2 = async (promise) => {
21278
+ try {
21279
+ const data = await promise().catch((error3) => {
21280
+ throw error3;
21281
+ });
21282
+ return { error: null, data };
21283
+ } catch (error3) {
21284
+ return { error: error3, data: null };
21285
+ }
21286
+ };
21287
+
21309
21288
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-L37TY7LC.mjs
21310
21289
  var InterceptorError = class extends Error {
21311
- constructor(message3) {
21312
- super(message3);
21290
+ constructor(message4) {
21291
+ super(message4);
21313
21292
  this.name = "InterceptorError";
21314
21293
  Object.setPrototypeOf(this, InterceptorError.prototype);
21315
21294
  }
@@ -21468,7 +21447,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21468
21447
  );
21469
21448
  }
21470
21449
  }
21471
- const result = await until(async () => {
21450
+ const result = await until2(async () => {
21472
21451
  const requestListenersPromise = emitAsync(options.emitter, "request", {
21473
21452
  requestId: options.requestId,
21474
21453
  request: options.request,
@@ -21504,7 +21483,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21504
21483
  unhandledExceptionController[kResponsePromise].resolve(void 0);
21505
21484
  }
21506
21485
  });
21507
- const nextResult = await until(
21486
+ const nextResult = await until2(
21508
21487
  () => unhandledExceptionController[kResponsePromise]
21509
21488
  );
21510
21489
  if (nextResult.error) {
@@ -22654,11 +22633,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22654
22633
  emitter: this.emitter,
22655
22634
  workerChannel: new WorkerChannel({
22656
22635
  worker: workerPromise
22657
- }),
22658
- supports: {
22659
- serviceWorkerApi: "serviceWorker" in navigator && location.protocol !== "file:",
22660
- readableStreamTransfer: supportsReadableStreamTransfer()
22661
- }
22636
+ })
22662
22637
  };
22663
22638
  }
22664
22639
  async start(options = {}) {
@@ -22697,7 +22672,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22697
22672
  this.subscriptions.push(() => {
22698
22673
  webSocketInterceptor.dispose();
22699
22674
  });
22700
- if (!this.context.supports.serviceWorkerApi) {
22675
+ if (!supportsServiceWorker()) {
22701
22676
  const fallbackInterceptor = createFallbackRequestListener(
22702
22677
  this.context,
22703
22678
  this.context.startOptions
@@ -22728,7 +22703,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22728
22703
  this.context.isMockingEnabled = false;
22729
22704
  this.context.workerStoppedAt = Date.now();
22730
22705
  this.context.emitter.removeAllListeners();
22731
- if (this.context.supports.serviceWorkerApi) {
22706
+ if (supportsServiceWorker()) {
22732
22707
  this.context.workerChannel.removeAllListeners("RESPONSE");
22733
22708
  window.clearInterval(this.context.keepAliveInterval);
22734
22709
  }
@@ -22745,29 +22720,13 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22745
22720
  })();
22746
22721
  /*! Bundled license information:
22747
22722
 
22748
- @bundled-es-modules/statuses/index-esm.js:
22749
- (*! Bundled license information:
22750
-
22751
- statuses/index.js:
22752
- (*!
22753
- * statuses
22754
- * Copyright(c) 2014 Jonathan Ong
22755
- * Copyright(c) 2016 Douglas Christopher Wilson
22756
- * MIT Licensed
22757
- *)
22758
- *)
22759
-
22760
- @bundled-es-modules/cookie/index-esm.js:
22761
- (*! Bundled license information:
22762
-
22763
- cookie/index.js:
22764
- (*!
22765
- * cookie
22766
- * Copyright(c) 2012-2014 Roman Shtylman
22767
- * Copyright(c) 2015 Douglas Christopher Wilson
22768
- * MIT Licensed
22769
- *)
22770
- *)
22723
+ statuses/index.js:
22724
+ (*!
22725
+ * statuses
22726
+ * Copyright(c) 2014 Jonathan Ong
22727
+ * Copyright(c) 2016 Douglas Christopher Wilson
22728
+ * MIT Licensed
22729
+ *)
22771
22730
 
22772
22731
  tough-cookie/dist/index.js:
22773
22732
  (*!