@bigbinary/neeto-webhooks-frontend 2.2.1 → 2.2.2

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.
@@ -1,4 +1,5 @@
1
1
  import { useRouteMatch, useHistory, useParams, Switch as Switch$1, Route } from 'react-router-dom';
2
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
3
  import { isPresent, removeBy, isNotEmpty, removeById, findBy } from '@bigbinary/neeto-cist';
3
4
  import { DEFAULT_STALE_TIME, SINGULAR, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX, PLURAL } from '@bigbinary/neeto-commons-frontend/constants';
4
5
  import { useQueryParams, useMutationWithInvalidation, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
@@ -10,14 +11,18 @@ import NoData from '@bigbinary/neetoui/NoData';
10
11
  import Spinner from '@bigbinary/neetoui/Spinner';
11
12
  import Table from '@bigbinary/neetoui/Table';
12
13
  import { useTranslation } from 'react-i18next';
14
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
13
15
  import { QueryClient, QueryCache, QueryClientProvider, useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
14
16
  import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
15
17
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
18
  import axios from 'axios';
17
19
  import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
20
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
21
+ import _regeneratorRuntime from '@babel/runtime/regenerator';
18
22
  import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
19
23
  import Button from '@bigbinary/neetoui/Button';
20
24
  import Pane from '@bigbinary/neetoui/Pane';
25
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
21
26
  import { useState, useRef, useEffect, memo, useCallback } from 'react';
22
27
  import Typography from '@bigbinary/neetoui/Typography';
23
28
  import Tab from '@bigbinary/neetoui/Tab';
@@ -43,78 +48,6 @@ var getDeliveryDetailsPath = function getDeliveryDetailsPath(deliveriesPath) {
43
48
  return "".concat(deliveriesPath, "/:deliveryId/");
44
49
  };
45
50
 
46
- function _arrayLikeToArray(arr, len) {
47
- if (len == null || len > arr.length) len = arr.length;
48
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
49
- return arr2;
50
- }
51
-
52
- function _arrayWithoutHoles(arr) {
53
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
54
- }
55
-
56
- function _iterableToArray(iter) {
57
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
58
- }
59
-
60
- function _unsupportedIterableToArray(o, minLen) {
61
- if (!o) return;
62
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
63
- var n = Object.prototype.toString.call(o).slice(8, -1);
64
- if (n === "Object" && o.constructor) n = o.constructor.name;
65
- if (n === "Map" || n === "Set") return Array.from(o);
66
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
67
- }
68
-
69
- function _nonIterableSpread() {
70
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
71
- }
72
-
73
- function _toConsumableArray(arr) {
74
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
75
- }
76
-
77
- function _typeof$1(o) {
78
- "@babel/helpers - typeof";
79
-
80
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
81
- return typeof o;
82
- } : function (o) {
83
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
84
- }, _typeof$1(o);
85
- }
86
-
87
- function _toPrimitive(input, hint) {
88
- if (_typeof$1(input) !== "object" || input === null) return input;
89
- var prim = input[Symbol.toPrimitive];
90
- if (prim !== undefined) {
91
- var res = prim.call(input, hint || "default");
92
- if (_typeof$1(res) !== "object") return res;
93
- throw new TypeError("@@toPrimitive must return a primitive value.");
94
- }
95
- return (hint === "string" ? String : Number)(input);
96
- }
97
-
98
- function _toPropertyKey(arg) {
99
- var key = _toPrimitive(arg, "string");
100
- return _typeof$1(key) === "symbol" ? key : String(key);
101
- }
102
-
103
- function _defineProperty(obj, key, value) {
104
- key = _toPropertyKey(key);
105
- if (key in obj) {
106
- Object.defineProperty(obj, key, {
107
- value: value,
108
- enumerable: true,
109
- configurable: true,
110
- writable: true
111
- });
112
- } else {
113
- obj[key] = value;
114
- }
115
- return obj;
116
- }
117
-
118
51
  var queryClient = new QueryClient({
119
52
  queryCache: new QueryCache(),
120
53
  defaultOptions: {
@@ -209,430 +142,6 @@ var HELP_LINK_URLS = {
209
142
  deliveries: "https://help.".concat(globalProps.appName, ".com/articles/managing-webhook-deliveries")
210
143
  };
211
144
 
212
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
213
- try {
214
- var info = gen[key](arg);
215
- var value = info.value;
216
- } catch (error) {
217
- reject(error);
218
- return;
219
- }
220
- if (info.done) {
221
- resolve(value);
222
- } else {
223
- Promise.resolve(value).then(_next, _throw);
224
- }
225
- }
226
- function _asyncToGenerator(fn) {
227
- return function () {
228
- var self = this,
229
- args = arguments;
230
- return new Promise(function (resolve, reject) {
231
- var gen = fn.apply(self, args);
232
- function _next(value) {
233
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
234
- }
235
- function _throw(err) {
236
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
237
- }
238
- _next(undefined);
239
- });
240
- };
241
- }
242
-
243
- function getDefaultExportFromCjs (x) {
244
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
245
- }
246
-
247
- var regeneratorRuntime$1 = {exports: {}};
248
-
249
- var _typeof = {exports: {}};
250
-
251
- _typeof.exports;
252
-
253
- (function (module) {
254
- function _typeof(o) {
255
- "@babel/helpers - typeof";
256
-
257
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
258
- return typeof o;
259
- } : function (o) {
260
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
261
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
262
- }
263
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
264
- } (_typeof));
265
-
266
- var _typeofExports = _typeof.exports;
267
-
268
- regeneratorRuntime$1.exports;
269
-
270
- (function (module) {
271
- var _typeof = _typeofExports["default"];
272
- function _regeneratorRuntime() {
273
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
274
- return e;
275
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
276
- var t,
277
- e = {},
278
- r = Object.prototype,
279
- n = r.hasOwnProperty,
280
- o = Object.defineProperty || function (t, e, r) {
281
- t[e] = r.value;
282
- },
283
- i = "function" == typeof Symbol ? Symbol : {},
284
- a = i.iterator || "@@iterator",
285
- c = i.asyncIterator || "@@asyncIterator",
286
- u = i.toStringTag || "@@toStringTag";
287
- function define(t, e, r) {
288
- return Object.defineProperty(t, e, {
289
- value: r,
290
- enumerable: !0,
291
- configurable: !0,
292
- writable: !0
293
- }), t[e];
294
- }
295
- try {
296
- define({}, "");
297
- } catch (t) {
298
- define = function define(t, e, r) {
299
- return t[e] = r;
300
- };
301
- }
302
- function wrap(t, e, r, n) {
303
- var i = e && e.prototype instanceof Generator ? e : Generator,
304
- a = Object.create(i.prototype),
305
- c = new Context(n || []);
306
- return o(a, "_invoke", {
307
- value: makeInvokeMethod(t, r, c)
308
- }), a;
309
- }
310
- function tryCatch(t, e, r) {
311
- try {
312
- return {
313
- type: "normal",
314
- arg: t.call(e, r)
315
- };
316
- } catch (t) {
317
- return {
318
- type: "throw",
319
- arg: t
320
- };
321
- }
322
- }
323
- e.wrap = wrap;
324
- var h = "suspendedStart",
325
- l = "suspendedYield",
326
- f = "executing",
327
- s = "completed",
328
- y = {};
329
- function Generator() {}
330
- function GeneratorFunction() {}
331
- function GeneratorFunctionPrototype() {}
332
- var p = {};
333
- define(p, a, function () {
334
- return this;
335
- });
336
- var d = Object.getPrototypeOf,
337
- v = d && d(d(values([])));
338
- v && v !== r && n.call(v, a) && (p = v);
339
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
340
- function defineIteratorMethods(t) {
341
- ["next", "throw", "return"].forEach(function (e) {
342
- define(t, e, function (t) {
343
- return this._invoke(e, t);
344
- });
345
- });
346
- }
347
- function AsyncIterator(t, e) {
348
- function invoke(r, o, i, a) {
349
- var c = tryCatch(t[r], t, o);
350
- if ("throw" !== c.type) {
351
- var u = c.arg,
352
- h = u.value;
353
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
354
- invoke("next", t, i, a);
355
- }, function (t) {
356
- invoke("throw", t, i, a);
357
- }) : e.resolve(h).then(function (t) {
358
- u.value = t, i(u);
359
- }, function (t) {
360
- return invoke("throw", t, i, a);
361
- });
362
- }
363
- a(c.arg);
364
- }
365
- var r;
366
- o(this, "_invoke", {
367
- value: function value(t, n) {
368
- function callInvokeWithMethodAndArg() {
369
- return new e(function (e, r) {
370
- invoke(t, n, e, r);
371
- });
372
- }
373
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
374
- }
375
- });
376
- }
377
- function makeInvokeMethod(e, r, n) {
378
- var o = h;
379
- return function (i, a) {
380
- if (o === f) throw new Error("Generator is already running");
381
- if (o === s) {
382
- if ("throw" === i) throw a;
383
- return {
384
- value: t,
385
- done: !0
386
- };
387
- }
388
- for (n.method = i, n.arg = a;;) {
389
- var c = n.delegate;
390
- if (c) {
391
- var u = maybeInvokeDelegate(c, n);
392
- if (u) {
393
- if (u === y) continue;
394
- return u;
395
- }
396
- }
397
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
398
- if (o === h) throw o = s, n.arg;
399
- n.dispatchException(n.arg);
400
- } else "return" === n.method && n.abrupt("return", n.arg);
401
- o = f;
402
- var p = tryCatch(e, r, n);
403
- if ("normal" === p.type) {
404
- if (o = n.done ? s : l, p.arg === y) continue;
405
- return {
406
- value: p.arg,
407
- done: n.done
408
- };
409
- }
410
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
411
- }
412
- };
413
- }
414
- function maybeInvokeDelegate(e, r) {
415
- var n = r.method,
416
- o = e.iterator[n];
417
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
418
- var i = tryCatch(o, e.iterator, r.arg);
419
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
420
- var a = i.arg;
421
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
422
- }
423
- function pushTryEntry(t) {
424
- var e = {
425
- tryLoc: t[0]
426
- };
427
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
428
- }
429
- function resetTryEntry(t) {
430
- var e = t.completion || {};
431
- e.type = "normal", delete e.arg, t.completion = e;
432
- }
433
- function Context(t) {
434
- this.tryEntries = [{
435
- tryLoc: "root"
436
- }], t.forEach(pushTryEntry, this), this.reset(!0);
437
- }
438
- function values(e) {
439
- if (e || "" === e) {
440
- var r = e[a];
441
- if (r) return r.call(e);
442
- if ("function" == typeof e.next) return e;
443
- if (!isNaN(e.length)) {
444
- var o = -1,
445
- i = function next() {
446
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
447
- return next.value = t, next.done = !0, next;
448
- };
449
- return i.next = i;
450
- }
451
- }
452
- throw new TypeError(_typeof(e) + " is not iterable");
453
- }
454
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
455
- value: GeneratorFunctionPrototype,
456
- configurable: !0
457
- }), o(GeneratorFunctionPrototype, "constructor", {
458
- value: GeneratorFunction,
459
- configurable: !0
460
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
461
- var e = "function" == typeof t && t.constructor;
462
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
463
- }, e.mark = function (t) {
464
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
465
- }, e.awrap = function (t) {
466
- return {
467
- __await: t
468
- };
469
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
470
- return this;
471
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
472
- void 0 === i && (i = Promise);
473
- var a = new AsyncIterator(wrap(t, r, n, o), i);
474
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
475
- return t.done ? t.value : a.next();
476
- });
477
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
478
- return this;
479
- }), define(g, "toString", function () {
480
- return "[object Generator]";
481
- }), e.keys = function (t) {
482
- var e = Object(t),
483
- r = [];
484
- for (var n in e) r.push(n);
485
- return r.reverse(), function next() {
486
- for (; r.length;) {
487
- var t = r.pop();
488
- if (t in e) return next.value = t, next.done = !1, next;
489
- }
490
- return next.done = !0, next;
491
- };
492
- }, e.values = values, Context.prototype = {
493
- constructor: Context,
494
- reset: function reset(e) {
495
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
496
- },
497
- stop: function stop() {
498
- this.done = !0;
499
- var t = this.tryEntries[0].completion;
500
- if ("throw" === t.type) throw t.arg;
501
- return this.rval;
502
- },
503
- dispatchException: function dispatchException(e) {
504
- if (this.done) throw e;
505
- var r = this;
506
- function handle(n, o) {
507
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
508
- }
509
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
510
- var i = this.tryEntries[o],
511
- a = i.completion;
512
- if ("root" === i.tryLoc) return handle("end");
513
- if (i.tryLoc <= this.prev) {
514
- var c = n.call(i, "catchLoc"),
515
- u = n.call(i, "finallyLoc");
516
- if (c && u) {
517
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
518
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
519
- } else if (c) {
520
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
521
- } else {
522
- if (!u) throw new Error("try statement without catch or finally");
523
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
524
- }
525
- }
526
- }
527
- },
528
- abrupt: function abrupt(t, e) {
529
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
530
- var o = this.tryEntries[r];
531
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
532
- var i = o;
533
- break;
534
- }
535
- }
536
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
537
- var a = i ? i.completion : {};
538
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
539
- },
540
- complete: function complete(t, e) {
541
- if ("throw" === t.type) throw t.arg;
542
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
543
- },
544
- finish: function finish(t) {
545
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
546
- var r = this.tryEntries[e];
547
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
548
- }
549
- },
550
- "catch": function _catch(t) {
551
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
552
- var r = this.tryEntries[e];
553
- if (r.tryLoc === t) {
554
- var n = r.completion;
555
- if ("throw" === n.type) {
556
- var o = n.arg;
557
- resetTryEntry(r);
558
- }
559
- return o;
560
- }
561
- }
562
- throw new Error("illegal catch attempt");
563
- },
564
- delegateYield: function delegateYield(e, r, n) {
565
- return this.delegate = {
566
- iterator: values(e),
567
- resultName: r,
568
- nextLoc: n
569
- }, "next" === this.method && (this.arg = t), y;
570
- }
571
- }, e;
572
- }
573
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
574
- } (regeneratorRuntime$1));
575
-
576
- var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
577
-
578
- // TODO(Babel 8): Remove this file.
579
-
580
- var runtime = regeneratorRuntimeExports();
581
- var regenerator = runtime;
582
-
583
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
584
- try {
585
- regeneratorRuntime = runtime;
586
- } catch (accidentalStrictMode) {
587
- if (typeof globalThis === "object") {
588
- globalThis.regeneratorRuntime = runtime;
589
- } else {
590
- Function("r", "regeneratorRuntime = r")(runtime);
591
- }
592
- }
593
-
594
- var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
595
-
596
- function _arrayWithHoles(arr) {
597
- if (Array.isArray(arr)) return arr;
598
- }
599
-
600
- function _iterableToArrayLimit(r, l) {
601
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
602
- if (null != t) {
603
- var e,
604
- n,
605
- i,
606
- u,
607
- a = [],
608
- f = !0,
609
- o = !1;
610
- try {
611
- if (i = (t = t.call(r)).next, 0 === l) {
612
- if (Object(t) !== t) return;
613
- f = !1;
614
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
615
- } catch (r) {
616
- o = !0, n = r;
617
- } finally {
618
- try {
619
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
620
- } finally {
621
- if (o) throw n;
622
- }
623
- }
624
- return a;
625
- }
626
- }
627
-
628
- function _nonIterableRest() {
629
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
630
- }
631
-
632
- function _slicedToArray(arr, i) {
633
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
634
- }
635
-
636
145
  var DELIVERY_TAB = {
637
146
  response: "response",
638
147
  request: "request"
@@ -776,7 +285,7 @@ var Details = function Details(_ref) {
776
285
  _useShowDelivery$data2 = _useShowDelivery$data === void 0 ? {} : _useShowDelivery$data,
777
286
  delivery = _useShowDelivery$data2.delivery;
778
287
  var handleRedeliverClick = /*#__PURE__*/function () {
779
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
288
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
780
289
  return _regeneratorRuntime.wrap(function _callee$(_context) {
781
290
  while (1) switch (_context.prev = _context.next) {
782
291
  case 0:
@@ -1045,7 +554,7 @@ var useCreateWebhook = function useCreateWebhook(options) {
1045
554
  keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
1046
555
  onSuccess: function onSuccess() {
1047
556
  var _options$onSuccess;
1048
- options === null || options === void 0 || (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 || _options$onSuccess.call(options);
557
+ options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options);
1049
558
  }
1050
559
  });
1051
560
  };
@@ -1068,7 +577,7 @@ var useUpdateWebhook = function useUpdateWebhook(id, options) {
1068
577
  keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST], [QUERY_KEYS.WEBHOOK_DETAILS, id], [QUERY_KEYS.DELIVERY_LIST, id]],
1069
578
  onSuccess: function onSuccess() {
1070
579
  var _options$onSuccess2;
1071
- options === null || options === void 0 || (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 || _options$onSuccess2.call(options);
580
+ options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options);
1072
581
  }
1073
582
  });
1074
583
  };
@@ -1077,7 +586,7 @@ var useDestroyWebhook = function useDestroyWebhook(options) {
1077
586
  keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
1078
587
  onSuccess: function onSuccess() {
1079
588
  var _options$onSuccess3;
1080
- options === null || options === void 0 || (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 || _options$onSuccess3.call(options);
589
+ options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options);
1081
590
  }
1082
591
  });
1083
592
  };
@@ -1101,13 +610,14 @@ var useFetchEvents = function useFetchEvents() {
1101
610
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
1102
611
  // require the crypto API and do not support built-in fallback to lower quality random number
1103
612
  // generators (like Math.random()).
1104
- let getRandomValues;
1105
- const rnds8 = new Uint8Array(16);
613
+ var getRandomValues;
614
+ var rnds8 = new Uint8Array(16);
1106
615
  function rng() {
1107
616
  // lazy load so that environments that need to polyfill have a chance to do so
1108
617
  if (!getRandomValues) {
1109
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
1110
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
618
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
619
+ // find the complete implementation of crypto (msCrypto) on IE11.
620
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
1111
621
 
1112
622
  if (!getRandomValues) {
1113
623
  throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
@@ -1117,50 +627,48 @@ function rng() {
1117
627
  return getRandomValues(rnds8);
1118
628
  }
1119
629
 
630
+ var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
631
+
632
+ function validate(uuid) {
633
+ return typeof uuid === 'string' && REGEX.test(uuid);
634
+ }
635
+
1120
636
  /**
1121
637
  * Convert array of 16 byte values to UUID string format of the form:
1122
638
  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
1123
639
  */
1124
640
 
1125
- const byteToHex = [];
641
+ var byteToHex = [];
1126
642
 
1127
- for (let i = 0; i < 256; ++i) {
1128
- byteToHex.push((i + 0x100).toString(16).slice(1));
643
+ for (var i = 0; i < 256; ++i) {
644
+ byteToHex.push((i + 0x100).toString(16).substr(1));
1129
645
  }
1130
646
 
1131
- function unsafeStringify(arr, offset = 0) {
647
+ function stringify(arr) {
648
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1132
649
  // Note: Be careful editing this code! It's been tuned for performance
1133
650
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
1134
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
1135
- }
651
+ var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
652
+ // of the following:
653
+ // - One or more input array values don't map to a hex octet (leading to
654
+ // "undefined" in the uuid)
655
+ // - Invalid input values for the RFC `version` or `variant` fields
656
+
657
+ if (!validate(uuid)) {
658
+ throw TypeError('Stringified UUID is invalid');
659
+ }
1136
660
 
1137
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1138
- var native = {
1139
- randomUUID
1140
- };
661
+ return uuid;
662
+ }
1141
663
 
1142
664
  function v4(options, buf, offset) {
1143
- if (native.randomUUID && !buf && !options) {
1144
- return native.randomUUID();
1145
- }
1146
-
1147
665
  options = options || {};
1148
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
666
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
1149
667
 
1150
668
  rnds[6] = rnds[6] & 0x0f | 0x40;
1151
669
  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
1152
670
 
1153
- if (buf) {
1154
- offset = offset || 0;
1155
-
1156
- for (let i = 0; i < 16; ++i) {
1157
- buf[offset + i] = rnds[i];
1158
- }
1159
-
1160
- return buf;
1161
- }
1162
-
1163
- return unsafeStringify(rnds);
671
+ return stringify(rnds);
1164
672
  }
1165
673
 
1166
674
  var MENU_ITEMS = {
@@ -1296,7 +804,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
1296
804
  var _useCreateWebhook = useCreateWebhook({
1297
805
  onSuccess: function onSuccess() {
1298
806
  onClose();
1299
- onCreate === null || onCreate === void 0 || onCreate();
807
+ onCreate === null || onCreate === void 0 ? void 0 : onCreate();
1300
808
  }
1301
809
  }),
1302
810
  createWebhook = _useCreateWebhook.mutate;
@@ -1553,7 +1061,7 @@ var Webhooks = function Webhooks(_ref) {
1553
1061
  var _useDestroyWebhook = useDestroyWebhook({
1554
1062
  onSuccess: function onSuccess() {
1555
1063
  setIsDeleteAlertOpen(false);
1556
- onDelete === null || onDelete === void 0 || onDelete();
1064
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete();
1557
1065
  }
1558
1066
  }),
1559
1067
  isDeleting = _useDestroyWebhook.isPending,