algolia-experiences 1.5.14 → 1.6.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.
@@ -12439,12 +12439,18 @@
12439
12439
  }, []);
12440
12440
  }
12441
12441
  var index = function index(widgetParams) {
12442
- if (widgetParams === undefined || widgetParams.indexName === undefined) {
12442
+ if (widgetParams === undefined || widgetParams.indexName === undefined && !widgetParams.EXPERIMENTAL_isolated) {
12443
12443
  throw new Error(withUsage('The `indexName` option is required.'));
12444
12444
  }
12445
- var indexName = widgetParams.indexName,
12445
+
12446
+ // When isolated=true, we use an empty string as the default indexName.
12447
+ // This is intentional: isolated indices do not require a real index name.
12448
+ var _widgetParams$indexNa = widgetParams.indexName,
12449
+ indexName = _widgetParams$indexNa === void 0 ? '' : _widgetParams$indexNa,
12446
12450
  _widgetParams$indexId = widgetParams.indexId,
12447
- indexId = _widgetParams$indexId === void 0 ? indexName : _widgetParams$indexId;
12451
+ indexId = _widgetParams$indexId === void 0 ? indexName : _widgetParams$indexId,
12452
+ _widgetParams$EXPERIM = widgetParams.EXPERIMENTAL_isolated,
12453
+ isolated = _widgetParams$EXPERIM === void 0 ? false : _widgetParams$EXPERIM;
12448
12454
  var localWidgets = [];
12449
12455
  var localUiState = {};
12450
12456
  var localInstantSearchInstance = null;
@@ -12457,6 +12463,7 @@
12457
12463
  return {
12458
12464
  $$type: 'ais.index',
12459
12465
  $$widgetType: 'ais.index',
12466
+ _isolated: isolated,
12460
12467
  getIndexName: function getIndexName() {
12461
12468
  return indexName;
12462
12469
  },
@@ -12508,7 +12515,7 @@
12508
12515
  return resolveScopedResultsFromWidgets(widgetSiblings);
12509
12516
  },
12510
12517
  getParent: function getParent() {
12511
- return localParent;
12518
+ return isolated ? null : localParent;
12512
12519
  },
12513
12520
  createURL: function createURL(nextState) {
12514
12521
  if (typeof nextState === 'function') {
@@ -12527,12 +12534,15 @@
12527
12534
  if (!Array.isArray(widgets)) {
12528
12535
  throw new Error(withUsage('The `addWidgets` method expects an array of widgets.'));
12529
12536
  }
12530
- if (widgets.some(function (widget) {
12537
+ var flatWidgets = widgets.reduce(function (acc, w) {
12538
+ return acc.concat(Array.isArray(w) ? w : [w]);
12539
+ }, []);
12540
+ if (flatWidgets.some(function (widget) {
12531
12541
  return typeof widget.init !== 'function' && typeof widget.render !== 'function';
12532
12542
  })) {
12533
12543
  throw new Error(withUsage('The widget definition expects a `render` and/or an `init` method.'));
12534
12544
  }
12535
- widgets.forEach(function (widget) {
12545
+ flatWidgets.forEach(function (widget) {
12536
12546
  if (isIndexWidget(widget)) {
12537
12547
  return;
12538
12548
  }
@@ -12547,8 +12557,8 @@
12547
12557
  }
12548
12558
  addWidgetId(widget);
12549
12559
  });
12550
- localWidgets = localWidgets.concat(widgets);
12551
- if (localInstantSearchInstance && Boolean(widgets.length)) {
12560
+ localWidgets = localWidgets.concat(flatWidgets);
12561
+ if (localInstantSearchInstance && Boolean(flatWidgets.length)) {
12552
12562
  privateHelperSetState(helper, {
12553
12563
  state: getLocalWidgetsSearchParameters(localWidgets, {
12554
12564
  uiState: localUiState,
@@ -12564,7 +12574,7 @@
12564
12574
  // We compute the render state before calling `init` in a separate loop
12565
12575
  // to construct the whole render state object that is then passed to
12566
12576
  // `init`.
12567
- widgets.forEach(function (widget) {
12577
+ flatWidgets.forEach(function (widget) {
12568
12578
  if (widget.getRenderState) {
12569
12579
  var renderState = widget.getRenderState(localInstantSearchInstance.renderState[_this.getIndexId()] || {}, createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));
12570
12580
  storeRenderState({
@@ -12574,12 +12584,17 @@
12574
12584
  });
12575
12585
  }
12576
12586
  });
12577
- widgets.forEach(function (widget) {
12587
+ flatWidgets.forEach(function (widget) {
12578
12588
  if (widget.init) {
12579
12589
  widget.init(createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));
12580
12590
  }
12581
12591
  });
12582
- localInstantSearchInstance.scheduleSearch();
12592
+ if (isolated) {
12593
+ var _helper2;
12594
+ (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
12595
+ } else {
12596
+ localInstantSearchInstance.scheduleSearch();
12597
+ }
12583
12598
  }
12584
12599
  return this;
12585
12600
  },
@@ -12588,13 +12603,16 @@
12588
12603
  if (!Array.isArray(widgets)) {
12589
12604
  throw new Error(withUsage('The `removeWidgets` method expects an array of widgets.'));
12590
12605
  }
12591
- if (widgets.some(function (widget) {
12606
+ var flatWidgets = widgets.reduce(function (acc, w) {
12607
+ return acc.concat(Array.isArray(w) ? w : [w]);
12608
+ }, []);
12609
+ if (flatWidgets.some(function (widget) {
12592
12610
  return typeof widget.dispose !== 'function';
12593
12611
  })) {
12594
12612
  throw new Error(withUsage('The widget definition expects a `dispose` method.'));
12595
12613
  }
12596
12614
  localWidgets = localWidgets.filter(function (widget) {
12597
- return widgets.indexOf(widget) === -1;
12615
+ return flatWidgets.indexOf(widget) === -1;
12598
12616
  });
12599
12617
  localWidgets.forEach(function (widget) {
12600
12618
  if (isIndexWidget(widget)) {
@@ -12610,8 +12628,8 @@
12610
12628
  hasSearchWidget = true;
12611
12629
  }
12612
12630
  });
12613
- if (localInstantSearchInstance && Boolean(widgets.length)) {
12614
- var _widgets$reduce = widgets.reduce(function (states, widget) {
12631
+ if (localInstantSearchInstance && Boolean(flatWidgets.length)) {
12632
+ var _flatWidgets$reduce = flatWidgets.reduce(function (states, widget) {
12615
12633
  // the `dispose` method exists at this point we already assert it
12616
12634
  var next = widget.dispose({
12617
12635
  helper: helper,
@@ -12629,8 +12647,8 @@
12629
12647
  cleanedSearchState: helper.state,
12630
12648
  cleanedRecommendState: helper.recommendState
12631
12649
  }),
12632
- cleanedSearchState = _widgets$reduce.cleanedSearchState,
12633
- cleanedRecommendState = _widgets$reduce.cleanedRecommendState;
12650
+ cleanedSearchState = _flatWidgets$reduce.cleanedSearchState,
12651
+ cleanedRecommendState = _flatWidgets$reduce.cleanedRecommendState;
12634
12652
  var newState = localInstantSearchInstance.future.preserveSharedStateOnUnmount ? getLocalWidgetsSearchParameters(localWidgets, {
12635
12653
  uiState: localUiState,
12636
12654
  initialSearchParameters: new algoliasearchHelper_1.SearchParameters({
@@ -12650,7 +12668,12 @@
12650
12668
  helper.setState(newState);
12651
12669
  helper.recommendState = cleanedRecommendState;
12652
12670
  if (localWidgets.length) {
12653
- localInstantSearchInstance.scheduleSearch();
12671
+ if (isolated) {
12672
+ var _helper3;
12673
+ (_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.search();
12674
+ } else {
12675
+ localInstantSearchInstance.scheduleSearch();
12676
+ }
12654
12677
  }
12655
12678
  }
12656
12679
  return this;
@@ -12688,13 +12711,20 @@
12688
12711
  // This Helper is only used for state management we do not care about the
12689
12712
  // `searchClient`. Only the "main" Helper created at the `InstantSearch`
12690
12713
  // level is aware of the client.
12691
- helper = algoliasearchHelper_1({}, parameters.index, parameters);
12714
+ helper = algoliasearchHelper_1(mainHelper.getClient(), parameters.index, parameters);
12692
12715
  helper.recommendState = recommendParameters;
12693
12716
 
12694
12717
  // We forward the call to `search` to the "main" instance of the Helper
12695
12718
  // which is responsible for managing the queries (it's the only one that is
12696
12719
  // aware of the `searchClient`).
12697
12720
  helper.search = function () {
12721
+ if (isolated) {
12722
+ instantSearchInstance.status = 'loading';
12723
+ _this3.render({
12724
+ instantSearchInstance: instantSearchInstance
12725
+ });
12726
+ return instantSearchInstance.compositionID ? helper.searchWithComposition() : helper.searchOnlyWithDerivedHelpers();
12727
+ }
12698
12728
  if (instantSearchInstance.onStateChange) {
12699
12729
  instantSearchInstance.onStateChange({
12700
12730
  uiState: instantSearchInstance.mainIndex.getWidgetUiState({}),
@@ -12718,7 +12748,9 @@
12718
12748
  var state = helper.state.setQueryParameters(userState);
12719
12749
  return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);
12720
12750
  };
12721
- derivedHelper = mainHelper.derive(function () {
12751
+ var isolatedHelper = indexName ? helper : algoliasearchHelper_1({}, '__empty_index__', {});
12752
+ var derivingHelper = isolated ? isolatedHelper : nearestIsolatedHelper(parent, mainHelper);
12753
+ derivedHelper = derivingHelper.derive(function () {
12722
12754
  return mergeSearchParameters.apply(void 0, [mainHelper.state].concat(_toConsumableArray$2(resolveSearchParameters(_this3))));
12723
12755
  }, function () {
12724
12756
  return _this3.getHelper().recommendState;
@@ -12850,7 +12882,11 @@
12850
12882
 
12851
12883
  // We only render index widgets if there are no results.
12852
12884
  // This makes sure `render` is never called with `results` being `null`.
12853
- var widgetsToRender = this.getResults() || (_derivedHelper2 = derivedHelper) !== null && _derivedHelper2 !== void 0 && _derivedHelper2.lastRecommendResults ? localWidgets : localWidgets.filter(isIndexWidget);
12885
+ // If it's an isolated index without an index name, we render all widgets,
12886
+ // as there are no results to display for the isolated index itself.
12887
+ var widgetsToRender = this.getResults() || (_derivedHelper2 = derivedHelper) !== null && _derivedHelper2 !== void 0 && _derivedHelper2.lastRecommendResults || isolated && !indexName ? localWidgets : localWidgets.filter(function (widget) {
12888
+ return widget.shouldRender;
12889
+ });
12854
12890
  widgetsToRender = widgetsToRender.filter(function (widget) {
12855
12891
  if (!widget.shouldRender) {
12856
12892
  return true;
@@ -12884,7 +12920,7 @@
12884
12920
  },
12885
12921
  dispose: function dispose() {
12886
12922
  var _this5 = this,
12887
- _helper2,
12923
+ _helper4,
12888
12924
  _derivedHelper3;
12889
12925
  localWidgets.forEach(function (widget) {
12890
12926
  if (widget.dispose && helper) {
@@ -12904,13 +12940,15 @@
12904
12940
  });
12905
12941
  localInstantSearchInstance = null;
12906
12942
  localParent = null;
12907
- (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.removeAllListeners();
12943
+ (_helper4 = helper) === null || _helper4 === void 0 ? void 0 : _helper4.removeAllListeners();
12908
12944
  helper = null;
12909
12945
  (_derivedHelper3 = derivedHelper) === null || _derivedHelper3 === void 0 ? void 0 : _derivedHelper3.detach();
12910
12946
  derivedHelper = null;
12911
12947
  },
12912
12948
  getWidgetUiState: function getWidgetUiState(uiState) {
12913
- return localWidgets.filter(isIndexWidget).reduce(function (previousUiState, innerIndex) {
12949
+ return localWidgets.filter(isIndexWidget).filter(function (w) {
12950
+ return !w._isolated;
12951
+ }).reduce(function (previousUiState, innerIndex) {
12914
12952
  return innerIndex.getWidgetUiState(previousUiState);
12915
12953
  }, _objectSpread$c(_objectSpread$c({}, uiState), {}, _defineProperty$f({}, indexId, _objectSpread$c(_objectSpread$c({}, uiState[indexId]), localUiState))));
12916
12954
  },
@@ -12924,6 +12962,9 @@
12924
12962
  initialSearchParameters: searchParameters
12925
12963
  });
12926
12964
  },
12965
+ shouldRender: function shouldRender() {
12966
+ return true;
12967
+ },
12927
12968
  refreshUiState: function refreshUiState() {
12928
12969
  localUiState = getLocalWidgetsUiState(localWidgets, {
12929
12970
  searchParameters: this.getHelper().state,
@@ -12946,6 +12987,19 @@
12946
12987
  instantSearchInstance.renderState = _objectSpread$c(_objectSpread$c({}, instantSearchInstance.renderState), {}, _defineProperty$f({}, parentIndexName, _objectSpread$c(_objectSpread$c({}, instantSearchInstance.renderState[parentIndexName]), renderState)));
12947
12988
  }
12948
12989
 
12990
+ /**
12991
+ * Walk up the parent chain to find the closest isolated index, or fall back to mainHelper
12992
+ */
12993
+ function nearestIsolatedHelper(current, mainHelper) {
12994
+ while (current) {
12995
+ if (current._isolated) {
12996
+ return current.getHelper();
12997
+ }
12998
+ current = current.getParent();
12999
+ }
13000
+ return mainHelper;
13001
+ }
13002
+
12949
13003
  function formatNumber(value, numberLocale) {
12950
13004
  return value.toLocaleString(numberLocale);
12951
13005
  }
@@ -13069,7 +13123,7 @@
13069
13123
  };
13070
13124
  }
13071
13125
 
13072
- var version$1 = '4.79.2';
13126
+ var version$1 = '4.81.0';
13073
13127
 
13074
13128
  function _typeof$j(o) {
13075
13129
  "@babel/helpers - typeof";
@@ -13503,12 +13557,9 @@
13503
13557
  if (!Array.isArray(widgets)) {
13504
13558
  throw new Error(withUsage$1('The `addWidgets` method expects an array of widgets. Please use `addWidget`.'));
13505
13559
  }
13506
- if (widgets.some(function (widget) {
13507
- return typeof widget.init !== 'function' && typeof widget.render !== 'function';
13560
+ if (this.compositionID && widgets.some(function (w) {
13561
+ return !Array.isArray(w) && isIndexWidget(w) && !w._isolated;
13508
13562
  })) {
13509
- throw new Error(withUsage$1('The widget definition expects a `render` and/or an `init` method.'));
13510
- }
13511
- if (this.compositionID && widgets.some(isIndexWidget)) {
13512
13563
  throw new Error(withUsage$1('The `index` widget cannot be used with a composition-based InstantSearch implementation.'));
13513
13564
  }
13514
13565
  this.mainIndex.addWidgets(widgets);
@@ -13540,11 +13591,6 @@
13540
13591
  if (!Array.isArray(widgets)) {
13541
13592
  throw new Error(withUsage$1('The `removeWidgets` method expects an array of widgets. Please use `removeWidget`.'));
13542
13593
  }
13543
- if (widgets.some(function (widget) {
13544
- return typeof widget.dispose !== 'function';
13545
- })) {
13546
- throw new Error(withUsage$1('The widget definition expects a `dispose` method.'));
13547
- }
13548
13594
  this.mainIndex.removeWidgets(widgets);
13549
13595
  return this;
13550
13596
  }
@@ -13934,6 +13980,50 @@
13934
13980
 
13935
13981
  var _extends$1 = unwrapExports(_extends_1);
13936
13982
 
13983
+ var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
13984
+ function _objectWithoutPropertiesLoose(r, e) {
13985
+ if (null == r) return {};
13986
+ var t = {};
13987
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
13988
+ if (-1 !== e.indexOf(n)) continue;
13989
+ t[n] = r[n];
13990
+ }
13991
+ return t;
13992
+ }
13993
+ module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
13994
+ });
13995
+
13996
+ unwrapExports(objectWithoutPropertiesLoose);
13997
+
13998
+ var objectWithoutProperties = createCommonjsModule(function (module) {
13999
+ function _objectWithoutProperties(e, t) {
14000
+ if (null == e) return {};
14001
+ var o,
14002
+ r,
14003
+ i = objectWithoutPropertiesLoose(e, t);
14004
+ if (Object.getOwnPropertySymbols) {
14005
+ var n = Object.getOwnPropertySymbols(e);
14006
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
14007
+ }
14008
+ return i;
14009
+ }
14010
+ module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
14011
+ });
14012
+
14013
+ var _objectWithoutProperties$4 = unwrapExports(objectWithoutProperties);
14014
+
14015
+ function cx() {
14016
+ for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
14017
+ classNames[_key] = arguments[_key];
14018
+ }
14019
+ return classNames.reduce(function (acc, className) {
14020
+ if (Array.isArray(className)) {
14021
+ return acc.concat(className);
14022
+ }
14023
+ return acc.concat([className]);
14024
+ }, []).filter(Boolean).join(' ');
14025
+ }
14026
+
13937
14027
  var _typeof_1 = createCommonjsModule(function (module) {
13938
14028
  function _typeof(o) {
13939
14029
  "@babel/helpers - typeof";
@@ -13992,50 +14082,6 @@
13992
14082
 
13993
14083
  var _defineProperty$i = unwrapExports(defineProperty);
13994
14084
 
13995
- var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
13996
- function _objectWithoutPropertiesLoose(r, e) {
13997
- if (null == r) return {};
13998
- var t = {};
13999
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
14000
- if (-1 !== e.indexOf(n)) continue;
14001
- t[n] = r[n];
14002
- }
14003
- return t;
14004
- }
14005
- module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
14006
- });
14007
-
14008
- unwrapExports(objectWithoutPropertiesLoose);
14009
-
14010
- var objectWithoutProperties = createCommonjsModule(function (module) {
14011
- function _objectWithoutProperties(e, t) {
14012
- if (null == e) return {};
14013
- var o,
14014
- r,
14015
- i = objectWithoutPropertiesLoose(e, t);
14016
- if (Object.getOwnPropertySymbols) {
14017
- var n = Object.getOwnPropertySymbols(e);
14018
- for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
14019
- }
14020
- return i;
14021
- }
14022
- module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
14023
- });
14024
-
14025
- var _objectWithoutProperties$4 = unwrapExports(objectWithoutProperties);
14026
-
14027
- function cx() {
14028
- for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
14029
- classNames[_key] = arguments[_key];
14030
- }
14031
- return classNames.reduce(function (acc, className) {
14032
- if (Array.isArray(className)) {
14033
- return acc.concat(className);
14034
- }
14035
- return acc.concat([className]);
14036
- }, []).filter(Boolean).join(' ');
14037
- }
14038
-
14039
14085
  function createDefaultEmptyComponent(_ref) {
14040
14086
  var createElement = _ref.createElement,
14041
14087
  Fragment = _ref.Fragment;
@@ -14101,7 +14147,7 @@
14101
14147
  };
14102
14148
  }
14103
14149
 
14104
- var _excluded$3 = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "items", "translations", "sendEvent"];
14150
+ var _excluded$3 = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "canScrollLeft", "canScrollRight", "setCanScrollLeft", "setCanScrollRight", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "headerComponent", "showNavigation", "items", "translations", "sendEvent"];
14105
14151
  function ownKeys$g(e, r) {
14106
14152
  var t = Object.keys(e);
14107
14153
  if (Object.getOwnPropertySymbols) {
@@ -14163,6 +14209,10 @@
14163
14209
  nextButtonRef = userProps.nextButtonRef,
14164
14210
  previousButtonRef = userProps.previousButtonRef,
14165
14211
  carouselIdRef = userProps.carouselIdRef,
14212
+ canScrollLeft = userProps.canScrollLeft,
14213
+ canScrollRight = userProps.canScrollRight,
14214
+ setCanScrollLeft = userProps.setCanScrollLeft,
14215
+ setCanScrollRight = userProps.setCanScrollRight,
14166
14216
  _userProps$classNames = userProps.classNames,
14167
14217
  classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
14168
14218
  _userProps$itemCompon = userProps.itemComponent,
@@ -14174,6 +14224,9 @@
14174
14224
  PreviousIconComponent = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
14175
14225
  _userProps$nextIconCo = userProps.nextIconComponent,
14176
14226
  NextIconComponent = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
14227
+ HeaderComponent = userProps.headerComponent,
14228
+ _userProps$showNaviga = userProps.showNavigation,
14229
+ showNavigation = _userProps$showNaviga === void 0 ? true : _userProps$showNaviga,
14177
14230
  items = userProps.items,
14178
14231
  userTranslations = userProps.translations,
14179
14232
  sendEvent = userProps.sendEvent,
@@ -14204,18 +14257,31 @@
14204
14257
  }
14205
14258
  }
14206
14259
  function updateNavigationButtonsProps() {
14207
- if (!listRef.current || !previousButtonRef.current || !nextButtonRef.current) {
14260
+ if (!listRef.current) {
14208
14261
  return;
14209
14262
  }
14210
- previousButtonRef.current.hidden = listRef.current.scrollLeft <= 0;
14211
- nextButtonRef.current.hidden = listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth;
14263
+ var isLeftHidden = listRef.current.scrollLeft <= 0;
14264
+ var isRightHidden = listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth;
14265
+ setCanScrollLeft(!isLeftHidden);
14266
+ setCanScrollRight(!isRightHidden);
14267
+ if (previousButtonRef.current) {
14268
+ previousButtonRef.current.hidden = isLeftHidden;
14269
+ }
14270
+ if (nextButtonRef.current) {
14271
+ nextButtonRef.current.hidden = isRightHidden;
14272
+ }
14212
14273
  }
14213
14274
  if (items.length === 0) {
14214
14275
  return null;
14215
14276
  }
14216
14277
  return createElement("div", _extends$1({}, props, {
14217
14278
  className: cx(cssClasses.root)
14218
- }), createElement("button", {
14279
+ }), HeaderComponent && createElement(HeaderComponent, {
14280
+ canScrollLeft: canScrollLeft,
14281
+ canScrollRight: canScrollRight,
14282
+ scrollLeft: scrollLeft,
14283
+ scrollRight: scrollRight
14284
+ }), showNavigation && createElement("button", {
14219
14285
  ref: previousButtonRef,
14220
14286
  title: translations.previousButtonTitle,
14221
14287
  "aria-label": translations.previousButtonLabel,
@@ -14262,7 +14328,7 @@
14262
14328
  item: item,
14263
14329
  sendEvent: sendEvent
14264
14330
  }));
14265
- })), createElement("button", {
14331
+ })), showNavigation && createElement("button", {
14266
14332
  ref: nextButtonRef,
14267
14333
  title: translations.nextButtonTitle,
14268
14334
  "aria-label": translations.nextButtonLabel,
@@ -14820,16 +14886,77 @@
14820
14886
  };
14821
14887
  return _extends$2.apply(this, arguments);
14822
14888
  }
14889
+ function _slicedToArray$5(arr, i) {
14890
+ return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$5();
14891
+ }
14892
+ function _nonIterableRest$5() {
14893
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14894
+ }
14895
+ function _unsupportedIterableToArray$7(o, minLen) {
14896
+ if (!o) return;
14897
+ if (typeof o === "string") return _arrayLikeToArray$7(o, minLen);
14898
+ var n = Object.prototype.toString.call(o).slice(8, -1);
14899
+ if (n === "Object" && o.constructor) n = o.constructor.name;
14900
+ if (n === "Map" || n === "Set") return Array.from(o);
14901
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$7(o, minLen);
14902
+ }
14903
+ function _arrayLikeToArray$7(arr, len) {
14904
+ if (len == null || len > arr.length) len = arr.length;
14905
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14906
+ return arr2;
14907
+ }
14908
+ function _iterableToArrayLimit$5(r, l) {
14909
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
14910
+ if (null != t) {
14911
+ var e,
14912
+ n,
14913
+ i,
14914
+ u,
14915
+ a = [],
14916
+ f = !0,
14917
+ o = !1;
14918
+ try {
14919
+ if (i = (t = t.call(r)).next, 0 === l) {
14920
+ if (Object(t) !== t) return;
14921
+ f = !1;
14922
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
14923
+ } catch (r) {
14924
+ o = !0, n = r;
14925
+ } finally {
14926
+ try {
14927
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
14928
+ } finally {
14929
+ if (o) throw n;
14930
+ }
14931
+ }
14932
+ return a;
14933
+ }
14934
+ }
14935
+ function _arrayWithHoles$5(arr) {
14936
+ if (Array.isArray(arr)) return arr;
14937
+ }
14823
14938
  var Carousel = createCarouselComponent({
14824
14939
  createElement: h,
14825
14940
  Fragment: p
14826
14941
  });
14827
14942
  function CarouselWithRefs(props) {
14943
+ var _useState = y$1(false),
14944
+ _useState2 = _slicedToArray$5(_useState, 2),
14945
+ canScrollLeft = _useState2[0],
14946
+ setCanScrollLeft = _useState2[1];
14947
+ var _useState3 = y$1(true),
14948
+ _useState4 = _slicedToArray$5(_useState3, 2),
14949
+ canScrollRight = _useState4[0],
14950
+ setCanScrollRight = _useState4[1];
14828
14951
  var carouselRefs = {
14829
14952
  listRef: A$1(null),
14830
14953
  nextButtonRef: A$1(null),
14831
14954
  previousButtonRef: A$1(null),
14832
- carouselIdRef: A$1(generateCarouselId())
14955
+ carouselIdRef: A$1(generateCarouselId()),
14956
+ canScrollLeft: canScrollLeft,
14957
+ canScrollRight: canScrollRight,
14958
+ setCanScrollLeft: setCanScrollLeft,
14959
+ setCanScrollRight: setCanScrollRight
14833
14960
  };
14834
14961
  return h(Carousel, _extends$2({}, carouselRefs, props));
14835
14962
  }
@@ -14837,7 +14964,9 @@
14837
14964
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
14838
14965
  cssClasses = _ref.cssClasses,
14839
14966
  _ref$templates = _ref.templates,
14840
- templates = _ref$templates === void 0 ? {} : _ref$templates;
14967
+ templates = _ref$templates === void 0 ? {} : _ref$templates,
14968
+ _ref$showNavigation = _ref.showNavigation,
14969
+ showNavigation = _ref$showNavigation === void 0 ? true : _ref$showNavigation;
14841
14970
  return function CarouselTemplate(_ref2) {
14842
14971
  var items = _ref2.items,
14843
14972
  widgetTemplates = _ref2.templates,
@@ -14846,11 +14975,17 @@
14846
14975
  _ref2$sendEvent = _ref2.sendEvent,
14847
14976
  sendEvent = _ref2$sendEvent === void 0 ? function () {} : _ref2$sendEvent;
14848
14977
  var previous = templates.previous,
14849
- next = templates.next;
14978
+ next = templates.next,
14979
+ header = templates.header;
14850
14980
  return h(CarouselWithRefs, {
14851
14981
  items: items,
14852
14982
  sendEvent: sendEvent,
14853
14983
  itemComponent: widgetTemplates.item,
14984
+ headerComponent: header ? function (props) {
14985
+ return header(_objectSpread$k({
14986
+ html: m$1
14987
+ }, props));
14988
+ } : undefined,
14854
14989
  previousIconComponent: previous ? function () {
14855
14990
  return previous({
14856
14991
  html: m$1
@@ -14864,7 +14999,8 @@
14864
14999
  classNames: _objectSpread$k(_objectSpread$k({}, cssClasses), {
14865
15000
  list: cx(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.list, widgetCssClasses === null || widgetCssClasses === void 0 ? void 0 : widgetCssClasses.list),
14866
15001
  item: cx(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.item, widgetCssClasses === null || widgetCssClasses === void 0 ? void 0 : widgetCssClasses.item)
14867
- })
15002
+ }),
15003
+ showNavigation: showNavigation
14868
15004
  });
14869
15005
  };
14870
15006
  }
@@ -14928,26 +15064,26 @@
14928
15064
  return ("string" === r ? String : Number)(t);
14929
15065
  }
14930
15066
  function _toConsumableArray$3(arr) {
14931
- return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$7(arr) || _nonIterableSpread$3();
15067
+ return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$8(arr) || _nonIterableSpread$3();
14932
15068
  }
14933
15069
  function _nonIterableSpread$3() {
14934
15070
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14935
15071
  }
14936
- function _unsupportedIterableToArray$7(o, minLen) {
15072
+ function _unsupportedIterableToArray$8(o, minLen) {
14937
15073
  if (!o) return;
14938
- if (typeof o === "string") return _arrayLikeToArray$7(o, minLen);
15074
+ if (typeof o === "string") return _arrayLikeToArray$8(o, minLen);
14939
15075
  var n = Object.prototype.toString.call(o).slice(8, -1);
14940
15076
  if (n === "Object" && o.constructor) n = o.constructor.name;
14941
15077
  if (n === "Map" || n === "Set") return Array.from(o);
14942
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$7(o, minLen);
15078
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$8(o, minLen);
14943
15079
  }
14944
15080
  function _iterableToArray$3(iter) {
14945
15081
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14946
15082
  }
14947
15083
  function _arrayWithoutHoles$3(arr) {
14948
- if (Array.isArray(arr)) return _arrayLikeToArray$7(arr);
15084
+ if (Array.isArray(arr)) return _arrayLikeToArray$8(arr);
14949
15085
  }
14950
- function _arrayLikeToArray$7(arr, len) {
15086
+ function _arrayLikeToArray$8(arr, len) {
14951
15087
  if (len == null || len > arr.length) len = arr.length;
14952
15088
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14953
15089
  return arr2;
@@ -16492,26 +16628,26 @@
16492
16628
  }, _typeof$p(o);
16493
16629
  }
16494
16630
  function _toConsumableArray$4(arr) {
16495
- return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$8(arr) || _nonIterableSpread$4();
16631
+ return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$9(arr) || _nonIterableSpread$4();
16496
16632
  }
16497
16633
  function _nonIterableSpread$4() {
16498
16634
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16499
16635
  }
16500
- function _unsupportedIterableToArray$8(o, minLen) {
16636
+ function _unsupportedIterableToArray$9(o, minLen) {
16501
16637
  if (!o) return;
16502
- if (typeof o === "string") return _arrayLikeToArray$8(o, minLen);
16638
+ if (typeof o === "string") return _arrayLikeToArray$9(o, minLen);
16503
16639
  var n = Object.prototype.toString.call(o).slice(8, -1);
16504
16640
  if (n === "Object" && o.constructor) n = o.constructor.name;
16505
16641
  if (n === "Map" || n === "Set") return Array.from(o);
16506
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$8(o, minLen);
16642
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$9(o, minLen);
16507
16643
  }
16508
16644
  function _iterableToArray$4(iter) {
16509
16645
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16510
16646
  }
16511
16647
  function _arrayWithoutHoles$4(arr) {
16512
- if (Array.isArray(arr)) return _arrayLikeToArray$8(arr);
16648
+ if (Array.isArray(arr)) return _arrayLikeToArray$9(arr);
16513
16649
  }
16514
- function _arrayLikeToArray$8(arr, len) {
16650
+ function _arrayLikeToArray$9(arr, len) {
16515
16651
  if (len == null || len > arr.length) len = arr.length;
16516
16652
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
16517
16653
  return arr2;
@@ -16672,7 +16808,7 @@
16672
16808
  });
16673
16809
  // if there is one TextNode first and one TextNode last, the
16674
16810
  // last one's nodeValue will be assigned to the first.
16675
- if (this.nodes[0].nodeValue) {
16811
+ if (this.nodes[0] && this.nodes[0].nodeValue) {
16676
16812
  this.nodes[0].nodeValue = '';
16677
16813
  }
16678
16814
  }
@@ -17021,26 +17157,26 @@
17021
17157
  }
17022
17158
  return ("string" === r ? String : Number)(t);
17023
17159
  }
17024
- function _slicedToArray$5(arr, i) {
17025
- return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$9(arr, i) || _nonIterableRest$5();
17160
+ function _slicedToArray$6(arr, i) {
17161
+ return _arrayWithHoles$6(arr) || _iterableToArrayLimit$6(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$6();
17026
17162
  }
17027
- function _nonIterableRest$5() {
17163
+ function _nonIterableRest$6() {
17028
17164
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17029
17165
  }
17030
- function _unsupportedIterableToArray$9(o, minLen) {
17166
+ function _unsupportedIterableToArray$a(o, minLen) {
17031
17167
  if (!o) return;
17032
- if (typeof o === "string") return _arrayLikeToArray$9(o, minLen);
17168
+ if (typeof o === "string") return _arrayLikeToArray$a(o, minLen);
17033
17169
  var n = Object.prototype.toString.call(o).slice(8, -1);
17034
17170
  if (n === "Object" && o.constructor) n = o.constructor.name;
17035
17171
  if (n === "Map" || n === "Set") return Array.from(o);
17036
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$9(o, minLen);
17172
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$a(o, minLen);
17037
17173
  }
17038
- function _arrayLikeToArray$9(arr, len) {
17174
+ function _arrayLikeToArray$a(arr, len) {
17039
17175
  if (len == null || len > arr.length) len = arr.length;
17040
17176
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
17041
17177
  return arr2;
17042
17178
  }
17043
- function _iterableToArrayLimit$5(r, l) {
17179
+ function _iterableToArrayLimit$6(r, l) {
17044
17180
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
17045
17181
  if (null != t) {
17046
17182
  var e,
@@ -17067,7 +17203,7 @@
17067
17203
  return a;
17068
17204
  }
17069
17205
  }
17070
- function _arrayWithHoles$5(arr) {
17206
+ function _arrayWithHoles$6(arr) {
17071
17207
  if (Array.isArray(arr)) return arr;
17072
17208
  }
17073
17209
  var withUsage$3 = createDocumentationMessageGenerator({
@@ -17092,7 +17228,7 @@
17092
17228
  if (!attributes || !Array.isArray(attributes) || attributes.length === 0) {
17093
17229
  throw new Error(withUsage$3('The `attributes` option expects an array of strings.'));
17094
17230
  }
17095
- var _attributes = _slicedToArray$5(attributes, 1),
17231
+ var _attributes = _slicedToArray$6(attributes, 1),
17096
17232
  hierarchicalFacetName = _attributes[0];
17097
17233
  function getRefinedState(state, facetValue) {
17098
17234
  if (!facetValue) {
@@ -17437,26 +17573,26 @@
17437
17573
  }, _typeof$t(o);
17438
17574
  }
17439
17575
  function _toConsumableArray$5(arr) {
17440
- return _arrayWithoutHoles$5(arr) || _iterableToArray$5(arr) || _unsupportedIterableToArray$a(arr) || _nonIterableSpread$5();
17576
+ return _arrayWithoutHoles$5(arr) || _iterableToArray$5(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$5();
17441
17577
  }
17442
17578
  function _nonIterableSpread$5() {
17443
17579
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17444
17580
  }
17445
- function _unsupportedIterableToArray$a(o, minLen) {
17581
+ function _unsupportedIterableToArray$b(o, minLen) {
17446
17582
  if (!o) return;
17447
- if (typeof o === "string") return _arrayLikeToArray$a(o, minLen);
17583
+ if (typeof o === "string") return _arrayLikeToArray$b(o, minLen);
17448
17584
  var n = Object.prototype.toString.call(o).slice(8, -1);
17449
17585
  if (n === "Object" && o.constructor) n = o.constructor.name;
17450
17586
  if (n === "Map" || n === "Set") return Array.from(o);
17451
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$a(o, minLen);
17587
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$b(o, minLen);
17452
17588
  }
17453
17589
  function _iterableToArray$5(iter) {
17454
17590
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17455
17591
  }
17456
17592
  function _arrayWithoutHoles$5(arr) {
17457
- if (Array.isArray(arr)) return _arrayLikeToArray$a(arr);
17593
+ if (Array.isArray(arr)) return _arrayLikeToArray$b(arr);
17458
17594
  }
17459
- function _arrayLikeToArray$a(arr, len) {
17595
+ function _arrayLikeToArray$b(arr, len) {
17460
17596
  if (len == null || len > arr.length) len = arr.length;
17461
17597
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
17462
17598
  return arr2;
@@ -17910,26 +18046,26 @@
17910
18046
  }, _typeof$w(o);
17911
18047
  }
17912
18048
  function _toConsumableArray$6(arr) {
17913
- return _arrayWithoutHoles$6(arr) || _iterableToArray$6(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$6();
18049
+ return _arrayWithoutHoles$6(arr) || _iterableToArray$6(arr) || _unsupportedIterableToArray$c(arr) || _nonIterableSpread$6();
17914
18050
  }
17915
18051
  function _nonIterableSpread$6() {
17916
18052
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17917
18053
  }
17918
- function _unsupportedIterableToArray$b(o, minLen) {
18054
+ function _unsupportedIterableToArray$c(o, minLen) {
17919
18055
  if (!o) return;
17920
- if (typeof o === "string") return _arrayLikeToArray$b(o, minLen);
18056
+ if (typeof o === "string") return _arrayLikeToArray$c(o, minLen);
17921
18057
  var n = Object.prototype.toString.call(o).slice(8, -1);
17922
18058
  if (n === "Object" && o.constructor) n = o.constructor.name;
17923
18059
  if (n === "Map" || n === "Set") return Array.from(o);
17924
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$b(o, minLen);
18060
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$c(o, minLen);
17925
18061
  }
17926
18062
  function _iterableToArray$6(iter) {
17927
18063
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17928
18064
  }
17929
18065
  function _arrayWithoutHoles$6(arr) {
17930
- if (Array.isArray(arr)) return _arrayLikeToArray$b(arr);
18066
+ if (Array.isArray(arr)) return _arrayLikeToArray$c(arr);
17931
18067
  }
17932
- function _arrayLikeToArray$b(arr, len) {
18068
+ function _arrayLikeToArray$c(arr, len) {
17933
18069
  if (len == null || len > arr.length) len = arr.length;
17934
18070
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
17935
18071
  return arr2;
@@ -19167,26 +19303,26 @@
19167
19303
  }
19168
19304
  return target;
19169
19305
  }
19170
- function _slicedToArray$6(arr, i) {
19171
- return _arrayWithHoles$6(arr) || _iterableToArrayLimit$6(arr, i) || _unsupportedIterableToArray$c(arr, i) || _nonIterableRest$6();
19306
+ function _slicedToArray$7(arr, i) {
19307
+ return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7();
19172
19308
  }
19173
- function _nonIterableRest$6() {
19309
+ function _nonIterableRest$7() {
19174
19310
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19175
19311
  }
19176
- function _unsupportedIterableToArray$c(o, minLen) {
19312
+ function _unsupportedIterableToArray$d(o, minLen) {
19177
19313
  if (!o) return;
19178
- if (typeof o === "string") return _arrayLikeToArray$c(o, minLen);
19314
+ if (typeof o === "string") return _arrayLikeToArray$d(o, minLen);
19179
19315
  var n = Object.prototype.toString.call(o).slice(8, -1);
19180
19316
  if (n === "Object" && o.constructor) n = o.constructor.name;
19181
19317
  if (n === "Map" || n === "Set") return Array.from(o);
19182
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$c(o, minLen);
19318
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$d(o, minLen);
19183
19319
  }
19184
- function _arrayLikeToArray$c(arr, len) {
19320
+ function _arrayLikeToArray$d(arr, len) {
19185
19321
  if (len == null || len > arr.length) len = arr.length;
19186
19322
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
19187
19323
  return arr2;
19188
19324
  }
19189
- function _iterableToArrayLimit$6(r, l) {
19325
+ function _iterableToArrayLimit$7(r, l) {
19190
19326
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
19191
19327
  if (null != t) {
19192
19328
  var e,
@@ -19213,7 +19349,7 @@
19213
19349
  return a;
19214
19350
  }
19215
19351
  }
19216
- function _arrayWithHoles$6(arr) {
19352
+ function _arrayWithHoles$7(arr) {
19217
19353
  if (Array.isArray(arr)) return arr;
19218
19354
  }
19219
19355
  var withUsage$9 = createDocumentationMessageGenerator({
@@ -19267,7 +19403,7 @@
19267
19403
  // we need to provide a hierarchicalFacet name for the search state
19268
19404
  // so that we can always map $hierarchicalFacetName => real attributes
19269
19405
  // we use the first attribute name
19270
- var _attributes = _slicedToArray$6(attributes, 1),
19406
+ var _attributes = _slicedToArray$7(attributes, 1),
19271
19407
  hierarchicalFacetName = _attributes[0];
19272
19408
  var sendEvent;
19273
19409
 
@@ -20352,26 +20488,26 @@
20352
20488
  }, _typeof$F(o);
20353
20489
  }
20354
20490
  function _toConsumableArray$7(arr) {
20355
- return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$d(arr) || _nonIterableSpread$7();
20491
+ return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$7();
20356
20492
  }
20357
20493
  function _nonIterableSpread$7() {
20358
20494
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
20359
20495
  }
20360
- function _unsupportedIterableToArray$d(o, minLen) {
20496
+ function _unsupportedIterableToArray$e(o, minLen) {
20361
20497
  if (!o) return;
20362
- if (typeof o === "string") return _arrayLikeToArray$d(o, minLen);
20498
+ if (typeof o === "string") return _arrayLikeToArray$e(o, minLen);
20363
20499
  var n = Object.prototype.toString.call(o).slice(8, -1);
20364
20500
  if (n === "Object" && o.constructor) n = o.constructor.name;
20365
20501
  if (n === "Map" || n === "Set") return Array.from(o);
20366
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$d(o, minLen);
20502
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$e(o, minLen);
20367
20503
  }
20368
20504
  function _iterableToArray$7(iter) {
20369
20505
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
20370
20506
  }
20371
20507
  function _arrayWithoutHoles$7(arr) {
20372
- if (Array.isArray(arr)) return _arrayLikeToArray$d(arr);
20508
+ if (Array.isArray(arr)) return _arrayLikeToArray$e(arr);
20373
20509
  }
20374
- function _arrayLikeToArray$d(arr, len) {
20510
+ function _arrayLikeToArray$e(arr, len) {
20375
20511
  if (len == null || len > arr.length) len = arr.length;
20376
20512
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
20377
20513
  return arr2;
@@ -20932,26 +21068,26 @@
20932
21068
  return ("string" === r ? String : Number)(t);
20933
21069
  }
20934
21070
  function _toConsumableArray$8(arr) {
20935
- return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8();
21071
+ return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8();
20936
21072
  }
20937
21073
  function _nonIterableSpread$8() {
20938
21074
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
20939
21075
  }
20940
- function _unsupportedIterableToArray$e(o, minLen) {
21076
+ function _unsupportedIterableToArray$f(o, minLen) {
20941
21077
  if (!o) return;
20942
- if (typeof o === "string") return _arrayLikeToArray$e(o, minLen);
21078
+ if (typeof o === "string") return _arrayLikeToArray$f(o, minLen);
20943
21079
  var n = Object.prototype.toString.call(o).slice(8, -1);
20944
21080
  if (n === "Object" && o.constructor) n = o.constructor.name;
20945
21081
  if (n === "Map" || n === "Set") return Array.from(o);
20946
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$e(o, minLen);
21082
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen);
20947
21083
  }
20948
21084
  function _iterableToArray$8(iter) {
20949
21085
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
20950
21086
  }
20951
21087
  function _arrayWithoutHoles$8(arr) {
20952
- if (Array.isArray(arr)) return _arrayLikeToArray$e(arr);
21088
+ if (Array.isArray(arr)) return _arrayLikeToArray$f(arr);
20953
21089
  }
20954
- function _arrayLikeToArray$e(arr, len) {
21090
+ function _arrayLikeToArray$f(arr, len) {
20955
21091
  if (len == null || len > arr.length) len = arr.length;
20956
21092
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
20957
21093
  return arr2;
@@ -21467,26 +21603,26 @@
21467
21603
  }
21468
21604
  return target;
21469
21605
  }
21470
- function _slicedToArray$7(arr, i) {
21471
- return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$7();
21606
+ function _slicedToArray$8(arr, i) {
21607
+ return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$8();
21472
21608
  }
21473
- function _nonIterableRest$7() {
21609
+ function _nonIterableRest$8() {
21474
21610
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21475
21611
  }
21476
- function _unsupportedIterableToArray$f(o, minLen) {
21612
+ function _unsupportedIterableToArray$g(o, minLen) {
21477
21613
  if (!o) return;
21478
- if (typeof o === "string") return _arrayLikeToArray$f(o, minLen);
21614
+ if (typeof o === "string") return _arrayLikeToArray$g(o, minLen);
21479
21615
  var n = Object.prototype.toString.call(o).slice(8, -1);
21480
21616
  if (n === "Object" && o.constructor) n = o.constructor.name;
21481
21617
  if (n === "Map" || n === "Set") return Array.from(o);
21482
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen);
21618
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$g(o, minLen);
21483
21619
  }
21484
- function _arrayLikeToArray$f(arr, len) {
21620
+ function _arrayLikeToArray$g(arr, len) {
21485
21621
  if (len == null || len > arr.length) len = arr.length;
21486
21622
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
21487
21623
  return arr2;
21488
21624
  }
21489
- function _iterableToArrayLimit$7(r, l) {
21625
+ function _iterableToArrayLimit$8(r, l) {
21490
21626
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
21491
21627
  if (null != t) {
21492
21628
  var e,
@@ -21513,7 +21649,7 @@
21513
21649
  return a;
21514
21650
  }
21515
21651
  }
21516
- function _arrayWithHoles$7(arr) {
21652
+ function _arrayWithHoles$8(arr) {
21517
21653
  if (Array.isArray(arr)) return arr;
21518
21654
  }
21519
21655
  function ownKeys$J(e, r) {
@@ -21676,7 +21812,7 @@
21676
21812
  if (!_refine) {
21677
21813
  _refine = function _refine(facetValue) {
21678
21814
  var _helper$getHierarchic = helper.getHierarchicalFacetBreadcrumb(attribute),
21679
- _helper$getHierarchic2 = _slicedToArray$7(_helper$getHierarchic, 1),
21815
+ _helper$getHierarchic2 = _slicedToArray$8(_helper$getHierarchic, 1),
21680
21816
  refinedItem = _helper$getHierarchic2[0];
21681
21817
  sendEvent('click:internal', facetValue ? facetValue : refinedItem);
21682
21818
  helper.toggleFacetRefinement(attribute, facetValue ? facetValue : refinedItem).search();
@@ -21720,7 +21856,7 @@
21720
21856
  getWidgetUiState: function getWidgetUiState(uiState, _ref4) {
21721
21857
  var searchParameters = _ref4.searchParameters;
21722
21858
  var _searchParameters$get = searchParameters.getHierarchicalFacetBreadcrumb(attribute),
21723
- _searchParameters$get2 = _slicedToArray$7(_searchParameters$get, 1),
21859
+ _searchParameters$get2 = _slicedToArray$8(_searchParameters$get, 1),
21724
21860
  value = _searchParameters$get2[0];
21725
21861
  return removeEmptyRefinementsFromUiState$2(_objectSpread$I(_objectSpread$I({}, uiState), {}, {
21726
21862
  menu: _objectSpread$I(_objectSpread$I({}, uiState.menu), {}, _defineProperty$J({}, attribute, value))
@@ -21968,7 +22104,7 @@
21968
22104
  function _createForOfIteratorHelper(o, allowArrayLike) {
21969
22105
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
21970
22106
  if (!it) {
21971
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$g(o)) || allowArrayLike && o && typeof o.length === "number") {
22107
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray$h(o)) || allowArrayLike && o && typeof o.length === "number") {
21972
22108
  if (it) o = it;
21973
22109
  var i = 0;
21974
22110
  var F = function F() {};
@@ -22016,26 +22152,26 @@
22016
22152
  }
22017
22153
  };
22018
22154
  }
22019
- function _slicedToArray$8(arr, i) {
22020
- return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$8();
22155
+ function _slicedToArray$9(arr, i) {
22156
+ return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$9();
22021
22157
  }
22022
- function _nonIterableRest$8() {
22158
+ function _nonIterableRest$9() {
22023
22159
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22024
22160
  }
22025
- function _unsupportedIterableToArray$g(o, minLen) {
22161
+ function _unsupportedIterableToArray$h(o, minLen) {
22026
22162
  if (!o) return;
22027
- if (typeof o === "string") return _arrayLikeToArray$g(o, minLen);
22163
+ if (typeof o === "string") return _arrayLikeToArray$h(o, minLen);
22028
22164
  var n = Object.prototype.toString.call(o).slice(8, -1);
22029
22165
  if (n === "Object" && o.constructor) n = o.constructor.name;
22030
22166
  if (n === "Map" || n === "Set") return Array.from(o);
22031
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$g(o, minLen);
22167
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen);
22032
22168
  }
22033
- function _arrayLikeToArray$g(arr, len) {
22169
+ function _arrayLikeToArray$h(arr, len) {
22034
22170
  if (len == null || len > arr.length) len = arr.length;
22035
22171
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
22036
22172
  return arr2;
22037
22173
  }
22038
- function _iterableToArrayLimit$8(r, l) {
22174
+ function _iterableToArrayLimit$9(r, l) {
22039
22175
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
22040
22176
  if (null != t) {
22041
22177
  var e,
@@ -22062,7 +22198,7 @@
22062
22198
  return a;
22063
22199
  }
22064
22200
  }
22065
- function _arrayWithHoles$8(arr) {
22201
+ function _arrayWithHoles$9(arr) {
22066
22202
  if (Array.isArray(arr)) return arr;
22067
22203
  }
22068
22204
  function ownKeys$L(e, r) {
@@ -22215,7 +22351,7 @@
22215
22351
  return withoutRefinements.addNumericRefinement(attribute, '=', Number(value));
22216
22352
  }
22217
22353
  var _value$split$map = value.split(':').map(parseFloat),
22218
- _value$split$map2 = _slicedToArray$8(_value$split$map, 2),
22354
+ _value$split$map2 = _slicedToArray$9(_value$split$map, 2),
22219
22355
  min = _value$split$map2[0],
22220
22356
  max = _value$split$map2[1];
22221
22357
  var withMinRefinement = isFiniteNumber(min) ? withoutRefinements.addNumericRefinement(attribute, '>=', min) : withoutRefinements;
@@ -23156,26 +23292,26 @@
23156
23292
  });
23157
23293
  };
23158
23294
 
23159
- function _slicedToArray$9(arr, i) {
23160
- return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$9();
23295
+ function _slicedToArray$a(arr, i) {
23296
+ return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$a();
23161
23297
  }
23162
- function _nonIterableRest$9() {
23298
+ function _nonIterableRest$a() {
23163
23299
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
23164
23300
  }
23165
- function _unsupportedIterableToArray$h(o, minLen) {
23301
+ function _unsupportedIterableToArray$i(o, minLen) {
23166
23302
  if (!o) return;
23167
- if (typeof o === "string") return _arrayLikeToArray$h(o, minLen);
23303
+ if (typeof o === "string") return _arrayLikeToArray$i(o, minLen);
23168
23304
  var n = Object.prototype.toString.call(o).slice(8, -1);
23169
23305
  if (n === "Object" && o.constructor) n = o.constructor.name;
23170
23306
  if (n === "Map" || n === "Set") return Array.from(o);
23171
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen);
23307
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$i(o, minLen);
23172
23308
  }
23173
- function _arrayLikeToArray$h(arr, len) {
23309
+ function _arrayLikeToArray$i(arr, len) {
23174
23310
  if (len == null || len > arr.length) len = arr.length;
23175
23311
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
23176
23312
  return arr2;
23177
23313
  }
23178
- function _iterableToArrayLimit$9(r, l) {
23314
+ function _iterableToArrayLimit$a(r, l) {
23179
23315
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
23180
23316
  if (null != t) {
23181
23317
  var e,
@@ -23202,16 +23338,16 @@
23202
23338
  return a;
23203
23339
  }
23204
23340
  }
23205
- function _arrayWithHoles$9(arr) {
23341
+ function _arrayWithHoles$a(arr) {
23206
23342
  if (Array.isArray(arr)) return arr;
23207
23343
  }
23208
23344
  function Panel(props) {
23209
23345
  var _useState = y$1(props.isCollapsed),
23210
- _useState2 = _slicedToArray$9(_useState, 2),
23346
+ _useState2 = _slicedToArray$a(_useState, 2),
23211
23347
  isCollapsed = _useState2[0],
23212
23348
  setIsCollapsed = _useState2[1];
23213
23349
  var _useState3 = y$1(false),
23214
- _useState4 = _slicedToArray$9(_useState3, 2),
23350
+ _useState4 = _slicedToArray$a(_useState3, 2),
23215
23351
  isControlled = _useState4[0],
23216
23352
  setIsControlled = _useState4[1];
23217
23353
  var bodyRef = A$1(null);
@@ -24169,26 +24305,26 @@
24169
24305
  }
24170
24306
  return ("string" === r ? String : Number)(t);
24171
24307
  }
24172
- function _slicedToArray$a(arr, i) {
24173
- return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$a();
24308
+ function _slicedToArray$b(arr, i) {
24309
+ return _arrayWithHoles$b(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$b();
24174
24310
  }
24175
- function _nonIterableRest$a() {
24311
+ function _nonIterableRest$b() {
24176
24312
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
24177
24313
  }
24178
- function _unsupportedIterableToArray$i(o, minLen) {
24314
+ function _unsupportedIterableToArray$j(o, minLen) {
24179
24315
  if (!o) return;
24180
- if (typeof o === "string") return _arrayLikeToArray$i(o, minLen);
24316
+ if (typeof o === "string") return _arrayLikeToArray$j(o, minLen);
24181
24317
  var n = Object.prototype.toString.call(o).slice(8, -1);
24182
24318
  if (n === "Object" && o.constructor) n = o.constructor.name;
24183
24319
  if (n === "Map" || n === "Set") return Array.from(o);
24184
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$i(o, minLen);
24320
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$j(o, minLen);
24185
24321
  }
24186
- function _arrayLikeToArray$i(arr, len) {
24322
+ function _arrayLikeToArray$j(arr, len) {
24187
24323
  if (len == null || len > arr.length) len = arr.length;
24188
24324
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
24189
24325
  return arr2;
24190
24326
  }
24191
- function _iterableToArrayLimit$a(r, l) {
24327
+ function _iterableToArrayLimit$b(r, l) {
24192
24328
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
24193
24329
  if (null != t) {
24194
24330
  var e,
@@ -24215,7 +24351,7 @@
24215
24351
  return a;
24216
24352
  }
24217
24353
  }
24218
- function _arrayWithHoles$a(arr) {
24354
+ function _arrayWithHoles$b(arr) {
24219
24355
  if (Array.isArray(arr)) return arr;
24220
24356
  }
24221
24357
  var withUsage$q = createDocumentationMessageGenerator({
@@ -24282,10 +24418,10 @@
24282
24418
  var currentRangeMin = currentRange.min,
24283
24419
  currentRangeMax = currentRange.max;
24284
24420
  var _ref3 = resolvedState.getNumericRefinement(attribute, '>=') || [],
24285
- _ref4 = _slicedToArray$a(_ref3, 1),
24421
+ _ref4 = _slicedToArray$b(_ref3, 1),
24286
24422
  min = _ref4[0];
24287
24423
  var _ref5 = resolvedState.getNumericRefinement(attribute, '<=') || [],
24288
- _ref6 = _slicedToArray$a(_ref5, 1),
24424
+ _ref6 = _slicedToArray$b(_ref5, 1),
24289
24425
  max = _ref6[0];
24290
24426
  var isResetMin = nextMin === undefined || nextMin === '';
24291
24427
  var isResetMax = nextMax === undefined || nextMax === '';
@@ -24365,10 +24501,10 @@
24365
24501
  }
24366
24502
  function _getCurrentRefinement(helper) {
24367
24503
  var _ref7 = helper.getNumericRefinement(attribute, '>=') || [],
24368
- _ref8 = _slicedToArray$a(_ref7, 1),
24504
+ _ref8 = _slicedToArray$b(_ref7, 1),
24369
24505
  minValue = _ref8[0];
24370
24506
  var _ref9 = helper.getNumericRefinement(attribute, '<=') || [],
24371
- _ref10 = _slicedToArray$a(_ref9, 1),
24507
+ _ref10 = _slicedToArray$b(_ref9, 1),
24372
24508
  maxValue = _ref10[0];
24373
24509
  var min = isFiniteNumber(minValue) ? minValue : -Infinity;
24374
24510
  var max = isFiniteNumber(maxValue) ? maxValue : Infinity;
@@ -24377,7 +24513,7 @@
24377
24513
  function _refine(helper, currentRange) {
24378
24514
  return function () {
24379
24515
  var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [undefined, undefined],
24380
- _ref12 = _slicedToArray$a(_ref11, 2),
24516
+ _ref12 = _slicedToArray$b(_ref11, 2),
24381
24517
  nextMin = _ref12[0],
24382
24518
  nextMax = _ref12[1];
24383
24519
  var refinedState = getRefinedState(helper, currentRange, nextMin, nextMax);
@@ -24476,7 +24612,7 @@
24476
24612
  return widgetSearchParameters;
24477
24613
  }
24478
24614
  var _value$split$map = value.split(':').map(parseFloat),
24479
- _value$split$map2 = _slicedToArray$a(_value$split$map, 2),
24615
+ _value$split$map2 = _slicedToArray$b(_value$split$map, 2),
24480
24616
  lowerBound = _value$split$map2[0],
24481
24617
  upperBound = _value$split$map2[1];
24482
24618
  if (isFiniteNumber(lowerBound) && (!isFiniteNumber(minBound) || minBound < lowerBound)) {
@@ -24551,26 +24687,26 @@
24551
24687
  }
24552
24688
  return ("string" === r ? String : Number)(t);
24553
24689
  }
24554
- function _slicedToArray$b(arr, i) {
24555
- return _arrayWithHoles$b(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$b();
24690
+ function _slicedToArray$c(arr, i) {
24691
+ return _arrayWithHoles$c(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$c();
24556
24692
  }
24557
- function _nonIterableRest$b() {
24693
+ function _nonIterableRest$c() {
24558
24694
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
24559
24695
  }
24560
- function _unsupportedIterableToArray$j(o, minLen) {
24696
+ function _unsupportedIterableToArray$k(o, minLen) {
24561
24697
  if (!o) return;
24562
- if (typeof o === "string") return _arrayLikeToArray$j(o, minLen);
24698
+ if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
24563
24699
  var n = Object.prototype.toString.call(o).slice(8, -1);
24564
24700
  if (n === "Object" && o.constructor) n = o.constructor.name;
24565
24701
  if (n === "Map" || n === "Set") return Array.from(o);
24566
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$j(o, minLen);
24702
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
24567
24703
  }
24568
- function _arrayLikeToArray$j(arr, len) {
24704
+ function _arrayLikeToArray$k(arr, len) {
24569
24705
  if (len == null || len > arr.length) len = arr.length;
24570
24706
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
24571
24707
  return arr2;
24572
24708
  }
24573
- function _iterableToArrayLimit$b(r, l) {
24709
+ function _iterableToArrayLimit$c(r, l) {
24574
24710
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
24575
24711
  if (null != t) {
24576
24712
  var e,
@@ -24597,7 +24733,7 @@
24597
24733
  return a;
24598
24734
  }
24599
24735
  }
24600
- function _arrayWithHoles$b(arr) {
24736
+ function _arrayWithHoles$c(arr) {
24601
24737
  if (Array.isArray(arr)) return arr;
24602
24738
  }
24603
24739
  var withUsage$r = createDocumentationMessageGenerator({
@@ -24633,7 +24769,7 @@
24633
24769
  }
24634
24770
  var rangeMin = range.min,
24635
24771
  rangeMax = range.max;
24636
- var _start = _slicedToArray$b(start, 2),
24772
+ var _start = _slicedToArray$c(start, 2),
24637
24773
  minValue = _start[0],
24638
24774
  maxValue = _start[1];
24639
24775
  var step = 1 / Math.pow(10, widgetParams.precision || 0);
@@ -25470,26 +25606,26 @@
25470
25606
  });
25471
25607
 
25472
25608
  function _toConsumableArray$9(arr) {
25473
- return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$9();
25609
+ return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$l(arr) || _nonIterableSpread$9();
25474
25610
  }
25475
25611
  function _nonIterableSpread$9() {
25476
25612
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25477
25613
  }
25478
- function _unsupportedIterableToArray$k(o, minLen) {
25614
+ function _unsupportedIterableToArray$l(o, minLen) {
25479
25615
  if (!o) return;
25480
- if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
25616
+ if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
25481
25617
  var n = Object.prototype.toString.call(o).slice(8, -1);
25482
25618
  if (n === "Object" && o.constructor) n = o.constructor.name;
25483
25619
  if (n === "Map" || n === "Set") return Array.from(o);
25484
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
25620
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
25485
25621
  }
25486
25622
  function _iterableToArray$9(iter) {
25487
25623
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25488
25624
  }
25489
25625
  function _arrayWithoutHoles$9(arr) {
25490
- if (Array.isArray(arr)) return _arrayLikeToArray$k(arr);
25626
+ if (Array.isArray(arr)) return _arrayLikeToArray$l(arr);
25491
25627
  }
25492
- function _arrayLikeToArray$k(arr, len) {
25628
+ function _arrayLikeToArray$l(arr, len) {
25493
25629
  if (len == null || len > arr.length) len = arr.length;
25494
25630
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
25495
25631
  return arr2;
@@ -25811,26 +25947,26 @@
25811
25947
  }
25812
25948
  return ("string" === r ? String : Number)(t);
25813
25949
  }
25814
- function _slicedToArray$c(arr, i) {
25815
- return _arrayWithHoles$c(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$c();
25950
+ function _slicedToArray$d(arr, i) {
25951
+ return _arrayWithHoles$d(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$m(arr, i) || _nonIterableRest$d();
25816
25952
  }
25817
- function _nonIterableRest$c() {
25953
+ function _nonIterableRest$d() {
25818
25954
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25819
25955
  }
25820
- function _unsupportedIterableToArray$l(o, minLen) {
25956
+ function _unsupportedIterableToArray$m(o, minLen) {
25821
25957
  if (!o) return;
25822
- if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
25958
+ if (typeof o === "string") return _arrayLikeToArray$m(o, minLen);
25823
25959
  var n = Object.prototype.toString.call(o).slice(8, -1);
25824
25960
  if (n === "Object" && o.constructor) n = o.constructor.name;
25825
25961
  if (n === "Map" || n === "Set") return Array.from(o);
25826
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
25962
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$m(o, minLen);
25827
25963
  }
25828
- function _arrayLikeToArray$l(arr, len) {
25964
+ function _arrayLikeToArray$m(arr, len) {
25829
25965
  if (len == null || len > arr.length) len = arr.length;
25830
25966
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
25831
25967
  return arr2;
25832
25968
  }
25833
- function _iterableToArrayLimit$c(r, l) {
25969
+ function _iterableToArrayLimit$d(r, l) {
25834
25970
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
25835
25971
  if (null != t) {
25836
25972
  var e,
@@ -25857,7 +25993,7 @@
25857
25993
  return a;
25858
25994
  }
25859
25995
  }
25860
- function _arrayWithHoles$c(arr) {
25996
+ function _arrayWithHoles$d(arr) {
25861
25997
  if (Array.isArray(arr)) return arr;
25862
25998
  }
25863
25999
  var withUsage$s = createDocumentationMessageGenerator({
@@ -25880,7 +26016,7 @@
25880
26016
  }
25881
26017
  var minRange = range.min,
25882
26018
  maxRange = range.max;
25883
- var _start = _slicedToArray$c(start, 2),
26019
+ var _start = _slicedToArray$d(start, 2),
25884
26020
  minStart = _start[0],
25885
26021
  maxStart = _start[1];
25886
26022
  var minFinite = minStart === -Infinity ? minRange : minStart;
@@ -25969,7 +26105,7 @@
25969
26105
  }, _typeof$$(o);
25970
26106
  }
25971
26107
  function _toConsumableArray$a(arr) {
25972
- return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$m(arr) || _nonIterableSpread$a();
26108
+ return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$n(arr) || _nonIterableSpread$a();
25973
26109
  }
25974
26110
  function _nonIterableSpread$a() {
25975
26111
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
@@ -25978,7 +26114,7 @@
25978
26114
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25979
26115
  }
25980
26116
  function _arrayWithoutHoles$a(arr) {
25981
- if (Array.isArray(arr)) return _arrayLikeToArray$m(arr);
26117
+ if (Array.isArray(arr)) return _arrayLikeToArray$n(arr);
25982
26118
  }
25983
26119
  function ownKeys$W(e, r) {
25984
26120
  var t = Object.keys(e);
@@ -26029,26 +26165,26 @@
26029
26165
  }
26030
26166
  return ("string" === r ? String : Number)(t);
26031
26167
  }
26032
- function _slicedToArray$d(arr, i) {
26033
- return _arrayWithHoles$d(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$m(arr, i) || _nonIterableRest$d();
26168
+ function _slicedToArray$e(arr, i) {
26169
+ return _arrayWithHoles$e(arr) || _iterableToArrayLimit$e(arr, i) || _unsupportedIterableToArray$n(arr, i) || _nonIterableRest$e();
26034
26170
  }
26035
- function _nonIterableRest$d() {
26171
+ function _nonIterableRest$e() {
26036
26172
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
26037
26173
  }
26038
- function _unsupportedIterableToArray$m(o, minLen) {
26174
+ function _unsupportedIterableToArray$n(o, minLen) {
26039
26175
  if (!o) return;
26040
- if (typeof o === "string") return _arrayLikeToArray$m(o, minLen);
26176
+ if (typeof o === "string") return _arrayLikeToArray$n(o, minLen);
26041
26177
  var n = Object.prototype.toString.call(o).slice(8, -1);
26042
26178
  if (n === "Object" && o.constructor) n = o.constructor.name;
26043
26179
  if (n === "Map" || n === "Set") return Array.from(o);
26044
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$m(o, minLen);
26180
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$n(o, minLen);
26045
26181
  }
26046
- function _arrayLikeToArray$m(arr, len) {
26182
+ function _arrayLikeToArray$n(arr, len) {
26047
26183
  if (len == null || len > arr.length) len = arr.length;
26048
26184
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
26049
26185
  return arr2;
26050
26186
  }
26051
- function _iterableToArrayLimit$d(r, l) {
26187
+ function _iterableToArrayLimit$e(r, l) {
26052
26188
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
26053
26189
  if (null != t) {
26054
26190
  var e,
@@ -26075,7 +26211,7 @@
26075
26211
  return a;
26076
26212
  }
26077
26213
  }
26078
- function _arrayWithHoles$d(arr) {
26214
+ function _arrayWithHoles$e(arr) {
26079
26215
  if (Array.isArray(arr)) return arr;
26080
26216
  }
26081
26217
  var withUsage$t = createDocumentationMessageGenerator({
@@ -26101,7 +26237,7 @@
26101
26237
  _args$ = args[2],
26102
26238
  eventName = _args$ === void 0 ? 'Filter Applied' : _args$;
26103
26239
  var _args$0$split = args[0].split(':'),
26104
- _args$0$split2 = _slicedToArray$d(_args$0$split, 2),
26240
+ _args$0$split2 = _slicedToArray$e(_args$0$split, 2),
26105
26241
  eventType = _args$0$split2[0],
26106
26242
  eventModifier = _args$0$split2[1];
26107
26243
  if (eventType !== 'click') {
@@ -26157,7 +26293,7 @@
26157
26293
  var maxDecimalPlaces = 0;
26158
26294
  facetResults.forEach(function (facetResult) {
26159
26295
  var _facetResult$name$spl = facetResult.name.split('.'),
26160
- _facetResult$name$spl2 = _slicedToArray$d(_facetResult$name$spl, 2),
26296
+ _facetResult$name$spl2 = _slicedToArray$e(_facetResult$name$spl, 2),
26161
26297
  _facetResult$name$spl3 = _facetResult$name$spl2[1],
26162
26298
  decimal = _facetResult$name$spl3 === void 0 ? '' : _facetResult$name$spl3;
26163
26299
  maxDecimalPlaces = Math.max(maxDecimalPlaces, decimal.length);
@@ -28453,26 +28589,26 @@
28453
28589
  }
28454
28590
  return ("string" === r ? String : Number)(t);
28455
28591
  }
28456
- function _slicedToArray$e(arr, i) {
28457
- return _arrayWithHoles$e(arr) || _iterableToArrayLimit$e(arr, i) || _unsupportedIterableToArray$n(arr, i) || _nonIterableRest$e();
28592
+ function _slicedToArray$f(arr, i) {
28593
+ return _arrayWithHoles$f(arr) || _iterableToArrayLimit$f(arr, i) || _unsupportedIterableToArray$o(arr, i) || _nonIterableRest$f();
28458
28594
  }
28459
- function _nonIterableRest$e() {
28595
+ function _nonIterableRest$f() {
28460
28596
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
28461
28597
  }
28462
- function _unsupportedIterableToArray$n(o, minLen) {
28598
+ function _unsupportedIterableToArray$o(o, minLen) {
28463
28599
  if (!o) return;
28464
- if (typeof o === "string") return _arrayLikeToArray$n(o, minLen);
28600
+ if (typeof o === "string") return _arrayLikeToArray$o(o, minLen);
28465
28601
  var n = Object.prototype.toString.call(o).slice(8, -1);
28466
28602
  if (n === "Object" && o.constructor) n = o.constructor.name;
28467
28603
  if (n === "Map" || n === "Set") return Array.from(o);
28468
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$n(o, minLen);
28604
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$o(o, minLen);
28469
28605
  }
28470
- function _arrayLikeToArray$n(arr, len) {
28606
+ function _arrayLikeToArray$o(arr, len) {
28471
28607
  if (len == null || len > arr.length) len = arr.length;
28472
28608
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
28473
28609
  return arr2;
28474
28610
  }
28475
- function _iterableToArrayLimit$e(r, l) {
28611
+ function _iterableToArrayLimit$f(r, l) {
28476
28612
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
28477
28613
  if (null != t) {
28478
28614
  var e,
@@ -28499,7 +28635,7 @@
28499
28635
  return a;
28500
28636
  }
28501
28637
  }
28502
- function _arrayWithHoles$e(arr) {
28638
+ function _arrayWithHoles$f(arr) {
28503
28639
  if (Array.isArray(arr)) return arr;
28504
28640
  }
28505
28641
  var withUsage$D = createDocumentationMessageGenerator({
@@ -28524,7 +28660,7 @@
28524
28660
  _args$ = args[2],
28525
28661
  eventName = _args$ === void 0 ? 'Filter Applied' : _args$;
28526
28662
  var _args$0$split = args[0].split(':'),
28527
- _args$0$split2 = _slicedToArray$e(_args$0$split, 2),
28663
+ _args$0$split2 = _slicedToArray$f(_args$0$split, 2),
28528
28664
  eventType = _args$0$split2[0],
28529
28665
  eventModifier = _args$0$split2[1];
28530
28666
  if (eventType !== 'click' || on === undefined) {