@carbon/ibmdotcom-web-components 2.20.0 → 2.21.0

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 (39) hide show
  1. package/dist/dotcom-shell.js +5 -5
  2. package/dist/dotcom-shell.min.js +6 -6
  3. package/dist/ibmdotcom-web-components-dotcom-shell.js +5 -5
  4. package/dist/ibmdotcom-web-components-dotcom-shell.min.js +6 -6
  5. package/dist/{index-ca29a51a.js → index-e3ec2724.js} +184 -166
  6. package/dist/{index-da32acc5.js → index-e8791a02.js} +321 -321
  7. package/dist/{left-nav-menu-03ca4e6e.js → left-nav-menu-56460567.js} +6 -6
  8. package/dist/{left-nav-menu-73c960db.js → left-nav-menu-6d7ef1ea.js} +5 -5
  9. package/dist/{left-nav-menu-category-heading-cefcd3f0.js → left-nav-menu-category-heading-d849afd1.js} +6 -6
  10. package/dist/{left-nav-menu-category-heading-be0319c6.js → left-nav-menu-category-heading-e7b9a1d5.js} +5 -5
  11. package/dist/{left-nav-menu-item-83f4767e.js → left-nav-menu-item-038f4f32.js} +5 -5
  12. package/dist/{left-nav-menu-item-a2a18a4a.js → left-nav-menu-item-d5d61f65.js} +6 -6
  13. package/dist/{left-nav-menu-section-91e5a492.js → left-nav-menu-section-29f09097.js} +5 -5
  14. package/dist/{left-nav-menu-section-47c67bd8.js → left-nav-menu-section-a702419f.js} +6 -6
  15. package/dist/{left-nav-overlay-ad684e9d.js → left-nav-overlay-da72cb49.js} +6 -6
  16. package/dist/{left-nav-overlay-8d2ad9f9.js → left-nav-overlay-eaec1924.js} +5 -5
  17. package/dist/{megamenu-category-group-103d2863.js → megamenu-category-group-2ce1cfcd.js} +6 -6
  18. package/dist/{megamenu-category-group-5e6c9054.js → megamenu-category-group-8d5b8a00.js} +5 -5
  19. package/dist/{megamenu-category-group-copy-cc99c2a6.js → megamenu-category-group-copy-3f8b8d92.js} +6 -6
  20. package/dist/{megamenu-category-group-copy-85fc4ede.js → megamenu-category-group-copy-40334ef1.js} +5 -5
  21. package/dist/{megamenu-category-heading-4a2cb054.js → megamenu-category-heading-d9040ec4.js} +6 -6
  22. package/dist/{megamenu-category-heading-7de1ccc9.js → megamenu-category-heading-eb10286a.js} +5 -5
  23. package/dist/{megamenu-category-link-94a3a869.js → megamenu-category-link-128e49f1.js} +5 -5
  24. package/dist/{megamenu-category-link-e61ee8d2.js → megamenu-category-link-a40351df.js} +6 -6
  25. package/dist/{megamenu-category-link-group-58ddce41.js → megamenu-category-link-group-6becb24d.js} +5 -5
  26. package/dist/{megamenu-category-link-group-99a611b4.js → megamenu-category-link-group-868a6a66.js} +6 -6
  27. package/dist/{megamenu-left-navigation-d61da700.js → megamenu-left-navigation-5a26ce55.js} +5 -5
  28. package/dist/{megamenu-left-navigation-15fbe30b.js → megamenu-left-navigation-b38cd235.js} +6 -6
  29. package/dist/{megamenu-overlay-7809b18f.js → megamenu-overlay-16b7ccd4.js} +6 -6
  30. package/dist/{megamenu-overlay-3455b503.js → megamenu-overlay-291e4fd4.js} +5 -5
  31. package/dist/{megamenu-tab-bb86ecbf.js → megamenu-tab-0d8bdef8.js} +5 -5
  32. package/dist/{megamenu-tab-7cfc65ba.js → megamenu-tab-788452a2.js} +6 -6
  33. package/es/components/background-media/background-media.css.js +1 -1
  34. package/es/components/masthead/masthead-menu-button.d.ts +3 -1
  35. package/es/components/masthead/masthead-menu-button.js +25 -1
  36. package/es/components/masthead/masthead-menu-button.js.map +1 -1
  37. package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
  38. package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
  39. package/package.json +5 -5
@@ -20,16 +20,16 @@
20
20
  * This source code is licensed under the Apache-2.0 license found in the
21
21
  * LICENSE file in the root directory of this source tree.
22
22
  *
23
- * lit-html:
23
+ * lit-element:
24
24
  *
25
25
  * @license
26
- * Copyright 2022 Google LLC
26
+ * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  *
29
- * lit-element:
29
+ * lit-html:
30
30
  *
31
31
  * @license
32
- * Copyright 2017 Google LLC
32
+ * Copyright 2022 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  *
35
35
  * @lit/reactive-element:
@@ -102,10 +102,10 @@ let process = { env: {} };
102
102
  * @type {object} Settings object
103
103
  * @property {string} [stablePrefix=c4d] stable prefix
104
104
  * @property {string} [prefix=cds] core Carbon prefix
105
- * Carbon for IBM.com v2.20.0',
105
+ * Carbon for IBM.com v2.21.0',
106
106
  */
107
107
  var settings = {
108
- version: 'Carbon for IBM.com v2.20.0',
108
+ version: 'Carbon for IBM.com v2.21.0',
109
109
  stablePrefix: 'c4d',
110
110
  prefix: 'cds'
111
111
  };
@@ -4765,11 +4765,11 @@ var _typeof$2 = {exports: {}};
4765
4765
  function _typeof(o) {
4766
4766
  "@babel/helpers - typeof";
4767
4767
 
4768
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
4768
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
4769
4769
  return typeof o;
4770
4770
  } : function (o) {
4771
4771
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
4772
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
4772
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
4773
4773
  }
4774
4774
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
4775
4775
  }(_typeof$2));
@@ -5782,26 +5782,6 @@ const toFiniteNumber = (value, defaultValue) => {
5782
5782
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
5783
5783
  };
5784
5784
 
5785
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
5786
-
5787
- const DIGIT = '0123456789';
5788
-
5789
- const ALPHABET = {
5790
- DIGIT,
5791
- ALPHA,
5792
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
5793
- };
5794
-
5795
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
5796
- let str = '';
5797
- const {length} = alphabet;
5798
- while (size--) {
5799
- str += alphabet[Math.random() * length|0];
5800
- }
5801
-
5802
- return str;
5803
- };
5804
-
5805
5785
  /**
5806
5786
  * If the thing is a FormData object, return true, otherwise return false.
5807
5787
  *
@@ -5929,8 +5909,6 @@ var utils$1 = {
5929
5909
  findKey,
5930
5910
  global: _global,
5931
5911
  isContextDefined,
5932
- ALPHABET,
5933
- generateString,
5934
5912
  isSpecCompliantForm,
5935
5913
  toJSONObject,
5936
5914
  isAsyncFn,
@@ -5964,7 +5942,10 @@ function AxiosError(message, code, config, request, response) {
5964
5942
  code && (this.code = code);
5965
5943
  config && (this.config = config);
5966
5944
  request && (this.request = request);
5967
- response && (this.response = response);
5945
+ if (response) {
5946
+ this.response = response;
5947
+ this.status = response.status ? response.status : null;
5948
+ }
5968
5949
  }
5969
5950
 
5970
5951
  utils$1.inherits(AxiosError, Error, {
@@ -5984,7 +5965,7 @@ utils$1.inherits(AxiosError, Error, {
5984
5965
  // Axios
5985
5966
  config: utils$1.toJSONObject(this.config),
5986
5967
  code: this.code,
5987
- status: this.response && this.response.status ? this.response.status : null
5968
+ status: this.status
5988
5969
  };
5989
5970
  }
5990
5971
  });
@@ -6324,7 +6305,7 @@ function encode(val) {
6324
6305
  *
6325
6306
  * @param {string} url The base of the url (e.g., http://www.google.com)
6326
6307
  * @param {object} [params] The params to be appended
6327
- * @param {?object} options
6308
+ * @param {?(object|Function)} options
6328
6309
  *
6329
6310
  * @returns {string} The formatted url
6330
6311
  */
@@ -6336,6 +6317,12 @@ function buildURL(url, params, options) {
6336
6317
 
6337
6318
  const _encode = options && options.encode || encode;
6338
6319
 
6320
+ if (utils$1.isFunction(options)) {
6321
+ options = {
6322
+ serialize: options
6323
+ };
6324
+ }
6325
+
6339
6326
  const serializeFn = options && options.serialize;
6340
6327
 
6341
6328
  let serializedParams;
@@ -6452,6 +6439,8 @@ var platform$1 = {
6452
6439
 
6453
6440
  const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
6454
6441
 
6442
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
6443
+
6455
6444
  /**
6456
6445
  * Determine if we're running in a standard browser environment
6457
6446
  *
@@ -6469,10 +6458,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
6469
6458
  *
6470
6459
  * @returns {boolean}
6471
6460
  */
6472
- const hasStandardBrowserEnv = (
6473
- (product) => {
6474
- return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
6475
- })(typeof navigator !== 'undefined' && navigator.product);
6461
+ const hasStandardBrowserEnv = hasBrowserEnv &&
6462
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
6476
6463
 
6477
6464
  /**
6478
6465
  * Determine if we're running in a standard browser webWorker environment
@@ -6499,6 +6486,7 @@ var utils = /*#__PURE__*/Object.freeze({
6499
6486
  hasBrowserEnv: hasBrowserEnv,
6500
6487
  hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
6501
6488
  hasStandardBrowserEnv: hasStandardBrowserEnv,
6489
+ navigator: _navigator,
6502
6490
  origin: origin
6503
6491
  });
6504
6492
 
@@ -7323,68 +7311,18 @@ const progressEventDecorator = (total, throttled) => {
7323
7311
 
7324
7312
  const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
7325
7313
 
7326
- var isURLSameOrigin = platform.hasStandardBrowserEnv ?
7327
-
7328
- // Standard browser envs have full support of the APIs needed to test
7329
- // whether the request URL is of the same origin as current location.
7330
- (function standardBrowserEnv() {
7331
- const msie = /(msie|trident)/i.test(navigator.userAgent);
7332
- const urlParsingNode = document.createElement('a');
7333
- let originURL;
7334
-
7335
- /**
7336
- * Parse a URL to discover its components
7337
- *
7338
- * @param {String} url The URL to be parsed
7339
- * @returns {Object}
7340
- */
7341
- function resolveURL(url) {
7342
- let href = url;
7343
-
7344
- if (msie) {
7345
- // IE needs attribute set twice to normalize properties
7346
- urlParsingNode.setAttribute('href', href);
7347
- href = urlParsingNode.href;
7348
- }
7349
-
7350
- urlParsingNode.setAttribute('href', href);
7351
-
7352
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
7353
- return {
7354
- href: urlParsingNode.href,
7355
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
7356
- host: urlParsingNode.host,
7357
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
7358
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
7359
- hostname: urlParsingNode.hostname,
7360
- port: urlParsingNode.port,
7361
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
7362
- urlParsingNode.pathname :
7363
- '/' + urlParsingNode.pathname
7364
- };
7365
- }
7366
-
7367
- originURL = resolveURL(window.location.href);
7368
-
7369
- /**
7370
- * Determine if a URL shares the same origin as the current location
7371
- *
7372
- * @param {String} requestURL The URL to test
7373
- * @returns {boolean} True if URL shares the same origin, otherwise false
7374
- */
7375
- return function isURLSameOrigin(requestURL) {
7376
- const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
7377
- return (parsed.protocol === originURL.protocol &&
7378
- parsed.host === originURL.host);
7379
- };
7380
- })() :
7314
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
7315
+ url = new URL(url, platform.origin);
7381
7316
 
7382
- // Non standard browser envs (web workers, react-native) lack needed support.
7383
- (function nonStandardBrowserEnv() {
7384
- return function isURLSameOrigin() {
7385
- return true;
7386
- };
7387
- })();
7317
+ return (
7318
+ origin.protocol === url.protocol &&
7319
+ origin.host === url.host &&
7320
+ (isMSIE || origin.port === url.port)
7321
+ );
7322
+ })(
7323
+ new URL(platform.origin),
7324
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
7325
+ ) : () => true;
7388
7326
 
7389
7327
  var cookies = platform.hasStandardBrowserEnv ?
7390
7328
 
@@ -7463,8 +7401,9 @@ function combineURLs(baseURL, relativeURL) {
7463
7401
  *
7464
7402
  * @returns {string} The combined full path
7465
7403
  */
7466
- function buildFullPath(baseURL, requestedURL) {
7467
- if (baseURL && !isAbsoluteURL(requestedURL)) {
7404
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
7405
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
7406
+ if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
7468
7407
  return combineURLs(baseURL, requestedURL);
7469
7408
  }
7470
7409
  return requestedURL;
@@ -7486,7 +7425,7 @@ function mergeConfig(config1, config2) {
7486
7425
  config2 = config2 || {};
7487
7426
  const config = {};
7488
7427
 
7489
- function getMergedValue(target, source, caseless) {
7428
+ function getMergedValue(target, source, prop, caseless) {
7490
7429
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
7491
7430
  return utils$1.merge.call({caseless}, target, source);
7492
7431
  } else if (utils$1.isPlainObject(source)) {
@@ -7498,11 +7437,11 @@ function mergeConfig(config1, config2) {
7498
7437
  }
7499
7438
 
7500
7439
  // eslint-disable-next-line consistent-return
7501
- function mergeDeepProperties(a, b, caseless) {
7440
+ function mergeDeepProperties(a, b, prop , caseless) {
7502
7441
  if (!utils$1.isUndefined(b)) {
7503
- return getMergedValue(a, b, caseless);
7442
+ return getMergedValue(a, b, prop , caseless);
7504
7443
  } else if (!utils$1.isUndefined(a)) {
7505
- return getMergedValue(undefined, a, caseless);
7444
+ return getMergedValue(undefined, a, prop , caseless);
7506
7445
  }
7507
7446
  }
7508
7447
 
@@ -7560,7 +7499,7 @@ function mergeConfig(config1, config2) {
7560
7499
  socketPath: defaultToConfig2,
7561
7500
  responseEncoding: defaultToConfig2,
7562
7501
  validateStatus: mergeDirectKeys,
7563
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
7502
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
7564
7503
  };
7565
7504
 
7566
7505
  utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
@@ -7808,45 +7747,46 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
7808
7747
  };
7809
7748
 
7810
7749
  const composeSignals = (signals, timeout) => {
7811
- let controller = new AbortController();
7750
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
7812
7751
 
7813
- let aborted;
7752
+ if (timeout || length) {
7753
+ let controller = new AbortController();
7814
7754
 
7815
- const onabort = function (cancel) {
7816
- if (!aborted) {
7817
- aborted = true;
7818
- unsubscribe();
7819
- const err = cancel instanceof Error ? cancel : this.reason;
7820
- controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
7821
- }
7822
- };
7755
+ let aborted;
7823
7756
 
7824
- let timer = timeout && setTimeout(() => {
7825
- onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
7826
- }, timeout);
7757
+ const onabort = function (reason) {
7758
+ if (!aborted) {
7759
+ aborted = true;
7760
+ unsubscribe();
7761
+ const err = reason instanceof Error ? reason : this.reason;
7762
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
7763
+ }
7764
+ };
7827
7765
 
7828
- const unsubscribe = () => {
7829
- if (signals) {
7830
- timer && clearTimeout(timer);
7766
+ let timer = timeout && setTimeout(() => {
7831
7767
  timer = null;
7832
- signals.forEach(signal => {
7833
- signal &&
7834
- (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
7835
- });
7836
- signals = null;
7837
- }
7838
- };
7768
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
7769
+ }, timeout);
7770
+
7771
+ const unsubscribe = () => {
7772
+ if (signals) {
7773
+ timer && clearTimeout(timer);
7774
+ timer = null;
7775
+ signals.forEach(signal => {
7776
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
7777
+ });
7778
+ signals = null;
7779
+ }
7780
+ };
7839
7781
 
7840
- signals.forEach((signal) => signal && signal.addEventListener && signal.addEventListener('abort', onabort));
7782
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
7841
7783
 
7842
- const {signal} = controller;
7784
+ const {signal} = controller;
7843
7785
 
7844
- signal.unsubscribe = unsubscribe;
7786
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
7845
7787
 
7846
- return [signal, () => {
7847
- timer && clearTimeout(timer);
7848
- timer = null;
7849
- }];
7788
+ return signal;
7789
+ }
7850
7790
  };
7851
7791
 
7852
7792
  var composeSignals$1 = composeSignals;
@@ -7869,14 +7809,34 @@ const streamChunk = function* (chunk, chunkSize) {
7869
7809
  }
7870
7810
  };
7871
7811
 
7872
- const readBytes = async function* (iterable, chunkSize, encode) {
7873
- for await (const chunk of iterable) {
7874
- yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
7812
+ const readBytes = async function* (iterable, chunkSize) {
7813
+ for await (const chunk of readStream(iterable)) {
7814
+ yield* streamChunk(chunk, chunkSize);
7875
7815
  }
7876
7816
  };
7877
7817
 
7878
- const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
7879
- const iterator = readBytes(stream, chunkSize, encode);
7818
+ const readStream = async function* (stream) {
7819
+ if (stream[Symbol.asyncIterator]) {
7820
+ yield* stream;
7821
+ return;
7822
+ }
7823
+
7824
+ const reader = stream.getReader();
7825
+ try {
7826
+ for (;;) {
7827
+ const {done, value} = await reader.read();
7828
+ if (done) {
7829
+ break;
7830
+ }
7831
+ yield value;
7832
+ }
7833
+ } finally {
7834
+ await reader.cancel();
7835
+ }
7836
+ };
7837
+
7838
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
7839
+ const iterator = readBytes(stream, chunkSize);
7880
7840
 
7881
7841
  let bytes = 0;
7882
7842
  let done;
@@ -7979,7 +7939,11 @@ const getBodyLength = async (body) => {
7979
7939
  }
7980
7940
 
7981
7941
  if(utils$1.isSpecCompliantForm(body)) {
7982
- return (await new Request(body).arrayBuffer()).byteLength;
7942
+ const _request = new Request(platform.origin, {
7943
+ method: 'POST',
7944
+ body,
7945
+ });
7946
+ return (await _request.arrayBuffer()).byteLength;
7983
7947
  }
7984
7948
 
7985
7949
  if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
@@ -8019,18 +7983,13 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8019
7983
 
8020
7984
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
8021
7985
 
8022
- let [composedSignal, stopTimeout] = (signal || cancelToken || timeout) ?
8023
- composeSignals$1([signal, cancelToken], timeout) : [];
7986
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
8024
7987
 
8025
- let finished, request;
7988
+ let request;
8026
7989
 
8027
- const onFinish = () => {
8028
- !finished && setTimeout(() => {
8029
- composedSignal && composedSignal.unsubscribe();
8030
- });
8031
-
8032
- finished = true;
8033
- };
7990
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
7991
+ composedSignal.unsubscribe();
7992
+ });
8034
7993
 
8035
7994
  let requestContentLength;
8036
7995
 
@@ -8057,7 +8016,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8057
8016
  progressEventReducer(asyncDecorator(onUploadProgress))
8058
8017
  );
8059
8018
 
8060
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
8019
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
8061
8020
  }
8062
8021
  }
8063
8022
 
@@ -8065,6 +8024,9 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8065
8024
  withCredentials = withCredentials ? 'include' : 'omit';
8066
8025
  }
8067
8026
 
8027
+ // Cloudflare Workers throws when credentials are defined
8028
+ // see https://github.com/cloudflare/workerd/issues/902
8029
+ const isCredentialsSupported = "credentials" in Request.prototype;
8068
8030
  request = new Request(url, {
8069
8031
  ...fetchOptions,
8070
8032
  signal: composedSignal,
@@ -8072,14 +8034,14 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8072
8034
  headers: headers.normalize().toJSON(),
8073
8035
  body: data,
8074
8036
  duplex: "half",
8075
- credentials: withCredentials
8037
+ credentials: isCredentialsSupported ? withCredentials : undefined
8076
8038
  });
8077
8039
 
8078
8040
  let response = await fetch(request);
8079
8041
 
8080
8042
  const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
8081
8043
 
8082
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
8044
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
8083
8045
  const options = {};
8084
8046
 
8085
8047
  ['status', 'statusText', 'headers'].forEach(prop => {
@@ -8096,8 +8058,8 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8096
8058
  response = new Response(
8097
8059
  trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
8098
8060
  flush && flush();
8099
- isStreamResponse && onFinish();
8100
- }, encodeText),
8061
+ unsubscribe && unsubscribe();
8062
+ }),
8101
8063
  options
8102
8064
  );
8103
8065
  }
@@ -8106,9 +8068,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8106
8068
 
8107
8069
  let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
8108
8070
 
8109
- !isStreamResponse && onFinish();
8110
-
8111
- stopTimeout && stopTimeout();
8071
+ !isStreamResponse && unsubscribe && unsubscribe();
8112
8072
 
8113
8073
  return await new Promise((resolve, reject) => {
8114
8074
  settle(resolve, reject, {
@@ -8121,7 +8081,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
8121
8081
  });
8122
8082
  })
8123
8083
  } catch (err) {
8124
- onFinish();
8084
+ unsubscribe && unsubscribe();
8125
8085
 
8126
8086
  if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
8127
8087
  throw Object.assign(
@@ -8283,7 +8243,7 @@ function dispatchRequest(config) {
8283
8243
  });
8284
8244
  }
8285
8245
 
8286
- const VERSION = "1.7.4";
8246
+ const VERSION = "1.8.2";
8287
8247
 
8288
8248
  const validators$1 = {};
8289
8249
 
@@ -8334,6 +8294,14 @@ validators$1.transitional = function transitional(validator, version, message) {
8334
8294
  };
8335
8295
  };
8336
8296
 
8297
+ validators$1.spelling = function spelling(correctSpelling) {
8298
+ return (value, opt) => {
8299
+ // eslint-disable-next-line no-console
8300
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
8301
+ return true;
8302
+ }
8303
+ };
8304
+
8337
8305
  /**
8338
8306
  * Assert object's properties type
8339
8307
  *
@@ -8403,9 +8371,9 @@ class Axios {
8403
8371
  return await this._request(configOrUrl, config);
8404
8372
  } catch (err) {
8405
8373
  if (err instanceof Error) {
8406
- let dummy;
8374
+ let dummy = {};
8407
8375
 
8408
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
8376
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
8409
8377
 
8410
8378
  // slice off the Error: ... line
8411
8379
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
@@ -8460,6 +8428,18 @@ class Axios {
8460
8428
  }
8461
8429
  }
8462
8430
 
8431
+ // Set config.allowAbsoluteUrls
8432
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
8433
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
8434
+ } else {
8435
+ config.allowAbsoluteUrls = true;
8436
+ }
8437
+
8438
+ validator.assertOptions(config, {
8439
+ baseUrl: validators.spelling('baseURL'),
8440
+ withXsrfToken: validators.spelling('withXSRFToken')
8441
+ }, true);
8442
+
8463
8443
  // Set config.method
8464
8444
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
8465
8445
 
@@ -8550,7 +8530,7 @@ class Axios {
8550
8530
 
8551
8531
  getUri(config) {
8552
8532
  config = mergeConfig(this.defaults, config);
8553
- const fullPath = buildFullPath(config.baseURL, config.url);
8533
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
8554
8534
  return buildURL(fullPath, config.params, config.paramsSerializer);
8555
8535
  }
8556
8536
  }
@@ -8690,6 +8670,20 @@ class CancelToken {
8690
8670
  }
8691
8671
  }
8692
8672
 
8673
+ toAbortSignal() {
8674
+ const controller = new AbortController();
8675
+
8676
+ const abort = (err) => {
8677
+ controller.abort(err);
8678
+ };
8679
+
8680
+ this.subscribe(abort);
8681
+
8682
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
8683
+
8684
+ return controller.signal;
8685
+ }
8686
+
8693
8687
  /**
8694
8688
  * Returns an object that contains a new `CancelToken` and a function that, when called,
8695
8689
  * cancels the `CancelToken`.
@@ -32211,7 +32205,7 @@ let C4DMegaMenuTopNavMenu = _decorate$r([carbonElement(`${c4dPrefix$r}-megamenu-
32211
32205
  var _this$parentElement;
32212
32206
  // Import needed subcomponents on first expansion
32213
32207
  if (!((_this$parentElement = this.parentElement) !== null && _this$parentElement !== void 0 && _this$parentElement.importedMegamenu)) {
32214
- await Promise.all([import('./megamenu-left-navigation-d61da700.js'), import('./megamenu-category-link-94a3a869.js'), import('./megamenu-category-link-group-58ddce41.js'), import('./megamenu-category-group-5e6c9054.js'), import('./megamenu-category-group-copy-85fc4ede.js'), import('./megamenu-category-heading-7de1ccc9.js'), Promise.resolve().then(function () { return megamenuLinkWithIcon; }), import('./megamenu-overlay-3455b503.js'), import('./megamenu-tab-bb86ecbf.js'), Promise.resolve().then(function () { return megamenuTabs; })]);
32208
+ await Promise.all([import('./megamenu-left-navigation-5a26ce55.js'), import('./megamenu-category-link-128e49f1.js'), import('./megamenu-category-link-group-6becb24d.js'), import('./megamenu-category-group-8d5b8a00.js'), import('./megamenu-category-group-copy-40334ef1.js'), import('./megamenu-category-heading-eb10286a.js'), Promise.resolve().then(function () { return megamenuLinkWithIcon; }), import('./megamenu-overlay-291e4fd4.js'), import('./megamenu-tab-0d8bdef8.js'), Promise.resolve().then(function () { return megamenuTabs; })]);
32215
32209
  this.parentElement.importedMegamenu = true;
32216
32210
  }
32217
32211
 
@@ -34900,6 +34894,15 @@ let C4DMastheadMenuButton = _decorate$m([carbonElement(`${c4dPrefix$m}-masthead-
34900
34894
  buttonNode.focus();
34901
34895
  }
34902
34896
  }
34897
+ }, {
34898
+ kind: "method",
34899
+ key: "firstUpdated",
34900
+ value: function firstUpdated() {
34901
+ const boundHideButton = this.hideButtonIfNoNavItemsFound.bind(this);
34902
+ window.addEventListener(`load`, () => {
34903
+ boundHideButton();
34904
+ });
34905
+ }
34903
34906
  }, {
34904
34907
  kind: "method",
34905
34908
  key: "updated",
@@ -34919,6 +34922,21 @@ let C4DMastheadMenuButton = _decorate$m([carbonElement(`${c4dPrefix$m}-masthead-
34919
34922
  if (changedProperties.has('hideMenuButton')) {
34920
34923
  this._hasSearchActive = this.hideMenuButton;
34921
34924
  }
34925
+ this.hideButtonIfNoNavItemsFound();
34926
+ }
34927
+ }, {
34928
+ kind: "method",
34929
+ key: "hideButtonIfNoNavItemsFound",
34930
+ value: function hideButtonIfNoNavItemsFound() {
34931
+ var _this$closest;
34932
+ const NavMenuItems = (_this$closest = this.closest(`${c4dPrefix$m}-masthead-container`)) === null || _this$closest === void 0 ? void 0 : _this$closest.querySelectorAll(`${c4dPrefix$m}-left-nav-menu`);
34933
+ if (!(NavMenuItems !== null && NavMenuItems !== void 0 && NavMenuItems.length)) {
34934
+ this.hideMenuButton = true;
34935
+ this.style.display = 'none';
34936
+ } else if (this.style.display == 'none') {
34937
+ this.hideMenuButton = false;
34938
+ this.style.display = '';
34939
+ }
34922
34940
  }
34923
34941
  }, {
34924
34942
  kind: "field",
@@ -37698,7 +37716,7 @@ let C4DLeftNav = _decorate$b([carbonElement(`${c4dPrefix$b}-left-nav`)], functio
37698
37716
  value() {
37699
37717
  return async event => {
37700
37718
  if (!this._importedSideNav) {
37701
- await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-73c960db.js'), import('./left-nav-menu-section-91e5a492.js'), import('./left-nav-menu-item-83f4767e.js'), import('./left-nav-menu-category-heading-be0319c6.js'), import('./left-nav-overlay-8d2ad9f9.js')]);
37719
+ await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-6d7ef1ea.js'), import('./left-nav-menu-section-29f09097.js'), import('./left-nav-menu-item-038f4f32.js'), import('./left-nav-menu-category-heading-e7b9a1d5.js'), import('./left-nav-overlay-eaec1924.js')]);
37702
37720
  this._importedSideNav = true;
37703
37721
  }
37704
37722
  this.expanded = event.detail.active;