@shipengine/elements 0.9.1 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var elementsCore = require('@shipengine/elements-core');
6
- var jsxRuntime = require('react/jsx-runtime');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
7
  var elementsUi = require('@shipengine/elements-ui');
8
8
  var react = require('react');
9
9
  var reactI18next = require('react-i18next');
@@ -16,7 +16,7 @@ var check = function (it) {
16
16
 
17
17
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
18
18
  var global$j =
19
- // eslint-disable-next-line es-x/no-global-this -- safe
19
+ // eslint-disable-next-line es/no-global-this -- safe
20
20
  check(typeof globalThis == 'object' && globalThis) ||
21
21
  check(typeof window == 'object' && window) ||
22
22
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -39,14 +39,14 @@ var fails$c = fails$d;
39
39
 
40
40
  // Detect IE8's incomplete defineProperty implementation
41
41
  var descriptors = !fails$c(function () {
42
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
42
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
43
43
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
44
44
  });
45
45
 
46
46
  var fails$b = fails$d;
47
47
 
48
48
  var functionBindNative = !fails$b(function () {
49
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
49
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
50
50
  var test = (function () { /* empty */ }).bind();
51
51
  // eslint-disable-next-line no-prototype-builtins -- safe
52
52
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -63,7 +63,7 @@ var functionCall = NATIVE_BIND$3 ? call$e.bind(call$e) : function () {
63
63
  var objectPropertyIsEnumerable = {};
64
64
 
65
65
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
66
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
66
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
67
67
  var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
68
68
 
69
69
  // Nashorn ~ JDK8 bug
@@ -88,14 +88,11 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
88
88
  var NATIVE_BIND$2 = functionBindNative;
89
89
 
90
90
  var FunctionPrototype$2 = Function.prototype;
91
- var bind$6 = FunctionPrototype$2.bind;
92
91
  var call$d = FunctionPrototype$2.call;
93
- var uncurryThis$e = NATIVE_BIND$2 && bind$6.bind(call$d, call$d);
92
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$d, call$d);
94
93
 
95
- var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
96
- return fn && uncurryThis$e(fn);
97
- } : function (fn) {
98
- return fn && function () {
94
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
95
+ return function () {
99
96
  return call$d.apply(fn, arguments);
100
97
  };
101
98
  };
@@ -105,13 +102,13 @@ var uncurryThis$d = functionUncurryThis;
105
102
  var toString$1 = uncurryThis$d({}.toString);
106
103
  var stringSlice = uncurryThis$d(''.slice);
107
104
 
108
- var classofRaw$1 = function (it) {
105
+ var classofRaw$2 = function (it) {
109
106
  return stringSlice(toString$1(it), 8, -1);
110
107
  };
111
108
 
112
109
  var uncurryThis$c = functionUncurryThis;
113
110
  var fails$a = fails$d;
114
- var classof$5 = classofRaw$1;
111
+ var classof$5 = classofRaw$2;
115
112
 
116
113
  var $Object$4 = Object;
117
114
  var split = uncurryThis$c(''.split);
@@ -125,12 +122,20 @@ var indexedObject = fails$a(function () {
125
122
  return classof$5(it) == 'String' ? split(it, '') : $Object$4(it);
126
123
  } : $Object$4;
127
124
 
128
- var $TypeError$c = TypeError;
125
+ // we can't use just `it == null` since of `document.all` special case
126
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
127
+ var isNullOrUndefined$4 = function (it) {
128
+ return it === null || it === undefined;
129
+ };
130
+
131
+ var isNullOrUndefined$3 = isNullOrUndefined$4;
132
+
133
+ var $TypeError$d = TypeError;
129
134
 
130
135
  // `RequireObjectCoercible` abstract operation
131
136
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
137
  var requireObjectCoercible$2 = function (it) {
133
- if (it == undefined) throw $TypeError$c("Can't call method on " + it);
138
+ if (isNullOrUndefined$3(it)) throw $TypeError$d("Can't call method on " + it);
134
139
  return it;
135
140
  };
136
141
 
@@ -142,15 +147,36 @@ var toIndexedObject$5 = function (it) {
142
147
  return IndexedObject$1(requireObjectCoercible$1(it));
143
148
  };
144
149
 
150
+ var documentAll$2 = typeof document == 'object' && document.all;
151
+
152
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
153
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
154
+
155
+ var documentAll_1 = {
156
+ all: documentAll$2,
157
+ IS_HTMLDDA: IS_HTMLDDA
158
+ };
159
+
160
+ var $documentAll$1 = documentAll_1;
161
+
162
+ var documentAll$1 = $documentAll$1.all;
163
+
145
164
  // `IsCallable` abstract operation
146
165
  // https://tc39.es/ecma262/#sec-iscallable
147
- var isCallable$k = function (argument) {
166
+ var isCallable$k = $documentAll$1.IS_HTMLDDA ? function (argument) {
167
+ return typeof argument == 'function' || argument === documentAll$1;
168
+ } : function (argument) {
148
169
  return typeof argument == 'function';
149
170
  };
150
171
 
151
172
  var isCallable$j = isCallable$k;
173
+ var $documentAll = documentAll_1;
174
+
175
+ var documentAll = $documentAll.all;
152
176
 
153
- var isObject$8 = function (it) {
177
+ var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
178
+ return typeof it == 'object' ? it !== null : isCallable$j(it) || it === documentAll;
179
+ } : function (it) {
154
180
  return typeof it == 'object' ? it !== null : isCallable$j(it);
155
181
  };
156
182
 
@@ -201,13 +227,13 @@ if (!version && userAgent$3) {
201
227
 
202
228
  var engineV8Version = version;
203
229
 
204
- /* eslint-disable es-x/no-symbol -- required for testing */
230
+ /* eslint-disable es/no-symbol -- required for testing */
205
231
 
206
232
  var V8_VERSION$1 = engineV8Version;
207
233
  var fails$9 = fails$d;
208
234
 
209
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
210
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
235
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
236
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
211
237
  var symbol = Symbol();
212
238
  // Chrome 38 Symbol has incorrect toString conversion
213
239
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -216,9 +242,9 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
216
242
  !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
217
243
  });
218
244
 
219
- /* eslint-disable es-x/no-symbol -- required for testing */
245
+ /* eslint-disable es/no-symbol -- required for testing */
220
246
 
221
- var NATIVE_SYMBOL$1 = nativeSymbol;
247
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
222
248
 
223
249
  var useSymbolAsUid = NATIVE_SYMBOL$1
224
250
  && !Symbol.sham
@@ -251,44 +277,45 @@ var tryToString$4 = function (argument) {
251
277
  var isCallable$g = isCallable$k;
252
278
  var tryToString$3 = tryToString$4;
253
279
 
254
- var $TypeError$b = TypeError;
280
+ var $TypeError$c = TypeError;
255
281
 
256
282
  // `Assert: IsCallable(argument) is true`
257
283
  var aCallable$8 = function (argument) {
258
284
  if (isCallable$g(argument)) return argument;
259
- throw $TypeError$b(tryToString$3(argument) + ' is not a function');
285
+ throw $TypeError$c(tryToString$3(argument) + ' is not a function');
260
286
  };
261
287
 
262
288
  var aCallable$7 = aCallable$8;
289
+ var isNullOrUndefined$2 = isNullOrUndefined$4;
263
290
 
264
291
  // `GetMethod` abstract operation
265
292
  // https://tc39.es/ecma262/#sec-getmethod
266
293
  var getMethod$3 = function (V, P) {
267
294
  var func = V[P];
268
- return func == null ? undefined : aCallable$7(func);
295
+ return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
269
296
  };
270
297
 
271
298
  var call$c = functionCall;
272
299
  var isCallable$f = isCallable$k;
273
- var isObject$7 = isObject$8;
300
+ var isObject$8 = isObject$9;
274
301
 
275
- var $TypeError$a = TypeError;
302
+ var $TypeError$b = TypeError;
276
303
 
277
304
  // `OrdinaryToPrimitive` abstract operation
278
305
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
279
306
  var ordinaryToPrimitive$1 = function (input, pref) {
280
307
  var fn, val;
281
- if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
282
- if (isCallable$f(fn = input.valueOf) && !isObject$7(val = call$c(fn, input))) return val;
283
- if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
284
- throw $TypeError$a("Can't convert object to primitive value");
308
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$c(fn, input))) return val;
309
+ if (isCallable$f(fn = input.valueOf) && !isObject$8(val = call$c(fn, input))) return val;
310
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$c(fn, input))) return val;
311
+ throw $TypeError$b("Can't convert object to primitive value");
285
312
  };
286
313
 
287
314
  var shared$3 = {exports: {}};
288
315
 
289
316
  var global$g = global$j;
290
317
 
291
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
318
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
292
319
  var defineProperty$5 = Object.defineProperty;
293
320
 
294
321
  var defineGlobalProperty$3 = function (key, value) {
@@ -312,10 +339,10 @@ var store$2 = sharedStore;
312
339
  (shared$3.exports = function (key, value) {
313
340
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
314
341
  })('versions', []).push({
315
- version: '3.24.1',
342
+ version: '3.26.1',
316
343
  mode: 'global',
317
344
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
318
- license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
345
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
319
346
  source: 'https://github.com/zloirock/core-js'
320
347
  });
321
348
 
@@ -336,7 +363,7 @@ var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
336
363
 
337
364
  // `HasOwnProperty` abstract operation
338
365
  // https://tc39.es/ecma262/#sec-hasownproperty
339
- // eslint-disable-next-line es-x/no-object-hasown -- safe
366
+ // eslint-disable-next-line es/no-object-hasown -- safe
340
367
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
341
368
  return hasOwnProperty(toObject$3(it), key);
342
369
  };
@@ -355,7 +382,7 @@ var global$e = global$j;
355
382
  var shared$2 = shared$3.exports;
356
383
  var hasOwn$9 = hasOwnProperty_1;
357
384
  var uid$1 = uid$2;
358
- var NATIVE_SYMBOL = nativeSymbol;
385
+ var NATIVE_SYMBOL = symbolConstructorDetection;
359
386
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
360
387
 
361
388
  var WellKnownSymbolsStore = shared$2('wks');
@@ -377,26 +404,26 @@ var wellKnownSymbol$f = function (name) {
377
404
  };
378
405
 
379
406
  var call$b = functionCall;
380
- var isObject$6 = isObject$8;
407
+ var isObject$7 = isObject$9;
381
408
  var isSymbol$1 = isSymbol$2;
382
409
  var getMethod$2 = getMethod$3;
383
410
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
384
411
  var wellKnownSymbol$e = wellKnownSymbol$f;
385
412
 
386
- var $TypeError$9 = TypeError;
413
+ var $TypeError$a = TypeError;
387
414
  var TO_PRIMITIVE = wellKnownSymbol$e('toPrimitive');
388
415
 
389
416
  // `ToPrimitive` abstract operation
390
417
  // https://tc39.es/ecma262/#sec-toprimitive
391
418
  var toPrimitive$1 = function (input, pref) {
392
- if (!isObject$6(input) || isSymbol$1(input)) return input;
419
+ if (!isObject$7(input) || isSymbol$1(input)) return input;
393
420
  var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
394
421
  var result;
395
422
  if (exoticToPrim) {
396
423
  if (pref === undefined) pref = 'default';
397
424
  result = call$b(exoticToPrim, input, pref);
398
- if (!isObject$6(result) || isSymbol$1(result)) return result;
399
- throw $TypeError$9("Can't convert object to primitive value");
425
+ if (!isObject$7(result) || isSymbol$1(result)) return result;
426
+ throw $TypeError$a("Can't convert object to primitive value");
400
427
  }
401
428
  if (pref === undefined) pref = 'number';
402
429
  return ordinaryToPrimitive(input, pref);
@@ -413,11 +440,11 @@ var toPropertyKey$2 = function (argument) {
413
440
  };
414
441
 
415
442
  var global$d = global$j;
416
- var isObject$5 = isObject$8;
443
+ var isObject$6 = isObject$9;
417
444
 
418
445
  var document$3 = global$d.document;
419
446
  // typeof document.createElement is 'object' in old IE
420
- var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
447
+ var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
421
448
 
422
449
  var documentCreateElement$2 = function (it) {
423
450
  return EXISTS$1 ? document$3.createElement(it) : {};
@@ -429,7 +456,7 @@ var createElement$1 = documentCreateElement$2;
429
456
 
430
457
  // Thanks to IE8 for its funny defineProperty
431
458
  var ie8DomDefine = !DESCRIPTORS$a && !fails$8(function () {
432
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
459
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
433
460
  return Object.defineProperty(createElement$1('div'), 'a', {
434
461
  get: function () { return 7; }
435
462
  }).a != 7;
@@ -444,7 +471,7 @@ var toPropertyKey$1 = toPropertyKey$2;
444
471
  var hasOwn$8 = hasOwnProperty_1;
445
472
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
446
473
 
447
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
474
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
448
475
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
449
476
 
450
477
  // `Object.getOwnPropertyDescriptor` method
@@ -466,22 +493,22 @@ var fails$7 = fails$d;
466
493
  // V8 ~ Chrome 36-
467
494
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
468
495
  var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$7(function () {
469
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
496
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
470
497
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
471
498
  value: 42,
472
499
  writable: false
473
500
  }).prototype != 42;
474
501
  });
475
502
 
476
- var isObject$4 = isObject$8;
503
+ var isObject$5 = isObject$9;
477
504
 
478
505
  var $String$1 = String;
479
- var $TypeError$8 = TypeError;
506
+ var $TypeError$9 = TypeError;
480
507
 
481
508
  // `Assert: Type(argument) is Object`
482
509
  var anObject$a = function (argument) {
483
- if (isObject$4(argument)) return argument;
484
- throw $TypeError$8($String$1(argument) + ' is not an object');
510
+ if (isObject$5(argument)) return argument;
511
+ throw $TypeError$9($String$1(argument) + ' is not an object');
485
512
  };
486
513
 
487
514
  var DESCRIPTORS$7 = descriptors;
@@ -490,10 +517,10 @@ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
490
517
  var anObject$9 = anObject$a;
491
518
  var toPropertyKey = toPropertyKey$2;
492
519
 
493
- var $TypeError$7 = TypeError;
494
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
520
+ var $TypeError$8 = TypeError;
521
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
495
522
  var $defineProperty = Object.defineProperty;
496
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
523
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
497
524
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
498
525
  var ENUMERABLE = 'enumerable';
499
526
  var CONFIGURABLE$1 = 'configurable';
@@ -523,7 +550,7 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
523
550
  if (IE8_DOM_DEFINE) try {
524
551
  return $defineProperty(O, P, Attributes);
525
552
  } catch (error) { /* empty */ }
526
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$7('Accessors not supported');
553
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$8('Accessors not supported');
527
554
  if ('value' in Attributes) O[P] = Attributes.value;
528
555
  return O;
529
556
  };
@@ -545,7 +572,7 @@ var DESCRIPTORS$5 = descriptors;
545
572
  var hasOwn$7 = hasOwnProperty_1;
546
573
 
547
574
  var FunctionPrototype$1 = Function.prototype;
548
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
575
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
549
576
  var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
550
577
 
551
578
  var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
@@ -572,15 +599,14 @@ if (!isCallable$e(store$1.inspectSource)) {
572
599
  };
573
600
  }
574
601
 
575
- var inspectSource$4 = store$1.inspectSource;
602
+ var inspectSource$3 = store$1.inspectSource;
576
603
 
577
604
  var global$c = global$j;
578
605
  var isCallable$d = isCallable$k;
579
- var inspectSource$3 = inspectSource$4;
580
606
 
581
607
  var WeakMap$1 = global$c.WeakMap;
582
608
 
583
- var nativeWeakMap = isCallable$d(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
609
+ var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
584
610
 
585
611
  var shared$1 = shared$3.exports;
586
612
  var uid = uid$2;
@@ -593,10 +619,9 @@ var sharedKey$3 = function (key) {
593
619
 
594
620
  var hiddenKeys$4 = {};
595
621
 
596
- var NATIVE_WEAK_MAP = nativeWeakMap;
622
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
597
623
  var global$b = global$j;
598
- var uncurryThis$7 = functionUncurryThis;
599
- var isObject$3 = isObject$8;
624
+ var isObject$4 = isObject$9;
600
625
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
601
626
  var hasOwn$6 = hasOwnProperty_1;
602
627
  var shared = sharedStore;
@@ -615,7 +640,7 @@ var enforce = function (it) {
615
640
  var getterFor = function (TYPE) {
616
641
  return function (it) {
617
642
  var state;
618
- if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
643
+ if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
619
644
  throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
620
645
  } return state;
621
646
  };
@@ -623,26 +648,28 @@ var getterFor = function (TYPE) {
623
648
 
624
649
  if (NATIVE_WEAK_MAP || shared.state) {
625
650
  var store = shared.state || (shared.state = new WeakMap());
626
- var wmget = uncurryThis$7(store.get);
627
- var wmhas = uncurryThis$7(store.has);
628
- var wmset = uncurryThis$7(store.set);
651
+ /* eslint-disable no-self-assign -- prototype methods protection */
652
+ store.get = store.get;
653
+ store.has = store.has;
654
+ store.set = store.set;
655
+ /* eslint-enable no-self-assign -- prototype methods protection */
629
656
  set$1 = function (it, metadata) {
630
- if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
657
+ if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
631
658
  metadata.facade = it;
632
- wmset(store, it, metadata);
659
+ store.set(it, metadata);
633
660
  return metadata;
634
661
  };
635
662
  get = function (it) {
636
- return wmget(store, it) || {};
663
+ return store.get(it) || {};
637
664
  };
638
665
  has = function (it) {
639
- return wmhas(store, it);
666
+ return store.has(it);
640
667
  };
641
668
  } else {
642
669
  var STATE = sharedKey$2('state');
643
670
  hiddenKeys$3[STATE] = true;
644
671
  set$1 = function (it, metadata) {
645
- if (hasOwn$6(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
672
+ if (hasOwn$6(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
646
673
  metadata.facade = it;
647
674
  createNonEnumerableProperty$3(it, STATE, metadata);
648
675
  return metadata;
@@ -668,12 +695,12 @@ var isCallable$c = isCallable$k;
668
695
  var hasOwn$5 = hasOwnProperty_1;
669
696
  var DESCRIPTORS$4 = descriptors;
670
697
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
671
- var inspectSource$2 = inspectSource$4;
698
+ var inspectSource$2 = inspectSource$3;
672
699
  var InternalStateModule$2 = internalState;
673
700
 
674
701
  var enforceInternalState = InternalStateModule$2.enforce;
675
702
  var getInternalState$1 = InternalStateModule$2.get;
676
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
703
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
677
704
  var defineProperty$4 = Object.defineProperty;
678
705
 
679
706
  var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$6(function () {
@@ -748,7 +775,7 @@ var floor = Math.floor;
748
775
 
749
776
  // `Math.trunc` method
750
777
  // https://tc39.es/ecma262/#sec-math.trunc
751
- // eslint-disable-next-line es-x/no-math-trunc -- safe
778
+ // eslint-disable-next-line es/no-math-trunc -- safe
752
779
  var mathTrunc = Math.trunc || function trunc(x) {
753
780
  var n = +x;
754
781
  return (n > 0 ? floor : ceil)(n);
@@ -828,13 +855,13 @@ var arrayIncludes = {
828
855
  indexOf: createMethod(false)
829
856
  };
830
857
 
831
- var uncurryThis$6 = functionUncurryThis;
858
+ var uncurryThis$7 = functionUncurryThis;
832
859
  var hasOwn$4 = hasOwnProperty_1;
833
860
  var toIndexedObject$2 = toIndexedObject$5;
834
861
  var indexOf = arrayIncludes.indexOf;
835
862
  var hiddenKeys$2 = hiddenKeys$4;
836
863
 
837
- var push = uncurryThis$6([].push);
864
+ var push = uncurryThis$7([].push);
838
865
 
839
866
  var objectKeysInternal = function (object, names) {
840
867
  var O = toIndexedObject$2(object);
@@ -867,23 +894,23 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
867
894
 
868
895
  // `Object.getOwnPropertyNames` method
869
896
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
870
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
897
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
871
898
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
872
899
  return internalObjectKeys$1(O, hiddenKeys$1);
873
900
  };
874
901
 
875
902
  var objectGetOwnPropertySymbols = {};
876
903
 
877
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
904
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
878
905
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
879
906
 
880
907
  var getBuiltIn$5 = getBuiltIn$8;
881
- var uncurryThis$5 = functionUncurryThis;
908
+ var uncurryThis$6 = functionUncurryThis;
882
909
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
883
910
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
884
911
  var anObject$8 = anObject$a;
885
912
 
886
- var concat$1 = uncurryThis$5([].concat);
913
+ var concat$1 = uncurryThis$6([].concat);
887
914
 
888
915
  // all object keys, includes non-enumerable and symbols
889
916
  var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -992,13 +1019,13 @@ var enumBugKeys$1 = enumBugKeys$3;
992
1019
 
993
1020
  // `Object.keys` method
994
1021
  // https://tc39.es/ecma262/#sec-object.keys
995
- // eslint-disable-next-line es-x/no-object-keys -- safe
1022
+ // eslint-disable-next-line es/no-object-keys -- safe
996
1023
  var objectKeys$2 = Object.keys || function keys(O) {
997
1024
  return internalObjectKeys(O, enumBugKeys$1);
998
1025
  };
999
1026
 
1000
1027
  var DESCRIPTORS$3 = descriptors;
1001
- var uncurryThis$4 = functionUncurryThis;
1028
+ var uncurryThis$5 = functionUncurryThis;
1002
1029
  var call$9 = functionCall;
1003
1030
  var fails$4 = fails$d;
1004
1031
  var objectKeys$1 = objectKeys$2;
@@ -1007,11 +1034,11 @@ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1007
1034
  var toObject$2 = toObject$4;
1008
1035
  var IndexedObject = indexedObject;
1009
1036
 
1010
- // eslint-disable-next-line es-x/no-object-assign -- safe
1037
+ // eslint-disable-next-line es/no-object-assign -- safe
1011
1038
  var $assign = Object.assign;
1012
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1039
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1013
1040
  var defineProperty$3 = Object.defineProperty;
1014
- var concat = uncurryThis$4([].concat);
1041
+ var concat = uncurryThis$5([].concat);
1015
1042
 
1016
1043
  // `Object.assign` method
1017
1044
  // https://tc39.es/ecma262/#sec-object.assign
@@ -1029,7 +1056,7 @@ var objectAssign = !$assign || fails$4(function () {
1029
1056
  // should work with symbols and should have deterministic property order (V8 bug)
1030
1057
  var A = {};
1031
1058
  var B = {};
1032
- // eslint-disable-next-line es-x/no-symbol -- safe
1059
+ // eslint-disable-next-line es/no-symbol -- safe
1033
1060
  var symbol = Symbol();
1034
1061
  var alphabet = 'abcdefghijklmnopqrst';
1035
1062
  A[symbol] = 7;
@@ -1059,7 +1086,7 @@ var assign = objectAssign;
1059
1086
 
1060
1087
  // `Object.assign` method
1061
1088
  // https://tc39.es/ecma262/#sec-object.assign
1062
- // eslint-disable-next-line es-x/no-object-assign -- required for testing
1089
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1063
1090
  $$8({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1064
1091
  assign: assign
1065
1092
  });
@@ -1112,7 +1139,7 @@ var objectKeys = objectKeys$2;
1112
1139
 
1113
1140
  // `Object.defineProperties` method
1114
1141
  // https://tc39.es/ecma262/#sec-object.defineproperties
1115
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1142
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1116
1143
  objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1117
1144
  anObject$7(O);
1118
1145
  var props = toIndexedObject$1(Properties);
@@ -1200,7 +1227,7 @@ hiddenKeys[IE_PROTO$1] = true;
1200
1227
 
1201
1228
  // `Object.create` method
1202
1229
  // https://tc39.es/ecma262/#sec-object.create
1203
- // eslint-disable-next-line es-x/no-object-create -- safe
1230
+ // eslint-disable-next-line es/no-object-create -- safe
1204
1231
  var objectCreate = Object.create || function create(O, Properties) {
1205
1232
  var result;
1206
1233
  if (O !== null) {
@@ -1241,7 +1268,7 @@ var fails$3 = fails$d;
1241
1268
  var correctPrototypeGetter = !fails$3(function () {
1242
1269
  function F() { /* empty */ }
1243
1270
  F.prototype.constructor = null;
1244
- // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
1271
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1245
1272
  return Object.getPrototypeOf(new F()) !== F.prototype;
1246
1273
  });
1247
1274
 
@@ -1257,7 +1284,7 @@ var ObjectPrototype = $Object$1.prototype;
1257
1284
 
1258
1285
  // `Object.getPrototypeOf` method
1259
1286
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1260
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
1287
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1261
1288
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1262
1289
  var object = toObject$1(O);
1263
1290
  if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
@@ -1269,6 +1296,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1269
1296
 
1270
1297
  var fails$2 = fails$d;
1271
1298
  var isCallable$8 = isCallable$k;
1299
+ var isObject$3 = isObject$9;
1272
1300
  var getPrototypeOf$1 = objectGetPrototypeOf;
1273
1301
  var defineBuiltIn$3 = defineBuiltIn$5;
1274
1302
  var wellKnownSymbol$c = wellKnownSymbol$f;
@@ -1280,7 +1308,7 @@ var BUGGY_SAFARI_ITERATORS$1 = false;
1280
1308
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1281
1309
  var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1282
1310
 
1283
- /* eslint-disable es-x/no-array-prototype-keys -- safe */
1311
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1284
1312
  if ([].keys) {
1285
1313
  arrayIterator = [].keys();
1286
1314
  // Safari 8 has buggy iterators w/o `next`
@@ -1291,7 +1319,7 @@ if ([].keys) {
1291
1319
  }
1292
1320
  }
1293
1321
 
1294
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$2(function () {
1322
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$2(function () {
1295
1323
  var test = {};
1296
1324
  // FF44- legacy iterators case
1297
1325
  return IteratorPrototype$2[ITERATOR$5].call(test) !== test;
@@ -1333,7 +1361,7 @@ var Iterators$4 = iterators;
1333
1361
 
1334
1362
  var returnThis$1 = function () { return this; };
1335
1363
 
1336
- var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1364
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1337
1365
  var TO_STRING_TAG = NAME + ' Iterator';
1338
1366
  IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1339
1367
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
@@ -1344,30 +1372,30 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENU
1344
1372
  var isCallable$7 = isCallable$k;
1345
1373
 
1346
1374
  var $String = String;
1347
- var $TypeError$6 = TypeError;
1375
+ var $TypeError$7 = TypeError;
1348
1376
 
1349
1377
  var aPossiblePrototype$1 = function (argument) {
1350
1378
  if (typeof argument == 'object' || isCallable$7(argument)) return argument;
1351
- throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
1379
+ throw $TypeError$7("Can't set " + $String(argument) + ' as a prototype');
1352
1380
  };
1353
1381
 
1354
1382
  /* eslint-disable no-proto -- safe */
1355
1383
 
1356
- var uncurryThis$3 = functionUncurryThis;
1384
+ var uncurryThis$4 = functionUncurryThis;
1357
1385
  var anObject$5 = anObject$a;
1358
1386
  var aPossiblePrototype = aPossiblePrototype$1;
1359
1387
 
1360
1388
  // `Object.setPrototypeOf` method
1361
1389
  // https://tc39.es/ecma262/#sec-object.setprototypeof
1362
1390
  // Works with __proto__ only. Old v8 can't work with null proto objects.
1363
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1391
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1364
1392
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1365
1393
  var CORRECT_SETTER = false;
1366
1394
  var test = {};
1367
1395
  var setter;
1368
1396
  try {
1369
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1370
- setter = uncurryThis$3(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1397
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1398
+ setter = uncurryThis$4(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1371
1399
  setter(test, []);
1372
1400
  CORRECT_SETTER = test instanceof Array;
1373
1401
  } catch (error) { /* empty */ }
@@ -1384,7 +1412,7 @@ var $$7 = _export;
1384
1412
  var call$8 = functionCall;
1385
1413
  var FunctionName = functionName;
1386
1414
  var isCallable$6 = isCallable$k;
1387
- var createIteratorConstructor = createIteratorConstructor$1;
1415
+ var createIteratorConstructor = iteratorCreateConstructor;
1388
1416
  var getPrototypeOf = objectGetPrototypeOf;
1389
1417
  var setPrototypeOf$1 = objectSetPrototypeOf;
1390
1418
  var setToStringTag$1 = setToStringTag$3;
@@ -1405,7 +1433,7 @@ var ENTRIES = 'entries';
1405
1433
 
1406
1434
  var returnThis = function () { return this; };
1407
1435
 
1408
- var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1436
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1409
1437
  createIteratorConstructor(IteratorConstructor, NAME, next);
1410
1438
 
1411
1439
  var getIterationMethod = function (KIND) {
@@ -1477,12 +1505,19 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1477
1505
  return methods;
1478
1506
  };
1479
1507
 
1508
+ // `CreateIterResultObject` abstract operation
1509
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1510
+ var createIterResultObject$1 = function (value, done) {
1511
+ return { value: value, done: done };
1512
+ };
1513
+
1480
1514
  var toIndexedObject = toIndexedObject$5;
1481
1515
  var addToUnscopables$1 = addToUnscopables$2;
1482
1516
  var Iterators$2 = iterators;
1483
1517
  var InternalStateModule$1 = internalState;
1484
1518
  var defineProperty = objectDefineProperty.f;
1485
- var defineIterator = defineIterator$1;
1519
+ var defineIterator = iteratorDefine;
1520
+ var createIterResultObject = createIterResultObject$1;
1486
1521
  var DESCRIPTORS$1 = descriptors;
1487
1522
 
1488
1523
  var ARRAY_ITERATOR = 'Array Iterator';
@@ -1515,11 +1550,11 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1515
1550
  var index = state.index++;
1516
1551
  if (!target || index >= target.length) {
1517
1552
  state.target = undefined;
1518
- return { value: undefined, done: true };
1553
+ return createIterResultObject(undefined, true);
1519
1554
  }
1520
- if (kind == 'keys') return { value: index, done: false };
1521
- if (kind == 'values') return { value: target[index], done: false };
1522
- return { value: [index, target[index]], done: false };
1555
+ if (kind == 'keys') return createIterResultObject(index, false);
1556
+ if (kind == 'values') return createIterResultObject(target[index], false);
1557
+ return createIterResultObject([index, target[index]], false);
1523
1558
  }, 'values');
1524
1559
 
1525
1560
  // argumentsList[@@iterator] is %ArrayProto_values%
@@ -18831,7 +18866,6 @@ const useAddress = ({
18831
18866
  }) => {
18832
18867
  const {
18833
18868
  errors: validateAddressErrors,
18834
- isMutating: isAddressValidating,
18835
18869
  trigger: validateAddresses
18836
18870
  } = elementsCore.useValidateAddresses();
18837
18871
  const {
@@ -18866,9 +18900,9 @@ const useAddress = ({
18866
18900
  matchedAddress,
18867
18901
  originalAddress,
18868
18902
  status
18869
- } = validation; // If the address is domestic, we always default to the matchedAddress if it exists.
18903
+ } = validation;
18904
+ // If the address is domestic, we always default to the matchedAddress if it exists.
18870
18905
  // If the address is international, we always default to the original due to issues with SE-API's validation
18871
-
18872
18906
  const selectionSource = elementsCore.isDomesticAddress(originalAddress) && status !== "error" ? matchedAddress ? "matchedAddress" : "originalAddress" : "originalAddress";
18873
18907
  const alternativeSource = selectionSource === "matchedAddress" ? "originalAddress" : "matchedAddress";
18874
18908
  const newAddressPreference = Object.assign(Object.assign(Object.assign({}, validation), _.isEqual(originalAddress, matchedAddress) ? {
@@ -18895,7 +18929,6 @@ const useAddress = ({
18895
18929
  setAddressPreference(updatedAddressPreference);
18896
18930
  return updatedAddressPreference;
18897
18931
  }, [toggle]);
18898
-
18899
18932
  const handleParseShipTo = ({
18900
18933
  fullAddress
18901
18934
  }) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18904,15 +18937,12 @@ const useAddress = ({
18904
18937
  });
18905
18938
  return parseResult;
18906
18939
  });
18907
-
18908
18940
  const handleValidateAddress = react.useCallback((address, fallbackAddress) => __awaiter(void 0, void 0, void 0, function* () {
18909
- if (isAddressValidating) return;
18910
18941
  setAddressPreference(undefined);
18911
18942
  const result = yield validateAddresses({
18912
18943
  addresses: [address]
18913
18944
  });
18914
18945
  const [addressValidation] = result !== null && result !== void 0 ? result : [];
18915
-
18916
18946
  if (addressValidation) {
18917
18947
  const updatedAddressPreference = resetAddressPreference(addressValidation, fallbackAddress);
18918
18948
  yield onValidation === null || onValidation === void 0 ? void 0 : onValidation(updatedAddressPreference);
@@ -18927,7 +18957,7 @@ const useAddress = ({
18927
18957
  status: "error"
18928
18958
  });
18929
18959
  }
18930
- }), [isAddressValidating, onValidation, resetAddressPreference, validateAddresses]);
18960
+ }), [onValidation, resetAddressPreference, validateAddresses]);
18931
18961
  const handleChangeAddress = react.useCallback((shipTo, {
18932
18962
  shouldValidate
18933
18963
  }) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18938,7 +18968,6 @@ const useAddress = ({
18938
18968
  yield onChange === null || onChange === void 0 ? void 0 : onChange(shipment, Object.assign(Object.assign({}, shipment), {
18939
18969
  shipTo
18940
18970
  }));
18941
-
18942
18971
  if (shouldValidate) {
18943
18972
  yield handleValidateAddress(shipTo);
18944
18973
  }
@@ -18971,7 +19000,6 @@ const useCustoms = ({
18971
19000
  const updatedShipment = yield updateShipment(Object.assign(Object.assign({}, shipment), {
18972
19001
  customs
18973
19002
  }));
18974
-
18975
19003
  if (updatedShipment) {
18976
19004
  yield onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(updatedShipment);
18977
19005
  }
@@ -18992,7 +19020,6 @@ const usePresets = ({
18992
19020
  } = elementsCore.useUpdateShipment({
18993
19021
  shipmentId: shipment === null || shipment === void 0 ? void 0 : shipment.shipmentId
18994
19022
  });
18995
-
18996
19023
  const handleApplyPreset = preset => __awaiter(void 0, void 0, void 0, function* () {
18997
19024
  const updatedShipment = yield updateShipment(Object.assign(Object.assign(Object.assign({}, shipment), preset.serviceCode && preset.carrierId && {
18998
19025
  carrierId: preset.carrierId,
@@ -19016,36 +19043,44 @@ const usePresets = ({
19016
19043
  packageCode: preset.packageCode
19017
19044
  }] : undefined
19018
19045
  }));
19019
-
19020
19046
  if (updatedShipment) {
19021
19047
  yield onApply === null || onApply === void 0 ? void 0 : onApply(preset, updatedShipment);
19022
19048
  }
19023
19049
  });
19024
-
19025
19050
  return {
19026
19051
  handleApplyPreset,
19027
19052
  presetErrors: updateShipmentErrors
19028
19053
  };
19029
19054
  };
19030
19055
 
19031
- var classof$4 = classofRaw$1;
19056
+ var classof$4 = classofRaw$2;
19032
19057
 
19033
19058
  // `IsArray` abstract operation
19034
19059
  // https://tc39.es/ecma262/#sec-isarray
19035
- // eslint-disable-next-line es-x/no-array-isarray -- safe
19060
+ // eslint-disable-next-line es/no-array-isarray -- safe
19036
19061
  var isArray$2 = Array.isArray || function isArray(argument) {
19037
19062
  return classof$4(argument) == 'Array';
19038
19063
  };
19039
19064
 
19040
- var $TypeError$5 = TypeError;
19065
+ var $TypeError$6 = TypeError;
19041
19066
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
19042
19067
 
19043
19068
  var doesNotExceedSafeInteger$1 = function (it) {
19044
- if (it > MAX_SAFE_INTEGER) throw $TypeError$5('Maximum allowed index exceeded');
19069
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$6('Maximum allowed index exceeded');
19045
19070
  return it;
19046
19071
  };
19047
19072
 
19048
- var uncurryThis$2 = functionUncurryThis;
19073
+ var classofRaw$1 = classofRaw$2;
19074
+ var uncurryThis$3 = functionUncurryThis;
19075
+
19076
+ var functionUncurryThisClause = function (fn) {
19077
+ // Nashorn bug:
19078
+ // https://github.com/zloirock/core-js/issues/1128
19079
+ // https://github.com/zloirock/core-js/issues/1130
19080
+ if (classofRaw$1(fn) === 'Function') return uncurryThis$3(fn);
19081
+ };
19082
+
19083
+ var uncurryThis$2 = functionUncurryThisClause;
19049
19084
  var aCallable$6 = aCallable$8;
19050
19085
  var NATIVE_BIND$1 = functionBindNative;
19051
19086
 
@@ -19104,7 +19139,7 @@ var toStringTagSupport = String(test) === '[object z]';
19104
19139
 
19105
19140
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
19106
19141
  var isCallable$5 = isCallable$k;
19107
- var classofRaw = classofRaw$1;
19142
+ var classofRaw = classofRaw$2;
19108
19143
  var wellKnownSymbol$7 = wellKnownSymbol$f;
19109
19144
 
19110
19145
  var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
@@ -19137,7 +19172,7 @@ var fails$1 = fails$d;
19137
19172
  var isCallable$4 = isCallable$k;
19138
19173
  var classof$2 = classof$3;
19139
19174
  var getBuiltIn$3 = getBuiltIn$8;
19140
- var inspectSource$1 = inspectSource$4;
19175
+ var inspectSource$1 = inspectSource$3;
19141
19176
 
19142
19177
  var noop = function () { /* empty */ };
19143
19178
  var empty = [];
@@ -19187,7 +19222,7 @@ var isConstructor$2 = !construct || fails$1(function () {
19187
19222
 
19188
19223
  var isArray = isArray$2;
19189
19224
  var isConstructor$1 = isConstructor$2;
19190
- var isObject$2 = isObject$8;
19225
+ var isObject$2 = isObject$9;
19191
19226
  var wellKnownSymbol$6 = wellKnownSymbol$f;
19192
19227
 
19193
19228
  var SPECIES$3 = wellKnownSymbol$6('species');
@@ -19262,7 +19297,6 @@ const useRequestRates = ({
19262
19297
  } = elementsCore.useCalculateRates();
19263
19298
  const requestRates = react.useCallback(shipment => __awaiter(void 0, void 0, void 0, function* () {
19264
19299
  var _a;
19265
-
19266
19300
  const result = yield calculateRates({
19267
19301
  rateOptions: {
19268
19302
  carrierIds: shipment.carrierId ? [shipment.carrierId] : (_a = carriers === null || carriers === void 0 ? void 0 : carriers.map(c => c.carrierId)) !== null && _a !== void 0 ? _a : [],
@@ -19294,7 +19328,6 @@ const useRatesForm = ({
19294
19328
  shipment
19295
19329
  }) => {
19296
19330
  var _a, _b;
19297
-
19298
19331
  const [beforeCreateError, setBeforeCreateError] = react.useState();
19299
19332
  const {
19300
19333
  data: carriers
@@ -19320,7 +19353,6 @@ const useRatesForm = ({
19320
19353
  setBeforeCreateError(undefined);
19321
19354
  if (!shipment) return;
19322
19355
  const rate = ratesResponse === null || ratesResponse === void 0 ? void 0 : ratesResponse.rates.find(r => r.rateId === rateId);
19323
-
19324
19356
  if (rate) {
19325
19357
  try {
19326
19358
  yield onBeforeLabelCreate === null || onBeforeLabelCreate === void 0 ? void 0 : onBeforeLabelCreate(rate, shipment);
@@ -19333,12 +19365,10 @@ const useRatesForm = ({
19333
19365
  });
19334
19366
  return;
19335
19367
  }
19336
-
19337
19368
  try {
19338
19369
  const label = yield createLabel({
19339
19370
  rateId
19340
19371
  });
19341
-
19342
19372
  if (label) {
19343
19373
  yield onLabelCreateSuccess === null || onLabelCreateSuccess === void 0 ? void 0 : onLabelCreateSuccess(label, shipment);
19344
19374
  } else {
@@ -19357,17 +19387,16 @@ const useRatesForm = ({
19357
19387
  carrierId,
19358
19388
  serviceCode
19359
19389
  }));
19360
-
19361
19390
  if (updatedShipment) {
19362
19391
  yield onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(updatedShipment);
19363
19392
  yield onRateSaved === null || onRateSaved === void 0 ? void 0 : onRateSaved(updatedShipment);
19364
19393
  }
19365
19394
  }), [onRateSaved, onShipmentUpdated, shipment, updateShipment]);
19366
19395
  let errors = [...(ratesErrors !== null && ratesErrors !== void 0 ? ratesErrors : []), ...((_a = ratesResponse === null || ratesResponse === void 0 ? void 0 : ratesResponse.errors) !== null && _a !== void 0 ? _a : [])];
19367
- if (beforeCreateError) errors = [...errors, beforeCreateError]; // Sometimes no rates are returned and no top-level errors are returned
19396
+ if (beforeCreateError) errors = [...errors, beforeCreateError];
19397
+ // Sometimes no rates are returned and no top-level errors are returned
19368
19398
  // but there are invalid rates with errors. This will expose those to the user
19369
19399
  // so the rate list isn't empty after calculating rates.
19370
-
19371
19400
  if (!errors.length) {
19372
19401
  errors = (_b = ratesResponse === null || ratesResponse === void 0 ? void 0 : ratesResponse.invalidRates.flatMap(r => r.errorMessages.map(m => ({
19373
19402
  errorSource: "shipengine",
@@ -19376,7 +19405,6 @@ const useRatesForm = ({
19376
19405
  message: m
19377
19406
  })))) !== null && _b !== void 0 ? _b : [];
19378
19407
  }
19379
-
19380
19408
  return {
19381
19409
  carriers,
19382
19410
  errors: errors.length > 0 ? errors : undefined,
@@ -19447,7 +19475,6 @@ const useShipmentForm = ({
19447
19475
  });
19448
19476
  const handleSubmit = react.useCallback(values => __awaiter(void 0, void 0, void 0, function* () {
19449
19477
  const updatedShipment = yield updateShipment(values);
19450
-
19451
19478
  if (updatedShipment) {
19452
19479
  yield onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(updatedShipment);
19453
19480
  yield onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(updatedShipment);
@@ -19472,37 +19499,35 @@ const useShipmentForm = ({
19472
19499
 
19473
19500
  const ConfigureShipment = _a => {
19474
19501
  var {
19475
- onAddressValidation,
19476
- onApplyPreset,
19477
- onBeforeLabelCreate,
19478
- onChangeAddress,
19479
- onLabelCreateFailure,
19480
- onLabelCreateSuccess,
19481
- onRateSaved,
19482
- onRatesCalculated,
19483
- onShipmentUpdated,
19484
- printLabelLayout,
19485
- salesOrder,
19486
- shipment
19487
- } = _a,
19488
- props = __rest(_a, ["onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "salesOrder", "shipment"]);
19489
-
19502
+ onAddressValidation,
19503
+ onApplyPreset,
19504
+ onBeforeLabelCreate,
19505
+ onChangeAddress,
19506
+ onLabelCreateFailure,
19507
+ onLabelCreateSuccess,
19508
+ onRateSaved,
19509
+ onRatesCalculated,
19510
+ onShipmentUpdated,
19511
+ printLabelLayout,
19512
+ salesOrder,
19513
+ shipment
19514
+ } = _a,
19515
+ props = __rest(_a, ["onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "salesOrder", "shipment"]);
19490
19516
  const _b = useRatesForm({
19491
- onBeforeLabelCreate,
19492
- onLabelCreateFailure,
19493
- onLabelCreateSuccess,
19494
- onRateSaved,
19495
- onRatesCalculated,
19496
- onShipmentUpdated,
19497
- printLabelLayout,
19498
- shipment
19499
- }),
19500
- {
19501
- resetRates,
19502
- requestRates
19503
- } = _b,
19504
- rateFormProps = __rest(_b, ["resetRates", "requestRates"]);
19505
-
19517
+ onBeforeLabelCreate,
19518
+ onLabelCreateFailure,
19519
+ onLabelCreateSuccess,
19520
+ onRateSaved,
19521
+ onRatesCalculated,
19522
+ onShipmentUpdated,
19523
+ printLabelLayout,
19524
+ shipment
19525
+ }),
19526
+ {
19527
+ resetRates,
19528
+ requestRates
19529
+ } = _b,
19530
+ rateFormProps = __rest(_b, ["resetRates", "requestRates"]);
19506
19531
  const shipmentFormProps = useShipmentForm({
19507
19532
  onAddressValidation,
19508
19533
  onApplyPreset: react.useCallback((_preset, shipment) => __awaiter(void 0, void 0, void 0, function* () {
@@ -19531,7 +19556,6 @@ const usePendingShipment = ({
19531
19556
  warehouseId
19532
19557
  }) => {
19533
19558
  var _a;
19534
-
19535
19559
  const {
19536
19560
  data: warehouses,
19537
19561
  errors: listWarehouseErrors
@@ -19553,8 +19577,8 @@ const usePendingShipment = ({
19553
19577
  salesOrderId: salesOrder === null || salesOrder === void 0 ? void 0 : salesOrder.salesOrderId
19554
19578
  });
19555
19579
  const pendingShipment = elementsCore.getPendingShipment(shipments);
19556
- const defaultWarehouse = (_a = warehouses === null || warehouses === void 0 ? void 0 : warehouses.find(w => w.warehouseId === warehouseId)) !== null && _a !== void 0 ? _a : warehouses === null || warehouses === void 0 ? void 0 : warehouses[0]; // On page load, if no shipment exists, create a shipment.
19557
-
19580
+ const defaultWarehouse = (_a = warehouses === null || warehouses === void 0 ? void 0 : warehouses.find(w => w.warehouseId === warehouseId)) !== null && _a !== void 0 ? _a : warehouses === null || warehouses === void 0 ? void 0 : warehouses[0];
19581
+ // On page load, if no shipment exists, create a shipment.
19558
19582
  react.useEffect(() => {
19559
19583
  if (!salesOrder || !defaultWarehouse || !shipments || pendingShipment) return;
19560
19584
  if (isListShipmentsLoading || isListShipmentsValidating || isShipmentCreating) return;
@@ -19613,7 +19637,7 @@ const useConfigureShipment = ({
19613
19637
  };
19614
19638
  };
19615
19639
 
19616
- var classof$1 = classofRaw$1;
19640
+ var classof$1 = classofRaw$2;
19617
19641
  var global$8 = global$j;
19618
19642
 
19619
19643
  var engineIsNode = classof$1(global$8.process) == 'process';
@@ -19639,26 +19663,27 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
19639
19663
 
19640
19664
  var isPrototypeOf$1 = objectIsPrototypeOf;
19641
19665
 
19642
- var $TypeError$4 = TypeError;
19666
+ var $TypeError$5 = TypeError;
19643
19667
 
19644
19668
  var anInstance$1 = function (it, Prototype) {
19645
19669
  if (isPrototypeOf$1(Prototype, it)) return it;
19646
- throw $TypeError$4('Incorrect invocation');
19670
+ throw $TypeError$5('Incorrect invocation');
19647
19671
  };
19648
19672
 
19649
19673
  var isConstructor = isConstructor$2;
19650
19674
  var tryToString$2 = tryToString$4;
19651
19675
 
19652
- var $TypeError$3 = TypeError;
19676
+ var $TypeError$4 = TypeError;
19653
19677
 
19654
19678
  // `Assert: IsConstructor(argument) is true`
19655
19679
  var aConstructor$1 = function (argument) {
19656
19680
  if (isConstructor(argument)) return argument;
19657
- throw $TypeError$3(tryToString$2(argument) + ' is not a constructor');
19681
+ throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
19658
19682
  };
19659
19683
 
19660
19684
  var anObject$4 = anObject$a;
19661
19685
  var aConstructor = aConstructor$1;
19686
+ var isNullOrUndefined$1 = isNullOrUndefined$4;
19662
19687
  var wellKnownSymbol$4 = wellKnownSymbol$f;
19663
19688
 
19664
19689
  var SPECIES$1 = wellKnownSymbol$4('species');
@@ -19668,7 +19693,7 @@ var SPECIES$1 = wellKnownSymbol$4('species');
19668
19693
  var speciesConstructor$1 = function (O, defaultConstructor) {
19669
19694
  var C = anObject$4(O).constructor;
19670
19695
  var S;
19671
- return C === undefined || (S = anObject$4(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
19696
+ return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
19672
19697
  };
19673
19698
 
19674
19699
  var NATIVE_BIND = functionBindNative;
@@ -19677,7 +19702,7 @@ var FunctionPrototype = Function.prototype;
19677
19702
  var apply$1 = FunctionPrototype.apply;
19678
19703
  var call$7 = FunctionPrototype.call;
19679
19704
 
19680
- // eslint-disable-next-line es-x/no-reflect -- safe
19705
+ // eslint-disable-next-line es/no-reflect -- safe
19681
19706
  var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$7.bind(apply$1) : function () {
19682
19707
  return call$7.apply(apply$1, arguments);
19683
19708
  });
@@ -19686,10 +19711,10 @@ var uncurryThis = functionUncurryThis;
19686
19711
 
19687
19712
  var arraySlice$1 = uncurryThis([].slice);
19688
19713
 
19689
- var $TypeError$2 = TypeError;
19714
+ var $TypeError$3 = TypeError;
19690
19715
 
19691
19716
  var validateArgumentsLength$1 = function (passed, required) {
19692
- if (passed < required) throw $TypeError$2('Not enough arguments');
19717
+ if (passed < required) throw $TypeError$3('Not enough arguments');
19693
19718
  return passed;
19694
19719
  };
19695
19720
 
@@ -19720,11 +19745,11 @@ var String$1 = global$7.String;
19720
19745
  var counter = 0;
19721
19746
  var queue$1 = {};
19722
19747
  var ONREADYSTATECHANGE = 'onreadystatechange';
19723
- var location, defer, channel, port;
19748
+ var $location, defer, channel, port;
19724
19749
 
19725
19750
  try {
19726
19751
  // Deno throws a ReferenceError on `location` access without `--location` flag
19727
- location = global$7.location;
19752
+ $location = global$7.location;
19728
19753
  } catch (error) { /* empty */ }
19729
19754
 
19730
19755
  var run = function (id) {
@@ -19747,7 +19772,7 @@ var listener = function (event) {
19747
19772
 
19748
19773
  var post = function (id) {
19749
19774
  // old engines have not location.origin
19750
- global$7.postMessage(String$1(id), location.protocol + '//' + location.host);
19775
+ global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
19751
19776
  };
19752
19777
 
19753
19778
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -19788,7 +19813,7 @@ if (!set || !clear) {
19788
19813
  global$7.addEventListener &&
19789
19814
  isCallable$3(global$7.postMessage) &&
19790
19815
  !global$7.importScripts &&
19791
- location && location.protocol !== 'file:' &&
19816
+ $location && $location.protocol !== 'file:' &&
19792
19817
  !fails(post)
19793
19818
  ) {
19794
19819
  defer = post;
@@ -19969,7 +19994,7 @@ var global$2 = global$j;
19969
19994
  var NativePromiseConstructor$3 = promiseNativeConstructor;
19970
19995
  var isCallable$2 = isCallable$k;
19971
19996
  var isForced = isForced_1;
19972
- var inspectSource = inspectSource$4;
19997
+ var inspectSource = inspectSource$3;
19973
19998
  var wellKnownSymbol$3 = wellKnownSymbol$f;
19974
19999
  var IS_BROWSER = engineIsBrowser;
19975
20000
  var IS_DENO = engineIsDeno;
@@ -20014,10 +20039,12 @@ var newPromiseCapability$2 = {};
20014
20039
 
20015
20040
  var aCallable$4 = aCallable$8;
20016
20041
 
20042
+ var $TypeError$2 = TypeError;
20043
+
20017
20044
  var PromiseCapability = function (C) {
20018
20045
  var resolve, reject;
20019
20046
  this.promise = new C(function ($$resolve, $$reject) {
20020
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
20047
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
20021
20048
  resolve = $$resolve;
20022
20049
  reject = $$reject;
20023
20050
  });
@@ -20041,7 +20068,7 @@ var setToStringTag = setToStringTag$3;
20041
20068
  var setSpecies = setSpecies$1;
20042
20069
  var aCallable$3 = aCallable$8;
20043
20070
  var isCallable$1 = isCallable$k;
20044
- var isObject$1 = isObject$8;
20071
+ var isObject$1 = isObject$9;
20045
20072
  var anInstance = anInstance$1;
20046
20073
  var speciesConstructor = speciesConstructor$1;
20047
20074
  var task = task$1.set;
@@ -20331,13 +20358,14 @@ var isArrayIteratorMethod$1 = function (it) {
20331
20358
 
20332
20359
  var classof = classof$3;
20333
20360
  var getMethod$1 = getMethod$3;
20361
+ var isNullOrUndefined = isNullOrUndefined$4;
20334
20362
  var Iterators = iterators;
20335
20363
  var wellKnownSymbol$1 = wellKnownSymbol$f;
20336
20364
 
20337
20365
  var ITERATOR$1 = wellKnownSymbol$1('iterator');
20338
20366
 
20339
20367
  var getIteratorMethod$2 = function (it) {
20340
- if (it != undefined) return getMethod$1(it, ITERATOR$1)
20368
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
20341
20369
  || getMethod$1(it, '@@iterator')
20342
20370
  || Iterators[classof(it)];
20343
20371
  };
@@ -20467,7 +20495,7 @@ try {
20467
20495
  iteratorWithReturn[ITERATOR] = function () {
20468
20496
  return this;
20469
20497
  };
20470
- // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
20498
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
20471
20499
  Array.from(iteratorWithReturn, function () { throw 2; });
20472
20500
  } catch (error) { /* empty */ }
20473
20501
 
@@ -20602,7 +20630,7 @@ $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
20602
20630
  });
20603
20631
 
20604
20632
  var anObject = anObject$a;
20605
- var isObject = isObject$8;
20633
+ var isObject = isObject$9;
20606
20634
  var newPromiseCapability = newPromiseCapability$2;
20607
20635
 
20608
20636
  var promiseResolve$1 = function (C, x) {
@@ -20671,7 +20699,6 @@ const useImportSalesOrder = ({
20671
20699
  }, [hasRefreshedOrderSource, orderSources, refreshOrderSource, refreshedOrderSource, revalidateSalesOrders, salesOrders]);
20672
20700
  const errors = [...(listOrderSourcesErrors !== null && listOrderSourcesErrors !== void 0 ? listOrderSourcesErrors : []), ...(listSalesOrdersErrors !== null && listSalesOrdersErrors !== void 0 ? listSalesOrdersErrors : []), ...(refreshOrderSourceErrors !== null && refreshOrderSourceErrors !== void 0 ? refreshOrderSourceErrors : [])];
20673
20701
  const salesOrder = salesOrders === null || salesOrders === void 0 ? void 0 : salesOrders[0]; // Assume there's only one sales order matching the given identifier
20674
-
20675
20702
  return {
20676
20703
  errors: errors.length > 0 ? errors : undefined,
20677
20704
  isLoading: !salesOrder && !hasRefreshedOrderSource && errors.length === 0,
@@ -20681,27 +20708,25 @@ const useImportSalesOrder = ({
20681
20708
 
20682
20709
  const SalesOrder = _a => {
20683
20710
  var {
20684
- externalOrderId,
20685
- externalOrderNumber,
20686
- onLoad,
20687
- onShipmentUpdated,
20688
- orderSourceCode,
20689
- salesOrderId,
20690
- warehouseId
20691
- } = _a,
20692
- props = __rest(_a, ["externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId"]);
20693
-
20711
+ externalOrderId,
20712
+ externalOrderNumber,
20713
+ onLoad,
20714
+ onShipmentUpdated,
20715
+ orderSourceCode,
20716
+ salesOrderId,
20717
+ warehouseId
20718
+ } = _a,
20719
+ props = __rest(_a, ["externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId"]);
20694
20720
  const _b = useImportSalesOrder({
20695
- externalOrderId,
20696
- externalOrderNumber,
20697
- orderSourceCode,
20698
- salesOrderId
20699
- }),
20700
- {
20701
- salesOrder
20702
- } = _b,
20703
- salesOrderProps = __rest(_b, ["salesOrder"]);
20704
-
20721
+ externalOrderId,
20722
+ externalOrderNumber,
20723
+ orderSourceCode,
20724
+ salesOrderId
20725
+ }),
20726
+ {
20727
+ salesOrder
20728
+ } = _b,
20729
+ salesOrderProps = __rest(_b, ["salesOrder"]);
20705
20730
  const configureShipmentProps = useConfigureShipment({
20706
20731
  onLoad,
20707
20732
  onShipmentUpdated,
@@ -20726,7 +20751,6 @@ const Shipment = ({
20726
20751
  shipmentId
20727
20752
  }) => {
20728
20753
  var _a, _b, _c;
20729
-
20730
20754
  const {
20731
20755
  t
20732
20756
  } = reactI18next.useTranslation(["common", "view-shipment"]);
@@ -20748,7 +20772,6 @@ const Shipment = ({
20748
20772
  if (!shipment.data) throw new Error("errorMessages.unableToLoad.shipment");
20749
20773
  const warehouse = (_b = warehouses.data) === null || _b === void 0 ? void 0 : _b.find(w => {
20750
20774
  var _a;
20751
-
20752
20775
  return w.warehouseId === ((_a = shipment.data) === null || _a === void 0 ? void 0 : _a.warehouseId);
20753
20776
  });
20754
20777
  const salesOrder = (_c = salesOrders.data) === null || _c === void 0 ? void 0 : _c[0];
@@ -20771,7 +20794,6 @@ const VoidLabel = ({
20771
20794
  onViewShipment
20772
20795
  }) => {
20773
20796
  var _a;
20774
-
20775
20797
  const label = elementsCore.useGetLabel({
20776
20798
  labelId
20777
20799
  });
@@ -20781,16 +20803,14 @@ const VoidLabel = ({
20781
20803
  const voidLabel = elementsCore.useVoidLabel({
20782
20804
  labelId
20783
20805
  });
20784
-
20785
20806
  const handleVoidLabelSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
20786
- const result = yield voidLabel.trigger(label.data); // We should always have label.data and shipment.data if the request was approved,
20807
+ const result = yield voidLabel.trigger(label.data);
20808
+ // We should always have label.data and shipment.data if the request was approved,
20787
20809
  // but we aren't using Suspense so we still need to check.
20788
-
20789
20810
  if ((result === null || result === void 0 ? void 0 : result.approved) && label.data && shipment.data) {
20790
20811
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(label.data, shipment.data);
20791
20812
  }
20792
20813
  });
20793
-
20794
20814
  return jsxRuntime.jsx(elementsUi.Templates.VoidLabel, {
20795
20815
  onComplete: onComplete,
20796
20816
  onSubmit: handleVoidLabelSubmit,