react-instantsearch 7.4.0 → 7.4.1

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.
@@ -7,7 +7,7 @@
7
7
 
8
8
  var React__default = 'default' in React ? React['default'] : React;
9
9
 
10
- var version = '7.4.0';
10
+ var version = '7.4.1';
11
11
 
12
12
  // Copyright Joyent, Inc. and other Node contributors.
13
13
  //
@@ -3280,7 +3280,6 @@
3280
3280
  );
3281
3281
  }
3282
3282
 
3283
- // eslint-disable-next-line valid-jsdoc
3284
3283
  /**
3285
3284
  * Constructor for SearchResults
3286
3285
  * @class
@@ -3288,6 +3287,7 @@
3288
3287
  * {@link AlgoliaSearchHelper}.
3289
3288
  * @param {SearchParameters} state state that led to the response
3290
3289
  * @param {array.<object>} results the results from algolia client
3290
+ * @param {object} options options to control results content
3291
3291
  * @example <caption>SearchResults of the first query in
3292
3292
  * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption>
3293
3293
  {
@@ -3425,8 +3425,14 @@
3425
3425
  });
3426
3426
 
3427
3427
  // Make every key of the result options reachable from the instance
3428
- Object.keys(options || {}).forEach(function (key) {
3429
- self[key] = options[key];
3428
+ var opts = merge_1(
3429
+ {
3430
+ persistHierarchicalRootCount: false,
3431
+ },
3432
+ options
3433
+ );
3434
+ Object.keys(opts).forEach(function (key) {
3435
+ self[key] = opts[key];
3430
3436
  });
3431
3437
 
3432
3438
  /**
@@ -3776,9 +3782,13 @@
3776
3782
  // We want
3777
3783
  // | beers (5)
3778
3784
  // > IPA (5)
3785
+ // @MAJOR: remove this legacy behaviour in next major version
3779
3786
  var defaultData = {};
3780
3787
 
3781
- if (currentRefinement.length > 0) {
3788
+ if (
3789
+ currentRefinement.length > 0 &&
3790
+ !self.persistHierarchicalRootCount
3791
+ ) {
3782
3792
  var root = currentRefinement[0].split(separator)[0];
3783
3793
  defaultData[root] =
3784
3794
  self.hierarchicalFacets[position][attributeIndex].data[root];
@@ -4327,7 +4337,7 @@
4327
4337
 
4328
4338
  var SearchResults_1 = SearchResults;
4329
4339
 
4330
- var version$1 = '3.15.0';
4340
+ var version$1 = '3.16.0';
4331
4341
 
4332
4342
  var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
4333
4343
 
@@ -4441,8 +4451,9 @@
4441
4451
  * @param {SearchParameters | object} options an object defining the initial
4442
4452
  * config of the search. It doesn't have to be a {SearchParameters},
4443
4453
  * just an object containing the properties you need from it.
4454
+ * @param {SearchResultsOptions|object} searchResultsOptions an object defining the options to use when creating the search results.
4444
4455
  */
4445
- function AlgoliaSearchHelper(client, index, options) {
4456
+ function AlgoliaSearchHelper(client, index, options, searchResultsOptions) {
4446
4457
  if (typeof client.addAlgoliaAgent === 'function') {
4447
4458
  client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
4448
4459
  }
@@ -4456,6 +4467,7 @@
4456
4467
  this._lastQueryIdReceived = -1;
4457
4468
  this.derivedHelpers = [];
4458
4469
  this._currentNbQueries = 0;
4470
+ this._searchResultsOptions = searchResultsOptions;
4459
4471
  }
4460
4472
 
4461
4473
  inherits_1(AlgoliaSearchHelper, events);
@@ -5728,6 +5740,9 @@
5728
5740
  queryId,
5729
5741
  content
5730
5742
  ) {
5743
+ // eslint-disable-next-line consistent-this
5744
+ var self = this;
5745
+
5731
5746
  // @TODO remove the number of outdated queries discarded instead of just one
5732
5747
 
5733
5748
  if (queryId < this._lastQueryIdReceived) {
@@ -5756,7 +5771,11 @@
5756
5771
  return;
5757
5772
  }
5758
5773
 
5759
- helper.lastResults = new SearchResults_1(state, specificResults);
5774
+ helper.lastResults = new SearchResults_1(
5775
+ state,
5776
+ specificResults,
5777
+ self._searchResultsOptions
5778
+ );
5760
5779
 
5761
5780
  helper.emit('result', {
5762
5781
  results: helper.lastResults,
@@ -5954,10 +5973,11 @@
5954
5973
  * @param {AlgoliaSearch} client an AlgoliaSearch client
5955
5974
  * @param {string} index the name of the index to query
5956
5975
  * @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it.
5976
+ * @param {SearchResultsOptions|object} searchResultsOptions an object defining the options to use when creating the search results.
5957
5977
  * @return {AlgoliaSearchHelper} The helper instance
5958
5978
  */
5959
- function algoliasearchHelper(client, index, opts) {
5960
- return new algoliasearch_helper(client, index, opts);
5979
+ function algoliasearchHelper(client, index, opts, searchResultsOptions) {
5980
+ return new algoliasearch_helper(client, index, opts, searchResultsOptions);
5961
5981
  }
5962
5982
 
5963
5983
  /**
@@ -12120,7 +12140,7 @@
12120
12140
  };
12121
12141
  }
12122
12142
 
12123
- var version$3 = '4.61.0';
12143
+ var version$3 = '4.62.0';
12124
12144
 
12125
12145
  function _typeof$o(obj) {
12126
12146
  "@babel/helpers - typeof";
@@ -12284,7 +12304,8 @@
12284
12304
  * Global options for an InstantSearch instance.
12285
12305
  */
12286
12306
  var INSTANTSEARCH_FUTURE_DEFAULTS = {
12287
- preserveSharedStateOnUnmount: false
12307
+ preserveSharedStateOnUnmount: false,
12308
+ persistHierarchicalRootCount: false
12288
12309
  };
12289
12310
 
12290
12311
  /**
@@ -12604,7 +12625,9 @@
12604
12625
  // DerivedHelper scoped into the `index` widgets.
12605
12626
  // In Vue InstantSearch' hydrate, a main helper gets set before start, so
12606
12627
  // we need to respect this helper as a way to keep all listeners correct.
12607
- var mainHelper = this.mainHelper || algoliasearchHelper_1(this.client, this.indexName);
12628
+ var mainHelper = this.mainHelper || algoliasearchHelper_1(this.client, this.indexName, undefined, {
12629
+ persistHierarchicalRootCount: this.future.persistHierarchicalRootCount
12630
+ });
12608
12631
  mainHelper.search = function () {
12609
12632
  _this3.status = 'loading';
12610
12633
  _this3.scheduleRender(false);
@@ -13259,34 +13282,6 @@
13259
13282
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
13260
13283
  }, _typeof$r(obj);
13261
13284
  }
13262
- var _excluded$8 = ["hierarchicalMenu"];
13263
- function _objectWithoutProperties$8(source, excluded) {
13264
- if (source == null) return {};
13265
- var target = _objectWithoutPropertiesLoose$9(source, excluded);
13266
- var key, i;
13267
- if (Object.getOwnPropertySymbols) {
13268
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
13269
- for (i = 0; i < sourceSymbolKeys.length; i++) {
13270
- key = sourceSymbolKeys[i];
13271
- if (excluded.indexOf(key) >= 0) continue;
13272
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
13273
- target[key] = source[key];
13274
- }
13275
- }
13276
- return target;
13277
- }
13278
- function _objectWithoutPropertiesLoose$9(source, excluded) {
13279
- if (source == null) return {};
13280
- var target = {};
13281
- var sourceKeys = Object.keys(source);
13282
- var key, i;
13283
- for (i = 0; i < sourceKeys.length; i++) {
13284
- key = sourceKeys[i];
13285
- if (excluded.indexOf(key) >= 0) continue;
13286
- target[key] = source[key];
13287
- }
13288
- return target;
13289
- }
13290
13285
  function ownKeys$l(object, enumerableOnly) {
13291
13286
  var keys = Object.keys(object);
13292
13287
  if (Object.getOwnPropertySymbols) {
@@ -13491,7 +13486,7 @@
13491
13486
  var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
13492
13487
  return removeEmptyRefinementsFromUiState(_objectSpread$l(_objectSpread$l({}, uiState), {}, {
13493
13488
  hierarchicalMenu: _objectSpread$l(_objectSpread$l({}, uiState.hierarchicalMenu), {}, _defineProperty$m({}, hierarchicalFacetName, path))
13494
- }));
13489
+ }), hierarchicalFacetName);
13495
13490
  },
13496
13491
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref4) {
13497
13492
  var uiState = _ref4.uiState;
@@ -13540,18 +13535,17 @@
13540
13535
  };
13541
13536
  });
13542
13537
  }
13543
- function removeEmptyRefinementsFromUiState(indexUiState) {
13544
- var hierarchicalMenu = indexUiState.hierarchicalMenu,
13545
- indexUiStateBase = _objectWithoutProperties$8(indexUiState, _excluded$8);
13546
- if (!hierarchicalMenu) {
13538
+ function removeEmptyRefinementsFromUiState(indexUiState, attribute) {
13539
+ if (!indexUiState.hierarchicalMenu) {
13547
13540
  return indexUiState;
13548
13541
  }
13549
- var connectorUiState = Object.keys(hierarchicalMenu).reduce(function (acc, key) {
13550
- return _objectSpread$l(_objectSpread$l({}, acc), hierarchicalMenu[key].length > 0 ? _defineProperty$m({}, key, hierarchicalMenu[key]) : {});
13551
- }, {});
13552
- return _objectSpread$l(_objectSpread$l({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
13553
- hierarchicalMenu: connectorUiState
13554
- } : {});
13542
+ if (!indexUiState.hierarchicalMenu[attribute] || !indexUiState.hierarchicalMenu[attribute].length) {
13543
+ delete indexUiState.hierarchicalMenu[attribute];
13544
+ }
13545
+ if (Object.keys(indexUiState.hierarchicalMenu).length === 0) {
13546
+ delete indexUiState.hierarchicalMenu;
13547
+ }
13548
+ return indexUiState;
13555
13549
  }
13556
13550
 
13557
13551
  function useBreadcrumb(props, additionalWidgetProperties) {
@@ -14316,8 +14310,7 @@
14316
14310
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
14317
14311
  }, _typeof$v(obj);
14318
14312
  }
14319
- var _excluded$9 = ["name", "escapedValue", "data", "path"],
14320
- _excluded2$1 = ["hierarchicalMenu"];
14313
+ var _excluded$8 = ["name", "escapedValue", "data", "path"];
14321
14314
  function ownKeys$p(object, enumerableOnly) {
14322
14315
  var keys = Object.keys(object);
14323
14316
  if (Object.getOwnPropertySymbols) {
@@ -14367,9 +14360,9 @@
14367
14360
  }
14368
14361
  return (hint === "string" ? String : Number)(input);
14369
14362
  }
14370
- function _objectWithoutProperties$9(source, excluded) {
14363
+ function _objectWithoutProperties$8(source, excluded) {
14371
14364
  if (source == null) return {};
14372
- var target = _objectWithoutPropertiesLoose$a(source, excluded);
14365
+ var target = _objectWithoutPropertiesLoose$9(source, excluded);
14373
14366
  var key, i;
14374
14367
  if (Object.getOwnPropertySymbols) {
14375
14368
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -14382,7 +14375,7 @@
14382
14375
  }
14383
14376
  return target;
14384
14377
  }
14385
- function _objectWithoutPropertiesLoose$a(source, excluded) {
14378
+ function _objectWithoutPropertiesLoose$9(source, excluded) {
14386
14379
  if (source == null) return {};
14387
14380
  var target = {};
14388
14381
  var sourceKeys = Object.keys(source);
@@ -14521,7 +14514,7 @@
14521
14514
  value = _ref2.escapedValue,
14522
14515
  data = _ref2.data,
14523
14516
  path = _ref2.path,
14524
- subValue = _objectWithoutProperties$9(_ref2, _excluded$9);
14517
+ subValue = _objectWithoutProperties$8(_ref2, _excluded$8);
14525
14518
  var item = _objectSpread$p(_objectSpread$p({}, subValue), {}, {
14526
14519
  value: value,
14527
14520
  label: label,
@@ -14630,7 +14623,7 @@
14630
14623
  var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
14631
14624
  return removeEmptyRefinementsFromUiState$1(_objectSpread$p(_objectSpread$p({}, uiState), {}, {
14632
14625
  hierarchicalMenu: _objectSpread$p(_objectSpread$p({}, uiState.hierarchicalMenu), {}, _defineProperty$q({}, hierarchicalFacetName, path))
14633
- }));
14626
+ }), hierarchicalFacetName);
14634
14627
  },
14635
14628
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
14636
14629
  var uiState = _ref6.uiState;
@@ -14661,18 +14654,17 @@
14661
14654
  };
14662
14655
  };
14663
14656
  };
14664
- function removeEmptyRefinementsFromUiState$1(indexUiState) {
14665
- var hierarchicalMenu = indexUiState.hierarchicalMenu,
14666
- indexUiStateBase = _objectWithoutProperties$9(indexUiState, _excluded2$1);
14667
- if (!hierarchicalMenu) {
14657
+ function removeEmptyRefinementsFromUiState$1(indexUiState, attribute) {
14658
+ if (!indexUiState.hierarchicalMenu) {
14668
14659
  return indexUiState;
14669
14660
  }
14670
- var connectorUiState = Object.keys(hierarchicalMenu).reduce(function (acc, key) {
14671
- return _objectSpread$p(_objectSpread$p({}, acc), hierarchicalMenu[key].length > 0 ? _defineProperty$q({}, key, hierarchicalMenu[key]) : {});
14672
- }, {});
14673
- return _objectSpread$p(_objectSpread$p({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
14674
- hierarchicalMenu: connectorUiState
14675
- } : {});
14661
+ if (!indexUiState.hierarchicalMenu[attribute] || indexUiState.hierarchicalMenu[attribute].length === 0) {
14662
+ delete indexUiState.hierarchicalMenu[attribute];
14663
+ }
14664
+ if (Object.keys(indexUiState.hierarchicalMenu).length === 0) {
14665
+ delete indexUiState.hierarchicalMenu;
14666
+ }
14667
+ return indexUiState;
14676
14668
  }
14677
14669
 
14678
14670
  function useHierarchicalMenu(props, additionalWidgetProperties) {
@@ -15071,8 +15063,8 @@
15071
15063
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
15072
15064
  }, _typeof$y(obj);
15073
15065
  }
15074
- var _excluded$a = ["page"],
15075
- _excluded2$2 = ["clickAnalytics", "userToken"];
15066
+ var _excluded$9 = ["page"],
15067
+ _excluded2$1 = ["clickAnalytics", "userToken"];
15076
15068
  function ownKeys$s(object, enumerableOnly) {
15077
15069
  var keys = Object.keys(object);
15078
15070
  if (Object.getOwnPropertySymbols) {
@@ -15147,9 +15139,9 @@
15147
15139
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
15148
15140
  return arr2;
15149
15141
  }
15150
- function _objectWithoutProperties$a(source, excluded) {
15142
+ function _objectWithoutProperties$9(source, excluded) {
15151
15143
  if (source == null) return {};
15152
- var target = _objectWithoutPropertiesLoose$b(source, excluded);
15144
+ var target = _objectWithoutPropertiesLoose$a(source, excluded);
15153
15145
  var key, i;
15154
15146
  if (Object.getOwnPropertySymbols) {
15155
15147
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -15162,7 +15154,7 @@
15162
15154
  }
15163
15155
  return target;
15164
15156
  }
15165
- function _objectWithoutPropertiesLoose$b(source, excluded) {
15157
+ function _objectWithoutPropertiesLoose$a(source, excluded) {
15166
15158
  if (source == null) return {};
15167
15159
  var target = {};
15168
15160
  var sourceKeys = Object.keys(source);
@@ -15181,14 +15173,14 @@
15181
15173
  function getStateWithoutPage(state) {
15182
15174
  var _ref = state || {},
15183
15175
  page = _ref.page,
15184
- rest = _objectWithoutProperties$a(_ref, _excluded$a);
15176
+ rest = _objectWithoutProperties$9(_ref, _excluded$9);
15185
15177
  return rest;
15186
15178
  }
15187
15179
  function normalizeState(state) {
15188
15180
  var _ref2 = state || {},
15189
15181
  clickAnalytics = _ref2.clickAnalytics,
15190
15182
  userToken = _ref2.userToken,
15191
- rest = _objectWithoutProperties$a(_ref2, _excluded2$2);
15183
+ rest = _objectWithoutProperties$9(_ref2, _excluded2$1);
15192
15184
  return rest;
15193
15185
  }
15194
15186
  function getInMemoryCache() {
@@ -15421,8 +15413,7 @@
15421
15413
  return useConnector(connectInfiniteHits, props, additionalWidgetProperties);
15422
15414
  }
15423
15415
 
15424
- var _excluded$b = ["name", "escapedValue", "path"],
15425
- _excluded2$3 = ["menu"];
15416
+ var _excluded$a = ["name", "escapedValue", "path"];
15426
15417
  function _typeof$z(obj) {
15427
15418
  "@babel/helpers - typeof";
15428
15419
 
@@ -15432,9 +15423,9 @@
15432
15423
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
15433
15424
  }, _typeof$z(obj);
15434
15425
  }
15435
- function _objectWithoutProperties$b(source, excluded) {
15426
+ function _objectWithoutProperties$a(source, excluded) {
15436
15427
  if (source == null) return {};
15437
- var target = _objectWithoutPropertiesLoose$c(source, excluded);
15428
+ var target = _objectWithoutPropertiesLoose$b(source, excluded);
15438
15429
  var key, i;
15439
15430
  if (Object.getOwnPropertySymbols) {
15440
15431
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -15447,7 +15438,7 @@
15447
15438
  }
15448
15439
  return target;
15449
15440
  }
15450
- function _objectWithoutPropertiesLoose$c(source, excluded) {
15441
+ function _objectWithoutPropertiesLoose$b(source, excluded) {
15451
15442
  if (source == null) return {};
15452
15443
  var target = {};
15453
15444
  var sourceKeys = Object.keys(source);
@@ -15688,7 +15679,7 @@
15688
15679
  var label = _ref3.name,
15689
15680
  value = _ref3.escapedValue,
15690
15681
  path = _ref3.path,
15691
- item = _objectWithoutProperties$b(_ref3, _excluded$b);
15682
+ item = _objectWithoutProperties$a(_ref3, _excluded$a);
15692
15683
  return _objectSpread$t(_objectSpread$t({}, item), {}, {
15693
15684
  label: label,
15694
15685
  value: value
@@ -15716,7 +15707,7 @@
15716
15707
  value = _searchParameters$get2[0];
15717
15708
  return removeEmptyRefinementsFromUiState$2(_objectSpread$t(_objectSpread$t({}, uiState), {}, {
15718
15709
  menu: _objectSpread$t(_objectSpread$t({}, uiState.menu), {}, _defineProperty$u({}, attribute, value))
15719
- }));
15710
+ }), attribute);
15720
15711
  },
15721
15712
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref5) {
15722
15713
  var uiState = _ref5.uiState;
@@ -15741,26 +15732,23 @@
15741
15732
  };
15742
15733
  };
15743
15734
  };
15744
- function removeEmptyRefinementsFromUiState$2(indexUiState) {
15745
- var menu = indexUiState.menu,
15746
- indexUiStateBase = _objectWithoutProperties$b(indexUiState, _excluded2$3);
15747
- if (!menu) {
15735
+ function removeEmptyRefinementsFromUiState$2(indexUiState, attribute) {
15736
+ if (!indexUiState.menu) {
15748
15737
  return indexUiState;
15749
15738
  }
15750
- var connectorUiState = Object.keys(menu).reduce(function (acc, key) {
15751
- var _menu$key;
15752
- return _objectSpread$t(_objectSpread$t({}, acc), ((_menu$key = menu[key]) === null || _menu$key === void 0 ? void 0 : _menu$key.length) > 0 ? _defineProperty$u({}, key, menu[key]) : {});
15753
- }, {});
15754
- return _objectSpread$t(_objectSpread$t({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
15755
- menu: connectorUiState
15756
- } : {});
15739
+ if (indexUiState.menu[attribute] === undefined) {
15740
+ delete indexUiState.menu[attribute];
15741
+ }
15742
+ if (Object.keys(indexUiState.menu).length === 0) {
15743
+ delete indexUiState.menu;
15744
+ }
15745
+ return indexUiState;
15757
15746
  }
15758
15747
 
15759
15748
  function useMenu(props, additionalWidgetProperties) {
15760
15749
  return useConnector(connectMenu, props, additionalWidgetProperties);
15761
15750
  }
15762
15751
 
15763
- var _excluded$c = ["numericMenu"];
15764
15752
  function _typeof$A(obj) {
15765
15753
  "@babel/helpers - typeof";
15766
15754
 
@@ -15770,33 +15758,6 @@
15770
15758
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
15771
15759
  }, _typeof$A(obj);
15772
15760
  }
15773
- function _objectWithoutProperties$c(source, excluded) {
15774
- if (source == null) return {};
15775
- var target = _objectWithoutPropertiesLoose$d(source, excluded);
15776
- var key, i;
15777
- if (Object.getOwnPropertySymbols) {
15778
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
15779
- for (i = 0; i < sourceSymbolKeys.length; i++) {
15780
- key = sourceSymbolKeys[i];
15781
- if (excluded.indexOf(key) >= 0) continue;
15782
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
15783
- target[key] = source[key];
15784
- }
15785
- }
15786
- return target;
15787
- }
15788
- function _objectWithoutPropertiesLoose$d(source, excluded) {
15789
- if (source == null) return {};
15790
- var target = {};
15791
- var sourceKeys = Object.keys(source);
15792
- var key, i;
15793
- for (i = 0; i < sourceKeys.length; i++) {
15794
- key = sourceKeys[i];
15795
- if (excluded.indexOf(key) >= 0) continue;
15796
- target[key] = source[key];
15797
- }
15798
- return target;
15799
- }
15800
15761
  function _createForOfIteratorHelper(o, allowArrayLike) {
15801
15762
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
15802
15763
  if (!it) {
@@ -16031,7 +15992,7 @@
16031
15992
  var max = values['<='] && values['<='][0] || '';
16032
15993
  return removeEmptyRefinementsFromUiState$3(_objectSpread$u(_objectSpread$u({}, uiState), {}, {
16033
15994
  numericMenu: _objectSpread$u(_objectSpread$u({}, uiState.numericMenu), {}, _defineProperty$v({}, attribute, "".concat(min, ":").concat(max)))
16034
- }));
15995
+ }), attribute);
16035
15996
  },
16036
15997
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
16037
15998
  var uiState = _ref6.uiState;
@@ -16193,18 +16154,17 @@
16193
16154
  function hasNumericRefinement(currentRefinements, operator, value) {
16194
16155
  return currentRefinements[operator] !== undefined && currentRefinements[operator].includes(value);
16195
16156
  }
16196
- function removeEmptyRefinementsFromUiState$3(indexUiState) {
16197
- var numericMenu = indexUiState.numericMenu,
16198
- indexUiStateBase = _objectWithoutProperties$c(indexUiState, _excluded$c);
16199
- if (!numericMenu) {
16157
+ function removeEmptyRefinementsFromUiState$3(indexUiState, attribute) {
16158
+ if (!indexUiState.numericMenu) {
16200
16159
  return indexUiState;
16201
16160
  }
16202
- var connectorUiState = Object.keys(numericMenu).reduce(function (acc, key) {
16203
- return _objectSpread$u(_objectSpread$u({}, acc), numericMenu[key] !== ':' ? _defineProperty$v({}, key, numericMenu[key]) : {});
16204
- }, {});
16205
- return _objectSpread$u(_objectSpread$u({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
16206
- numericMenu: connectorUiState
16207
- } : {});
16161
+ if (indexUiState.numericMenu[attribute] === ':') {
16162
+ delete indexUiState.numericMenu[attribute];
16163
+ }
16164
+ if (Object.keys(indexUiState.numericMenu).length === 0) {
16165
+ delete indexUiState.numericMenu;
16166
+ }
16167
+ return indexUiState;
16208
16168
  }
16209
16169
 
16210
16170
  function useNumericMenu(props, additionalWidgetProperties) {
@@ -17153,9 +17113,8 @@
17153
17113
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
17154
17114
  }, _typeof$F(obj);
17155
17115
  }
17156
- var _excluded$d = ["name", "escapedValue"],
17157
- _excluded2$4 = ["escapedValue", "value"],
17158
- _excluded3 = ["refinementList"];
17116
+ var _excluded$b = ["name", "escapedValue"],
17117
+ _excluded2$2 = ["escapedValue", "value"];
17159
17118
  function ownKeys$y(object, enumerableOnly) {
17160
17119
  var keys = Object.keys(object);
17161
17120
  if (Object.getOwnPropertySymbols) {
@@ -17205,9 +17164,9 @@
17205
17164
  }
17206
17165
  return (hint === "string" ? String : Number)(input);
17207
17166
  }
17208
- function _objectWithoutProperties$d(source, excluded) {
17167
+ function _objectWithoutProperties$b(source, excluded) {
17209
17168
  if (source == null) return {};
17210
- var target = _objectWithoutPropertiesLoose$e(source, excluded);
17169
+ var target = _objectWithoutPropertiesLoose$c(source, excluded);
17211
17170
  var key, i;
17212
17171
  if (Object.getOwnPropertySymbols) {
17213
17172
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -17220,7 +17179,7 @@
17220
17179
  }
17221
17180
  return target;
17222
17181
  }
17223
- function _objectWithoutPropertiesLoose$e(source, excluded) {
17182
+ function _objectWithoutPropertiesLoose$c(source, excluded) {
17224
17183
  if (source == null) return {};
17225
17184
  var target = {};
17226
17185
  var sourceKeys = Object.keys(source);
@@ -17283,7 +17242,7 @@
17283
17242
  var formatItems = function formatItems(_ref2) {
17284
17243
  var label = _ref2.name,
17285
17244
  value = _ref2.escapedValue,
17286
- item = _objectWithoutProperties$d(_ref2, _excluded$d);
17245
+ item = _objectWithoutProperties$b(_ref2, _excluded$b);
17287
17246
  return _objectSpread$y(_objectSpread$y({}, item), {}, {
17288
17247
  value: value,
17289
17248
  label: label,
@@ -17340,7 +17299,7 @@
17340
17299
  var normalizedFacetValues = transformItems(facetValues.map(function (_ref3) {
17341
17300
  var escapedValue = _ref3.escapedValue,
17342
17301
  value = _ref3.value,
17343
- item = _objectWithoutProperties$d(_ref3, _excluded2$4);
17302
+ item = _objectWithoutProperties$b(_ref3, _excluded2$2);
17344
17303
  return _objectSpread$y(_objectSpread$y({}, item), {}, {
17345
17304
  value: escapedValue,
17346
17305
  label: value
@@ -17468,7 +17427,7 @@
17468
17427
  var values = operator === 'or' ? searchParameters.getDisjunctiveRefinements(attribute) : searchParameters.getConjunctiveRefinements(attribute);
17469
17428
  return removeEmptyRefinementsFromUiState$4(_objectSpread$y(_objectSpread$y({}, uiState), {}, {
17470
17429
  refinementList: _objectSpread$y(_objectSpread$y({}, uiState.refinementList), {}, _defineProperty$A({}, attribute, values))
17471
- }));
17430
+ }), attribute);
17472
17431
  },
17473
17432
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
17474
17433
  var uiState = _ref6.uiState;
@@ -17496,18 +17455,17 @@
17496
17455
  };
17497
17456
  };
17498
17457
  };
17499
- function removeEmptyRefinementsFromUiState$4(indexUiState) {
17500
- var refinementList = indexUiState.refinementList,
17501
- indexUiStateBase = _objectWithoutProperties$d(indexUiState, _excluded3);
17502
- if (!refinementList) {
17458
+ function removeEmptyRefinementsFromUiState$4(indexUiState, attribute) {
17459
+ if (!indexUiState.refinementList) {
17503
17460
  return indexUiState;
17504
17461
  }
17505
- var connectorUiState = Object.keys(refinementList).reduce(function (acc, key) {
17506
- return _objectSpread$y(_objectSpread$y({}, acc), refinementList[key].length > 0 ? _defineProperty$A({}, key, refinementList[key]) : {});
17507
- }, {});
17508
- return _objectSpread$y(_objectSpread$y({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
17509
- refinementList: connectorUiState
17510
- } : {});
17462
+ if (!indexUiState.refinementList[attribute] || indexUiState.refinementList[attribute].length === 0) {
17463
+ delete indexUiState.refinementList[attribute];
17464
+ }
17465
+ if (Object.keys(indexUiState.refinementList).length === 0) {
17466
+ delete indexUiState.refinementList;
17467
+ }
17468
+ return indexUiState;
17511
17469
  }
17512
17470
 
17513
17471
  function useRefinementList(props, additionalWidgetProperties) {
@@ -18886,7 +18844,7 @@
18886
18844
  };
18887
18845
  return _extends$1.apply(this, arguments);
18888
18846
  }
18889
- function _objectWithoutPropertiesLoose$f(source, excluded) {
18847
+ function _objectWithoutPropertiesLoose$d(source, excluded) {
18890
18848
  if (source == null) return {};
18891
18849
  var target = {};
18892
18850
  var sourceKeys = Object.keys(source);
@@ -18898,9 +18856,9 @@
18898
18856
  }
18899
18857
  return target;
18900
18858
  }
18901
- function _objectWithoutProperties$e(source, excluded) {
18859
+ function _objectWithoutProperties$c(source, excluded) {
18902
18860
  if (source == null) return {};
18903
- var target = _objectWithoutPropertiesLoose$f(source, excluded);
18861
+ var target = _objectWithoutPropertiesLoose$d(source, excluded);
18904
18862
  var key, i;
18905
18863
  if (Object.getOwnPropertySymbols) {
18906
18864
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -18962,7 +18920,7 @@
18962
18920
  return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
18963
18921
  }
18964
18922
 
18965
- var _excluded$e = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
18923
+ var _excluded$c = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
18966
18924
  function Breadcrumb(_ref) {
18967
18925
  var _ref$classNames = _ref.classNames,
18968
18926
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
@@ -18974,7 +18932,7 @@
18974
18932
  _ref$separator = _ref.separator,
18975
18933
  separator = _ref$separator === void 0 ? '>' : _ref$separator,
18976
18934
  translations = _ref.translations,
18977
- props = _objectWithoutProperties$e(_ref, _excluded$e);
18935
+ props = _objectWithoutProperties$c(_ref, _excluded$c);
18978
18936
  var handleClick = function handleClick(value) {
18979
18937
  return function (event) {
18980
18938
  if (!isModifierClick(event)) {
@@ -19009,14 +18967,14 @@
19009
18967
  })));
19010
18968
  }
19011
18969
 
19012
- var _excluded$f = ["attributes", "rootPath", "separator", "transformItems", "translations"];
18970
+ var _excluded$d = ["attributes", "rootPath", "separator", "transformItems", "translations"];
19013
18971
  function Breadcrumb$1(_ref) {
19014
18972
  var attributes = _ref.attributes,
19015
18973
  rootPath = _ref.rootPath,
19016
18974
  separator = _ref.separator,
19017
18975
  transformItems = _ref.transformItems,
19018
18976
  translations = _ref.translations,
19019
- props = _objectWithoutProperties$e(_ref, _excluded$f);
18977
+ props = _objectWithoutProperties$c(_ref, _excluded$d);
19020
18978
  var _useBreadcrumb = useBreadcrumb({
19021
18979
  attributes: attributes,
19022
18980
  rootPath: rootPath,
@@ -19040,7 +18998,7 @@
19040
18998
  return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
19041
18999
  }
19042
19000
 
19043
- var _excluded$g = ["classNames", "disabled", "onClick", "translations"];
19001
+ var _excluded$e = ["classNames", "disabled", "onClick", "translations"];
19044
19002
  function ClearRefinements(_ref) {
19045
19003
  var _ref$classNames = _ref.classNames,
19046
19004
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
@@ -19049,7 +19007,7 @@
19049
19007
  _ref$onClick = _ref.onClick,
19050
19008
  onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
19051
19009
  translations = _ref.translations,
19052
- props = _objectWithoutProperties$e(_ref, _excluded$g);
19010
+ props = _objectWithoutProperties$c(_ref, _excluded$e);
19053
19011
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19054
19012
  className: cx('ais-ClearRefinements', classNames.root, props.className)
19055
19013
  }), /*#__PURE__*/React__default.createElement("button", {
@@ -19059,13 +19017,13 @@
19059
19017
  }, translations.resetButtonText));
19060
19018
  }
19061
19019
 
19062
- var _excluded$h = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
19020
+ var _excluded$f = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
19063
19021
  function ClearRefinements$1(_ref) {
19064
19022
  var includedAttributes = _ref.includedAttributes,
19065
19023
  excludedAttributes = _ref.excludedAttributes,
19066
19024
  transformItems = _ref.transformItems,
19067
19025
  translations = _ref.translations,
19068
- props = _objectWithoutProperties$e(_ref, _excluded$h);
19026
+ props = _objectWithoutProperties$c(_ref, _excluded$f);
19069
19027
  var _useClearRefinements = useClearRefinements({
19070
19028
  includedAttributes: includedAttributes,
19071
19029
  excludedAttributes: excludedAttributes,
@@ -19089,7 +19047,7 @@
19089
19047
  return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
19090
19048
  }
19091
19049
 
19092
- var _excluded$i = ["classNames", "items", "hasRefinements"];
19050
+ var _excluded$g = ["classNames", "items", "hasRefinements"];
19093
19051
  function CurrentRefinements(_ref) {
19094
19052
  var _ref$classNames = _ref.classNames,
19095
19053
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
@@ -19097,7 +19055,7 @@
19097
19055
  items = _ref$items === void 0 ? [] : _ref$items,
19098
19056
  _ref$hasRefinements = _ref.hasRefinements,
19099
19057
  hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
19100
- props = _objectWithoutProperties$e(_ref, _excluded$i);
19058
+ props = _objectWithoutProperties$c(_ref, _excluded$g);
19101
19059
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19102
19060
  className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
19103
19061
  }), /*#__PURE__*/React__default.createElement("ul", {
@@ -19129,12 +19087,12 @@
19129
19087
  })));
19130
19088
  }
19131
19089
 
19132
- var _excluded$j = ["includedAttributes", "excludedAttributes", "transformItems"];
19090
+ var _excluded$h = ["includedAttributes", "excludedAttributes", "transformItems"];
19133
19091
  function CurrentRefinements$1(_ref) {
19134
19092
  var includedAttributes = _ref.includedAttributes,
19135
19093
  excludedAttributes = _ref.excludedAttributes,
19136
19094
  transformItems = _ref.transformItems,
19137
- props = _objectWithoutProperties$e(_ref, _excluded$j);
19095
+ props = _objectWithoutProperties$c(_ref, _excluded$h);
19138
19096
  var _useCurrentRefinement = useCurrentRefinements({
19139
19097
  includedAttributes: includedAttributes,
19140
19098
  excludedAttributes: excludedAttributes,
@@ -19151,17 +19109,17 @@
19151
19109
  return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
19152
19110
  }
19153
19111
 
19154
- var _excluded$k = ["isShowingMore", "translations"];
19112
+ var _excluded$i = ["isShowingMore", "translations"];
19155
19113
  function ShowMoreButton(_ref) {
19156
19114
  var isShowingMore = _ref.isShowingMore,
19157
19115
  translations = _ref.translations,
19158
- props = _objectWithoutProperties$e(_ref, _excluded$k);
19116
+ props = _objectWithoutProperties$c(_ref, _excluded$i);
19159
19117
  return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
19160
19118
  isShowingMore: isShowingMore
19161
19119
  }));
19162
19120
  }
19163
19121
 
19164
- var _excluded$l = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
19122
+ var _excluded$j = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
19165
19123
  function HierarchicalList(_ref) {
19166
19124
  var className = _ref.className,
19167
19125
  _ref$classNames = _ref.classNames,
@@ -19213,7 +19171,7 @@
19213
19171
  onToggleShowMore = _ref2.onToggleShowMore,
19214
19172
  isShowingMore = _ref2.isShowingMore,
19215
19173
  translations = _ref2.translations,
19216
- props = _objectWithoutProperties$e(_ref2, _excluded$l);
19174
+ props = _objectWithoutProperties$c(_ref2, _excluded$j);
19217
19175
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19218
19176
  className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
19219
19177
  }), /*#__PURE__*/React__default.createElement(HierarchicalList, {
@@ -19230,7 +19188,7 @@
19230
19188
  }));
19231
19189
  }
19232
19190
 
19233
- var _excluded$m = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
19191
+ var _excluded$k = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
19234
19192
  function HierarchicalMenu$1(_ref) {
19235
19193
  var attributes = _ref.attributes,
19236
19194
  limit = _ref.limit,
@@ -19242,7 +19200,7 @@
19242
19200
  sortBy = _ref.sortBy,
19243
19201
  transformItems = _ref.transformItems,
19244
19202
  translations = _ref.translations,
19245
- props = _objectWithoutProperties$e(_ref, _excluded$m);
19203
+ props = _objectWithoutProperties$c(_ref, _excluded$k);
19246
19204
  var _useHierarchicalMenu = useHierarchicalMenu({
19247
19205
  attributes: attributes,
19248
19206
  limit: limit,
@@ -19282,7 +19240,7 @@
19282
19240
  }));
19283
19241
  }
19284
19242
 
19285
- var _excluded$n = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
19243
+ var _excluded$l = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
19286
19244
  function HighlightPart(_ref) {
19287
19245
  var classNames = _ref.classNames,
19288
19246
  children = _ref.children,
@@ -19304,7 +19262,7 @@
19304
19262
  separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
19305
19263
  className = _ref2.className,
19306
19264
  classNames = _ref2.classNames,
19307
- props = _objectWithoutProperties$e(_ref2, _excluded$n);
19265
+ props = _objectWithoutProperties$c(_ref2, _excluded$l);
19308
19266
  return /*#__PURE__*/React__default.createElement("span", _extends$1({}, props, {
19309
19267
  className: cx(classNames.root, className)
19310
19268
  }), parts.map(function (part, partIndex) {
@@ -19325,11 +19283,11 @@
19325
19283
  }));
19326
19284
  }
19327
19285
 
19328
- var _excluded$o = ["classNames"];
19286
+ var _excluded$m = ["classNames"];
19329
19287
  function Highlight(_ref) {
19330
19288
  var _ref$classNames = _ref.classNames,
19331
19289
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
19332
- props = _objectWithoutProperties$e(_ref, _excluded$o);
19290
+ props = _objectWithoutProperties$c(_ref, _excluded$m);
19333
19291
  return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
19334
19292
  classNames: {
19335
19293
  root: cx('ais-Highlight', classNames.root),
@@ -19340,14 +19298,14 @@
19340
19298
  }, props));
19341
19299
  }
19342
19300
 
19343
- var _excluded$p = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
19301
+ var _excluded$n = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
19344
19302
  function Highlight$1(_ref) {
19345
19303
  var hit = _ref.hit,
19346
19304
  attribute = _ref.attribute,
19347
19305
  highlightedTagName = _ref.highlightedTagName,
19348
19306
  nonHighlightedTagName = _ref.nonHighlightedTagName,
19349
19307
  separator = _ref.separator,
19350
- props = _objectWithoutProperties$e(_ref, _excluded$p);
19308
+ props = _objectWithoutProperties$c(_ref, _excluded$n);
19351
19309
  var property = getPropertyByPath(hit._highlightResult, attribute) || [];
19352
19310
  var properties = Array.isArray(property) ? property : [property];
19353
19311
  var parts = properties.map(function (singleValue) {
@@ -19361,7 +19319,7 @@
19361
19319
  }));
19362
19320
  }
19363
19321
 
19364
- var _excluded$q = ["hits", "sendEvent", "hitComponent", "classNames"];
19322
+ var _excluded$o = ["hits", "sendEvent", "hitComponent", "classNames"];
19365
19323
  function DefaultHitComponent(_ref) {
19366
19324
  var hit = _ref.hit;
19367
19325
  return /*#__PURE__*/React__default.createElement("div", {
@@ -19377,7 +19335,7 @@
19377
19335
  HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
19378
19336
  _ref2$classNames = _ref2.classNames,
19379
19337
  classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
19380
- props = _objectWithoutProperties$e(_ref2, _excluded$q);
19338
+ props = _objectWithoutProperties$c(_ref2, _excluded$o);
19381
19339
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19382
19340
  className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
19383
19341
  }), /*#__PURE__*/React__default.createElement("ol", {
@@ -19399,11 +19357,11 @@
19399
19357
  })));
19400
19358
  }
19401
19359
 
19402
- var _excluded$r = ["escapeHTML", "transformItems"];
19360
+ var _excluded$p = ["escapeHTML", "transformItems"];
19403
19361
  function Hits$1(_ref) {
19404
19362
  var escapeHTML = _ref.escapeHTML,
19405
19363
  transformItems = _ref.transformItems,
19406
- props = _objectWithoutProperties$e(_ref, _excluded$r);
19364
+ props = _objectWithoutProperties$c(_ref, _excluded$p);
19407
19365
  var _useHits = useHits({
19408
19366
  escapeHTML: escapeHTML,
19409
19367
  transformItems: transformItems
@@ -19419,14 +19377,14 @@
19419
19377
  return /*#__PURE__*/React__default.createElement(Hits, _extends$1({}, props, uiProps));
19420
19378
  }
19421
19379
 
19422
- var _excluded$s = ["items", "onChange", "currentValue", "classNames"];
19380
+ var _excluded$q = ["items", "onChange", "currentValue", "classNames"];
19423
19381
  function HitsPerPage(_ref) {
19424
19382
  var items = _ref.items,
19425
19383
  _onChange = _ref.onChange,
19426
19384
  currentValue = _ref.currentValue,
19427
19385
  _ref$classNames = _ref.classNames,
19428
19386
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
19429
- props = _objectWithoutProperties$e(_ref, _excluded$s);
19387
+ props = _objectWithoutProperties$c(_ref, _excluded$q);
19430
19388
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19431
19389
  className: cx('ais-HitsPerPage', classNames.root, props.className)
19432
19390
  }), /*#__PURE__*/React__default.createElement("select", {
@@ -19444,11 +19402,11 @@
19444
19402
  })));
19445
19403
  }
19446
19404
 
19447
- var _excluded$t = ["items", "transformItems"];
19405
+ var _excluded$r = ["items", "transformItems"];
19448
19406
  function HitsPerPage$1(_ref) {
19449
19407
  var userItems = _ref.items,
19450
19408
  transformItems = _ref.transformItems,
19451
- props = _objectWithoutProperties$e(_ref, _excluded$t);
19409
+ props = _objectWithoutProperties$c(_ref, _excluded$r);
19452
19410
  var _useHitsPerPage = useHitsPerPage({
19453
19411
  items: userItems,
19454
19412
  transformItems: transformItems
@@ -19472,7 +19430,7 @@
19472
19430
  return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
19473
19431
  }
19474
19432
 
19475
- var _excluded$u = ["hitComponent", "hits", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
19433
+ var _excluded$s = ["hitComponent", "hits", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
19476
19434
  function DefaultHitComponent$1(_ref) {
19477
19435
  var hit = _ref.hit;
19478
19436
  return /*#__PURE__*/React__default.createElement("div", {
@@ -19493,7 +19451,7 @@
19493
19451
  _ref2$classNames = _ref2.classNames,
19494
19452
  classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
19495
19453
  translations = _ref2.translations,
19496
- props = _objectWithoutProperties$e(_ref2, _excluded$u);
19454
+ props = _objectWithoutProperties$c(_ref2, _excluded$s);
19497
19455
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19498
19456
  className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
19499
19457
  }), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
@@ -19523,7 +19481,7 @@
19523
19481
  }, translations.showMoreButtonText));
19524
19482
  }
19525
19483
 
19526
- var _excluded$v = ["showPrevious", "cache", "escapeHTML", "showPrevious", "transformItems", "translations"];
19484
+ var _excluded$t = ["showPrevious", "cache", "escapeHTML", "showPrevious", "transformItems", "translations"];
19527
19485
  function InfiniteHits$1(_ref) {
19528
19486
  var _ref$showPrevious = _ref.showPrevious,
19529
19487
  shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
@@ -19532,7 +19490,7 @@
19532
19490
  userShowPrevious = _ref.showPrevious,
19533
19491
  transformItems = _ref.transformItems,
19534
19492
  translations = _ref.translations,
19535
- props = _objectWithoutProperties$e(_ref, _excluded$v);
19493
+ props = _objectWithoutProperties$c(_ref, _excluded$t);
19536
19494
  var _useInfiniteHits = useInfiniteHits({
19537
19495
  cache: cache,
19538
19496
  escapeHTML: escapeHTML,
@@ -19562,7 +19520,7 @@
19562
19520
  return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
19563
19521
  }
19564
19522
 
19565
- var _excluded$w = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
19523
+ var _excluded$u = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
19566
19524
  function Menu(_ref) {
19567
19525
  var items = _ref.items,
19568
19526
  _ref$classNames = _ref.classNames,
@@ -19574,7 +19532,7 @@
19574
19532
  createURL = _ref.createURL,
19575
19533
  onRefine = _ref.onRefine,
19576
19534
  translations = _ref.translations,
19577
- props = _objectWithoutProperties$e(_ref, _excluded$w);
19535
+ props = _objectWithoutProperties$c(_ref, _excluded$u);
19578
19536
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19579
19537
  className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
19580
19538
  }), /*#__PURE__*/React__default.createElement("ul", {
@@ -19604,7 +19562,7 @@
19604
19562
  }));
19605
19563
  }
19606
19564
 
19607
- var _excluded$x = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
19565
+ var _excluded$v = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
19608
19566
  function Menu$1(_ref) {
19609
19567
  var attribute = _ref.attribute,
19610
19568
  limit = _ref.limit,
@@ -19613,7 +19571,7 @@
19613
19571
  sortBy = _ref.sortBy,
19614
19572
  transformItems = _ref.transformItems,
19615
19573
  translations = _ref.translations,
19616
- props = _objectWithoutProperties$e(_ref, _excluded$x);
19574
+ props = _objectWithoutProperties$c(_ref, _excluded$v);
19617
19575
  var _useMenu = useMenu({
19618
19576
  attribute: attribute,
19619
19577
  limit: limit,
@@ -19650,8 +19608,8 @@
19650
19608
  }));
19651
19609
  }
19652
19610
 
19653
- var _excluded$y = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
19654
- _excluded2$5 = ["isDisabled", "className", "classNames", "href", "onClick"];
19611
+ var _excluded$w = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
19612
+ _excluded2$3 = ["isDisabled", "className", "classNames", "href", "onClick"];
19655
19613
  function Pagination(_ref) {
19656
19614
  var pages = _ref.pages,
19657
19615
  currentPage = _ref.currentPage,
@@ -19671,7 +19629,7 @@
19671
19629
  translations = _ref.translations,
19672
19630
  _ref$classNames = _ref.classNames,
19673
19631
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
19674
- props = _objectWithoutProperties$e(_ref, _excluded$y);
19632
+ props = _objectWithoutProperties$c(_ref, _excluded$w);
19675
19633
  var firstPageIndex = 0;
19676
19634
  var previousPageIndex = currentPage - 1;
19677
19635
  var nextPageIndex = currentPage + 1;
@@ -19742,7 +19700,7 @@
19742
19700
  classNames = _ref2.classNames,
19743
19701
  href = _ref2.href,
19744
19702
  _onClick = _ref2.onClick,
19745
- props = _objectWithoutProperties$e(_ref2, _excluded2$5);
19703
+ props = _objectWithoutProperties$c(_ref2, _excluded2$3);
19746
19704
  if (isDisabled) {
19747
19705
  return /*#__PURE__*/React__default.createElement("li", {
19748
19706
  className: cx('ais-Pagination-item', classNames.item, 'ais-Pagination-item--disabled', classNames.disabledItem, className)
@@ -19765,7 +19723,7 @@
19765
19723
  }, props)));
19766
19724
  }
19767
19725
 
19768
- var _excluded$z = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
19726
+ var _excluded$x = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
19769
19727
  function Pagination$1(_ref) {
19770
19728
  var showFirst = _ref.showFirst,
19771
19729
  showPrevious = _ref.showPrevious,
@@ -19774,7 +19732,7 @@
19774
19732
  padding = _ref.padding,
19775
19733
  totalPages = _ref.totalPages,
19776
19734
  translations = _ref.translations,
19777
- props = _objectWithoutProperties$e(_ref, _excluded$z);
19735
+ props = _objectWithoutProperties$c(_ref, _excluded$x);
19778
19736
  var _usePagination = usePagination({
19779
19737
  padding: padding,
19780
19738
  totalPages: totalPages
@@ -19823,14 +19781,14 @@
19823
19781
  }));
19824
19782
  }
19825
19783
 
19826
- var _excluded$A = ["classNames", "url", "theme"];
19784
+ var _excluded$y = ["classNames", "url", "theme"];
19827
19785
  function PoweredBy(_ref) {
19828
19786
  var _ref$classNames = _ref.classNames,
19829
19787
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
19830
19788
  url = _ref.url,
19831
19789
  _ref$theme = _ref.theme,
19832
19790
  theme = _ref$theme === void 0 ? 'light' : _ref$theme,
19833
- props = _objectWithoutProperties$e(_ref, _excluded$A);
19791
+ props = _objectWithoutProperties$c(_ref, _excluded$y);
19834
19792
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
19835
19793
  className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
19836
19794
  }), /*#__PURE__*/React__default.createElement("a", {
@@ -19860,7 +19818,7 @@
19860
19818
  return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
19861
19819
  }
19862
19820
 
19863
- var _excluded$B = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
19821
+ var _excluded$z = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
19864
19822
  // if the default value is undefined, React considers the component uncontrolled initially, which we don't want 0 or NaN as the default value
19865
19823
  var unsetNumberInputValue = '';
19866
19824
 
@@ -19885,7 +19843,7 @@
19885
19843
  disabled = _ref.disabled,
19886
19844
  _onSubmit = _ref.onSubmit,
19887
19845
  translations = _ref.translations,
19888
- props = _objectWithoutProperties$e(_ref, _excluded$B);
19846
+ props = _objectWithoutProperties$c(_ref, _excluded$z);
19889
19847
  var values = {
19890
19848
  min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
19891
19849
  max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
@@ -19965,14 +19923,14 @@
19965
19923
  }, translations.submitButtonText)));
19966
19924
  }
19967
19925
 
19968
- var _excluded$C = ["attribute", "min", "max", "precision", "translations"];
19926
+ var _excluded$A = ["attribute", "min", "max", "precision", "translations"];
19969
19927
  function RangeInput$1(_ref) {
19970
19928
  var attribute = _ref.attribute,
19971
19929
  min = _ref.min,
19972
19930
  max = _ref.max,
19973
19931
  precision = _ref.precision,
19974
19932
  translations = _ref.translations,
19975
- props = _objectWithoutProperties$e(_ref, _excluded$C);
19933
+ props = _objectWithoutProperties$c(_ref, _excluded$A);
19976
19934
  var _useRange = useRange({
19977
19935
  attribute: attribute,
19978
19936
  min: min,
@@ -20000,7 +19958,7 @@
20000
19958
  return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
20001
19959
  }
20002
19960
 
20003
- var _excluded$D = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
19961
+ var _excluded$B = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
20004
19962
  function RefinementList$1(_ref) {
20005
19963
  var canRefine = _ref.canRefine,
20006
19964
  items = _ref.items,
@@ -20016,7 +19974,7 @@
20016
19974
  _ref$classNames = _ref.classNames,
20017
19975
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
20018
19976
  translations = _ref.translations,
20019
- props = _objectWithoutProperties$e(_ref, _excluded$D);
19977
+ props = _objectWithoutProperties$c(_ref, _excluded$B);
20020
19978
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
20021
19979
  className: cx('ais-RefinementList', classNames.root, !canRefine && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
20022
19980
  }), searchBox && /*#__PURE__*/React__default.createElement("div", {
@@ -20055,7 +20013,7 @@
20055
20013
  }));
20056
20014
  }
20057
20015
 
20058
- var _excluded$E = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
20016
+ var _excluded$C = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
20059
20017
  var _ref2 = /*#__PURE__*/React__default.createElement("path", {
20060
20018
  d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
20061
20019
  });
@@ -20135,7 +20093,7 @@
20135
20093
  _ref7$classNames = _ref7.classNames,
20136
20094
  classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
20137
20095
  translations = _ref7.translations,
20138
- props = _objectWithoutProperties$e(_ref7, _excluded$E);
20096
+ props = _objectWithoutProperties$c(_ref7, _excluded$C);
20139
20097
  function handleSubmit(event) {
20140
20098
  event.preventDefault();
20141
20099
  event.stopPropagation();
@@ -20201,7 +20159,7 @@
20201
20159
  }))));
20202
20160
  }
20203
20161
 
20204
- var _excluded$F = ["searchable", "searchablePlaceholder", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
20162
+ var _excluded$D = ["searchable", "searchablePlaceholder", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
20205
20163
  function RefinementList$2(_ref) {
20206
20164
  var searchable = _ref.searchable,
20207
20165
  searchablePlaceholder = _ref.searchablePlaceholder,
@@ -20214,7 +20172,7 @@
20214
20172
  escapeFacetValues = _ref.escapeFacetValues,
20215
20173
  transformItems = _ref.transformItems,
20216
20174
  translations = _ref.translations,
20217
- props = _objectWithoutProperties$e(_ref, _excluded$F);
20175
+ props = _objectWithoutProperties$c(_ref, _excluded$D);
20218
20176
  var _useRefinementList = useRefinementList({
20219
20177
  attribute: attribute,
20220
20178
  operator: operator,
@@ -20299,13 +20257,13 @@
20299
20257
  }));
20300
20258
  }
20301
20259
 
20302
- var _excluded$G = ["queryHook", "searchAsYouType", "translations"];
20260
+ var _excluded$E = ["queryHook", "searchAsYouType", "translations"];
20303
20261
  function SearchBox$1(_ref) {
20304
20262
  var queryHook = _ref.queryHook,
20305
20263
  _ref$searchAsYouType = _ref.searchAsYouType,
20306
20264
  searchAsYouType = _ref$searchAsYouType === void 0 ? true : _ref$searchAsYouType,
20307
20265
  translations = _ref.translations,
20308
- props = _objectWithoutProperties$e(_ref, _excluded$G);
20266
+ props = _objectWithoutProperties$c(_ref, _excluded$E);
20309
20267
  var _useSearchBox = useSearchBox({
20310
20268
  queryHook: queryHook
20311
20269
  }, {
@@ -20365,11 +20323,11 @@
20365
20323
  return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
20366
20324
  }
20367
20325
 
20368
- var _excluded$H = ["classNames"];
20326
+ var _excluded$F = ["classNames"];
20369
20327
  function Snippet(_ref) {
20370
20328
  var _ref$classNames = _ref.classNames,
20371
20329
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
20372
- props = _objectWithoutProperties$e(_ref, _excluded$H);
20330
+ props = _objectWithoutProperties$c(_ref, _excluded$F);
20373
20331
  return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
20374
20332
  classNames: {
20375
20333
  root: cx('ais-Snippet', classNames.root),
@@ -20380,14 +20338,14 @@
20380
20338
  }, props));
20381
20339
  }
20382
20340
 
20383
- var _excluded$I = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
20341
+ var _excluded$G = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
20384
20342
  function Snippet$1(_ref) {
20385
20343
  var hit = _ref.hit,
20386
20344
  attribute = _ref.attribute,
20387
20345
  highlightedTagName = _ref.highlightedTagName,
20388
20346
  nonHighlightedTagName = _ref.nonHighlightedTagName,
20389
20347
  separator = _ref.separator,
20390
- props = _objectWithoutProperties$e(_ref, _excluded$I);
20348
+ props = _objectWithoutProperties$c(_ref, _excluded$G);
20391
20349
  var property = getPropertyByPath(hit._snippetResult, attribute) || [];
20392
20350
  var properties = Array.isArray(property) ? property : [property];
20393
20351
  var parts = properties.map(function (singleValue) {
@@ -20401,7 +20359,7 @@
20401
20359
  }));
20402
20360
  }
20403
20361
 
20404
- var _excluded$J = ["items", "value", "onChange", "classNames"];
20362
+ var _excluded$H = ["items", "value", "onChange", "classNames"];
20405
20363
  function SortBy(_ref) {
20406
20364
  var items = _ref.items,
20407
20365
  value = _ref.value,
@@ -20409,7 +20367,7 @@
20409
20367
  _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
20410
20368
  _ref$classNames = _ref.classNames,
20411
20369
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
20412
- props = _objectWithoutProperties$e(_ref, _excluded$J);
20370
+ props = _objectWithoutProperties$c(_ref, _excluded$H);
20413
20371
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
20414
20372
  className: cx('ais-SortBy', classNames.root, props.className)
20415
20373
  }), /*#__PURE__*/React__default.createElement("select", {
@@ -20428,11 +20386,11 @@
20428
20386
  })));
20429
20387
  }
20430
20388
 
20431
- var _excluded$K = ["items", "transformItems"];
20389
+ var _excluded$I = ["items", "transformItems"];
20432
20390
  function SortBy$1(_ref) {
20433
20391
  var items = _ref.items,
20434
20392
  transformItems = _ref.transformItems,
20435
- props = _objectWithoutProperties$e(_ref, _excluded$K);
20393
+ props = _objectWithoutProperties$c(_ref, _excluded$I);
20436
20394
  var _useSortBy = useSortBy({
20437
20395
  items: items,
20438
20396
  transformItems: transformItems
@@ -20450,7 +20408,7 @@
20450
20408
  return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
20451
20409
  }
20452
20410
 
20453
- var _excluded$L = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
20411
+ var _excluded$J = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
20454
20412
  function Stats(_ref) {
20455
20413
  var _ref$classNames = _ref.classNames,
20456
20414
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
@@ -20459,7 +20417,7 @@
20459
20417
  nbSortedHits = _ref.nbSortedHits,
20460
20418
  areHitsSorted = _ref.areHitsSorted,
20461
20419
  translations = _ref.translations,
20462
- props = _objectWithoutProperties$e(_ref, _excluded$L);
20420
+ props = _objectWithoutProperties$c(_ref, _excluded$J);
20463
20421
  var translationOptions = {
20464
20422
  nbHits: nbHits,
20465
20423
  processingTimeMS: processingTimeMS,
@@ -20473,10 +20431,10 @@
20473
20431
  }, translations.rootElementText(translationOptions)));
20474
20432
  }
20475
20433
 
20476
- var _excluded$M = ["translations"];
20434
+ var _excluded$K = ["translations"];
20477
20435
  function Stats$1(_ref) {
20478
20436
  var translations = _ref.translations,
20479
- props = _objectWithoutProperties$e(_ref, _excluded$M);
20437
+ props = _objectWithoutProperties$c(_ref, _excluded$K);
20480
20438
  var _useStats = useStats(undefined, {
20481
20439
  $$widgetType: 'ais.stats'
20482
20440
  }),
@@ -20526,14 +20484,14 @@
20526
20484
  return '';
20527
20485
  }
20528
20486
 
20529
- var _excluded$N = ["classNames", "checked", "onChange", "label"];
20487
+ var _excluded$L = ["classNames", "checked", "onChange", "label"];
20530
20488
  function ToggleRefinement(_ref) {
20531
20489
  var _ref$classNames = _ref.classNames,
20532
20490
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
20533
20491
  checked = _ref.checked,
20534
20492
  _onChange = _ref.onChange,
20535
20493
  label = _ref.label,
20536
- props = _objectWithoutProperties$e(_ref, _excluded$N);
20494
+ props = _objectWithoutProperties$c(_ref, _excluded$L);
20537
20495
  return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
20538
20496
  className: cx('ais-ToggleRefinement', classNames.root, props.className)
20539
20497
  }), /*#__PURE__*/React__default.createElement("label", {
@@ -20550,12 +20508,12 @@
20550
20508
  }, label)));
20551
20509
  }
20552
20510
 
20553
- var _excluded$O = ["attribute", "on", "off"];
20511
+ var _excluded$M = ["attribute", "on", "off"];
20554
20512
  function ToggleRefinement$1(_ref) {
20555
20513
  var attribute = _ref.attribute,
20556
20514
  on = _ref.on,
20557
20515
  off = _ref.off,
20558
- props = _objectWithoutProperties$e(_ref, _excluded$O);
20516
+ props = _objectWithoutProperties$c(_ref, _excluded$M);
20559
20517
  var _useToggleRefinement = useToggleRefinement({
20560
20518
  attribute: attribute,
20561
20519
  on: on,