algolia-experiences 1.1.0 → 1.3.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.
@@ -61,6 +61,28 @@
61
61
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
62
62
  }, _typeof(obj);
63
63
  }
64
+ function _classCallCheck(instance, Constructor) {
65
+ if (!(instance instanceof Constructor)) {
66
+ throw new TypeError("Cannot call a class as a function");
67
+ }
68
+ }
69
+ function _defineProperties(target, props) {
70
+ for (var i = 0; i < props.length; i++) {
71
+ var descriptor = props[i];
72
+ descriptor.enumerable = descriptor.enumerable || false;
73
+ descriptor.configurable = true;
74
+ if ("value" in descriptor) descriptor.writable = true;
75
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
76
+ }
77
+ }
78
+ function _createClass(Constructor, protoProps, staticProps) {
79
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
80
+ if (staticProps) _defineProperties(Constructor, staticProps);
81
+ Object.defineProperty(Constructor, "prototype", {
82
+ writable: false
83
+ });
84
+ return Constructor;
85
+ }
64
86
  function _defineProperty(obj, key, value) {
65
87
  key = _toPropertyKey(key);
66
88
  if (key in obj) {
@@ -75,6 +97,90 @@
75
97
  }
76
98
  return obj;
77
99
  }
100
+ function _inherits(subClass, superClass) {
101
+ if (typeof superClass !== "function" && superClass !== null) {
102
+ throw new TypeError("Super expression must either be null or a function");
103
+ }
104
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
105
+ constructor: {
106
+ value: subClass,
107
+ writable: true,
108
+ configurable: true
109
+ }
110
+ });
111
+ Object.defineProperty(subClass, "prototype", {
112
+ writable: false
113
+ });
114
+ if (superClass) _setPrototypeOf(subClass, superClass);
115
+ }
116
+ function _getPrototypeOf(o) {
117
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
118
+ return o.__proto__ || Object.getPrototypeOf(o);
119
+ };
120
+ return _getPrototypeOf(o);
121
+ }
122
+ function _setPrototypeOf(o, p) {
123
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
124
+ o.__proto__ = p;
125
+ return o;
126
+ };
127
+ return _setPrototypeOf(o, p);
128
+ }
129
+ function _isNativeReflectConstruct() {
130
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
131
+ if (Reflect.construct.sham) return false;
132
+ if (typeof Proxy === "function") return true;
133
+ try {
134
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
135
+ return true;
136
+ } catch (e) {
137
+ return false;
138
+ }
139
+ }
140
+ function _construct(Parent, args, Class) {
141
+ if (_isNativeReflectConstruct()) {
142
+ _construct = Reflect.construct.bind();
143
+ } else {
144
+ _construct = function _construct(Parent, args, Class) {
145
+ var a = [null];
146
+ a.push.apply(a, args);
147
+ var Constructor = Function.bind.apply(Parent, a);
148
+ var instance = new Constructor();
149
+ if (Class) _setPrototypeOf(instance, Class.prototype);
150
+ return instance;
151
+ };
152
+ }
153
+ return _construct.apply(null, arguments);
154
+ }
155
+ function _isNativeFunction(fn) {
156
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
157
+ }
158
+ function _wrapNativeSuper(Class) {
159
+ var _cache = typeof Map === "function" ? new Map() : undefined;
160
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
161
+ if (Class === null || !_isNativeFunction(Class)) return Class;
162
+ if (typeof Class !== "function") {
163
+ throw new TypeError("Super expression must either be null or a function");
164
+ }
165
+ if (typeof _cache !== "undefined") {
166
+ if (_cache.has(Class)) return _cache.get(Class);
167
+ _cache.set(Class, Wrapper);
168
+ }
169
+ function Wrapper() {
170
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
171
+ }
172
+ Wrapper.prototype = Object.create(Class.prototype, {
173
+ constructor: {
174
+ value: Wrapper,
175
+ enumerable: false,
176
+ writable: true,
177
+ configurable: true
178
+ }
179
+ });
180
+ return _setPrototypeOf(Wrapper, Class);
181
+ };
182
+ return _wrapNativeSuper(Class);
183
+ }
78
184
  function _objectWithoutPropertiesLoose(source, excluded) {
79
185
  if (source == null) return {};
80
186
  var target = {};
@@ -102,21 +208,40 @@
102
208
  }
103
209
  return target;
104
210
  }
105
- function _slicedToArray(arr, i) {
106
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
211
+ function _assertThisInitialized(self) {
212
+ if (self === void 0) {
213
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
214
+ }
215
+ return self;
107
216
  }
108
- function _toConsumableArray(arr) {
109
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
217
+ function _possibleConstructorReturn(self, call) {
218
+ if (call && (typeof call === "object" || typeof call === "function")) {
219
+ return call;
220
+ } else if (call !== void 0) {
221
+ throw new TypeError("Derived constructors may only return object or undefined");
222
+ }
223
+ return _assertThisInitialized(self);
110
224
  }
111
- function _arrayWithoutHoles(arr) {
112
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
225
+ function _createSuper(Derived) {
226
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
227
+ return function _createSuperInternal() {
228
+ var Super = _getPrototypeOf(Derived),
229
+ result;
230
+ if (hasNativeReflectConstruct) {
231
+ var NewTarget = _getPrototypeOf(this).constructor;
232
+ result = Reflect.construct(Super, arguments, NewTarget);
233
+ } else {
234
+ result = Super.apply(this, arguments);
235
+ }
236
+ return _possibleConstructorReturn(this, result);
237
+ };
238
+ }
239
+ function _slicedToArray(arr, i) {
240
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
113
241
  }
114
242
  function _arrayWithHoles(arr) {
115
243
  if (Array.isArray(arr)) return arr;
116
244
  }
117
- function _iterableToArray(iter) {
118
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
119
- }
120
245
  function _unsupportedIterableToArray(o, minLen) {
121
246
  if (!o) return;
122
247
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -130,9 +255,6 @@
130
255
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
131
256
  return arr2;
132
257
  }
133
- function _nonIterableSpread() {
134
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
135
- }
136
258
  function _nonIterableRest() {
137
259
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
138
260
  }
@@ -9459,10 +9581,10 @@
9459
9581
  }, {});
9460
9582
  }
9461
9583
 
9462
- function _toConsumableArray$1(arr) {
9463
- return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$1();
9584
+ function _toConsumableArray(arr) {
9585
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread();
9464
9586
  }
9465
- function _nonIterableSpread$1() {
9587
+ function _nonIterableSpread() {
9466
9588
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9467
9589
  }
9468
9590
  function _unsupportedIterableToArray$4(o, minLen) {
@@ -9473,10 +9595,10 @@
9473
9595
  if (n === "Map" || n === "Set") return Array.from(o);
9474
9596
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen);
9475
9597
  }
9476
- function _iterableToArray$1(iter) {
9598
+ function _iterableToArray(iter) {
9477
9599
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9478
9600
  }
9479
- function _arrayWithoutHoles$1(arr) {
9601
+ function _arrayWithoutHoles(arr) {
9480
9602
  if (Array.isArray(arr)) return _arrayLikeToArray$4(arr);
9481
9603
  }
9482
9604
  function _arrayLikeToArray$4(arr, len) {
@@ -9499,7 +9621,7 @@
9499
9621
  // { start: 1, end: 5000, step: 500 }
9500
9622
  // => Array length = (5000 - 1) / 500 = 9.998
9501
9623
  var arrayLength = Math.round((end - start) / limitStep);
9502
- return _toConsumableArray$1(Array(arrayLength)).map(function (_, current) {
9624
+ return _toConsumableArray(Array(arrayLength)).map(function (_, current) {
9503
9625
  return start + current * limitStep;
9504
9626
  });
9505
9627
  }
@@ -9932,10 +10054,10 @@
9932
10054
  function _arrayWithHoles$4(arr) {
9933
10055
  if (Array.isArray(arr)) return arr;
9934
10056
  }
9935
- function _toConsumableArray$2(arr) {
9936
- return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$2();
10057
+ function _toConsumableArray$1(arr) {
10058
+ return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$1();
9937
10059
  }
9938
- function _nonIterableSpread$2() {
10060
+ function _nonIterableSpread$1() {
9939
10061
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9940
10062
  }
9941
10063
  function _unsupportedIterableToArray$5(o, minLen) {
@@ -9946,10 +10068,10 @@
9946
10068
  if (n === "Map" || n === "Set") return Array.from(o);
9947
10069
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen);
9948
10070
  }
9949
- function _iterableToArray$2(iter) {
10071
+ function _iterableToArray$1(iter) {
9950
10072
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9951
10073
  }
9952
- function _arrayWithoutHoles$2(arr) {
10074
+ function _arrayWithoutHoles$1(arr) {
9953
10075
  if (Array.isArray(arr)) return _arrayLikeToArray$5(arr);
9954
10076
  }
9955
10077
  function _arrayLikeToArray$5(arr, len) {
@@ -10006,7 +10128,7 @@
10006
10128
  }).map(function (m) {
10007
10129
  return m.creator;
10008
10130
  });
10009
- instantSearchInstance.unuse.apply(instantSearchInstance, _toConsumableArray$2(existingInsightsMiddlewares));
10131
+ instantSearchInstance.unuse.apply(instantSearchInstance, _toConsumableArray$1(existingInsightsMiddlewares));
10010
10132
  var _getAppIdAndApiKey = getAppIdAndApiKey(instantSearchInstance.client),
10011
10133
  _getAppIdAndApiKey2 = _slicedToArray$4(_getAppIdAndApiKey, 2),
10012
10134
  appId = _getAppIdAndApiKey2[0],
@@ -11154,12 +11276,12 @@
11154
11276
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11155
11277
  }, _typeof$e(obj);
11156
11278
  }
11157
- function _classCallCheck(instance, Constructor) {
11279
+ function _classCallCheck$1(instance, Constructor) {
11158
11280
  if (!(instance instanceof Constructor)) {
11159
11281
  throw new TypeError("Cannot call a class as a function");
11160
11282
  }
11161
11283
  }
11162
- function _defineProperties(target, props) {
11284
+ function _defineProperties$1(target, props) {
11163
11285
  for (var i = 0; i < props.length; i++) {
11164
11286
  var descriptor = props[i];
11165
11287
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11168,9 +11290,9 @@
11168
11290
  Object.defineProperty(target, _toPropertyKey$c(descriptor.key), descriptor);
11169
11291
  }
11170
11292
  }
11171
- function _createClass(Constructor, protoProps, staticProps) {
11172
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
11173
- if (staticProps) _defineProperties(Constructor, staticProps);
11293
+ function _createClass$1(Constructor, protoProps, staticProps) {
11294
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
11295
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
11174
11296
  Object.defineProperty(Constructor, "prototype", {
11175
11297
  writable: false
11176
11298
  });
@@ -11228,7 +11350,7 @@
11228
11350
  dispose = _ref.dispose,
11229
11351
  push = _ref.push,
11230
11352
  cleanUrlOnDispose = _ref.cleanUrlOnDispose;
11231
- _classCallCheck(this, BrowserHistory);
11353
+ _classCallCheck$1(this, BrowserHistory);
11232
11354
  _defineProperty$c(this, "$$type", 'ais.browser');
11233
11355
  /**
11234
11356
  * Transforms a UI state into a title for the page.
@@ -11299,7 +11421,7 @@
11299
11421
  /**
11300
11422
  * Reads the URL and returns a syncable UI search state.
11301
11423
  */
11302
- _createClass(BrowserHistory, [{
11424
+ _createClass$1(BrowserHistory, [{
11303
11425
  key: "read",
11304
11426
  value: function read() {
11305
11427
  return this.parseURL({
@@ -11808,10 +11930,10 @@
11808
11930
  }
11809
11931
  return (hint === "string" ? String : Number)(input);
11810
11932
  }
11811
- function _toConsumableArray$3(arr) {
11812
- return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$3();
11933
+ function _toConsumableArray$2(arr) {
11934
+ return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$2();
11813
11935
  }
11814
- function _nonIterableSpread$3() {
11936
+ function _nonIterableSpread$2() {
11815
11937
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11816
11938
  }
11817
11939
  function _unsupportedIterableToArray$6(o, minLen) {
@@ -11822,10 +11944,10 @@
11822
11944
  if (n === "Map" || n === "Set") return Array.from(o);
11823
11945
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$6(o, minLen);
11824
11946
  }
11825
- function _iterableToArray$3(iter) {
11947
+ function _iterableToArray$2(iter) {
11826
11948
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11827
11949
  }
11828
- function _arrayWithoutHoles$3(arr) {
11950
+ function _arrayWithoutHoles$2(arr) {
11829
11951
  if (Array.isArray(arr)) return _arrayLikeToArray$6(arr);
11830
11952
  }
11831
11953
  function _arrayLikeToArray$6(arr, len) {
@@ -11950,7 +12072,7 @@
11950
12072
  indexId: current.getIndexId(),
11951
12073
  results: current.getResults(),
11952
12074
  helper: current.getHelper()
11953
- }].concat(_toConsumableArray$3(resolveScopedResultsFromWidgets(current.getWidgets()))));
12075
+ }].concat(_toConsumableArray$2(resolveScopedResultsFromWidgets(current.getWidgets()))));
11954
12076
  }, []);
11955
12077
  }
11956
12078
  var index = function index(widgetParams) {
@@ -12234,7 +12356,7 @@
12234
12356
  return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);
12235
12357
  };
12236
12358
  derivedHelper = mainHelper.derive(function () {
12237
- return mergeSearchParameters.apply(void 0, [mainHelper.state].concat(_toConsumableArray$3(resolveSearchParameters(_this3))));
12359
+ return mergeSearchParameters.apply(void 0, [mainHelper.state].concat(_toConsumableArray$2(resolveSearchParameters(_this3))));
12238
12360
  }, function () {
12239
12361
  return _this3.getHelper().recommendState;
12240
12362
  });
@@ -12584,7 +12706,7 @@
12584
12706
  };
12585
12707
  }
12586
12708
 
12587
- var version$1 = '4.74.1';
12709
+ var version$1 = '4.74.2';
12588
12710
 
12589
12711
  function _typeof$j(obj) {
12590
12712
  "@babel/helpers - typeof";
@@ -12616,12 +12738,12 @@
12616
12738
  }
12617
12739
  return target;
12618
12740
  }
12619
- function _classCallCheck$1(instance, Constructor) {
12741
+ function _classCallCheck$2(instance, Constructor) {
12620
12742
  if (!(instance instanceof Constructor)) {
12621
12743
  throw new TypeError("Cannot call a class as a function");
12622
12744
  }
12623
12745
  }
12624
- function _defineProperties$1(target, props) {
12746
+ function _defineProperties$2(target, props) {
12625
12747
  for (var i = 0; i < props.length; i++) {
12626
12748
  var descriptor = props[i];
12627
12749
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12630,15 +12752,15 @@
12630
12752
  Object.defineProperty(target, _toPropertyKey$h(descriptor.key), descriptor);
12631
12753
  }
12632
12754
  }
12633
- function _createClass$1(Constructor, protoProps, staticProps) {
12634
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
12635
- if (staticProps) _defineProperties$1(Constructor, staticProps);
12755
+ function _createClass$2(Constructor, protoProps, staticProps) {
12756
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
12757
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
12636
12758
  Object.defineProperty(Constructor, "prototype", {
12637
12759
  writable: false
12638
12760
  });
12639
12761
  return Constructor;
12640
12762
  }
12641
- function _inherits(subClass, superClass) {
12763
+ function _inherits$1(subClass, superClass) {
12642
12764
  if (typeof superClass !== "function" && superClass !== null) {
12643
12765
  throw new TypeError("Super expression must either be null or a function");
12644
12766
  }
@@ -12652,44 +12774,44 @@
12652
12774
  Object.defineProperty(subClass, "prototype", {
12653
12775
  writable: false
12654
12776
  });
12655
- if (superClass) _setPrototypeOf(subClass, superClass);
12777
+ if (superClass) _setPrototypeOf$1(subClass, superClass);
12656
12778
  }
12657
- function _setPrototypeOf(o, p) {
12658
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
12779
+ function _setPrototypeOf$1(o, p) {
12780
+ _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
12659
12781
  o.__proto__ = p;
12660
12782
  return o;
12661
12783
  };
12662
- return _setPrototypeOf(o, p);
12784
+ return _setPrototypeOf$1(o, p);
12663
12785
  }
12664
- function _createSuper(Derived) {
12665
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
12786
+ function _createSuper$1(Derived) {
12787
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$1();
12666
12788
  return function _createSuperInternal() {
12667
- var Super = _getPrototypeOf(Derived),
12789
+ var Super = _getPrototypeOf$1(Derived),
12668
12790
  result;
12669
12791
  if (hasNativeReflectConstruct) {
12670
- var NewTarget = _getPrototypeOf(this).constructor;
12792
+ var NewTarget = _getPrototypeOf$1(this).constructor;
12671
12793
  result = Reflect.construct(Super, arguments, NewTarget);
12672
12794
  } else {
12673
12795
  result = Super.apply(this, arguments);
12674
12796
  }
12675
- return _possibleConstructorReturn(this, result);
12797
+ return _possibleConstructorReturn$1(this, result);
12676
12798
  };
12677
12799
  }
12678
- function _possibleConstructorReturn(self, call) {
12800
+ function _possibleConstructorReturn$1(self, call) {
12679
12801
  if (call && (_typeof$j(call) === "object" || typeof call === "function")) {
12680
12802
  return call;
12681
12803
  } else if (call !== void 0) {
12682
12804
  throw new TypeError("Derived constructors may only return object or undefined");
12683
12805
  }
12684
- return _assertThisInitialized(self);
12806
+ return _assertThisInitialized$1(self);
12685
12807
  }
12686
- function _assertThisInitialized(self) {
12808
+ function _assertThisInitialized$1(self) {
12687
12809
  if (self === void 0) {
12688
12810
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
12689
12811
  }
12690
12812
  return self;
12691
12813
  }
12692
- function _isNativeReflectConstruct() {
12814
+ function _isNativeReflectConstruct$1() {
12693
12815
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
12694
12816
  if (Reflect.construct.sham) return false;
12695
12817
  if (typeof Proxy === "function") return true;
@@ -12700,11 +12822,11 @@
12700
12822
  return false;
12701
12823
  }
12702
12824
  }
12703
- function _getPrototypeOf(o) {
12704
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
12825
+ function _getPrototypeOf$1(o) {
12826
+ _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
12705
12827
  return o.__proto__ || Object.getPrototypeOf(o);
12706
12828
  };
12707
- return _getPrototypeOf(o);
12829
+ return _getPrototypeOf$1(o);
12708
12830
  }
12709
12831
  function _defineProperty$h(obj, key, value) {
12710
12832
  key = _toPropertyKey$h(key);
@@ -12758,52 +12880,52 @@
12758
12880
  * It emits the 'render' event every time a search is done
12759
12881
  */
12760
12882
  var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
12761
- _inherits(InstantSearch, _EventEmitter);
12762
- var _super = _createSuper(InstantSearch);
12883
+ _inherits$1(InstantSearch, _EventEmitter);
12884
+ var _super = _createSuper$1(InstantSearch);
12763
12885
  function InstantSearch(options) {
12764
12886
  var _this;
12765
- _classCallCheck$1(this, InstantSearch);
12887
+ _classCallCheck$2(this, InstantSearch);
12766
12888
  _this = _super.call(this);
12767
12889
 
12768
12890
  // prevent `render` event listening from causing a warning
12769
- _defineProperty$h(_assertThisInitialized(_this), "client", void 0);
12770
- _defineProperty$h(_assertThisInitialized(_this), "indexName", void 0);
12771
- _defineProperty$h(_assertThisInitialized(_this), "insightsClient", void 0);
12772
- _defineProperty$h(_assertThisInitialized(_this), "onStateChange", null);
12773
- _defineProperty$h(_assertThisInitialized(_this), "future", void 0);
12774
- _defineProperty$h(_assertThisInitialized(_this), "helper", void 0);
12775
- _defineProperty$h(_assertThisInitialized(_this), "mainHelper", void 0);
12776
- _defineProperty$h(_assertThisInitialized(_this), "mainIndex", void 0);
12777
- _defineProperty$h(_assertThisInitialized(_this), "started", void 0);
12778
- _defineProperty$h(_assertThisInitialized(_this), "templatesConfig", void 0);
12779
- _defineProperty$h(_assertThisInitialized(_this), "renderState", {});
12780
- _defineProperty$h(_assertThisInitialized(_this), "_stalledSearchDelay", void 0);
12781
- _defineProperty$h(_assertThisInitialized(_this), "_searchStalledTimer", void 0);
12782
- _defineProperty$h(_assertThisInitialized(_this), "_initialUiState", void 0);
12783
- _defineProperty$h(_assertThisInitialized(_this), "_initialResults", void 0);
12784
- _defineProperty$h(_assertThisInitialized(_this), "_createURL", void 0);
12785
- _defineProperty$h(_assertThisInitialized(_this), "_searchFunction", void 0);
12786
- _defineProperty$h(_assertThisInitialized(_this), "_mainHelperSearch", void 0);
12787
- _defineProperty$h(_assertThisInitialized(_this), "_hasSearchWidget", false);
12788
- _defineProperty$h(_assertThisInitialized(_this), "_hasRecommendWidget", false);
12789
- _defineProperty$h(_assertThisInitialized(_this), "_insights", void 0);
12790
- _defineProperty$h(_assertThisInitialized(_this), "middleware", []);
12791
- _defineProperty$h(_assertThisInitialized(_this), "sendEventToInsights", void 0);
12891
+ _defineProperty$h(_assertThisInitialized$1(_this), "client", void 0);
12892
+ _defineProperty$h(_assertThisInitialized$1(_this), "indexName", void 0);
12893
+ _defineProperty$h(_assertThisInitialized$1(_this), "insightsClient", void 0);
12894
+ _defineProperty$h(_assertThisInitialized$1(_this), "onStateChange", null);
12895
+ _defineProperty$h(_assertThisInitialized$1(_this), "future", void 0);
12896
+ _defineProperty$h(_assertThisInitialized$1(_this), "helper", void 0);
12897
+ _defineProperty$h(_assertThisInitialized$1(_this), "mainHelper", void 0);
12898
+ _defineProperty$h(_assertThisInitialized$1(_this), "mainIndex", void 0);
12899
+ _defineProperty$h(_assertThisInitialized$1(_this), "started", void 0);
12900
+ _defineProperty$h(_assertThisInitialized$1(_this), "templatesConfig", void 0);
12901
+ _defineProperty$h(_assertThisInitialized$1(_this), "renderState", {});
12902
+ _defineProperty$h(_assertThisInitialized$1(_this), "_stalledSearchDelay", void 0);
12903
+ _defineProperty$h(_assertThisInitialized$1(_this), "_searchStalledTimer", void 0);
12904
+ _defineProperty$h(_assertThisInitialized$1(_this), "_initialUiState", void 0);
12905
+ _defineProperty$h(_assertThisInitialized$1(_this), "_initialResults", void 0);
12906
+ _defineProperty$h(_assertThisInitialized$1(_this), "_createURL", void 0);
12907
+ _defineProperty$h(_assertThisInitialized$1(_this), "_searchFunction", void 0);
12908
+ _defineProperty$h(_assertThisInitialized$1(_this), "_mainHelperSearch", void 0);
12909
+ _defineProperty$h(_assertThisInitialized$1(_this), "_hasSearchWidget", false);
12910
+ _defineProperty$h(_assertThisInitialized$1(_this), "_hasRecommendWidget", false);
12911
+ _defineProperty$h(_assertThisInitialized$1(_this), "_insights", void 0);
12912
+ _defineProperty$h(_assertThisInitialized$1(_this), "middleware", []);
12913
+ _defineProperty$h(_assertThisInitialized$1(_this), "sendEventToInsights", void 0);
12792
12914
  /**
12793
12915
  * The status of the search. Can be "idle", "loading", "stalled", or "error".
12794
12916
  */
12795
- _defineProperty$h(_assertThisInitialized(_this), "status", 'idle');
12917
+ _defineProperty$h(_assertThisInitialized$1(_this), "status", 'idle');
12796
12918
  /**
12797
12919
  * The last returned error from the Search API.
12798
12920
  * The error gets cleared when the next valid search response is rendered.
12799
12921
  */
12800
- _defineProperty$h(_assertThisInitialized(_this), "error", undefined);
12801
- _defineProperty$h(_assertThisInitialized(_this), "scheduleSearch", defer(function () {
12922
+ _defineProperty$h(_assertThisInitialized$1(_this), "error", undefined);
12923
+ _defineProperty$h(_assertThisInitialized$1(_this), "scheduleSearch", defer(function () {
12802
12924
  if (_this.started) {
12803
12925
  _this.mainHelper.search();
12804
12926
  }
12805
12927
  }));
12806
- _defineProperty$h(_assertThisInitialized(_this), "scheduleRender", defer(function () {
12928
+ _defineProperty$h(_assertThisInitialized$1(_this), "scheduleRender", defer(function () {
12807
12929
  var _this$mainHelper;
12808
12930
  var shouldResetStatus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
12809
12931
  if (!((_this$mainHelper = _this.mainHelper) !== null && _this$mainHelper !== void 0 && _this$mainHelper.hasPendingRequests())) {
@@ -12815,11 +12937,11 @@
12815
12937
  }
12816
12938
  }
12817
12939
  _this.mainIndex.render({
12818
- instantSearchInstance: _assertThisInitialized(_this)
12940
+ instantSearchInstance: _assertThisInitialized$1(_this)
12819
12941
  });
12820
12942
  _this.emit('render');
12821
12943
  }));
12822
- _defineProperty$h(_assertThisInitialized(_this), "onInternalStateChange", defer(function () {
12944
+ _defineProperty$h(_assertThisInitialized$1(_this), "onInternalStateChange", defer(function () {
12823
12945
  var nextUiState = _this.mainIndex.getWidgetUiState({});
12824
12946
  _this.middleware.forEach(function (_ref) {
12825
12947
  var instance = _ref.instance;
@@ -12913,7 +13035,7 @@
12913
13035
  /**
12914
13036
  * Hooks a middleware into the InstantSearch lifecycle.
12915
13037
  */
12916
- _createClass$1(InstantSearch, [{
13038
+ _createClass$2(InstantSearch, [{
12917
13039
  key: "_isSearchStalled",
12918
13040
  get:
12919
13041
  /**
@@ -13316,12 +13438,17 @@
13316
13438
  return InstantSearch;
13317
13439
  }(events);
13318
13440
 
13319
- function fetchConfiguration(ids, settings) {
13320
- return Promise.all(ids.map(function (id) {
13321
- return getExperience(_objectSpread2({
13322
- id: id
13323
- }, settings));
13324
- }));
13441
+ var cache = new Map();
13442
+ function fetchConfiguration(id, settings) {
13443
+ if (cache.has(id)) {
13444
+ return Promise.resolve(cache.get(id));
13445
+ }
13446
+ return getExperience(_objectSpread2({
13447
+ id: id
13448
+ }, settings)).then(function (experience) {
13449
+ cache.set(id, experience);
13450
+ return experience;
13451
+ });
13325
13452
  }
13326
13453
  var API_BASE = 'https://experiences-main.platform.algolia.net/1';
13327
13454
  function getExperience(_ref2) {
@@ -13374,14 +13501,6 @@
13374
13501
  apiKey: apiKey
13375
13502
  };
13376
13503
  }
13377
- function getElements() {
13378
- var elements = new Map();
13379
- document.querySelectorAll('[data-experience-id]').forEach(function (element) {
13380
- var id = element.dataset.experienceId;
13381
- elements.set(id, element);
13382
- });
13383
- return elements;
13384
- }
13385
13504
 
13386
13505
  function unwrapExports (x) {
13387
13506
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -14114,10 +14233,10 @@
14114
14233
  }
14115
14234
  return (hint === "string" ? String : Number)(input);
14116
14235
  }
14117
- function _toConsumableArray$4(arr) {
14118
- return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$7(arr) || _nonIterableSpread$4();
14236
+ function _toConsumableArray$3(arr) {
14237
+ return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$7(arr) || _nonIterableSpread$3();
14119
14238
  }
14120
- function _nonIterableSpread$4() {
14239
+ function _nonIterableSpread$3() {
14121
14240
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14122
14241
  }
14123
14242
  function _unsupportedIterableToArray$7(o, minLen) {
@@ -14128,10 +14247,10 @@
14128
14247
  if (n === "Map" || n === "Set") return Array.from(o);
14129
14248
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$7(o, minLen);
14130
14249
  }
14131
- function _iterableToArray$4(iter) {
14250
+ function _iterableToArray$3(iter) {
14132
14251
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14133
14252
  }
14134
- function _arrayWithoutHoles$4(arr) {
14253
+ function _arrayWithoutHoles$3(arr) {
14135
14254
  if (Array.isArray(arr)) return _arrayLikeToArray$7(arr);
14136
14255
  }
14137
14256
  function _arrayLikeToArray$7(arr, len) {
@@ -14143,7 +14262,7 @@
14143
14262
  // can not use = {} here, since the template could have different constraints
14144
14263
  defaultTemplates) {
14145
14264
  var templates = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14146
- var allKeys = uniq([].concat(_toConsumableArray$4(Object.keys(defaultTemplates || {})), _toConsumableArray$4(Object.keys(templates))));
14265
+ var allKeys = uniq([].concat(_toConsumableArray$3(Object.keys(defaultTemplates || {})), _toConsumableArray$3(Object.keys(templates))));
14147
14266
  return allKeys.reduce(function (config, key) {
14148
14267
  var defaultTemplate = defaultTemplates ? defaultTemplates[key] : undefined;
14149
14268
  var customTemplate = templates[key];
@@ -15682,10 +15801,10 @@
15682
15801
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
15683
15802
  }, _typeof$o(obj);
15684
15803
  }
15685
- function _toConsumableArray$5(arr) {
15686
- return _arrayWithoutHoles$5(arr) || _iterableToArray$5(arr) || _unsupportedIterableToArray$8(arr) || _nonIterableSpread$5();
15804
+ function _toConsumableArray$4(arr) {
15805
+ return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$8(arr) || _nonIterableSpread$4();
15687
15806
  }
15688
- function _nonIterableSpread$5() {
15807
+ function _nonIterableSpread$4() {
15689
15808
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15690
15809
  }
15691
15810
  function _unsupportedIterableToArray$8(o, minLen) {
@@ -15696,10 +15815,10 @@
15696
15815
  if (n === "Map" || n === "Set") return Array.from(o);
15697
15816
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$8(o, minLen);
15698
15817
  }
15699
- function _iterableToArray$5(iter) {
15818
+ function _iterableToArray$4(iter) {
15700
15819
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
15701
15820
  }
15702
- function _arrayWithoutHoles$5(arr) {
15821
+ function _arrayWithoutHoles$4(arr) {
15703
15822
  if (Array.isArray(arr)) return _arrayLikeToArray$8(arr);
15704
15823
  }
15705
15824
  function _arrayLikeToArray$8(arr, len) {
@@ -15707,12 +15826,12 @@
15707
15826
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
15708
15827
  return arr2;
15709
15828
  }
15710
- function _classCallCheck$2(instance, Constructor) {
15829
+ function _classCallCheck$3(instance, Constructor) {
15711
15830
  if (!(instance instanceof Constructor)) {
15712
15831
  throw new TypeError("Cannot call a class as a function");
15713
15832
  }
15714
15833
  }
15715
- function _defineProperties$2(target, props) {
15834
+ function _defineProperties$3(target, props) {
15716
15835
  for (var i = 0; i < props.length; i++) {
15717
15836
  var descriptor = props[i];
15718
15837
  descriptor.enumerable = descriptor.enumerable || false;
@@ -15721,15 +15840,15 @@
15721
15840
  Object.defineProperty(target, _toPropertyKey$m(descriptor.key), descriptor);
15722
15841
  }
15723
15842
  }
15724
- function _createClass$2(Constructor, protoProps, staticProps) {
15725
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
15726
- if (staticProps) _defineProperties$2(Constructor, staticProps);
15843
+ function _createClass$3(Constructor, protoProps, staticProps) {
15844
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
15845
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
15727
15846
  Object.defineProperty(Constructor, "prototype", {
15728
15847
  writable: false
15729
15848
  });
15730
15849
  return Constructor;
15731
15850
  }
15732
- function _inherits$1(subClass, superClass) {
15851
+ function _inherits$2(subClass, superClass) {
15733
15852
  if (typeof superClass !== "function" && superClass !== null) {
15734
15853
  throw new TypeError("Super expression must either be null or a function");
15735
15854
  }
@@ -15743,44 +15862,44 @@
15743
15862
  Object.defineProperty(subClass, "prototype", {
15744
15863
  writable: false
15745
15864
  });
15746
- if (superClass) _setPrototypeOf$1(subClass, superClass);
15865
+ if (superClass) _setPrototypeOf$2(subClass, superClass);
15747
15866
  }
15748
- function _setPrototypeOf$1(o, p) {
15749
- _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
15867
+ function _setPrototypeOf$2(o, p) {
15868
+ _setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
15750
15869
  o.__proto__ = p;
15751
15870
  return o;
15752
15871
  };
15753
- return _setPrototypeOf$1(o, p);
15872
+ return _setPrototypeOf$2(o, p);
15754
15873
  }
15755
- function _createSuper$1(Derived) {
15756
- var hasNativeReflectConstruct = _isNativeReflectConstruct$1();
15874
+ function _createSuper$2(Derived) {
15875
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$2();
15757
15876
  return function _createSuperInternal() {
15758
- var Super = _getPrototypeOf$1(Derived),
15877
+ var Super = _getPrototypeOf$2(Derived),
15759
15878
  result;
15760
15879
  if (hasNativeReflectConstruct) {
15761
- var NewTarget = _getPrototypeOf$1(this).constructor;
15880
+ var NewTarget = _getPrototypeOf$2(this).constructor;
15762
15881
  result = Reflect.construct(Super, arguments, NewTarget);
15763
15882
  } else {
15764
15883
  result = Super.apply(this, arguments);
15765
15884
  }
15766
- return _possibleConstructorReturn$1(this, result);
15885
+ return _possibleConstructorReturn$2(this, result);
15767
15886
  };
15768
15887
  }
15769
- function _possibleConstructorReturn$1(self, call) {
15888
+ function _possibleConstructorReturn$2(self, call) {
15770
15889
  if (call && (_typeof$o(call) === "object" || typeof call === "function")) {
15771
15890
  return call;
15772
15891
  } else if (call !== void 0) {
15773
15892
  throw new TypeError("Derived constructors may only return object or undefined");
15774
15893
  }
15775
- return _assertThisInitialized$1(self);
15894
+ return _assertThisInitialized$2(self);
15776
15895
  }
15777
- function _assertThisInitialized$1(self) {
15896
+ function _assertThisInitialized$2(self) {
15778
15897
  if (self === void 0) {
15779
15898
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15780
15899
  }
15781
15900
  return self;
15782
15901
  }
15783
- function _isNativeReflectConstruct$1() {
15902
+ function _isNativeReflectConstruct$2() {
15784
15903
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
15785
15904
  if (Reflect.construct.sham) return false;
15786
15905
  if (typeof Proxy === "function") return true;
@@ -15791,11 +15910,11 @@
15791
15910
  return false;
15792
15911
  }
15793
15912
  }
15794
- function _getPrototypeOf$1(o) {
15795
- _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
15913
+ function _getPrototypeOf$2(o) {
15914
+ _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
15796
15915
  return o.__proto__ || Object.getPrototypeOf(o);
15797
15916
  };
15798
- return _getPrototypeOf$1(o);
15917
+ return _getPrototypeOf$2(o);
15799
15918
  }
15800
15919
  function _defineProperty$n(obj, key, value) {
15801
15920
  key = _toPropertyKey$m(key);
@@ -15826,26 +15945,26 @@
15826
15945
  return (hint === "string" ? String : Number)(input);
15827
15946
  }
15828
15947
  var RawHtml = /*#__PURE__*/function (_Component) {
15829
- _inherits$1(RawHtml, _Component);
15830
- var _super = _createSuper$1(RawHtml);
15948
+ _inherits$2(RawHtml, _Component);
15949
+ var _super = _createSuper$2(RawHtml);
15831
15950
  function RawHtml() {
15832
15951
  var _this;
15833
- _classCallCheck$2(this, RawHtml);
15952
+ _classCallCheck$3(this, RawHtml);
15834
15953
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
15835
15954
  args[_key] = arguments[_key];
15836
15955
  }
15837
15956
  _this = _super.call.apply(_super, [this].concat(args));
15838
- _defineProperty$n(_assertThisInitialized$1(_this), "ref", y());
15839
- _defineProperty$n(_assertThisInitialized$1(_this), "nodes", []);
15957
+ _defineProperty$n(_assertThisInitialized$2(_this), "ref", y());
15958
+ _defineProperty$n(_assertThisInitialized$2(_this), "nodes", []);
15840
15959
  return _this;
15841
15960
  }
15842
- _createClass$2(RawHtml, [{
15961
+ _createClass$3(RawHtml, [{
15843
15962
  key: "componentDidMount",
15844
15963
  value: function componentDidMount() {
15845
15964
  var fragment = new DocumentFragment();
15846
15965
  var root = document.createElement('div');
15847
15966
  root.innerHTML = this.props.content;
15848
- this.nodes = _toConsumableArray$5(root.childNodes);
15967
+ this.nodes = _toConsumableArray$4(root.childNodes);
15849
15968
  this.nodes.forEach(function (node) {
15850
15969
  return fragment.appendChild(node);
15851
15970
  });
@@ -15886,13 +16005,13 @@
15886
16005
  };
15887
16006
  // @TODO: Template should be a generic and receive TData to pass to Templates (to avoid TTemplateData to be set as `any`)
15888
16007
  var Template = /*#__PURE__*/function (_Component2) {
15889
- _inherits$1(Template, _Component2);
15890
- var _super2 = _createSuper$1(Template);
16008
+ _inherits$2(Template, _Component2);
16009
+ var _super2 = _createSuper$2(Template);
15891
16010
  function Template() {
15892
- _classCallCheck$2(this, Template);
16011
+ _classCallCheck$3(this, Template);
15893
16012
  return _super2.apply(this, arguments);
15894
16013
  }
15895
- _createClass$2(Template, [{
16014
+ _createClass$3(Template, [{
15896
16015
  key: "shouldComponentUpdate",
15897
16016
  value: function shouldComponentUpdate(nextProps) {
15898
16017
  return !isEqual(this.props.data, nextProps.data) || this.props.templateKey !== nextProps.templateKey || !isEqual(this.props.rootProps, nextProps.rootProps);
@@ -16121,6 +16240,9 @@
16121
16240
  className: cssClasses.link,
16122
16241
  href: createURL(null),
16123
16242
  onClick: function onClick(event) {
16243
+ if (isSpecialClick(event)) {
16244
+ return;
16245
+ }
16124
16246
  event.preventDefault();
16125
16247
  refine(null);
16126
16248
  }
@@ -16141,6 +16263,9 @@
16141
16263
  className: cssClasses.link,
16142
16264
  href: createURL(item.value),
16143
16265
  onClick: function onClick(event) {
16266
+ if (isSpecialClick(event)) {
16267
+ return;
16268
+ }
16144
16269
  event.preventDefault();
16145
16270
  refine(item.value);
16146
16271
  }
@@ -16623,10 +16748,10 @@
16623
16748
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
16624
16749
  }, _typeof$s(obj);
16625
16750
  }
16626
- function _toConsumableArray$6(arr) {
16627
- return _arrayWithoutHoles$6(arr) || _iterableToArray$6(arr) || _unsupportedIterableToArray$a(arr) || _nonIterableSpread$6();
16751
+ function _toConsumableArray$5(arr) {
16752
+ return _arrayWithoutHoles$5(arr) || _iterableToArray$5(arr) || _unsupportedIterableToArray$a(arr) || _nonIterableSpread$5();
16628
16753
  }
16629
- function _nonIterableSpread$6() {
16754
+ function _nonIterableSpread$5() {
16630
16755
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16631
16756
  }
16632
16757
  function _unsupportedIterableToArray$a(o, minLen) {
@@ -16637,10 +16762,10 @@
16637
16762
  if (n === "Map" || n === "Set") return Array.from(o);
16638
16763
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$a(o, minLen);
16639
16764
  }
16640
- function _iterableToArray$6(iter) {
16765
+ function _iterableToArray$5(iter) {
16641
16766
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16642
16767
  }
16643
- function _arrayWithoutHoles$6(arr) {
16768
+ function _arrayWithoutHoles$5(arr) {
16644
16769
  if (Array.isArray(arr)) return _arrayLikeToArray$a(arr);
16645
16770
  }
16646
16771
  function _arrayLikeToArray$a(arr, len) {
@@ -16776,7 +16901,7 @@
16776
16901
  });
16777
16902
  };
16778
16903
  connectorState.createURL = function () {
16779
- return createURL(mergeSearchParameters.apply(void 0, _toConsumableArray$6(connectorState.attributesToClear.map(function (_ref4) {
16904
+ return createURL(mergeSearchParameters.apply(void 0, _toConsumableArray$5(connectorState.attributesToClear.map(function (_ref4) {
16780
16905
  var indexHelper = _ref4.helper,
16781
16906
  items = _ref4.items;
16782
16907
  return clearRefinements({
@@ -17096,10 +17221,10 @@
17096
17221
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
17097
17222
  }, _typeof$v(obj);
17098
17223
  }
17099
- function _toConsumableArray$7(arr) {
17100
- return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7();
17224
+ function _toConsumableArray$6(arr) {
17225
+ return _arrayWithoutHoles$6(arr) || _iterableToArray$6(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$6();
17101
17226
  }
17102
- function _nonIterableSpread$7() {
17227
+ function _nonIterableSpread$6() {
17103
17228
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
17104
17229
  }
17105
17230
  function _unsupportedIterableToArray$b(o, minLen) {
@@ -17110,10 +17235,10 @@
17110
17235
  if (n === "Map" || n === "Set") return Array.from(o);
17111
17236
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$b(o, minLen);
17112
17237
  }
17113
- function _iterableToArray$7(iter) {
17238
+ function _iterableToArray$6(iter) {
17114
17239
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17115
17240
  }
17116
- function _arrayWithoutHoles$7(arr) {
17241
+ function _arrayWithoutHoles$6(arr) {
17117
17242
  if (Array.isArray(arr)) return _arrayLikeToArray$b(arr);
17118
17243
  }
17119
17244
  function _arrayLikeToArray$b(arr, len) {
@@ -17270,7 +17395,7 @@
17270
17395
  };
17271
17396
  var items = getRefinements(results, helper.state, includesQuery).map(normalizeRefinement).filter(filterFunction);
17272
17397
  return items.reduce(function (allItems, currentItem) {
17273
- return [].concat(_toConsumableArray$7(allItems.filter(function (item) {
17398
+ return [].concat(_toConsumableArray$6(allItems.filter(function (item) {
17274
17399
  return item.attribute !== currentItem.attribute;
17275
17400
  })), [{
17276
17401
  indexName: helper.state.index,
@@ -17491,12 +17616,12 @@
17491
17616
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
17492
17617
  }, _typeof$x(obj);
17493
17618
  }
17494
- function _classCallCheck$3(instance, Constructor) {
17619
+ function _classCallCheck$4(instance, Constructor) {
17495
17620
  if (!(instance instanceof Constructor)) {
17496
17621
  throw new TypeError("Cannot call a class as a function");
17497
17622
  }
17498
17623
  }
17499
- function _defineProperties$3(target, props) {
17624
+ function _defineProperties$4(target, props) {
17500
17625
  for (var i = 0; i < props.length; i++) {
17501
17626
  var descriptor = props[i];
17502
17627
  descriptor.enumerable = descriptor.enumerable || false;
@@ -17505,15 +17630,15 @@
17505
17630
  Object.defineProperty(target, _toPropertyKey$v(descriptor.key), descriptor);
17506
17631
  }
17507
17632
  }
17508
- function _createClass$3(Constructor, protoProps, staticProps) {
17509
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
17510
- if (staticProps) _defineProperties$3(Constructor, staticProps);
17633
+ function _createClass$4(Constructor, protoProps, staticProps) {
17634
+ if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
17635
+ if (staticProps) _defineProperties$4(Constructor, staticProps);
17511
17636
  Object.defineProperty(Constructor, "prototype", {
17512
17637
  writable: false
17513
17638
  });
17514
17639
  return Constructor;
17515
17640
  }
17516
- function _inherits$2(subClass, superClass) {
17641
+ function _inherits$3(subClass, superClass) {
17517
17642
  if (typeof superClass !== "function" && superClass !== null) {
17518
17643
  throw new TypeError("Super expression must either be null or a function");
17519
17644
  }
@@ -17527,44 +17652,44 @@
17527
17652
  Object.defineProperty(subClass, "prototype", {
17528
17653
  writable: false
17529
17654
  });
17530
- if (superClass) _setPrototypeOf$2(subClass, superClass);
17655
+ if (superClass) _setPrototypeOf$3(subClass, superClass);
17531
17656
  }
17532
- function _setPrototypeOf$2(o, p) {
17533
- _setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
17657
+ function _setPrototypeOf$3(o, p) {
17658
+ _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
17534
17659
  o.__proto__ = p;
17535
17660
  return o;
17536
17661
  };
17537
- return _setPrototypeOf$2(o, p);
17662
+ return _setPrototypeOf$3(o, p);
17538
17663
  }
17539
- function _createSuper$2(Derived) {
17540
- var hasNativeReflectConstruct = _isNativeReflectConstruct$2();
17664
+ function _createSuper$3(Derived) {
17665
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$3();
17541
17666
  return function _createSuperInternal() {
17542
- var Super = _getPrototypeOf$2(Derived),
17667
+ var Super = _getPrototypeOf$3(Derived),
17543
17668
  result;
17544
17669
  if (hasNativeReflectConstruct) {
17545
- var NewTarget = _getPrototypeOf$2(this).constructor;
17670
+ var NewTarget = _getPrototypeOf$3(this).constructor;
17546
17671
  result = Reflect.construct(Super, arguments, NewTarget);
17547
17672
  } else {
17548
17673
  result = Super.apply(this, arguments);
17549
17674
  }
17550
- return _possibleConstructorReturn$2(this, result);
17675
+ return _possibleConstructorReturn$3(this, result);
17551
17676
  };
17552
17677
  }
17553
- function _possibleConstructorReturn$2(self, call) {
17678
+ function _possibleConstructorReturn$3(self, call) {
17554
17679
  if (call && (_typeof$x(call) === "object" || typeof call === "function")) {
17555
17680
  return call;
17556
17681
  } else if (call !== void 0) {
17557
17682
  throw new TypeError("Derived constructors may only return object or undefined");
17558
17683
  }
17559
- return _assertThisInitialized$2(self);
17684
+ return _assertThisInitialized$3(self);
17560
17685
  }
17561
- function _assertThisInitialized$2(self) {
17686
+ function _assertThisInitialized$3(self) {
17562
17687
  if (self === void 0) {
17563
17688
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
17564
17689
  }
17565
17690
  return self;
17566
17691
  }
17567
- function _isNativeReflectConstruct$2() {
17692
+ function _isNativeReflectConstruct$3() {
17568
17693
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
17569
17694
  if (Reflect.construct.sham) return false;
17570
17695
  if (typeof Proxy === "function") return true;
@@ -17575,11 +17700,11 @@
17575
17700
  return false;
17576
17701
  }
17577
17702
  }
17578
- function _getPrototypeOf$2(o) {
17579
- _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
17703
+ function _getPrototypeOf$3(o) {
17704
+ _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
17580
17705
  return o.__proto__ || Object.getPrototypeOf(o);
17581
17706
  };
17582
- return _getPrototypeOf$2(o);
17707
+ return _getPrototypeOf$3(o);
17583
17708
  }
17584
17709
  function _defineProperty$w(obj, key, value) {
17585
17710
  key = _toPropertyKey$v(key);
@@ -17626,21 +17751,21 @@
17626
17751
  refine: noop
17627
17752
  };
17628
17753
  var SearchBox = /*#__PURE__*/function (_Component) {
17629
- _inherits$2(SearchBox, _Component);
17630
- var _super = _createSuper$2(SearchBox);
17754
+ _inherits$3(SearchBox, _Component);
17755
+ var _super = _createSuper$3(SearchBox);
17631
17756
  function SearchBox() {
17632
17757
  var _this;
17633
- _classCallCheck$3(this, SearchBox);
17758
+ _classCallCheck$4(this, SearchBox);
17634
17759
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
17635
17760
  args[_key] = arguments[_key];
17636
17761
  }
17637
17762
  _this = _super.call.apply(_super, [this].concat(args));
17638
- _defineProperty$w(_assertThisInitialized$2(_this), "state", {
17763
+ _defineProperty$w(_assertThisInitialized$3(_this), "state", {
17639
17764
  query: _this.props.query,
17640
17765
  focused: false
17641
17766
  });
17642
- _defineProperty$w(_assertThisInitialized$2(_this), "input", y());
17643
- _defineProperty$w(_assertThisInitialized$2(_this), "onInput", function (event) {
17767
+ _defineProperty$w(_assertThisInitialized$3(_this), "input", y());
17768
+ _defineProperty$w(_assertThisInitialized$3(_this), "onInput", function (event) {
17644
17769
  var _this$props = _this.props,
17645
17770
  searchAsYouType = _this$props.searchAsYouType,
17646
17771
  refine = _this$props.refine,
@@ -17656,7 +17781,7 @@
17656
17781
  onChange(event);
17657
17782
  }
17658
17783
  });
17659
- _defineProperty$w(_assertThisInitialized$2(_this), "onSubmit", function (event) {
17784
+ _defineProperty$w(_assertThisInitialized$3(_this), "onSubmit", function (event) {
17660
17785
  var _this$props2 = _this.props,
17661
17786
  searchAsYouType = _this$props2.searchAsYouType,
17662
17787
  refine = _this$props2.refine,
@@ -17672,7 +17797,7 @@
17672
17797
  onSubmit(event);
17673
17798
  return false;
17674
17799
  });
17675
- _defineProperty$w(_assertThisInitialized$2(_this), "onReset", function (event) {
17800
+ _defineProperty$w(_assertThisInitialized$3(_this), "onReset", function (event) {
17676
17801
  var _this$props3 = _this.props,
17677
17802
  refine = _this$props3.refine,
17678
17803
  onReset = _this$props3.onReset;
@@ -17686,19 +17811,19 @@
17686
17811
  });
17687
17812
  onReset(event);
17688
17813
  });
17689
- _defineProperty$w(_assertThisInitialized$2(_this), "onBlur", function () {
17814
+ _defineProperty$w(_assertThisInitialized$3(_this), "onBlur", function () {
17690
17815
  _this.setState({
17691
17816
  focused: false
17692
17817
  });
17693
17818
  });
17694
- _defineProperty$w(_assertThisInitialized$2(_this), "onFocus", function () {
17819
+ _defineProperty$w(_assertThisInitialized$3(_this), "onFocus", function () {
17695
17820
  _this.setState({
17696
17821
  focused: true
17697
17822
  });
17698
17823
  });
17699
17824
  return _this;
17700
17825
  }
17701
- _createClass$3(SearchBox, [{
17826
+ _createClass$4(SearchBox, [{
17702
17827
  key: "resetInput",
17703
17828
  value:
17704
17829
  /**
@@ -17928,12 +18053,12 @@
17928
18053
  }
17929
18054
  return target;
17930
18055
  }
17931
- function _classCallCheck$4(instance, Constructor) {
18056
+ function _classCallCheck$5(instance, Constructor) {
17932
18057
  if (!(instance instanceof Constructor)) {
17933
18058
  throw new TypeError("Cannot call a class as a function");
17934
18059
  }
17935
18060
  }
17936
- function _defineProperties$4(target, props) {
18061
+ function _defineProperties$5(target, props) {
17937
18062
  for (var i = 0; i < props.length; i++) {
17938
18063
  var descriptor = props[i];
17939
18064
  descriptor.enumerable = descriptor.enumerable || false;
@@ -17942,15 +18067,15 @@
17942
18067
  Object.defineProperty(target, _toPropertyKey$w(descriptor.key), descriptor);
17943
18068
  }
17944
18069
  }
17945
- function _createClass$4(Constructor, protoProps, staticProps) {
17946
- if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
17947
- if (staticProps) _defineProperties$4(Constructor, staticProps);
18070
+ function _createClass$5(Constructor, protoProps, staticProps) {
18071
+ if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
18072
+ if (staticProps) _defineProperties$5(Constructor, staticProps);
17948
18073
  Object.defineProperty(Constructor, "prototype", {
17949
18074
  writable: false
17950
18075
  });
17951
18076
  return Constructor;
17952
18077
  }
17953
- function _inherits$3(subClass, superClass) {
18078
+ function _inherits$4(subClass, superClass) {
17954
18079
  if (typeof superClass !== "function" && superClass !== null) {
17955
18080
  throw new TypeError("Super expression must either be null or a function");
17956
18081
  }
@@ -17964,44 +18089,44 @@
17964
18089
  Object.defineProperty(subClass, "prototype", {
17965
18090
  writable: false
17966
18091
  });
17967
- if (superClass) _setPrototypeOf$3(subClass, superClass);
18092
+ if (superClass) _setPrototypeOf$4(subClass, superClass);
17968
18093
  }
17969
- function _setPrototypeOf$3(o, p) {
17970
- _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
18094
+ function _setPrototypeOf$4(o, p) {
18095
+ _setPrototypeOf$4 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
17971
18096
  o.__proto__ = p;
17972
18097
  return o;
17973
18098
  };
17974
- return _setPrototypeOf$3(o, p);
18099
+ return _setPrototypeOf$4(o, p);
17975
18100
  }
17976
- function _createSuper$3(Derived) {
17977
- var hasNativeReflectConstruct = _isNativeReflectConstruct$3();
18101
+ function _createSuper$4(Derived) {
18102
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$4();
17978
18103
  return function _createSuperInternal() {
17979
- var Super = _getPrototypeOf$3(Derived),
18104
+ var Super = _getPrototypeOf$4(Derived),
17980
18105
  result;
17981
18106
  if (hasNativeReflectConstruct) {
17982
- var NewTarget = _getPrototypeOf$3(this).constructor;
18107
+ var NewTarget = _getPrototypeOf$4(this).constructor;
17983
18108
  result = Reflect.construct(Super, arguments, NewTarget);
17984
18109
  } else {
17985
18110
  result = Super.apply(this, arguments);
17986
18111
  }
17987
- return _possibleConstructorReturn$3(this, result);
18112
+ return _possibleConstructorReturn$4(this, result);
17988
18113
  };
17989
18114
  }
17990
- function _possibleConstructorReturn$3(self, call) {
18115
+ function _possibleConstructorReturn$4(self, call) {
17991
18116
  if (call && (_typeof$y(call) === "object" || typeof call === "function")) {
17992
18117
  return call;
17993
18118
  } else if (call !== void 0) {
17994
18119
  throw new TypeError("Derived constructors may only return object or undefined");
17995
18120
  }
17996
- return _assertThisInitialized$3(self);
18121
+ return _assertThisInitialized$4(self);
17997
18122
  }
17998
- function _assertThisInitialized$3(self) {
18123
+ function _assertThisInitialized$4(self) {
17999
18124
  if (self === void 0) {
18000
18125
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
18001
18126
  }
18002
18127
  return self;
18003
18128
  }
18004
- function _isNativeReflectConstruct$3() {
18129
+ function _isNativeReflectConstruct$4() {
18005
18130
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
18006
18131
  if (Reflect.construct.sham) return false;
18007
18132
  if (typeof Proxy === "function") return true;
@@ -18012,11 +18137,11 @@
18012
18137
  return false;
18013
18138
  }
18014
18139
  }
18015
- function _getPrototypeOf$3(o) {
18016
- _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
18140
+ function _getPrototypeOf$4(o) {
18141
+ _getPrototypeOf$4 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
18017
18142
  return o.__proto__ || Object.getPrototypeOf(o);
18018
18143
  };
18019
- return _getPrototypeOf$3(o);
18144
+ return _getPrototypeOf$4(o);
18020
18145
  }
18021
18146
  function _defineProperty$x(obj, key, value) {
18022
18147
  key = _toPropertyKey$w(key);
@@ -18057,17 +18182,17 @@
18057
18182
  return facetValue.data !== undefined;
18058
18183
  }
18059
18184
  var RefinementList$1 = /*#__PURE__*/function (_Component) {
18060
- _inherits$3(RefinementList, _Component);
18061
- var _super = _createSuper$3(RefinementList);
18185
+ _inherits$4(RefinementList, _Component);
18186
+ var _super = _createSuper$4(RefinementList);
18062
18187
  function RefinementList() {
18063
18188
  var _this;
18064
- _classCallCheck$4(this, RefinementList);
18189
+ _classCallCheck$5(this, RefinementList);
18065
18190
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
18066
18191
  args[_key] = arguments[_key];
18067
18192
  }
18068
18193
  _this = _super.call.apply(_super, [this].concat(args));
18069
- _defineProperty$x(_assertThisInitialized$3(_this), "searchBox", y());
18070
- _defineProperty$x(_assertThisInitialized$3(_this), "_generateFacetItem", function (facetValue) {
18194
+ _defineProperty$x(_assertThisInitialized$4(_this), "searchBox", y());
18195
+ _defineProperty$x(_assertThisInitialized$4(_this), "_generateFacetItem", function (facetValue) {
18071
18196
  var subItems;
18072
18197
  if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
18073
18198
  var _this$props$cssClasse = _this.props.cssClasses,
@@ -18125,7 +18250,7 @@
18125
18250
  //
18126
18251
  // Finally, we always stop propagation of the event to avoid multiple levels RefinementLists to fail: click
18127
18252
  // on child would click on parent also
18128
- _defineProperty$x(_assertThisInitialized$3(_this), "handleItemClick", function (_ref) {
18253
+ _defineProperty$x(_assertThisInitialized$4(_this), "handleItemClick", function (_ref) {
18129
18254
  var facetValueToRefine = _ref.facetValueToRefine,
18130
18255
  isRefined = _ref.isRefined,
18131
18256
  originalEvent = _ref.originalEvent;
@@ -18160,7 +18285,7 @@
18160
18285
  });
18161
18286
  return _this;
18162
18287
  }
18163
- _createClass$4(RefinementList, [{
18288
+ _createClass$5(RefinementList, [{
18164
18289
  key: "shouldComponentUpdate",
18165
18290
  value: function shouldComponentUpdate(nextProps) {
18166
18291
  var areFacetValuesDifferent = !isEqual(this.props.facetValues, nextProps.facetValues);
@@ -19521,10 +19646,10 @@
19521
19646
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
19522
19647
  }, _typeof$E(obj);
19523
19648
  }
19524
- function _toConsumableArray$8(arr) {
19525
- return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$d(arr) || _nonIterableSpread$8();
19649
+ function _toConsumableArray$7(arr) {
19650
+ return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$d(arr) || _nonIterableSpread$7();
19526
19651
  }
19527
- function _nonIterableSpread$8() {
19652
+ function _nonIterableSpread$7() {
19528
19653
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19529
19654
  }
19530
19655
  function _unsupportedIterableToArray$d(o, minLen) {
@@ -19535,10 +19660,10 @@
19535
19660
  if (n === "Map" || n === "Set") return Array.from(o);
19536
19661
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$d(o, minLen);
19537
19662
  }
19538
- function _iterableToArray$8(iter) {
19663
+ function _iterableToArray$7(iter) {
19539
19664
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
19540
19665
  }
19541
- function _arrayWithoutHoles$8(arr) {
19666
+ function _arrayWithoutHoles$7(arr) {
19542
19667
  if (Array.isArray(arr)) return _arrayLikeToArray$d(arr);
19543
19668
  }
19544
19669
  function _arrayLikeToArray$d(arr, len) {
@@ -19666,7 +19791,7 @@
19666
19791
  {
19667
19792
  value: '',
19668
19793
  label: ''
19669
- }].concat(_toConsumableArray$8(items));
19794
+ }].concat(_toConsumableArray$7(items));
19670
19795
  }
19671
19796
  renderFn(_objectSpread$B(_objectSpread$B({}, this.getWidgetRenderState(initOptions)), {}, {
19672
19797
  instantSearchInstance: instantSearchInstance
@@ -20101,10 +20226,10 @@
20101
20226
  }
20102
20227
  return (hint === "string" ? String : Number)(input);
20103
20228
  }
20104
- function _toConsumableArray$9(arr) {
20105
- return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$9();
20229
+ function _toConsumableArray$8(arr) {
20230
+ return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8();
20106
20231
  }
20107
- function _nonIterableSpread$9() {
20232
+ function _nonIterableSpread$8() {
20108
20233
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
20109
20234
  }
20110
20235
  function _unsupportedIterableToArray$e(o, minLen) {
@@ -20115,10 +20240,10 @@
20115
20240
  if (n === "Map" || n === "Set") return Array.from(o);
20116
20241
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$e(o, minLen);
20117
20242
  }
20118
- function _iterableToArray$9(iter) {
20243
+ function _iterableToArray$8(iter) {
20119
20244
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
20120
20245
  }
20121
- function _arrayWithoutHoles$9(arr) {
20246
+ function _arrayWithoutHoles$8(arr) {
20122
20247
  if (Array.isArray(arr)) return _arrayLikeToArray$e(arr);
20123
20248
  }
20124
20249
  function _arrayLikeToArray$e(arr, len) {
@@ -20217,7 +20342,7 @@
20217
20342
  if (pages.length === 0) {
20218
20343
  return page;
20219
20344
  } else {
20220
- return Math.min.apply(Math, [page].concat(_toConsumableArray$9(pages)));
20345
+ return Math.min.apply(Math, [page].concat(_toConsumableArray$8(pages)));
20221
20346
  }
20222
20347
  };
20223
20348
  var getLastReceivedPage = function getLastReceivedPage(state, cachedHits) {
@@ -20227,7 +20352,7 @@
20227
20352
  if (pages.length === 0) {
20228
20353
  return page;
20229
20354
  } else {
20230
- return Math.max.apply(Math, [page].concat(_toConsumableArray$9(pages)));
20355
+ return Math.max.apply(Math, [page].concat(_toConsumableArray$8(pages)));
20231
20356
  }
20232
20357
  };
20233
20358
  var getShowPrevious = function getShowPrevious(helper) {
@@ -21828,12 +21953,12 @@
21828
21953
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
21829
21954
  }, _typeof$N(obj);
21830
21955
  }
21831
- function _classCallCheck$5(instance, Constructor) {
21956
+ function _classCallCheck$6(instance, Constructor) {
21832
21957
  if (!(instance instanceof Constructor)) {
21833
21958
  throw new TypeError("Cannot call a class as a function");
21834
21959
  }
21835
21960
  }
21836
- function _defineProperties$5(target, props) {
21961
+ function _defineProperties$6(target, props) {
21837
21962
  for (var i = 0; i < props.length; i++) {
21838
21963
  var descriptor = props[i];
21839
21964
  descriptor.enumerable = descriptor.enumerable || false;
@@ -21842,9 +21967,9 @@
21842
21967
  Object.defineProperty(target, _toPropertyKey$L(descriptor.key), descriptor);
21843
21968
  }
21844
21969
  }
21845
- function _createClass$5(Constructor, protoProps, staticProps) {
21846
- if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
21847
- if (staticProps) _defineProperties$5(Constructor, staticProps);
21970
+ function _createClass$6(Constructor, protoProps, staticProps) {
21971
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
21972
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
21848
21973
  Object.defineProperty(Constructor, "prototype", {
21849
21974
  writable: false
21850
21975
  });
@@ -21880,7 +22005,7 @@
21880
22005
  }
21881
22006
  var Paginator = /*#__PURE__*/function () {
21882
22007
  function Paginator(params) {
21883
- _classCallCheck$5(this, Paginator);
22008
+ _classCallCheck$6(this, Paginator);
21884
22009
  _defineProperty$M(this, "currentPage", void 0);
21885
22010
  _defineProperty$M(this, "total", void 0);
21886
22011
  _defineProperty$M(this, "padding", void 0);
@@ -21888,7 +22013,7 @@
21888
22013
  this.total = params.total;
21889
22014
  this.padding = params.padding;
21890
22015
  }
21891
- _createClass$5(Paginator, [{
22016
+ _createClass$6(Paginator, [{
21892
22017
  key: "pages",
21893
22018
  value: function pages() {
21894
22019
  var total = this.total,
@@ -22998,12 +23123,12 @@
22998
23123
  };
22999
23124
  return _extends$i.apply(this, arguments);
23000
23125
  }
23001
- function _classCallCheck$6(instance, Constructor) {
23126
+ function _classCallCheck$7(instance, Constructor) {
23002
23127
  if (!(instance instanceof Constructor)) {
23003
23128
  throw new TypeError("Cannot call a class as a function");
23004
23129
  }
23005
23130
  }
23006
- function _defineProperties$6(target, props) {
23131
+ function _defineProperties$7(target, props) {
23007
23132
  for (var i = 0; i < props.length; i++) {
23008
23133
  var descriptor = props[i];
23009
23134
  descriptor.enumerable = descriptor.enumerable || false;
@@ -23012,15 +23137,15 @@
23012
23137
  Object.defineProperty(target, _toPropertyKey$R(descriptor.key), descriptor);
23013
23138
  }
23014
23139
  }
23015
- function _createClass$6(Constructor, protoProps, staticProps) {
23016
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
23017
- if (staticProps) _defineProperties$6(Constructor, staticProps);
23140
+ function _createClass$7(Constructor, protoProps, staticProps) {
23141
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
23142
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
23018
23143
  Object.defineProperty(Constructor, "prototype", {
23019
23144
  writable: false
23020
23145
  });
23021
23146
  return Constructor;
23022
23147
  }
23023
- function _inherits$4(subClass, superClass) {
23148
+ function _inherits$5(subClass, superClass) {
23024
23149
  if (typeof superClass !== "function" && superClass !== null) {
23025
23150
  throw new TypeError("Super expression must either be null or a function");
23026
23151
  }
@@ -23034,44 +23159,44 @@
23034
23159
  Object.defineProperty(subClass, "prototype", {
23035
23160
  writable: false
23036
23161
  });
23037
- if (superClass) _setPrototypeOf$4(subClass, superClass);
23162
+ if (superClass) _setPrototypeOf$5(subClass, superClass);
23038
23163
  }
23039
- function _setPrototypeOf$4(o, p) {
23040
- _setPrototypeOf$4 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
23164
+ function _setPrototypeOf$5(o, p) {
23165
+ _setPrototypeOf$5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
23041
23166
  o.__proto__ = p;
23042
23167
  return o;
23043
23168
  };
23044
- return _setPrototypeOf$4(o, p);
23169
+ return _setPrototypeOf$5(o, p);
23045
23170
  }
23046
- function _createSuper$4(Derived) {
23047
- var hasNativeReflectConstruct = _isNativeReflectConstruct$4();
23171
+ function _createSuper$5(Derived) {
23172
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$5();
23048
23173
  return function _createSuperInternal() {
23049
- var Super = _getPrototypeOf$4(Derived),
23174
+ var Super = _getPrototypeOf$5(Derived),
23050
23175
  result;
23051
23176
  if (hasNativeReflectConstruct) {
23052
- var NewTarget = _getPrototypeOf$4(this).constructor;
23177
+ var NewTarget = _getPrototypeOf$5(this).constructor;
23053
23178
  result = Reflect.construct(Super, arguments, NewTarget);
23054
23179
  } else {
23055
23180
  result = Super.apply(this, arguments);
23056
23181
  }
23057
- return _possibleConstructorReturn$4(this, result);
23182
+ return _possibleConstructorReturn$5(this, result);
23058
23183
  };
23059
23184
  }
23060
- function _possibleConstructorReturn$4(self, call) {
23185
+ function _possibleConstructorReturn$5(self, call) {
23061
23186
  if (call && (_typeof$T(call) === "object" || typeof call === "function")) {
23062
23187
  return call;
23063
23188
  } else if (call !== void 0) {
23064
23189
  throw new TypeError("Derived constructors may only return object or undefined");
23065
23190
  }
23066
- return _assertThisInitialized$4(self);
23191
+ return _assertThisInitialized$5(self);
23067
23192
  }
23068
- function _assertThisInitialized$4(self) {
23193
+ function _assertThisInitialized$5(self) {
23069
23194
  if (self === void 0) {
23070
23195
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
23071
23196
  }
23072
23197
  return self;
23073
23198
  }
23074
- function _isNativeReflectConstruct$4() {
23199
+ function _isNativeReflectConstruct$5() {
23075
23200
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
23076
23201
  if (Reflect.construct.sham) return false;
23077
23202
  if (typeof Proxy === "function") return true;
@@ -23082,11 +23207,11 @@
23082
23207
  return false;
23083
23208
  }
23084
23209
  }
23085
- function _getPrototypeOf$4(o) {
23086
- _getPrototypeOf$4 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
23210
+ function _getPrototypeOf$5(o) {
23211
+ _getPrototypeOf$5 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
23087
23212
  return o.__proto__ || Object.getPrototypeOf(o);
23088
23213
  };
23089
- return _getPrototypeOf$4(o);
23214
+ return _getPrototypeOf$5(o);
23090
23215
  }
23091
23216
  function _defineProperty$S(obj, key, value) {
23092
23217
  key = _toPropertyKey$R(key);
@@ -23123,28 +23248,28 @@
23123
23248
  });
23124
23249
  }
23125
23250
  var RangeInput = /*#__PURE__*/function (_Component) {
23126
- _inherits$4(RangeInput, _Component);
23127
- var _super = _createSuper$4(RangeInput);
23251
+ _inherits$5(RangeInput, _Component);
23252
+ var _super = _createSuper$5(RangeInput);
23128
23253
  function RangeInput() {
23129
23254
  var _this$props$values$mi, _this$props$values$ma;
23130
23255
  var _this;
23131
- _classCallCheck$6(this, RangeInput);
23256
+ _classCallCheck$7(this, RangeInput);
23132
23257
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23133
23258
  args[_key] = arguments[_key];
23134
23259
  }
23135
23260
  _this = _super.call.apply(_super, [this].concat(args));
23136
- _defineProperty$S(_assertThisInitialized$4(_this), "state", {
23261
+ _defineProperty$S(_assertThisInitialized$5(_this), "state", {
23137
23262
  min: (_this$props$values$mi = _this.props.values.min) === null || _this$props$values$mi === void 0 ? void 0 : _this$props$values$mi.toString(),
23138
23263
  max: (_this$props$values$ma = _this.props.values.max) === null || _this$props$values$ma === void 0 ? void 0 : _this$props$values$ma.toString()
23139
23264
  });
23140
- _defineProperty$S(_assertThisInitialized$4(_this), "onInput", function (key) {
23265
+ _defineProperty$S(_assertThisInitialized$5(_this), "onInput", function (key) {
23141
23266
  return function (event) {
23142
23267
  var _ref = event.currentTarget,
23143
23268
  value = _ref.value;
23144
23269
  _this.setState(_defineProperty$S({}, key, value));
23145
23270
  };
23146
23271
  });
23147
- _defineProperty$S(_assertThisInitialized$4(_this), "onSubmit", function (event) {
23272
+ _defineProperty$S(_assertThisInitialized$5(_this), "onSubmit", function (event) {
23148
23273
  event.preventDefault();
23149
23274
  var _this$state = _this.state,
23150
23275
  min = _this$state.min,
@@ -23153,7 +23278,7 @@
23153
23278
  });
23154
23279
  return _this;
23155
23280
  }
23156
- _createClass$6(RangeInput, [{
23281
+ _createClass$7(RangeInput, [{
23157
23282
  key: "componentWillReceiveProps",
23158
23283
  value: function componentWillReceiveProps(nextProps) {
23159
23284
  var _nextProps$values$min, _nextProps$values$max;
@@ -23917,7 +24042,7 @@
23917
24042
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
23918
24043
  }, _typeof$X(obj);
23919
24044
  }
23920
- function _defineProperties$7(target, props) {
24045
+ function _defineProperties$8(target, props) {
23921
24046
  for (var i = 0; i < props.length; i++) {
23922
24047
  var descriptor = props[i];
23923
24048
  descriptor.enumerable = descriptor.enumerable || false;
@@ -23926,20 +24051,20 @@
23926
24051
  Object.defineProperty(target, _toPropertyKey$V(descriptor.key), descriptor);
23927
24052
  }
23928
24053
  }
23929
- function _createClass$7(Constructor, protoProps, staticProps) {
23930
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
23931
- if (staticProps) _defineProperties$7(Constructor, staticProps);
24054
+ function _createClass$8(Constructor, protoProps, staticProps) {
24055
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
24056
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
23932
24057
  Object.defineProperty(Constructor, "prototype", {
23933
24058
  writable: false
23934
24059
  });
23935
24060
  return Constructor;
23936
24061
  }
23937
- function _classCallCheck$7(instance, Constructor) {
24062
+ function _classCallCheck$8(instance, Constructor) {
23938
24063
  if (!(instance instanceof Constructor)) {
23939
24064
  throw new TypeError("Cannot call a class as a function");
23940
24065
  }
23941
24066
  }
23942
- function _inherits$5(subClass, superClass) {
24067
+ function _inherits$6(subClass, superClass) {
23943
24068
  if (typeof superClass !== "function" && superClass !== null) {
23944
24069
  throw new TypeError("Super expression must either be null or a function");
23945
24070
  }
@@ -23953,44 +24078,44 @@
23953
24078
  Object.defineProperty(subClass, "prototype", {
23954
24079
  writable: false
23955
24080
  });
23956
- if (superClass) _setPrototypeOf$5(subClass, superClass);
24081
+ if (superClass) _setPrototypeOf$6(subClass, superClass);
23957
24082
  }
23958
- function _setPrototypeOf$5(o, p) {
23959
- _setPrototypeOf$5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
24083
+ function _setPrototypeOf$6(o, p) {
24084
+ _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
23960
24085
  o.__proto__ = p;
23961
24086
  return o;
23962
24087
  };
23963
- return _setPrototypeOf$5(o, p);
24088
+ return _setPrototypeOf$6(o, p);
23964
24089
  }
23965
- function _createSuper$5(Derived) {
23966
- var hasNativeReflectConstruct = _isNativeReflectConstruct$5();
24090
+ function _createSuper$6(Derived) {
24091
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$6();
23967
24092
  return function _createSuperInternal() {
23968
- var Super = _getPrototypeOf$5(Derived),
24093
+ var Super = _getPrototypeOf$6(Derived),
23969
24094
  result;
23970
24095
  if (hasNativeReflectConstruct) {
23971
- var NewTarget = _getPrototypeOf$5(this).constructor;
24096
+ var NewTarget = _getPrototypeOf$6(this).constructor;
23972
24097
  result = Reflect.construct(Super, arguments, NewTarget);
23973
24098
  } else {
23974
24099
  result = Super.apply(this, arguments);
23975
24100
  }
23976
- return _possibleConstructorReturn$5(this, result);
24101
+ return _possibleConstructorReturn$6(this, result);
23977
24102
  };
23978
24103
  }
23979
- function _possibleConstructorReturn$5(self, call) {
24104
+ function _possibleConstructorReturn$6(self, call) {
23980
24105
  if (call && (_typeof$X(call) === "object" || typeof call === "function")) {
23981
24106
  return call;
23982
24107
  } else if (call !== void 0) {
23983
24108
  throw new TypeError("Derived constructors may only return object or undefined");
23984
24109
  }
23985
- return _assertThisInitialized$5(self);
24110
+ return _assertThisInitialized$6(self);
23986
24111
  }
23987
- function _assertThisInitialized$5(self) {
24112
+ function _assertThisInitialized$6(self) {
23988
24113
  if (self === void 0) {
23989
24114
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
23990
24115
  }
23991
24116
  return self;
23992
24117
  }
23993
- function _isNativeReflectConstruct$5() {
24118
+ function _isNativeReflectConstruct$6() {
23994
24119
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
23995
24120
  if (Reflect.construct.sham) return false;
23996
24121
  if (typeof Proxy === "function") return true;
@@ -24001,11 +24126,11 @@
24001
24126
  return false;
24002
24127
  }
24003
24128
  }
24004
- function _getPrototypeOf$5(o) {
24005
- _getPrototypeOf$5 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
24129
+ function _getPrototypeOf$6(o) {
24130
+ _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
24006
24131
  return o.__proto__ || Object.getPrototypeOf(o);
24007
24132
  };
24008
- return _getPrototypeOf$5(o);
24133
+ return _getPrototypeOf$6(o);
24009
24134
  }
24010
24135
  function _defineProperty$W(obj, key, value) {
24011
24136
  key = _toPropertyKey$V(key);
@@ -24097,19 +24222,19 @@
24097
24222
  className: "rheostat-background"
24098
24223
  });
24099
24224
  var Rheostat = /*#__PURE__*/function (_Component) {
24100
- _inherits$5(Rheostat, _Component);
24101
- var _super = _createSuper$5(Rheostat);
24225
+ _inherits$6(Rheostat, _Component);
24226
+ var _super = _createSuper$6(Rheostat);
24102
24227
  function Rheostat() {
24103
24228
  var _this;
24104
- _classCallCheck$7(this, Rheostat);
24229
+ _classCallCheck$8(this, Rheostat);
24105
24230
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24106
24231
  args[_key] = arguments[_key];
24107
24232
  }
24108
24233
  _this = _super.call.apply(_super, [this].concat(args));
24109
- _defineProperty$W(_assertThisInitialized$5(_this), "x", [0, 0].map(function (y) {
24234
+ _defineProperty$W(_assertThisInitialized$6(_this), "x", [0, 0].map(function (y) {
24110
24235
  return y;
24111
24236
  }));
24112
- _defineProperty$W(_assertThisInitialized$5(_this), "state", {
24237
+ _defineProperty$W(_assertThisInitialized$6(_this), "state", {
24113
24238
  className: getClassName(_this.props),
24114
24239
  // non-null thanks to defaultProps
24115
24240
  handlePos: _this.props.values.map(function (value) {
@@ -24122,8 +24247,8 @@
24122
24247
  // non-null thanks to defaultProps
24123
24248
  values: _this.props.values
24124
24249
  });
24125
- _defineProperty$W(_assertThisInitialized$5(_this), "rheostat", y());
24126
- _defineProperty$W(_assertThisInitialized$5(_this), "componentWillReceiveProps", function (nextProps) {
24250
+ _defineProperty$W(_assertThisInitialized$6(_this), "rheostat", y());
24251
+ _defineProperty$W(_assertThisInitialized$6(_this), "componentWillReceiveProps", function (nextProps) {
24127
24252
  var _this$props = _this.props,
24128
24253
  className = _this$props.className,
24129
24254
  disabled = _this$props.disabled,
@@ -24149,7 +24274,7 @@
24149
24274
  _this.endSlide();
24150
24275
  }
24151
24276
  });
24152
- _defineProperty$W(_assertThisInitialized$5(_this), "getPublicState", function () {
24277
+ _defineProperty$W(_assertThisInitialized$6(_this), "getPublicState", function () {
24153
24278
  var _this$props2 = _this.props,
24154
24279
  min = _this$props2.min,
24155
24280
  max = _this$props2.max;
@@ -24160,7 +24285,7 @@
24160
24285
  values: values
24161
24286
  };
24162
24287
  });
24163
- _defineProperty$W(_assertThisInitialized$5(_this), "getSliderBoundingBox", function () {
24288
+ _defineProperty$W(_assertThisInitialized$6(_this), "getSliderBoundingBox", function () {
24164
24289
  // only gets called after render, so it will always be defined
24165
24290
  var node = _this.rheostat.current;
24166
24291
  var rect = node.getBoundingClientRect();
@@ -24171,7 +24296,7 @@
24171
24296
  width: rect.width || node.clientWidth
24172
24297
  };
24173
24298
  });
24174
- _defineProperty$W(_assertThisInitialized$5(_this), "getProgressStyle", function (idx) {
24299
+ _defineProperty$W(_assertThisInitialized$6(_this), "getProgressStyle", function (idx) {
24175
24300
  var handlePos = _this.state.handlePos;
24176
24301
  var value = handlePos[idx];
24177
24302
  if (idx === 0) {
@@ -24193,25 +24318,25 @@
24193
24318
  width: "".concat(diffValue, "%")
24194
24319
  };
24195
24320
  });
24196
- _defineProperty$W(_assertThisInitialized$5(_this), "getMinValue", function (idx) {
24321
+ _defineProperty$W(_assertThisInitialized$6(_this), "getMinValue", function (idx) {
24197
24322
  return _this.state.values[idx - 1] ? Math.max(_this.props.min, _this.state.values[idx - 1]) : _this.props.min;
24198
24323
  });
24199
- _defineProperty$W(_assertThisInitialized$5(_this), "getMaxValue", function (idx) {
24324
+ _defineProperty$W(_assertThisInitialized$6(_this), "getMaxValue", function (idx) {
24200
24325
  return _this.state.values[idx + 1] ? Math.min(_this.props.max, _this.state.values[idx + 1]) : _this.props.max;
24201
24326
  });
24202
- _defineProperty$W(_assertThisInitialized$5(_this), "getHandleDimensions", function (ev, sliderBox) {
24327
+ _defineProperty$W(_assertThisInitialized$6(_this), "getHandleDimensions", function (ev, sliderBox) {
24203
24328
  var handleNode = ev.currentTarget || null;
24204
24329
  if (!handleNode) return 0;
24205
24330
  return _this.props.orientation === 'vertical' ? handleNode.clientHeight / sliderBox.height * PERCENT_FULL / 2 : handleNode.clientWidth / sliderBox.width * PERCENT_FULL / 2;
24206
24331
  });
24207
- _defineProperty$W(_assertThisInitialized$5(_this), "getClosestSnapPoint", function (value) {
24332
+ _defineProperty$W(_assertThisInitialized$6(_this), "getClosestSnapPoint", function (value) {
24208
24333
  // non-null thanks to defaultProps
24209
24334
  if (!_this.props.snapPoints.length) return value;
24210
24335
  return _this.props.snapPoints.reduce(function (snapTo, snap) {
24211
24336
  return Math.abs(snapTo - value) < Math.abs(snap - value) ? snapTo : snap;
24212
24337
  });
24213
24338
  });
24214
- _defineProperty$W(_assertThisInitialized$5(_this), "getSnapPosition", function (positionPercent) {
24339
+ _defineProperty$W(_assertThisInitialized$6(_this), "getSnapPosition", function (positionPercent) {
24215
24340
  if (!_this.props.snap) return positionPercent;
24216
24341
  var _ref = _this.props,
24217
24342
  max = _ref.max,
@@ -24220,7 +24345,7 @@
24220
24345
  var snapValue = _this.getClosestSnapPoint(value);
24221
24346
  return getPosition(snapValue, min, max);
24222
24347
  });
24223
- _defineProperty$W(_assertThisInitialized$5(_this), "getNextPositionForKey", function (idx, keyCode) {
24348
+ _defineProperty$W(_assertThisInitialized$6(_this), "getNextPositionForKey", function (idx, keyCode) {
24224
24349
  var _stepMultiplier;
24225
24350
  var _this$state2 = _this.state,
24226
24351
  handlePos = _this$state2.handlePos,
@@ -24284,7 +24409,7 @@
24284
24409
  }
24285
24410
  return shouldSnap ? getPosition(proposedValue, min, max) : proposedPercentage;
24286
24411
  });
24287
- _defineProperty$W(_assertThisInitialized$5(_this), "getNextState", function (idx, proposedPosition) {
24412
+ _defineProperty$W(_assertThisInitialized$6(_this), "getNextState", function (idx, proposedPosition) {
24288
24413
  var handlePos = _this.state.handlePos;
24289
24414
  var _ref3 = _this.props,
24290
24415
  max = _ref3.max,
@@ -24300,7 +24425,7 @@
24300
24425
  })
24301
24426
  };
24302
24427
  });
24303
- _defineProperty$W(_assertThisInitialized$5(_this), "getClosestHandle", function (positionPercent) {
24428
+ _defineProperty$W(_assertThisInitialized$6(_this), "getClosestHandle", function (positionPercent) {
24304
24429
  var handlePos = _this.state.handlePos;
24305
24430
  return handlePos.reduce(function (closestIdx, _node, idx) {
24306
24431
  var challenger = Math.abs(handlePos[idx] - positionPercent);
@@ -24308,7 +24433,7 @@
24308
24433
  return challenger < current ? idx : closestIdx;
24309
24434
  }, 0);
24310
24435
  });
24311
- _defineProperty$W(_assertThisInitialized$5(_this), "setStartSlide", function (ev, x, y) {
24436
+ _defineProperty$W(_assertThisInitialized$6(_this), "setStartSlide", function (ev, x, y) {
24312
24437
  var sliderBox = _this.getSliderBoundingBox();
24313
24438
  _this.setState({
24314
24439
  handleDimensions: _this.getHandleDimensions(ev, sliderBox),
@@ -24320,13 +24445,13 @@
24320
24445
  slidingIndex: getHandleFor(ev)
24321
24446
  });
24322
24447
  });
24323
- _defineProperty$W(_assertThisInitialized$5(_this), "startMouseSlide", function (ev) {
24448
+ _defineProperty$W(_assertThisInitialized$6(_this), "startMouseSlide", function (ev) {
24324
24449
  _this.setStartSlide(ev, ev.clientX, ev.clientY);
24325
24450
  document.addEventListener('mousemove', _this.handleMouseSlide, false);
24326
24451
  document.addEventListener('mouseup', _this.endSlide, false);
24327
24452
  killEvent(ev);
24328
24453
  });
24329
- _defineProperty$W(_assertThisInitialized$5(_this), "startTouchSlide", function (ev) {
24454
+ _defineProperty$W(_assertThisInitialized$6(_this), "startTouchSlide", function (ev) {
24330
24455
  if (ev.changedTouches.length > 1) return;
24331
24456
  var touch = ev.changedTouches[0];
24332
24457
  _this.setStartSlide(ev, touch.clientX, touch.clientY);
@@ -24335,12 +24460,12 @@
24335
24460
  if (_this.props.onSliderDragStart) _this.props.onSliderDragStart();
24336
24461
  killEvent(ev);
24337
24462
  });
24338
- _defineProperty$W(_assertThisInitialized$5(_this), "handleMouseSlide", function (ev) {
24463
+ _defineProperty$W(_assertThisInitialized$6(_this), "handleMouseSlide", function (ev) {
24339
24464
  if (_this.state.slidingIndex === null) return;
24340
24465
  _this.handleSlide(ev.clientX, ev.clientY);
24341
24466
  killEvent(ev);
24342
24467
  });
24343
- _defineProperty$W(_assertThisInitialized$5(_this), "handleTouchSlide", function (ev) {
24468
+ _defineProperty$W(_assertThisInitialized$6(_this), "handleTouchSlide", function (ev) {
24344
24469
  if (_this.state.slidingIndex === null) return;
24345
24470
  if (ev.changedTouches.length > 1) {
24346
24471
  _this.endSlide();
@@ -24350,7 +24475,7 @@
24350
24475
  _this.handleSlide(touch.clientX, touch.clientY);
24351
24476
  killEvent(ev);
24352
24477
  });
24353
- _defineProperty$W(_assertThisInitialized$5(_this), "handleSlide", function (x, y) {
24478
+ _defineProperty$W(_assertThisInitialized$6(_this), "handleSlide", function (x, y) {
24354
24479
  var _this$state3 = _this.state,
24355
24480
  idx = _this$state3.slidingIndex,
24356
24481
  sliderBox = _this$state3.sliderBox;
@@ -24367,7 +24492,7 @@
24367
24492
  if (_this.props.onSliderDragMove) _this.props.onSliderDragMove();
24368
24493
  }
24369
24494
  });
24370
- _defineProperty$W(_assertThisInitialized$5(_this), "endSlide", function () {
24495
+ _defineProperty$W(_assertThisInitialized$6(_this), "endSlide", function () {
24371
24496
  var idx = _this.state.slidingIndex;
24372
24497
  _this.setState({
24373
24498
  slidingIndex: null
@@ -24386,7 +24511,7 @@
24386
24511
  _this.fireChangeEvent();
24387
24512
  }
24388
24513
  });
24389
- _defineProperty$W(_assertThisInitialized$5(_this), "handleClick", function (ev) {
24514
+ _defineProperty$W(_assertThisInitialized$6(_this), "handleClick", function (ev) {
24390
24515
  if (ev.target.getAttribute('data-handle-key')) {
24391
24516
  return;
24392
24517
  }
@@ -24405,7 +24530,7 @@
24405
24530
  });
24406
24531
  if (_this.props.onClick) _this.props.onClick();
24407
24532
  });
24408
- _defineProperty$W(_assertThisInitialized$5(_this), "handleKeydown", function (ev) {
24533
+ _defineProperty$W(_assertThisInitialized$6(_this), "handleKeydown", function (ev) {
24409
24534
  var idx = getHandleFor(ev);
24410
24535
  if (ev.keyCode === KEYS.ESC) {
24411
24536
  ev.currentTarget.blur();
@@ -24423,7 +24548,7 @@
24423
24548
  });
24424
24549
  // Make sure the proposed position respects the bounds and
24425
24550
  // does not collide with other handles too much.
24426
- _defineProperty$W(_assertThisInitialized$5(_this), "validatePosition", function (idx, proposedPosition) {
24551
+ _defineProperty$W(_assertThisInitialized$6(_this), "validatePosition", function (idx, proposedPosition) {
24427
24552
  var _this$state4 = _this.state,
24428
24553
  handlePos = _this$state4.handlePos,
24429
24554
  handleDimensions = _this$state4.handleDimensions;
@@ -24432,7 +24557,7 @@
24432
24557
  );
24433
24558
  });
24434
24559
 
24435
- _defineProperty$W(_assertThisInitialized$5(_this), "validateValues", function (proposedValues, props) {
24560
+ _defineProperty$W(_assertThisInitialized$6(_this), "validateValues", function (proposedValues, props) {
24436
24561
  var _ref4 = props || _this.props,
24437
24562
  max = _ref4.max,
24438
24563
  min = _ref4.min;
@@ -24444,7 +24569,7 @@
24444
24569
  return realValue;
24445
24570
  });
24446
24571
  });
24447
- _defineProperty$W(_assertThisInitialized$5(_this), "canMove", function (idx, proposedPosition) {
24572
+ _defineProperty$W(_assertThisInitialized$6(_this), "canMove", function (idx, proposedPosition) {
24448
24573
  var _this$state5 = _this.state,
24449
24574
  handlePos = _this$state5.handlePos,
24450
24575
  handleDimensions = _this$state5.handleDimensions;
@@ -24456,11 +24581,11 @@
24456
24581
  if (proposedPosition < prevHandlePosition) return false;
24457
24582
  return true;
24458
24583
  });
24459
- _defineProperty$W(_assertThisInitialized$5(_this), "fireChangeEvent", function () {
24584
+ _defineProperty$W(_assertThisInitialized$6(_this), "fireChangeEvent", function () {
24460
24585
  var onChange = _this.props.onChange;
24461
24586
  if (onChange) onChange(_this.getPublicState());
24462
24587
  });
24463
- _defineProperty$W(_assertThisInitialized$5(_this), "slideTo", function (idx, proposedPosition, onAfterSet) {
24588
+ _defineProperty$W(_assertThisInitialized$6(_this), "slideTo", function (idx, proposedPosition, onAfterSet) {
24464
24589
  var nextState = _this.getNextState(idx, proposedPosition);
24465
24590
  _this.setState(nextState, function () {
24466
24591
  var onValuesUpdated = _this.props.onValuesUpdated;
@@ -24468,7 +24593,7 @@
24468
24593
  if (onAfterSet) onAfterSet();
24469
24594
  });
24470
24595
  });
24471
- _defineProperty$W(_assertThisInitialized$5(_this), "updateNewValues", function (nextProps) {
24596
+ _defineProperty$W(_assertThisInitialized$6(_this), "updateNewValues", function (nextProps) {
24472
24597
  var slidingIndex = _this.state.slidingIndex;
24473
24598
 
24474
24599
  // Don't update while the slider is sliding
@@ -24488,7 +24613,7 @@
24488
24613
  return _this.fireChangeEvent();
24489
24614
  });
24490
24615
  });
24491
- _defineProperty$W(_assertThisInitialized$5(_this), "render", function () {
24616
+ _defineProperty$W(_assertThisInitialized$6(_this), "render", function () {
24492
24617
  var _ref5 = _this.props,
24493
24618
  children = _ref5.children,
24494
24619
  disabled = _ref5.disabled,
@@ -24560,7 +24685,7 @@
24560
24685
  });
24561
24686
  return _this;
24562
24687
  }
24563
- return _createClass$7(Rheostat);
24688
+ return _createClass$8(Rheostat);
24564
24689
  }(d);
24565
24690
  _defineProperty$W(Rheostat, "defaultProps", {
24566
24691
  className: '',
@@ -24585,10 +24710,10 @@
24585
24710
  values: [PERCENT_EMPTY]
24586
24711
  });
24587
24712
 
24588
- function _toConsumableArray$a(arr) {
24589
- return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$a();
24713
+ function _toConsumableArray$9(arr) {
24714
+ return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$9();
24590
24715
  }
24591
- function _nonIterableSpread$a() {
24716
+ function _nonIterableSpread$9() {
24592
24717
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
24593
24718
  }
24594
24719
  function _unsupportedIterableToArray$k(o, minLen) {
@@ -24599,10 +24724,10 @@
24599
24724
  if (n === "Map" || n === "Set") return Array.from(o);
24600
24725
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
24601
24726
  }
24602
- function _iterableToArray$a(iter) {
24727
+ function _iterableToArray$9(iter) {
24603
24728
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
24604
24729
  }
24605
- function _arrayWithoutHoles$a(arr) {
24730
+ function _arrayWithoutHoles$9(arr) {
24606
24731
  if (Array.isArray(arr)) return _arrayLikeToArray$k(arr);
24607
24732
  }
24608
24733
  function _arrayLikeToArray$k(arr, len) {
@@ -24633,12 +24758,12 @@
24633
24758
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
24634
24759
  }, _typeof$Y(obj);
24635
24760
  }
24636
- function _classCallCheck$8(instance, Constructor) {
24761
+ function _classCallCheck$9(instance, Constructor) {
24637
24762
  if (!(instance instanceof Constructor)) {
24638
24763
  throw new TypeError("Cannot call a class as a function");
24639
24764
  }
24640
24765
  }
24641
- function _defineProperties$8(target, props) {
24766
+ function _defineProperties$9(target, props) {
24642
24767
  for (var i = 0; i < props.length; i++) {
24643
24768
  var descriptor = props[i];
24644
24769
  descriptor.enumerable = descriptor.enumerable || false;
@@ -24647,15 +24772,15 @@
24647
24772
  Object.defineProperty(target, _toPropertyKey$W(descriptor.key), descriptor);
24648
24773
  }
24649
24774
  }
24650
- function _createClass$8(Constructor, protoProps, staticProps) {
24651
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
24652
- if (staticProps) _defineProperties$8(Constructor, staticProps);
24775
+ function _createClass$9(Constructor, protoProps, staticProps) {
24776
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
24777
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
24653
24778
  Object.defineProperty(Constructor, "prototype", {
24654
24779
  writable: false
24655
24780
  });
24656
24781
  return Constructor;
24657
24782
  }
24658
- function _inherits$6(subClass, superClass) {
24783
+ function _inherits$7(subClass, superClass) {
24659
24784
  if (typeof superClass !== "function" && superClass !== null) {
24660
24785
  throw new TypeError("Super expression must either be null or a function");
24661
24786
  }
@@ -24669,44 +24794,44 @@
24669
24794
  Object.defineProperty(subClass, "prototype", {
24670
24795
  writable: false
24671
24796
  });
24672
- if (superClass) _setPrototypeOf$6(subClass, superClass);
24797
+ if (superClass) _setPrototypeOf$7(subClass, superClass);
24673
24798
  }
24674
- function _setPrototypeOf$6(o, p) {
24675
- _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
24799
+ function _setPrototypeOf$7(o, p) {
24800
+ _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
24676
24801
  o.__proto__ = p;
24677
24802
  return o;
24678
24803
  };
24679
- return _setPrototypeOf$6(o, p);
24804
+ return _setPrototypeOf$7(o, p);
24680
24805
  }
24681
- function _createSuper$6(Derived) {
24682
- var hasNativeReflectConstruct = _isNativeReflectConstruct$6();
24806
+ function _createSuper$7(Derived) {
24807
+ var hasNativeReflectConstruct = _isNativeReflectConstruct$7();
24683
24808
  return function _createSuperInternal() {
24684
- var Super = _getPrototypeOf$6(Derived),
24809
+ var Super = _getPrototypeOf$7(Derived),
24685
24810
  result;
24686
24811
  if (hasNativeReflectConstruct) {
24687
- var NewTarget = _getPrototypeOf$6(this).constructor;
24812
+ var NewTarget = _getPrototypeOf$7(this).constructor;
24688
24813
  result = Reflect.construct(Super, arguments, NewTarget);
24689
24814
  } else {
24690
24815
  result = Super.apply(this, arguments);
24691
24816
  }
24692
- return _possibleConstructorReturn$6(this, result);
24817
+ return _possibleConstructorReturn$7(this, result);
24693
24818
  };
24694
24819
  }
24695
- function _possibleConstructorReturn$6(self, call) {
24820
+ function _possibleConstructorReturn$7(self, call) {
24696
24821
  if (call && (_typeof$Y(call) === "object" || typeof call === "function")) {
24697
24822
  return call;
24698
24823
  } else if (call !== void 0) {
24699
24824
  throw new TypeError("Derived constructors may only return object or undefined");
24700
24825
  }
24701
- return _assertThisInitialized$6(self);
24826
+ return _assertThisInitialized$7(self);
24702
24827
  }
24703
- function _assertThisInitialized$6(self) {
24828
+ function _assertThisInitialized$7(self) {
24704
24829
  if (self === void 0) {
24705
24830
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
24706
24831
  }
24707
24832
  return self;
24708
24833
  }
24709
- function _isNativeReflectConstruct$6() {
24834
+ function _isNativeReflectConstruct$7() {
24710
24835
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
24711
24836
  if (Reflect.construct.sham) return false;
24712
24837
  if (typeof Proxy === "function") return true;
@@ -24717,11 +24842,11 @@
24717
24842
  return false;
24718
24843
  }
24719
24844
  }
24720
- function _getPrototypeOf$6(o) {
24721
- _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
24845
+ function _getPrototypeOf$7(o) {
24846
+ _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
24722
24847
  return o.__proto__ || Object.getPrototypeOf(o);
24723
24848
  };
24724
- return _getPrototypeOf$6(o);
24849
+ return _getPrototypeOf$7(o);
24725
24850
  }
24726
24851
  function _defineProperty$X(obj, key, value) {
24727
24852
  key = _toPropertyKey$W(key);
@@ -24752,22 +24877,22 @@
24752
24877
  return (hint === "string" ? String : Number)(input);
24753
24878
  }
24754
24879
  var Slider = /*#__PURE__*/function (_Component) {
24755
- _inherits$6(Slider, _Component);
24756
- var _super = _createSuper$6(Slider);
24880
+ _inherits$7(Slider, _Component);
24881
+ var _super = _createSuper$7(Slider);
24757
24882
  function Slider() {
24758
24883
  var _this;
24759
- _classCallCheck$8(this, Slider);
24884
+ _classCallCheck$9(this, Slider);
24760
24885
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24761
24886
  args[_key] = arguments[_key];
24762
24887
  }
24763
24888
  _this = _super.call.apply(_super, [this].concat(args));
24764
- _defineProperty$X(_assertThisInitialized$6(_this), "handleChange", function (_ref) {
24889
+ _defineProperty$X(_assertThisInitialized$7(_this), "handleChange", function (_ref) {
24765
24890
  var values = _ref.values;
24766
24891
  if (!_this.isDisabled) {
24767
24892
  _this.props.refine(values);
24768
24893
  }
24769
24894
  });
24770
- _defineProperty$X(_assertThisInitialized$6(_this), "createHandleComponent", function (tooltips) {
24895
+ _defineProperty$X(_assertThisInitialized$7(_this), "createHandleComponent", function (tooltips) {
24771
24896
  return function (props) {
24772
24897
  // display only two decimals after comma,
24773
24898
  // and apply `tooltips.format()` if any
@@ -24787,7 +24912,7 @@
24787
24912
  });
24788
24913
  return _this;
24789
24914
  }
24790
- _createClass$8(Slider, [{
24915
+ _createClass$9(Slider, [{
24791
24916
  key: "isDisabled",
24792
24917
  get: function get() {
24793
24918
  return this.props.min >= this.props.max;
@@ -24802,7 +24927,7 @@
24802
24927
  var totalLength = max - min;
24803
24928
  var steps = 34;
24804
24929
  var stepsLength = totalLength / steps;
24805
- var pitPoints = [min].concat(_toConsumableArray$a(range({
24930
+ var pitPoints = [min].concat(_toConsumableArray$9(range({
24806
24931
  end: steps - 1
24807
24932
  }).map(function (step) {
24808
24933
  return min + stepsLength * (step + 1);
@@ -24818,7 +24943,7 @@
24818
24943
  max = _ref3.max,
24819
24944
  step = _ref3.step;
24820
24945
  if (!step) return undefined;
24821
- return [].concat(_toConsumableArray$a(range({
24946
+ return [].concat(_toConsumableArray$9(range({
24822
24947
  start: min,
24823
24948
  end: max,
24824
24949
  step: step
@@ -25084,16 +25209,16 @@
25084
25209
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
25085
25210
  }, _typeof$_(obj);
25086
25211
  }
25087
- function _toConsumableArray$b(arr) {
25088
- return _arrayWithoutHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$m(arr) || _nonIterableSpread$b();
25212
+ function _toConsumableArray$a(arr) {
25213
+ return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$m(arr) || _nonIterableSpread$a();
25089
25214
  }
25090
- function _nonIterableSpread$b() {
25215
+ function _nonIterableSpread$a() {
25091
25216
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25092
25217
  }
25093
- function _iterableToArray$b(iter) {
25218
+ function _iterableToArray$a(iter) {
25094
25219
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25095
25220
  }
25096
- function _arrayWithoutHoles$b(arr) {
25221
+ function _arrayWithoutHoles$a(arr) {
25097
25222
  if (Array.isArray(arr)) return _arrayLikeToArray$m(arr);
25098
25223
  }
25099
25224
  function ownKeys$U(object, enumerableOnly) {
@@ -25369,7 +25494,7 @@
25369
25494
  // eslint-disable-next-line no-continue
25370
25495
  return "continue";
25371
25496
  }
25372
- var stars = _toConsumableArray$b(new Array(Math.floor(max / STEP))).map(function (_v, i) {
25497
+ var stars = _toConsumableArray$a(new Array(Math.floor(max / STEP))).map(function (_v, i) {
25373
25498
  return i * STEP < star;
25374
25499
  });
25375
25500
  facetValues.push({
@@ -29060,12 +29185,76 @@
29060
29185
  });
29061
29186
  });
29062
29187
 
29063
- // @TODO: hook up to some way it can be set runtime, maybe query params
29064
- function error(message) {
29065
- {
29066
- // eslint-disable-next-line no-console
29067
- console.error("[Algolia Experiences] ".concat(message));
29188
+ function DefaultBanner$1(props) {
29189
+ if (!props.banner || !props.banner.image) {
29190
+ return null;
29191
+ }
29192
+ if (!props.banner.image.urls[0].url) {
29193
+ return null;
29068
29194
  }
29195
+ return h("aside", {
29196
+ className: cx('ais-Hits-banner', props.classNames.bannerRoot)
29197
+ }, props.banner.link ? h("a", {
29198
+ className: cx('ais-Hits-banner-link', props.classNames.bannerLink),
29199
+ href: props.banner.link.url,
29200
+ target: props.banner.link.target
29201
+ }, h("img", {
29202
+ className: cx('ais-Hits-banner-image', props.classNames.bannerImage),
29203
+ src: props.banner.image.urls[0].url,
29204
+ alt: props.banner.image.title
29205
+ })) : h("img", {
29206
+ className: cx('ais-Hits-banner-image', props.classNames.bannerImage),
29207
+ src: props.banner.image.urls[0].url,
29208
+ alt: props.banner.image.title
29209
+ }));
29210
+ }
29211
+ function renderer$k(_ref) {
29212
+ var container = _ref.container,
29213
+ classNames = _ref.classNames,
29214
+ data = _ref.data;
29215
+ return function () {
29216
+ return P(h(DefaultBanner$1, {
29217
+ banner: data,
29218
+ classNames: classNames
29219
+ }), container);
29220
+ };
29221
+ }
29222
+ function connectNoop(renderFn, unmountFn) {
29223
+ return function () {
29224
+ return {
29225
+ $$type: 'ais.experiences-noop',
29226
+ init: function init() {
29227
+ renderFn();
29228
+ },
29229
+ render: function render() {
29230
+ renderFn();
29231
+ },
29232
+ dispose: function dispose() {
29233
+ unmountFn();
29234
+ }
29235
+ };
29236
+ };
29237
+ }
29238
+ function banner(widgetParams) {
29239
+ var _ref2 = widgetParams || {},
29240
+ container = _ref2.container,
29241
+ data = _ref2.data,
29242
+ _ref2$classNames = _ref2.classNames,
29243
+ classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
29244
+ if (!container) {
29245
+ throw new Error('The `container` option is required.');
29246
+ }
29247
+ var specializedRenderer = renderer$k({
29248
+ container: container,
29249
+ classNames: classNames,
29250
+ data: data
29251
+ });
29252
+ var makeWidget = connectNoop(specializedRenderer, function () {
29253
+ return P(null, container);
29254
+ });
29255
+ return _objectSpread2({
29256
+ $$widgetType: 'ais.experiences-banner'
29257
+ }, makeWidget());
29069
29258
  }
29070
29259
 
29071
29260
  var widgets = {
@@ -29103,12 +29292,7 @@
29103
29292
  style.textContent = "\n .ais-Grid {\n display: grid;\n grid-template-columns: minmax(min-content, 200px) 1fr;\n gap: 1em;\n }\n ";
29104
29293
  document.head.appendChild(style);
29105
29294
  }
29106
- function configToIndex(config, elements) {
29107
- var container = elements.get(config.id);
29108
- if (!container) {
29109
- error("Element with id ".concat(config.id, " not found"));
29110
- return [];
29111
- }
29295
+ function configToIndex(config, container) {
29112
29296
  return [index({
29113
29297
  indexName: config.indexName,
29114
29298
  indexId: config.id
@@ -29179,6 +29363,12 @@
29179
29363
  return blockToWidget(column, widgetContainer);
29180
29364
  }).flat(1);
29181
29365
  }
29366
+ if (child.type === 'banner') {
29367
+ return [banner({
29368
+ container: widgetContainer,
29369
+ data: child.parameters
29370
+ })];
29371
+ }
29182
29372
  if (isTemplateWidget(child)) {
29183
29373
  // type cast is needed here because the spread adding `container` and `templates` loses the type discriminant
29184
29374
  var _parameters = child.parameters;
@@ -29186,6 +29376,9 @@
29186
29376
  return [_widget(_objectSpread2(_objectSpread2({}, _parameters), {}, {
29187
29377
  container: widgetContainer,
29188
29378
  templates: {
29379
+ banner: function banner() {
29380
+ return null;
29381
+ },
29189
29382
  item: function item(hit, _ref) {
29190
29383
  var components = _ref.components;
29191
29384
  if (!child.children.length) {
@@ -29257,6 +29450,14 @@
29257
29450
  }))];
29258
29451
  }
29259
29452
 
29453
+ // @TODO: hook up to some way it can be set runtime, maybe query params
29454
+ function error(message) {
29455
+ {
29456
+ // eslint-disable-next-line no-console
29457
+ console.error("[Algolia Experiences] ".concat(message));
29458
+ }
29459
+ }
29460
+
29260
29461
  function setupInstantSearch() {
29261
29462
  try {
29262
29463
  var settings = getSettings();
@@ -29265,20 +29466,74 @@
29265
29466
  searchClient: searchClient
29266
29467
  });
29267
29468
  window.__search = search;
29268
- var elements = getElements();
29269
29469
  injectStyles();
29270
- fetchConfiguration(_toConsumableArray(elements.keys()), settings).then(function (configuration) {
29271
- search.addWidgets(configuration.flatMap(function (config) {
29272
- return configToIndex(config, elements);
29273
- })).start();
29274
- });
29470
+ if (!customElements.get('algolia-experience')) {
29471
+ registerComponent(search, settings);
29472
+ }
29275
29473
  } catch (err) {
29276
29474
  error(err.message);
29277
29475
  }
29278
29476
  }
29477
+ function registerComponent(search, settings) {
29478
+ var AlgoliaExperience = /*#__PURE__*/function (_HTMLElement) {
29479
+ _inherits(AlgoliaExperience, _HTMLElement);
29480
+ var _super = _createSuper(AlgoliaExperience);
29481
+ function AlgoliaExperience() {
29482
+ var _this;
29483
+ _classCallCheck(this, AlgoliaExperience);
29484
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29485
+ args[_key] = arguments[_key];
29486
+ }
29487
+ _this = _super.call.apply(_super, [this].concat(args));
29488
+ _defineProperty(_assertThisInitialized(_this), "widgets", []);
29489
+ return _this;
29490
+ }
29491
+ _createClass(AlgoliaExperience, [{
29492
+ key: "connectedCallback",
29493
+ value: function connectedCallback() {
29494
+ var _this2 = this;
29495
+ var id = this.getAttribute('experience-id');
29496
+ if (!id) {
29497
+ error('Experience ID is required');
29498
+ return;
29499
+ }
29500
+ fetchConfiguration(id, settings).then(function (config) {
29501
+ _this2.widgets = configToIndex(config, _this2);
29502
+ search.addWidgets(_this2.widgets);
29503
+ if (!search.started) {
29504
+ search.start();
29505
+ }
29506
+ });
29507
+ }
29508
+ }, {
29509
+ key: "disconnectedCallback",
29510
+ value: function disconnectedCallback() {
29511
+ search.removeWidgets(this.widgets);
29512
+ }
29513
+ }, {
29514
+ key: "attributeChangedCallback",
29515
+ value: function attributeChangedCallback(name, oldValue, newValue) {
29516
+ if (oldValue === null || name !== 'experience-id') {
29517
+ return;
29518
+ }
29519
+ if (oldValue !== newValue) {
29520
+ this.disconnectedCallback();
29521
+ this.connectedCallback();
29522
+ }
29523
+ }
29524
+ }]);
29525
+ return AlgoliaExperience;
29526
+ }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
29527
+ _defineProperty(AlgoliaExperience, "observedAttributes", ['experience-id']);
29528
+ customElements.define('algolia-experience', AlgoliaExperience);
29529
+ }
29279
29530
 
29280
29531
  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
29281
- document.addEventListener('DOMContentLoaded', setupInstantSearch);
29532
+ if (document.readyState === 'loading') {
29533
+ document.addEventListener('DOMContentLoaded', setupInstantSearch);
29534
+ } else {
29535
+ setupInstantSearch();
29536
+ }
29282
29537
  }
29283
29538
 
29284
29539
  })));