@adtrackify/at-service-common 1.2.8 → 1.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/__tests__/helpers/subscription-helper.spec.d.ts +1 -1
  2. package/dist/__tests__/helpers/subscription-helper.spec.js +27 -27
  3. package/dist/clients/generic/cognito-client.d.ts +19 -19
  4. package/dist/clients/generic/cognito-client.js +139 -139
  5. package/dist/clients/generic/dynamodb-client.d.ts +15 -15
  6. package/dist/clients/generic/dynamodb-client.js +122 -122
  7. package/dist/clients/generic/eventbridge-client.d.ts +14 -14
  8. package/dist/clients/generic/eventbridge-client.js +45 -45
  9. package/dist/clients/generic/http-client.d.ts +30 -30
  10. package/dist/clients/generic/http-client.js +28 -28
  11. package/dist/clients/generic/index.d.ts +6 -5
  12. package/dist/clients/generic/index.js +6 -5
  13. package/dist/clients/generic/index.js.map +1 -1
  14. package/dist/clients/generic/s3-client.d.ts +6 -6
  15. package/dist/clients/generic/s3-client.js +24 -24
  16. package/dist/clients/generic/sqs-client.d.ts +14 -14
  17. package/dist/clients/generic/sqs-client.js +34 -34
  18. package/dist/clients/index.d.ts +3 -3
  19. package/dist/clients/index.js +3 -3
  20. package/dist/clients/internal-api/accounts-client.d.ts +82 -82
  21. package/dist/clients/internal-api/accounts-client.js +78 -78
  22. package/dist/clients/internal-api/destinations-client.d.ts +54 -54
  23. package/dist/clients/internal-api/destinations-client.js +36 -36
  24. package/dist/clients/internal-api/index.d.ts +4 -4
  25. package/dist/clients/internal-api/index.js +4 -4
  26. package/dist/clients/internal-api/shopify-app-install-client.d.ts +57 -57
  27. package/dist/clients/internal-api/shopify-app-install-client.js +42 -42
  28. package/dist/clients/internal-api/users-auth-client.d.ts +61 -61
  29. package/dist/clients/internal-api/users-auth-client.js +73 -73
  30. package/dist/clients/third-party/index.d.ts +1 -1
  31. package/dist/clients/third-party/index.js +1 -1
  32. package/dist/clients/third-party/shopify-client.d.ts +90 -90
  33. package/dist/clients/third-party/shopify-client.js +121 -121
  34. package/dist/helpers/index.d.ts +7 -5
  35. package/dist/helpers/index.js +7 -5
  36. package/dist/helpers/index.js.map +1 -1
  37. package/dist/helpers/input-validation-helper.d.ts +2 -2
  38. package/dist/helpers/input-validation-helper.js +18 -18
  39. package/dist/helpers/logging-helper.d.ts +1 -1
  40. package/dist/helpers/logging-helper.js +9 -9
  41. package/dist/helpers/response-helper.d.ts +36 -36
  42. package/dist/helpers/response-helper.js +35 -35
  43. package/dist/helpers/shopify-helper.d.ts +9 -9
  44. package/dist/helpers/shopify-helper.js +23 -23
  45. package/dist/helpers/subscription-helper.d.ts +8 -8
  46. package/dist/helpers/subscription-helper.js +181 -181
  47. package/dist/helpers/traits-helper.d.ts +2 -0
  48. package/dist/helpers/traits-helper.js +5 -0
  49. package/dist/helpers/traits-helper.js.map +1 -0
  50. package/dist/helpers/utils.d.ts +1 -0
  51. package/dist/helpers/utils.js +11 -0
  52. package/dist/helpers/utils.js.map +1 -0
  53. package/dist/index.d.ts +5 -5
  54. package/dist/index.esm.js +3196 -49
  55. package/dist/index.esm.js.map +4 -4
  56. package/dist/index.js +5 -5
  57. package/dist/libs/crypto.d.ts +1 -1
  58. package/dist/libs/crypto.js +5 -5
  59. package/dist/libs/dates.d.ts +3 -3
  60. package/dist/libs/dates.js +10 -10
  61. package/dist/libs/http-error.d.ts +21 -21
  62. package/dist/libs/http-error.js +55 -55
  63. package/dist/libs/http-status-codes.d.ts +58 -58
  64. package/dist/libs/http-status-codes.js +59 -59
  65. package/dist/libs/index.d.ts +6 -6
  66. package/dist/libs/index.js +6 -6
  67. package/dist/libs/url.d.ts +1 -1
  68. package/dist/libs/url.js +9 -9
  69. package/dist/services/eventbridge-integration-service.d.ts +9 -9
  70. package/dist/services/eventbridge-integration-service.js +24 -24
  71. package/dist/services/index.d.ts +1 -1
  72. package/dist/services/index.js +1 -1
  73. package/dist/types/api-response.d.ts +6 -6
  74. package/dist/types/api-response.js +1 -1
  75. package/dist/types/index.d.ts +1 -1
  76. package/dist/types/index.js +1 -1
  77. package/dist/types/internal-events/event-detail-types.d.ts +20 -20
  78. package/dist/types/internal-events/event-detail-types.js +24 -24
  79. package/dist/types/internal-events/index.d.ts +1 -1
  80. package/dist/types/internal-events/index.js +1 -1
  81. package/package.json +7 -3
package/dist/index.esm.js CHANGED
@@ -1,10 +1,3101 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x2)(function(x2) {
11
+ if (typeof require !== "undefined")
12
+ return require.apply(this, arguments);
13
+ throw new Error('Dynamic require of "' + x2 + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
+ // If the importer is in node compatibility mode or this is not an ESM
28
+ // file that has been converted to a CommonJS file using a Babel-
29
+ // compatible transform (i.e. "__esModule" has not been set), then set
30
+ // "default" to the CommonJS "module.exports" for node compatibility.
31
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
+ mod
33
+ ));
3
34
  var __publicField = (obj, key, value) => {
4
35
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
36
  return value;
6
37
  };
7
38
 
39
+ // node_modules/object-keys/isArguments.js
40
+ var require_isArguments = __commonJS({
41
+ "node_modules/object-keys/isArguments.js"(exports, module) {
42
+ "use strict";
43
+ var toStr = Object.prototype.toString;
44
+ module.exports = function isArguments(value) {
45
+ var str = toStr.call(value);
46
+ var isArgs = str === "[object Arguments]";
47
+ if (!isArgs) {
48
+ isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
49
+ }
50
+ return isArgs;
51
+ };
52
+ }
53
+ });
54
+
55
+ // node_modules/object-keys/implementation.js
56
+ var require_implementation = __commonJS({
57
+ "node_modules/object-keys/implementation.js"(exports, module) {
58
+ "use strict";
59
+ var keysShim;
60
+ if (!Object.keys) {
61
+ has = Object.prototype.hasOwnProperty;
62
+ toStr = Object.prototype.toString;
63
+ isArgs = require_isArguments();
64
+ isEnumerable = Object.prototype.propertyIsEnumerable;
65
+ hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
66
+ hasProtoEnumBug = isEnumerable.call(function() {
67
+ }, "prototype");
68
+ dontEnums = [
69
+ "toString",
70
+ "toLocaleString",
71
+ "valueOf",
72
+ "hasOwnProperty",
73
+ "isPrototypeOf",
74
+ "propertyIsEnumerable",
75
+ "constructor"
76
+ ];
77
+ equalsConstructorPrototype = function(o) {
78
+ var ctor = o.constructor;
79
+ return ctor && ctor.prototype === o;
80
+ };
81
+ excludedKeys = {
82
+ $applicationCache: true,
83
+ $console: true,
84
+ $external: true,
85
+ $frame: true,
86
+ $frameElement: true,
87
+ $frames: true,
88
+ $innerHeight: true,
89
+ $innerWidth: true,
90
+ $onmozfullscreenchange: true,
91
+ $onmozfullscreenerror: true,
92
+ $outerHeight: true,
93
+ $outerWidth: true,
94
+ $pageXOffset: true,
95
+ $pageYOffset: true,
96
+ $parent: true,
97
+ $scrollLeft: true,
98
+ $scrollTop: true,
99
+ $scrollX: true,
100
+ $scrollY: true,
101
+ $self: true,
102
+ $webkitIndexedDB: true,
103
+ $webkitStorageInfo: true,
104
+ $window: true
105
+ };
106
+ hasAutomationEqualityBug = function() {
107
+ if (typeof window === "undefined") {
108
+ return false;
109
+ }
110
+ for (var k in window) {
111
+ try {
112
+ if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
113
+ try {
114
+ equalsConstructorPrototype(window[k]);
115
+ } catch (e) {
116
+ return true;
117
+ }
118
+ }
119
+ } catch (e) {
120
+ return true;
121
+ }
122
+ }
123
+ return false;
124
+ }();
125
+ equalsConstructorPrototypeIfNotBuggy = function(o) {
126
+ if (typeof window === "undefined" || !hasAutomationEqualityBug) {
127
+ return equalsConstructorPrototype(o);
128
+ }
129
+ try {
130
+ return equalsConstructorPrototype(o);
131
+ } catch (e) {
132
+ return false;
133
+ }
134
+ };
135
+ keysShim = function keys(object) {
136
+ var isObject = object !== null && typeof object === "object";
137
+ var isFunction = toStr.call(object) === "[object Function]";
138
+ var isArguments = isArgs(object);
139
+ var isString = isObject && toStr.call(object) === "[object String]";
140
+ var theKeys = [];
141
+ if (!isObject && !isFunction && !isArguments) {
142
+ throw new TypeError("Object.keys called on a non-object");
143
+ }
144
+ var skipProto = hasProtoEnumBug && isFunction;
145
+ if (isString && object.length > 0 && !has.call(object, 0)) {
146
+ for (var i = 0; i < object.length; ++i) {
147
+ theKeys.push(String(i));
148
+ }
149
+ }
150
+ if (isArguments && object.length > 0) {
151
+ for (var j = 0; j < object.length; ++j) {
152
+ theKeys.push(String(j));
153
+ }
154
+ } else {
155
+ for (var name in object) {
156
+ if (!(skipProto && name === "prototype") && has.call(object, name)) {
157
+ theKeys.push(String(name));
158
+ }
159
+ }
160
+ }
161
+ if (hasDontEnumBug) {
162
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
163
+ for (var k = 0; k < dontEnums.length; ++k) {
164
+ if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
165
+ theKeys.push(dontEnums[k]);
166
+ }
167
+ }
168
+ }
169
+ return theKeys;
170
+ };
171
+ }
172
+ var has;
173
+ var toStr;
174
+ var isArgs;
175
+ var isEnumerable;
176
+ var hasDontEnumBug;
177
+ var hasProtoEnumBug;
178
+ var dontEnums;
179
+ var equalsConstructorPrototype;
180
+ var excludedKeys;
181
+ var hasAutomationEqualityBug;
182
+ var equalsConstructorPrototypeIfNotBuggy;
183
+ module.exports = keysShim;
184
+ }
185
+ });
186
+
187
+ // node_modules/object-keys/index.js
188
+ var require_object_keys = __commonJS({
189
+ "node_modules/object-keys/index.js"(exports, module) {
190
+ "use strict";
191
+ var slice = Array.prototype.slice;
192
+ var isArgs = require_isArguments();
193
+ var origKeys = Object.keys;
194
+ var keysShim = origKeys ? function keys(o) {
195
+ return origKeys(o);
196
+ } : require_implementation();
197
+ var originalKeys = Object.keys;
198
+ keysShim.shim = function shimObjectKeys() {
199
+ if (Object.keys) {
200
+ var keysWorksWithArguments = function() {
201
+ var args = Object.keys(arguments);
202
+ return args && args.length === arguments.length;
203
+ }(1, 2);
204
+ if (!keysWorksWithArguments) {
205
+ Object.keys = function keys(object) {
206
+ if (isArgs(object)) {
207
+ return originalKeys(slice.call(object));
208
+ }
209
+ return originalKeys(object);
210
+ };
211
+ }
212
+ } else {
213
+ Object.keys = keysShim;
214
+ }
215
+ return Object.keys || keysShim;
216
+ };
217
+ module.exports = keysShim;
218
+ }
219
+ });
220
+
221
+ // node_modules/has-symbols/shams.js
222
+ var require_shams = __commonJS({
223
+ "node_modules/has-symbols/shams.js"(exports, module) {
224
+ "use strict";
225
+ module.exports = function hasSymbols() {
226
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
227
+ return false;
228
+ }
229
+ if (typeof Symbol.iterator === "symbol") {
230
+ return true;
231
+ }
232
+ var obj = {};
233
+ var sym = Symbol("test");
234
+ var symObj = Object(sym);
235
+ if (typeof sym === "string") {
236
+ return false;
237
+ }
238
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
239
+ return false;
240
+ }
241
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
242
+ return false;
243
+ }
244
+ var symVal = 42;
245
+ obj[sym] = symVal;
246
+ for (sym in obj) {
247
+ return false;
248
+ }
249
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
250
+ return false;
251
+ }
252
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
253
+ return false;
254
+ }
255
+ var syms = Object.getOwnPropertySymbols(obj);
256
+ if (syms.length !== 1 || syms[0] !== sym) {
257
+ return false;
258
+ }
259
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
260
+ return false;
261
+ }
262
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
263
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
264
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
265
+ return false;
266
+ }
267
+ }
268
+ return true;
269
+ };
270
+ }
271
+ });
272
+
273
+ // node_modules/has-symbols/index.js
274
+ var require_has_symbols = __commonJS({
275
+ "node_modules/has-symbols/index.js"(exports, module) {
276
+ "use strict";
277
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
278
+ var hasSymbolSham = require_shams();
279
+ module.exports = function hasNativeSymbols() {
280
+ if (typeof origSymbol !== "function") {
281
+ return false;
282
+ }
283
+ if (typeof Symbol !== "function") {
284
+ return false;
285
+ }
286
+ if (typeof origSymbol("foo") !== "symbol") {
287
+ return false;
288
+ }
289
+ if (typeof Symbol("bar") !== "symbol") {
290
+ return false;
291
+ }
292
+ return hasSymbolSham();
293
+ };
294
+ }
295
+ });
296
+
297
+ // node_modules/function-bind/implementation.js
298
+ var require_implementation2 = __commonJS({
299
+ "node_modules/function-bind/implementation.js"(exports, module) {
300
+ "use strict";
301
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
302
+ var slice = Array.prototype.slice;
303
+ var toStr = Object.prototype.toString;
304
+ var funcType = "[object Function]";
305
+ module.exports = function bind(that) {
306
+ var target = this;
307
+ if (typeof target !== "function" || toStr.call(target) !== funcType) {
308
+ throw new TypeError(ERROR_MESSAGE + target);
309
+ }
310
+ var args = slice.call(arguments, 1);
311
+ var bound;
312
+ var binder = function() {
313
+ if (this instanceof bound) {
314
+ var result = target.apply(
315
+ this,
316
+ args.concat(slice.call(arguments))
317
+ );
318
+ if (Object(result) === result) {
319
+ return result;
320
+ }
321
+ return this;
322
+ } else {
323
+ return target.apply(
324
+ that,
325
+ args.concat(slice.call(arguments))
326
+ );
327
+ }
328
+ };
329
+ var boundLength = Math.max(0, target.length - args.length);
330
+ var boundArgs = [];
331
+ for (var i = 0; i < boundLength; i++) {
332
+ boundArgs.push("$" + i);
333
+ }
334
+ bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
335
+ if (target.prototype) {
336
+ var Empty = function Empty2() {
337
+ };
338
+ Empty.prototype = target.prototype;
339
+ bound.prototype = new Empty();
340
+ Empty.prototype = null;
341
+ }
342
+ return bound;
343
+ };
344
+ }
345
+ });
346
+
347
+ // node_modules/function-bind/index.js
348
+ var require_function_bind = __commonJS({
349
+ "node_modules/function-bind/index.js"(exports, module) {
350
+ "use strict";
351
+ var implementation = require_implementation2();
352
+ module.exports = Function.prototype.bind || implementation;
353
+ }
354
+ });
355
+
356
+ // node_modules/has/src/index.js
357
+ var require_src = __commonJS({
358
+ "node_modules/has/src/index.js"(exports, module) {
359
+ "use strict";
360
+ var bind = require_function_bind();
361
+ module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
362
+ }
363
+ });
364
+
365
+ // node_modules/get-intrinsic/index.js
366
+ var require_get_intrinsic = __commonJS({
367
+ "node_modules/get-intrinsic/index.js"(exports, module) {
368
+ "use strict";
369
+ var undefined2;
370
+ var $SyntaxError = SyntaxError;
371
+ var $Function = Function;
372
+ var $TypeError = TypeError;
373
+ var getEvalledConstructor = function(expressionSyntax) {
374
+ try {
375
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
376
+ } catch (e) {
377
+ }
378
+ };
379
+ var $gOPD = Object.getOwnPropertyDescriptor;
380
+ if ($gOPD) {
381
+ try {
382
+ $gOPD({}, "");
383
+ } catch (e) {
384
+ $gOPD = null;
385
+ }
386
+ }
387
+ var throwTypeError = function() {
388
+ throw new $TypeError();
389
+ };
390
+ var ThrowTypeError = $gOPD ? function() {
391
+ try {
392
+ arguments.callee;
393
+ return throwTypeError;
394
+ } catch (calleeThrows) {
395
+ try {
396
+ return $gOPD(arguments, "callee").get;
397
+ } catch (gOPDthrows) {
398
+ return throwTypeError;
399
+ }
400
+ }
401
+ }() : throwTypeError;
402
+ var hasSymbols = require_has_symbols()();
403
+ var getProto = Object.getPrototypeOf || function(x2) {
404
+ return x2.__proto__;
405
+ };
406
+ var needsEval = {};
407
+ var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array);
408
+ var INTRINSICS = {
409
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
410
+ "%Array%": Array,
411
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
412
+ "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,
413
+ "%AsyncFromSyncIteratorPrototype%": undefined2,
414
+ "%AsyncFunction%": needsEval,
415
+ "%AsyncGenerator%": needsEval,
416
+ "%AsyncGeneratorFunction%": needsEval,
417
+ "%AsyncIteratorPrototype%": needsEval,
418
+ "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
419
+ "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
420
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
421
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
422
+ "%Boolean%": Boolean,
423
+ "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
424
+ "%Date%": Date,
425
+ "%decodeURI%": decodeURI,
426
+ "%decodeURIComponent%": decodeURIComponent,
427
+ "%encodeURI%": encodeURI,
428
+ "%encodeURIComponent%": encodeURIComponent,
429
+ "%Error%": Error,
430
+ "%eval%": eval,
431
+ // eslint-disable-line no-eval
432
+ "%EvalError%": EvalError,
433
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
434
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
435
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
436
+ "%Function%": $Function,
437
+ "%GeneratorFunction%": needsEval,
438
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
439
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
440
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
441
+ "%isFinite%": isFinite,
442
+ "%isNaN%": isNaN,
443
+ "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,
444
+ "%JSON%": typeof JSON === "object" ? JSON : undefined2,
445
+ "%Map%": typeof Map === "undefined" ? undefined2 : Map,
446
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
447
+ "%Math%": Math,
448
+ "%Number%": Number,
449
+ "%Object%": Object,
450
+ "%parseFloat%": parseFloat,
451
+ "%parseInt%": parseInt,
452
+ "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
453
+ "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
454
+ "%RangeError%": RangeError,
455
+ "%ReferenceError%": ReferenceError,
456
+ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
457
+ "%RegExp%": RegExp,
458
+ "%Set%": typeof Set === "undefined" ? undefined2 : Set,
459
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
460
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
461
+ "%String%": String,
462
+ "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2,
463
+ "%Symbol%": hasSymbols ? Symbol : undefined2,
464
+ "%SyntaxError%": $SyntaxError,
465
+ "%ThrowTypeError%": ThrowTypeError,
466
+ "%TypedArray%": TypedArray,
467
+ "%TypeError%": $TypeError,
468
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
469
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
470
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
471
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
472
+ "%URIError%": URIError,
473
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
474
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
475
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
476
+ };
477
+ try {
478
+ null.error;
479
+ } catch (e) {
480
+ errorProto = getProto(getProto(e));
481
+ INTRINSICS["%Error.prototype%"] = errorProto;
482
+ }
483
+ var errorProto;
484
+ var doEval = function doEval2(name) {
485
+ var value;
486
+ if (name === "%AsyncFunction%") {
487
+ value = getEvalledConstructor("async function () {}");
488
+ } else if (name === "%GeneratorFunction%") {
489
+ value = getEvalledConstructor("function* () {}");
490
+ } else if (name === "%AsyncGeneratorFunction%") {
491
+ value = getEvalledConstructor("async function* () {}");
492
+ } else if (name === "%AsyncGenerator%") {
493
+ var fn = doEval2("%AsyncGeneratorFunction%");
494
+ if (fn) {
495
+ value = fn.prototype;
496
+ }
497
+ } else if (name === "%AsyncIteratorPrototype%") {
498
+ var gen = doEval2("%AsyncGenerator%");
499
+ if (gen) {
500
+ value = getProto(gen.prototype);
501
+ }
502
+ }
503
+ INTRINSICS[name] = value;
504
+ return value;
505
+ };
506
+ var LEGACY_ALIASES = {
507
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
508
+ "%ArrayPrototype%": ["Array", "prototype"],
509
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
510
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
511
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
512
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
513
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
514
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
515
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
516
+ "%BooleanPrototype%": ["Boolean", "prototype"],
517
+ "%DataViewPrototype%": ["DataView", "prototype"],
518
+ "%DatePrototype%": ["Date", "prototype"],
519
+ "%ErrorPrototype%": ["Error", "prototype"],
520
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
521
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
522
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
523
+ "%FunctionPrototype%": ["Function", "prototype"],
524
+ "%Generator%": ["GeneratorFunction", "prototype"],
525
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
526
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
527
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
528
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
529
+ "%JSONParse%": ["JSON", "parse"],
530
+ "%JSONStringify%": ["JSON", "stringify"],
531
+ "%MapPrototype%": ["Map", "prototype"],
532
+ "%NumberPrototype%": ["Number", "prototype"],
533
+ "%ObjectPrototype%": ["Object", "prototype"],
534
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
535
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
536
+ "%PromisePrototype%": ["Promise", "prototype"],
537
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
538
+ "%Promise_all%": ["Promise", "all"],
539
+ "%Promise_reject%": ["Promise", "reject"],
540
+ "%Promise_resolve%": ["Promise", "resolve"],
541
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
542
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
543
+ "%RegExpPrototype%": ["RegExp", "prototype"],
544
+ "%SetPrototype%": ["Set", "prototype"],
545
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
546
+ "%StringPrototype%": ["String", "prototype"],
547
+ "%SymbolPrototype%": ["Symbol", "prototype"],
548
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
549
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
550
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
551
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
552
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
553
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
554
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
555
+ "%URIErrorPrototype%": ["URIError", "prototype"],
556
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
557
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
558
+ };
559
+ var bind = require_function_bind();
560
+ var hasOwn = require_src();
561
+ var $concat = bind.call(Function.call, Array.prototype.concat);
562
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
563
+ var $replace = bind.call(Function.call, String.prototype.replace);
564
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
565
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
566
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
567
+ var reEscapeChar = /\\(\\)?/g;
568
+ var stringToPath = function stringToPath2(string) {
569
+ var first = $strSlice(string, 0, 1);
570
+ var last = $strSlice(string, -1);
571
+ if (first === "%" && last !== "%") {
572
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
573
+ } else if (last === "%" && first !== "%") {
574
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
575
+ }
576
+ var result = [];
577
+ $replace(string, rePropName, function(match, number, quote, subString) {
578
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
579
+ });
580
+ return result;
581
+ };
582
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
583
+ var intrinsicName = name;
584
+ var alias;
585
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
586
+ alias = LEGACY_ALIASES[intrinsicName];
587
+ intrinsicName = "%" + alias[0] + "%";
588
+ }
589
+ if (hasOwn(INTRINSICS, intrinsicName)) {
590
+ var value = INTRINSICS[intrinsicName];
591
+ if (value === needsEval) {
592
+ value = doEval(intrinsicName);
593
+ }
594
+ if (typeof value === "undefined" && !allowMissing) {
595
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
596
+ }
597
+ return {
598
+ alias,
599
+ name: intrinsicName,
600
+ value
601
+ };
602
+ }
603
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
604
+ };
605
+ module.exports = function GetIntrinsic(name, allowMissing) {
606
+ if (typeof name !== "string" || name.length === 0) {
607
+ throw new $TypeError("intrinsic name must be a non-empty string");
608
+ }
609
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
610
+ throw new $TypeError('"allowMissing" argument must be a boolean');
611
+ }
612
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
613
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
614
+ }
615
+ var parts = stringToPath(name);
616
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
617
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
618
+ var intrinsicRealName = intrinsic.name;
619
+ var value = intrinsic.value;
620
+ var skipFurtherCaching = false;
621
+ var alias = intrinsic.alias;
622
+ if (alias) {
623
+ intrinsicBaseName = alias[0];
624
+ $spliceApply(parts, $concat([0, 1], alias));
625
+ }
626
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
627
+ var part = parts[i];
628
+ var first = $strSlice(part, 0, 1);
629
+ var last = $strSlice(part, -1);
630
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
631
+ throw new $SyntaxError("property names with quotes must have matching quotes");
632
+ }
633
+ if (part === "constructor" || !isOwn) {
634
+ skipFurtherCaching = true;
635
+ }
636
+ intrinsicBaseName += "." + part;
637
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
638
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
639
+ value = INTRINSICS[intrinsicRealName];
640
+ } else if (value != null) {
641
+ if (!(part in value)) {
642
+ if (!allowMissing) {
643
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
644
+ }
645
+ return void 0;
646
+ }
647
+ if ($gOPD && i + 1 >= parts.length) {
648
+ var desc = $gOPD(value, part);
649
+ isOwn = !!desc;
650
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
651
+ value = desc.get;
652
+ } else {
653
+ value = value[part];
654
+ }
655
+ } else {
656
+ isOwn = hasOwn(value, part);
657
+ value = value[part];
658
+ }
659
+ if (isOwn && !skipFurtherCaching) {
660
+ INTRINSICS[intrinsicRealName] = value;
661
+ }
662
+ }
663
+ }
664
+ return value;
665
+ };
666
+ }
667
+ });
668
+
669
+ // node_modules/has-property-descriptors/index.js
670
+ var require_has_property_descriptors = __commonJS({
671
+ "node_modules/has-property-descriptors/index.js"(exports, module) {
672
+ "use strict";
673
+ var GetIntrinsic = require_get_intrinsic();
674
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
675
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
676
+ if ($defineProperty) {
677
+ try {
678
+ $defineProperty({}, "a", { value: 1 });
679
+ return true;
680
+ } catch (e) {
681
+ return false;
682
+ }
683
+ }
684
+ return false;
685
+ };
686
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
687
+ if (!hasPropertyDescriptors()) {
688
+ return null;
689
+ }
690
+ try {
691
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
692
+ } catch (e) {
693
+ return true;
694
+ }
695
+ };
696
+ module.exports = hasPropertyDescriptors;
697
+ }
698
+ });
699
+
700
+ // node_modules/define-properties/index.js
701
+ var require_define_properties = __commonJS({
702
+ "node_modules/define-properties/index.js"(exports, module) {
703
+ "use strict";
704
+ var keys = require_object_keys();
705
+ var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
706
+ var toStr = Object.prototype.toString;
707
+ var concat = Array.prototype.concat;
708
+ var origDefineProperty = Object.defineProperty;
709
+ var isFunction = function(fn) {
710
+ return typeof fn === "function" && toStr.call(fn) === "[object Function]";
711
+ };
712
+ var hasPropertyDescriptors = require_has_property_descriptors()();
713
+ var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
714
+ var defineProperty = function(object, name, value, predicate) {
715
+ if (name in object) {
716
+ if (predicate === true) {
717
+ if (object[name] === value) {
718
+ return;
719
+ }
720
+ } else if (!isFunction(predicate) || !predicate()) {
721
+ return;
722
+ }
723
+ }
724
+ if (supportsDescriptors) {
725
+ origDefineProperty(object, name, {
726
+ configurable: true,
727
+ enumerable: false,
728
+ value,
729
+ writable: true
730
+ });
731
+ } else {
732
+ object[name] = value;
733
+ }
734
+ };
735
+ var defineProperties = function(object, map) {
736
+ var predicates = arguments.length > 2 ? arguments[2] : {};
737
+ var props = keys(map);
738
+ if (hasSymbols) {
739
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
740
+ }
741
+ for (var i = 0; i < props.length; i += 1) {
742
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
743
+ }
744
+ };
745
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
746
+ module.exports = defineProperties;
747
+ }
748
+ });
749
+
750
+ // node_modules/call-bind/index.js
751
+ var require_call_bind = __commonJS({
752
+ "node_modules/call-bind/index.js"(exports, module) {
753
+ "use strict";
754
+ var bind = require_function_bind();
755
+ var GetIntrinsic = require_get_intrinsic();
756
+ var $apply = GetIntrinsic("%Function.prototype.apply%");
757
+ var $call = GetIntrinsic("%Function.prototype.call%");
758
+ var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
759
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
760
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
761
+ var $max = GetIntrinsic("%Math.max%");
762
+ if ($defineProperty) {
763
+ try {
764
+ $defineProperty({}, "a", { value: 1 });
765
+ } catch (e) {
766
+ $defineProperty = null;
767
+ }
768
+ }
769
+ module.exports = function callBind(originalFunction) {
770
+ var func = $reflectApply(bind, $call, arguments);
771
+ if ($gOPD && $defineProperty) {
772
+ var desc = $gOPD(func, "length");
773
+ if (desc.configurable) {
774
+ $defineProperty(
775
+ func,
776
+ "length",
777
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
778
+ );
779
+ }
780
+ }
781
+ return func;
782
+ };
783
+ var applyBind = function applyBind2() {
784
+ return $reflectApply(bind, $apply, arguments);
785
+ };
786
+ if ($defineProperty) {
787
+ $defineProperty(module.exports, "apply", { value: applyBind });
788
+ } else {
789
+ module.exports.apply = applyBind;
790
+ }
791
+ }
792
+ });
793
+
794
+ // node_modules/call-bind/callBound.js
795
+ var require_callBound = __commonJS({
796
+ "node_modules/call-bind/callBound.js"(exports, module) {
797
+ "use strict";
798
+ var GetIntrinsic = require_get_intrinsic();
799
+ var callBind = require_call_bind();
800
+ var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
801
+ module.exports = function callBoundIntrinsic(name, allowMissing) {
802
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
803
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
804
+ return callBind(intrinsic);
805
+ }
806
+ return intrinsic;
807
+ };
808
+ }
809
+ });
810
+
811
+ // node_modules/object.assign/implementation.js
812
+ var require_implementation3 = __commonJS({
813
+ "node_modules/object.assign/implementation.js"(exports, module) {
814
+ "use strict";
815
+ var objectKeys = require_object_keys();
816
+ var hasSymbols = require_shams()();
817
+ var callBound = require_callBound();
818
+ var toObject = Object;
819
+ var $push = callBound("Array.prototype.push");
820
+ var $propIsEnumerable = callBound("Object.prototype.propertyIsEnumerable");
821
+ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
822
+ module.exports = function assign(target, source1) {
823
+ if (target == null) {
824
+ throw new TypeError("target must be an object");
825
+ }
826
+ var to = toObject(target);
827
+ if (arguments.length === 1) {
828
+ return to;
829
+ }
830
+ for (var s2 = 1; s2 < arguments.length; ++s2) {
831
+ var from = toObject(arguments[s2]);
832
+ var keys = objectKeys(from);
833
+ var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
834
+ if (getSymbols) {
835
+ var syms = getSymbols(from);
836
+ for (var j = 0; j < syms.length; ++j) {
837
+ var key = syms[j];
838
+ if ($propIsEnumerable(from, key)) {
839
+ $push(keys, key);
840
+ }
841
+ }
842
+ }
843
+ for (var i = 0; i < keys.length; ++i) {
844
+ var nextKey = keys[i];
845
+ if ($propIsEnumerable(from, nextKey)) {
846
+ var propValue = from[nextKey];
847
+ to[nextKey] = propValue;
848
+ }
849
+ }
850
+ }
851
+ return to;
852
+ };
853
+ }
854
+ });
855
+
856
+ // node_modules/object.assign/polyfill.js
857
+ var require_polyfill = __commonJS({
858
+ "node_modules/object.assign/polyfill.js"(exports, module) {
859
+ "use strict";
860
+ var implementation = require_implementation3();
861
+ var lacksProperEnumerationOrder = function() {
862
+ if (!Object.assign) {
863
+ return false;
864
+ }
865
+ var str = "abcdefghijklmnopqrst";
866
+ var letters = str.split("");
867
+ var map = {};
868
+ for (var i = 0; i < letters.length; ++i) {
869
+ map[letters[i]] = letters[i];
870
+ }
871
+ var obj = Object.assign({}, map);
872
+ var actual = "";
873
+ for (var k in obj) {
874
+ actual += k;
875
+ }
876
+ return str !== actual;
877
+ };
878
+ var assignHasPendingExceptions = function() {
879
+ if (!Object.assign || !Object.preventExtensions) {
880
+ return false;
881
+ }
882
+ var thrower = Object.preventExtensions({ 1: 2 });
883
+ try {
884
+ Object.assign(thrower, "xy");
885
+ } catch (e) {
886
+ return thrower[1] === "y";
887
+ }
888
+ return false;
889
+ };
890
+ module.exports = function getPolyfill() {
891
+ if (!Object.assign) {
892
+ return implementation;
893
+ }
894
+ if (lacksProperEnumerationOrder()) {
895
+ return implementation;
896
+ }
897
+ if (assignHasPendingExceptions()) {
898
+ return implementation;
899
+ }
900
+ return Object.assign;
901
+ };
902
+ }
903
+ });
904
+
905
+ // node_modules/object.assign/shim.js
906
+ var require_shim = __commonJS({
907
+ "node_modules/object.assign/shim.js"(exports, module) {
908
+ "use strict";
909
+ var define = require_define_properties();
910
+ var getPolyfill = require_polyfill();
911
+ module.exports = function shimAssign() {
912
+ var polyfill = getPolyfill();
913
+ define(
914
+ Object,
915
+ { assign: polyfill },
916
+ { assign: function() {
917
+ return Object.assign !== polyfill;
918
+ } }
919
+ );
920
+ return polyfill;
921
+ };
922
+ }
923
+ });
924
+
925
+ // node_modules/object.assign/index.js
926
+ var require_object = __commonJS({
927
+ "node_modules/object.assign/index.js"(exports, module) {
928
+ "use strict";
929
+ var defineProperties = require_define_properties();
930
+ var callBind = require_call_bind();
931
+ var implementation = require_implementation3();
932
+ var getPolyfill = require_polyfill();
933
+ var shim = require_shim();
934
+ var polyfill = callBind.apply(getPolyfill());
935
+ var bound = function assign(target, source1) {
936
+ return polyfill(Object, arguments);
937
+ };
938
+ defineProperties(bound, {
939
+ getPolyfill,
940
+ implementation,
941
+ shim
942
+ });
943
+ module.exports = bound;
944
+ }
945
+ });
946
+
947
+ // node_modules/functions-have-names/index.js
948
+ var require_functions_have_names = __commonJS({
949
+ "node_modules/functions-have-names/index.js"(exports, module) {
950
+ "use strict";
951
+ var functionsHaveNames = function functionsHaveNames2() {
952
+ return typeof function f2() {
953
+ }.name === "string";
954
+ };
955
+ var gOPD = Object.getOwnPropertyDescriptor;
956
+ if (gOPD) {
957
+ try {
958
+ gOPD([], "length");
959
+ } catch (e) {
960
+ gOPD = null;
961
+ }
962
+ }
963
+ functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
964
+ if (!functionsHaveNames() || !gOPD) {
965
+ return false;
966
+ }
967
+ var desc = gOPD(function() {
968
+ }, "name");
969
+ return !!desc && !!desc.configurable;
970
+ };
971
+ var $bind = Function.prototype.bind;
972
+ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
973
+ return functionsHaveNames() && typeof $bind === "function" && function f2() {
974
+ }.bind().name !== "";
975
+ };
976
+ module.exports = functionsHaveNames;
977
+ }
978
+ });
979
+
980
+ // node_modules/regexp.prototype.flags/implementation.js
981
+ var require_implementation4 = __commonJS({
982
+ "node_modules/regexp.prototype.flags/implementation.js"(exports, module) {
983
+ "use strict";
984
+ var functionsHaveConfigurableNames = require_functions_have_names().functionsHaveConfigurableNames();
985
+ var $Object = Object;
986
+ var $TypeError = TypeError;
987
+ module.exports = function flags() {
988
+ if (this != null && this !== $Object(this)) {
989
+ throw new $TypeError("RegExp.prototype.flags getter called on non-object");
990
+ }
991
+ var result = "";
992
+ if (this.hasIndices) {
993
+ result += "d";
994
+ }
995
+ if (this.global) {
996
+ result += "g";
997
+ }
998
+ if (this.ignoreCase) {
999
+ result += "i";
1000
+ }
1001
+ if (this.multiline) {
1002
+ result += "m";
1003
+ }
1004
+ if (this.dotAll) {
1005
+ result += "s";
1006
+ }
1007
+ if (this.unicode) {
1008
+ result += "u";
1009
+ }
1010
+ if (this.sticky) {
1011
+ result += "y";
1012
+ }
1013
+ return result;
1014
+ };
1015
+ if (functionsHaveConfigurableNames && Object.defineProperty) {
1016
+ Object.defineProperty(module.exports, "name", { value: "get flags" });
1017
+ }
1018
+ }
1019
+ });
1020
+
1021
+ // node_modules/regexp.prototype.flags/polyfill.js
1022
+ var require_polyfill2 = __commonJS({
1023
+ "node_modules/regexp.prototype.flags/polyfill.js"(exports, module) {
1024
+ "use strict";
1025
+ var implementation = require_implementation4();
1026
+ var supportsDescriptors = require_define_properties().supportsDescriptors;
1027
+ var $gOPD = Object.getOwnPropertyDescriptor;
1028
+ module.exports = function getPolyfill() {
1029
+ if (supportsDescriptors && /a/mig.flags === "gim") {
1030
+ var descriptor = $gOPD(RegExp.prototype, "flags");
1031
+ if (descriptor && typeof descriptor.get === "function" && typeof RegExp.prototype.dotAll === "boolean" && typeof RegExp.prototype.hasIndices === "boolean") {
1032
+ var calls = "";
1033
+ var o = {};
1034
+ Object.defineProperty(o, "hasIndices", {
1035
+ get: function() {
1036
+ calls += "d";
1037
+ }
1038
+ });
1039
+ Object.defineProperty(o, "sticky", {
1040
+ get: function() {
1041
+ calls += "y";
1042
+ }
1043
+ });
1044
+ if (calls === "dy") {
1045
+ return descriptor.get;
1046
+ }
1047
+ }
1048
+ }
1049
+ return implementation;
1050
+ };
1051
+ }
1052
+ });
1053
+
1054
+ // node_modules/regexp.prototype.flags/shim.js
1055
+ var require_shim2 = __commonJS({
1056
+ "node_modules/regexp.prototype.flags/shim.js"(exports, module) {
1057
+ "use strict";
1058
+ var supportsDescriptors = require_define_properties().supportsDescriptors;
1059
+ var getPolyfill = require_polyfill2();
1060
+ var gOPD = Object.getOwnPropertyDescriptor;
1061
+ var defineProperty = Object.defineProperty;
1062
+ var TypeErr = TypeError;
1063
+ var getProto = Object.getPrototypeOf;
1064
+ var regex = /a/;
1065
+ module.exports = function shimFlags() {
1066
+ if (!supportsDescriptors || !getProto) {
1067
+ throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
1068
+ }
1069
+ var polyfill = getPolyfill();
1070
+ var proto = getProto(regex);
1071
+ var descriptor = gOPD(proto, "flags");
1072
+ if (!descriptor || descriptor.get !== polyfill) {
1073
+ defineProperty(proto, "flags", {
1074
+ configurable: true,
1075
+ enumerable: false,
1076
+ get: polyfill
1077
+ });
1078
+ }
1079
+ return polyfill;
1080
+ };
1081
+ }
1082
+ });
1083
+
1084
+ // node_modules/regexp.prototype.flags/index.js
1085
+ var require_regexp_prototype = __commonJS({
1086
+ "node_modules/regexp.prototype.flags/index.js"(exports, module) {
1087
+ "use strict";
1088
+ var define = require_define_properties();
1089
+ var callBind = require_call_bind();
1090
+ var implementation = require_implementation4();
1091
+ var getPolyfill = require_polyfill2();
1092
+ var shim = require_shim2();
1093
+ var flagsBound = callBind(getPolyfill());
1094
+ define(flagsBound, {
1095
+ getPolyfill,
1096
+ implementation,
1097
+ shim
1098
+ });
1099
+ module.exports = flagsBound;
1100
+ }
1101
+ });
1102
+
1103
+ // node_modules/es-get-iterator/node.js
1104
+ var require_node = __commonJS({
1105
+ "node_modules/es-get-iterator/node.js"(exports, module) {
1106
+ "use strict";
1107
+ var $iterator = Symbol.iterator;
1108
+ module.exports = function getIterator(iterable) {
1109
+ if (iterable != null && typeof iterable[$iterator] !== "undefined") {
1110
+ return iterable[$iterator]();
1111
+ }
1112
+ };
1113
+ }
1114
+ });
1115
+
1116
+ // node_modules/object-inspect/util.inspect.js
1117
+ var require_util_inspect = __commonJS({
1118
+ "node_modules/object-inspect/util.inspect.js"(exports, module) {
1119
+ module.exports = __require("util").inspect;
1120
+ }
1121
+ });
1122
+
1123
+ // node_modules/object-inspect/index.js
1124
+ var require_object_inspect = __commonJS({
1125
+ "node_modules/object-inspect/index.js"(exports, module) {
1126
+ var hasMap = typeof Map === "function" && Map.prototype;
1127
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
1128
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
1129
+ var mapForEach = hasMap && Map.prototype.forEach;
1130
+ var hasSet = typeof Set === "function" && Set.prototype;
1131
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
1132
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
1133
+ var setForEach = hasSet && Set.prototype.forEach;
1134
+ var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
1135
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
1136
+ var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
1137
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
1138
+ var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
1139
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
1140
+ var booleanValueOf = Boolean.prototype.valueOf;
1141
+ var objectToString = Object.prototype.toString;
1142
+ var functionToString = Function.prototype.toString;
1143
+ var $match = String.prototype.match;
1144
+ var $slice = String.prototype.slice;
1145
+ var $replace = String.prototype.replace;
1146
+ var $toUpperCase = String.prototype.toUpperCase;
1147
+ var $toLowerCase = String.prototype.toLowerCase;
1148
+ var $test = RegExp.prototype.test;
1149
+ var $concat = Array.prototype.concat;
1150
+ var $join = Array.prototype.join;
1151
+ var $arrSlice = Array.prototype.slice;
1152
+ var $floor = Math.floor;
1153
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
1154
+ var gOPS = Object.getOwnPropertySymbols;
1155
+ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
1156
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
1157
+ var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
1158
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1159
+ var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
1160
+ return O.__proto__;
1161
+ } : null);
1162
+ function addNumericSeparator(num, str) {
1163
+ if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
1164
+ return str;
1165
+ }
1166
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1167
+ if (typeof num === "number") {
1168
+ var int = num < 0 ? -$floor(-num) : $floor(num);
1169
+ if (int !== num) {
1170
+ var intStr = String(int);
1171
+ var dec = $slice.call(str, intStr.length + 1);
1172
+ return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
1173
+ }
1174
+ }
1175
+ return $replace.call(str, sepRegex, "$&_");
1176
+ }
1177
+ var utilInspect = require_util_inspect();
1178
+ var inspectCustom = utilInspect.custom;
1179
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
1180
+ module.exports = function inspect_(obj, options2, depth, seen) {
1181
+ var opts = options2 || {};
1182
+ if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
1183
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1184
+ }
1185
+ if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
1186
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1187
+ }
1188
+ var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
1189
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
1190
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
1191
+ }
1192
+ if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
1193
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1194
+ }
1195
+ if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
1196
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1197
+ }
1198
+ var numericSeparator = opts.numericSeparator;
1199
+ if (typeof obj === "undefined") {
1200
+ return "undefined";
1201
+ }
1202
+ if (obj === null) {
1203
+ return "null";
1204
+ }
1205
+ if (typeof obj === "boolean") {
1206
+ return obj ? "true" : "false";
1207
+ }
1208
+ if (typeof obj === "string") {
1209
+ return inspectString(obj, opts);
1210
+ }
1211
+ if (typeof obj === "number") {
1212
+ if (obj === 0) {
1213
+ return Infinity / obj > 0 ? "0" : "-0";
1214
+ }
1215
+ var str = String(obj);
1216
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
1217
+ }
1218
+ if (typeof obj === "bigint") {
1219
+ var bigIntStr = String(obj) + "n";
1220
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1221
+ }
1222
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
1223
+ if (typeof depth === "undefined") {
1224
+ depth = 0;
1225
+ }
1226
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
1227
+ return isArray(obj) ? "[Array]" : "[Object]";
1228
+ }
1229
+ var indent = getIndent(opts, depth);
1230
+ if (typeof seen === "undefined") {
1231
+ seen = [];
1232
+ } else if (indexOf(seen, obj) >= 0) {
1233
+ return "[Circular]";
1234
+ }
1235
+ function inspect(value, from, noIndent) {
1236
+ if (from) {
1237
+ seen = $arrSlice.call(seen);
1238
+ seen.push(from);
1239
+ }
1240
+ if (noIndent) {
1241
+ var newOpts = {
1242
+ depth: opts.depth
1243
+ };
1244
+ if (has(opts, "quoteStyle")) {
1245
+ newOpts.quoteStyle = opts.quoteStyle;
1246
+ }
1247
+ return inspect_(value, newOpts, depth + 1, seen);
1248
+ }
1249
+ return inspect_(value, opts, depth + 1, seen);
1250
+ }
1251
+ if (typeof obj === "function" && !isRegExp(obj)) {
1252
+ var name = nameOf(obj);
1253
+ var keys = arrObjKeys(obj, inspect);
1254
+ return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
1255
+ }
1256
+ if (isSymbol(obj)) {
1257
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
1258
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
1259
+ }
1260
+ if (isElement(obj)) {
1261
+ var s2 = "<" + $toLowerCase.call(String(obj.nodeName));
1262
+ var attrs = obj.attributes || [];
1263
+ for (var i = 0; i < attrs.length; i++) {
1264
+ s2 += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
1265
+ }
1266
+ s2 += ">";
1267
+ if (obj.childNodes && obj.childNodes.length) {
1268
+ s2 += "...";
1269
+ }
1270
+ s2 += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
1271
+ return s2;
1272
+ }
1273
+ if (isArray(obj)) {
1274
+ if (obj.length === 0) {
1275
+ return "[]";
1276
+ }
1277
+ var xs = arrObjKeys(obj, inspect);
1278
+ if (indent && !singleLineValues(xs)) {
1279
+ return "[" + indentedJoin(xs, indent) + "]";
1280
+ }
1281
+ return "[ " + $join.call(xs, ", ") + " ]";
1282
+ }
1283
+ if (isError(obj)) {
1284
+ var parts = arrObjKeys(obj, inspect);
1285
+ if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
1286
+ return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
1287
+ }
1288
+ if (parts.length === 0) {
1289
+ return "[" + String(obj) + "]";
1290
+ }
1291
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
1292
+ }
1293
+ if (typeof obj === "object" && customInspect) {
1294
+ if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
1295
+ return utilInspect(obj, { depth: maxDepth - depth });
1296
+ } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
1297
+ return obj.inspect();
1298
+ }
1299
+ }
1300
+ if (isMap(obj)) {
1301
+ var mapParts = [];
1302
+ if (mapForEach) {
1303
+ mapForEach.call(obj, function(value, key) {
1304
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
1305
+ });
1306
+ }
1307
+ return collectionOf("Map", mapSize.call(obj), mapParts, indent);
1308
+ }
1309
+ if (isSet(obj)) {
1310
+ var setParts = [];
1311
+ if (setForEach) {
1312
+ setForEach.call(obj, function(value) {
1313
+ setParts.push(inspect(value, obj));
1314
+ });
1315
+ }
1316
+ return collectionOf("Set", setSize.call(obj), setParts, indent);
1317
+ }
1318
+ if (isWeakMap(obj)) {
1319
+ return weakCollectionOf("WeakMap");
1320
+ }
1321
+ if (isWeakSet(obj)) {
1322
+ return weakCollectionOf("WeakSet");
1323
+ }
1324
+ if (isWeakRef(obj)) {
1325
+ return weakCollectionOf("WeakRef");
1326
+ }
1327
+ if (isNumber(obj)) {
1328
+ return markBoxed(inspect(Number(obj)));
1329
+ }
1330
+ if (isBigInt(obj)) {
1331
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1332
+ }
1333
+ if (isBoolean(obj)) {
1334
+ return markBoxed(booleanValueOf.call(obj));
1335
+ }
1336
+ if (isString(obj)) {
1337
+ return markBoxed(inspect(String(obj)));
1338
+ }
1339
+ if (!isDate(obj) && !isRegExp(obj)) {
1340
+ var ys = arrObjKeys(obj, inspect);
1341
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1342
+ var protoTag = obj instanceof Object ? "" : "null prototype";
1343
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
1344
+ var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
1345
+ var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
1346
+ if (ys.length === 0) {
1347
+ return tag + "{}";
1348
+ }
1349
+ if (indent) {
1350
+ return tag + "{" + indentedJoin(ys, indent) + "}";
1351
+ }
1352
+ return tag + "{ " + $join.call(ys, ", ") + " }";
1353
+ }
1354
+ return String(obj);
1355
+ };
1356
+ function wrapQuotes(s2, defaultStyle, opts) {
1357
+ var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
1358
+ return quoteChar + s2 + quoteChar;
1359
+ }
1360
+ function quote(s2) {
1361
+ return $replace.call(String(s2), /"/g, "&quot;");
1362
+ }
1363
+ function isArray(obj) {
1364
+ return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1365
+ }
1366
+ function isDate(obj) {
1367
+ return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1368
+ }
1369
+ function isRegExp(obj) {
1370
+ return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1371
+ }
1372
+ function isError(obj) {
1373
+ return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1374
+ }
1375
+ function isString(obj) {
1376
+ return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1377
+ }
1378
+ function isNumber(obj) {
1379
+ return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1380
+ }
1381
+ function isBoolean(obj) {
1382
+ return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1383
+ }
1384
+ function isSymbol(obj) {
1385
+ if (hasShammedSymbols) {
1386
+ return obj && typeof obj === "object" && obj instanceof Symbol;
1387
+ }
1388
+ if (typeof obj === "symbol") {
1389
+ return true;
1390
+ }
1391
+ if (!obj || typeof obj !== "object" || !symToString) {
1392
+ return false;
1393
+ }
1394
+ try {
1395
+ symToString.call(obj);
1396
+ return true;
1397
+ } catch (e) {
1398
+ }
1399
+ return false;
1400
+ }
1401
+ function isBigInt(obj) {
1402
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
1403
+ return false;
1404
+ }
1405
+ try {
1406
+ bigIntValueOf.call(obj);
1407
+ return true;
1408
+ } catch (e) {
1409
+ }
1410
+ return false;
1411
+ }
1412
+ var hasOwn = Object.prototype.hasOwnProperty || function(key) {
1413
+ return key in this;
1414
+ };
1415
+ function has(obj, key) {
1416
+ return hasOwn.call(obj, key);
1417
+ }
1418
+ function toStr(obj) {
1419
+ return objectToString.call(obj);
1420
+ }
1421
+ function nameOf(f2) {
1422
+ if (f2.name) {
1423
+ return f2.name;
1424
+ }
1425
+ var m2 = $match.call(functionToString.call(f2), /^function\s*([\w$]+)/);
1426
+ if (m2) {
1427
+ return m2[1];
1428
+ }
1429
+ return null;
1430
+ }
1431
+ function indexOf(xs, x2) {
1432
+ if (xs.indexOf) {
1433
+ return xs.indexOf(x2);
1434
+ }
1435
+ for (var i = 0, l2 = xs.length; i < l2; i++) {
1436
+ if (xs[i] === x2) {
1437
+ return i;
1438
+ }
1439
+ }
1440
+ return -1;
1441
+ }
1442
+ function isMap(x2) {
1443
+ if (!mapSize || !x2 || typeof x2 !== "object") {
1444
+ return false;
1445
+ }
1446
+ try {
1447
+ mapSize.call(x2);
1448
+ try {
1449
+ setSize.call(x2);
1450
+ } catch (s2) {
1451
+ return true;
1452
+ }
1453
+ return x2 instanceof Map;
1454
+ } catch (e) {
1455
+ }
1456
+ return false;
1457
+ }
1458
+ function isWeakMap(x2) {
1459
+ if (!weakMapHas || !x2 || typeof x2 !== "object") {
1460
+ return false;
1461
+ }
1462
+ try {
1463
+ weakMapHas.call(x2, weakMapHas);
1464
+ try {
1465
+ weakSetHas.call(x2, weakSetHas);
1466
+ } catch (s2) {
1467
+ return true;
1468
+ }
1469
+ return x2 instanceof WeakMap;
1470
+ } catch (e) {
1471
+ }
1472
+ return false;
1473
+ }
1474
+ function isWeakRef(x2) {
1475
+ if (!weakRefDeref || !x2 || typeof x2 !== "object") {
1476
+ return false;
1477
+ }
1478
+ try {
1479
+ weakRefDeref.call(x2);
1480
+ return true;
1481
+ } catch (e) {
1482
+ }
1483
+ return false;
1484
+ }
1485
+ function isSet(x2) {
1486
+ if (!setSize || !x2 || typeof x2 !== "object") {
1487
+ return false;
1488
+ }
1489
+ try {
1490
+ setSize.call(x2);
1491
+ try {
1492
+ mapSize.call(x2);
1493
+ } catch (m2) {
1494
+ return true;
1495
+ }
1496
+ return x2 instanceof Set;
1497
+ } catch (e) {
1498
+ }
1499
+ return false;
1500
+ }
1501
+ function isWeakSet(x2) {
1502
+ if (!weakSetHas || !x2 || typeof x2 !== "object") {
1503
+ return false;
1504
+ }
1505
+ try {
1506
+ weakSetHas.call(x2, weakSetHas);
1507
+ try {
1508
+ weakMapHas.call(x2, weakMapHas);
1509
+ } catch (s2) {
1510
+ return true;
1511
+ }
1512
+ return x2 instanceof WeakSet;
1513
+ } catch (e) {
1514
+ }
1515
+ return false;
1516
+ }
1517
+ function isElement(x2) {
1518
+ if (!x2 || typeof x2 !== "object") {
1519
+ return false;
1520
+ }
1521
+ if (typeof HTMLElement !== "undefined" && x2 instanceof HTMLElement) {
1522
+ return true;
1523
+ }
1524
+ return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function";
1525
+ }
1526
+ function inspectString(str, opts) {
1527
+ if (str.length > opts.maxStringLength) {
1528
+ var remaining = str.length - opts.maxStringLength;
1529
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
1530
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1531
+ }
1532
+ var s2 = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
1533
+ return wrapQuotes(s2, "single", opts);
1534
+ }
1535
+ function lowbyte(c2) {
1536
+ var n = c2.charCodeAt(0);
1537
+ var x2 = {
1538
+ 8: "b",
1539
+ 9: "t",
1540
+ 10: "n",
1541
+ 12: "f",
1542
+ 13: "r"
1543
+ }[n];
1544
+ if (x2) {
1545
+ return "\\" + x2;
1546
+ }
1547
+ return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
1548
+ }
1549
+ function markBoxed(str) {
1550
+ return "Object(" + str + ")";
1551
+ }
1552
+ function weakCollectionOf(type) {
1553
+ return type + " { ? }";
1554
+ }
1555
+ function collectionOf(type, size, entries, indent) {
1556
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
1557
+ return type + " (" + size + ") {" + joinedEntries + "}";
1558
+ }
1559
+ function singleLineValues(xs) {
1560
+ for (var i = 0; i < xs.length; i++) {
1561
+ if (indexOf(xs[i], "\n") >= 0) {
1562
+ return false;
1563
+ }
1564
+ }
1565
+ return true;
1566
+ }
1567
+ function getIndent(opts, depth) {
1568
+ var baseIndent;
1569
+ if (opts.indent === " ") {
1570
+ baseIndent = " ";
1571
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
1572
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
1573
+ } else {
1574
+ return null;
1575
+ }
1576
+ return {
1577
+ base: baseIndent,
1578
+ prev: $join.call(Array(depth + 1), baseIndent)
1579
+ };
1580
+ }
1581
+ function indentedJoin(xs, indent) {
1582
+ if (xs.length === 0) {
1583
+ return "";
1584
+ }
1585
+ var lineJoiner = "\n" + indent.prev + indent.base;
1586
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
1587
+ }
1588
+ function arrObjKeys(obj, inspect) {
1589
+ var isArr = isArray(obj);
1590
+ var xs = [];
1591
+ if (isArr) {
1592
+ xs.length = obj.length;
1593
+ for (var i = 0; i < obj.length; i++) {
1594
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
1595
+ }
1596
+ }
1597
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
1598
+ var symMap;
1599
+ if (hasShammedSymbols) {
1600
+ symMap = {};
1601
+ for (var k = 0; k < syms.length; k++) {
1602
+ symMap["$" + syms[k]] = syms[k];
1603
+ }
1604
+ }
1605
+ for (var key in obj) {
1606
+ if (!has(obj, key)) {
1607
+ continue;
1608
+ }
1609
+ if (isArr && String(Number(key)) === key && key < obj.length) {
1610
+ continue;
1611
+ }
1612
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
1613
+ continue;
1614
+ } else if ($test.call(/[^\w$]/, key)) {
1615
+ xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
1616
+ } else {
1617
+ xs.push(key + ": " + inspect(obj[key], obj));
1618
+ }
1619
+ }
1620
+ if (typeof gOPS === "function") {
1621
+ for (var j = 0; j < syms.length; j++) {
1622
+ if (isEnumerable.call(obj, syms[j])) {
1623
+ xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
1624
+ }
1625
+ }
1626
+ }
1627
+ return xs;
1628
+ }
1629
+ }
1630
+ });
1631
+
1632
+ // node_modules/side-channel/index.js
1633
+ var require_side_channel = __commonJS({
1634
+ "node_modules/side-channel/index.js"(exports, module) {
1635
+ "use strict";
1636
+ var GetIntrinsic = require_get_intrinsic();
1637
+ var callBound = require_callBound();
1638
+ var inspect = require_object_inspect();
1639
+ var $TypeError = GetIntrinsic("%TypeError%");
1640
+ var $WeakMap = GetIntrinsic("%WeakMap%", true);
1641
+ var $Map = GetIntrinsic("%Map%", true);
1642
+ var $weakMapGet = callBound("WeakMap.prototype.get", true);
1643
+ var $weakMapSet = callBound("WeakMap.prototype.set", true);
1644
+ var $weakMapHas = callBound("WeakMap.prototype.has", true);
1645
+ var $mapGet = callBound("Map.prototype.get", true);
1646
+ var $mapSet = callBound("Map.prototype.set", true);
1647
+ var $mapHas = callBound("Map.prototype.has", true);
1648
+ var listGetNode = function(list, key) {
1649
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1650
+ if (curr.key === key) {
1651
+ prev.next = curr.next;
1652
+ curr.next = list.next;
1653
+ list.next = curr;
1654
+ return curr;
1655
+ }
1656
+ }
1657
+ };
1658
+ var listGet = function(objects, key) {
1659
+ var node = listGetNode(objects, key);
1660
+ return node && node.value;
1661
+ };
1662
+ var listSet = function(objects, key, value) {
1663
+ var node = listGetNode(objects, key);
1664
+ if (node) {
1665
+ node.value = value;
1666
+ } else {
1667
+ objects.next = {
1668
+ // eslint-disable-line no-param-reassign
1669
+ key,
1670
+ next: objects.next,
1671
+ value
1672
+ };
1673
+ }
1674
+ };
1675
+ var listHas = function(objects, key) {
1676
+ return !!listGetNode(objects, key);
1677
+ };
1678
+ module.exports = function getSideChannel() {
1679
+ var $wm;
1680
+ var $m;
1681
+ var $o;
1682
+ var channel = {
1683
+ assert: function(key) {
1684
+ if (!channel.has(key)) {
1685
+ throw new $TypeError("Side channel does not contain " + inspect(key));
1686
+ }
1687
+ },
1688
+ get: function(key) {
1689
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1690
+ if ($wm) {
1691
+ return $weakMapGet($wm, key);
1692
+ }
1693
+ } else if ($Map) {
1694
+ if ($m) {
1695
+ return $mapGet($m, key);
1696
+ }
1697
+ } else {
1698
+ if ($o) {
1699
+ return listGet($o, key);
1700
+ }
1701
+ }
1702
+ },
1703
+ has: function(key) {
1704
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1705
+ if ($wm) {
1706
+ return $weakMapHas($wm, key);
1707
+ }
1708
+ } else if ($Map) {
1709
+ if ($m) {
1710
+ return $mapHas($m, key);
1711
+ }
1712
+ } else {
1713
+ if ($o) {
1714
+ return listHas($o, key);
1715
+ }
1716
+ }
1717
+ return false;
1718
+ },
1719
+ set: function(key, value) {
1720
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1721
+ if (!$wm) {
1722
+ $wm = new $WeakMap();
1723
+ }
1724
+ $weakMapSet($wm, key, value);
1725
+ } else if ($Map) {
1726
+ if (!$m) {
1727
+ $m = new $Map();
1728
+ }
1729
+ $mapSet($m, key, value);
1730
+ } else {
1731
+ if (!$o) {
1732
+ $o = { key: {}, next: null };
1733
+ }
1734
+ listSet($o, key, value);
1735
+ }
1736
+ }
1737
+ };
1738
+ return channel;
1739
+ };
1740
+ }
1741
+ });
1742
+
1743
+ // node_modules/object-is/implementation.js
1744
+ var require_implementation5 = __commonJS({
1745
+ "node_modules/object-is/implementation.js"(exports, module) {
1746
+ "use strict";
1747
+ var numberIsNaN = function(value) {
1748
+ return value !== value;
1749
+ };
1750
+ module.exports = function is(a, b) {
1751
+ if (a === 0 && b === 0) {
1752
+ return 1 / a === 1 / b;
1753
+ }
1754
+ if (a === b) {
1755
+ return true;
1756
+ }
1757
+ if (numberIsNaN(a) && numberIsNaN(b)) {
1758
+ return true;
1759
+ }
1760
+ return false;
1761
+ };
1762
+ }
1763
+ });
1764
+
1765
+ // node_modules/object-is/polyfill.js
1766
+ var require_polyfill3 = __commonJS({
1767
+ "node_modules/object-is/polyfill.js"(exports, module) {
1768
+ "use strict";
1769
+ var implementation = require_implementation5();
1770
+ module.exports = function getPolyfill() {
1771
+ return typeof Object.is === "function" ? Object.is : implementation;
1772
+ };
1773
+ }
1774
+ });
1775
+
1776
+ // node_modules/object-is/shim.js
1777
+ var require_shim3 = __commonJS({
1778
+ "node_modules/object-is/shim.js"(exports, module) {
1779
+ "use strict";
1780
+ var getPolyfill = require_polyfill3();
1781
+ var define = require_define_properties();
1782
+ module.exports = function shimObjectIs() {
1783
+ var polyfill = getPolyfill();
1784
+ define(Object, { is: polyfill }, {
1785
+ is: function testObjectIs() {
1786
+ return Object.is !== polyfill;
1787
+ }
1788
+ });
1789
+ return polyfill;
1790
+ };
1791
+ }
1792
+ });
1793
+
1794
+ // node_modules/object-is/index.js
1795
+ var require_object_is = __commonJS({
1796
+ "node_modules/object-is/index.js"(exports, module) {
1797
+ "use strict";
1798
+ var define = require_define_properties();
1799
+ var callBind = require_call_bind();
1800
+ var implementation = require_implementation5();
1801
+ var getPolyfill = require_polyfill3();
1802
+ var shim = require_shim3();
1803
+ var polyfill = callBind(getPolyfill(), Object);
1804
+ define(polyfill, {
1805
+ getPolyfill,
1806
+ implementation,
1807
+ shim
1808
+ });
1809
+ module.exports = polyfill;
1810
+ }
1811
+ });
1812
+
1813
+ // node_modules/has-tostringtag/shams.js
1814
+ var require_shams2 = __commonJS({
1815
+ "node_modules/has-tostringtag/shams.js"(exports, module) {
1816
+ "use strict";
1817
+ var hasSymbols = require_shams();
1818
+ module.exports = function hasToStringTagShams() {
1819
+ return hasSymbols() && !!Symbol.toStringTag;
1820
+ };
1821
+ }
1822
+ });
1823
+
1824
+ // node_modules/is-arguments/index.js
1825
+ var require_is_arguments = __commonJS({
1826
+ "node_modules/is-arguments/index.js"(exports, module) {
1827
+ "use strict";
1828
+ var hasToStringTag = require_shams2()();
1829
+ var callBound = require_callBound();
1830
+ var $toString = callBound("Object.prototype.toString");
1831
+ var isStandardArguments = function isArguments(value) {
1832
+ if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) {
1833
+ return false;
1834
+ }
1835
+ return $toString(value) === "[object Arguments]";
1836
+ };
1837
+ var isLegacyArguments = function isArguments(value) {
1838
+ if (isStandardArguments(value)) {
1839
+ return true;
1840
+ }
1841
+ return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]";
1842
+ };
1843
+ var supportsStandardArguments = function() {
1844
+ return isStandardArguments(arguments);
1845
+ }();
1846
+ isStandardArguments.isLegacyArguments = isLegacyArguments;
1847
+ module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
1848
+ }
1849
+ });
1850
+
1851
+ // node_modules/deep-equal/node_modules/isarray/index.js
1852
+ var require_isarray = __commonJS({
1853
+ "node_modules/deep-equal/node_modules/isarray/index.js"(exports, module) {
1854
+ var toString = {}.toString;
1855
+ module.exports = Array.isArray || function(arr) {
1856
+ return toString.call(arr) == "[object Array]";
1857
+ };
1858
+ }
1859
+ });
1860
+
1861
+ // node_modules/is-callable/index.js
1862
+ var require_is_callable = __commonJS({
1863
+ "node_modules/is-callable/index.js"(exports, module) {
1864
+ "use strict";
1865
+ var fnToStr = Function.prototype.toString;
1866
+ var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply;
1867
+ var badArrayLike;
1868
+ var isCallableMarker;
1869
+ if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") {
1870
+ try {
1871
+ badArrayLike = Object.defineProperty({}, "length", {
1872
+ get: function() {
1873
+ throw isCallableMarker;
1874
+ }
1875
+ });
1876
+ isCallableMarker = {};
1877
+ reflectApply(function() {
1878
+ throw 42;
1879
+ }, null, badArrayLike);
1880
+ } catch (_) {
1881
+ if (_ !== isCallableMarker) {
1882
+ reflectApply = null;
1883
+ }
1884
+ }
1885
+ } else {
1886
+ reflectApply = null;
1887
+ }
1888
+ var constructorRegex = /^\s*class\b/;
1889
+ var isES6ClassFn = function isES6ClassFunction(value) {
1890
+ try {
1891
+ var fnStr = fnToStr.call(value);
1892
+ return constructorRegex.test(fnStr);
1893
+ } catch (e) {
1894
+ return false;
1895
+ }
1896
+ };
1897
+ var tryFunctionObject = function tryFunctionToStr(value) {
1898
+ try {
1899
+ if (isES6ClassFn(value)) {
1900
+ return false;
1901
+ }
1902
+ fnToStr.call(value);
1903
+ return true;
1904
+ } catch (e) {
1905
+ return false;
1906
+ }
1907
+ };
1908
+ var toStr = Object.prototype.toString;
1909
+ var objectClass = "[object Object]";
1910
+ var fnClass = "[object Function]";
1911
+ var genClass = "[object GeneratorFunction]";
1912
+ var ddaClass = "[object HTMLAllCollection]";
1913
+ var ddaClass2 = "[object HTML document.all class]";
1914
+ var ddaClass3 = "[object HTMLCollection]";
1915
+ var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag;
1916
+ var isIE68 = !(0 in [,]);
1917
+ var isDDA = function isDocumentDotAll() {
1918
+ return false;
1919
+ };
1920
+ if (typeof document === "object") {
1921
+ all = document.all;
1922
+ if (toStr.call(all) === toStr.call(document.all)) {
1923
+ isDDA = function isDocumentDotAll(value) {
1924
+ if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) {
1925
+ try {
1926
+ var str = toStr.call(value);
1927
+ return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null;
1928
+ } catch (e) {
1929
+ }
1930
+ }
1931
+ return false;
1932
+ };
1933
+ }
1934
+ }
1935
+ var all;
1936
+ module.exports = reflectApply ? function isCallable(value) {
1937
+ if (isDDA(value)) {
1938
+ return true;
1939
+ }
1940
+ if (!value) {
1941
+ return false;
1942
+ }
1943
+ if (typeof value !== "function" && typeof value !== "object") {
1944
+ return false;
1945
+ }
1946
+ try {
1947
+ reflectApply(value, null, badArrayLike);
1948
+ } catch (e) {
1949
+ if (e !== isCallableMarker) {
1950
+ return false;
1951
+ }
1952
+ }
1953
+ return !isES6ClassFn(value) && tryFunctionObject(value);
1954
+ } : function isCallable(value) {
1955
+ if (isDDA(value)) {
1956
+ return true;
1957
+ }
1958
+ if (!value) {
1959
+ return false;
1960
+ }
1961
+ if (typeof value !== "function" && typeof value !== "object") {
1962
+ return false;
1963
+ }
1964
+ if (hasToStringTag) {
1965
+ return tryFunctionObject(value);
1966
+ }
1967
+ if (isES6ClassFn(value)) {
1968
+ return false;
1969
+ }
1970
+ var strClass = toStr.call(value);
1971
+ if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
1972
+ return false;
1973
+ }
1974
+ return tryFunctionObject(value);
1975
+ };
1976
+ }
1977
+ });
1978
+
1979
+ // node_modules/for-each/index.js
1980
+ var require_for_each = __commonJS({
1981
+ "node_modules/for-each/index.js"(exports, module) {
1982
+ "use strict";
1983
+ var isCallable = require_is_callable();
1984
+ var toStr = Object.prototype.toString;
1985
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1986
+ var forEachArray = function forEachArray2(array, iterator, receiver) {
1987
+ for (var i = 0, len = array.length; i < len; i++) {
1988
+ if (hasOwnProperty.call(array, i)) {
1989
+ if (receiver == null) {
1990
+ iterator(array[i], i, array);
1991
+ } else {
1992
+ iterator.call(receiver, array[i], i, array);
1993
+ }
1994
+ }
1995
+ }
1996
+ };
1997
+ var forEachString = function forEachString2(string, iterator, receiver) {
1998
+ for (var i = 0, len = string.length; i < len; i++) {
1999
+ if (receiver == null) {
2000
+ iterator(string.charAt(i), i, string);
2001
+ } else {
2002
+ iterator.call(receiver, string.charAt(i), i, string);
2003
+ }
2004
+ }
2005
+ };
2006
+ var forEachObject = function forEachObject2(object, iterator, receiver) {
2007
+ for (var k in object) {
2008
+ if (hasOwnProperty.call(object, k)) {
2009
+ if (receiver == null) {
2010
+ iterator(object[k], k, object);
2011
+ } else {
2012
+ iterator.call(receiver, object[k], k, object);
2013
+ }
2014
+ }
2015
+ }
2016
+ };
2017
+ var forEach = function forEach2(list, iterator, thisArg) {
2018
+ if (!isCallable(iterator)) {
2019
+ throw new TypeError("iterator must be a function");
2020
+ }
2021
+ var receiver;
2022
+ if (arguments.length >= 3) {
2023
+ receiver = thisArg;
2024
+ }
2025
+ if (toStr.call(list) === "[object Array]") {
2026
+ forEachArray(list, iterator, receiver);
2027
+ } else if (typeof list === "string") {
2028
+ forEachString(list, iterator, receiver);
2029
+ } else {
2030
+ forEachObject(list, iterator, receiver);
2031
+ }
2032
+ };
2033
+ module.exports = forEach;
2034
+ }
2035
+ });
2036
+
2037
+ // node_modules/available-typed-arrays/index.js
2038
+ var require_available_typed_arrays = __commonJS({
2039
+ "node_modules/available-typed-arrays/index.js"(exports, module) {
2040
+ "use strict";
2041
+ var possibleNames = [
2042
+ "BigInt64Array",
2043
+ "BigUint64Array",
2044
+ "Float32Array",
2045
+ "Float64Array",
2046
+ "Int16Array",
2047
+ "Int32Array",
2048
+ "Int8Array",
2049
+ "Uint16Array",
2050
+ "Uint32Array",
2051
+ "Uint8Array",
2052
+ "Uint8ClampedArray"
2053
+ ];
2054
+ var g2 = typeof globalThis === "undefined" ? global : globalThis;
2055
+ module.exports = function availableTypedArrays() {
2056
+ var out = [];
2057
+ for (var i = 0; i < possibleNames.length; i++) {
2058
+ if (typeof g2[possibleNames[i]] === "function") {
2059
+ out[out.length] = possibleNames[i];
2060
+ }
2061
+ }
2062
+ return out;
2063
+ };
2064
+ }
2065
+ });
2066
+
2067
+ // node_modules/gopd/index.js
2068
+ var require_gopd = __commonJS({
2069
+ "node_modules/gopd/index.js"(exports, module) {
2070
+ "use strict";
2071
+ var GetIntrinsic = require_get_intrinsic();
2072
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
2073
+ if ($gOPD) {
2074
+ try {
2075
+ $gOPD([], "length");
2076
+ } catch (e) {
2077
+ $gOPD = null;
2078
+ }
2079
+ }
2080
+ module.exports = $gOPD;
2081
+ }
2082
+ });
2083
+
2084
+ // node_modules/is-typed-array/index.js
2085
+ var require_is_typed_array = __commonJS({
2086
+ "node_modules/is-typed-array/index.js"(exports, module) {
2087
+ "use strict";
2088
+ var forEach = require_for_each();
2089
+ var availableTypedArrays = require_available_typed_arrays();
2090
+ var callBound = require_callBound();
2091
+ var $toString = callBound("Object.prototype.toString");
2092
+ var hasToStringTag = require_shams2()();
2093
+ var gOPD = require_gopd();
2094
+ var g2 = typeof globalThis === "undefined" ? global : globalThis;
2095
+ var typedArrays = availableTypedArrays();
2096
+ var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) {
2097
+ for (var i = 0; i < array.length; i += 1) {
2098
+ if (array[i] === value) {
2099
+ return i;
2100
+ }
2101
+ }
2102
+ return -1;
2103
+ };
2104
+ var $slice = callBound("String.prototype.slice");
2105
+ var toStrTags = {};
2106
+ var getPrototypeOf = Object.getPrototypeOf;
2107
+ if (hasToStringTag && gOPD && getPrototypeOf) {
2108
+ forEach(typedArrays, function(typedArray) {
2109
+ var arr = new g2[typedArray]();
2110
+ if (Symbol.toStringTag in arr) {
2111
+ var proto = getPrototypeOf(arr);
2112
+ var descriptor = gOPD(proto, Symbol.toStringTag);
2113
+ if (!descriptor) {
2114
+ var superProto = getPrototypeOf(proto);
2115
+ descriptor = gOPD(superProto, Symbol.toStringTag);
2116
+ }
2117
+ toStrTags[typedArray] = descriptor.get;
2118
+ }
2119
+ });
2120
+ }
2121
+ var tryTypedArrays = function tryAllTypedArrays(value) {
2122
+ var anyTrue = false;
2123
+ forEach(toStrTags, function(getter, typedArray) {
2124
+ if (!anyTrue) {
2125
+ try {
2126
+ anyTrue = getter.call(value) === typedArray;
2127
+ } catch (e) {
2128
+ }
2129
+ }
2130
+ });
2131
+ return anyTrue;
2132
+ };
2133
+ module.exports = function isTypedArray(value) {
2134
+ if (!value || typeof value !== "object") {
2135
+ return false;
2136
+ }
2137
+ if (!hasToStringTag || !(Symbol.toStringTag in value)) {
2138
+ var tag = $slice($toString(value), 8, -1);
2139
+ return $indexOf(typedArrays, tag) > -1;
2140
+ }
2141
+ if (!gOPD) {
2142
+ return false;
2143
+ }
2144
+ return tryTypedArrays(value);
2145
+ };
2146
+ }
2147
+ });
2148
+
2149
+ // node_modules/is-array-buffer/index.js
2150
+ var require_is_array_buffer = __commonJS({
2151
+ "node_modules/is-array-buffer/index.js"(exports, module) {
2152
+ "use strict";
2153
+ var callBind = require_call_bind();
2154
+ var callBound = require_callBound();
2155
+ var GetIntrinsic = require_get_intrinsic();
2156
+ var isTypedArray = require_is_typed_array();
2157
+ var $ArrayBuffer = GetIntrinsic("ArrayBuffer", true);
2158
+ var $Float32Array = GetIntrinsic("Float32Array", true);
2159
+ var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true);
2160
+ var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice;
2161
+ var $abSlice = abSlice && callBind(abSlice);
2162
+ module.exports = $byteLength || $abSlice ? function isArrayBuffer(obj) {
2163
+ if (!obj || typeof obj !== "object") {
2164
+ return false;
2165
+ }
2166
+ try {
2167
+ if ($byteLength) {
2168
+ $byteLength(obj);
2169
+ } else {
2170
+ $abSlice(obj, 0);
2171
+ }
2172
+ return true;
2173
+ } catch (e) {
2174
+ return false;
2175
+ }
2176
+ } : $Float32Array ? function IsArrayBuffer(obj) {
2177
+ try {
2178
+ return new $Float32Array(obj).buffer === obj && !isTypedArray(obj);
2179
+ } catch (e) {
2180
+ return typeof obj === "object" && e.name === "RangeError";
2181
+ }
2182
+ } : function isArrayBuffer(obj) {
2183
+ return false;
2184
+ };
2185
+ }
2186
+ });
2187
+
2188
+ // node_modules/is-date-object/index.js
2189
+ var require_is_date_object = __commonJS({
2190
+ "node_modules/is-date-object/index.js"(exports, module) {
2191
+ "use strict";
2192
+ var getDay = Date.prototype.getDay;
2193
+ var tryDateObject = function tryDateGetDayCall(value) {
2194
+ try {
2195
+ getDay.call(value);
2196
+ return true;
2197
+ } catch (e) {
2198
+ return false;
2199
+ }
2200
+ };
2201
+ var toStr = Object.prototype.toString;
2202
+ var dateClass = "[object Date]";
2203
+ var hasToStringTag = require_shams2()();
2204
+ module.exports = function isDateObject(value) {
2205
+ if (typeof value !== "object" || value === null) {
2206
+ return false;
2207
+ }
2208
+ return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
2209
+ };
2210
+ }
2211
+ });
2212
+
2213
+ // node_modules/is-regex/index.js
2214
+ var require_is_regex = __commonJS({
2215
+ "node_modules/is-regex/index.js"(exports, module) {
2216
+ "use strict";
2217
+ var callBound = require_callBound();
2218
+ var hasToStringTag = require_shams2()();
2219
+ var has;
2220
+ var $exec;
2221
+ var isRegexMarker;
2222
+ var badStringifier;
2223
+ if (hasToStringTag) {
2224
+ has = callBound("Object.prototype.hasOwnProperty");
2225
+ $exec = callBound("RegExp.prototype.exec");
2226
+ isRegexMarker = {};
2227
+ throwRegexMarker = function() {
2228
+ throw isRegexMarker;
2229
+ };
2230
+ badStringifier = {
2231
+ toString: throwRegexMarker,
2232
+ valueOf: throwRegexMarker
2233
+ };
2234
+ if (typeof Symbol.toPrimitive === "symbol") {
2235
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
2236
+ }
2237
+ }
2238
+ var throwRegexMarker;
2239
+ var $toString = callBound("Object.prototype.toString");
2240
+ var gOPD = Object.getOwnPropertyDescriptor;
2241
+ var regexClass = "[object RegExp]";
2242
+ module.exports = hasToStringTag ? function isRegex(value) {
2243
+ if (!value || typeof value !== "object") {
2244
+ return false;
2245
+ }
2246
+ var descriptor = gOPD(value, "lastIndex");
2247
+ var hasLastIndexDataProperty = descriptor && has(descriptor, "value");
2248
+ if (!hasLastIndexDataProperty) {
2249
+ return false;
2250
+ }
2251
+ try {
2252
+ $exec(value, badStringifier);
2253
+ } catch (e) {
2254
+ return e === isRegexMarker;
2255
+ }
2256
+ } : function isRegex(value) {
2257
+ if (!value || typeof value !== "object" && typeof value !== "function") {
2258
+ return false;
2259
+ }
2260
+ return $toString(value) === regexClass;
2261
+ };
2262
+ }
2263
+ });
2264
+
2265
+ // node_modules/is-shared-array-buffer/index.js
2266
+ var require_is_shared_array_buffer = __commonJS({
2267
+ "node_modules/is-shared-array-buffer/index.js"(exports, module) {
2268
+ "use strict";
2269
+ var callBound = require_callBound();
2270
+ var $byteLength = callBound("SharedArrayBuffer.prototype.byteLength", true);
2271
+ module.exports = $byteLength ? function isSharedArrayBuffer(obj) {
2272
+ if (!obj || typeof obj !== "object") {
2273
+ return false;
2274
+ }
2275
+ try {
2276
+ $byteLength(obj);
2277
+ return true;
2278
+ } catch (e) {
2279
+ return false;
2280
+ }
2281
+ } : function isSharedArrayBuffer(obj) {
2282
+ return false;
2283
+ };
2284
+ }
2285
+ });
2286
+
2287
+ // node_modules/is-string/index.js
2288
+ var require_is_string = __commonJS({
2289
+ "node_modules/is-string/index.js"(exports, module) {
2290
+ "use strict";
2291
+ var strValue = String.prototype.valueOf;
2292
+ var tryStringObject = function tryStringObject2(value) {
2293
+ try {
2294
+ strValue.call(value);
2295
+ return true;
2296
+ } catch (e) {
2297
+ return false;
2298
+ }
2299
+ };
2300
+ var toStr = Object.prototype.toString;
2301
+ var strClass = "[object String]";
2302
+ var hasToStringTag = require_shams2()();
2303
+ module.exports = function isString(value) {
2304
+ if (typeof value === "string") {
2305
+ return true;
2306
+ }
2307
+ if (typeof value !== "object") {
2308
+ return false;
2309
+ }
2310
+ return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
2311
+ };
2312
+ }
2313
+ });
2314
+
2315
+ // node_modules/is-number-object/index.js
2316
+ var require_is_number_object = __commonJS({
2317
+ "node_modules/is-number-object/index.js"(exports, module) {
2318
+ "use strict";
2319
+ var numToStr = Number.prototype.toString;
2320
+ var tryNumberObject = function tryNumberObject2(value) {
2321
+ try {
2322
+ numToStr.call(value);
2323
+ return true;
2324
+ } catch (e) {
2325
+ return false;
2326
+ }
2327
+ };
2328
+ var toStr = Object.prototype.toString;
2329
+ var numClass = "[object Number]";
2330
+ var hasToStringTag = require_shams2()();
2331
+ module.exports = function isNumberObject(value) {
2332
+ if (typeof value === "number") {
2333
+ return true;
2334
+ }
2335
+ if (typeof value !== "object") {
2336
+ return false;
2337
+ }
2338
+ return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
2339
+ };
2340
+ }
2341
+ });
2342
+
2343
+ // node_modules/is-boolean-object/index.js
2344
+ var require_is_boolean_object = __commonJS({
2345
+ "node_modules/is-boolean-object/index.js"(exports, module) {
2346
+ "use strict";
2347
+ var callBound = require_callBound();
2348
+ var $boolToStr = callBound("Boolean.prototype.toString");
2349
+ var $toString = callBound("Object.prototype.toString");
2350
+ var tryBooleanObject = function booleanBrandCheck(value) {
2351
+ try {
2352
+ $boolToStr(value);
2353
+ return true;
2354
+ } catch (e) {
2355
+ return false;
2356
+ }
2357
+ };
2358
+ var boolClass = "[object Boolean]";
2359
+ var hasToStringTag = require_shams2()();
2360
+ module.exports = function isBoolean(value) {
2361
+ if (typeof value === "boolean") {
2362
+ return true;
2363
+ }
2364
+ if (value === null || typeof value !== "object") {
2365
+ return false;
2366
+ }
2367
+ return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
2368
+ };
2369
+ }
2370
+ });
2371
+
2372
+ // node_modules/is-symbol/index.js
2373
+ var require_is_symbol = __commonJS({
2374
+ "node_modules/is-symbol/index.js"(exports, module) {
2375
+ "use strict";
2376
+ var toStr = Object.prototype.toString;
2377
+ var hasSymbols = require_has_symbols()();
2378
+ if (hasSymbols) {
2379
+ symToStr = Symbol.prototype.toString;
2380
+ symStringRegex = /^Symbol\(.*\)$/;
2381
+ isSymbolObject = function isRealSymbolObject(value) {
2382
+ if (typeof value.valueOf() !== "symbol") {
2383
+ return false;
2384
+ }
2385
+ return symStringRegex.test(symToStr.call(value));
2386
+ };
2387
+ module.exports = function isSymbol(value) {
2388
+ if (typeof value === "symbol") {
2389
+ return true;
2390
+ }
2391
+ if (toStr.call(value) !== "[object Symbol]") {
2392
+ return false;
2393
+ }
2394
+ try {
2395
+ return isSymbolObject(value);
2396
+ } catch (e) {
2397
+ return false;
2398
+ }
2399
+ };
2400
+ } else {
2401
+ module.exports = function isSymbol(value) {
2402
+ return false;
2403
+ };
2404
+ }
2405
+ var symToStr;
2406
+ var symStringRegex;
2407
+ var isSymbolObject;
2408
+ }
2409
+ });
2410
+
2411
+ // node_modules/has-bigints/index.js
2412
+ var require_has_bigints = __commonJS({
2413
+ "node_modules/has-bigints/index.js"(exports, module) {
2414
+ "use strict";
2415
+ var $BigInt = typeof BigInt !== "undefined" && BigInt;
2416
+ module.exports = function hasNativeBigInts() {
2417
+ return typeof $BigInt === "function" && typeof BigInt === "function" && typeof $BigInt(42) === "bigint" && typeof BigInt(42) === "bigint";
2418
+ };
2419
+ }
2420
+ });
2421
+
2422
+ // node_modules/is-bigint/index.js
2423
+ var require_is_bigint = __commonJS({
2424
+ "node_modules/is-bigint/index.js"(exports, module) {
2425
+ "use strict";
2426
+ var hasBigInts = require_has_bigints()();
2427
+ if (hasBigInts) {
2428
+ bigIntValueOf = BigInt.prototype.valueOf;
2429
+ tryBigInt = function tryBigIntObject(value) {
2430
+ try {
2431
+ bigIntValueOf.call(value);
2432
+ return true;
2433
+ } catch (e) {
2434
+ }
2435
+ return false;
2436
+ };
2437
+ module.exports = function isBigInt(value) {
2438
+ if (value === null || typeof value === "undefined" || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "function") {
2439
+ return false;
2440
+ }
2441
+ if (typeof value === "bigint") {
2442
+ return true;
2443
+ }
2444
+ return tryBigInt(value);
2445
+ };
2446
+ } else {
2447
+ module.exports = function isBigInt(value) {
2448
+ return false;
2449
+ };
2450
+ }
2451
+ var bigIntValueOf;
2452
+ var tryBigInt;
2453
+ }
2454
+ });
2455
+
2456
+ // node_modules/which-boxed-primitive/index.js
2457
+ var require_which_boxed_primitive = __commonJS({
2458
+ "node_modules/which-boxed-primitive/index.js"(exports, module) {
2459
+ "use strict";
2460
+ var isString = require_is_string();
2461
+ var isNumber = require_is_number_object();
2462
+ var isBoolean = require_is_boolean_object();
2463
+ var isSymbol = require_is_symbol();
2464
+ var isBigInt = require_is_bigint();
2465
+ module.exports = function whichBoxedPrimitive(value) {
2466
+ if (value == null || typeof value !== "object" && typeof value !== "function") {
2467
+ return null;
2468
+ }
2469
+ if (isString(value)) {
2470
+ return "String";
2471
+ }
2472
+ if (isNumber(value)) {
2473
+ return "Number";
2474
+ }
2475
+ if (isBoolean(value)) {
2476
+ return "Boolean";
2477
+ }
2478
+ if (isSymbol(value)) {
2479
+ return "Symbol";
2480
+ }
2481
+ if (isBigInt(value)) {
2482
+ return "BigInt";
2483
+ }
2484
+ };
2485
+ }
2486
+ });
2487
+
2488
+ // node_modules/is-map/index.js
2489
+ var require_is_map = __commonJS({
2490
+ "node_modules/is-map/index.js"(exports, module) {
2491
+ "use strict";
2492
+ var $Map = typeof Map === "function" && Map.prototype ? Map : null;
2493
+ var $Set = typeof Set === "function" && Set.prototype ? Set : null;
2494
+ var exported;
2495
+ if (!$Map) {
2496
+ exported = function isMap(x2) {
2497
+ return false;
2498
+ };
2499
+ }
2500
+ var $mapHas = $Map ? Map.prototype.has : null;
2501
+ var $setHas = $Set ? Set.prototype.has : null;
2502
+ if (!exported && !$mapHas) {
2503
+ exported = function isMap(x2) {
2504
+ return false;
2505
+ };
2506
+ }
2507
+ module.exports = exported || function isMap(x2) {
2508
+ if (!x2 || typeof x2 !== "object") {
2509
+ return false;
2510
+ }
2511
+ try {
2512
+ $mapHas.call(x2);
2513
+ if ($setHas) {
2514
+ try {
2515
+ $setHas.call(x2);
2516
+ } catch (e) {
2517
+ return true;
2518
+ }
2519
+ }
2520
+ return x2 instanceof $Map;
2521
+ } catch (e) {
2522
+ }
2523
+ return false;
2524
+ };
2525
+ }
2526
+ });
2527
+
2528
+ // node_modules/is-set/index.js
2529
+ var require_is_set = __commonJS({
2530
+ "node_modules/is-set/index.js"(exports, module) {
2531
+ "use strict";
2532
+ var $Map = typeof Map === "function" && Map.prototype ? Map : null;
2533
+ var $Set = typeof Set === "function" && Set.prototype ? Set : null;
2534
+ var exported;
2535
+ if (!$Set) {
2536
+ exported = function isSet(x2) {
2537
+ return false;
2538
+ };
2539
+ }
2540
+ var $mapHas = $Map ? Map.prototype.has : null;
2541
+ var $setHas = $Set ? Set.prototype.has : null;
2542
+ if (!exported && !$setHas) {
2543
+ exported = function isSet(x2) {
2544
+ return false;
2545
+ };
2546
+ }
2547
+ module.exports = exported || function isSet(x2) {
2548
+ if (!x2 || typeof x2 !== "object") {
2549
+ return false;
2550
+ }
2551
+ try {
2552
+ $setHas.call(x2);
2553
+ if ($mapHas) {
2554
+ try {
2555
+ $mapHas.call(x2);
2556
+ } catch (e) {
2557
+ return true;
2558
+ }
2559
+ }
2560
+ return x2 instanceof $Set;
2561
+ } catch (e) {
2562
+ }
2563
+ return false;
2564
+ };
2565
+ }
2566
+ });
2567
+
2568
+ // node_modules/is-weakmap/index.js
2569
+ var require_is_weakmap = __commonJS({
2570
+ "node_modules/is-weakmap/index.js"(exports, module) {
2571
+ "use strict";
2572
+ var $WeakMap = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap : null;
2573
+ var $WeakSet = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet : null;
2574
+ var exported;
2575
+ if (!$WeakMap) {
2576
+ exported = function isWeakMap(x2) {
2577
+ return false;
2578
+ };
2579
+ }
2580
+ var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
2581
+ var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
2582
+ if (!exported && !$mapHas) {
2583
+ exported = function isWeakMap(x2) {
2584
+ return false;
2585
+ };
2586
+ }
2587
+ module.exports = exported || function isWeakMap(x2) {
2588
+ if (!x2 || typeof x2 !== "object") {
2589
+ return false;
2590
+ }
2591
+ try {
2592
+ $mapHas.call(x2, $mapHas);
2593
+ if ($setHas) {
2594
+ try {
2595
+ $setHas.call(x2, $setHas);
2596
+ } catch (e) {
2597
+ return true;
2598
+ }
2599
+ }
2600
+ return x2 instanceof $WeakMap;
2601
+ } catch (e) {
2602
+ }
2603
+ return false;
2604
+ };
2605
+ }
2606
+ });
2607
+
2608
+ // node_modules/is-weakset/index.js
2609
+ var require_is_weakset = __commonJS({
2610
+ "node_modules/is-weakset/index.js"(exports, module) {
2611
+ "use strict";
2612
+ var GetIntrinsic = require_get_intrinsic();
2613
+ var callBound = require_callBound();
2614
+ var $WeakSet = GetIntrinsic("%WeakSet%", true);
2615
+ var $setHas = callBound("WeakSet.prototype.has", true);
2616
+ if ($setHas) {
2617
+ $mapHas = callBound("WeakMap.prototype.has", true);
2618
+ module.exports = function isWeakSet(x2) {
2619
+ if (!x2 || typeof x2 !== "object") {
2620
+ return false;
2621
+ }
2622
+ try {
2623
+ $setHas(x2, $setHas);
2624
+ if ($mapHas) {
2625
+ try {
2626
+ $mapHas(x2, $mapHas);
2627
+ } catch (e) {
2628
+ return true;
2629
+ }
2630
+ }
2631
+ return x2 instanceof $WeakSet;
2632
+ } catch (e) {
2633
+ }
2634
+ return false;
2635
+ };
2636
+ } else {
2637
+ module.exports = function isWeakSet(x2) {
2638
+ return false;
2639
+ };
2640
+ }
2641
+ var $mapHas;
2642
+ }
2643
+ });
2644
+
2645
+ // node_modules/which-collection/index.js
2646
+ var require_which_collection = __commonJS({
2647
+ "node_modules/which-collection/index.js"(exports, module) {
2648
+ "use strict";
2649
+ var isMap = require_is_map();
2650
+ var isSet = require_is_set();
2651
+ var isWeakMap = require_is_weakmap();
2652
+ var isWeakSet = require_is_weakset();
2653
+ module.exports = function whichCollection(value) {
2654
+ if (value && typeof value === "object") {
2655
+ if (isMap(value)) {
2656
+ return "Map";
2657
+ }
2658
+ if (isSet(value)) {
2659
+ return "Set";
2660
+ }
2661
+ if (isWeakMap(value)) {
2662
+ return "WeakMap";
2663
+ }
2664
+ if (isWeakSet(value)) {
2665
+ return "WeakSet";
2666
+ }
2667
+ }
2668
+ return false;
2669
+ };
2670
+ }
2671
+ });
2672
+
2673
+ // node_modules/which-typed-array/index.js
2674
+ var require_which_typed_array = __commonJS({
2675
+ "node_modules/which-typed-array/index.js"(exports, module) {
2676
+ "use strict";
2677
+ var forEach = require_for_each();
2678
+ var availableTypedArrays = require_available_typed_arrays();
2679
+ var callBound = require_callBound();
2680
+ var gOPD = require_gopd();
2681
+ var $toString = callBound("Object.prototype.toString");
2682
+ var hasToStringTag = require_shams2()();
2683
+ var g2 = typeof globalThis === "undefined" ? global : globalThis;
2684
+ var typedArrays = availableTypedArrays();
2685
+ var $slice = callBound("String.prototype.slice");
2686
+ var toStrTags = {};
2687
+ var getPrototypeOf = Object.getPrototypeOf;
2688
+ if (hasToStringTag && gOPD && getPrototypeOf) {
2689
+ forEach(typedArrays, function(typedArray) {
2690
+ if (typeof g2[typedArray] === "function") {
2691
+ var arr = new g2[typedArray]();
2692
+ if (Symbol.toStringTag in arr) {
2693
+ var proto = getPrototypeOf(arr);
2694
+ var descriptor = gOPD(proto, Symbol.toStringTag);
2695
+ if (!descriptor) {
2696
+ var superProto = getPrototypeOf(proto);
2697
+ descriptor = gOPD(superProto, Symbol.toStringTag);
2698
+ }
2699
+ toStrTags[typedArray] = descriptor.get;
2700
+ }
2701
+ }
2702
+ });
2703
+ }
2704
+ var tryTypedArrays = function tryAllTypedArrays(value) {
2705
+ var foundName = false;
2706
+ forEach(toStrTags, function(getter, typedArray) {
2707
+ if (!foundName) {
2708
+ try {
2709
+ var name = getter.call(value);
2710
+ if (name === typedArray) {
2711
+ foundName = name;
2712
+ }
2713
+ } catch (e) {
2714
+ }
2715
+ }
2716
+ });
2717
+ return foundName;
2718
+ };
2719
+ var isTypedArray = require_is_typed_array();
2720
+ module.exports = function whichTypedArray(value) {
2721
+ if (!isTypedArray(value)) {
2722
+ return false;
2723
+ }
2724
+ if (!hasToStringTag || !(Symbol.toStringTag in value)) {
2725
+ return $slice($toString(value), 8, -1);
2726
+ }
2727
+ return tryTypedArrays(value);
2728
+ };
2729
+ }
2730
+ });
2731
+
2732
+ // node_modules/deep-equal/index.js
2733
+ var require_deep_equal = __commonJS({
2734
+ "node_modules/deep-equal/index.js"(exports, module) {
2735
+ "use strict";
2736
+ var assign = require_object();
2737
+ var callBound = require_callBound();
2738
+ var flags = require_regexp_prototype();
2739
+ var GetIntrinsic = require_get_intrinsic();
2740
+ var getIterator = require_node();
2741
+ var getSideChannel = require_side_channel();
2742
+ var is = require_object_is();
2743
+ var isArguments = require_is_arguments();
2744
+ var isArray = require_isarray();
2745
+ var isArrayBuffer = require_is_array_buffer();
2746
+ var isDate = require_is_date_object();
2747
+ var isRegex = require_is_regex();
2748
+ var isSharedArrayBuffer = require_is_shared_array_buffer();
2749
+ var objectKeys = require_object_keys();
2750
+ var whichBoxedPrimitive = require_which_boxed_primitive();
2751
+ var whichCollection = require_which_collection();
2752
+ var whichTypedArray = require_which_typed_array();
2753
+ var byteLength = callBound("ArrayBuffer.prototype.byteLength", true) || function byteLength2(ab) {
2754
+ return ab.byteLength;
2755
+ };
2756
+ var sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true);
2757
+ var $getTime = callBound("Date.prototype.getTime");
2758
+ var gPO = Object.getPrototypeOf;
2759
+ var $objToString = callBound("Object.prototype.toString");
2760
+ var $Set = GetIntrinsic("%Set%", true);
2761
+ var $mapHas = callBound("Map.prototype.has", true);
2762
+ var $mapGet = callBound("Map.prototype.get", true);
2763
+ var $mapSize = callBound("Map.prototype.size", true);
2764
+ var $setAdd = callBound("Set.prototype.add", true);
2765
+ var $setDelete = callBound("Set.prototype.delete", true);
2766
+ var $setHas = callBound("Set.prototype.has", true);
2767
+ var $setSize = callBound("Set.prototype.size", true);
2768
+ function setHasEqualElement(set, val1, opts, channel) {
2769
+ var i = getIterator(set);
2770
+ var result;
2771
+ while ((result = i.next()) && !result.done) {
2772
+ if (internalDeepEqual(val1, result.value, opts, channel)) {
2773
+ $setDelete(set, result.value);
2774
+ return true;
2775
+ }
2776
+ }
2777
+ return false;
2778
+ }
2779
+ function findLooseMatchingPrimitives(prim) {
2780
+ if (typeof prim === "undefined") {
2781
+ return null;
2782
+ }
2783
+ if (typeof prim === "object") {
2784
+ return void 0;
2785
+ }
2786
+ if (typeof prim === "symbol") {
2787
+ return false;
2788
+ }
2789
+ if (typeof prim === "string" || typeof prim === "number") {
2790
+ return +prim === +prim;
2791
+ }
2792
+ return true;
2793
+ }
2794
+ function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
2795
+ var altValue = findLooseMatchingPrimitives(prim);
2796
+ if (altValue != null) {
2797
+ return altValue;
2798
+ }
2799
+ var curB = $mapGet(b, altValue);
2800
+ var looseOpts = assign({}, opts, { strict: false });
2801
+ if (typeof curB === "undefined" && !$mapHas(b, altValue) || !internalDeepEqual(item, curB, looseOpts, channel)) {
2802
+ return false;
2803
+ }
2804
+ return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
2805
+ }
2806
+ function setMightHaveLoosePrim(a, b, prim) {
2807
+ var altValue = findLooseMatchingPrimitives(prim);
2808
+ if (altValue != null) {
2809
+ return altValue;
2810
+ }
2811
+ return $setHas(b, altValue) && !$setHas(a, altValue);
2812
+ }
2813
+ function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
2814
+ var i = getIterator(set);
2815
+ var result;
2816
+ var key2;
2817
+ while ((result = i.next()) && !result.done) {
2818
+ key2 = result.value;
2819
+ if (
2820
+ // eslint-disable-next-line no-use-before-define
2821
+ internalDeepEqual(key1, key2, opts, channel) && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
2822
+ ) {
2823
+ $setDelete(set, key2);
2824
+ return true;
2825
+ }
2826
+ }
2827
+ return false;
2828
+ }
2829
+ function internalDeepEqual(actual, expected, options2, channel) {
2830
+ var opts = options2 || {};
2831
+ if (opts.strict ? is(actual, expected) : actual === expected) {
2832
+ return true;
2833
+ }
2834
+ var actualBoxed = whichBoxedPrimitive(actual);
2835
+ var expectedBoxed = whichBoxedPrimitive(expected);
2836
+ if (actualBoxed !== expectedBoxed) {
2837
+ return false;
2838
+ }
2839
+ if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") {
2840
+ return opts.strict ? is(actual, expected) : actual == expected;
2841
+ }
2842
+ var hasActual = channel.has(actual);
2843
+ var hasExpected = channel.has(expected);
2844
+ var sentinel;
2845
+ if (hasActual && hasExpected) {
2846
+ if (channel.get(actual) === channel.get(expected)) {
2847
+ return true;
2848
+ }
2849
+ } else {
2850
+ sentinel = {};
2851
+ }
2852
+ if (!hasActual) {
2853
+ channel.set(actual, sentinel);
2854
+ }
2855
+ if (!hasExpected) {
2856
+ channel.set(expected, sentinel);
2857
+ }
2858
+ return objEquiv(actual, expected, opts, channel);
2859
+ }
2860
+ function isBuffer(x2) {
2861
+ if (!x2 || typeof x2 !== "object" || typeof x2.length !== "number") {
2862
+ return false;
2863
+ }
2864
+ if (typeof x2.copy !== "function" || typeof x2.slice !== "function") {
2865
+ return false;
2866
+ }
2867
+ if (x2.length > 0 && typeof x2[0] !== "number") {
2868
+ return false;
2869
+ }
2870
+ return !!(x2.constructor && x2.constructor.isBuffer && x2.constructor.isBuffer(x2));
2871
+ }
2872
+ function setEquiv(a, b, opts, channel) {
2873
+ if ($setSize(a) !== $setSize(b)) {
2874
+ return false;
2875
+ }
2876
+ var iA = getIterator(a);
2877
+ var iB = getIterator(b);
2878
+ var resultA;
2879
+ var resultB;
2880
+ var set;
2881
+ while ((resultA = iA.next()) && !resultA.done) {
2882
+ if (resultA.value && typeof resultA.value === "object") {
2883
+ if (!set) {
2884
+ set = new $Set();
2885
+ }
2886
+ $setAdd(set, resultA.value);
2887
+ } else if (!$setHas(b, resultA.value)) {
2888
+ if (opts.strict) {
2889
+ return false;
2890
+ }
2891
+ if (!setMightHaveLoosePrim(a, b, resultA.value)) {
2892
+ return false;
2893
+ }
2894
+ if (!set) {
2895
+ set = new $Set();
2896
+ }
2897
+ $setAdd(set, resultA.value);
2898
+ }
2899
+ }
2900
+ if (set) {
2901
+ while ((resultB = iB.next()) && !resultB.done) {
2902
+ if (resultB.value && typeof resultB.value === "object") {
2903
+ if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
2904
+ return false;
2905
+ }
2906
+ } else if (!opts.strict && !$setHas(a, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) {
2907
+ return false;
2908
+ }
2909
+ }
2910
+ return $setSize(set) === 0;
2911
+ }
2912
+ return true;
2913
+ }
2914
+ function mapEquiv(a, b, opts, channel) {
2915
+ if ($mapSize(a) !== $mapSize(b)) {
2916
+ return false;
2917
+ }
2918
+ var iA = getIterator(a);
2919
+ var iB = getIterator(b);
2920
+ var resultA;
2921
+ var resultB;
2922
+ var set;
2923
+ var key;
2924
+ var item1;
2925
+ var item2;
2926
+ while ((resultA = iA.next()) && !resultA.done) {
2927
+ key = resultA.value[0];
2928
+ item1 = resultA.value[1];
2929
+ if (key && typeof key === "object") {
2930
+ if (!set) {
2931
+ set = new $Set();
2932
+ }
2933
+ $setAdd(set, key);
2934
+ } else {
2935
+ item2 = $mapGet(b, key);
2936
+ if (typeof item2 === "undefined" && !$mapHas(b, key) || !internalDeepEqual(item1, item2, opts, channel)) {
2937
+ if (opts.strict) {
2938
+ return false;
2939
+ }
2940
+ if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
2941
+ return false;
2942
+ }
2943
+ if (!set) {
2944
+ set = new $Set();
2945
+ }
2946
+ $setAdd(set, key);
2947
+ }
2948
+ }
2949
+ }
2950
+ if (set) {
2951
+ while ((resultB = iB.next()) && !resultB.done) {
2952
+ key = resultB.value[0];
2953
+ item2 = resultB.value[1];
2954
+ if (key && typeof key === "object") {
2955
+ if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
2956
+ return false;
2957
+ }
2958
+ } else if (!opts.strict && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel)) && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)) {
2959
+ return false;
2960
+ }
2961
+ }
2962
+ return $setSize(set) === 0;
2963
+ }
2964
+ return true;
2965
+ }
2966
+ function objEquiv(a, b, opts, channel) {
2967
+ var i, key;
2968
+ if (typeof a !== typeof b) {
2969
+ return false;
2970
+ }
2971
+ if (a == null || b == null) {
2972
+ return false;
2973
+ }
2974
+ if ($objToString(a) !== $objToString(b)) {
2975
+ return false;
2976
+ }
2977
+ if (isArguments(a) !== isArguments(b)) {
2978
+ return false;
2979
+ }
2980
+ var aIsArray = isArray(a);
2981
+ var bIsArray = isArray(b);
2982
+ if (aIsArray !== bIsArray) {
2983
+ return false;
2984
+ }
2985
+ var aIsError = a instanceof Error;
2986
+ var bIsError = b instanceof Error;
2987
+ if (aIsError !== bIsError) {
2988
+ return false;
2989
+ }
2990
+ if (aIsError || bIsError) {
2991
+ if (a.name !== b.name || a.message !== b.message) {
2992
+ return false;
2993
+ }
2994
+ }
2995
+ var aIsRegex = isRegex(a);
2996
+ var bIsRegex = isRegex(b);
2997
+ if (aIsRegex !== bIsRegex) {
2998
+ return false;
2999
+ }
3000
+ if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
3001
+ return false;
3002
+ }
3003
+ var aIsDate = isDate(a);
3004
+ var bIsDate = isDate(b);
3005
+ if (aIsDate !== bIsDate) {
3006
+ return false;
3007
+ }
3008
+ if (aIsDate || bIsDate) {
3009
+ if ($getTime(a) !== $getTime(b)) {
3010
+ return false;
3011
+ }
3012
+ }
3013
+ if (opts.strict && gPO && gPO(a) !== gPO(b)) {
3014
+ return false;
3015
+ }
3016
+ var aWhich = whichTypedArray(a);
3017
+ var bWhich = whichTypedArray(b);
3018
+ if ((aWhich || bWhich) && aWhich !== bWhich) {
3019
+ return false;
3020
+ }
3021
+ var aIsBuffer = isBuffer(a);
3022
+ var bIsBuffer = isBuffer(b);
3023
+ if (aIsBuffer !== bIsBuffer) {
3024
+ return false;
3025
+ }
3026
+ if (aIsBuffer || bIsBuffer) {
3027
+ if (a.length !== b.length) {
3028
+ return false;
3029
+ }
3030
+ for (i = 0; i < a.length; i++) {
3031
+ if (a[i] !== b[i]) {
3032
+ return false;
3033
+ }
3034
+ }
3035
+ return true;
3036
+ }
3037
+ var aIsArrayBuffer = isArrayBuffer(a);
3038
+ var bIsArrayBuffer = isArrayBuffer(b);
3039
+ if (aIsArrayBuffer !== bIsArrayBuffer) {
3040
+ return false;
3041
+ }
3042
+ if (aIsArrayBuffer || bIsArrayBuffer) {
3043
+ if (byteLength(a) !== byteLength(b)) {
3044
+ return false;
3045
+ }
3046
+ return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
3047
+ }
3048
+ var aIsSAB = isSharedArrayBuffer(a);
3049
+ var bIsSAB = isSharedArrayBuffer(b);
3050
+ if (aIsSAB !== bIsSAB) {
3051
+ return false;
3052
+ }
3053
+ if (aIsSAB || bIsSAB) {
3054
+ if (sabByteLength(a) !== sabByteLength(b)) {
3055
+ return false;
3056
+ }
3057
+ return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
3058
+ }
3059
+ if (typeof a !== typeof b) {
3060
+ return false;
3061
+ }
3062
+ var ka = objectKeys(a);
3063
+ var kb = objectKeys(b);
3064
+ if (ka.length !== kb.length) {
3065
+ return false;
3066
+ }
3067
+ ka.sort();
3068
+ kb.sort();
3069
+ for (i = ka.length - 1; i >= 0; i--) {
3070
+ if (ka[i] != kb[i]) {
3071
+ return false;
3072
+ }
3073
+ }
3074
+ for (i = ka.length - 1; i >= 0; i--) {
3075
+ key = ka[i];
3076
+ if (!internalDeepEqual(a[key], b[key], opts, channel)) {
3077
+ return false;
3078
+ }
3079
+ }
3080
+ var aCollection = whichCollection(a);
3081
+ var bCollection = whichCollection(b);
3082
+ if (aCollection !== bCollection) {
3083
+ return false;
3084
+ }
3085
+ if (aCollection === "Set" || bCollection === "Set") {
3086
+ return setEquiv(a, b, opts, channel);
3087
+ }
3088
+ if (aCollection === "Map") {
3089
+ return mapEquiv(a, b, opts, channel);
3090
+ }
3091
+ return true;
3092
+ }
3093
+ module.exports = function deepEqual2(a, b, opts) {
3094
+ return internalDeepEqual(a, b, opts, getSideChannel());
3095
+ };
3096
+ }
3097
+ });
3098
+
8
3099
  // src/clients/generic/dynamodb-client.ts
9
3100
  import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
10
3101
  import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb";
@@ -382,8 +3473,43 @@ var CognitoClient = class {
382
3473
  };
383
3474
  };
384
3475
 
385
- // src/clients/internal-api/destinations-client.ts
3476
+ // src/clients/generic/sqs-client.ts
3477
+ import { SQS } from "@aws-sdk/client-sqs";
3478
+ import { v4 as uuidv42 } from "uuid";
386
3479
  import * as log5 from "lambda-log";
3480
+ var SQSClient = class {
3481
+ sqs;
3482
+ queueUrl;
3483
+ constructor(region, accountId, queueName) {
3484
+ this.sqs = new SQS({ region });
3485
+ this.queueUrl = `https://sqs.${region}.amazonaws.com/${accountId}/${queueName}`;
3486
+ }
3487
+ buildAndSendEvent = async (eventType, eventData, deplaySeconds = 0) => {
3488
+ const event = this.buildEvent(eventType, eventData);
3489
+ return await this.putEvent(event, deplaySeconds);
3490
+ };
3491
+ buildEvent = (eventType, eventData, eventId = uuidv42(), eventTime = getCurrentTimestamp()) => {
3492
+ return {
3493
+ eventId,
3494
+ eventType,
3495
+ eventTime,
3496
+ eventData
3497
+ };
3498
+ };
3499
+ putEvent = async (data, delaySeconds = 0) => {
3500
+ const params = {
3501
+ QueueUrl: this.queueUrl,
3502
+ DelaySeconds: delaySeconds,
3503
+ MessageBody: JSON.stringify(data)
3504
+ };
3505
+ const response = await this.sqs.sendMessage(params);
3506
+ log5.debug("SQS Event Published", { queueUrl: this.queueUrl, event: data });
3507
+ return response;
3508
+ };
3509
+ };
3510
+
3511
+ // src/clients/internal-api/destinations-client.ts
3512
+ import * as log6 from "lambda-log";
387
3513
  var DestinationsClient = class {
388
3514
  BASE_API_URL;
389
3515
  DESTINATIONS_API_KEY;
@@ -408,19 +3534,19 @@ var DestinationsClient = class {
408
3534
  createDestination = async (createDestinationRequest) => {
409
3535
  const client2 = await this.getClient();
410
3536
  const response = await client2.post("/", createDestinationRequest);
411
- log5.info("createDestinationResponse", { response });
3537
+ log6.info("createDestinationResponse", { response });
412
3538
  return response;
413
3539
  };
414
3540
  getPixelDestinations = async (pixelId) => {
415
3541
  const client2 = await this.getClient();
416
3542
  const response = await client2.get(`/?pixelId=${pixelId}`);
417
- log5.info("getPixelResponse", { response });
3543
+ log6.info("getPixelResponse", { response });
418
3544
  return response;
419
3545
  };
420
3546
  };
421
3547
 
422
3548
  // src/clients/internal-api/accounts-client.ts
423
- import * as log6 from "lambda-log";
3549
+ import * as log7 from "lambda-log";
424
3550
  var AccountsClient = class {
425
3551
  BASE_API_URL;
426
3552
  ACCOUNTS_API_KEY;
@@ -448,19 +3574,19 @@ var AccountsClient = class {
448
3574
  createAccount = async (createAccountRequest) => {
449
3575
  const client2 = await this.getClient();
450
3576
  const createAccountResponse = await client2.post("", createAccountRequest);
451
- log6.info("createAccountResponse", { createAccountResponse });
3577
+ log7.info("createAccountResponse", { createAccountResponse });
452
3578
  return createAccountResponse;
453
3579
  };
454
3580
  updateAccount = async (accountId, body) => {
455
3581
  const client2 = await this.getClient();
456
3582
  const response = await client2.patch(`/${accountId}/`, body);
457
- log6.info("update Account response", { response });
3583
+ log7.info("update Account response", { response });
458
3584
  return response;
459
3585
  };
460
3586
  addOwner = async (accountId, userId) => {
461
3587
  const client2 = await this.getClient();
462
3588
  const addOwnerResponse = await client2.post("/addOwner", { accountId, userId });
463
- log6.info("addOwnerResponse", { addOwnerResponse });
3589
+ log7.info("addOwnerResponse", { addOwnerResponse });
464
3590
  return addOwnerResponse;
465
3591
  };
466
3592
  isAuthorizedUser = async (userId, accountId, pixelId) => {
@@ -471,31 +3597,31 @@ var AccountsClient = class {
471
3597
  pixelId
472
3598
  };
473
3599
  const response = await client2.post("/checkUserAuthorization", body);
474
- log6.info("checkUserAuthorization", { response });
3600
+ log7.info("checkUserAuthorization", { response });
475
3601
  return response;
476
3602
  };
477
3603
  adminDeleteAccount = async (accountId) => {
478
3604
  const client2 = await this.getClient();
479
3605
  const success2 = await client2.delete(`/${accountId}`);
480
- log6.info("adminDeleteAccount");
3606
+ log7.info("adminDeleteAccount");
481
3607
  return success2;
482
3608
  };
483
3609
  getPixelConfigById = async (pixelId) => {
484
3610
  const client2 = await this.getClient();
485
3611
  const pixelResponse = await client2.get(`/px/${pixelId}/config`);
486
- log6.debug("get pixelResponse", { pixelResponse });
3612
+ log7.debug("get pixelResponse", { pixelResponse });
487
3613
  return pixelResponse;
488
3614
  };
489
3615
  getAccount = async (accountId) => {
490
3616
  const client2 = await this.getClient();
491
3617
  const response = await client2.get(`/${accountId}/`);
492
- log6.info("get account response", { response });
3618
+ log7.info("get account response", { response });
493
3619
  return response;
494
3620
  };
495
3621
  addUserToAccount = async (accountId, userId) => {
496
3622
  const client2 = await this.getClient();
497
3623
  const response = await client2.post("/addUser", { accountId, userId });
498
- log6.info("add user account response", { response });
3624
+ log7.info("add user account response", { response });
499
3625
  return response;
500
3626
  };
501
3627
  // setAccountSubscriptionId = async (accountId: string, subscriptionId: string): Promise<ApiResponse<any>> => {
@@ -507,7 +3633,7 @@ var AccountsClient = class {
507
3633
  };
508
3634
 
509
3635
  // src/clients/internal-api/users-auth-client.ts
510
- import * as log7 from "lambda-log";
3636
+ import * as log8 from "lambda-log";
511
3637
 
512
3638
  // src/libs/http-error.ts
513
3639
  import { strict as assert } from "assert";
@@ -668,20 +3794,20 @@ var UsersAuthClient = class {
668
3794
  return user;
669
3795
  };
670
3796
  signupUser = async (userSignupRequest) => {
671
- log7.info("Attempting to signup user", { email: userSignupRequest.email });
3797
+ log8.info("Attempting to signup user", { email: userSignupRequest.email });
672
3798
  const client2 = await this.getClient();
673
3799
  const response = await client2.post("/signup", userSignupRequest);
674
3800
  if (response.status !== 200 || !response?.data?.user) {
675
3801
  const message = "User Signup Failed";
676
- log7.error(message, { response });
3802
+ log8.error(message, { response });
677
3803
  throw new HttpError(500 /* INTERNAL_SERVER_ERROR */, message);
678
3804
  }
679
- log7.info("User Signup Successful", { response });
3805
+ log8.info("User Signup Successful", { response });
680
3806
  return response.data.user;
681
3807
  };
682
3808
  //userName is same as user id
683
3809
  adminConfirmUser = async (email) => {
684
- log7.info("Attempting to admin confirm user", { email });
3810
+ log8.info("Attempting to admin confirm user", { email });
685
3811
  const client2 = await this.getClient();
686
3812
  const response = await client2.post(
687
3813
  "/admin/confirm",
@@ -696,10 +3822,10 @@ var UsersAuthClient = class {
696
3822
  );
697
3823
  if (response.status !== 200) {
698
3824
  const message = "Admin User Confirmation Failed";
699
- log7.error(message, { response });
3825
+ log8.error(message, { response });
700
3826
  throw new HttpError(500 /* INTERNAL_SERVER_ERROR */, message);
701
3827
  }
702
- log7.info("Admin User Confirmation Successful", { response });
3828
+ log8.info("Admin User Confirmation Successful", { response });
703
3829
  return response;
704
3830
  };
705
3831
  getUserByEmail = async (email) => {
@@ -712,13 +3838,13 @@ var UsersAuthClient = class {
712
3838
  email
713
3839
  }
714
3840
  });
715
- log7.info("getUserResponse", { getUserResponse });
3841
+ log8.info("getUserResponse", { getUserResponse });
716
3842
  return getUserResponse;
717
3843
  };
718
3844
  };
719
3845
 
720
3846
  // src/clients/internal-api/shopify-app-install-client.ts
721
- import log8 from "lambda-log";
3847
+ import log9 from "lambda-log";
722
3848
  var ShopifyAppInstallClient = class {
723
3849
  BASE_API_URL;
724
3850
  SHOPIFY_APP_INSTALL_API_KEY;
@@ -743,25 +3869,25 @@ var ShopifyAppInstallClient = class {
743
3869
  updateShopifyAppInstall = async (shopifyAppInstallId, updateShopifyAppInstallRequest) => {
744
3870
  const client2 = await this.getClient();
745
3871
  const response = await client2.put(`/${shopifyAppInstallId}`, updateShopifyAppInstallRequest);
746
- log8.info("updateShopifyAppInstall", { response });
3872
+ log9.info("updateShopifyAppInstall", { response });
747
3873
  return response;
748
3874
  };
749
3875
  getShopifyAppInstall = async (shopifyAppInstallId) => {
750
3876
  const client2 = await this.getClient();
751
3877
  const response = await client2.get(`/${shopifyAppInstallId}`);
752
- log8.info("getShopifyAppInstall", { response });
3878
+ log9.info("getShopifyAppInstall", { response });
753
3879
  return response;
754
3880
  };
755
3881
  getShopifyAppInstallByShop = async (shop) => {
756
3882
  const client2 = await this.getClient();
757
3883
  const response = await client2.get(`/?shop=${shop}`);
758
- log8.info("getShopifyAppInstallByShop", { response });
3884
+ log9.info("getShopifyAppInstallByShop", { response });
759
3885
  return response;
760
3886
  };
761
3887
  };
762
3888
 
763
3889
  // src/clients/third-party/shopify-client.ts
764
- import * as log9 from "lambda-log";
3890
+ import * as log10 from "lambda-log";
765
3891
  var _ShopifyClient = class {
766
3892
  };
767
3893
  var ShopifyClient = _ShopifyClient;
@@ -805,9 +3931,9 @@ __publicField(ShopifyClient, "registerWebhookTopic", async (shop, accessToken, e
805
3931
  };
806
3932
  const res = await client2.post(url, payload, { headers: { "X-Shopify-Access-Token": accessToken } });
807
3933
  if (res.status >= 400) {
808
- log9.error("Failed to register Webhook Topic", { shop, accessToken, eventBridgeArn, topic, url, payload });
3934
+ log10.error("Failed to register Webhook Topic", { shop, accessToken, eventBridgeArn, topic, url, payload });
809
3935
  }
810
- log9.debug("Shopify Client Webhook Registration Response", { registrationResponse: res });
3936
+ log10.debug("Shopify Client Webhook Registration Response", { registrationResponse: res });
811
3937
  return res;
812
3938
  });
813
3939
  __publicField(ShopifyClient, "updateShopifyAppMetafield", async (shop, accessToken, pixelId) => {
@@ -822,7 +3948,7 @@ __publicField(ShopifyClient, "updateShopifyAppMetafield", async (shop, accessTok
822
3948
  };
823
3949
  const res = await _ShopifyClient.genericShopifyPost(url, accessToken, payload);
824
3950
  if (res.status >= 400) {
825
- log9.error("Failed to update Shopify app Metafield ", { shop, accessToken, url, payload });
3951
+ log10.error("Failed to update Shopify app Metafield ", { shop, accessToken, url, payload });
826
3952
  }
827
3953
  return res;
828
3954
  });
@@ -830,7 +3956,7 @@ __publicField(ShopifyClient, "getShopifyStoreProperties", async (shop, accessTok
830
3956
  const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/shop.json`;
831
3957
  const res = await _ShopifyClient.genericShopifyGet(url, accessToken);
832
3958
  if (res.status >= 400) {
833
- log9.error("Failed to get Shopify Store Properties", { shop, accessToken, url });
3959
+ log10.error("Failed to get Shopify Store Properties", { shop, accessToken, url });
834
3960
  }
835
3961
  return res;
836
3962
  });
@@ -845,7 +3971,7 @@ __publicField(ShopifyClient, "createAppSubscription", async (shop, accessToken,
845
3971
  };
846
3972
  const res = await _ShopifyClient.genericShopifyPost(url, accessToken, { recurring_application_charge });
847
3973
  if (res.status >= 400) {
848
- log9.error("Failed to create App Subscription", { shop, accessToken, url });
3974
+ log10.error("Failed to create App Subscription", { shop, accessToken, url });
849
3975
  }
850
3976
  return res;
851
3977
  });
@@ -854,7 +3980,7 @@ __publicField(ShopifyClient, "cancelAppSubscription", async (shop, accessToken,
854
3980
  const client2 = axiosHttpService();
855
3981
  const res = await client2.delete(url, { headers: { "X-Shopify-Access-Token": accessToken } });
856
3982
  if (res.status !== 200) {
857
- log9.error("Failed to cancel recurring App billing", { shop, accessToken, url });
3983
+ log10.error("Failed to cancel recurring App billing", { shop, accessToken, url });
858
3984
  }
859
3985
  return res;
860
3986
  });
@@ -862,35 +3988,35 @@ __publicField(ShopifyClient, "listAppSubscriptions", async (shop, accessToken) =
862
3988
  const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/recurring_application_charges.json`;
863
3989
  const res = await _ShopifyClient.genericShopifyGet(url, accessToken);
864
3990
  if (res.status >= 400) {
865
- log9.error("Failed to get App Subscriptions", { shop, accessToken, url });
3991
+ log10.error("Failed to get App Subscriptions", { shop, accessToken, url });
866
3992
  }
867
3993
  return res;
868
3994
  });
869
3995
  __publicField(ShopifyClient, "genericShopifyPost", async (url, accessToken, payload) => {
870
3996
  const client2 = axiosHttpService();
871
3997
  const res = await client2.post(url, payload, { headers: { "X-Shopify-Access-Token": accessToken, "Content-Type": "application/json" } });
872
- log9.debug("Shopify Client Response", { res });
3998
+ log10.debug("Shopify Client Response", { res });
873
3999
  return res;
874
4000
  });
875
4001
  __publicField(ShopifyClient, "genericShopifyGet", async (url, accessToken) => {
876
4002
  const client2 = axiosHttpService();
877
4003
  const res = await client2.get(url, { headers: { "X-Shopify-Access-Token": accessToken } });
878
- log9.debug("Shopify Client Response", { res });
4004
+ log10.debug("Shopify Client Response", { res });
879
4005
  return res;
880
4006
  });
881
4007
  __publicField(ShopifyClient, "genericShopifyPut", async (url, accessToken, payload) => {
882
4008
  const client2 = axiosHttpService();
883
4009
  const res = await client2.put(url, payload, { headers: { "X-Shopify-Access-Token": accessToken } });
884
- log9.debug("Shopify Client Response", { res });
4010
+ log10.debug("Shopify Client Response", { res });
885
4011
  return res;
886
4012
  });
887
4013
 
888
4014
  // src/helpers/input-validation-helper.ts
889
- import * as log10 from "lambda-log";
4015
+ import * as log11 from "lambda-log";
890
4016
  var validateInput = (schema, input) => {
891
4017
  const { error: error7, value } = schema.validate(input);
892
4018
  if (error7) {
893
- log10.info("", { error: error7 });
4019
+ log11.info("", { error: error7 });
894
4020
  const httperr = HttpError.badRequest("Bad Request", {
895
4021
  errors: error7.details.map((detail) => ({
896
4022
  message: detail?.message,
@@ -898,21 +4024,21 @@ var validateInput = (schema, input) => {
898
4024
  path: detail?.path
899
4025
  }))
900
4026
  });
901
- log10.info("", { httperr });
4027
+ log11.info("", { httperr });
902
4028
  throw httperr;
903
4029
  }
904
4030
  return value;
905
4031
  };
906
4032
 
907
4033
  // src/helpers/logging-helper.ts
908
- import * as log11 from "lambda-log";
4034
+ import * as log12 from "lambda-log";
909
4035
  var stage = process?.env?.STAGE;
910
- var configureLogger = (event, context, debug5 = true) => {
911
- log11.options.meta.stage = stage;
912
- log11.options.meta.source_name = context?.functionName || "unknown";
913
- log11.options.meta.awsRequestId = context?.awsRequestId || "unknown";
914
- log11.options.meta.lambdaEvent = event;
915
- log11.options.debug = debug5;
4036
+ var configureLogger = (event, context, debug6 = true) => {
4037
+ log12.options.meta.stage = stage;
4038
+ log12.options.meta.source_name = context?.functionName || "unknown";
4039
+ log12.options.meta.awsRequestId = context?.awsRequestId || "unknown";
4040
+ log12.options.meta.lambdaEvent = event;
4041
+ log12.options.debug = debug6;
916
4042
  };
917
4043
 
918
4044
  // src/helpers/response-helper.ts
@@ -952,7 +4078,7 @@ var buildResponse = (statusCode, body = {}) => {
952
4078
 
953
4079
  // src/helpers/shopify-helper.ts
954
4080
  import { createHmac } from "crypto";
955
- import * as log12 from "lambda-log";
4081
+ import * as log13 from "lambda-log";
956
4082
 
957
4083
  // src/libs/url.ts
958
4084
  var mapObjectToQueryString = (inputObj) => {
@@ -973,14 +4099,14 @@ var isShopifyRequestValid = (validationParams, validationHmac, shopifyAppApiSecr
973
4099
  return generatedHash === validationHmac;
974
4100
  };
975
4101
  var validateShopifyRequest = (validationParams, validationHmac, shopifyAppApiSecret) => {
976
- log12.info("Validating shopify request is authentic", { validationParams });
4102
+ log13.info("Validating shopify request is authentic", { validationParams });
977
4103
  const isValid = isShopifyRequestValid(validationParams, validationHmac, shopifyAppApiSecret);
978
4104
  if (!isValid) {
979
4105
  const message = "Failed: Shopify Request hmac validation";
980
- log12.error(message);
4106
+ log13.error(message);
981
4107
  throw HttpError.badRequest(message);
982
4108
  }
983
- log12.info("Sucess: Shopify Request hmac validation");
4109
+ log13.info("Sucess: Shopify Request hmac validation");
984
4110
  return true;
985
4111
  };
986
4112
 
@@ -1234,6 +4360,24 @@ var getPlanByStripePriceId = (stripePriceId, stage2) => {
1234
4360
  return plan;
1235
4361
  };
1236
4362
 
4363
+ // src/helpers/traits-helper.ts
4364
+ var getEmailArrayFromIdentity = (identity) => {
4365
+ const emails = [identity?.traits?.email, ...identity?.traits?.addresses?.map((x2) => x2?.email) || []];
4366
+ return emails;
4367
+ };
4368
+
4369
+ // src/helpers/utils.ts
4370
+ var import_deep_equal = __toESM(require_deep_equal(), 1);
4371
+ var getUniqueList = (values) => {
4372
+ const uniqueList = [];
4373
+ for (const val of values) {
4374
+ if (uniqueList.findIndex((x2) => (0, import_deep_equal.default)(val, x2)) === -1) {
4375
+ uniqueList.push(val);
4376
+ }
4377
+ }
4378
+ return uniqueList;
4379
+ };
4380
+
1237
4381
  // src/libs/crypto.ts
1238
4382
  import crypto from "crypto";
1239
4383
  var generatePublicKey = () => {
@@ -1313,6 +4457,7 @@ export {
1313
4457
  HttpStatusCodes,
1314
4458
  PostmarkRequestType,
1315
4459
  S3Client,
4460
+ SQSClient,
1316
4461
  ShopifyAppInstallClient,
1317
4462
  ShopifyClient,
1318
4463
  StripeBillingMap,
@@ -1327,8 +4472,10 @@ export {
1327
4472
  getCurrentDate,
1328
4473
  getCurrentTimestamp,
1329
4474
  getDateFromTimestamp,
4475
+ getEmailArrayFromIdentity,
1330
4476
  getPlanByStripePriceId,
1331
4477
  getPlanDetails,
4478
+ getUniqueList,
1332
4479
  isShopifyRequestValid,
1333
4480
  mapObjectToQueryString,
1334
4481
  success,