@nhost/nhost-js 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -17,24 +17,8 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __defProp$1 = Object.defineProperty;
21
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
22
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
23
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
24
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
25
- var __spreadValues$1 = (a, b) => {
26
- for (var prop in b || (b = {}))
27
- if (__hasOwnProp$1.call(b, prop))
28
- __defNormalProp$1(a, prop, b[prop]);
29
- if (__getOwnPropSymbols$1)
30
- for (var prop of __getOwnPropSymbols$1(b)) {
31
- if (__propIsEnum$1.call(b, prop))
32
- __defNormalProp$1(a, prop, b[prop]);
33
- }
34
- return a;
35
- };
36
- var axios$2$2 = { exports: {} };
37
- var bind$2$2 = function bind(fn, thisArg) {
20
+ var axios$8 = { exports: {} };
21
+ var bind$8 = function bind(fn, thisArg) {
38
22
  return function wrap() {
39
23
  var args = new Array(arguments.length);
40
24
  for (var i = 0; i < args.length; i++) {
@@ -43,7 +27,7 @@ var bind$2$2 = function bind(fn, thisArg) {
43
27
  return fn.apply(thisArg, args);
44
28
  };
45
29
  };
46
- var bind$1$2 = bind$2$2;
30
+ var bind$7 = bind$8;
47
31
  var toString$2 = Object.prototype.toString;
48
32
  function isArray$2(val) {
49
33
  return Array.isArray(val);
@@ -152,7 +136,7 @@ function merge$2() {
152
136
  function extend$2(a, b, thisArg) {
153
137
  forEach$2(b, function assignValue(val, key) {
154
138
  if (thisArg && typeof val === "function") {
155
- a[key] = bind$1$2(val, thisArg);
139
+ a[key] = bind$7(val, thisArg);
156
140
  } else {
157
141
  a[key] = val;
158
142
  }
@@ -165,7 +149,7 @@ function stripBOM$2(content) {
165
149
  }
166
150
  return content;
167
151
  }
168
- var utils$e$1 = {
152
+ var utils$G = {
169
153
  isArray: isArray$2,
170
154
  isArrayBuffer: isArrayBuffer$2,
171
155
  isBuffer: isBuffer$2,
@@ -189,34 +173,34 @@ var utils$e$1 = {
189
173
  trim: trim$2,
190
174
  stripBOM: stripBOM$2
191
175
  };
192
- var utils$d$2 = utils$e$1;
176
+ var utils$F = utils$G;
193
177
  function encode$2(val) {
194
178
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
195
179
  }
196
- var buildURL$2$2 = function buildURL(url, params, paramsSerializer) {
180
+ var buildURL$8 = function buildURL(url, params, paramsSerializer) {
197
181
  if (!params) {
198
182
  return url;
199
183
  }
200
184
  var serializedParams;
201
185
  if (paramsSerializer) {
202
186
  serializedParams = paramsSerializer(params);
203
- } else if (utils$d$2.isURLSearchParams(params)) {
187
+ } else if (utils$F.isURLSearchParams(params)) {
204
188
  serializedParams = params.toString();
205
189
  } else {
206
190
  var parts = [];
207
- utils$d$2.forEach(params, function serialize(val, key) {
191
+ utils$F.forEach(params, function serialize(val, key) {
208
192
  if (val === null || typeof val === "undefined") {
209
193
  return;
210
194
  }
211
- if (utils$d$2.isArray(val)) {
195
+ if (utils$F.isArray(val)) {
212
196
  key = key + "[]";
213
197
  } else {
214
198
  val = [val];
215
199
  }
216
- utils$d$2.forEach(val, function parseValue(v) {
217
- if (utils$d$2.isDate(v)) {
200
+ utils$F.forEach(val, function parseValue(v) {
201
+ if (utils$F.isDate(v)) {
218
202
  v = v.toISOString();
219
- } else if (utils$d$2.isObject(v)) {
203
+ } else if (utils$F.isObject(v)) {
220
204
  v = JSON.stringify(v);
221
205
  }
222
206
  parts.push(encode$2(key) + "=" + encode$2(v));
@@ -233,11 +217,11 @@ var buildURL$2$2 = function buildURL(url, params, paramsSerializer) {
233
217
  }
234
218
  return url;
235
219
  };
236
- var utils$c$2 = utils$e$1;
237
- function InterceptorManager$1$2() {
220
+ var utils$E = utils$G;
221
+ function InterceptorManager$5() {
238
222
  this.handlers = [];
239
223
  }
240
- InterceptorManager$1$2.prototype.use = function use(fulfilled, rejected, options) {
224
+ InterceptorManager$5.prototype.use = function use(fulfilled, rejected, options) {
241
225
  this.handlers.push({
242
226
  fulfilled,
243
227
  rejected,
@@ -246,34 +230,34 @@ InterceptorManager$1$2.prototype.use = function use(fulfilled, rejected, options
246
230
  });
247
231
  return this.handlers.length - 1;
248
232
  };
249
- InterceptorManager$1$2.prototype.eject = function eject(id) {
233
+ InterceptorManager$5.prototype.eject = function eject(id) {
250
234
  if (this.handlers[id]) {
251
235
  this.handlers[id] = null;
252
236
  }
253
237
  };
254
- InterceptorManager$1$2.prototype.forEach = function forEach2(fn) {
255
- utils$c$2.forEach(this.handlers, function forEachHandler(h) {
238
+ InterceptorManager$5.prototype.forEach = function forEach(fn) {
239
+ utils$E.forEach(this.handlers, function forEachHandler(h) {
256
240
  if (h !== null) {
257
241
  fn(h);
258
242
  }
259
243
  });
260
244
  };
261
- var InterceptorManager_1$2 = InterceptorManager$1$2;
262
- var utils$b$2 = utils$e$1;
263
- var normalizeHeaderName$1$2 = function normalizeHeaderName(headers, normalizedName) {
264
- utils$b$2.forEach(headers, function processHeader(value, name2) {
245
+ var InterceptorManager_1$2 = InterceptorManager$5;
246
+ var utils$D = utils$G;
247
+ var normalizeHeaderName$5 = function normalizeHeaderName(headers, normalizedName) {
248
+ utils$D.forEach(headers, function processHeader(value, name2) {
265
249
  if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
266
250
  headers[normalizedName] = value;
267
251
  delete headers[name2];
268
252
  }
269
253
  });
270
254
  };
271
- var enhanceError$2$2 = function enhanceError(error, config, code, request22, response) {
255
+ var enhanceError$8 = function enhanceError(error, config, code, request4, response) {
272
256
  error.config = config;
273
257
  if (code) {
274
258
  error.code = code;
275
259
  }
276
- error.request = request22;
260
+ error.request = request4;
277
261
  error.response = response;
278
262
  error.isAxiosError = true;
279
263
  error.toJSON = function toJSON() {
@@ -293,33 +277,33 @@ var enhanceError$2$2 = function enhanceError(error, config, code, request22, res
293
277
  };
294
278
  return error;
295
279
  };
296
- var enhanceError$1$2 = enhanceError$2$2;
297
- var createError$2$2 = function createError(message, config, code, request22, response) {
280
+ var enhanceError$7 = enhanceError$8;
281
+ var createError$8 = function createError(message, config, code, request4, response) {
298
282
  var error = new Error(message);
299
- return enhanceError$1$2(error, config, code, request22, response);
283
+ return enhanceError$7(error, config, code, request4, response);
300
284
  };
301
- var createError$1$2 = createError$2$2;
302
- var settle$1$2 = function settle(resolve, reject, response) {
303
- var validateStatus22 = response.config.validateStatus;
304
- if (!response.status || !validateStatus22 || validateStatus22(response.status)) {
285
+ var createError$7 = createError$8;
286
+ var settle$5 = function settle(resolve, reject, response) {
287
+ var validateStatus4 = response.config.validateStatus;
288
+ if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
305
289
  resolve(response);
306
290
  } else {
307
- reject(createError$1$2("Request failed with status code " + response.status, response.config, null, response.request, response));
291
+ reject(createError$7("Request failed with status code " + response.status, response.config, null, response.request, response));
308
292
  }
309
293
  };
310
- var utils$a$2 = utils$e$1;
311
- var cookies$1$2 = utils$a$2.isStandardBrowserEnv() ? function standardBrowserEnv() {
294
+ var utils$C = utils$G;
295
+ var cookies$5 = utils$C.isStandardBrowserEnv() ? function standardBrowserEnv() {
312
296
  return {
313
297
  write: function write(name2, value, expires, path, domain, secure) {
314
298
  var cookie = [];
315
299
  cookie.push(name2 + "=" + encodeURIComponent(value));
316
- if (utils$a$2.isNumber(expires)) {
300
+ if (utils$C.isNumber(expires)) {
317
301
  cookie.push("expires=" + new Date(expires).toGMTString());
318
302
  }
319
- if (utils$a$2.isString(path)) {
303
+ if (utils$C.isString(path)) {
320
304
  cookie.push("path=" + path);
321
305
  }
322
- if (utils$a$2.isString(domain)) {
306
+ if (utils$C.isString(domain)) {
323
307
  cookie.push("domain=" + domain);
324
308
  }
325
309
  if (secure === true) {
@@ -346,21 +330,21 @@ var cookies$1$2 = utils$a$2.isStandardBrowserEnv() ? function standardBrowserEnv
346
330
  }
347
331
  };
348
332
  }();
349
- var isAbsoluteURL$1$2 = function isAbsoluteURL(url) {
333
+ var isAbsoluteURL$5 = function isAbsoluteURL(url) {
350
334
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
351
335
  };
352
- var combineURLs$1$2 = function combineURLs(baseURL, relativeURL) {
336
+ var combineURLs$5 = function combineURLs(baseURL, relativeURL) {
353
337
  return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
354
338
  };
355
- var isAbsoluteURL2$1 = isAbsoluteURL$1$2;
356
- var combineURLs2$1 = combineURLs$1$2;
357
- var buildFullPath$1$2 = function buildFullPath(baseURL, requestedURL) {
358
- if (baseURL && !isAbsoluteURL2$1(requestedURL)) {
359
- return combineURLs2$1(baseURL, requestedURL);
339
+ var isAbsoluteURL$4 = isAbsoluteURL$5;
340
+ var combineURLs$4 = combineURLs$5;
341
+ var buildFullPath$5 = function buildFullPath(baseURL, requestedURL) {
342
+ if (baseURL && !isAbsoluteURL$4(requestedURL)) {
343
+ return combineURLs$4(baseURL, requestedURL);
360
344
  }
361
345
  return requestedURL;
362
346
  };
363
- var utils$9$2 = utils$e$1;
347
+ var utils$B = utils$G;
364
348
  var ignoreDuplicateOf$2 = [
365
349
  "age",
366
350
  "authorization",
@@ -380,7 +364,7 @@ var ignoreDuplicateOf$2 = [
380
364
  "retry-after",
381
365
  "user-agent"
382
366
  ];
383
- var parseHeaders$1$2 = function parseHeaders(headers) {
367
+ var parseHeaders$5 = function parseHeaders(headers) {
384
368
  var parsed = {};
385
369
  var key;
386
370
  var val;
@@ -388,10 +372,10 @@ var parseHeaders$1$2 = function parseHeaders(headers) {
388
372
  if (!headers) {
389
373
  return parsed;
390
374
  }
391
- utils$9$2.forEach(headers.split("\n"), function parser(line) {
375
+ utils$B.forEach(headers.split("\n"), function parser(line) {
392
376
  i = line.indexOf(":");
393
- key = utils$9$2.trim(line.substr(0, i)).toLowerCase();
394
- val = utils$9$2.trim(line.substr(i + 1));
377
+ key = utils$B.trim(line.substr(0, i)).toLowerCase();
378
+ val = utils$B.trim(line.substr(i + 1));
395
379
  if (key) {
396
380
  if (parsed[key] && ignoreDuplicateOf$2.indexOf(key) >= 0) {
397
381
  return;
@@ -405,8 +389,8 @@ var parseHeaders$1$2 = function parseHeaders(headers) {
405
389
  });
406
390
  return parsed;
407
391
  };
408
- var utils$8$2 = utils$e$1;
409
- var isURLSameOrigin$1$2 = utils$8$2.isStandardBrowserEnv() ? function standardBrowserEnv2() {
392
+ var utils$A = utils$G;
393
+ var isURLSameOrigin$5 = utils$A.isStandardBrowserEnv() ? function standardBrowserEnv2() {
410
394
  var msie = /(msie|trident)/i.test(navigator.userAgent);
411
395
  var urlParsingNode = document.createElement("a");
412
396
  var originURL;
@@ -430,7 +414,7 @@ var isURLSameOrigin$1$2 = utils$8$2.isStandardBrowserEnv() ? function standardBr
430
414
  }
431
415
  originURL = resolveURL(window.location.href);
432
416
  return function isURLSameOrigin2(requestURL) {
433
- var parsed = utils$8$2.isString(requestURL) ? resolveURL(requestURL) : requestURL;
417
+ var parsed = utils$A.isString(requestURL) ? resolveURL(requestURL) : requestURL;
434
418
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
435
419
  };
436
420
  }() : function nonStandardBrowserEnv2() {
@@ -438,24 +422,24 @@ var isURLSameOrigin$1$2 = utils$8$2.isStandardBrowserEnv() ? function standardBr
438
422
  return true;
439
423
  };
440
424
  }();
441
- function Cancel$3$1(message) {
425
+ function Cancel$9(message) {
442
426
  this.message = message;
443
427
  }
444
- Cancel$3$1.prototype.toString = function toString2() {
428
+ Cancel$9.prototype.toString = function toString() {
445
429
  return "Cancel" + (this.message ? ": " + this.message : "");
446
430
  };
447
- Cancel$3$1.prototype.__CANCEL__ = true;
448
- var Cancel_1$2 = Cancel$3$1;
449
- var utils$7$2 = utils$e$1;
450
- var settle2$1 = settle$1$2;
451
- var cookies$3 = cookies$1$2;
452
- var buildURL$1$2 = buildURL$2$2;
453
- var buildFullPath2$1 = buildFullPath$1$2;
454
- var parseHeaders2$1 = parseHeaders$1$2;
455
- var isURLSameOrigin$3 = isURLSameOrigin$1$2;
456
- var createError2$1 = createError$2$2;
457
- var defaults$4$1 = defaults_1$2;
458
- var Cancel$2$1 = Cancel_1$2;
431
+ Cancel$9.prototype.__CANCEL__ = true;
432
+ var Cancel_1$2 = Cancel$9;
433
+ var utils$z = utils$G;
434
+ var settle$4 = settle$5;
435
+ var cookies$4 = cookies$5;
436
+ var buildURL$7 = buildURL$8;
437
+ var buildFullPath$4 = buildFullPath$5;
438
+ var parseHeaders$4 = parseHeaders$5;
439
+ var isURLSameOrigin$4 = isURLSameOrigin$5;
440
+ var createError$6 = createError$8;
441
+ var defaults$d = defaults_1$2;
442
+ var Cancel$8 = Cancel_1$2;
459
443
  var xhr$2 = function xhrAdapter(config) {
460
444
  return new Promise(function dispatchXhrRequest(resolve, reject) {
461
445
  var requestData = config.data;
@@ -470,109 +454,109 @@ var xhr$2 = function xhrAdapter(config) {
470
454
  config.signal.removeEventListener("abort", onCanceled);
471
455
  }
472
456
  }
473
- if (utils$7$2.isFormData(requestData)) {
457
+ if (utils$z.isFormData(requestData)) {
474
458
  delete requestHeaders["Content-Type"];
475
459
  }
476
- var request22 = new XMLHttpRequest();
460
+ var request4 = new XMLHttpRequest();
477
461
  if (config.auth) {
478
462
  var username = config.auth.username || "";
479
463
  var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
480
464
  requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
481
465
  }
482
- var fullPath = buildFullPath2$1(config.baseURL, config.url);
483
- request22.open(config.method.toUpperCase(), buildURL$1$2(fullPath, config.params, config.paramsSerializer), true);
484
- request22.timeout = config.timeout;
466
+ var fullPath = buildFullPath$4(config.baseURL, config.url);
467
+ request4.open(config.method.toUpperCase(), buildURL$7(fullPath, config.params, config.paramsSerializer), true);
468
+ request4.timeout = config.timeout;
485
469
  function onloadend() {
486
- if (!request22) {
470
+ if (!request4) {
487
471
  return;
488
472
  }
489
- var responseHeaders = "getAllResponseHeaders" in request22 ? parseHeaders2$1(request22.getAllResponseHeaders()) : null;
490
- var responseData = !responseType || responseType === "text" || responseType === "json" ? request22.responseText : request22.response;
473
+ var responseHeaders = "getAllResponseHeaders" in request4 ? parseHeaders$4(request4.getAllResponseHeaders()) : null;
474
+ var responseData = !responseType || responseType === "text" || responseType === "json" ? request4.responseText : request4.response;
491
475
  var response = {
492
476
  data: responseData,
493
- status: request22.status,
494
- statusText: request22.statusText,
477
+ status: request4.status,
478
+ statusText: request4.statusText,
495
479
  headers: responseHeaders,
496
480
  config,
497
- request: request22
481
+ request: request4
498
482
  };
499
- settle2$1(function _resolve(value) {
483
+ settle$4(function _resolve(value) {
500
484
  resolve(value);
501
485
  done();
502
486
  }, function _reject(err) {
503
487
  reject(err);
504
488
  done();
505
489
  }, response);
506
- request22 = null;
490
+ request4 = null;
507
491
  }
508
- if ("onloadend" in request22) {
509
- request22.onloadend = onloadend;
492
+ if ("onloadend" in request4) {
493
+ request4.onloadend = onloadend;
510
494
  } else {
511
- request22.onreadystatechange = function handleLoad() {
512
- if (!request22 || request22.readyState !== 4) {
495
+ request4.onreadystatechange = function handleLoad() {
496
+ if (!request4 || request4.readyState !== 4) {
513
497
  return;
514
498
  }
515
- if (request22.status === 0 && !(request22.responseURL && request22.responseURL.indexOf("file:") === 0)) {
499
+ if (request4.status === 0 && !(request4.responseURL && request4.responseURL.indexOf("file:") === 0)) {
516
500
  return;
517
501
  }
518
502
  setTimeout(onloadend);
519
503
  };
520
504
  }
521
- request22.onabort = function handleAbort() {
522
- if (!request22) {
505
+ request4.onabort = function handleAbort() {
506
+ if (!request4) {
523
507
  return;
524
508
  }
525
- reject(createError2$1("Request aborted", config, "ECONNABORTED", request22));
526
- request22 = null;
509
+ reject(createError$6("Request aborted", config, "ECONNABORTED", request4));
510
+ request4 = null;
527
511
  };
528
- request22.onerror = function handleError() {
529
- reject(createError2$1("Network Error", config, null, request22));
530
- request22 = null;
512
+ request4.onerror = function handleError() {
513
+ reject(createError$6("Network Error", config, null, request4));
514
+ request4 = null;
531
515
  };
532
- request22.ontimeout = function handleTimeout() {
516
+ request4.ontimeout = function handleTimeout() {
533
517
  var timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
534
- var transitional22 = config.transitional || defaults$4$1.transitional;
518
+ var transitional4 = config.transitional || defaults$d.transitional;
535
519
  if (config.timeoutErrorMessage) {
536
520
  timeoutErrorMessage = config.timeoutErrorMessage;
537
521
  }
538
- reject(createError2$1(timeoutErrorMessage, config, transitional22.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request22));
539
- request22 = null;
522
+ reject(createError$6(timeoutErrorMessage, config, transitional4.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request4));
523
+ request4 = null;
540
524
  };
541
- if (utils$7$2.isStandardBrowserEnv()) {
542
- var xsrfValue = (config.withCredentials || isURLSameOrigin$3(fullPath)) && config.xsrfCookieName ? cookies$3.read(config.xsrfCookieName) : void 0;
525
+ if (utils$z.isStandardBrowserEnv()) {
526
+ var xsrfValue = (config.withCredentials || isURLSameOrigin$4(fullPath)) && config.xsrfCookieName ? cookies$4.read(config.xsrfCookieName) : void 0;
543
527
  if (xsrfValue) {
544
528
  requestHeaders[config.xsrfHeaderName] = xsrfValue;
545
529
  }
546
530
  }
547
- if ("setRequestHeader" in request22) {
548
- utils$7$2.forEach(requestHeaders, function setRequestHeader(val, key) {
531
+ if ("setRequestHeader" in request4) {
532
+ utils$z.forEach(requestHeaders, function setRequestHeader(val, key) {
549
533
  if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
550
534
  delete requestHeaders[key];
551
535
  } else {
552
- request22.setRequestHeader(key, val);
536
+ request4.setRequestHeader(key, val);
553
537
  }
554
538
  });
555
539
  }
556
- if (!utils$7$2.isUndefined(config.withCredentials)) {
557
- request22.withCredentials = !!config.withCredentials;
540
+ if (!utils$z.isUndefined(config.withCredentials)) {
541
+ request4.withCredentials = !!config.withCredentials;
558
542
  }
559
543
  if (responseType && responseType !== "json") {
560
- request22.responseType = config.responseType;
544
+ request4.responseType = config.responseType;
561
545
  }
562
546
  if (typeof config.onDownloadProgress === "function") {
563
- request22.addEventListener("progress", config.onDownloadProgress);
547
+ request4.addEventListener("progress", config.onDownloadProgress);
564
548
  }
565
- if (typeof config.onUploadProgress === "function" && request22.upload) {
566
- request22.upload.addEventListener("progress", config.onUploadProgress);
549
+ if (typeof config.onUploadProgress === "function" && request4.upload) {
550
+ request4.upload.addEventListener("progress", config.onUploadProgress);
567
551
  }
568
552
  if (config.cancelToken || config.signal) {
569
553
  onCanceled = function(cancel) {
570
- if (!request22) {
554
+ if (!request4) {
571
555
  return;
572
556
  }
573
- reject(!cancel || cancel && cancel.type ? new Cancel$2$1("canceled") : cancel);
574
- request22.abort();
575
- request22 = null;
557
+ reject(!cancel || cancel && cancel.type ? new Cancel$8("canceled") : cancel);
558
+ request4.abort();
559
+ request4 = null;
576
560
  };
577
561
  config.cancelToken && config.cancelToken.subscribe(onCanceled);
578
562
  if (config.signal) {
@@ -582,17 +566,17 @@ var xhr$2 = function xhrAdapter(config) {
582
566
  if (!requestData) {
583
567
  requestData = null;
584
568
  }
585
- request22.send(requestData);
569
+ request4.send(requestData);
586
570
  });
587
571
  };
588
- var utils$6$2 = utils$e$1;
589
- var normalizeHeaderName2$1 = normalizeHeaderName$1$2;
590
- var enhanceError2$1 = enhanceError$2$2;
572
+ var utils$y = utils$G;
573
+ var normalizeHeaderName$4 = normalizeHeaderName$5;
574
+ var enhanceError$6 = enhanceError$8;
591
575
  var DEFAULT_CONTENT_TYPE$2 = {
592
576
  "Content-Type": "application/x-www-form-urlencoded"
593
577
  };
594
578
  function setContentTypeIfUnset$2(headers, value) {
595
- if (!utils$6$2.isUndefined(headers) && utils$6$2.isUndefined(headers["Content-Type"])) {
579
+ if (!utils$y.isUndefined(headers) && utils$y.isUndefined(headers["Content-Type"])) {
596
580
  headers["Content-Type"] = value;
597
581
  }
598
582
  }
@@ -606,10 +590,10 @@ function getDefaultAdapter$2() {
606
590
  return adapter;
607
591
  }
608
592
  function stringifySafely$2(rawValue, parser, encoder) {
609
- if (utils$6$2.isString(rawValue)) {
593
+ if (utils$y.isString(rawValue)) {
610
594
  try {
611
595
  (parser || JSON.parse)(rawValue);
612
- return utils$6$2.trim(rawValue);
596
+ return utils$y.trim(rawValue);
613
597
  } catch (e) {
614
598
  if (e.name !== "SyntaxError") {
615
599
  throw e;
@@ -618,7 +602,7 @@ function stringifySafely$2(rawValue, parser, encoder) {
618
602
  }
619
603
  return (encoder || JSON.stringify)(rawValue);
620
604
  }
621
- var defaults$3$2 = {
605
+ var defaults$c = {
622
606
  transitional: {
623
607
  silentJSONParsing: true,
624
608
  forcedJSONParsing: true,
@@ -626,36 +610,36 @@ var defaults$3$2 = {
626
610
  },
627
611
  adapter: getDefaultAdapter$2(),
628
612
  transformRequest: [function transformRequest(data2, headers) {
629
- normalizeHeaderName2$1(headers, "Accept");
630
- normalizeHeaderName2$1(headers, "Content-Type");
631
- if (utils$6$2.isFormData(data2) || utils$6$2.isArrayBuffer(data2) || utils$6$2.isBuffer(data2) || utils$6$2.isStream(data2) || utils$6$2.isFile(data2) || utils$6$2.isBlob(data2)) {
613
+ normalizeHeaderName$4(headers, "Accept");
614
+ normalizeHeaderName$4(headers, "Content-Type");
615
+ if (utils$y.isFormData(data2) || utils$y.isArrayBuffer(data2) || utils$y.isBuffer(data2) || utils$y.isStream(data2) || utils$y.isFile(data2) || utils$y.isBlob(data2)) {
632
616
  return data2;
633
617
  }
634
- if (utils$6$2.isArrayBufferView(data2)) {
618
+ if (utils$y.isArrayBufferView(data2)) {
635
619
  return data2.buffer;
636
620
  }
637
- if (utils$6$2.isURLSearchParams(data2)) {
621
+ if (utils$y.isURLSearchParams(data2)) {
638
622
  setContentTypeIfUnset$2(headers, "application/x-www-form-urlencoded;charset=utf-8");
639
623
  return data2.toString();
640
624
  }
641
- if (utils$6$2.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
625
+ if (utils$y.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
642
626
  setContentTypeIfUnset$2(headers, "application/json");
643
627
  return stringifySafely$2(data2);
644
628
  }
645
629
  return data2;
646
630
  }],
647
631
  transformResponse: [function transformResponse(data2) {
648
- var transitional22 = this.transitional || defaults$3$2.transitional;
649
- var silentJSONParsing = transitional22 && transitional22.silentJSONParsing;
650
- var forcedJSONParsing = transitional22 && transitional22.forcedJSONParsing;
632
+ var transitional4 = this.transitional || defaults$c.transitional;
633
+ var silentJSONParsing = transitional4 && transitional4.silentJSONParsing;
634
+ var forcedJSONParsing = transitional4 && transitional4.forcedJSONParsing;
651
635
  var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
652
- if (strictJSONParsing || forcedJSONParsing && utils$6$2.isString(data2) && data2.length) {
636
+ if (strictJSONParsing || forcedJSONParsing && utils$y.isString(data2) && data2.length) {
653
637
  try {
654
638
  return JSON.parse(data2);
655
639
  } catch (e) {
656
640
  if (strictJSONParsing) {
657
641
  if (e.name === "SyntaxError") {
658
- throw enhanceError2$1(e, this, "E_JSON_PARSE");
642
+ throw enhanceError$6(e, this, "E_JSON_PARSE");
659
643
  }
660
644
  throw e;
661
645
  }
@@ -677,91 +661,91 @@ var defaults$3$2 = {
677
661
  }
678
662
  }
679
663
  };
680
- utils$6$2.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
681
- defaults$3$2.headers[method] = {};
664
+ utils$y.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
665
+ defaults$c.headers[method] = {};
682
666
  });
683
- utils$6$2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
684
- defaults$3$2.headers[method] = utils$6$2.merge(DEFAULT_CONTENT_TYPE$2);
667
+ utils$y.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
668
+ defaults$c.headers[method] = utils$y.merge(DEFAULT_CONTENT_TYPE$2);
685
669
  });
686
- var defaults_1$2 = defaults$3$2;
687
- var utils$5$2 = utils$e$1;
688
- var defaults$2$2 = defaults_1$2;
689
- var transformData$1$2 = function transformData(data2, headers, fns) {
690
- var context = this || defaults$2$2;
691
- utils$5$2.forEach(fns, function transform(fn) {
670
+ var defaults_1$2 = defaults$c;
671
+ var utils$x = utils$G;
672
+ var defaults$b = defaults_1$2;
673
+ var transformData$5 = function transformData(data2, headers, fns) {
674
+ var context = this || defaults$b;
675
+ utils$x.forEach(fns, function transform(fn) {
692
676
  data2 = fn.call(context, data2, headers);
693
677
  });
694
678
  return data2;
695
679
  };
696
- var isCancel$1$2 = function isCancel(value) {
680
+ var isCancel$5 = function isCancel(value) {
697
681
  return !!(value && value.__CANCEL__);
698
682
  };
699
- var utils$4$2 = utils$e$1;
700
- var transformData2$1 = transformData$1$2;
701
- var isCancel2$1 = isCancel$1$2;
702
- var defaults$1$2 = defaults_1$2;
703
- var Cancel$1$2 = Cancel_1$2;
683
+ var utils$w = utils$G;
684
+ var transformData$4 = transformData$5;
685
+ var isCancel$4 = isCancel$5;
686
+ var defaults$a = defaults_1$2;
687
+ var Cancel$7 = Cancel_1$2;
704
688
  function throwIfCancellationRequested$2(config) {
705
689
  if (config.cancelToken) {
706
690
  config.cancelToken.throwIfRequested();
707
691
  }
708
692
  if (config.signal && config.signal.aborted) {
709
- throw new Cancel$1$2("canceled");
693
+ throw new Cancel$7("canceled");
710
694
  }
711
695
  }
712
- var dispatchRequest$1$2 = function dispatchRequest(config) {
696
+ var dispatchRequest$5 = function dispatchRequest(config) {
713
697
  throwIfCancellationRequested$2(config);
714
698
  config.headers = config.headers || {};
715
- config.data = transformData2$1.call(config, config.data, config.headers, config.transformRequest);
716
- config.headers = utils$4$2.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
717
- utils$4$2.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
699
+ config.data = transformData$4.call(config, config.data, config.headers, config.transformRequest);
700
+ config.headers = utils$w.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
701
+ utils$w.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
718
702
  delete config.headers[method];
719
703
  });
720
- var adapter = config.adapter || defaults$1$2.adapter;
704
+ var adapter = config.adapter || defaults$a.adapter;
721
705
  return adapter(config).then(function onAdapterResolution(response) {
722
706
  throwIfCancellationRequested$2(config);
723
- response.data = transformData2$1.call(config, response.data, response.headers, config.transformResponse);
707
+ response.data = transformData$4.call(config, response.data, response.headers, config.transformResponse);
724
708
  return response;
725
709
  }, function onAdapterRejection(reason) {
726
- if (!isCancel2$1(reason)) {
710
+ if (!isCancel$4(reason)) {
727
711
  throwIfCancellationRequested$2(config);
728
712
  if (reason && reason.response) {
729
- reason.response.data = transformData2$1.call(config, reason.response.data, reason.response.headers, config.transformResponse);
713
+ reason.response.data = transformData$4.call(config, reason.response.data, reason.response.headers, config.transformResponse);
730
714
  }
731
715
  }
732
716
  return Promise.reject(reason);
733
717
  });
734
718
  };
735
- var utils$3$2 = utils$e$1;
736
- var mergeConfig$2$2 = function mergeConfig(config1, config2) {
719
+ var utils$v = utils$G;
720
+ var mergeConfig$8 = function mergeConfig(config1, config2) {
737
721
  config2 = config2 || {};
738
722
  var config = {};
739
- function getMergedValue(target, source22) {
740
- if (utils$3$2.isPlainObject(target) && utils$3$2.isPlainObject(source22)) {
741
- return utils$3$2.merge(target, source22);
742
- } else if (utils$3$2.isPlainObject(source22)) {
743
- return utils$3$2.merge({}, source22);
744
- } else if (utils$3$2.isArray(source22)) {
745
- return source22.slice();
723
+ function getMergedValue(target, source4) {
724
+ if (utils$v.isPlainObject(target) && utils$v.isPlainObject(source4)) {
725
+ return utils$v.merge(target, source4);
726
+ } else if (utils$v.isPlainObject(source4)) {
727
+ return utils$v.merge({}, source4);
728
+ } else if (utils$v.isArray(source4)) {
729
+ return source4.slice();
746
730
  }
747
- return source22;
731
+ return source4;
748
732
  }
749
733
  function mergeDeepProperties(prop) {
750
- if (!utils$3$2.isUndefined(config2[prop])) {
734
+ if (!utils$v.isUndefined(config2[prop])) {
751
735
  return getMergedValue(config1[prop], config2[prop]);
752
- } else if (!utils$3$2.isUndefined(config1[prop])) {
736
+ } else if (!utils$v.isUndefined(config1[prop])) {
753
737
  return getMergedValue(void 0, config1[prop]);
754
738
  }
755
739
  }
756
740
  function valueFromConfig2(prop) {
757
- if (!utils$3$2.isUndefined(config2[prop])) {
741
+ if (!utils$v.isUndefined(config2[prop])) {
758
742
  return getMergedValue(void 0, config2[prop]);
759
743
  }
760
744
  }
761
745
  function defaultToConfig2(prop) {
762
- if (!utils$3$2.isUndefined(config2[prop])) {
746
+ if (!utils$v.isUndefined(config2[prop])) {
763
747
  return getMergedValue(void 0, config2[prop]);
764
- } else if (!utils$3$2.isUndefined(config1[prop])) {
748
+ } else if (!utils$v.isUndefined(config1[prop])) {
765
749
  return getMergedValue(void 0, config1[prop]);
766
750
  }
767
751
  }
@@ -800,10 +784,10 @@ var mergeConfig$2$2 = function mergeConfig(config1, config2) {
800
784
  "responseEncoding": defaultToConfig2,
801
785
  "validateStatus": mergeDirectKeys
802
786
  };
803
- utils$3$2.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
787
+ utils$v.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
804
788
  var merge2 = mergeMap[prop] || mergeDeepProperties;
805
789
  var configValue = merge2(prop);
806
- utils$3$2.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
790
+ utils$v.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
807
791
  });
808
792
  return config;
809
793
  };
@@ -811,14 +795,14 @@ var data$1 = {
811
795
  "version": "0.25.0"
812
796
  };
813
797
  var VERSION$1 = data$1.version;
814
- var validators$1$2 = {};
798
+ var validators$5 = {};
815
799
  ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
816
- validators$1$2[type] = function validator2(thing) {
800
+ validators$5[type] = function validator2(thing) {
817
801
  return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
818
802
  };
819
803
  });
820
804
  var deprecatedWarnings$2 = {};
821
- validators$1$2.transitional = function transitional(validator2, version2, message) {
805
+ validators$5.transitional = function transitional(validator2, version2, message) {
822
806
  function formatMessage(opt, desc) {
823
807
  return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
824
808
  }
@@ -855,25 +839,25 @@ function assertOptions$2(options, schema, allowUnknown) {
855
839
  }
856
840
  }
857
841
  }
858
- var validator$1$2 = {
842
+ var validator$5 = {
859
843
  assertOptions: assertOptions$2,
860
- validators: validators$1$2
844
+ validators: validators$5
861
845
  };
862
- var utils$2$2 = utils$e$1;
863
- var buildURL2$1 = buildURL$2$2;
864
- var InterceptorManager$3 = InterceptorManager_1$2;
865
- var dispatchRequest2$1 = dispatchRequest$1$2;
866
- var mergeConfig$1$2 = mergeConfig$2$2;
867
- var validator$3 = validator$1$2;
868
- var validators$3 = validator$3.validators;
869
- function Axios$1$2(instanceConfig) {
846
+ var utils$u = utils$G;
847
+ var buildURL$6 = buildURL$8;
848
+ var InterceptorManager$4 = InterceptorManager_1$2;
849
+ var dispatchRequest$4 = dispatchRequest$5;
850
+ var mergeConfig$7 = mergeConfig$8;
851
+ var validator$4 = validator$5;
852
+ var validators$4 = validator$4.validators;
853
+ function Axios$5(instanceConfig) {
870
854
  this.defaults = instanceConfig;
871
855
  this.interceptors = {
872
- request: new InterceptorManager$3(),
873
- response: new InterceptorManager$3()
856
+ request: new InterceptorManager$4(),
857
+ response: new InterceptorManager$4()
874
858
  };
875
859
  }
876
- Axios$1$2.prototype.request = function request(configOrUrl, config) {
860
+ Axios$5.prototype.request = function request(configOrUrl, config) {
877
861
  if (typeof configOrUrl === "string") {
878
862
  config = config || {};
879
863
  config.url = configOrUrl;
@@ -883,7 +867,7 @@ Axios$1$2.prototype.request = function request(configOrUrl, config) {
883
867
  if (!config.url) {
884
868
  throw new Error("Provided config url is not valid");
885
869
  }
886
- config = mergeConfig$1$2(this.defaults, config);
870
+ config = mergeConfig$7(this.defaults, config);
887
871
  if (config.method) {
888
872
  config.method = config.method.toLowerCase();
889
873
  } else if (this.defaults.method) {
@@ -891,12 +875,12 @@ Axios$1$2.prototype.request = function request(configOrUrl, config) {
891
875
  } else {
892
876
  config.method = "get";
893
877
  }
894
- var transitional22 = config.transitional;
895
- if (transitional22 !== void 0) {
896
- validator$3.assertOptions(transitional22, {
897
- silentJSONParsing: validators$3.transitional(validators$3.boolean),
898
- forcedJSONParsing: validators$3.transitional(validators$3.boolean),
899
- clarifyTimeoutError: validators$3.transitional(validators$3.boolean)
878
+ var transitional4 = config.transitional;
879
+ if (transitional4 !== void 0) {
880
+ validator$4.assertOptions(transitional4, {
881
+ silentJSONParsing: validators$4.transitional(validators$4.boolean),
882
+ forcedJSONParsing: validators$4.transitional(validators$4.boolean),
883
+ clarifyTimeoutError: validators$4.transitional(validators$4.boolean)
900
884
  }, false);
901
885
  }
902
886
  var requestInterceptorChain = [];
@@ -914,7 +898,7 @@ Axios$1$2.prototype.request = function request(configOrUrl, config) {
914
898
  });
915
899
  var promise;
916
900
  if (!synchronousRequestInterceptors) {
917
- var chain = [dispatchRequest2$1, void 0];
901
+ var chain = [dispatchRequest$4, void 0];
918
902
  Array.prototype.unshift.apply(chain, requestInterceptorChain);
919
903
  chain = chain.concat(responseInterceptorChain);
920
904
  promise = Promise.resolve(config);
@@ -935,7 +919,7 @@ Axios$1$2.prototype.request = function request(configOrUrl, config) {
935
919
  }
936
920
  }
937
921
  try {
938
- promise = dispatchRequest2$1(newConfig);
922
+ promise = dispatchRequest$4(newConfig);
939
923
  } catch (error) {
940
924
  return Promise.reject(error);
941
925
  }
@@ -944,33 +928,33 @@ Axios$1$2.prototype.request = function request(configOrUrl, config) {
944
928
  }
945
929
  return promise;
946
930
  };
947
- Axios$1$2.prototype.getUri = function getUri(config) {
931
+ Axios$5.prototype.getUri = function getUri(config) {
948
932
  if (!config.url) {
949
933
  throw new Error("Provided config url is not valid");
950
934
  }
951
- config = mergeConfig$1$2(this.defaults, config);
952
- return buildURL2$1(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
935
+ config = mergeConfig$7(this.defaults, config);
936
+ return buildURL$6(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
953
937
  };
954
- utils$2$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
955
- Axios$1$2.prototype[method] = function(url, config) {
956
- return this.request(mergeConfig$1$2(config || {}, {
938
+ utils$u.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
939
+ Axios$5.prototype[method] = function(url, config) {
940
+ return this.request(mergeConfig$7(config || {}, {
957
941
  method,
958
942
  url,
959
943
  data: (config || {}).data
960
944
  }));
961
945
  };
962
946
  });
963
- utils$2$2.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
964
- Axios$1$2.prototype[method] = function(url, data2, config) {
965
- return this.request(mergeConfig$1$2(config || {}, {
947
+ utils$u.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
948
+ Axios$5.prototype[method] = function(url, data2, config) {
949
+ return this.request(mergeConfig$7(config || {}, {
966
950
  method,
967
951
  url,
968
952
  data: data2
969
953
  }));
970
954
  };
971
955
  });
972
- var Axios_1$2 = Axios$1$2;
973
- var Cancel$5 = Cancel_1$2;
956
+ var Axios_1$2 = Axios$5;
957
+ var Cancel$6 = Cancel_1$2;
974
958
  function CancelToken$2(executor) {
975
959
  if (typeof executor !== "function") {
976
960
  throw new TypeError("executor must be a function.");
@@ -1005,7 +989,7 @@ function CancelToken$2(executor) {
1005
989
  if (token2.reason) {
1006
990
  return;
1007
991
  }
1008
- token2.reason = new Cancel$5(message);
992
+ token2.reason = new Cancel$6(message);
1009
993
  resolvePromise(token2.reason);
1010
994
  });
1011
995
  }
@@ -1045,49 +1029,49 @@ CancelToken$2.source = function source() {
1045
1029
  };
1046
1030
  };
1047
1031
  var CancelToken_1$2 = CancelToken$2;
1048
- var spread$2 = function spread2(callback) {
1032
+ var spread$2 = function spread(callback) {
1049
1033
  return function wrap(arr) {
1050
1034
  return callback.apply(null, arr);
1051
1035
  };
1052
1036
  };
1053
- var utils$1$2 = utils$e$1;
1054
- var isAxiosError$2 = function isAxiosError2(payload) {
1055
- return utils$1$2.isObject(payload) && payload.isAxiosError === true;
1037
+ var utils$t = utils$G;
1038
+ var isAxiosError$2 = function isAxiosError(payload) {
1039
+ return utils$t.isObject(payload) && payload.isAxiosError === true;
1056
1040
  };
1057
- var utils$f = utils$e$1;
1058
- var bind2$1 = bind$2$2;
1059
- var Axios$3 = Axios_1$2;
1060
- var mergeConfig2$1 = mergeConfig$2$2;
1061
- var defaults$6 = defaults_1$2;
1041
+ var utils$s = utils$G;
1042
+ var bind$6 = bind$8;
1043
+ var Axios$4 = Axios_1$2;
1044
+ var mergeConfig$6 = mergeConfig$8;
1045
+ var defaults$9 = defaults_1$2;
1062
1046
  function createInstance$2(defaultConfig) {
1063
- var context = new Axios$3(defaultConfig);
1064
- var instance = bind2$1(Axios$3.prototype.request, context);
1065
- utils$f.extend(instance, Axios$3.prototype, context);
1066
- utils$f.extend(instance, context);
1047
+ var context = new Axios$4(defaultConfig);
1048
+ var instance = bind$6(Axios$4.prototype.request, context);
1049
+ utils$s.extend(instance, Axios$4.prototype, context);
1050
+ utils$s.extend(instance, context);
1067
1051
  instance.create = function create2(instanceConfig) {
1068
- return createInstance$2(mergeConfig2$1(defaultConfig, instanceConfig));
1052
+ return createInstance$2(mergeConfig$6(defaultConfig, instanceConfig));
1069
1053
  };
1070
1054
  return instance;
1071
1055
  }
1072
- var axios$1$2 = createInstance$2(defaults$6);
1073
- axios$1$2.Axios = Axios$3;
1074
- axios$1$2.Cancel = Cancel_1$2;
1075
- axios$1$2.CancelToken = CancelToken_1$2;
1076
- axios$1$2.isCancel = isCancel$1$2;
1077
- axios$1$2.VERSION = data$1.version;
1078
- axios$1$2.all = function all(promises) {
1056
+ var axios$7 = createInstance$2(defaults$9);
1057
+ axios$7.Axios = Axios$4;
1058
+ axios$7.Cancel = Cancel_1$2;
1059
+ axios$7.CancelToken = CancelToken_1$2;
1060
+ axios$7.isCancel = isCancel$5;
1061
+ axios$7.VERSION = data$1.version;
1062
+ axios$7.all = function all(promises) {
1079
1063
  return Promise.all(promises);
1080
1064
  };
1081
- axios$1$2.spread = spread$2;
1082
- axios$1$2.isAxiosError = isAxiosError$2;
1083
- axios$2$2.exports = axios$1$2;
1084
- axios$2$2.exports.default = axios$1$2;
1085
- var axios$4 = axios$2$2.exports;
1065
+ axios$7.spread = spread$2;
1066
+ axios$7.isAxiosError = isAxiosError$2;
1067
+ axios$8.exports = axios$7;
1068
+ axios$8.exports.default = axios$7;
1069
+ var axios$6 = axios$8.exports;
1086
1070
  const SERVER_ERROR_CODE = 500;
1087
1071
  class HasuraAuthApi {
1088
1072
  constructor({ url = "" }) {
1089
1073
  this.url = url;
1090
- this.httpClient = axios$4.create({
1074
+ this.httpClient = axios$6.create({
1091
1075
  baseURL: this.url
1092
1076
  });
1093
1077
  this.httpClient.interceptors.response.use((response) => response, (error) => {
@@ -1165,7 +1149,7 @@ class HasuraAuthApi {
1165
1149
  async changePassword(params) {
1166
1150
  try {
1167
1151
  await this.httpClient.post("/user/password", params, {
1168
- headers: __spreadValues$1({}, this.generateAuthHeaders())
1152
+ headers: __spreadValues({}, this.generateAuthHeaders())
1169
1153
  });
1170
1154
  return { error: null };
1171
1155
  } catch (error) {
@@ -1183,7 +1167,7 @@ class HasuraAuthApi {
1183
1167
  async changeEmail(params) {
1184
1168
  try {
1185
1169
  await this.httpClient.post("/user/email/change", params, {
1186
- headers: __spreadValues$1({}, this.generateAuthHeaders())
1170
+ headers: __spreadValues({}, this.generateAuthHeaders())
1187
1171
  });
1188
1172
  return { error: null };
1189
1173
  } catch (error) {
@@ -1821,8 +1805,7 @@ class HasuraAuthClient {
1821
1805
  return { error };
1822
1806
  }
1823
1807
  async verifyEmail(params) {
1824
- const { data: data2, error } = await this.api.verifyEmail(params);
1825
- return { data: data2, error };
1808
+ return await this.api.verifyEmail(params);
1826
1809
  }
1827
1810
  async resetPassword(params) {
1828
1811
  const { error } = await this.api.resetPassword(params);
@@ -1847,7 +1830,7 @@ class HasuraAuthClient {
1847
1830
  onTokenChanged(fn) {
1848
1831
  this.onTokenChangedFunctions.push(fn);
1849
1832
  const index = this.onTokenChangedFunctions.length - 1;
1850
- const unsubscribe22 = () => {
1833
+ const unsubscribe3 = () => {
1851
1834
  try {
1852
1835
  this.onTokenChangedFunctions[index] = () => {
1853
1836
  };
@@ -1855,12 +1838,12 @@ class HasuraAuthClient {
1855
1838
  console.warn("Unable to unsubscribe onTokenChanged function. Maybe the functions is already unsubscribed?");
1856
1839
  }
1857
1840
  };
1858
- return unsubscribe22;
1841
+ return unsubscribe3;
1859
1842
  }
1860
1843
  onAuthStateChanged(fn) {
1861
1844
  this.onAuthChangedFunctions.push(fn);
1862
1845
  const index = this.onAuthChangedFunctions.length - 1;
1863
- const unsubscribe22 = () => {
1846
+ const unsubscribe3 = () => {
1864
1847
  try {
1865
1848
  this.onAuthChangedFunctions[index] = () => {
1866
1849
  };
@@ -1868,7 +1851,7 @@ class HasuraAuthClient {
1868
1851
  console.warn("Unable to unsubscribe onAuthStateChanged function. Maybe you already did?");
1869
1852
  }
1870
1853
  };
1871
- return unsubscribe22;
1854
+ return unsubscribe3;
1872
1855
  }
1873
1856
  isAuthenticated() {
1874
1857
  return this.session !== null;
@@ -1878,9 +1861,9 @@ class HasuraAuthClient {
1878
1861
  if (!this.initAuthLoading) {
1879
1862
  resolve(this.isAuthenticated());
1880
1863
  } else {
1881
- const unsubscribe22 = this.onAuthStateChanged((event, _session) => {
1864
+ const unsubscribe3 = this.onAuthStateChanged((event, _session) => {
1882
1865
  resolve(event === "SIGNED_IN");
1883
- unsubscribe22();
1866
+ unsubscribe3();
1884
1867
  });
1885
1868
  }
1886
1869
  });
@@ -2093,27 +2076,8 @@ class HasuraAuthClient {
2093
2076
  this.initAuthLoading = false;
2094
2077
  }
2095
2078
  }
2096
- var __defProp2 = Object.defineProperty;
2097
- var __defProps2 = Object.defineProperties;
2098
- var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
2099
- var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
2100
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
2101
- var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
2102
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2103
- var __spreadValues2 = (a, b) => {
2104
- for (var prop in b || (b = {}))
2105
- if (__hasOwnProp2.call(b, prop))
2106
- __defNormalProp2(a, prop, b[prop]);
2107
- if (__getOwnPropSymbols2)
2108
- for (var prop of __getOwnPropSymbols2(b)) {
2109
- if (__propIsEnum2.call(b, prop))
2110
- __defNormalProp2(a, prop, b[prop]);
2111
- }
2112
- return a;
2113
- };
2114
- var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
2115
- var axios$2$1 = { exports: {} };
2116
- var bind$2$1 = function bind2(fn, thisArg) {
2079
+ var axios$5 = { exports: {} };
2080
+ var bind$5 = function bind2(fn, thisArg) {
2117
2081
  return function wrap() {
2118
2082
  var args = new Array(arguments.length);
2119
2083
  for (var i = 0; i < args.length; i++) {
@@ -2122,7 +2086,7 @@ var bind$2$1 = function bind2(fn, thisArg) {
2122
2086
  return fn.apply(thisArg, args);
2123
2087
  };
2124
2088
  };
2125
- var bind$1$1 = bind$2$1;
2089
+ var bind$4 = bind$5;
2126
2090
  var toString$1 = Object.prototype.toString;
2127
2091
  function isArray$1(val) {
2128
2092
  return toString$1.call(val) === "[object Array]";
@@ -2231,7 +2195,7 @@ function merge$1() {
2231
2195
  function extend$1(a, b, thisArg) {
2232
2196
  forEach$1(b, function assignValue(val, key) {
2233
2197
  if (thisArg && typeof val === "function") {
2234
- a[key] = bind$1$1(val, thisArg);
2198
+ a[key] = bind$4(val, thisArg);
2235
2199
  } else {
2236
2200
  a[key] = val;
2237
2201
  }
@@ -2244,7 +2208,7 @@ function stripBOM$1(content) {
2244
2208
  }
2245
2209
  return content;
2246
2210
  }
2247
- var utils$d$1 = {
2211
+ var utils$r = {
2248
2212
  isArray: isArray$1,
2249
2213
  isArrayBuffer: isArrayBuffer$1,
2250
2214
  isBuffer: isBuffer$1,
@@ -2268,34 +2232,34 @@ var utils$d$1 = {
2268
2232
  trim: trim$1,
2269
2233
  stripBOM: stripBOM$1
2270
2234
  };
2271
- var utils$c$1 = utils$d$1;
2235
+ var utils$q = utils$r;
2272
2236
  function encode$1(val) {
2273
2237
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2274
2238
  }
2275
- var buildURL$2$1 = function buildURL2(url, params, paramsSerializer) {
2239
+ var buildURL$5 = function buildURL2(url, params, paramsSerializer) {
2276
2240
  if (!params) {
2277
2241
  return url;
2278
2242
  }
2279
2243
  var serializedParams;
2280
2244
  if (paramsSerializer) {
2281
2245
  serializedParams = paramsSerializer(params);
2282
- } else if (utils$c$1.isURLSearchParams(params)) {
2246
+ } else if (utils$q.isURLSearchParams(params)) {
2283
2247
  serializedParams = params.toString();
2284
2248
  } else {
2285
2249
  var parts = [];
2286
- utils$c$1.forEach(params, function serialize(val, key) {
2250
+ utils$q.forEach(params, function serialize(val, key) {
2287
2251
  if (val === null || typeof val === "undefined") {
2288
2252
  return;
2289
2253
  }
2290
- if (utils$c$1.isArray(val)) {
2254
+ if (utils$q.isArray(val)) {
2291
2255
  key = key + "[]";
2292
2256
  } else {
2293
2257
  val = [val];
2294
2258
  }
2295
- utils$c$1.forEach(val, function parseValue(v) {
2296
- if (utils$c$1.isDate(v)) {
2259
+ utils$q.forEach(val, function parseValue(v) {
2260
+ if (utils$q.isDate(v)) {
2297
2261
  v = v.toISOString();
2298
- } else if (utils$c$1.isObject(v)) {
2262
+ } else if (utils$q.isObject(v)) {
2299
2263
  v = JSON.stringify(v);
2300
2264
  }
2301
2265
  parts.push(encode$1(key) + "=" + encode$1(v));
@@ -2312,11 +2276,11 @@ var buildURL$2$1 = function buildURL2(url, params, paramsSerializer) {
2312
2276
  }
2313
2277
  return url;
2314
2278
  };
2315
- var utils$b$1 = utils$d$1;
2316
- function InterceptorManager$1$1() {
2279
+ var utils$p = utils$r;
2280
+ function InterceptorManager$3() {
2317
2281
  this.handlers = [];
2318
2282
  }
2319
- InterceptorManager$1$1.prototype.use = function use2(fulfilled, rejected, options) {
2283
+ InterceptorManager$3.prototype.use = function use2(fulfilled, rejected, options) {
2320
2284
  this.handlers.push({
2321
2285
  fulfilled,
2322
2286
  rejected,
@@ -2325,34 +2289,34 @@ InterceptorManager$1$1.prototype.use = function use2(fulfilled, rejected, option
2325
2289
  });
2326
2290
  return this.handlers.length - 1;
2327
2291
  };
2328
- InterceptorManager$1$1.prototype.eject = function eject2(id) {
2292
+ InterceptorManager$3.prototype.eject = function eject2(id) {
2329
2293
  if (this.handlers[id]) {
2330
2294
  this.handlers[id] = null;
2331
2295
  }
2332
2296
  };
2333
- InterceptorManager$1$1.prototype.forEach = function forEach22(fn) {
2334
- utils$b$1.forEach(this.handlers, function forEachHandler(h) {
2297
+ InterceptorManager$3.prototype.forEach = function forEach2(fn) {
2298
+ utils$p.forEach(this.handlers, function forEachHandler(h) {
2335
2299
  if (h !== null) {
2336
2300
  fn(h);
2337
2301
  }
2338
2302
  });
2339
2303
  };
2340
- var InterceptorManager_1$1 = InterceptorManager$1$1;
2341
- var utils$a$1 = utils$d$1;
2342
- var normalizeHeaderName$1$1 = function normalizeHeaderName2(headers, normalizedName) {
2343
- utils$a$1.forEach(headers, function processHeader(value, name2) {
2304
+ var InterceptorManager_1$1 = InterceptorManager$3;
2305
+ var utils$o = utils$r;
2306
+ var normalizeHeaderName$3 = function normalizeHeaderName2(headers, normalizedName) {
2307
+ utils$o.forEach(headers, function processHeader(value, name2) {
2344
2308
  if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
2345
2309
  headers[normalizedName] = value;
2346
2310
  delete headers[name2];
2347
2311
  }
2348
2312
  });
2349
2313
  };
2350
- var enhanceError$2$1 = function enhanceError2(error, config, code, request22, response) {
2314
+ var enhanceError$5 = function enhanceError2(error, config, code, request4, response) {
2351
2315
  error.config = config;
2352
2316
  if (code) {
2353
2317
  error.code = code;
2354
2318
  }
2355
- error.request = request22;
2319
+ error.request = request4;
2356
2320
  error.response = response;
2357
2321
  error.isAxiosError = true;
2358
2322
  error.toJSON = function toJSON() {
@@ -2371,33 +2335,33 @@ var enhanceError$2$1 = function enhanceError2(error, config, code, request22, re
2371
2335
  };
2372
2336
  return error;
2373
2337
  };
2374
- var enhanceError$1$1 = enhanceError$2$1;
2375
- var createError$2$1 = function createError2(message, config, code, request22, response) {
2338
+ var enhanceError$4 = enhanceError$5;
2339
+ var createError$5 = function createError2(message, config, code, request4, response) {
2376
2340
  var error = new Error(message);
2377
- return enhanceError$1$1(error, config, code, request22, response);
2341
+ return enhanceError$4(error, config, code, request4, response);
2378
2342
  };
2379
- var createError$1$1 = createError$2$1;
2380
- var settle$1$1 = function settle2(resolve, reject, response) {
2381
- var validateStatus22 = response.config.validateStatus;
2382
- if (!response.status || !validateStatus22 || validateStatus22(response.status)) {
2343
+ var createError$4 = createError$5;
2344
+ var settle$3 = function settle2(resolve, reject, response) {
2345
+ var validateStatus4 = response.config.validateStatus;
2346
+ if (!response.status || !validateStatus4 || validateStatus4(response.status)) {
2383
2347
  resolve(response);
2384
2348
  } else {
2385
- reject(createError$1$1("Request failed with status code " + response.status, response.config, null, response.request, response));
2349
+ reject(createError$4("Request failed with status code " + response.status, response.config, null, response.request, response));
2386
2350
  }
2387
2351
  };
2388
- var utils$9$1 = utils$d$1;
2389
- var cookies$1$1 = utils$9$1.isStandardBrowserEnv() ? function standardBrowserEnv3() {
2352
+ var utils$n = utils$r;
2353
+ var cookies$3 = utils$n.isStandardBrowserEnv() ? function standardBrowserEnv3() {
2390
2354
  return {
2391
2355
  write: function write(name2, value, expires, path, domain, secure) {
2392
2356
  var cookie = [];
2393
2357
  cookie.push(name2 + "=" + encodeURIComponent(value));
2394
- if (utils$9$1.isNumber(expires)) {
2358
+ if (utils$n.isNumber(expires)) {
2395
2359
  cookie.push("expires=" + new Date(expires).toGMTString());
2396
2360
  }
2397
- if (utils$9$1.isString(path)) {
2361
+ if (utils$n.isString(path)) {
2398
2362
  cookie.push("path=" + path);
2399
2363
  }
2400
- if (utils$9$1.isString(domain)) {
2364
+ if (utils$n.isString(domain)) {
2401
2365
  cookie.push("domain=" + domain);
2402
2366
  }
2403
2367
  if (secure === true) {
@@ -2424,21 +2388,21 @@ var cookies$1$1 = utils$9$1.isStandardBrowserEnv() ? function standardBrowserEnv
2424
2388
  }
2425
2389
  };
2426
2390
  }();
2427
- var isAbsoluteURL$1$1 = function isAbsoluteURL2(url) {
2391
+ var isAbsoluteURL$3 = function isAbsoluteURL2(url) {
2428
2392
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
2429
2393
  };
2430
- var combineURLs$1$1 = function combineURLs2(baseURL, relativeURL) {
2394
+ var combineURLs$3 = function combineURLs2(baseURL, relativeURL) {
2431
2395
  return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
2432
2396
  };
2433
- var isAbsoluteURL22 = isAbsoluteURL$1$1;
2434
- var combineURLs22 = combineURLs$1$1;
2435
- var buildFullPath$1$1 = function buildFullPath2(baseURL, requestedURL) {
2436
- if (baseURL && !isAbsoluteURL22(requestedURL)) {
2437
- return combineURLs22(baseURL, requestedURL);
2397
+ var isAbsoluteURL$2 = isAbsoluteURL$3;
2398
+ var combineURLs$2 = combineURLs$3;
2399
+ var buildFullPath$3 = function buildFullPath2(baseURL, requestedURL) {
2400
+ if (baseURL && !isAbsoluteURL$2(requestedURL)) {
2401
+ return combineURLs$2(baseURL, requestedURL);
2438
2402
  }
2439
2403
  return requestedURL;
2440
2404
  };
2441
- var utils$8$1 = utils$d$1;
2405
+ var utils$m = utils$r;
2442
2406
  var ignoreDuplicateOf$1 = [
2443
2407
  "age",
2444
2408
  "authorization",
@@ -2458,7 +2422,7 @@ var ignoreDuplicateOf$1 = [
2458
2422
  "retry-after",
2459
2423
  "user-agent"
2460
2424
  ];
2461
- var parseHeaders$1$1 = function parseHeaders2(headers) {
2425
+ var parseHeaders$3 = function parseHeaders2(headers) {
2462
2426
  var parsed = {};
2463
2427
  var key;
2464
2428
  var val;
@@ -2466,10 +2430,10 @@ var parseHeaders$1$1 = function parseHeaders2(headers) {
2466
2430
  if (!headers) {
2467
2431
  return parsed;
2468
2432
  }
2469
- utils$8$1.forEach(headers.split("\n"), function parser(line) {
2433
+ utils$m.forEach(headers.split("\n"), function parser(line) {
2470
2434
  i = line.indexOf(":");
2471
- key = utils$8$1.trim(line.substr(0, i)).toLowerCase();
2472
- val = utils$8$1.trim(line.substr(i + 1));
2435
+ key = utils$m.trim(line.substr(0, i)).toLowerCase();
2436
+ val = utils$m.trim(line.substr(i + 1));
2473
2437
  if (key) {
2474
2438
  if (parsed[key] && ignoreDuplicateOf$1.indexOf(key) >= 0) {
2475
2439
  return;
@@ -2483,8 +2447,8 @@ var parseHeaders$1$1 = function parseHeaders2(headers) {
2483
2447
  });
2484
2448
  return parsed;
2485
2449
  };
2486
- var utils$7$1 = utils$d$1;
2487
- var isURLSameOrigin$1$1 = utils$7$1.isStandardBrowserEnv() ? function standardBrowserEnv22() {
2450
+ var utils$l = utils$r;
2451
+ var isURLSameOrigin$3 = utils$l.isStandardBrowserEnv() ? function standardBrowserEnv4() {
2488
2452
  var msie = /(msie|trident)/i.test(navigator.userAgent);
2489
2453
  var urlParsingNode = document.createElement("a");
2490
2454
  var originURL;
@@ -2508,139 +2472,139 @@ var isURLSameOrigin$1$1 = utils$7$1.isStandardBrowserEnv() ? function standardBr
2508
2472
  }
2509
2473
  originURL = resolveURL(window.location.href);
2510
2474
  return function isURLSameOrigin2(requestURL) {
2511
- var parsed = utils$7$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
2475
+ var parsed = utils$l.isString(requestURL) ? resolveURL(requestURL) : requestURL;
2512
2476
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
2513
2477
  };
2514
- }() : function nonStandardBrowserEnv22() {
2478
+ }() : function nonStandardBrowserEnv4() {
2515
2479
  return function isURLSameOrigin2() {
2516
2480
  return true;
2517
2481
  };
2518
2482
  }();
2519
- var utils$6$1 = utils$d$1;
2520
- var settle22 = settle$1$1;
2521
- var cookies$2 = cookies$1$1;
2522
- var buildURL$1$1 = buildURL$2$1;
2523
- var buildFullPath22 = buildFullPath$1$1;
2524
- var parseHeaders22 = parseHeaders$1$1;
2525
- var isURLSameOrigin$2 = isURLSameOrigin$1$1;
2526
- var createError22 = createError$2$1;
2483
+ var utils$k = utils$r;
2484
+ var settle$2 = settle$3;
2485
+ var cookies$2 = cookies$3;
2486
+ var buildURL$4 = buildURL$5;
2487
+ var buildFullPath$2 = buildFullPath$3;
2488
+ var parseHeaders$2 = parseHeaders$3;
2489
+ var isURLSameOrigin$2 = isURLSameOrigin$3;
2490
+ var createError$3 = createError$5;
2527
2491
  var xhr$1 = function xhrAdapter2(config) {
2528
2492
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2529
2493
  var requestData = config.data;
2530
2494
  var requestHeaders = config.headers;
2531
2495
  var responseType = config.responseType;
2532
- if (utils$6$1.isFormData(requestData)) {
2496
+ if (utils$k.isFormData(requestData)) {
2533
2497
  delete requestHeaders["Content-Type"];
2534
2498
  }
2535
- var request22 = new XMLHttpRequest();
2499
+ var request4 = new XMLHttpRequest();
2536
2500
  if (config.auth) {
2537
2501
  var username = config.auth.username || "";
2538
2502
  var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
2539
2503
  requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
2540
2504
  }
2541
- var fullPath = buildFullPath22(config.baseURL, config.url);
2542
- request22.open(config.method.toUpperCase(), buildURL$1$1(fullPath, config.params, config.paramsSerializer), true);
2543
- request22.timeout = config.timeout;
2505
+ var fullPath = buildFullPath$2(config.baseURL, config.url);
2506
+ request4.open(config.method.toUpperCase(), buildURL$4(fullPath, config.params, config.paramsSerializer), true);
2507
+ request4.timeout = config.timeout;
2544
2508
  function onloadend() {
2545
- if (!request22) {
2509
+ if (!request4) {
2546
2510
  return;
2547
2511
  }
2548
- var responseHeaders = "getAllResponseHeaders" in request22 ? parseHeaders22(request22.getAllResponseHeaders()) : null;
2549
- var responseData = !responseType || responseType === "text" || responseType === "json" ? request22.responseText : request22.response;
2512
+ var responseHeaders = "getAllResponseHeaders" in request4 ? parseHeaders$2(request4.getAllResponseHeaders()) : null;
2513
+ var responseData = !responseType || responseType === "text" || responseType === "json" ? request4.responseText : request4.response;
2550
2514
  var response = {
2551
2515
  data: responseData,
2552
- status: request22.status,
2553
- statusText: request22.statusText,
2516
+ status: request4.status,
2517
+ statusText: request4.statusText,
2554
2518
  headers: responseHeaders,
2555
2519
  config,
2556
- request: request22
2520
+ request: request4
2557
2521
  };
2558
- settle22(resolve, reject, response);
2559
- request22 = null;
2522
+ settle$2(resolve, reject, response);
2523
+ request4 = null;
2560
2524
  }
2561
- if ("onloadend" in request22) {
2562
- request22.onloadend = onloadend;
2525
+ if ("onloadend" in request4) {
2526
+ request4.onloadend = onloadend;
2563
2527
  } else {
2564
- request22.onreadystatechange = function handleLoad() {
2565
- if (!request22 || request22.readyState !== 4) {
2528
+ request4.onreadystatechange = function handleLoad() {
2529
+ if (!request4 || request4.readyState !== 4) {
2566
2530
  return;
2567
2531
  }
2568
- if (request22.status === 0 && !(request22.responseURL && request22.responseURL.indexOf("file:") === 0)) {
2532
+ if (request4.status === 0 && !(request4.responseURL && request4.responseURL.indexOf("file:") === 0)) {
2569
2533
  return;
2570
2534
  }
2571
2535
  setTimeout(onloadend);
2572
2536
  };
2573
2537
  }
2574
- request22.onabort = function handleAbort() {
2575
- if (!request22) {
2538
+ request4.onabort = function handleAbort() {
2539
+ if (!request4) {
2576
2540
  return;
2577
2541
  }
2578
- reject(createError22("Request aborted", config, "ECONNABORTED", request22));
2579
- request22 = null;
2542
+ reject(createError$3("Request aborted", config, "ECONNABORTED", request4));
2543
+ request4 = null;
2580
2544
  };
2581
- request22.onerror = function handleError() {
2582
- reject(createError22("Network Error", config, null, request22));
2583
- request22 = null;
2545
+ request4.onerror = function handleError() {
2546
+ reject(createError$3("Network Error", config, null, request4));
2547
+ request4 = null;
2584
2548
  };
2585
- request22.ontimeout = function handleTimeout() {
2549
+ request4.ontimeout = function handleTimeout() {
2586
2550
  var timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
2587
2551
  if (config.timeoutErrorMessage) {
2588
2552
  timeoutErrorMessage = config.timeoutErrorMessage;
2589
2553
  }
2590
- reject(createError22(timeoutErrorMessage, config, config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request22));
2591
- request22 = null;
2554
+ reject(createError$3(timeoutErrorMessage, config, config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request4));
2555
+ request4 = null;
2592
2556
  };
2593
- if (utils$6$1.isStandardBrowserEnv()) {
2557
+ if (utils$k.isStandardBrowserEnv()) {
2594
2558
  var xsrfValue = (config.withCredentials || isURLSameOrigin$2(fullPath)) && config.xsrfCookieName ? cookies$2.read(config.xsrfCookieName) : void 0;
2595
2559
  if (xsrfValue) {
2596
2560
  requestHeaders[config.xsrfHeaderName] = xsrfValue;
2597
2561
  }
2598
2562
  }
2599
- if ("setRequestHeader" in request22) {
2600
- utils$6$1.forEach(requestHeaders, function setRequestHeader(val, key) {
2563
+ if ("setRequestHeader" in request4) {
2564
+ utils$k.forEach(requestHeaders, function setRequestHeader(val, key) {
2601
2565
  if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
2602
2566
  delete requestHeaders[key];
2603
2567
  } else {
2604
- request22.setRequestHeader(key, val);
2568
+ request4.setRequestHeader(key, val);
2605
2569
  }
2606
2570
  });
2607
2571
  }
2608
- if (!utils$6$1.isUndefined(config.withCredentials)) {
2609
- request22.withCredentials = !!config.withCredentials;
2572
+ if (!utils$k.isUndefined(config.withCredentials)) {
2573
+ request4.withCredentials = !!config.withCredentials;
2610
2574
  }
2611
2575
  if (responseType && responseType !== "json") {
2612
- request22.responseType = config.responseType;
2576
+ request4.responseType = config.responseType;
2613
2577
  }
2614
2578
  if (typeof config.onDownloadProgress === "function") {
2615
- request22.addEventListener("progress", config.onDownloadProgress);
2579
+ request4.addEventListener("progress", config.onDownloadProgress);
2616
2580
  }
2617
- if (typeof config.onUploadProgress === "function" && request22.upload) {
2618
- request22.upload.addEventListener("progress", config.onUploadProgress);
2581
+ if (typeof config.onUploadProgress === "function" && request4.upload) {
2582
+ request4.upload.addEventListener("progress", config.onUploadProgress);
2619
2583
  }
2620
2584
  if (config.cancelToken) {
2621
2585
  config.cancelToken.promise.then(function onCanceled(cancel) {
2622
- if (!request22) {
2586
+ if (!request4) {
2623
2587
  return;
2624
2588
  }
2625
- request22.abort();
2589
+ request4.abort();
2626
2590
  reject(cancel);
2627
- request22 = null;
2591
+ request4 = null;
2628
2592
  });
2629
2593
  }
2630
2594
  if (!requestData) {
2631
2595
  requestData = null;
2632
2596
  }
2633
- request22.send(requestData);
2597
+ request4.send(requestData);
2634
2598
  });
2635
2599
  };
2636
- var utils$5$1 = utils$d$1;
2637
- var normalizeHeaderName22 = normalizeHeaderName$1$1;
2638
- var enhanceError22 = enhanceError$2$1;
2600
+ var utils$j = utils$r;
2601
+ var normalizeHeaderName$2 = normalizeHeaderName$3;
2602
+ var enhanceError$3 = enhanceError$5;
2639
2603
  var DEFAULT_CONTENT_TYPE$1 = {
2640
2604
  "Content-Type": "application/x-www-form-urlencoded"
2641
2605
  };
2642
2606
  function setContentTypeIfUnset$1(headers, value) {
2643
- if (!utils$5$1.isUndefined(headers) && utils$5$1.isUndefined(headers["Content-Type"])) {
2607
+ if (!utils$j.isUndefined(headers) && utils$j.isUndefined(headers["Content-Type"])) {
2644
2608
  headers["Content-Type"] = value;
2645
2609
  }
2646
2610
  }
@@ -2654,10 +2618,10 @@ function getDefaultAdapter$1() {
2654
2618
  return adapter;
2655
2619
  }
2656
2620
  function stringifySafely$1(rawValue, parser, encoder) {
2657
- if (utils$5$1.isString(rawValue)) {
2621
+ if (utils$j.isString(rawValue)) {
2658
2622
  try {
2659
2623
  (parser || JSON.parse)(rawValue);
2660
- return utils$5$1.trim(rawValue);
2624
+ return utils$j.trim(rawValue);
2661
2625
  } catch (e) {
2662
2626
  if (e.name !== "SyntaxError") {
2663
2627
  throw e;
@@ -2666,7 +2630,7 @@ function stringifySafely$1(rawValue, parser, encoder) {
2666
2630
  }
2667
2631
  return (encoder || JSON.stringify)(rawValue);
2668
2632
  }
2669
- var defaults$3$1 = {
2633
+ var defaults$8 = {
2670
2634
  transitional: {
2671
2635
  silentJSONParsing: true,
2672
2636
  forcedJSONParsing: true,
@@ -2674,36 +2638,36 @@ var defaults$3$1 = {
2674
2638
  },
2675
2639
  adapter: getDefaultAdapter$1(),
2676
2640
  transformRequest: [function transformRequest2(data2, headers) {
2677
- normalizeHeaderName22(headers, "Accept");
2678
- normalizeHeaderName22(headers, "Content-Type");
2679
- if (utils$5$1.isFormData(data2) || utils$5$1.isArrayBuffer(data2) || utils$5$1.isBuffer(data2) || utils$5$1.isStream(data2) || utils$5$1.isFile(data2) || utils$5$1.isBlob(data2)) {
2641
+ normalizeHeaderName$2(headers, "Accept");
2642
+ normalizeHeaderName$2(headers, "Content-Type");
2643
+ if (utils$j.isFormData(data2) || utils$j.isArrayBuffer(data2) || utils$j.isBuffer(data2) || utils$j.isStream(data2) || utils$j.isFile(data2) || utils$j.isBlob(data2)) {
2680
2644
  return data2;
2681
2645
  }
2682
- if (utils$5$1.isArrayBufferView(data2)) {
2646
+ if (utils$j.isArrayBufferView(data2)) {
2683
2647
  return data2.buffer;
2684
2648
  }
2685
- if (utils$5$1.isURLSearchParams(data2)) {
2649
+ if (utils$j.isURLSearchParams(data2)) {
2686
2650
  setContentTypeIfUnset$1(headers, "application/x-www-form-urlencoded;charset=utf-8");
2687
2651
  return data2.toString();
2688
2652
  }
2689
- if (utils$5$1.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
2653
+ if (utils$j.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
2690
2654
  setContentTypeIfUnset$1(headers, "application/json");
2691
2655
  return stringifySafely$1(data2);
2692
2656
  }
2693
2657
  return data2;
2694
2658
  }],
2695
2659
  transformResponse: [function transformResponse2(data2) {
2696
- var transitional22 = this.transitional;
2697
- var silentJSONParsing = transitional22 && transitional22.silentJSONParsing;
2698
- var forcedJSONParsing = transitional22 && transitional22.forcedJSONParsing;
2660
+ var transitional4 = this.transitional;
2661
+ var silentJSONParsing = transitional4 && transitional4.silentJSONParsing;
2662
+ var forcedJSONParsing = transitional4 && transitional4.forcedJSONParsing;
2699
2663
  var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
2700
- if (strictJSONParsing || forcedJSONParsing && utils$5$1.isString(data2) && data2.length) {
2664
+ if (strictJSONParsing || forcedJSONParsing && utils$j.isString(data2) && data2.length) {
2701
2665
  try {
2702
2666
  return JSON.parse(data2);
2703
2667
  } catch (e) {
2704
2668
  if (strictJSONParsing) {
2705
2669
  if (e.name === "SyntaxError") {
2706
- throw enhanceError22(e, this, "E_JSON_PARSE");
2670
+ throw enhanceError$3(e, this, "E_JSON_PARSE");
2707
2671
  }
2708
2672
  throw e;
2709
2673
  }
@@ -2720,64 +2684,64 @@ var defaults$3$1 = {
2720
2684
  return status >= 200 && status < 300;
2721
2685
  }
2722
2686
  };
2723
- defaults$3$1.headers = {
2687
+ defaults$8.headers = {
2724
2688
  common: {
2725
2689
  "Accept": "application/json, text/plain, */*"
2726
2690
  }
2727
2691
  };
2728
- utils$5$1.forEach(["delete", "get", "head"], function forEachMethodNoData3(method) {
2729
- defaults$3$1.headers[method] = {};
2692
+ utils$j.forEach(["delete", "get", "head"], function forEachMethodNoData3(method) {
2693
+ defaults$8.headers[method] = {};
2730
2694
  });
2731
- utils$5$1.forEach(["post", "put", "patch"], function forEachMethodWithData3(method) {
2732
- defaults$3$1.headers[method] = utils$5$1.merge(DEFAULT_CONTENT_TYPE$1);
2695
+ utils$j.forEach(["post", "put", "patch"], function forEachMethodWithData3(method) {
2696
+ defaults$8.headers[method] = utils$j.merge(DEFAULT_CONTENT_TYPE$1);
2733
2697
  });
2734
- var defaults_1$1 = defaults$3$1;
2735
- var utils$4$1 = utils$d$1;
2736
- var defaults$2$1 = defaults_1$1;
2737
- var transformData$1$1 = function transformData2(data2, headers, fns) {
2738
- var context = this || defaults$2$1;
2739
- utils$4$1.forEach(fns, function transform(fn) {
2698
+ var defaults_1$1 = defaults$8;
2699
+ var utils$i = utils$r;
2700
+ var defaults$7 = defaults_1$1;
2701
+ var transformData$3 = function transformData2(data2, headers, fns) {
2702
+ var context = this || defaults$7;
2703
+ utils$i.forEach(fns, function transform(fn) {
2740
2704
  data2 = fn.call(context, data2, headers);
2741
2705
  });
2742
2706
  return data2;
2743
2707
  };
2744
- var isCancel$1$1 = function isCancel2(value) {
2708
+ var isCancel$3 = function isCancel2(value) {
2745
2709
  return !!(value && value.__CANCEL__);
2746
2710
  };
2747
- var utils$3$1 = utils$d$1;
2748
- var transformData22 = transformData$1$1;
2749
- var isCancel22 = isCancel$1$1;
2750
- var defaults$1$1 = defaults_1$1;
2711
+ var utils$h = utils$r;
2712
+ var transformData$2 = transformData$3;
2713
+ var isCancel$2 = isCancel$3;
2714
+ var defaults$6 = defaults_1$1;
2751
2715
  function throwIfCancellationRequested$1(config) {
2752
2716
  if (config.cancelToken) {
2753
2717
  config.cancelToken.throwIfRequested();
2754
2718
  }
2755
2719
  }
2756
- var dispatchRequest$1$1 = function dispatchRequest2(config) {
2720
+ var dispatchRequest$3 = function dispatchRequest2(config) {
2757
2721
  throwIfCancellationRequested$1(config);
2758
2722
  config.headers = config.headers || {};
2759
- config.data = transformData22.call(config, config.data, config.headers, config.transformRequest);
2760
- config.headers = utils$3$1.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
2761
- utils$3$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
2723
+ config.data = transformData$2.call(config, config.data, config.headers, config.transformRequest);
2724
+ config.headers = utils$h.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
2725
+ utils$h.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
2762
2726
  delete config.headers[method];
2763
2727
  });
2764
- var adapter = config.adapter || defaults$1$1.adapter;
2728
+ var adapter = config.adapter || defaults$6.adapter;
2765
2729
  return adapter(config).then(function onAdapterResolution(response) {
2766
2730
  throwIfCancellationRequested$1(config);
2767
- response.data = transformData22.call(config, response.data, response.headers, config.transformResponse);
2731
+ response.data = transformData$2.call(config, response.data, response.headers, config.transformResponse);
2768
2732
  return response;
2769
2733
  }, function onAdapterRejection(reason) {
2770
- if (!isCancel22(reason)) {
2734
+ if (!isCancel$2(reason)) {
2771
2735
  throwIfCancellationRequested$1(config);
2772
2736
  if (reason && reason.response) {
2773
- reason.response.data = transformData22.call(config, reason.response.data, reason.response.headers, config.transformResponse);
2737
+ reason.response.data = transformData$2.call(config, reason.response.data, reason.response.headers, config.transformResponse);
2774
2738
  }
2775
2739
  }
2776
2740
  return Promise.reject(reason);
2777
2741
  });
2778
2742
  };
2779
- var utils$2$1 = utils$d$1;
2780
- var mergeConfig$2$1 = function mergeConfig2(config1, config2) {
2743
+ var utils$g = utils$r;
2744
+ var mergeConfig$5 = function mergeConfig2(config1, config2) {
2781
2745
  config2 = config2 || {};
2782
2746
  var config = {};
2783
2747
  var valueFromConfig2Keys = ["url", "method", "data"];
@@ -2808,37 +2772,37 @@ var mergeConfig$2$1 = function mergeConfig2(config1, config2) {
2808
2772
  "responseEncoding"
2809
2773
  ];
2810
2774
  var directMergeKeys = ["validateStatus"];
2811
- function getMergedValue(target, source22) {
2812
- if (utils$2$1.isPlainObject(target) && utils$2$1.isPlainObject(source22)) {
2813
- return utils$2$1.merge(target, source22);
2814
- } else if (utils$2$1.isPlainObject(source22)) {
2815
- return utils$2$1.merge({}, source22);
2816
- } else if (utils$2$1.isArray(source22)) {
2817
- return source22.slice();
2775
+ function getMergedValue(target, source4) {
2776
+ if (utils$g.isPlainObject(target) && utils$g.isPlainObject(source4)) {
2777
+ return utils$g.merge(target, source4);
2778
+ } else if (utils$g.isPlainObject(source4)) {
2779
+ return utils$g.merge({}, source4);
2780
+ } else if (utils$g.isArray(source4)) {
2781
+ return source4.slice();
2818
2782
  }
2819
- return source22;
2783
+ return source4;
2820
2784
  }
2821
2785
  function mergeDeepProperties(prop) {
2822
- if (!utils$2$1.isUndefined(config2[prop])) {
2786
+ if (!utils$g.isUndefined(config2[prop])) {
2823
2787
  config[prop] = getMergedValue(config1[prop], config2[prop]);
2824
- } else if (!utils$2$1.isUndefined(config1[prop])) {
2788
+ } else if (!utils$g.isUndefined(config1[prop])) {
2825
2789
  config[prop] = getMergedValue(void 0, config1[prop]);
2826
2790
  }
2827
2791
  }
2828
- utils$2$1.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
2829
- if (!utils$2$1.isUndefined(config2[prop])) {
2792
+ utils$g.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
2793
+ if (!utils$g.isUndefined(config2[prop])) {
2830
2794
  config[prop] = getMergedValue(void 0, config2[prop]);
2831
2795
  }
2832
2796
  });
2833
- utils$2$1.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
2834
- utils$2$1.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
2835
- if (!utils$2$1.isUndefined(config2[prop])) {
2797
+ utils$g.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
2798
+ utils$g.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
2799
+ if (!utils$g.isUndefined(config2[prop])) {
2836
2800
  config[prop] = getMergedValue(void 0, config2[prop]);
2837
- } else if (!utils$2$1.isUndefined(config1[prop])) {
2801
+ } else if (!utils$g.isUndefined(config1[prop])) {
2838
2802
  config[prop] = getMergedValue(void 0, config1[prop]);
2839
2803
  }
2840
2804
  });
2841
- utils$2$1.forEach(directMergeKeys, function merge2(prop) {
2805
+ utils$g.forEach(directMergeKeys, function merge2(prop) {
2842
2806
  if (prop in config2) {
2843
2807
  config[prop] = getMergedValue(config1[prop], config2[prop]);
2844
2808
  } else if (prop in config1) {
@@ -2849,7 +2813,7 @@ var mergeConfig$2$1 = function mergeConfig2(config1, config2) {
2849
2813
  var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
2850
2814
  return axiosKeys.indexOf(key) === -1;
2851
2815
  });
2852
- utils$2$1.forEach(otherKeys, mergeDeepProperties);
2816
+ utils$g.forEach(otherKeys, mergeDeepProperties);
2853
2817
  return config;
2854
2818
  };
2855
2819
  const name = "axios";
@@ -2955,9 +2919,9 @@ var require$$0 = {
2955
2919
  bundlesize
2956
2920
  };
2957
2921
  var pkg = require$$0;
2958
- var validators$1$1 = {};
2922
+ var validators$3 = {};
2959
2923
  ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
2960
- validators$1$1[type] = function validator2(thing) {
2924
+ validators$3[type] = function validator2(thing) {
2961
2925
  return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
2962
2926
  };
2963
2927
  });
@@ -2975,7 +2939,7 @@ function isOlderVersion(version2, thanVersion) {
2975
2939
  }
2976
2940
  return false;
2977
2941
  }
2978
- validators$1$1.transitional = function transitional2(validator2, version2, message) {
2942
+ validators$3.transitional = function transitional2(validator2, version2, message) {
2979
2943
  var isDeprecated = version2 && isOlderVersion(version2);
2980
2944
  function formatMessage(opt, desc) {
2981
2945
  return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
@@ -3013,33 +2977,33 @@ function assertOptions$1(options, schema, allowUnknown) {
3013
2977
  }
3014
2978
  }
3015
2979
  }
3016
- var validator$1$1 = {
2980
+ var validator$3 = {
3017
2981
  isOlderVersion,
3018
2982
  assertOptions: assertOptions$1,
3019
- validators: validators$1$1
2983
+ validators: validators$3
3020
2984
  };
3021
- var utils$1$1 = utils$d$1;
3022
- var buildURL22 = buildURL$2$1;
2985
+ var utils$f = utils$r;
2986
+ var buildURL$3 = buildURL$5;
3023
2987
  var InterceptorManager$2 = InterceptorManager_1$1;
3024
- var dispatchRequest22 = dispatchRequest$1$1;
3025
- var mergeConfig$1$1 = mergeConfig$2$1;
3026
- var validator$2 = validator$1$1;
2988
+ var dispatchRequest$2 = dispatchRequest$3;
2989
+ var mergeConfig$4 = mergeConfig$5;
2990
+ var validator$2 = validator$3;
3027
2991
  var validators$2 = validator$2.validators;
3028
- function Axios$1$1(instanceConfig) {
2992
+ function Axios$3(instanceConfig) {
3029
2993
  this.defaults = instanceConfig;
3030
2994
  this.interceptors = {
3031
2995
  request: new InterceptorManager$2(),
3032
2996
  response: new InterceptorManager$2()
3033
2997
  };
3034
2998
  }
3035
- Axios$1$1.prototype.request = function request2(config) {
2999
+ Axios$3.prototype.request = function request2(config) {
3036
3000
  if (typeof config === "string") {
3037
3001
  config = arguments[1] || {};
3038
3002
  config.url = arguments[0];
3039
3003
  } else {
3040
3004
  config = config || {};
3041
3005
  }
3042
- config = mergeConfig$1$1(this.defaults, config);
3006
+ config = mergeConfig$4(this.defaults, config);
3043
3007
  if (config.method) {
3044
3008
  config.method = config.method.toLowerCase();
3045
3009
  } else if (this.defaults.method) {
@@ -3047,9 +3011,9 @@ Axios$1$1.prototype.request = function request2(config) {
3047
3011
  } else {
3048
3012
  config.method = "get";
3049
3013
  }
3050
- var transitional22 = config.transitional;
3051
- if (transitional22 !== void 0) {
3052
- validator$2.assertOptions(transitional22, {
3014
+ var transitional4 = config.transitional;
3015
+ if (transitional4 !== void 0) {
3016
+ validator$2.assertOptions(transitional4, {
3053
3017
  silentJSONParsing: validators$2.transitional(validators$2.boolean, "1.0.0"),
3054
3018
  forcedJSONParsing: validators$2.transitional(validators$2.boolean, "1.0.0"),
3055
3019
  clarifyTimeoutError: validators$2.transitional(validators$2.boolean, "1.0.0")
@@ -3070,7 +3034,7 @@ Axios$1$1.prototype.request = function request2(config) {
3070
3034
  });
3071
3035
  var promise;
3072
3036
  if (!synchronousRequestInterceptors) {
3073
- var chain = [dispatchRequest22, void 0];
3037
+ var chain = [dispatchRequest$2, void 0];
3074
3038
  Array.prototype.unshift.apply(chain, requestInterceptorChain);
3075
3039
  chain = chain.concat(responseInterceptorChain);
3076
3040
  promise = Promise.resolve(config);
@@ -3091,7 +3055,7 @@ Axios$1$1.prototype.request = function request2(config) {
3091
3055
  }
3092
3056
  }
3093
3057
  try {
3094
- promise = dispatchRequest22(newConfig);
3058
+ promise = dispatchRequest$2(newConfig);
3095
3059
  } catch (error) {
3096
3060
  return Promise.reject(error);
3097
3061
  }
@@ -3100,37 +3064,37 @@ Axios$1$1.prototype.request = function request2(config) {
3100
3064
  }
3101
3065
  return promise;
3102
3066
  };
3103
- Axios$1$1.prototype.getUri = function getUri2(config) {
3104
- config = mergeConfig$1$1(this.defaults, config);
3105
- return buildURL22(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
3067
+ Axios$3.prototype.getUri = function getUri2(config) {
3068
+ config = mergeConfig$4(this.defaults, config);
3069
+ return buildURL$3(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
3106
3070
  };
3107
- utils$1$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData22(method) {
3108
- Axios$1$1.prototype[method] = function(url, config) {
3109
- return this.request(mergeConfig$1$1(config || {}, {
3071
+ utils$f.forEach(["delete", "get", "head", "options"], function forEachMethodNoData4(method) {
3072
+ Axios$3.prototype[method] = function(url, config) {
3073
+ return this.request(mergeConfig$4(config || {}, {
3110
3074
  method,
3111
3075
  url,
3112
3076
  data: (config || {}).data
3113
3077
  }));
3114
3078
  };
3115
3079
  });
3116
- utils$1$1.forEach(["post", "put", "patch"], function forEachMethodWithData22(method) {
3117
- Axios$1$1.prototype[method] = function(url, data2, config) {
3118
- return this.request(mergeConfig$1$1(config || {}, {
3080
+ utils$f.forEach(["post", "put", "patch"], function forEachMethodWithData4(method) {
3081
+ Axios$3.prototype[method] = function(url, data2, config) {
3082
+ return this.request(mergeConfig$4(config || {}, {
3119
3083
  method,
3120
3084
  url,
3121
3085
  data: data2
3122
3086
  }));
3123
3087
  };
3124
3088
  });
3125
- var Axios_1$1 = Axios$1$1;
3126
- function Cancel$1$1(message) {
3089
+ var Axios_1$1 = Axios$3;
3090
+ function Cancel$5(message) {
3127
3091
  this.message = message;
3128
3092
  }
3129
- Cancel$1$1.prototype.toString = function toString22() {
3093
+ Cancel$5.prototype.toString = function toString2() {
3130
3094
  return "Cancel" + (this.message ? ": " + this.message : "");
3131
3095
  };
3132
- Cancel$1$1.prototype.__CANCEL__ = true;
3133
- var Cancel_1$1 = Cancel$1$1;
3096
+ Cancel$5.prototype.__CANCEL__ = true;
3097
+ var Cancel_1$1 = Cancel$5;
3134
3098
  var Cancel$4 = Cancel_1$1;
3135
3099
  function CancelToken$1(executor) {
3136
3100
  if (typeof executor !== "function") {
@@ -3165,42 +3129,42 @@ CancelToken$1.source = function source2() {
3165
3129
  };
3166
3130
  };
3167
3131
  var CancelToken_1$1 = CancelToken$1;
3168
- var spread$1 = function spread22(callback) {
3132
+ var spread$1 = function spread2(callback) {
3169
3133
  return function wrap(arr) {
3170
3134
  return callback.apply(null, arr);
3171
3135
  };
3172
3136
  };
3173
- var isAxiosError$1 = function isAxiosError22(payload) {
3137
+ var isAxiosError$1 = function isAxiosError2(payload) {
3174
3138
  return typeof payload === "object" && payload.isAxiosError === true;
3175
3139
  };
3176
- var utils$e = utils$d$1;
3177
- var bind22 = bind$2$1;
3140
+ var utils$e = utils$r;
3141
+ var bind$3 = bind$5;
3178
3142
  var Axios$2 = Axios_1$1;
3179
- var mergeConfig22 = mergeConfig$2$1;
3143
+ var mergeConfig$3 = mergeConfig$5;
3180
3144
  var defaults$5 = defaults_1$1;
3181
3145
  function createInstance$1(defaultConfig) {
3182
3146
  var context = new Axios$2(defaultConfig);
3183
- var instance = bind22(Axios$2.prototype.request, context);
3147
+ var instance = bind$3(Axios$2.prototype.request, context);
3184
3148
  utils$e.extend(instance, Axios$2.prototype, context);
3185
3149
  utils$e.extend(instance, context);
3186
3150
  return instance;
3187
3151
  }
3188
- var axios$1$1 = createInstance$1(defaults$5);
3189
- axios$1$1.Axios = Axios$2;
3190
- axios$1$1.create = function create(instanceConfig) {
3191
- return createInstance$1(mergeConfig22(axios$1$1.defaults, instanceConfig));
3152
+ var axios$4 = createInstance$1(defaults$5);
3153
+ axios$4.Axios = Axios$2;
3154
+ axios$4.create = function create(instanceConfig) {
3155
+ return createInstance$1(mergeConfig$3(axios$4.defaults, instanceConfig));
3192
3156
  };
3193
- axios$1$1.Cancel = Cancel_1$1;
3194
- axios$1$1.CancelToken = CancelToken_1$1;
3195
- axios$1$1.isCancel = isCancel$1$1;
3196
- axios$1$1.all = function all2(promises) {
3157
+ axios$4.Cancel = Cancel_1$1;
3158
+ axios$4.CancelToken = CancelToken_1$1;
3159
+ axios$4.isCancel = isCancel$3;
3160
+ axios$4.all = function all2(promises) {
3197
3161
  return Promise.all(promises);
3198
3162
  };
3199
- axios$1$1.spread = spread$1;
3200
- axios$1$1.isAxiosError = isAxiosError$1;
3201
- axios$2$1.exports = axios$1$1;
3202
- axios$2$1.exports.default = axios$1$1;
3203
- var axios$3 = axios$2$1.exports;
3163
+ axios$4.spread = spread$1;
3164
+ axios$4.isAxiosError = isAxiosError$1;
3165
+ axios$5.exports = axios$4;
3166
+ axios$5.exports.default = axios$4;
3167
+ var axios$3 = axios$5.exports;
3204
3168
  class HasuraStorageApi {
3205
3169
  constructor({ url }) {
3206
3170
  this.url = url;
@@ -3211,7 +3175,7 @@ class HasuraStorageApi {
3211
3175
  async upload(params) {
3212
3176
  try {
3213
3177
  const res = await this.httpClient.post("/files", params.file, {
3214
- headers: __spreadValues2(__spreadValues2({}, this.generateUploadHeaders(params)), this.generateAuthHeaders())
3178
+ headers: __spreadValues(__spreadValues({}, this.generateUploadHeaders(params)), this.generateAuthHeaders())
3215
3179
  });
3216
3180
  return { fileMetadata: res.data, error: null };
3217
3181
  } catch (error) {
@@ -3222,7 +3186,7 @@ class HasuraStorageApi {
3222
3186
  try {
3223
3187
  const { fileId } = params;
3224
3188
  const res = await this.httpClient.get(`/files/${fileId}/presignedurl`, {
3225
- headers: __spreadValues2({}, this.generateAuthHeaders())
3189
+ headers: __spreadValues({}, this.generateAuthHeaders())
3226
3190
  });
3227
3191
  return { presignedUrl: res.data, error: null };
3228
3192
  } catch (error) {
@@ -3233,7 +3197,7 @@ class HasuraStorageApi {
3233
3197
  try {
3234
3198
  const { fileId } = params;
3235
3199
  await this.httpClient.delete(`/files/${fileId}`, {
3236
- headers: __spreadValues2({}, this.generateAuthHeaders())
3200
+ headers: __spreadValues({}, this.generateAuthHeaders())
3237
3201
  });
3238
3202
  return { error: null };
3239
3203
  } catch (error) {
@@ -3274,7 +3238,7 @@ class HasuraStorageClient {
3274
3238
  async upload(params) {
3275
3239
  const file = new FormData();
3276
3240
  file.append("file", params.file);
3277
- const { fileMetadata, error } = await this.api.upload(__spreadProps2(__spreadValues2({}, params), {
3241
+ const { fileMetadata, error } = await this.api.upload(__spreadProps(__spreadValues({}, params), {
3278
3242
  file
3279
3243
  }));
3280
3244
  if (error) {
@@ -3321,9 +3285,9 @@ var bind$2 = function bind3(fn, thisArg) {
3321
3285
  };
3322
3286
  };
3323
3287
  var bind$1 = bind$2;
3324
- var toString = Object.prototype.toString;
3288
+ var toString3 = Object.prototype.toString;
3325
3289
  function isArray(val) {
3326
- return toString.call(val) === "[object Array]";
3290
+ return toString3.call(val) === "[object Array]";
3327
3291
  }
3328
3292
  function isUndefined(val) {
3329
3293
  return typeof val === "undefined";
@@ -3332,7 +3296,7 @@ function isBuffer(val) {
3332
3296
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
3333
3297
  }
3334
3298
  function isArrayBuffer(val) {
3335
- return toString.call(val) === "[object ArrayBuffer]";
3299
+ return toString3.call(val) === "[object ArrayBuffer]";
3336
3300
  }
3337
3301
  function isFormData(val) {
3338
3302
  return typeof FormData !== "undefined" && val instanceof FormData;
@@ -3356,23 +3320,23 @@ function isObject(val) {
3356
3320
  return val !== null && typeof val === "object";
3357
3321
  }
3358
3322
  function isPlainObject(val) {
3359
- if (toString.call(val) !== "[object Object]") {
3323
+ if (toString3.call(val) !== "[object Object]") {
3360
3324
  return false;
3361
3325
  }
3362
3326
  var prototype = Object.getPrototypeOf(val);
3363
3327
  return prototype === null || prototype === Object.prototype;
3364
3328
  }
3365
3329
  function isDate(val) {
3366
- return toString.call(val) === "[object Date]";
3330
+ return toString3.call(val) === "[object Date]";
3367
3331
  }
3368
3332
  function isFile(val) {
3369
- return toString.call(val) === "[object File]";
3333
+ return toString3.call(val) === "[object File]";
3370
3334
  }
3371
3335
  function isBlob(val) {
3372
- return toString.call(val) === "[object Blob]";
3336
+ return toString3.call(val) === "[object Blob]";
3373
3337
  }
3374
3338
  function isFunction(val) {
3375
- return toString.call(val) === "[object Function]";
3339
+ return toString3.call(val) === "[object Function]";
3376
3340
  }
3377
3341
  function isStream(val) {
3378
3342
  return isObject(val) && isFunction(val.pipe);
@@ -3389,7 +3353,7 @@ function isStandardBrowserEnv() {
3389
3353
  }
3390
3354
  return typeof window !== "undefined" && typeof document !== "undefined";
3391
3355
  }
3392
- function forEach(obj, fn) {
3356
+ function forEach3(obj, fn) {
3393
3357
  if (obj === null || typeof obj === "undefined") {
3394
3358
  return;
3395
3359
  }
@@ -3422,12 +3386,12 @@ function merge() {
3422
3386
  }
3423
3387
  }
3424
3388
  for (var i = 0, l = arguments.length; i < l; i++) {
3425
- forEach(arguments[i], assignValue);
3389
+ forEach3(arguments[i], assignValue);
3426
3390
  }
3427
3391
  return result;
3428
3392
  }
3429
3393
  function extend(a, b, thisArg) {
3430
- forEach(b, function assignValue(val, key) {
3394
+ forEach3(b, function assignValue(val, key) {
3431
3395
  if (thisArg && typeof val === "function") {
3432
3396
  a[key] = bind$1(val, thisArg);
3433
3397
  } else {
@@ -3460,7 +3424,7 @@ var utils$d = {
3460
3424
  isStream,
3461
3425
  isURLSearchParams,
3462
3426
  isStandardBrowserEnv,
3463
- forEach,
3427
+ forEach: forEach3,
3464
3428
  merge,
3465
3429
  extend,
3466
3430
  trim,
@@ -3528,7 +3492,7 @@ InterceptorManager$1.prototype.eject = function eject3(id) {
3528
3492
  this.handlers[id] = null;
3529
3493
  }
3530
3494
  };
3531
- InterceptorManager$1.prototype.forEach = function forEach3(fn) {
3495
+ InterceptorManager$1.prototype.forEach = function forEach4(fn) {
3532
3496
  utils$b.forEach(this.handlers, function forEachHandler(h) {
3533
3497
  if (h !== null) {
3534
3498
  fn(h);
@@ -3585,7 +3549,7 @@ var settle$1 = function settle3(resolve, reject, response) {
3585
3549
  }
3586
3550
  };
3587
3551
  var utils$9 = utils$d;
3588
- var cookies$1 = utils$9.isStandardBrowserEnv() ? function standardBrowserEnv4() {
3552
+ var cookies$1 = utils$9.isStandardBrowserEnv() ? function standardBrowserEnv5() {
3589
3553
  return {
3590
3554
  write: function write(name2, value, expires, path, domain, secure) {
3591
3555
  var cookie = [];
@@ -3612,7 +3576,7 @@ var cookies$1 = utils$9.isStandardBrowserEnv() ? function standardBrowserEnv4()
3612
3576
  this.write(name2, "", Date.now() - 864e5);
3613
3577
  }
3614
3578
  };
3615
- }() : function nonStandardBrowserEnv4() {
3579
+ }() : function nonStandardBrowserEnv5() {
3616
3580
  return {
3617
3581
  write: function write() {
3618
3582
  },
@@ -3683,7 +3647,7 @@ var parseHeaders$1 = function parseHeaders3(headers) {
3683
3647
  return parsed;
3684
3648
  };
3685
3649
  var utils$7 = utils$d;
3686
- var isURLSameOrigin$1 = utils$7.isStandardBrowserEnv() ? function standardBrowserEnv5() {
3650
+ var isURLSameOrigin$1 = utils$7.isStandardBrowserEnv() ? function standardBrowserEnv6() {
3687
3651
  var msie = /(msie|trident)/i.test(navigator.userAgent);
3688
3652
  var urlParsingNode = document.createElement("a");
3689
3653
  var originURL;
@@ -3710,7 +3674,7 @@ var isURLSameOrigin$1 = utils$7.isStandardBrowserEnv() ? function standardBrowse
3710
3674
  var parsed = utils$7.isString(requestURL) ? resolveURL(requestURL) : requestURL;
3711
3675
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
3712
3676
  };
3713
- }() : function nonStandardBrowserEnv5() {
3677
+ }() : function nonStandardBrowserEnv6() {
3714
3678
  return function isURLSameOrigin2() {
3715
3679
  return true;
3716
3680
  };
@@ -3718,7 +3682,7 @@ var isURLSameOrigin$1 = utils$7.isStandardBrowserEnv() ? function standardBrowse
3718
3682
  function Cancel$3(message) {
3719
3683
  this.message = message;
3720
3684
  }
3721
- Cancel$3.prototype.toString = function toString3() {
3685
+ Cancel$3.prototype.toString = function toString4() {
3722
3686
  return "Cancel" + (this.message ? ": " + this.message : "");
3723
3687
  };
3724
3688
  Cancel$3.prototype.__CANCEL__ = true;
@@ -3954,10 +3918,10 @@ var defaults$3 = {
3954
3918
  }
3955
3919
  }
3956
3920
  };
3957
- utils$5.forEach(["delete", "get", "head"], function forEachMethodNoData4(method) {
3921
+ utils$5.forEach(["delete", "get", "head"], function forEachMethodNoData5(method) {
3958
3922
  defaults$3.headers[method] = {};
3959
3923
  });
3960
- utils$5.forEach(["post", "put", "patch"], function forEachMethodWithData4(method) {
3924
+ utils$5.forEach(["post", "put", "patch"], function forEachMethodWithData5(method) {
3961
3925
  defaults$3.headers[method] = utils$5.merge(DEFAULT_CONTENT_TYPE);
3962
3926
  });
3963
3927
  var defaults_1 = defaults$3;
@@ -4222,7 +4186,7 @@ Axios$1.prototype.getUri = function getUri3(config) {
4222
4186
  config = mergeConfig$1(this.defaults, config);
4223
4187
  return buildURL4(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
4224
4188
  };
4225
- utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData5(method) {
4189
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData6(method) {
4226
4190
  Axios$1.prototype[method] = function(url, config) {
4227
4191
  return this.request(mergeConfig$1(config || {}, {
4228
4192
  method,
@@ -4231,7 +4195,7 @@ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
4231
4195
  }));
4232
4196
  };
4233
4197
  });
4234
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData5(method) {
4198
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData6(method) {
4235
4199
  Axios$1.prototype[method] = function(url, data2, config) {
4236
4200
  return this.request(mergeConfig$1(config || {}, {
4237
4201
  method,
@@ -4316,12 +4280,12 @@ CancelToken.source = function source3() {
4316
4280
  };
4317
4281
  };
4318
4282
  var CancelToken_1 = CancelToken;
4319
- var spread = function spread3(callback) {
4283
+ var spread3 = function spread4(callback) {
4320
4284
  return function wrap(arr) {
4321
4285
  return callback.apply(null, arr);
4322
4286
  };
4323
4287
  };
4324
- var isAxiosError = function isAxiosError3(payload) {
4288
+ var isAxiosError3 = function isAxiosError4(payload) {
4325
4289
  return typeof payload === "object" && payload.isAxiosError === true;
4326
4290
  };
4327
4291
  var utils = utils$d;
@@ -4348,8 +4312,8 @@ axios$1.VERSION = data.version;
4348
4312
  axios$1.all = function all3(promises) {
4349
4313
  return Promise.all(promises);
4350
4314
  };
4351
- axios$1.spread = spread;
4352
- axios$1.isAxiosError = isAxiosError;
4315
+ axios$1.spread = spread3;
4316
+ axios$1.isAxiosError = isAxiosError3;
4353
4317
  axios$2.exports = axios$1;
4354
4318
  axios$2.exports.default = axios$1;
4355
4319
  var axios = axios$2.exports;